mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-24 16:37:54 +00:00
Merge branch 'master' into bill/sdl3
This commit is contained in:
@@ -10,10 +10,10 @@ SavePanel_runModal :: proc "c" (self: ^SavePanel) -> ModalResponse {
|
||||
|
||||
@(objc_type=SavePanel, objc_name="savePanel", objc_is_class_method=true)
|
||||
SavePanel_savePanel :: proc "c" () -> ^SavePanel {
|
||||
return msgSend(^SavePanel, SavePanel, "savePanel")
|
||||
return msgSend(^SavePanel, SavePanel, "savePanel")
|
||||
}
|
||||
|
||||
@(objc_type=SavePanel, objc_name="URL")
|
||||
SavePanel_URL :: proc "c" (self: ^SavePanel) -> ^Array {
|
||||
return msgSend(^Array, self, "URL")
|
||||
}
|
||||
return msgSend(^Array, self, "URL")
|
||||
}
|
||||
|
||||
@@ -134,6 +134,11 @@ String_isEqualToString :: proc "c" (self, other: ^String) -> BOOL {
|
||||
return msgSend(BOOL, self, "isEqualToString:", other)
|
||||
}
|
||||
|
||||
@(objc_type=String, objc_name="stringByAppendingString")
|
||||
String_stringByAppendingString :: proc "c" (self, other: ^String) -> ^String {
|
||||
return msgSend(^String, self, "stringByAppendingString:", other)
|
||||
}
|
||||
|
||||
@(objc_type=String, objc_name="rangeOfString")
|
||||
String_rangeOfString :: proc "c" (self, other: ^String, options: StringCompareOptions) -> Range {
|
||||
return msgSend(Range, self, "rangeOfString:options:", other, options)
|
||||
|
||||
@@ -1329,6 +1329,7 @@ Socket_Option :: enum {
|
||||
ACCEPTCONN = 30,
|
||||
PEERSEC = 31,
|
||||
PASSSEC = 34,
|
||||
IP_ADD_MEMBERSHIP = 35,
|
||||
MARK = 36,
|
||||
PROTOCOL = 38,
|
||||
DOMAIN = 39,
|
||||
|
||||
@@ -2010,10 +2010,10 @@ statfs :: proc "contextless" (path: cstring, statfs: ^Stat_FS) -> (Errno) {
|
||||
*/
|
||||
fstatfs :: proc "contextless" (fd: Fd, statfs: ^Stat_FS) -> (Errno) {
|
||||
when size_of(int) == 8 {
|
||||
ret := syscall(SYS_statfs, fd, statfs)
|
||||
ret := syscall(SYS_fstatfs, fd, statfs)
|
||||
return Errno(-ret)
|
||||
} else {
|
||||
ret := syscall(SYS_statfs64, fd, size_of(Stat_FS), statfs)
|
||||
ret := syscall(SYS_fstatfs64, fd, size_of(Stat_FS), statfs)
|
||||
return Errno(-ret)
|
||||
}
|
||||
}
|
||||
|
||||
+211
-171
@@ -899,7 +899,7 @@ CS :: enum c.int {
|
||||
}
|
||||
|
||||
PC :: enum c.int {
|
||||
_2_SYMLINK = _PC_2_SYMLINK,
|
||||
_2_SYMLINKS = _PC_2_SYMLINKS,
|
||||
_ALLOC_SIZE_MIN = _PC_ALLOC_SIZE_MIN,
|
||||
_ASYNC_IO = _PC_ASYNC_IO,
|
||||
_CHOWN_RESTRICTED = _PC_CHOWN_RESTRICTED,
|
||||
@@ -1099,7 +1099,7 @@ when ODIN_OS == .Darwin {
|
||||
_PC_CHOWN_RESTRICTED :: 7
|
||||
_PC_NO_TRUNC :: 8
|
||||
_PC_VDISABLE :: 9
|
||||
_PC_2_SYMLINK :: 15
|
||||
_PC_2_SYMLINKS :: 15
|
||||
_PC_ALLOC_SIZE_MIN :: 16
|
||||
_PC_ASYNC_IO :: 17
|
||||
_PC_FILESIZEBITS :: 18
|
||||
@@ -1280,7 +1280,7 @@ when ODIN_OS == .Darwin {
|
||||
_PC_CHOWN_RESTRICTED :: 7
|
||||
_PC_NO_TRUNC :: 8
|
||||
_PC_VDISABLE :: 9
|
||||
_PC_2_SYMLINK :: 13 // NOTE: not in headers (freebsd)
|
||||
_PC_2_SYMLINKS :: 13 // NOTE: not in headers (freebsd)
|
||||
_PC_ALLOC_SIZE_MIN :: 10
|
||||
_PC_ASYNC_IO :: 53
|
||||
_PC_FILESIZEBITS :: 12
|
||||
@@ -1461,7 +1461,7 @@ when ODIN_OS == .Darwin {
|
||||
_PC_CHOWN_RESTRICTED :: 7
|
||||
_PC_NO_TRUNC :: 8
|
||||
_PC_VDISABLE :: 9
|
||||
_PC_2_SYMLINK :: 13 // NOTE: not in headers
|
||||
_PC_2_SYMLINKS :: 13 // NOTE: not in headers
|
||||
_PC_ALLOC_SIZE_MIN :: 10 // NOTE: not in headers
|
||||
_PC_ASYNC_IO :: 53 // NOTE: not in headers
|
||||
_PC_FILESIZEBITS :: 11
|
||||
@@ -1646,7 +1646,7 @@ when ODIN_OS == .Darwin {
|
||||
_PC_CHOWN_RESTRICTED :: 7
|
||||
_PC_NO_TRUNC :: 8
|
||||
_PC_VDISABLE :: 9
|
||||
_PC_2_SYMLINK :: 10
|
||||
_PC_2_SYMLINKS :: 10
|
||||
_PC_ALLOC_SIZE_MIN :: 11
|
||||
_PC_ASYNC_IO :: 12
|
||||
_PC_FILESIZEBITS :: 13
|
||||
@@ -1816,176 +1816,216 @@ when ODIN_OS == .Darwin {
|
||||
F_TLOCK :: 2
|
||||
F_ULOCK :: 0
|
||||
|
||||
_CS_PATH :: 1
|
||||
_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS :: 2
|
||||
_CS_PATH :: 0
|
||||
_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS :: 1
|
||||
_CS_GNU_LIBC_VERSION :: 2
|
||||
_CS_GNU_LIBPTHREAD_VERSION :: 3
|
||||
_CS_POSIX_V5_WIDTH_RESTRICTED_ENVS :: 4
|
||||
_CS_POSIX_V7_WIDTH_RESTRICTED_ENVS :: 5
|
||||
|
||||
_CS_POSIX_V6_ILP32_OFF32_CFLAGS :: 1116
|
||||
_CS_POSIX_V6_ILP32_OFF32_LDFLAGS :: 1117
|
||||
_CS_POSIX_V6_ILP32_OFF32_LIBS :: 1118
|
||||
_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS :: 1120
|
||||
_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS :: 1121
|
||||
_CS_POSIX_V6_ILP32_OFFBIG_LIBS :: 1122
|
||||
_CS_POSIX_V6_LP64_OFF64_CFLAGS :: 1124
|
||||
_CS_POSIX_V6_LP64_OFF64_LDFLAGS :: 1125
|
||||
_CS_POSIX_V6_LP64_OFF64_LIBS :: 1126
|
||||
_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS :: 1128
|
||||
_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS :: 1129
|
||||
_CS_POSIX_V6_LPBIG_OFFBIG_LIBS :: 1130
|
||||
_CS_POSIX_V6_ILP32_OFF32_CFLAGS :: 1116
|
||||
_CS_POSIX_V6_ILP32_OFF32_LDFLAGS :: 1117
|
||||
_CS_POSIX_V6_ILP32_OFF32_LIBS :: 1118
|
||||
_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS :: 1119
|
||||
_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS :: 1120
|
||||
_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS :: 1121
|
||||
_CS_POSIX_V6_ILP32_OFFBIG_LIBS :: 1122
|
||||
_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS :: 1123
|
||||
_CS_POSIX_V6_LP64_OFF64_CFLAGS :: 1124
|
||||
_CS_POSIX_V6_LP64_OFF64_LDFLAGS :: 1125
|
||||
_CS_POSIX_V6_LP64_OFF64_LIBS :: 1126
|
||||
_CS_POSIX_V6_LP64_OFF64_LINTFLAGS :: 1127
|
||||
_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS :: 1128
|
||||
_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS :: 1129
|
||||
_CS_POSIX_V6_LPBIG_OFFBIG_LIBS :: 1130
|
||||
_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS :: 1131
|
||||
_CS_POSIX_V7_ILP32_OFF32_CFLAGS :: 1132
|
||||
_CS_POSIX_V7_ILP32_OFF32_LDFLAGS :: 1133
|
||||
_CS_POSIX_V7_ILP32_OFF32_LIBS :: 1134
|
||||
_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS :: 1135
|
||||
_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS :: 1136
|
||||
_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS :: 1137
|
||||
_CS_POSIX_V7_ILP32_OFFBIG_LIBS :: 1138
|
||||
_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS :: 1139
|
||||
_CS_POSIX_V7_LP64_OFF64_CFLAGS :: 1140
|
||||
_CS_POSIX_V7_LP64_OFF64_LDFLAGS :: 1141
|
||||
_CS_POSIX_V7_LP64_OFF64_LIBS :: 1142
|
||||
_CS_POSIX_V7_LP64_OFF64_LINTFLAGS :: 1143
|
||||
_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS :: 1144
|
||||
_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS :: 1145
|
||||
_CS_POSIX_V7_LPBIG_OFFBIG_LIBS :: 1146
|
||||
_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS :: 1147
|
||||
_CS_V6_ENV :: 1148
|
||||
_CS_V7_ENV :: 1149
|
||||
_CS_POSIX_V7_THREADS_CFLAGS :: 1150
|
||||
_CS_POSIX_V7_THREADS_LDFLAGS :: 1151
|
||||
|
||||
_PC_LINK_MAX :: 1
|
||||
_PC_MAX_CANON :: 2
|
||||
_PC_MAX_INPUT :: 3
|
||||
_PC_NAME_MAX :: 4
|
||||
_PC_PATH_MAX :: 5
|
||||
_PC_PIPE_BUF :: 6
|
||||
_PC_CHOWN_RESTRICTED :: 7
|
||||
_PC_NO_TRUNC :: 8
|
||||
_PC_VDISABLE :: 9
|
||||
_PC_SYNC_IO :: 10
|
||||
_PC_ASYNC_IO :: 11
|
||||
_PC_PRIO_IO :: 12
|
||||
_PC_FILESIZEBITS :: 14
|
||||
_PC_REC_INCR_XFER_SIZE :: 15
|
||||
_PC_REC_MAX_XFER_SIZE :: 16
|
||||
_PC_REC_MIN_XFER_SIZE :: 17
|
||||
_PC_REC_XFER_ALIGN :: 18
|
||||
_PC_ALLOC_SIZE_MIN :: 19
|
||||
_PC_SYMLINK_MAX :: 20
|
||||
_PC_2_SYMLINK :: 21
|
||||
|
||||
_SC_ARG_MAX :: 1
|
||||
_SC_CHILD_MAX :: 2
|
||||
_SC_CLK_TCK :: 3
|
||||
_SC_NGROUPS_MAX :: 4
|
||||
_SC_OPEN_MAX :: 5
|
||||
_SC_STREAM_MAX :: 6
|
||||
_SC_TZNAME_MAX :: 7
|
||||
_SC_JOB_CONTROL :: 8
|
||||
_SC_SAVED_IDS :: 9
|
||||
_SC_REALTIME_SIGNALS :: 10
|
||||
_SC_PRIORITY_SCHEDULING :: 11
|
||||
_SC_TIMERS :: 12
|
||||
_SC_ASYNCHRONOUS_IO :: 13
|
||||
_SC_PRIORITIZED_IO :: 14
|
||||
_SC_SYNCHRONIZED_IO :: 15
|
||||
_SC_FSYNC :: 16
|
||||
_SC_MAPPED_FILES :: 17
|
||||
_SC_MEMLOCK :: 18
|
||||
_SC_MEMLOCK_RANGE :: 19
|
||||
_SC_MEMORY_PROTECTION :: 20
|
||||
_SC_MESSAGE_PASSING :: 21
|
||||
_SC_SEMAPHORES :: 22
|
||||
_SC_SHARED_MEMORY_OBJECTS :: 23
|
||||
_SC_AIO_LISTIO_MAX :: 24
|
||||
_SC_AIO_MAX :: 25
|
||||
_SC_AIO_PRIO_DELTA_MAX :: 26
|
||||
_SC_DELAYTIMER_MAX :: 27
|
||||
_SC_MQ_OPEN_MAX :: 28
|
||||
_SC_MQ_PRIO_MAX :: 29
|
||||
_SC_VERSION :: 30
|
||||
_SC_PAGESIZE :: 31
|
||||
_SC_PAGE_SIZE :: _SC_PAGESIZE
|
||||
_SC_RTSIG_MAX :: 32
|
||||
_SC_SEM_NSEMS_MAX :: 33
|
||||
_SC_SEM_VALUE_MAX :: 34
|
||||
_SC_SIGQUEUE_MAX :: 35
|
||||
_SC_TIMER_MAX :: 36
|
||||
_SC_BC_BASE_MAX :: 37
|
||||
_SC_BC_DIM_MAX :: 38
|
||||
_SC_BC_SCALE_MAX :: 39
|
||||
_SC_BC_STRING_MAX :: 40
|
||||
_SC_COLL_WEIGHTS_MAX :: 41
|
||||
_SC_EXPR_NEST_MAX :: 43
|
||||
_SC_LINE_MAX :: 44
|
||||
_SC_RE_DUP_MAX :: 45
|
||||
_SC_2_VERSION :: 47
|
||||
_SC_2_C_BIND :: 48
|
||||
_SC_2_C_DEV :: 49
|
||||
_SC_2_FORT_DEV :: 50
|
||||
_SC_2_FORT_RUN :: 51
|
||||
_SC_2_SW_DEV :: 52
|
||||
_SC_2_LOCALEDEF :: 53
|
||||
_PC_LINK_MAX :: 0
|
||||
_PC_MAX_CANON :: 1
|
||||
_PC_MAX_INPUT :: 2
|
||||
_PC_NAME_MAX :: 3
|
||||
_PC_PATH_MAX :: 4
|
||||
_PC_PIPE_BUF :: 5
|
||||
_PC_CHOWN_RESTRICTED :: 6
|
||||
_PC_NO_TRUNC :: 7
|
||||
_PC_VDISABLE :: 8
|
||||
_PC_SYNC_IO :: 9
|
||||
_PC_ASYNC_IO :: 10
|
||||
_PC_PRIO_IO :: 11
|
||||
_PC_SOCK_MAXBUF :: 12
|
||||
_PC_FILESIZEBITS :: 13
|
||||
_PC_REC_INCR_XFER_SIZE :: 14
|
||||
_PC_REC_MAX_XFER_SIZE :: 15
|
||||
_PC_REC_MIN_XFER_SIZE :: 16
|
||||
_PC_REC_XFER_ALIGN :: 17
|
||||
_PC_ALLOC_SIZE_MIN :: 18
|
||||
_PC_SYMLINK_MAX :: 19
|
||||
_PC_2_SYMLINKS :: 20
|
||||
|
||||
_SC_IOV_MAX :: 62
|
||||
_SC_THREADS :: 69
|
||||
_SC_THREAD_SAFE_FUNCTIONS :: 70
|
||||
_SC_GETGR_R_SIZE_MAX :: 71
|
||||
_SC_GETPW_R_SIZE_MAX :: 72
|
||||
_SC_LOGIN_NAME_MAX :: 73
|
||||
_SC_TTY_NAME_MAX :: 74
|
||||
_SC_THREAD_DESTRUCTOR_ITERATIONS :: 75
|
||||
_SC_THREAD_KEYS_MAX :: 76
|
||||
_SC_THREAD_STACK_MIN :: 77
|
||||
_SC_THREAD_THREADS_MAX :: 78
|
||||
_SC_THREAD_ATTR_STACKADDR :: 79
|
||||
_SC_THREAD_ATTR_STACKSIZE :: 80
|
||||
_SC_THREAD_PRIORITY_SCHEDULING :: 81
|
||||
_SC_THREAD_PRIO_INHERIT :: 82
|
||||
_SC_THREAD_PRIO_PROTECT :: 83
|
||||
_SC_THREAD_PROCESS_SHARED :: 84
|
||||
_SC_NPROCESSORS_CONF :: 85
|
||||
_SC_NPROCESSORS_ONLN :: 86
|
||||
_SC_PHYS_PAGES :: 87
|
||||
_SC_AVPHYS_PAGES :: 88
|
||||
_SC_ATEXIT_MAX :: 89
|
||||
_SC_PASS_MAX :: 90
|
||||
_SC_XOPEN_VERSION :: 91
|
||||
_SC_XOPEN_UNIX :: 92
|
||||
_SC_XOPEN_CRYPT :: 93
|
||||
_SC_XOPEN_ENH_I18N :: 94
|
||||
_SC_XOPEN_SHM :: 95
|
||||
_SC_2_CHAR_TERM :: 96
|
||||
_SC_ARG_MAX :: 0
|
||||
_SC_CHILD_MAX :: 1
|
||||
_SC_CLK_TCK :: 2
|
||||
_SC_NGROUPS_MAX :: 3
|
||||
_SC_OPEN_MAX :: 4
|
||||
_SC_STREAM_MAX :: 5
|
||||
_SC_TZNAME_MAX :: 6
|
||||
_SC_JOB_CONTROL :: 7
|
||||
_SC_SAVED_IDS :: 8
|
||||
_SC_REALTIME_SIGNALS :: 9
|
||||
_SC_PRIORITY_SCHEDULING :: 10
|
||||
_SC_TIMERS :: 11
|
||||
_SC_ASYNCHRONOUS_IO :: 12
|
||||
_SC_PRIORITIZED_IO :: 13
|
||||
_SC_SYNCHRONIZED_IO :: 14
|
||||
_SC_FSYNC :: 15
|
||||
_SC_MAPPED_FILES :: 16
|
||||
_SC_MEMLOCK :: 17
|
||||
_SC_MEMLOCK_RANGE :: 18
|
||||
_SC_MEMORY_PROTECTION :: 19
|
||||
_SC_MESSAGE_PASSING :: 20
|
||||
_SC_SEMAPHORES :: 21
|
||||
_SC_SHARED_MEMORY_OBJECTS :: 22
|
||||
_SC_AIO_LISTIO_MAX :: 23
|
||||
_SC_AIO_MAX :: 24
|
||||
_SC_AIO_PRIO_DELTA_MAX :: 25
|
||||
_SC_DELAYTIMER_MAX :: 26
|
||||
_SC_MQ_OPEN_MAX :: 27
|
||||
_SC_MQ_PRIO_MAX :: 28
|
||||
_SC_VERSION :: 29
|
||||
_SC_PAGE_SIZE :: 30
|
||||
_SC_PAGESIZE :: _SC_PAGE_SIZE
|
||||
_SC_RTSIG_MAX :: 31
|
||||
_SC_SEM_NSEMS_MAX :: 32
|
||||
_SC_SEM_VALUE_MAX :: 33
|
||||
_SC_SIGQUEUE_MAX :: 34
|
||||
_SC_TIMER_MAX :: 35
|
||||
_SC_BC_BASE_MAX :: 36
|
||||
_SC_BC_DIM_MAX :: 37
|
||||
_SC_BC_SCALE_MAX :: 38
|
||||
_SC_BC_STRING_MAX :: 39
|
||||
_SC_COLL_WEIGHTS_MAX :: 40
|
||||
_SC_EXPR_NEST_MAX :: 42
|
||||
_SC_LINE_MAX :: 43
|
||||
_SC_RE_DUP_MAX :: 44
|
||||
_SC_2_VERSION :: 46
|
||||
_SC_2_C_BIND :: 47
|
||||
_SC_2_C_DEV :: 48
|
||||
_SC_2_FORT_DEV :: 49
|
||||
_SC_2_FORT_RUN :: 50
|
||||
_SC_2_SW_DEV :: 51
|
||||
_SC_2_LOCALEDEF :: 52
|
||||
_SC_UIO_MAXIOV :: 60
|
||||
_SC_IOV_MAX :: _SC_UIO_MAXIOV
|
||||
_SC_THREADS :: 67
|
||||
_SC_THREAD_SAFE_FUNCTIONS :: 68
|
||||
_SC_GETGR_R_SIZE_MAX :: 69
|
||||
_SC_GETPW_R_SIZE_MAX :: 70
|
||||
_SC_LOGIN_NAME_MAX :: 71
|
||||
_SC_TTY_NAME_MAX :: 72
|
||||
_SC_THREAD_DESTRUCTOR_ITERATIONS :: 73
|
||||
_SC_THREAD_KEYS_MAX :: 74
|
||||
_SC_THREAD_STACK_MIN :: 75
|
||||
_SC_THREAD_THREADS_MAX :: 76
|
||||
_SC_THREAD_ATTR_STACKADDR :: 77
|
||||
_SC_THREAD_ATTR_STACKSIZE :: 78
|
||||
_SC_THREAD_PRIORITY_SCHEDULING :: 79
|
||||
_SC_THREAD_PRIO_INHERIT :: 80
|
||||
_SC_THREAD_PRIO_PROTECT :: 81
|
||||
_SC_THREAD_PROCESS_SHARED :: 82
|
||||
_SC_NPROCESSORS_CONF :: 83
|
||||
_SC_NPROCESSORS_ONLN :: 84
|
||||
_SC_PHYS_PAGES :: 85
|
||||
_SC_AVPHYS_PAGES :: 86
|
||||
_SC_ATEXIT_MAX :: 87
|
||||
_SC_PASS_MAX :: 88
|
||||
_SC_XOPEN_VERSION :: 89
|
||||
_SC_XOPEN_XCU_VERSION :: 90
|
||||
_SC_XOPEN_UNIX :: 91
|
||||
_SC_XOPEN_CRYPT :: 92
|
||||
_SC_XOPEN_ENH_I18N :: 93
|
||||
_SC_XOPEN_SHM :: 94
|
||||
_SC_2_CHAR_TERM :: 95
|
||||
_SC_2_UPE :: 97
|
||||
_SC_XOPEN_XPG2 :: 98
|
||||
_SC_XOPEN_XPG3 :: 99
|
||||
_SC_XOPEN_XPG4 :: 100
|
||||
_SC_NZERO :: 109
|
||||
_SC_XBS5_ILP32_OFF32 :: 125
|
||||
_SC_XBS5_ILP32_OFFBIG :: 126
|
||||
_SC_XBS5_LP64_OFF64 :: 127
|
||||
_SC_XBS5_LPBIG_OFFBIG :: 128
|
||||
_SC_XOPEN_LEGACY :: 129
|
||||
_SC_XOPEN_REALTIME :: 130
|
||||
_SC_XOPEN_REALTIME_THREADS :: 131
|
||||
_SC_ADVISORY_INFO :: 132
|
||||
_SC_BARRIERS :: 133
|
||||
_SC_CLOCK_SELECTION :: 137
|
||||
_SC_CPUTIME :: 138
|
||||
_SC_THREAD_CPUTIME :: 139
|
||||
_SC_MONOTONIC_CLOCK :: 149
|
||||
_SC_READER_WRITER_LOCKS :: 153
|
||||
_SC_SPIN_LOCKS :: 154
|
||||
_SC_REGEXP :: 155
|
||||
_SC_SHELL :: 157
|
||||
_SC_SPAWN :: 159
|
||||
_SC_SPORADIC_SERVER :: 160
|
||||
_SC_THREAD_SPORADIC_SERVER :: 161
|
||||
_SC_TIMEOUTS :: 164
|
||||
_SC_TYPED_MEMORY_OBJECTS :: 165
|
||||
_SC_2_PBS :: 168
|
||||
_SC_2_PBS_ACCOUNTING :: 169
|
||||
_SC_2_PBS_LOCATE :: 170
|
||||
_SC_2_PBS_MESSAGE :: 171
|
||||
_SC_2_PBS_TRACK :: 172
|
||||
_SC_SYMLOOP_MAX :: 173
|
||||
_SC_STREAMS :: 174
|
||||
_SC_2_PBS_CHECKPOINT :: 175
|
||||
_SC_V6_ILP32_OFF32 :: 176
|
||||
_SC_V6_ILP32_OFFBIG :: 177
|
||||
_SC_V6_LP64_OFF64 :: 178
|
||||
_SC_V6_LPBIG_OFFBIG :: 179
|
||||
_SC_HOST_NAME_MAX :: 180
|
||||
_SC_TRACE :: 181
|
||||
_SC_TRACE_EVENT_FILTER :: 182
|
||||
_SC_TRACE_INHERIT :: 183
|
||||
_SC_TRACE_LOG :: 184
|
||||
|
||||
_SC_XOPEN_LEGACY :: 129
|
||||
_SC_XOPEN_REALTIME :: 130
|
||||
_SC_XOPEN_REALTIME_THREADS :: 131
|
||||
_SC_ADVISORY_INFO :: 132
|
||||
_SC_BARRIERS :: 133
|
||||
_SC_CLOCK_SELECTION :: 137
|
||||
_SC_CPUTIME :: 138
|
||||
_SC_THREAD_CPUTIME :: 139
|
||||
_SC_MONOTONIC_CLOCK :: 149
|
||||
_SC_READER_WRITER_LOCKS :: 153
|
||||
_SC_SPIN_LOCKS :: 154
|
||||
_SC_REGEXP :: 155
|
||||
_SC_SHELL :: 157
|
||||
_SC_SPAWN :: 159
|
||||
_SC_SPORADIC_SERVER :: 160
|
||||
_SC_THREAD_SPORADIC_SERVER :: 161
|
||||
_SC_TIMEOUTS :: 164
|
||||
_SC_TYPED_MEMORY_OBJECTS :: 165
|
||||
_SC_2_PBS :: 168
|
||||
_SC_2_PBS_ACCOUNTING :: 169
|
||||
_SC_2_PBS_LOCATE :: 170
|
||||
_SC_2_PBS_MESSAGE :: 171
|
||||
_SC_2_PBS_TRACK :: 172
|
||||
_SC_SYMLOOP_MAX :: 173
|
||||
_SC_2_PBS_CHECKPOINT :: 174
|
||||
_SC_V6_ILP32_OFF32 :: 175
|
||||
_SC_V6_ILP32_OFFBIG :: 176
|
||||
_SC_V6_LP64_OFF64 :: 177
|
||||
_SC_V6_LPBIG_OFFBIG :: 178
|
||||
_SC_HOST_NAME_MAX :: 179
|
||||
_SC_TRACE :: 180
|
||||
_SC_TRACE_EVENT_FILTER :: 181
|
||||
_SC_TRACE_INHERIT :: 182
|
||||
_SC_TRACE_LOG :: 183
|
||||
|
||||
_SC_IPV6 :: 234
|
||||
_SC_RAW_SOCKETS :: 235
|
||||
_SC_V7_ILP32_OFF32 :: 236
|
||||
_SC_V7_ILP32_OFFBIG :: 237
|
||||
_SC_V7_LP64_OFF64 :: 238
|
||||
_SC_V7_LPBIG_OFFBIG :: 239
|
||||
_SC_SS_REPL_MAX :: 240
|
||||
_SC_TRACE_EVENT_NAME_MAX :: 241
|
||||
_SC_TRACE_NAME_MAX :: 242
|
||||
_SC_TRACE_SYS_MAX :: 243
|
||||
_SC_TRACE_USER_EVENT_MAX :: 244
|
||||
_SC_XOPEN_STREAMS :: 245
|
||||
_SC_THREAD_ROBUST_PRIO_INHERIT :: 246
|
||||
_SC_THREAD_ROBUST_PRIO_PROTECT :: 247
|
||||
_SC_IPV6 :: 235
|
||||
_SC_RAW_SOCKETS :: 236
|
||||
_SC_V7_ILP32_OFF32 :: 237
|
||||
_SC_V7_ILP32_OFFBIG :: 238
|
||||
_SC_V7_LP64_OFF64 :: 239
|
||||
_SC_V7_LPBIG_OFFBIG :: 240
|
||||
_SC_SS_REPL_MAX :: 241
|
||||
_SC_TRACE_EVENT_NAME_MAX :: 242
|
||||
_SC_TRACE_NAME_MAX :: 243
|
||||
_SC_TRACE_SYS_MAX :: 244
|
||||
_SC_TRACE_USER_EVENT_MAX :: 245
|
||||
_SC_XOPEN_STREAMS :: 246
|
||||
_SC_THREAD_ROBUST_PRIO_INHERIT :: 247
|
||||
_SC_THREAD_ROBUST_PRIO_PROTECT :: 248
|
||||
_SC_MINSIGSTKSZ :: 249
|
||||
_SC_SIGSTKSZ :: 250
|
||||
|
||||
// NOTE: Not implemented.
|
||||
_SC_XOPEN_UUCP :: 0
|
||||
@@ -2046,7 +2086,7 @@ when ODIN_OS == .Darwin {
|
||||
_PC_REC_XFER_ALIGN :: 34
|
||||
_PC_ALLOC_SIZE_MIN :: 35
|
||||
_PC_SYMLINK_MAX :: 36
|
||||
_PC_2_SYMLINK :: 37
|
||||
_PC_2_SYMLINKS :: 37
|
||||
|
||||
_SC_ARG_MAX :: 15
|
||||
_SC_CHILD_MAX :: 16
|
||||
|
||||
@@ -5,6 +5,30 @@ foreign import "system:Comctl32.lib"
|
||||
|
||||
@(default_calling_convention="system")
|
||||
foreign Comctl32 {
|
||||
InitCommonControlsEx :: proc(picce: ^INITCOMMONCONTROLSEX) -> BOOL ---
|
||||
LoadIconWithScaleDown :: proc(hinst: HINSTANCE, pszName: PCWSTR, cx: c_int, cy: c_int, phico: ^HICON) -> HRESULT ---
|
||||
SetWindowSubclass :: proc(hwnd: HWND, pfnSubclass: SUBCLASSPROC, uIdSubclass: UINT_PTR, dwRefData: DWORD_PTR) ---
|
||||
}
|
||||
|
||||
ICC_LISTVIEW_CLASSES :: 0x00000001
|
||||
ICC_TREEVIEW_CLASSES :: 0x00000002
|
||||
ICC_BAR_CLASSES :: 0x00000004
|
||||
ICC_TAB_CLASSES :: 0x00000008
|
||||
ICC_UPDOWN_CLASS :: 0x00000010
|
||||
ICC_PROGRESS_CLASS :: 0x00000020
|
||||
ICC_HOTKEY_CLASS :: 0x00000040
|
||||
ICC_ANIMATE_CLASS :: 0x00000080
|
||||
ICC_WIN95_CLASSES :: 0x000000FF
|
||||
ICC_DATE_CLASSES :: 0x00000100
|
||||
ICC_USEREX_CLASSES :: 0x00000200
|
||||
ICC_COOL_CLASSES :: 0x00000400
|
||||
ICC_INTERNET_CLASSES :: 0x00000800
|
||||
ICC_PAGESCROLLER_CLASS :: 0x00001000
|
||||
ICC_NATIVEFNTCTL_CLASS :: 0x00002000
|
||||
ICC_STANDARD_CLASSES :: 0x00004000
|
||||
ICC_LINK_CLASS :: 0x00008000
|
||||
|
||||
INITCOMMONCONTROLSEX :: struct {
|
||||
dwSize: DWORD,
|
||||
dwICC: DWORD,
|
||||
}
|
||||
|
||||
@@ -63,6 +63,8 @@ foreign user32 {
|
||||
UpdateWindow :: proc(hWnd: HWND) -> BOOL ---
|
||||
SetActiveWindow :: proc(hWnd: HWND) -> HWND ---
|
||||
GetActiveWindow :: proc() -> HWND ---
|
||||
SetFocus :: proc(hWnd: HWND) -> HWND ---
|
||||
GetFocus :: proc() -> HWND ---
|
||||
RedrawWindow :: proc(hwnd: HWND, lprcUpdate: LPRECT, hrgnUpdate: HRGN, flags: RedrawWindowFlags) -> BOOL ---
|
||||
SetParent :: proc(hWndChild: HWND, hWndNewParent: HWND) -> HWND ---
|
||||
SetPropW :: proc(hWnd: HWND, lpString: LPCWSTR, hData: HANDLE) -> BOOL ---
|
||||
@@ -211,6 +213,7 @@ foreign user32 {
|
||||
EnumDisplayMonitors :: proc(hdc: HDC, lprcClip: LPRECT, lpfnEnum: Monitor_Enum_Proc, dwData: LPARAM) -> BOOL ---
|
||||
|
||||
EnumWindows :: proc(lpEnumFunc: Window_Enum_Proc, lParam: LPARAM) -> BOOL ---
|
||||
EnumChildWindows :: proc(hWndParent: HWND, lpEnumFunc: Window_Enum_Proc, lParam: LPARAM) -> BOOL ---
|
||||
|
||||
IsProcessDPIAware :: proc() -> BOOL ---
|
||||
SetProcessDPIAware :: proc() -> BOOL ---
|
||||
@@ -846,3 +849,23 @@ FKF_CONFIRMHOTKEY :: 0x8
|
||||
FKF_HOTKEYSOUND :: 0x10
|
||||
FKF_INDICATOR :: 0x20
|
||||
FKF_CLICKON :: 0x40
|
||||
|
||||
NONCLIENTMETRICSW :: struct {
|
||||
cbSize: UINT,
|
||||
iBorderWidth: i32,
|
||||
iScrollWidth: i32,
|
||||
iScrollHeight: i32,
|
||||
iCaptionWidth: i32,
|
||||
iCaptionHeight: i32,
|
||||
lfCaptionFont: LOGFONTW,
|
||||
iSmCaptionWidth: i32,
|
||||
iSmCaptionHeight: i32,
|
||||
lfSmCaptionFont: LOGFONTW,
|
||||
iMenuWidth: i32,
|
||||
iMenuHeight: i32,
|
||||
lfMenuFont: LOGFONTW,
|
||||
lfStatusFont: LOGFONTW,
|
||||
lfMessageFont: LOGFONTW,
|
||||
iPaddedBorderWidth: i32,
|
||||
}
|
||||
LPNONCLIENTMETRICSW :: ^NONCLIENTMETRICSW
|
||||
|
||||
@@ -9,4 +9,5 @@ PMARGINS :: ^MARGINS
|
||||
@(default_calling_convention="system")
|
||||
foreign uxtheme {
|
||||
IsThemeActive :: proc() -> BOOL ---
|
||||
SetWindowTheme :: proc(hWnd: HWND, pszSubAppName, pszSubIdList: LPCWSTR) -> HRESULT ---
|
||||
}
|
||||
|
||||
+3
-1
@@ -10375,7 +10375,7 @@ gb_internal ExprKind check_type_assertion(CheckerContext *c, Operand *o, Ast *no
|
||||
add_type_info_type(c, o->type);
|
||||
o->type = type_hint;
|
||||
o->mode = Addressing_OptionalOk;
|
||||
return kind;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10440,6 +10440,8 @@ gb_internal ExprKind check_type_assertion(CheckerContext *c, Operand *o, Ast *no
|
||||
}
|
||||
}
|
||||
|
||||
end:;
|
||||
|
||||
if ((c->state_flags & StateFlag_no_type_assert) == 0) {
|
||||
add_package_dependency(c, "runtime", "type_assertion_check");
|
||||
add_package_dependency(c, "runtime", "type_assertion_check2");
|
||||
|
||||
@@ -6319,6 +6319,10 @@ gb_internal void check_deferred_procedures(Checker *c) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (dst_params == nullptr) {
|
||||
error(src->token, "Deferred procedure must have parameters for %s", attribute);
|
||||
continue;
|
||||
}
|
||||
GB_ASSERT(dst_params->kind == Type_Tuple);
|
||||
|
||||
Type *tsrc = alloc_type_tuple();
|
||||
|
||||
+12
-1
@@ -5837,9 +5837,20 @@ gb_inline isize gb_printf_err_va(char const *fmt, va_list va) {
|
||||
}
|
||||
|
||||
gb_inline isize gb_fprintf_va(struct gbFile *f, char const *fmt, va_list va) {
|
||||
gb_local_persist char buf[4096];
|
||||
char buf[4096];
|
||||
isize len = gb_snprintf_va(buf, gb_size_of(buf), fmt, va);
|
||||
char *new_buf = NULL;
|
||||
isize n = gb_size_of(buf);
|
||||
while (len < 0) {
|
||||
n <<= 1;
|
||||
gb_free(gb_heap_allocator(), new_buf);
|
||||
new_buf = gb_alloc_array(gb_heap_allocator(), char, n);;
|
||||
len = gb_snprintf_va(new_buf, n, fmt, va);
|
||||
}
|
||||
gb_file_write(f, buf, len-1); // NOTE(bill): prevent extra whitespace
|
||||
if (new_buf != NULL) {
|
||||
gb_free(gb_heap_allocator(), new_buf);
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
+31
-30
@@ -293,36 +293,37 @@ attr_opaquedata_t :: struct {
|
||||
* attributes.
|
||||
*/
|
||||
attribute_type_t :: enum c.int {
|
||||
UNKNOWN = 0, // Type indicating an error or uninitialized attribute.
|
||||
BOX2I, // Integer region definition. @see attr_box2i_t.
|
||||
BOX2F, // Float region definition. @see attr_box2f_t.
|
||||
CHLIST, // Definition of channels in file @see chlist_entry.
|
||||
CHROMATICITIES, // Values to specify color space of colors in file @see attr_chromaticities_t.
|
||||
COMPRESSION, // ``u8`` declaring compression present.
|
||||
DOUBLE, // Double precision floating point number.
|
||||
ENVMAP, // ``u8`` declaring environment map type.
|
||||
FLOAT, // Normal (4 byte) precision floating point number.
|
||||
FLOAT_VECTOR, // List of normal (4 byte) precision floating point numbers.
|
||||
INT, // 32-bit signed integer value.
|
||||
KEYCODE, // Struct recording keycode @see attr_keycode_t.
|
||||
LINEORDER, // ``u8`` declaring scanline ordering.
|
||||
M33F, // 9 32-bit floats representing a 3x3 matrix.
|
||||
M33D, // 9 64-bit floats representing a 3x3 matrix.
|
||||
M44F, // 16 32-bit floats representing a 4x4 matrix.
|
||||
M44D, // 16 64-bit floats representing a 4x4 matrix.
|
||||
PREVIEW, // 2 ``unsigned ints`` followed by 4 x w x h ``u8`` image.
|
||||
RATIONAL, // \c int followed by ``unsigned int``
|
||||
STRING, // ``int`` (length) followed by char string data.
|
||||
STRING_VECTOR, // 0 or more text strings (int + string). number is based on attribute size.
|
||||
TILEDESC, // 2 ``unsigned ints`` ``xSize``, ``ySize`` followed by mode.
|
||||
TIMECODE, // 2 ``unsigned ints`` time and flags, user data.
|
||||
V2I, // Pair of 32-bit integers.
|
||||
V2F, // Pair of 32-bit floats.
|
||||
V2D, // Pair of 64-bit floats.
|
||||
V3I, // Set of 3 32-bit integers.
|
||||
V3F, // Set of 3 32-bit floats.
|
||||
V3D, // Set of 3 64-bit floats.
|
||||
OPAQUE, // User/unknown provided type.
|
||||
UNKNOWN = 0, // Type indicating an error or uninitialized attribute.
|
||||
BOX2I, // Integer region definition. @see attr_box2i_t.
|
||||
BOX2F, // Float region definition. @see attr_box2f_t.
|
||||
CHLIST, // Definition of channels in file @see chlist_entry.
|
||||
CHROMATICITIES, // Values to specify color space of colors in file @see attr_chromaticities_t.
|
||||
COMPRESSION, // ``u8`` declaring compression present.
|
||||
DOUBLE, // Double precision floating point number.
|
||||
ENVMAP, // ``u8`` declaring environment map type.
|
||||
FLOAT, // Normal (4 byte) precision floating point number.
|
||||
FLOAT_VECTOR, // List of normal (4 byte) precision floating point numbers.
|
||||
INT, // 32-bit signed integer value.
|
||||
KEYCODE, // Struct recording keycode @see attr_keycode_t.
|
||||
LINEORDER, // ``u8`` declaring scanline ordering.
|
||||
M33F, // 9 32-bit floats representing a 3x3 matrix.
|
||||
M33D, // 9 64-bit floats representing a 3x3 matrix.
|
||||
M44F, // 16 32-bit floats representing a 4x4 matrix.
|
||||
M44D, // 16 64-bit floats representing a 4x4 matrix.
|
||||
PREVIEW, // 2 ``unsigned ints`` followed by 4 x w x h ``u8`` image.
|
||||
RATIONAL, // \c int followed by ``unsigned int``
|
||||
STRING, // ``int`` (length) followed by char string data.
|
||||
STRING_VECTOR, // 0 or more text strings (int + string). number is based on attribute size.
|
||||
TILEDESC, // 2 ``unsigned ints`` ``xSize``, ``ySize`` followed by mode.
|
||||
TIMECODE, // 2 ``unsigned ints`` time and flags, user data.
|
||||
V2I, // Pair of 32-bit integers.
|
||||
V2F, // Pair of 32-bit floats.
|
||||
V2D, // Pair of 64-bit floats.
|
||||
V3I, // Set of 3 32-bit integers.
|
||||
V3F, // Set of 3 32-bit floats.
|
||||
V3D, // Set of 3 64-bit floats.
|
||||
DEEP_IMAGE_STATE, // ``uint8_t`` declaring deep image state.
|
||||
OPAQUE, // User/unknown provided type.
|
||||
}
|
||||
|
||||
/** @brief Storage, name and type information for an attribute.
|
||||
|
||||
Vendored
+4
-2
@@ -6,12 +6,14 @@ when ODIN_OS == .Windows {
|
||||
when OPENEXRCORE_SHARED {
|
||||
#panic("Dynamic linking is not supported for OpenEXRCore yet")
|
||||
} else {
|
||||
foreign import lib "OpenEXRCore-3_1.lib"
|
||||
foreign import lib_ "OpenEXRCore-3_3.lib"
|
||||
}
|
||||
} else {
|
||||
foreign import lib "system:OpenEXRCore-3_1"
|
||||
foreign import lib_ "system:OpenEXRCore-3_3"
|
||||
}
|
||||
|
||||
lib :: lib_
|
||||
|
||||
import "core:c"
|
||||
|
||||
/** @brief Function pointer used to hold a malloc-like routine.
|
||||
|
||||
Vendored
+14
-6
@@ -1,11 +1,5 @@
|
||||
package vendor_openexr
|
||||
|
||||
when ODIN_OS == .Windows {
|
||||
foreign import lib "OpenEXRCore-3_1.lib"
|
||||
} else {
|
||||
foreign import lib "system:OpenEXRCore-3_1"
|
||||
}
|
||||
|
||||
import "core:c"
|
||||
|
||||
/**
|
||||
@@ -41,6 +35,20 @@ chunk_info_t :: struct {
|
||||
|
||||
@(link_prefix="exr_", default_calling_convention="c")
|
||||
foreign lib {
|
||||
/** @brief Retrieve the chunk table offset for the part in question.
|
||||
*/
|
||||
get_chunk_table_offset :: proc(ctxt: const_context_t , part_index: c.int, chunk_offset_out: ^c.uint64_t) -> result_t ---
|
||||
|
||||
/** initialize chunk info with the default values from the specified part
|
||||
*
|
||||
* The 'x' and 'y' parameters are used to indicate the starting position
|
||||
* of the chunk being initialized. This does not perform any I/O to validate
|
||||
* and so the values are only indicative. (but can be used to do things
|
||||
* like compress / decompress a chunk without having a file to actually
|
||||
* read
|
||||
*/
|
||||
chunk_default_initialize :: proc(ctxt: context_t, part_index: c.int, box: ^attr_box2i_t, levelx: c.int, levely: c.int, cinfo: ^chunk_info_t) -> result_t ---
|
||||
|
||||
read_scanline_chunk_info :: proc(ctxt: const_context_t, part_index: c.int, y: c.int, cinfo: ^chunk_info_t) -> result_t ---
|
||||
|
||||
read_tile_chunk_info :: proc(
|
||||
|
||||
Vendored
+1
-1
@@ -116,4 +116,4 @@ coding_channel_info_t :: struct {
|
||||
decode_to_ptr: ^u8,
|
||||
encode_from_ptr: ^u8,
|
||||
},
|
||||
}
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
package vendor_openexr
|
||||
|
||||
import "core:c"
|
||||
|
||||
@(link_prefix="exr_", default_calling_convention="c")
|
||||
foreign lib {
|
||||
/** Computes a buffer that will be large enough to hold the compressed
|
||||
* data. This may include some extra padding for headers / scratch */
|
||||
compress_max_buffer_size :: proc(in_bytes: c.size_t) -> c.size_t ---
|
||||
|
||||
/** Compresses a buffer using a zlib style compression.
|
||||
*
|
||||
* If the level is -1, will use the default compression set to the library
|
||||
* \ref set_default_zip_compression_level
|
||||
* data. This may include some extra padding for headers / scratch */
|
||||
compress_buffer :: proc(
|
||||
ctxt: const_context_t,
|
||||
level: c.int,
|
||||
in_: rawptr,
|
||||
in_bytes: c.size_t,
|
||||
out: rawptr,
|
||||
out_bytes_avail: c.size_t,
|
||||
actual_out: ^c.size_t) -> result_t ---
|
||||
|
||||
/** Decompresses a buffer using a zlib style compression. */
|
||||
uncompress_buffer :: proc(
|
||||
ctxt: const_context_t,
|
||||
in_: rawptr,
|
||||
in_bytes: c.size_t,
|
||||
out: rawptr,
|
||||
out_bytes_avail: c.size_t,
|
||||
actual_out: ^c.size_t) -> result_t ---
|
||||
|
||||
/** Apply simple run length encoding and put in the output buffer. */
|
||||
rle_compress_buffer :: proc(
|
||||
in_bytes: c.size_t,
|
||||
in_: rawptr,
|
||||
out: rawptr,
|
||||
out_bytes_avail: c.size_t) -> c.size_t ---
|
||||
|
||||
/** Decode run length encoding and put in the output buffer. */
|
||||
rle_uncompress_buffer :: proc(
|
||||
in_bytes: c.size_t,
|
||||
max_len: c.size_t,
|
||||
in_: rawptr,
|
||||
out: rawptr) -> c.size_t ---
|
||||
|
||||
/** Routine to query the lines required per chunk to compress with the
|
||||
* specified method.
|
||||
*
|
||||
* This is only meaningful for scanline encodings, tiled
|
||||
* representations have a different interpretation of this.
|
||||
*
|
||||
* These are constant values, this function returns -1 if the compression
|
||||
* type is unknown.
|
||||
*/
|
||||
compression_lines_per_chunk :: proc(comptype: compression_t) -> c.int ---
|
||||
|
||||
/** Exposes a method to apply compression to a chunk of data.
|
||||
*
|
||||
* This can be useful for inheriting default behavior of the
|
||||
* compression stage of an encoding pipeline, or other helper classes
|
||||
* to expose compression.
|
||||
*
|
||||
* NB: As implied, this function will be used during a normal encode
|
||||
* and write operation but can be used directly with a temporary
|
||||
* context (i.e. not running the full encode pipeline).
|
||||
*/
|
||||
compress_chunk :: proc(encode_state: ^encode_pipeline_t) -> result_t ---
|
||||
|
||||
/** Exposes a method to decompress a chunk of data.
|
||||
*
|
||||
* This can be useful for inheriting default behavior of the
|
||||
* uncompression stage of an decoding pipeline, or other helper classes
|
||||
* to expose compress / uncompress operations.
|
||||
*
|
||||
* NB: This function will be used during a normal read and decode
|
||||
* operation but can be used directly with a temporary context (i.e.
|
||||
* not running the full decode pipeline).
|
||||
*/
|
||||
uncompress_chunk :: proc(decode_state: ^decode_pipeline_t) -> result_t ---
|
||||
}
|
||||
Vendored
+27
-8
@@ -1,11 +1,5 @@
|
||||
package vendor_openexr
|
||||
|
||||
when ODIN_OS == .Windows {
|
||||
foreign import lib "OpenEXRCore-3_1.lib"
|
||||
} else {
|
||||
foreign import lib "system:OpenEXRCore-3_1"
|
||||
}
|
||||
|
||||
import "core:c"
|
||||
|
||||
#assert(size_of(c.int) == size_of(b32))
|
||||
@@ -282,6 +276,8 @@ context_initializer_t :: struct {
|
||||
/** Initialize with a bitwise or of the various context flags
|
||||
*/
|
||||
flags: c.int,
|
||||
|
||||
pad: [4]u8,
|
||||
}
|
||||
|
||||
/** @brief context flag which will enforce strict header validation
|
||||
@@ -418,19 +414,42 @@ foreign lib {
|
||||
filename: cstring,
|
||||
ctxtdata: ^context_initializer_t) -> result_t ---
|
||||
|
||||
/** @brief Create a new context for temporary use in memory.
|
||||
*
|
||||
* This is a custom mode that does not supporting writing actual image
|
||||
* data, but one can create one of these, manipulate attributes,
|
||||
* define additional parts, run validation, etc. without any
|
||||
* requirement of actual file i/o.
|
||||
*
|
||||
* Note that this creates an defines an initial part for use, so one
|
||||
* can immediately start definining attributes into part index 0.
|
||||
*
|
||||
* See the initializer context documentation \ref
|
||||
* exr_context_initializer_t to be able to provide allocation
|
||||
* overrides or other controls. The @p ctxtdata parameter is optional,
|
||||
* if `NULL`, default values will be used.
|
||||
*/
|
||||
start_temporary_context :: proc(
|
||||
ctxt: ^context_t,
|
||||
context_name: [^]c.char,
|
||||
ctxtdata: ^context_initializer_t) -> result_t ---
|
||||
|
||||
/** @brief Retrieve the file name the context is for as provided
|
||||
* during the start routine.
|
||||
*
|
||||
* Do not free the resulting string.
|
||||
*/
|
||||
|
||||
get_file_name :: proc(ctxt: const_context_t, name: ^cstring) -> result_t ---
|
||||
|
||||
/** @brief Retrieve the file version and flags the context is for as
|
||||
* parsed during the start routine.
|
||||
*/
|
||||
get_file_version_and_flags :: proc(ctxt: const_context_t, ver: ^u32) -> result_t ---
|
||||
|
||||
/** @brief Query the user data the context was constructed with. This
|
||||
* is perhaps useful in the error handler callback to jump back into
|
||||
* an object the user controls.
|
||||
*/
|
||||
|
||||
get_user_data :: proc(ctxt: const_context_t, userdata: ^rawptr) -> result_t ---
|
||||
|
||||
/** Any opaque attribute data entry of the specified type is tagged
|
||||
|
||||
Vendored
-6
@@ -1,11 +1,5 @@
|
||||
package vendor_openexr
|
||||
|
||||
when ODIN_OS == .Windows {
|
||||
foreign import lib "OpenEXRCore-3_1.lib"
|
||||
} else {
|
||||
foreign import lib "system:OpenEXRCore-3_1"
|
||||
}
|
||||
|
||||
@(link_prefix="exr_", default_calling_convention="c")
|
||||
foreign lib {
|
||||
print_context_info :: proc(c: const_context_t, verbose: b32) -> result_t ---
|
||||
|
||||
Vendored
+21
-7
@@ -1,11 +1,5 @@
|
||||
package vendor_openexr
|
||||
|
||||
when ODIN_OS == .Windows {
|
||||
foreign import lib "OpenEXRCore-3_1.lib"
|
||||
} else {
|
||||
foreign import lib "system:OpenEXRCore-3_1"
|
||||
}
|
||||
|
||||
import "core:c"
|
||||
|
||||
/** Can be bit-wise or'ed into the decode_flags in the decode pipeline.
|
||||
@@ -55,6 +49,12 @@ DECODE_SAMPLE_DATA_ONLY :: u16(1 << 2)
|
||||
* the same context concurrently.
|
||||
*/
|
||||
decode_pipeline_t :: struct {
|
||||
/** Used for versioning the decode pipeline in the future.
|
||||
*
|
||||
* \ref EXR_DECODE_PIPELINE_INITIALIZER
|
||||
*/
|
||||
pipe_size: c.size_t,
|
||||
|
||||
/** The output channel information for this chunk.
|
||||
*
|
||||
* User is expected to fill the channel pointers for the desired
|
||||
@@ -79,6 +79,20 @@ decode_pipeline_t :: struct {
|
||||
ctx: const_context_t,
|
||||
chunk: chunk_info_t,
|
||||
|
||||
/** How many lines of the chunk to skip filling, assumes the
|
||||
* pointer is at the beginning of data (i.e. includes this
|
||||
* skip so does not need to be adjusted
|
||||
*/
|
||||
user_line_begin_skip: i32,
|
||||
|
||||
/** How many lines of the chunk to ignore at the end, assumes the
|
||||
* output is meant to be N lines smaller
|
||||
*/
|
||||
user_line_end_ignore: i32,
|
||||
|
||||
/** How many bytes were actually decoded when items compressed */
|
||||
bytes_decompressed: u64,
|
||||
|
||||
/** Can be used by the user to pass custom context data through
|
||||
* the decode pipeline.
|
||||
*/
|
||||
@@ -236,7 +250,7 @@ decode_pipeline_t :: struct {
|
||||
_quick_chan_store: [5]coding_channel_info_t,
|
||||
}
|
||||
|
||||
DECODE_PIPELINE_INITIALIZER :: decode_pipeline_t{}
|
||||
DECODE_PIPELINE_INITIALIZER :: decode_pipeline_t{ pipe_size = size_of(decode_pipeline_t) }
|
||||
|
||||
|
||||
@(link_prefix="exr_", default_calling_convention="c")
|
||||
|
||||
Vendored
+8
-8
@@ -1,11 +1,5 @@
|
||||
package vendor_openexr
|
||||
|
||||
when ODIN_OS == .Windows {
|
||||
foreign import lib "OpenEXRCore-3_1.lib"
|
||||
} else {
|
||||
foreign import lib "system:OpenEXRCore-3_1"
|
||||
}
|
||||
|
||||
import "core:c"
|
||||
|
||||
/** Can be bit-wise or'ed into the decode_flags in the decode pipeline.
|
||||
@@ -46,7 +40,13 @@ ENCODE_NON_IMAGE_DATA_AS_POINTERS :: u16(1 << 1)
|
||||
* meant to be used by separate threads, which can all be accessing
|
||||
* the same context concurrently.
|
||||
*/
|
||||
encode_pipeline_t :: struct {
|
||||
encode_pipeline_t :: struct {
|
||||
/** Used for versioning the decode pipeline in the future
|
||||
*
|
||||
* \ref EXR_ENCODE_PIPELINE_INITIALIZER
|
||||
*/
|
||||
pipe_size: c.size_t,
|
||||
|
||||
/** The output channel information for this chunk.
|
||||
*
|
||||
* User is expected to fill the channel pointers for the input
|
||||
@@ -264,7 +264,7 @@ ENCODE_NON_IMAGE_DATA_AS_POINTERS :: u16(1 << 1)
|
||||
_quick_chan_store: [5]coding_channel_info_t,
|
||||
}
|
||||
|
||||
ENCODE_PIPELINE_INITIALIZER :: encode_pipeline_t{}
|
||||
ENCODE_PIPELINE_INITIALIZER :: encode_pipeline_t{ pipe_size = size_of(encode_pipeline_t) }
|
||||
|
||||
|
||||
@(link_prefix="exr_", default_calling_convention="c")
|
||||
|
||||
Vendored
+2
-7
@@ -1,11 +1,5 @@
|
||||
package vendor_openexr
|
||||
|
||||
when ODIN_OS == .Windows {
|
||||
foreign import lib "OpenEXRCore-3_1.lib"
|
||||
} else {
|
||||
foreign import lib "system:OpenEXRCore-3_1"
|
||||
}
|
||||
|
||||
import "core:c"
|
||||
|
||||
#assert(size_of(c.int) == size_of(i32))
|
||||
@@ -37,6 +31,7 @@ result_t :: enum i32 {
|
||||
ALREADY_WROTE_ATTRS,
|
||||
BAD_CHUNK_LEADER,
|
||||
CORRUPT_CHUNK,
|
||||
INCOMPLETE_CHUNK_TABLE,
|
||||
INCORRECT_PART,
|
||||
INCORRECT_CHUNK,
|
||||
USE_SCAN_DEEP_WRITE,
|
||||
@@ -64,4 +59,4 @@ foreign lib {
|
||||
* The string should not be freed (it is compiled into the binary).
|
||||
*/
|
||||
get_error_code_as_string :: proc(code: result_t) -> cstring ---
|
||||
}
|
||||
}
|
||||
Vendored
+36
-8
@@ -1,11 +1,5 @@
|
||||
package vendor_openexr
|
||||
|
||||
when ODIN_OS == .Windows {
|
||||
foreign import lib "OpenEXRCore-3_1.lib"
|
||||
} else {
|
||||
foreign import lib "system:OpenEXRCore-3_1"
|
||||
}
|
||||
|
||||
import "core:c"
|
||||
|
||||
attr_list_access_mode_t :: enum c.int {
|
||||
@@ -73,6 +67,25 @@ foreign lib {
|
||||
levely: c.int,
|
||||
tilew: ^i32,
|
||||
tileh: ^i32) -> result_t ---
|
||||
/** @brief Query the tile count for a particular level in the specified part.
|
||||
*
|
||||
* If the part is a tiled part, fills in the count for the
|
||||
* specified levels.
|
||||
*
|
||||
* Return `ERR_SUCCESS` on success, an error otherwise (i.e. if the part
|
||||
* is not tiled).
|
||||
*
|
||||
* It is valid to pass `NULL` to either of the @p countx or @p county
|
||||
* arguments, which enables testing if this part is a tiled part, or
|
||||
* if you don't need both for some reason.
|
||||
*/
|
||||
get_tile_counts :: proc(
|
||||
ctxt: const_context_t,
|
||||
part_index: c.int,
|
||||
levelx: c.int,
|
||||
levely: c.int,
|
||||
countx: ^i32,
|
||||
county: ^i32) -> result_t ---
|
||||
|
||||
/** @brief Query the data sizes for a particular level in the specified part.
|
||||
*
|
||||
@@ -108,6 +121,21 @@ foreign lib {
|
||||
*/
|
||||
get_chunk_count :: proc(ctxt: const_context_t, part_index: c.int, out: ^i32) -> result_t ---
|
||||
|
||||
/** Return a pointer to the chunk table and the count
|
||||
*
|
||||
* TODO: consider removing this prior to release once C++ fully converted
|
||||
*/
|
||||
get_chunk_table :: proc(ctxt: const_context_t, part_index: c.int, table: [^][^]u64, count: ^i32) -> result_t ---
|
||||
|
||||
/** Return whether the chunk table for this part is completely written.
|
||||
*
|
||||
* This only validates that all the offsets are valid.
|
||||
*
|
||||
* return EXR_ERR_INCOMPLETE_CHUNK_TABLE when incomplete, EXR_ERR_SUCCESS
|
||||
* if it appears ok, or another error if otherwise problematic
|
||||
*/
|
||||
exr_validate_chunk_table :: proc(ctxt: context_t, part_index: c.int) -> result_t ---
|
||||
|
||||
/** Return the number of scanlines chunks for this file part.
|
||||
*
|
||||
* When iterating over a scanline file, this may be an easier metric
|
||||
@@ -303,10 +331,10 @@ foreign lib {
|
||||
ctxt: context_t,
|
||||
part_index: c.int,
|
||||
name: cstring,
|
||||
ptype: pixel_type_t,
|
||||
ptype: pixel_type_t,
|
||||
percept: perceptual_treatment_t,
|
||||
xsamp: i32,
|
||||
ysamp: i32) -> c.int ---
|
||||
ysamp: i32) -> result_t ---
|
||||
|
||||
/** @brief Copy the channels from another source.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user