aboutsummaryrefslogtreecommitdiff
path: root/core/sys
diff options
context:
space:
mode:
authorRaph <raphfl.dev@gmail.com>2025-06-20 16:50:00 -0100
committerGitHub <noreply@github.com>2025-06-20 16:50:00 -0100
commita7e89e1324f64346b201aea8ac6205e0bc85eb21 (patch)
tree612abe74fa630e7cddad4d37ca5a04e18ff81471 /core/sys
parent0b5be6ad6a3c40ced071c89bb066dfd326b72943 (diff)
parentd9e08bc5d8a1292e3eccdb325bde4d180ebb4749 (diff)
Merge branch 'master' into tiocgwinsz_time
Diffstat (limited to 'core/sys')
-rw-r--r--core/sys/darwin/Foundation/NSApplication.odin93
-rw-r--r--core/sys/darwin/Foundation/NSArray.odin46
-rw-r--r--core/sys/darwin/Foundation/NSDictionary.odin4
-rw-r--r--core/sys/darwin/Foundation/NSMenu.odin621
-rw-r--r--core/sys/darwin/Foundation/NSMenuItem.odin460
-rw-r--r--core/sys/darwin/Foundation/NSWindow.odin104
-rw-r--r--core/sys/darwin/Foundation/objc_helper.odin136
-rw-r--r--core/sys/darwin/copyfile.odin67
-rw-r--r--core/sys/darwin/darwin.odin1
-rw-r--r--core/sys/darwin/sync.odin2
-rw-r--r--core/sys/darwin/xnu_system_call_wrappers.odin14
-rw-r--r--core/sys/es/api.odin1780
-rw-r--r--core/sys/freebsd/syscalls.odin25
-rw-r--r--core/sys/info/cpu_arm.odin16
-rw-r--r--core/sys/info/cpu_darwin.odin12
-rw-r--r--core/sys/info/cpu_darwin_arm64.odin2
-rw-r--r--core/sys/info/cpu_intel.odin30
-rw-r--r--core/sys/info/cpu_linux_arm.odin2
-rw-r--r--core/sys/info/cpu_linux_intel.odin38
-rw-r--r--core/sys/info/cpu_linux_riscv64.odin4
-rw-r--r--core/sys/info/cpu_riscv64.odin10
-rw-r--r--core/sys/info/cpu_windows.odin28
-rw-r--r--core/sys/info/doc.odin14
-rw-r--r--core/sys/info/platform_darwin.odin1
-rw-r--r--core/sys/info/platform_linux.odin19
-rw-r--r--core/sys/info/sysinfo.odin2
-rw-r--r--core/sys/linux/bits.odin44
-rw-r--r--core/sys/linux/constants.odin19
-rw-r--r--core/sys/linux/sys.odin3
-rw-r--r--core/sys/linux/types.odin6
-rw-r--r--core/sys/linux/wrappers.odin70
-rw-r--r--core/sys/posix/dlfcn.odin5
-rw-r--r--core/sys/posix/posix.odin2
-rw-r--r--core/sys/posix/signal.odin17
-rw-r--r--core/sys/wasm/js/events.odin64
-rw-r--r--core/sys/wasm/js/events_all_targets.odin8
-rw-r--r--core/sys/wasm/js/general.odin3
-rw-r--r--core/sys/wasm/js/odin.js153
-rw-r--r--core/sys/windows/gdi32.odin2
-rw-r--r--core/sys/windows/kernel32.odin10
-rw-r--r--core/sys/windows/ole32.odin2
-rw-r--r--core/sys/windows/scan_codes.odin172
-rw-r--r--core/sys/windows/types.odin6
-rw-r--r--core/sys/windows/user32.odin2
-rw-r--r--core/sys/windows/util.odin80
-rw-r--r--core/sys/windows/winerror.odin8
-rw-r--r--core/sys/windows/winmm.odin355
-rw-r--r--core/sys/windows/ws2_32.odin11
48 files changed, 3293 insertions, 1280 deletions
diff --git a/core/sys/darwin/Foundation/NSApplication.odin b/core/sys/darwin/Foundation/NSApplication.odin
index 254da75ad..a5e9f2e24 100644
--- a/core/sys/darwin/Foundation/NSApplication.odin
+++ b/core/sys/darwin/Foundation/NSApplication.odin
@@ -82,7 +82,6 @@ Application_setActivationPolicy :: proc "c" (self: ^Application, activationPolic
// NOTE: this is technically deprecated but still actively used (Sokol, glfw, SDL, etc.)
// and has no clear alternative although `activate` is what Apple tells you to use,
// that does not work the same way.
-// @(deprecated="Use NSApplication method activate instead.")
@(objc_type=Application, objc_name="activateIgnoringOtherApps")
Application_activateIgnoringOtherApps :: proc "c" (self: ^Application, ignoreOtherApps: BOOL) {
msgSend(nil, self, "activateIgnoringOtherApps:", ignoreOtherApps)
@@ -99,7 +98,7 @@ Application_setTitle :: proc "c" (self: ^Application, title: ^String) {
}
@(objc_type=Application, objc_name="mainMenu")
-Window_mainMenu :: proc "c" (self: ^Application) -> ^Menu {
+Application_mainMenu :: proc "c" (self: ^Application) -> ^Menu {
return msgSend(^Menu, self, "mainMenu")
}
@@ -256,7 +255,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
return nil
}
if template.applicationWillFinishLaunching != nil {
- applicationWillFinishLaunching :: proc "c" (self: id, notification: ^Notification) {
+ applicationWillFinishLaunching :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationWillFinishLaunching(notification)
@@ -264,7 +263,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationWillFinishLaunching:"), auto_cast applicationWillFinishLaunching, "v@:@")
}
if template.applicationDidFinishLaunching != nil {
- applicationDidFinishLaunching :: proc "c" (self: id, notification: ^Notification) {
+ applicationDidFinishLaunching :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationDidFinishLaunching(notification)
@@ -272,7 +271,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationDidFinishLaunching:"), auto_cast applicationDidFinishLaunching, "v@:@")
}
if template.applicationWillBecomeActive != nil {
- applicationWillBecomeActive :: proc "c" (self: id, notification: ^Notification) {
+ applicationWillBecomeActive :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationWillBecomeActive(notification)
@@ -280,7 +279,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationWillBecomeActive:"), auto_cast applicationWillBecomeActive, "v@:@")
}
if template.applicationDidBecomeActive != nil {
- applicationDidBecomeActive :: proc "c" (self: id, notification: ^Notification) {
+ applicationDidBecomeActive :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationDidBecomeActive(notification)
@@ -288,7 +287,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationDidBecomeActive:"), auto_cast applicationDidBecomeActive, "v@:@")
}
if template.applicationWillResignActive != nil {
- applicationWillResignActive :: proc "c" (self: id, notification: ^Notification) {
+ applicationWillResignActive :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationWillResignActive(notification)
@@ -296,7 +295,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationWillResignActive:"), auto_cast applicationWillResignActive, "v@:@")
}
if template.applicationDidResignActive != nil {
- applicationDidResignActive :: proc "c" (self: id, notification: ^Notification) {
+ applicationDidResignActive :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationDidResignActive(notification)
@@ -304,7 +303,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationDidResignActive:"), auto_cast applicationDidResignActive, "v@:@")
}
if template.applicationShouldTerminate != nil {
- applicationShouldTerminate :: proc "c" (self: id, sender: ^Application) -> ApplicationTerminateReply {
+ applicationShouldTerminate :: proc "c" (self: id, cmd: SEL, sender: ^Application) -> ApplicationTerminateReply {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationShouldTerminate(sender)
@@ -312,7 +311,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationShouldTerminate:"), auto_cast applicationShouldTerminate, _UINTEGER_ENCODING+"@:@")
}
if template.applicationShouldTerminateAfterLastWindowClosed != nil {
- applicationShouldTerminateAfterLastWindowClosed :: proc "c" (self: id, sender: ^Application) -> BOOL {
+ applicationShouldTerminateAfterLastWindowClosed :: proc "c" (self: id, cmd: SEL, sender: ^Application) -> BOOL {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationShouldTerminateAfterLastWindowClosed(sender)
@@ -320,7 +319,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationShouldTerminateAfterLastWindowClosed:"), auto_cast applicationShouldTerminateAfterLastWindowClosed, "B@:@")
}
if template.applicationWillTerminate != nil {
- applicationWillTerminate :: proc "c" (self: id, notification: ^Notification) {
+ applicationWillTerminate :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationWillTerminate(notification)
@@ -328,7 +327,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationWillTerminate:"), auto_cast applicationWillTerminate, "v@:@")
}
if template.applicationWillHide != nil {
- applicationWillHide :: proc "c" (self: id, notification: ^Notification) {
+ applicationWillHide :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationWillHide(notification)
@@ -336,7 +335,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationWillHide:"), auto_cast applicationWillHide, "v@:@")
}
if template.applicationDidHide != nil {
- applicationDidHide :: proc "c" (self: id, notification: ^Notification) {
+ applicationDidHide :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationDidHide(notification)
@@ -344,7 +343,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationDidHide:"), auto_cast applicationDidHide, "v@:@")
}
if template.applicationWillUnhide != nil {
- applicationWillUnhide :: proc "c" (self: id, notification: ^Notification) {
+ applicationWillUnhide :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationWillUnhide(notification)
@@ -352,7 +351,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationWillUnhide:"), auto_cast applicationWillUnhide, "v@:@")
}
if template.applicationDidUnhide != nil {
- applicationDidUnhide :: proc "c" (self: id, notification: ^Notification) {
+ applicationDidUnhide :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationDidUnhide(notification)
@@ -360,7 +359,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationDidUnhide:"), auto_cast applicationDidUnhide, "v@:@")
}
if template.applicationWillUpdate != nil {
- applicationWillUpdate :: proc "c" (self: id, notification: ^Notification) {
+ applicationWillUpdate :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationWillUpdate(notification)
@@ -368,7 +367,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationWillUpdate:"), auto_cast applicationWillUpdate, "v@:@")
}
if template.applicationDidUpdate != nil {
- applicationDidUpdate :: proc "c" (self: id, notification: ^Notification) {
+ applicationDidUpdate :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationDidUpdate(notification)
@@ -376,7 +375,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationDidUpdate:"), auto_cast applicationDidUpdate, "v@:@")
}
if template.applicationShouldHandleReopenHasVisibleWindows != nil {
- applicationShouldHandleReopenHasVisibleWindows :: proc "c" (self: id, sender: ^Application, flag: BOOL) -> BOOL {
+ applicationShouldHandleReopenHasVisibleWindows :: proc "c" (self: id, cmd: SEL, sender: ^Application, flag: BOOL) -> BOOL {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationShouldHandleReopenHasVisibleWindows(sender, flag)
@@ -384,7 +383,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationShouldHandleReopen:hasVisibleWindows:"), auto_cast applicationShouldHandleReopenHasVisibleWindows, "B@:@B")
}
if template.applicationDockMenu != nil {
- applicationDockMenu :: proc "c" (self: id, sender: ^Application) -> ^Menu {
+ applicationDockMenu :: proc "c" (self: id, cmd: SEL, sender: ^Application) -> ^Menu {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationDockMenu(sender)
@@ -392,7 +391,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationDockMenu:"), auto_cast applicationDockMenu, "@@:@")
}
if template.applicationShouldAutomaticallyLocalizeKeyEquivalents != nil {
- applicationShouldAutomaticallyLocalizeKeyEquivalents :: proc "c" (self: id, application: ^Application) -> BOOL {
+ applicationShouldAutomaticallyLocalizeKeyEquivalents :: proc "c" (self: id, cmd: SEL, application: ^Application) -> BOOL {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationShouldAutomaticallyLocalizeKeyEquivalents(application)
@@ -400,7 +399,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationShouldAutomaticallyLocalizeKeyEquivalents:"), auto_cast applicationShouldAutomaticallyLocalizeKeyEquivalents, "B@:@")
}
if template.applicationWillPresentError != nil {
- applicationWillPresentError :: proc "c" (self: id, application: ^Application, error: ^Error) -> ^Error {
+ applicationWillPresentError :: proc "c" (self: id, cmd: SEL, application: ^Application, error: ^Error) -> ^Error {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationWillPresentError(application, error)
@@ -408,7 +407,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:willPresentError:"), auto_cast applicationWillPresentError, "@@:@@")
}
if template.applicationDidChangeScreenParameters != nil {
- applicationDidChangeScreenParameters :: proc "c" (self: id, notification: ^Notification) {
+ applicationDidChangeScreenParameters :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationDidChangeScreenParameters(notification)
@@ -416,7 +415,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationDidChangeScreenParameters:"), auto_cast applicationDidChangeScreenParameters, "v@:@")
}
if template.applicationWillContinueUserActivityWithType != nil {
- applicationWillContinueUserActivityWithType :: proc "c" (self: id, application: ^Application, userActivityType: ^String) -> BOOL {
+ applicationWillContinueUserActivityWithType :: proc "c" (self: id, cmd: SEL, application: ^Application, userActivityType: ^String) -> BOOL {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationWillContinueUserActivityWithType(application, userActivityType)
@@ -424,7 +423,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:willContinueUserActivityWithType:"), auto_cast applicationWillContinueUserActivityWithType, "B@:@@")
}
if template.applicationContinueUserActivityRestorationHandler != nil {
- applicationContinueUserActivityRestorationHandler :: proc "c" (self: id, application: ^Application, userActivity: ^UserActivity, restorationHandler: ^Block) -> BOOL {
+ applicationContinueUserActivityRestorationHandler :: proc "c" (self: id, cmd: SEL, application: ^Application, userActivity: ^UserActivity, restorationHandler: ^Block) -> BOOL {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationContinueUserActivityRestorationHandler(application, userActivity, restorationHandler)
@@ -432,7 +431,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:continueUserActivity:restorationHandler:"), auto_cast applicationContinueUserActivityRestorationHandler, "B@:@@?")
}
if template.applicationDidFailToContinueUserActivityWithTypeError != nil {
- applicationDidFailToContinueUserActivityWithTypeError :: proc "c" (self: id, application: ^Application, userActivityType: ^String, error: ^Error) {
+ applicationDidFailToContinueUserActivityWithTypeError :: proc "c" (self: id, cmd: SEL, application: ^Application, userActivityType: ^String, error: ^Error) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationDidFailToContinueUserActivityWithTypeError(application, userActivityType, error)
@@ -440,7 +439,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:didFailToContinueUserActivityWithType:error:"), auto_cast applicationDidFailToContinueUserActivityWithTypeError, "v@:@@@")
}
if template.applicationDidUpdateUserActivity != nil {
- applicationDidUpdateUserActivity :: proc "c" (self: id, application: ^Application, userActivity: ^UserActivity) {
+ applicationDidUpdateUserActivity :: proc "c" (self: id, cmd: SEL, application: ^Application, userActivity: ^UserActivity) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationDidUpdateUserActivity(application, userActivity)
@@ -448,7 +447,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:didUpdateUserActivity:"), auto_cast applicationDidUpdateUserActivity, "v@:@@")
}
if template.applicationDidRegisterForRemoteNotificationsWithDeviceToken != nil {
- applicationDidRegisterForRemoteNotificationsWithDeviceToken :: proc "c" (self: id, application: ^Application, deviceToken: ^Data) {
+ applicationDidRegisterForRemoteNotificationsWithDeviceToken :: proc "c" (self: id, cmd: SEL, application: ^Application, deviceToken: ^Data) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationDidRegisterForRemoteNotificationsWithDeviceToken(application, deviceToken)
@@ -456,7 +455,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:didRegisterForRemoteNotificationsWithDeviceToken:"), auto_cast applicationDidRegisterForRemoteNotificationsWithDeviceToken, "v@:@@")
}
if template.applicationDidFailToRegisterForRemoteNotificationsWithError != nil {
- applicationDidFailToRegisterForRemoteNotificationsWithError :: proc "c" (self: id, application: ^Application, error: ^Error) {
+ applicationDidFailToRegisterForRemoteNotificationsWithError :: proc "c" (self: id, cmd: SEL, application: ^Application, error: ^Error) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationDidFailToRegisterForRemoteNotificationsWithError(application, error)
@@ -464,7 +463,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:didFailToRegisterForRemoteNotificationsWithError:"), auto_cast applicationDidFailToRegisterForRemoteNotificationsWithError, "v@:@@")
}
if template.applicationDidReceiveRemoteNotification != nil {
- applicationDidReceiveRemoteNotification :: proc "c" (self: id, application: ^Application, userInfo: ^Dictionary) {
+ applicationDidReceiveRemoteNotification :: proc "c" (self: id, cmd: SEL, application: ^Application, userInfo: ^Dictionary) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationDidReceiveRemoteNotification(application, userInfo)
@@ -472,7 +471,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:didReceiveRemoteNotification:"), auto_cast applicationDidReceiveRemoteNotification, "v@:@@")
}
// if template.applicationUserDidAcceptCloudKitShareWithMetadata != nil {
- // applicationUserDidAcceptCloudKitShareWithMetadata :: proc "c" (self: id, application: ^Application, metadata: ^CKShareMetadata) {
+ // applicationUserDidAcceptCloudKitShareWithMetadata :: proc "c" (self: id, cmd: SEL, application: ^Application, metadata: ^CKShareMetadata) {
// del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
// context = del._context
// del.applicationUserDidAcceptCloudKitShareWithMetadata(application, metadata)
@@ -480,7 +479,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
// class_addMethod(class, intrinsics.objc_find_selector("application:userDidAcceptCloudKitShareWithMetadata:"), auto_cast applicationUserDidAcceptCloudKitShareWithMetadata, "v@:@@")
// }
// if template.applicationHandlerForIntent != nil {
- // applicationHandlerForIntent :: proc "c" (self: id, application: ^Application, intent: ^INIntent) -> id {
+ // applicationHandlerForIntent :: proc "c" (self: id, cmd: SEL, application: ^Application, intent: ^INIntent) -> id {
// del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
// context = del._context
// return del.applicationHandlerForIntent(application, intent)
@@ -488,7 +487,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
// class_addMethod(class, intrinsics.objc_find_selector("application:handlerForIntent:"), auto_cast applicationHandlerForIntent, "@@:@@")
// }
if template.applicationOpenURLs != nil {
- applicationOpenURLs :: proc "c" (self: id, application: ^Application, urls: ^Array) {
+ applicationOpenURLs :: proc "c" (self: id, cmd: SEL, application: ^Application, urls: ^Array) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationOpenURLs(application, urls)
@@ -496,7 +495,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:openURLs:"), auto_cast applicationOpenURLs, "v@:@@")
}
if template.applicationOpenFile != nil {
- applicationOpenFile :: proc "c" (self: id, sender: ^Application, filename: ^String) -> BOOL {
+ applicationOpenFile :: proc "c" (self: id, cmd: SEL, sender: ^Application, filename: ^String) -> BOOL {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationOpenFile(sender, filename)
@@ -504,7 +503,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:openFile:"), auto_cast applicationOpenFile, "B@:@@")
}
if template.applicationOpenFileWithoutUI != nil {
- applicationOpenFileWithoutUI :: proc "c" (self: id, sender: id, filename: ^String) -> BOOL {
+ applicationOpenFileWithoutUI :: proc "c" (self: id, cmd: SEL, sender: id, filename: ^String) -> BOOL {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationOpenFileWithoutUI(sender, filename)
@@ -512,7 +511,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:openFileWithoutUI:"), auto_cast applicationOpenFileWithoutUI, "B@:@@")
}
if template.applicationOpenTempFile != nil {
- applicationOpenTempFile :: proc "c" (self: id, sender: ^Application, filename: ^String) -> BOOL {
+ applicationOpenTempFile :: proc "c" (self: id, cmd: SEL, sender: ^Application, filename: ^String) -> BOOL {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationOpenTempFile(sender, filename)
@@ -520,7 +519,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:openTempFile:"), auto_cast applicationOpenTempFile, "B@:@@")
}
if template.applicationOpenFiles != nil {
- applicationOpenFiles :: proc "c" (self: id, sender: ^Application, filenames: ^Array) {
+ applicationOpenFiles :: proc "c" (self: id, cmd: SEL, sender: ^Application, filenames: ^Array) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationOpenFiles(sender, filenames)
@@ -528,7 +527,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:openFiles:"), auto_cast applicationOpenFiles, "v@:@@")
}
if template.applicationShouldOpenUntitledFile != nil {
- applicationShouldOpenUntitledFile :: proc "c" (self: id, sender: ^Application) -> BOOL {
+ applicationShouldOpenUntitledFile :: proc "c" (self: id, cmd: SEL, sender: ^Application) -> BOOL {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationShouldOpenUntitledFile(sender)
@@ -536,7 +535,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationShouldOpenUntitledFile:"), auto_cast applicationShouldOpenUntitledFile, "B@:@")
}
if template.applicationOpenUntitledFile != nil {
- applicationOpenUntitledFile :: proc "c" (self: id, sender: ^Application) -> BOOL {
+ applicationOpenUntitledFile :: proc "c" (self: id, cmd: SEL, sender: ^Application) -> BOOL {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationOpenUntitledFile(sender)
@@ -544,7 +543,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationOpenUntitledFile:"), auto_cast applicationOpenUntitledFile, "B@:@")
}
if template.applicationPrintFile != nil {
- applicationPrintFile :: proc "c" (self: id, sender: ^Application, filename: ^String) -> BOOL {
+ applicationPrintFile :: proc "c" (self: id, cmd: SEL, sender: ^Application, filename: ^String) -> BOOL {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationPrintFile(sender, filename)
@@ -552,7 +551,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:printFile:"), auto_cast applicationPrintFile, "B@:@@")
}
if template.applicationPrintFilesWithSettingsShowPrintPanels != nil {
- applicationPrintFilesWithSettingsShowPrintPanels :: proc "c" (self: id, application: ^Application, fileNames: ^Array, printSettings: ^Dictionary, showPrintPanels: BOOL) -> ApplicationPrintReply {
+ applicationPrintFilesWithSettingsShowPrintPanels :: proc "c" (self: id, cmd: SEL, application: ^Application, fileNames: ^Array, printSettings: ^Dictionary, showPrintPanels: BOOL) -> ApplicationPrintReply {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationPrintFilesWithSettingsShowPrintPanels(application, fileNames, printSettings, showPrintPanels)
@@ -560,7 +559,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:printFiles:withSettings:showPrintPanels:"), auto_cast applicationPrintFilesWithSettingsShowPrintPanels, _UINTEGER_ENCODING+"@:@@@B")
}
if template.applicationSupportsSecureRestorableState != nil {
- applicationSupportsSecureRestorableState :: proc "c" (self: id, app: ^Application) -> BOOL {
+ applicationSupportsSecureRestorableState :: proc "c" (self: id, cmd: SEL, app: ^Application) -> BOOL {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationSupportsSecureRestorableState(app)
@@ -568,7 +567,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationSupportsSecureRestorableState:"), auto_cast applicationSupportsSecureRestorableState, "B@:@")
}
if template.applicationProtectedDataDidBecomeAvailable != nil {
- applicationProtectedDataDidBecomeAvailable :: proc "c" (self: id, notification: ^Notification) {
+ applicationProtectedDataDidBecomeAvailable :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationProtectedDataDidBecomeAvailable(notification)
@@ -576,7 +575,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationProtectedDataDidBecomeAvailable:"), auto_cast applicationProtectedDataDidBecomeAvailable, "v@:@")
}
if template.applicationProtectedDataWillBecomeUnavailable != nil {
- applicationProtectedDataWillBecomeUnavailable :: proc "c" (self: id, notification: ^Notification) {
+ applicationProtectedDataWillBecomeUnavailable :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationProtectedDataWillBecomeUnavailable(notification)
@@ -584,7 +583,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationProtectedDataWillBecomeUnavailable:"), auto_cast applicationProtectedDataWillBecomeUnavailable, "v@:@")
}
if template.applicationWillEncodeRestorableState != nil {
- applicationWillEncodeRestorableState :: proc "c" (self: id, app: ^Application, coder: ^Coder) {
+ applicationWillEncodeRestorableState :: proc "c" (self: id, cmd: SEL, app: ^Application, coder: ^Coder) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationWillEncodeRestorableState(app, coder)
@@ -592,7 +591,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:willEncodeRestorableState:"), auto_cast applicationWillEncodeRestorableState, "v@:@@")
}
if template.applicationDidDecodeRestorableState != nil {
- applicationDidDecodeRestorableState :: proc "c" (self: id, app: ^Application, coder: ^Coder) {
+ applicationDidDecodeRestorableState :: proc "c" (self: id, cmd: SEL, app: ^Application, coder: ^Coder) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationDidDecodeRestorableState(app, coder)
@@ -600,7 +599,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("application:didDecodeRestorableState:"), auto_cast applicationDidDecodeRestorableState, "v@:@@")
}
if template.applicationDidChangeOcclusionState != nil {
- applicationDidChangeOcclusionState :: proc "c" (self: id, notification: ^Notification) {
+ applicationDidChangeOcclusionState :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.applicationDidChangeOcclusionState(notification)
@@ -608,7 +607,7 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
class_addMethod(class, intrinsics.objc_find_selector("applicationDidChangeOcclusionState:"), auto_cast applicationDidChangeOcclusionState, "v@:@")
}
if template.applicationDelegateHandlesKey != nil {
- applicationDelegateHandlesKey :: proc "c" (self: id, sender: ^Application, key: ^String) -> BOOL {
+ applicationDelegateHandlesKey :: proc "c" (self: id, cmd: SEL, sender: ^Application, key: ^String) -> BOOL {
del := cast(^_ApplicationDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.applicationDelegateHandlesKey(sender, key)
diff --git a/core/sys/darwin/Foundation/NSArray.odin b/core/sys/darwin/Foundation/NSArray.odin
index b238f63f8..0977c6469 100644
--- a/core/sys/darwin/Foundation/NSArray.odin
+++ b/core/sys/darwin/Foundation/NSArray.odin
@@ -40,3 +40,49 @@ Array_objectAs :: proc "c" (self: ^Array, index: UInteger, $T: typeid) -> T wher
Array_count :: proc "c" (self: ^Array) -> UInteger {
return msgSend(UInteger, self, "count")
}
+
+
+@(objc_class="NSMutableArray")
+MutableArray :: struct {
+ using _: Copying(MutableArray),
+}
+
+@(objc_type=MutableArray, objc_name="alloc", objc_is_class_method=true)
+MutableArray_alloc :: proc "c" () -> ^MutableArray {
+ return msgSend(^MutableArray, MutableArray, "alloc")
+}
+
+@(objc_type=MutableArray, objc_name="init")
+MutableArray_init :: proc "c" (self: ^MutableArray) -> ^MutableArray {
+ return msgSend(^MutableArray, self, "init")
+}
+
+@(objc_type=MutableArray, objc_name="initWithObjects")
+MutableArray_initWithObjects :: proc "c" (self: ^MutableArray, objects: [^]^Object, count: UInteger) -> ^MutableArray {
+ return msgSend(^MutableArray, self, "initWithObjects:count:", objects, count)
+}
+
+@(objc_type=MutableArray, objc_name="initWithCoder")
+MutableArray_initWithCoder :: proc "c" (self: ^MutableArray, coder: ^Coder) -> ^MutableArray {
+ return msgSend(^MutableArray, self, "initWithCoder:", coder)
+}
+
+@(objc_type=MutableArray, objc_name="object")
+MutableArray_object :: proc "c" (self: ^MutableArray, index: UInteger) -> ^Object {
+ return msgSend(^Object, self, "objectAtIndex:", index)
+}
+@(objc_type=MutableArray, objc_name="objectAs")
+MutableArray_objectAs :: proc "c" (self: ^MutableArray, index: UInteger, $T: typeid) -> T where intrinsics.type_is_pointer(T), intrinsics.type_is_subtype_of(T, ^Object) {
+ return (T)(MutableArray_object(self, index))
+}
+
+@(objc_type=MutableArray, objc_name="count")
+MutableArray_count :: proc "c" (self: ^MutableArray) -> UInteger {
+ return msgSend(UInteger, self, "count")
+}
+
+
+@(objc_type=MutableArray, objc_name="exchangeObjectAtIndex")
+MutableArray_exchangeObjectAtIndex :: proc "c" (self: ^MutableArray, idx1, idx2: UInteger) {
+ msgSend(nil, self, "exchangeObjectAtIndex:withObjectAtIndex:", idx1, idx2)
+}
diff --git a/core/sys/darwin/Foundation/NSDictionary.odin b/core/sys/darwin/Foundation/NSDictionary.odin
index 8af58cf62..ed98f3168 100644
--- a/core/sys/darwin/Foundation/NSDictionary.odin
+++ b/core/sys/darwin/Foundation/NSDictionary.odin
@@ -15,7 +15,7 @@ Dictionary_dictionaryWithObject :: proc "c" (object: ^Object, forKey: ^Object) -
@(objc_type=Dictionary, objc_name="dictionaryWithObjects", objc_is_class_method=true)
Dictionary_dictionaryWithObjects :: proc "c" (objects: [^]^Object, forKeys: [^]^Object, count: UInteger) -> ^Dictionary {
- return msgSend(^Dictionary, Dictionary, "dictionaryWithObjects:forKeys:count", objects, forKeys, count)
+ return msgSend(^Dictionary, Dictionary, "dictionaryWithObjects:forKeys:count:", objects, forKeys, count)
}
@@ -31,7 +31,7 @@ Dictionary_init :: proc "c" (self: ^Dictionary) -> ^Dictionary {
@(objc_type=Dictionary, objc_name="initWithObjects")
Dictionary_initWithObjects :: proc "c" (self: ^Dictionary, objects: [^]^Object, forKeys: [^]^Object, count: UInteger) -> ^Dictionary {
- return msgSend(^Dictionary, self, "initWithObjects:forKeys:count", objects, forKeys, count)
+ return msgSend(^Dictionary, self, "initWithObjects:forKeys:count:", objects, forKeys, count)
}
@(objc_type=Dictionary, objc_name="objectForKey")
diff --git a/core/sys/darwin/Foundation/NSMenu.odin b/core/sys/darwin/Foundation/NSMenu.odin
index 9a74151b0..747920ab7 100644
--- a/core/sys/darwin/Foundation/NSMenu.odin
+++ b/core/sys/darwin/Foundation/NSMenu.odin
@@ -2,127 +2,562 @@ package objc_Foundation
import "base:builtin"
import "base:intrinsics"
+import "core:c"
-KeyEquivalentModifierFlag :: enum UInteger {
- CapsLock = 16, // Set if Caps Lock key is pressed.
- Shift = 17, // Set if Shift key is pressed.
- Control = 18, // Set if Control key is pressed.
- Option = 19, // Set if Option or Alternate key is pressed.
- Command = 20, // Set if Command key is pressed.
- NumericPad = 21, // Set if any key in the numeric keypad is pressed.
- Help = 22, // Set if the Help key is pressed.
- Function = 23, // Set if any function key is pressed.
+
+MenuSelectionMode :: enum c.long {
+ Automatic = 0,
+ SelectOne = 1,
+ SelectAny = 2,
}
-KeyEquivalentModifierMask :: distinct bit_set[KeyEquivalentModifierFlag; UInteger]
-// Used to retrieve only the device-independent modifier flags, allowing applications to mask off the device-dependent modifier flags, including event coalescing information.
-KeyEventModifierFlagDeviceIndependentFlagsMask := transmute(KeyEquivalentModifierMask)_KeyEventModifierFlagDeviceIndependentFlagsMask
-@(private) _KeyEventModifierFlagDeviceIndependentFlagsMask := UInteger(0xffff0000)
+MenuPresentationStyle :: enum c.long {
+ Regular = 0,
+ Palette = 1,
+}
+UserInterfaceLayoutDirection :: enum c.long {
+ LeftToRight = 0,
+ RightToLeft = 1,
+}
-MenuItemCallback :: proc "c" (unused: rawptr, name: SEL, sender: ^Object)
+MenuPropertyItem :: enum c.ulong {
+ Title = 0,
+ AttributedTitle = 1,
+ KeyEquivalent = 2,
+ Image = 3,
+ Enabled = 4,
+ AccessibilityDescription = 5,
+}
+MenuProperties :: distinct bit_set[MenuPropertyItem; c.ulong]
-@(objc_class="NSMenuItem")
-MenuItem :: struct {using _: Object}
+@(objc_class="NSMenu")
+Menu :: struct {using _: Object}
-@(objc_type=MenuItem, objc_name="alloc", objc_is_class_method=true)
-MenuItem_alloc :: proc "c" () -> ^MenuItem {
- return msgSend(^MenuItem, MenuItem, "alloc")
+@(objc_type=Menu, objc_name="init")
+Menu_init :: proc "c" (self: ^Menu) -> ^Menu {
+ return msgSend(^Menu, self, "init")
}
-@(objc_type=MenuItem, objc_name="registerActionCallback", objc_is_class_method=true)
-MenuItem_registerActionCallback :: proc "c" (name: cstring, callback: MenuItemCallback) -> SEL {
- s := string(name)
- n := len(s)
- sel: SEL
- if n > 0 && s[n-1] != ':' {
- col_name := intrinsics.alloca(n+2, 1)
- builtin.copy(col_name[:n], s)
- col_name[n] = ':'
- col_name[n+1] = 0
- sel = sel_registerName(cstring(col_name))
- } else {
- sel = sel_registerName(name)
- }
- if callback != nil {
- class_addMethod(intrinsics.objc_find_class("NSObject"), sel, auto_cast callback, "v@:@")
- }
- return sel
-}
-@(objc_type=MenuItem, objc_name="separatorItem", objc_is_class_method=true)
-MenuItem_separatorItem :: proc "c" () -> ^MenuItem {
- return msgSend(^MenuItem, MenuItem, "separatorItem")
+@(objc_type=Menu, objc_name="initWithTitle")
+Menu_initWithTitle :: #force_inline proc "c" (self: ^Menu, title: ^String) -> ^Menu {
+ return msgSend(^Menu, self, "initWithTitle:", title)
}
-
-@(objc_type=MenuItem, objc_name="init")
-MenuItem_init :: proc "c" (self: ^MenuItem) -> ^MenuItem {
- return msgSend(^MenuItem, self, "init")
+@(objc_type=Menu, objc_name="initWithCoder")
+Menu_initWithCoder :: #force_inline proc "c" (self: ^Menu, coder: ^Coder) -> ^Menu {
+ return msgSend(^Menu, self, "initWithCoder:", coder)
}
-
-@(objc_type=MenuItem, objc_name="initWithTitle")
-MenuItem_initWithTitle :: proc "c" (self: ^MenuItem, title: ^String, action: SEL, keyEquivalent: ^String) -> ^MenuItem {
- return msgSend(^MenuItem, self, "initWithTitle:action:keyEquivalent:", title, action, keyEquivalent)
+@(objc_type=Menu, objc_name="popUpContextMenu_withEvent_forView", objc_is_class_method=true)
+Menu_popUpContextMenu_withEvent_forView :: #force_inline proc "c" (menu: ^Menu, event: ^Event, view: ^View) {
+ msgSend(nil, Menu, "popUpContextMenu:withEvent:forView:", menu, event, view)
}
-
-@(objc_type=MenuItem, objc_name="setKeyEquivalentModifierMask")
-MenuItem_setKeyEquivalentModifierMask :: proc "c" (self: ^MenuItem, modifierMask: KeyEquivalentModifierMask) {
- msgSend(nil, self, "setKeyEquivalentModifierMask:", modifierMask)
+// @(objc_type=Menu, objc_name="popUpContextMenu_withEvent_forView_withFont", objc_is_class_method=true)
+// Menu_popUpContextMenu_withEvent_forView_withFont :: #force_inline proc "c" (menu: ^Menu, event: ^Event, view: ^View, font: ^Font) {
+// msgSend(nil, Menu, "popUpContextMenu:withEvent:forView:withFont:", menu, event, view, font)
+// }
+@(objc_type=Menu, objc_name="popUpMenuPositioningItem")
+Menu_popUpMenuPositioningItem :: #force_inline proc "c" (self: ^Menu, item: ^MenuItem, location: Point, view: ^View) -> bool {
+ return msgSend(bool, self, "popUpMenuPositioningItem:atLocation:inView:", item, location, view)
}
-
-@(objc_type=MenuItem, objc_name="keyEquivalentModifierMask")
-MenuItem_keyEquivalentModifierMask :: proc "c" (self: ^MenuItem) -> KeyEquivalentModifierMask {
- return msgSend(KeyEquivalentModifierMask, self, "keyEquivalentModifierMask")
+@(objc_type=Menu, objc_name="setMenuBarVisible", objc_is_class_method=true)
+Menu_setMenuBarVisible :: #force_inline proc "c" (visible: bool) {
+ msgSend(nil, Menu, "setMenuBarVisible:", visible)
}
-
-@(objc_type=MenuItem, objc_name="setSubmenu")
-MenuItem_setSubmenu :: proc "c" (self: ^MenuItem, submenu: ^Menu) {
- msgSend(nil, self, "setSubmenu:", submenu)
+@(objc_type=Menu, objc_name="menuBarVisible", objc_is_class_method=true)
+Menu_menuBarVisible :: #force_inline proc "c" () -> bool {
+ return msgSend(bool, Menu, "menuBarVisible")
}
-
-@(objc_type=MenuItem, objc_name="title")
-MenuItem_title :: proc "c" (self: ^MenuItem) -> ^String {
+@(objc_type=Menu, objc_name="insertItem")
+Menu_insertItem :: #force_inline proc "c" (self: ^Menu, newItem: ^MenuItem, index: Integer) {
+ msgSend(nil, self, "insertItem:atIndex:", newItem, index)
+}
+@(objc_type=Menu, objc_name="addItem")
+Menu_addItem :: #force_inline proc "c" (self: ^Menu, newItem: ^MenuItem) {
+ msgSend(nil, self, "addItem:", newItem)
+}
+@(objc_type=Menu, objc_name="insertItemWithTitle")
+Menu_insertItemWithTitle :: #force_inline proc "c" (self: ^Menu, string: ^String, selector: SEL, charCode: ^String, index: Integer) -> ^MenuItem {
+ return msgSend(^MenuItem, self, "insertItemWithTitle:action:keyEquivalent:atIndex:", string, selector, charCode, index)
+}
+@(objc_type=Menu, objc_name="addItemWithTitle")
+Menu_addItemWithTitle :: #force_inline proc "c" (self: ^Menu, string: ^String, selector: SEL, charCode: ^String) -> ^MenuItem {
+ return msgSend(^MenuItem, self, "addItemWithTitle:action:keyEquivalent:", string, selector, charCode)
+}
+@(objc_type=Menu, objc_name="removeItemAtIndex")
+Menu_removeItemAtIndex :: #force_inline proc "c" (self: ^Menu, index: Integer) {
+ msgSend(nil, self, "removeItemAtIndex:", index)
+}
+@(objc_type=Menu, objc_name="removeItem")
+Menu_removeItem :: #force_inline proc "c" (self: ^Menu, item: ^MenuItem) {
+ msgSend(nil, self, "removeItem:", item)
+}
+@(objc_type=Menu, objc_name="setSubmenu")
+Menu_setSubmenu :: #force_inline proc "c" (self: ^Menu, menu: ^Menu, item: ^MenuItem) {
+ msgSend(nil, self, "setSubmenu:forItem:", menu, item)
+}
+@(objc_type=Menu, objc_name="removeAllItems")
+Menu_removeAllItems :: #force_inline proc "c" (self: ^Menu) {
+ msgSend(nil, self, "removeAllItems")
+}
+@(objc_type=Menu, objc_name="itemAtIndex")
+Menu_itemAtIndex :: #force_inline proc "c" (self: ^Menu, index: Integer) -> ^MenuItem {
+ return msgSend(^MenuItem, self, "itemAtIndex:", index)
+}
+@(objc_type=Menu, objc_name="indexOfItem")
+Menu_indexOfItem :: #force_inline proc "c" (self: ^Menu, item: ^MenuItem) -> Integer {
+ return msgSend(Integer, self, "indexOfItem:", item)
+}
+@(objc_type=Menu, objc_name="indexOfItemWithTitle")
+Menu_indexOfItemWithTitle :: #force_inline proc "c" (self: ^Menu, title: ^String) -> Integer {
+ return msgSend(Integer, self, "indexOfItemWithTitle:", title)
+}
+@(objc_type=Menu, objc_name="indexOfItemWithTag")
+Menu_indexOfItemWithTag :: #force_inline proc "c" (self: ^Menu, tag: Integer) -> Integer {
+ return msgSend(Integer, self, "indexOfItemWithTag:", tag)
+}
+@(objc_type=Menu, objc_name="indexOfItemWithRepresentedObject")
+Menu_indexOfItemWithRepresentedObject :: #force_inline proc "c" (self: ^Menu, object: id) -> Integer {
+ return msgSend(Integer, self, "indexOfItemWithRepresentedObject:", object)
+}
+@(objc_type=Menu, objc_name="indexOfItemWithSubmenu")
+Menu_indexOfItemWithSubmenu :: #force_inline proc "c" (self: ^Menu, submenu: ^Menu) -> Integer {
+ return msgSend(Integer, self, "indexOfItemWithSubmenu:", submenu)
+}
+@(objc_type=Menu, objc_name="indexOfItemWithTarget")
+Menu_indexOfItemWithTarget :: #force_inline proc "c" (self: ^Menu, target: id, actionSelector: SEL) -> Integer {
+ return msgSend(Integer, self, "indexOfItemWithTarget:andAction:", target, actionSelector)
+}
+@(objc_type=Menu, objc_name="itemWithTitle")
+Menu_itemWithTitle :: #force_inline proc "c" (self: ^Menu, title: ^String) -> ^MenuItem {
+ return msgSend(^MenuItem, self, "itemWithTitle:", title)
+}
+@(objc_type=Menu, objc_name="itemWithTag")
+Menu_itemWithTag :: #force_inline proc "c" (self: ^Menu, tag: Integer) -> ^MenuItem {
+ return msgSend(^MenuItem, self, "itemWithTag:", tag)
+}
+@(objc_type=Menu, objc_name="update")
+Menu_update :: #force_inline proc "c" (self: ^Menu) {
+ msgSend(nil, self, "update")
+}
+@(objc_type=Menu, objc_name="performKeyEquivalent")
+Menu_performKeyEquivalent :: #force_inline proc "c" (self: ^Menu, event: ^Event) -> bool {
+ return msgSend(bool, self, "performKeyEquivalent:", event)
+}
+@(objc_type=Menu, objc_name="itemChanged")
+Menu_itemChanged :: #force_inline proc "c" (self: ^Menu, item: ^MenuItem) {
+ msgSend(nil, self, "itemChanged:", item)
+}
+@(objc_type=Menu, objc_name="performActionForItemAtIndex")
+Menu_performActionForItemAtIndex :: #force_inline proc "c" (self: ^Menu, index: Integer) {
+ msgSend(nil, self, "performActionForItemAtIndex:", index)
+}
+@(objc_type=Menu, objc_name="cancelTracking")
+Menu_cancelTracking :: #force_inline proc "c" (self: ^Menu) {
+ msgSend(nil, self, "cancelTracking")
+}
+@(objc_type=Menu, objc_name="cancelTrackingWithoutAnimation")
+Menu_cancelTrackingWithoutAnimation :: #force_inline proc "c" (self: ^Menu) {
+ msgSend(nil, self, "cancelTrackingWithoutAnimation")
+}
+@(objc_type=Menu, objc_name="title")
+Menu_title :: #force_inline proc "c" (self: ^Menu) -> ^String {
return msgSend(^String, self, "title")
}
-
-@(objc_type=MenuItem, objc_name="setTitle")
-MenuItem_setTitle :: proc "c" (self: ^MenuItem, title: ^String) -> ^String {
- return msgSend(^String, self, "title:", title)
+@(objc_type=Menu, objc_name="setTitle")
+Menu_setTitle :: #force_inline proc "c" (self: ^Menu, title: ^String) {
+ msgSend(nil, self, "setTitle:", title)
+}
+@(objc_type=Menu, objc_name="supermenu")
+Menu_supermenu :: #force_inline proc "c" (self: ^Menu) -> ^Menu {
+ return msgSend(^Menu, self, "supermenu")
+}
+@(objc_type=Menu, objc_name="setSupermenu")
+Menu_setSupermenu :: #force_inline proc "c" (self: ^Menu, supermenu: ^Menu) {
+ msgSend(nil, self, "setSupermenu:", supermenu)
+}
+@(objc_type=Menu, objc_name="itemArray")
+Menu_itemArray :: #force_inline proc "c" (self: ^Menu) -> ^Array {
+ return msgSend(^Array, self, "itemArray")
+}
+@(objc_type=Menu, objc_name="setItemArray")
+Menu_setItemArray :: #force_inline proc "c" (self: ^Menu, itemArray: ^Array) {
+ msgSend(nil, self, "setItemArray:", itemArray)
+}
+@(objc_type=Menu, objc_name="numberOfItems")
+Menu_numberOfItems :: #force_inline proc "c" (self: ^Menu) -> Integer {
+ return msgSend(Integer, self, "numberOfItems")
+}
+@(objc_type=Menu, objc_name="autoenablesItems")
+Menu_autoenablesItems :: #force_inline proc "c" (self: ^Menu) -> bool {
+ return msgSend(bool, self, "autoenablesItems")
+}
+@(objc_type=Menu, objc_name="setAutoenablesItems")
+Menu_setAutoenablesItems :: #force_inline proc "c" (self: ^Menu, autoenablesItems: bool) {
+ msgSend(nil, self, "setAutoenablesItems:", autoenablesItems)
+}
+@(objc_type=Menu, objc_name="delegate")
+Menu_delegate :: #force_inline proc "c" (self: ^Menu) -> ^MenuDelegate {
+ return msgSend(^MenuDelegate, self, "delegate")
+}
+@(objc_type=Menu, objc_name="setDelegate")
+Menu_setDelegate :: #force_inline proc "c" (self: ^Menu, delegate: ^MenuDelegate) {
+ msgSend(nil, self, "setDelegate:", delegate)
+}
+@(objc_type=Menu, objc_name="menuBarHeight")
+Menu_menuBarHeight :: #force_inline proc "c" (self: ^Menu) -> Float {
+ return msgSend(Float, self, "menuBarHeight")
+}
+@(objc_type=Menu, objc_name="highlightedItem")
+Menu_highlightedItem :: #force_inline proc "c" (self: ^Menu) -> ^MenuItem {
+ return msgSend(^MenuItem, self, "highlightedItem")
+}
+@(objc_type=Menu, objc_name="minimumWidth")
+Menu_minimumWidth :: #force_inline proc "c" (self: ^Menu) -> Float {
+ return msgSend(Float, self, "minimumWidth")
+}
+@(objc_type=Menu, objc_name="setMinimumWidth")
+Menu_setMinimumWidth :: #force_inline proc "c" (self: ^Menu, minimumWidth: Float) {
+ msgSend(nil, self, "setMinimumWidth:", minimumWidth)
+}
+@(objc_type=Menu, objc_name="size")
+Menu_size :: #force_inline proc "c" (self: ^Menu) -> Size {
+ return msgSend(Size, self, "size")
+}
+// @(objc_type=Menu, objc_name="font")
+// Menu_font :: #force_inline proc "c" (self: ^Menu) -> ^Font {
+// return msgSend(^Font, self, "font")
+// }
+// @(objc_type=Menu, objc_name="setFont")
+// Menu_setFont :: #force_inline proc "c" (self: ^Menu, font: ^Font) {
+// msgSend(nil, self, "setFont:", font)
+// }
+@(objc_type=Menu, objc_name="allowsContextMenuPlugIns")
+Menu_allowsContextMenuPlugIns :: #force_inline proc "c" (self: ^Menu) -> bool {
+ return msgSend(bool, self, "allowsContextMenuPlugIns")
+}
+@(objc_type=Menu, objc_name="setAllowsContextMenuPlugIns")
+Menu_setAllowsContextMenuPlugIns :: #force_inline proc "c" (self: ^Menu, allowsContextMenuPlugIns: bool) {
+ msgSend(nil, self, "setAllowsContextMenuPlugIns:", allowsContextMenuPlugIns)
+}
+@(objc_type=Menu, objc_name="showsStateColumn")
+Menu_showsStateColumn :: #force_inline proc "c" (self: ^Menu) -> bool {
+ return msgSend(bool, self, "showsStateColumn")
+}
+@(objc_type=Menu, objc_name="setShowsStateColumn")
+Menu_setShowsStateColumn :: #force_inline proc "c" (self: ^Menu, showsStateColumn: bool) {
+ msgSend(nil, self, "setShowsStateColumn:", showsStateColumn)
+}
+@(objc_type=Menu, objc_name="userInterfaceLayoutDirection")
+Menu_userInterfaceLayoutDirection :: #force_inline proc "c" (self: ^Menu) -> UserInterfaceLayoutDirection {
+ return msgSend(UserInterfaceLayoutDirection, self, "userInterfaceLayoutDirection")
+}
+@(objc_type=Menu, objc_name="setUserInterfaceLayoutDirection")
+Menu_setUserInterfaceLayoutDirection :: #force_inline proc "c" (self: ^Menu, userInterfaceLayoutDirection: UserInterfaceLayoutDirection) {
+ msgSend(nil, self, "setUserInterfaceLayoutDirection:", userInterfaceLayoutDirection)
+}
+@(objc_type=Menu, objc_name="paletteMenuWithColors_titles_selectionHandler", objc_is_class_method=true)
+Menu_paletteMenuWithColors_titles_selectionHandler :: #force_inline proc "c" (colors: ^Array, itemTitles: ^Array, onSelectionChange: proc "c" (_arg_0: ^Menu)) -> ^Menu {
+ return msgSend(^Menu, Menu, "paletteMenuWithColors:titles:selectionHandler:", colors, itemTitles, onSelectionChange)
+}
+// @(objc_type=Menu, objc_name="paletteMenuWithColors_titles_templateImage_selectionHandler", objc_is_class_method=true)
+// Menu_paletteMenuWithColors_titles_templateImage_selectionHandler :: #force_inline proc "c" (colors: ^Array, itemTitles: ^Array, image: ^Image, onSelectionChange: proc "c" (_arg_0: ^Menu)) -> ^Menu {
+// return msgSend(^Menu, Menu, "paletteMenuWithColors:titles:templateImage:selectionHandler:", colors, itemTitles, image, onSelectionChange)
+// }
+@(objc_type=Menu, objc_name="presentationStyle")
+Menu_presentationStyle :: #force_inline proc "c" (self: ^Menu) -> MenuPresentationStyle {
+ return msgSend(MenuPresentationStyle, self, "presentationStyle")
+}
+@(objc_type=Menu, objc_name="setPresentationStyle")
+Menu_setPresentationStyle :: #force_inline proc "c" (self: ^Menu, presentationStyle: MenuPresentationStyle) {
+ msgSend(nil, self, "setPresentationStyle:", presentationStyle)
+}
+@(objc_type=Menu, objc_name="selectionMode")
+Menu_selectionMode :: #force_inline proc "c" (self: ^Menu) -> MenuSelectionMode {
+ return msgSend(MenuSelectionMode, self, "selectionMode")
+}
+@(objc_type=Menu, objc_name="setSelectionMode")
+Menu_setSelectionMode :: #force_inline proc "c" (self: ^Menu, selectionMode: MenuSelectionMode) {
+ msgSend(nil, self, "setSelectionMode:", selectionMode)
+}
+@(objc_type=Menu, objc_name="selectedItems")
+Menu_selectedItems :: #force_inline proc "c" (self: ^Menu) -> ^Array {
+ return msgSend(^Array, self, "selectedItems")
+}
+@(objc_type=Menu, objc_name="setSelectedItems")
+Menu_setSelectedItems :: #force_inline proc "c" (self: ^Menu, selectedItems: ^Array) {
+ msgSend(nil, self, "setSelectedItems:", selectedItems)
+}
+@(objc_type=Menu, objc_name="submenuAction")
+Menu_submenuAction :: #force_inline proc "c" (self: ^Menu, sender: id) {
+ msgSend(nil, self, "submenuAction:", sender)
+}
+@(objc_type=Menu, objc_name="propertiesToUpdate")
+Menu_propertiesToUpdate :: #force_inline proc "c" (self: ^Menu) -> MenuProperties {
+ return msgSend(MenuProperties, self, "propertiesToUpdate")
+}
+@(objc_type=Menu, objc_name="setMenuRepresentation")
+Menu_setMenuRepresentation :: #force_inline proc "c" (self: ^Menu, menuRep: id) {
+ msgSend(nil, self, "setMenuRepresentation:", menuRep)
+}
+@(objc_type=Menu, objc_name="menuRepresentation")
+Menu_menuRepresentation :: #force_inline proc "c" (self: ^Menu) -> id {
+ return msgSend(id, self, "menuRepresentation")
+}
+@(objc_type=Menu, objc_name="setContextMenuRepresentation")
+Menu_setContextMenuRepresentation :: #force_inline proc "c" (self: ^Menu, menuRep: id) {
+ msgSend(nil, self, "setContextMenuRepresentation:", menuRep)
+}
+@(objc_type=Menu, objc_name="contextMenuRepresentation")
+Menu_contextMenuRepresentation :: #force_inline proc "c" (self: ^Menu) -> id {
+ return msgSend(id, self, "contextMenuRepresentation")
+}
+@(objc_type=Menu, objc_name="setTearOffMenuRepresentation")
+Menu_setTearOffMenuRepresentation :: #force_inline proc "c" (self: ^Menu, menuRep: id) {
+ msgSend(nil, self, "setTearOffMenuRepresentation:", menuRep)
+}
+@(objc_type=Menu, objc_name="tearOffMenuRepresentation")
+Menu_tearOffMenuRepresentation :: #force_inline proc "c" (self: ^Menu) -> id {
+ return msgSend(id, self, "tearOffMenuRepresentation")
+}
+@(objc_type=Menu, objc_name="menuZone", objc_is_class_method=true)
+Menu_menuZone :: #force_inline proc "c" () -> ^Zone {
+ return msgSend(^Zone, Menu, "menuZone")
+}
+@(objc_type=Menu, objc_name="setMenuZone", objc_is_class_method=true)
+Menu_setMenuZone :: #force_inline proc "c" (zone: ^Zone) {
+ msgSend(nil, Menu, "setMenuZone:", zone)
+}
+@(objc_type=Menu, objc_name="attachedMenu")
+Menu_attachedMenu :: #force_inline proc "c" (self: ^Menu) -> ^Menu {
+ return msgSend(^Menu, self, "attachedMenu")
+}
+@(objc_type=Menu, objc_name="isAttached")
+Menu_isAttached :: #force_inline proc "c" (self: ^Menu) -> bool {
+ return msgSend(bool, self, "isAttached")
+}
+@(objc_type=Menu, objc_name="sizeToFit")
+Menu_sizeToFit :: #force_inline proc "c" (self: ^Menu) {
+ msgSend(nil, self, "sizeToFit")
+}
+@(objc_type=Menu, objc_name="locationForSubmenu")
+Menu_locationForSubmenu :: #force_inline proc "c" (self: ^Menu, submenu: ^Menu) -> Point {
+ return msgSend(Point, self, "locationForSubmenu:", submenu)
+}
+@(objc_type=Menu, objc_name="helpRequested")
+Menu_helpRequested :: #force_inline proc "c" (self: ^Menu, eventPtr: ^Event) {
+ msgSend(nil, self, "helpRequested:", eventPtr)
+}
+@(objc_type=Menu, objc_name="menuChangedMessagesEnabled")
+Menu_menuChangedMessagesEnabled :: #force_inline proc "c" (self: ^Menu) -> bool {
+ return msgSend(bool, self, "menuChangedMessagesEnabled")
+}
+@(objc_type=Menu, objc_name="setMenuChangedMessagesEnabled")
+Menu_setMenuChangedMessagesEnabled :: #force_inline proc "c" (self: ^Menu, menuChangedMessagesEnabled: bool) {
+ msgSend(nil, self, "setMenuChangedMessagesEnabled:", menuChangedMessagesEnabled)
+}
+@(objc_type=Menu, objc_name="isTornOff")
+Menu_isTornOff :: #force_inline proc "c" (self: ^Menu) -> bool {
+ return msgSend(bool, self, "isTornOff")
+}
+@(objc_type=Menu, objc_name="load", objc_is_class_method=true)
+Menu_load :: #force_inline proc "c" () {
+ msgSend(nil, Menu, "load")
+}
+@(objc_type=Menu, objc_name="initialize", objc_is_class_method=true)
+Menu_initialize :: #force_inline proc "c" () {
+ msgSend(nil, Menu, "initialize")
+}
+@(objc_type=Menu, objc_name="new", objc_is_class_method=true)
+Menu_new :: #force_inline proc "c" () -> ^Menu {
+ return msgSend(^Menu, Menu, "new")
+}
+@(objc_type=Menu, objc_name="allocWithZone", objc_is_class_method=true)
+Menu_allocWithZone :: #force_inline proc "c" (zone: ^Zone) -> ^Menu {
+ return msgSend(^Menu, Menu, "allocWithZone:", zone)
}
-
-
-
-@(objc_class="NSMenu")
-Menu :: struct {using _: Object}
-
@(objc_type=Menu, objc_name="alloc", objc_is_class_method=true)
-Menu_alloc :: proc "c" () -> ^Menu {
+Menu_alloc :: #force_inline proc "c" () -> ^Menu {
return msgSend(^Menu, Menu, "alloc")
}
+@(objc_type=Menu, objc_name="copyWithZone", objc_is_class_method=true)
+Menu_copyWithZone :: #force_inline proc "c" (zone: ^Zone) -> id {
+ return msgSend(id, Menu, "copyWithZone:", zone)
+}
+@(objc_type=Menu, objc_name="mutableCopyWithZone", objc_is_class_method=true)
+Menu_mutableCopyWithZone :: #force_inline proc "c" (zone: ^Zone) -> id {
+ return msgSend(id, Menu, "mutableCopyWithZone:", zone)
+}
+@(objc_type=Menu, objc_name="instancesRespondToSelector", objc_is_class_method=true)
+Menu_instancesRespondToSelector :: #force_inline proc "c" (aSelector: SEL) -> bool {
+ return msgSend(bool, Menu, "instancesRespondToSelector:", aSelector)
+}
+@(objc_type=Menu, objc_name="conformsToProtocol", objc_is_class_method=true)
+Menu_conformsToProtocol :: #force_inline proc "c" (protocol: ^Protocol) -> bool {
+ return msgSend(bool, Menu, "conformsToProtocol:", protocol)
+}
+@(objc_type=Menu, objc_name="instanceMethodForSelector", objc_is_class_method=true)
+Menu_instanceMethodForSelector :: #force_inline proc "c" (aSelector: SEL) -> IMP {
+ return msgSend(IMP, Menu, "instanceMethodForSelector:", aSelector)
+}
+// @(objc_type=Menu, objc_name="instanceMethodSignatureForSelector", objc_is_class_method=true)
+// Menu_instanceMethodSignatureForSelector :: #force_inline proc "c" (aSelector: SEL) -> ^MethodSignature {
+// return msgSend(^MethodSignature, Menu, "instanceMethodSignatureForSelector:", aSelector)
+// }
+@(objc_type=Menu, objc_name="isSubclassOfClass", objc_is_class_method=true)
+Menu_isSubclassOfClass :: #force_inline proc "c" (aClass: Class) -> bool {
+ return msgSend(bool, Menu, "isSubclassOfClass:", aClass)
+}
+@(objc_type=Menu, objc_name="resolveClassMethod", objc_is_class_method=true)
+Menu_resolveClassMethod :: #force_inline proc "c" (sel: SEL) -> bool {
+ return msgSend(bool, Menu, "resolveClassMethod:", sel)
+}
+@(objc_type=Menu, objc_name="resolveInstanceMethod", objc_is_class_method=true)
+Menu_resolveInstanceMethod :: #force_inline proc "c" (sel: SEL) -> bool {
+ return msgSend(bool, Menu, "resolveInstanceMethod:", sel)
+}
+@(objc_type=Menu, objc_name="hash", objc_is_class_method=true)
+Menu_hash :: #force_inline proc "c" () -> UInteger {
+ return msgSend(UInteger, Menu, "hash")
+}
+@(objc_type=Menu, objc_name="superclass", objc_is_class_method=true)
+Menu_superclass :: #force_inline proc "c" () -> Class {
+ return msgSend(Class, Menu, "superclass")
+}
+@(objc_type=Menu, objc_name="class", objc_is_class_method=true)
+Menu_class :: #force_inline proc "c" () -> Class {
+ return msgSend(Class, Menu, "class")
+}
+@(objc_type=Menu, objc_name="description", objc_is_class_method=true)
+Menu_description :: #force_inline proc "c" () -> ^String {
+ return msgSend(^String, Menu, "description")
+}
+@(objc_type=Menu, objc_name="debugDescription", objc_is_class_method=true)
+Menu_debugDescription :: #force_inline proc "c" () -> ^String {
+ return msgSend(^String, Menu, "debugDescription")
+}
+@(objc_type=Menu, objc_name="version", objc_is_class_method=true)
+Menu_version :: #force_inline proc "c" () -> Integer {
+ return msgSend(Integer, Menu, "version")
+}
+@(objc_type=Menu, objc_name="setVersion", objc_is_class_method=true)
+Menu_setVersion :: #force_inline proc "c" (aVersion: Integer) {
+ msgSend(nil, Menu, "setVersion:", aVersion)
+}
+@(objc_type=Menu, objc_name="poseAsClass", objc_is_class_method=true)
+Menu_poseAsClass :: #force_inline proc "c" (aClass: Class) {
+ msgSend(nil, Menu, "poseAsClass:", aClass)
+}
+@(objc_type=Menu, objc_name="cancelPreviousPerformRequestsWithTarget_selector_object", objc_is_class_method=true)
+Menu_cancelPreviousPerformRequestsWithTarget_selector_object :: #force_inline proc "c" (aTarget: id, aSelector: SEL, anArgument: id) {
+ msgSend(nil, Menu, "cancelPreviousPerformRequestsWithTarget:selector:object:", aTarget, aSelector, anArgument)
+}
+@(objc_type=Menu, objc_name="cancelPreviousPerformRequestsWithTarget_", objc_is_class_method=true)
+Menu_cancelPreviousPerformRequestsWithTarget_ :: #force_inline proc "c" (aTarget: id) {
+ msgSend(nil, Menu, "cancelPreviousPerformRequestsWithTarget:", aTarget)
+}
+@(objc_type=Menu, objc_name="accessInstanceVariablesDirectly", objc_is_class_method=true)
+Menu_accessInstanceVariablesDirectly :: #force_inline proc "c" () -> bool {
+ return msgSend(bool, Menu, "accessInstanceVariablesDirectly")
+}
+@(objc_type=Menu, objc_name="useStoredAccessor", objc_is_class_method=true)
+Menu_useStoredAccessor :: #force_inline proc "c" () -> bool {
+ return msgSend(bool, Menu, "useStoredAccessor")
+}
+@(objc_type=Menu, objc_name="keyPathsForValuesAffectingValueForKey", objc_is_class_method=true)
+Menu_keyPathsForValuesAffectingValueForKey :: #force_inline proc "c" (key: ^String) -> ^Set {
+ return msgSend(^Set, Menu, "keyPathsForValuesAffectingValueForKey:", key)
+}
+@(objc_type=Menu, objc_name="automaticallyNotifiesObserversForKey", objc_is_class_method=true)
+Menu_automaticallyNotifiesObserversForKey :: #force_inline proc "c" (key: ^String) -> bool {
+ return msgSend(bool, Menu, "automaticallyNotifiesObserversForKey:", key)
+}
+@(objc_type=Menu, objc_name="setKeys", objc_is_class_method=true)
+Menu_setKeys :: #force_inline proc "c" (keys: ^Array, dependentKey: ^String) {
+ msgSend(nil, Menu, "setKeys:triggerChangeNotificationsForDependentKey:", keys, dependentKey)
+}
+@(objc_type=Menu, objc_name="classFallbacksForKeyedArchiver", objc_is_class_method=true)
+Menu_classFallbacksForKeyedArchiver :: #force_inline proc "c" () -> ^Array {
+ return msgSend(^Array, Menu, "classFallbacksForKeyedArchiver")
+}
+@(objc_type=Menu, objc_name="classForKeyedUnarchiver", objc_is_class_method=true)
+Menu_classForKeyedUnarchiver :: #force_inline proc "c" () -> Class {
+ return msgSend(Class, Menu, "classForKeyedUnarchiver")
+}
+@(objc_type=Menu, objc_name="exposeBinding", objc_is_class_method=true)
+Menu_exposeBinding :: #force_inline proc "c" (binding: ^String) {
+ msgSend(nil, Menu, "exposeBinding:", binding)
+}
+@(objc_type=Menu, objc_name="setDefaultPlaceholder", objc_is_class_method=true)
+Menu_setDefaultPlaceholder :: #force_inline proc "c" (placeholder: id, marker: id, binding: ^String) {
+ msgSend(nil, Menu, "setDefaultPlaceholder:forMarker:withBinding:", placeholder, marker, binding)
+}
+@(objc_type=Menu, objc_name="defaultPlaceholderForMarker", objc_is_class_method=true)
+Menu_defaultPlaceholderForMarker :: #force_inline proc "c" (marker: id, binding: ^String) -> id {
+ return msgSend(id, Menu, "defaultPlaceholderForMarker:withBinding:", marker, binding)
+}
+@(objc_type=Menu, objc_name="popUpContextMenu")
+Menu_popUpContextMenu :: proc {
+ Menu_popUpContextMenu_withEvent_forView,
+ // Menu_popUpContextMenu_withEvent_forView_withFont,
+}
-@(objc_type=Menu, objc_name="init")
-Menu_init :: proc "c" (self: ^Menu) -> ^Menu {
- return msgSend(^Menu, self, "init")
+@(objc_type=Menu, objc_name="paletteMenuWithColors")
+Menu_paletteMenuWithColors :: proc {
+ Menu_paletteMenuWithColors_titles_selectionHandler,
+ // Menu_paletteMenuWithColors_titles_templateImage_selectionHandler,
}
-@(objc_type=Menu, objc_name="initWithTitle")
-Menu_initWithTitle :: proc "c" (self: ^Menu, title: ^String) -> ^Menu {
- return msgSend(^Menu, self, "initWithTitle:", title)
+@(objc_type=Menu, objc_name="cancelPreviousPerformRequestsWithTarget")
+Menu_cancelPreviousPerformRequestsWithTarget :: proc {
+ Menu_cancelPreviousPerformRequestsWithTarget_selector_object,
+ Menu_cancelPreviousPerformRequestsWithTarget_,
}
-@(objc_type=Menu, objc_name="addItem")
-Menu_addItem :: proc "c" (self: ^Menu, item: ^MenuItem) {
- msgSend(nil, self, "addItem:", item)
-}
-@(objc_type=Menu, objc_name="addItemWithTitle")
-Menu_addItemWithTitle :: proc "c" (self: ^Menu, title: ^String, selector: SEL, keyEquivalent: ^String) -> ^MenuItem {
- return msgSend(^MenuItem, self, "addItemWithTitle:action:keyEquivalent:", title, selector, keyEquivalent)
-}
-@(objc_type=Menu, objc_name="itemArray")
-Menu_itemArray :: proc "c" (self: ^Menu) -> ^Array {
- return msgSend(^Array, self, "itemArray")
-} \ No newline at end of file
+
+
+
+@(objc_class="NSMenuDelegate")
+MenuDelegate :: struct {using _: Object, using _: ObjectProtocol}
+
+@(objc_type=MenuDelegate, objc_name="menuNeedsUpdate")
+MenuDelegate_menuNeedsUpdate :: #force_inline proc "c" (self: ^MenuDelegate, menu: ^Menu) {
+ msgSend(nil, self, "menuNeedsUpdate:", menu)
+}
+@(objc_type=MenuDelegate, objc_name="numberOfItemsInMenu")
+MenuDelegate_numberOfItemsInMenu :: #force_inline proc "c" (self: ^MenuDelegate, menu: ^Menu) -> Integer {
+ return msgSend(Integer, self, "numberOfItemsInMenu:", menu)
+}
+@(objc_type=MenuDelegate, objc_name="menu_updateItem_atIndex_shouldCancel")
+MenuDelegate_menu_updateItem_atIndex_shouldCancel :: #force_inline proc "c" (self: ^MenuDelegate, menu: ^Menu, item: ^MenuItem, index: Integer, shouldCancel: bool) -> bool {
+ return msgSend(bool, self, "menu:updateItem:atIndex:shouldCancel:", menu, item, index, shouldCancel)
+}
+@(objc_type=MenuDelegate, objc_name="menuHasKeyEquivalent")
+MenuDelegate_menuHasKeyEquivalent :: #force_inline proc "c" (self: ^MenuDelegate, menu: ^Menu, event: ^Event, target: ^id, action: ^SEL) -> bool {
+ return msgSend(bool, self, "menuHasKeyEquivalent:forEvent:target:action:", menu, event, target, action)
+}
+@(objc_type=MenuDelegate, objc_name="menuWillOpen")
+MenuDelegate_menuWillOpen :: #force_inline proc "c" (self: ^MenuDelegate, menu: ^Menu) {
+ msgSend(nil, self, "menuWillOpen:", menu)
+}
+@(objc_type=MenuDelegate, objc_name="menuDidClose")
+MenuDelegate_menuDidClose :: #force_inline proc "c" (self: ^MenuDelegate, menu: ^Menu) {
+ msgSend(nil, self, "menuDidClose:", menu)
+}
+@(objc_type=MenuDelegate, objc_name="menu_willHighlightItem")
+MenuDelegate_menu_willHighlightItem :: #force_inline proc "c" (self: ^MenuDelegate, menu: ^Menu, item: ^MenuItem) {
+ msgSend(nil, self, "menu:willHighlightItem:", menu, item)
+}
+@(objc_type=MenuDelegate, objc_name="confinementRectForMenu")
+MenuDelegate_confinementRectForMenu :: #force_inline proc "c" (self: ^MenuDelegate, menu: ^Menu, screen: ^Screen) -> Rect {
+ return msgSend(Rect, self, "confinementRectForMenu:onScreen:", menu, screen)
+}
+@(objc_type=MenuDelegate, objc_name="menu")
+MenuDelegate_menu :: proc {
+ MenuDelegate_menu_updateItem_atIndex_shouldCancel,
+ MenuDelegate_menu_willHighlightItem,
+}
diff --git a/core/sys/darwin/Foundation/NSMenuItem.odin b/core/sys/darwin/Foundation/NSMenuItem.odin
new file mode 100644
index 000000000..248a0cf4f
--- /dev/null
+++ b/core/sys/darwin/Foundation/NSMenuItem.odin
@@ -0,0 +1,460 @@
+package objc_Foundation
+
+import "base:builtin"
+import "base:intrinsics"
+
+KeyEquivalentModifierFlag :: EventModifierFlag
+KeyEquivalentModifierMask :: EventModifierFlags
+
+// Used to retrieve only the device-independent modifier flags, allowing applications to mask off the device-dependent modifier flags, including event coalescing information.
+KeyEventModifierFlagDeviceIndependentFlagsMask := transmute(KeyEquivalentModifierMask)_KeyEventModifierFlagDeviceIndependentFlagsMask
+@(private) _KeyEventModifierFlagDeviceIndependentFlagsMask := UInteger(0xffff0000)
+
+MenuItemCallback :: proc "c" (unused: rawptr, name: SEL, sender: ^Object)
+
+@(objc_class="NSMenuItem")
+MenuItem :: struct {using _: Object}
+
+@(objc_type=MenuItem, objc_name="registerActionCallback", objc_is_class_method=true)
+MenuItem_registerActionCallback :: proc "c" (name: cstring, callback: MenuItemCallback) -> SEL {
+ s := string(name)
+ n := len(s)
+ sel: SEL
+ if n > 0 && s[n-1] != ':' {
+ col_name := intrinsics.alloca(n+2, 1)
+ builtin.copy(col_name[:n], s)
+ col_name[n] = ':'
+ col_name[n+1] = 0
+ sel = sel_registerName(cstring(col_name))
+ } else {
+ sel = sel_registerName(name)
+ }
+ if callback != nil {
+ class_addMethod(intrinsics.objc_find_class("NSObject"), sel, auto_cast callback, "v@:@")
+ }
+ return sel
+}
+
+@(objc_type=MenuItem, objc_name="init")
+MenuItem_init :: proc "c" (self: ^MenuItem) -> ^MenuItem {
+ return msgSend(^MenuItem, self, "init")
+}
+
+
+@(objc_type=MenuItem, objc_name="separatorItem", objc_is_class_method=true)
+MenuItem_separatorItem :: #force_inline proc "c" () -> ^MenuItem {
+ return msgSend(^MenuItem, MenuItem, "separatorItem")
+}
+@(objc_type=MenuItem, objc_name="sectionHeaderWithTitle", objc_is_class_method=true)
+MenuItem_sectionHeaderWithTitle :: #force_inline proc "c" (title: ^String) -> ^MenuItem {
+ return msgSend(^MenuItem, MenuItem, "sectionHeaderWithTitle:", title)
+}
+@(objc_type=MenuItem, objc_name="initWithTitle")
+MenuItem_initWithTitle :: #force_inline proc "c" (self: ^MenuItem, string: ^String, selector: SEL, charCode: ^String) -> ^MenuItem {
+ return msgSend(^MenuItem, self, "initWithTitle:action:keyEquivalent:", string, selector, charCode)
+}
+@(objc_type=MenuItem, objc_name="initWithCoder")
+MenuItem_initWithCoder :: #force_inline proc "c" (self: ^MenuItem, coder: ^Coder) -> ^MenuItem {
+ return msgSend(^MenuItem, self, "initWithCoder:", coder)
+}
+@(objc_type=MenuItem, objc_name="usesUserKeyEquivalents", objc_is_class_method=true)
+MenuItem_usesUserKeyEquivalents :: #force_inline proc "c" () -> bool {
+ return msgSend(bool, MenuItem, "usesUserKeyEquivalents")
+}
+@(objc_type=MenuItem, objc_name="setUsesUserKeyEquivalents", objc_is_class_method=true)
+MenuItem_setUsesUserKeyEquivalents :: #force_inline proc "c" (usesUserKeyEquivalents: bool) {
+ msgSend(nil, MenuItem, "setUsesUserKeyEquivalents:", usesUserKeyEquivalents)
+}
+@(objc_type=MenuItem, objc_name="menu")
+MenuItem_menu :: #force_inline proc "c" (self: ^MenuItem) -> ^Menu {
+ return msgSend(^Menu, self, "menu")
+}
+@(objc_type=MenuItem, objc_name="setMenu")
+MenuItem_setMenu :: #force_inline proc "c" (self: ^MenuItem, menu: ^Menu) {
+ msgSend(nil, self, "setMenu:", menu)
+}
+@(objc_type=MenuItem, objc_name="hasSubmenu")
+MenuItem_hasSubmenu :: #force_inline proc "c" (self: ^MenuItem) -> bool {
+ return msgSend(bool, self, "hasSubmenu")
+}
+@(objc_type=MenuItem, objc_name="submenu")
+MenuItem_submenu :: #force_inline proc "c" (self: ^MenuItem) -> ^Menu {
+ return msgSend(^Menu, self, "submenu")
+}
+@(objc_type=MenuItem, objc_name="setSubmenu")
+MenuItem_setSubmenu :: #force_inline proc "c" (self: ^MenuItem, submenu: ^Menu) {
+ msgSend(nil, self, "setSubmenu:", submenu)
+}
+@(objc_type=MenuItem, objc_name="parentItem")
+MenuItem_parentItem :: #force_inline proc "c" (self: ^MenuItem) -> ^MenuItem {
+ return msgSend(^MenuItem, self, "parentItem")
+}
+@(objc_type=MenuItem, objc_name="title")
+MenuItem_title :: #force_inline proc "c" (self: ^MenuItem) -> ^String {
+ return msgSend(^String, self, "title")
+}
+@(objc_type=MenuItem, objc_name="setTitle")
+MenuItem_setTitle :: #force_inline proc "c" (self: ^MenuItem, title: ^String) {
+ msgSend(nil, self, "setTitle:", title)
+}
+// @(objc_type=MenuItem, objc_name="attributedTitle")
+// MenuItem_attributedTitle :: #force_inline proc "c" (self: ^MenuItem) -> ^AttributedString {
+// return msgSend(^AttributedString, self, "attributedTitle")
+// }
+// @(objc_type=MenuItem, objc_name="setAttributedTitle")
+// MenuItem_setAttributedTitle :: #force_inline proc "c" (self: ^MenuItem, attributedTitle: ^AttributedString) {
+// msgSend(nil, self, "setAttributedTitle:", attributedTitle)
+// }
+@(objc_type=MenuItem, objc_name="subtitle")
+MenuItem_subtitle :: #force_inline proc "c" (self: ^MenuItem) -> ^String {
+ return msgSend(^String, self, "subtitle")
+}
+@(objc_type=MenuItem, objc_name="setSubtitle")
+MenuItem_setSubtitle :: #force_inline proc "c" (self: ^MenuItem, subtitle: ^String) {
+ msgSend(nil, self, "setSubtitle:", subtitle)
+}
+@(objc_type=MenuItem, objc_name="isSeparatorItem")
+MenuItem_isSeparatorItem :: #force_inline proc "c" (self: ^MenuItem) -> bool {
+ return msgSend(bool, self, "isSeparatorItem")
+}
+@(objc_type=MenuItem, objc_name="isSectionHeader")
+MenuItem_isSectionHeader :: #force_inline proc "c" (self: ^MenuItem) -> bool {
+ return msgSend(bool, self, "isSectionHeader")
+}
+@(objc_type=MenuItem, objc_name="keyEquivalent")
+MenuItem_keyEquivalent :: #force_inline proc "c" (self: ^MenuItem) -> ^String {
+ return msgSend(^String, self, "keyEquivalent")
+}
+@(objc_type=MenuItem, objc_name="setKeyEquivalent")
+MenuItem_setKeyEquivalent :: #force_inline proc "c" (self: ^MenuItem, keyEquivalent: ^String) {
+ msgSend(nil, self, "setKeyEquivalent:", keyEquivalent)
+}
+@(objc_type=MenuItem, objc_name="keyEquivalentModifierMask")
+MenuItem_keyEquivalentModifierMask :: #force_inline proc "c" (self: ^MenuItem) -> EventModifierFlags {
+ return msgSend(EventModifierFlags, self, "keyEquivalentModifierMask")
+}
+@(objc_type=MenuItem, objc_name="setKeyEquivalentModifierMask")
+MenuItem_setKeyEquivalentModifierMask :: #force_inline proc "c" (self: ^MenuItem, keyEquivalentModifierMask: EventModifierFlags) {
+ msgSend(nil, self, "setKeyEquivalentModifierMask:", keyEquivalentModifierMask)
+}
+@(objc_type=MenuItem, objc_name="userKeyEquivalent")
+MenuItem_userKeyEquivalent :: #force_inline proc "c" (self: ^MenuItem) -> ^String {
+ return msgSend(^String, self, "userKeyEquivalent")
+}
+@(objc_type=MenuItem, objc_name="allowsKeyEquivalentWhenHidden")
+MenuItem_allowsKeyEquivalentWhenHidden :: #force_inline proc "c" (self: ^MenuItem) -> bool {
+ return msgSend(bool, self, "allowsKeyEquivalentWhenHidden")
+}
+@(objc_type=MenuItem, objc_name="setAllowsKeyEquivalentWhenHidden")
+MenuItem_setAllowsKeyEquivalentWhenHidden :: #force_inline proc "c" (self: ^MenuItem, allowsKeyEquivalentWhenHidden: bool) {
+ msgSend(nil, self, "setAllowsKeyEquivalentWhenHidden:", allowsKeyEquivalentWhenHidden)
+}
+@(objc_type=MenuItem, objc_name="allowsAutomaticKeyEquivalentLocalization")
+MenuItem_allowsAutomaticKeyEquivalentLocalization :: #force_inline proc "c" (self: ^MenuItem) -> bool {
+ return msgSend(bool, self, "allowsAutomaticKeyEquivalentLocalization")
+}
+@(objc_type=MenuItem, objc_name="setAllowsAutomaticKeyEquivalentLocalization")
+MenuItem_setAllowsAutomaticKeyEquivalentLocalization :: #force_inline proc "c" (self: ^MenuItem, allowsAutomaticKeyEquivalentLocalization: bool) {
+ msgSend(nil, self, "setAllowsAutomaticKeyEquivalentLocalization:", allowsAutomaticKeyEquivalentLocalization)
+}
+@(objc_type=MenuItem, objc_name="allowsAutomaticKeyEquivalentMirroring")
+MenuItem_allowsAutomaticKeyEquivalentMirroring :: #force_inline proc "c" (self: ^MenuItem) -> bool {
+ return msgSend(bool, self, "allowsAutomaticKeyEquivalentMirroring")
+}
+@(objc_type=MenuItem, objc_name="setAllowsAutomaticKeyEquivalentMirroring")
+MenuItem_setAllowsAutomaticKeyEquivalentMirroring :: #force_inline proc "c" (self: ^MenuItem, allowsAutomaticKeyEquivalentMirroring: bool) {
+ msgSend(nil, self, "setAllowsAutomaticKeyEquivalentMirroring:", allowsAutomaticKeyEquivalentMirroring)
+}
+// @(objc_type=MenuItem, objc_name="image")
+// MenuItem_image :: #force_inline proc "c" (self: ^MenuItem) -> ^Image {
+// return msgSend(^Image, self, "image")
+// }
+// @(objc_type=MenuItem, objc_name="setImage")
+// MenuItem_setImage :: #force_inline proc "c" (self: ^MenuItem, image: ^Image) {
+// msgSend(nil, self, "setImage:", image)
+// }
+// @(objc_type=MenuItem, objc_name="state")
+// MenuItem_state :: #force_inline proc "c" (self: ^MenuItem) -> ControlStateValue {
+// return msgSend(ControlStateValue, self, "state")
+// }
+// @(objc_type=MenuItem, objc_name="setState")
+// MenuItem_setState :: #force_inline proc "c" (self: ^MenuItem, state: ControlStateValue) {
+// msgSend(nil, self, "setState:", state)
+// }
+// @(objc_type=MenuItem, objc_name="onStateImage")
+// MenuItem_onStateImage :: #force_inline proc "c" (self: ^MenuItem) -> ^Image {
+// return msgSend(^Image, self, "onStateImage")
+// }
+// @(objc_type=MenuItem, objc_name="setOnStateImage")
+// MenuItem_setOnStateImage :: #force_inline proc "c" (self: ^MenuItem, onStateImage: ^Image) {
+// msgSend(nil, self, "setOnStateImage:", onStateImage)
+// }
+// @(objc_type=MenuItem, objc_name="offStateImage")
+// MenuItem_offStateImage :: #force_inline proc "c" (self: ^MenuItem) -> ^Image {
+// return msgSend(^Image, self, "offStateImage")
+// }
+// @(objc_type=MenuItem, objc_name="setOffStateImage")
+// MenuItem_setOffStateImage :: #force_inline proc "c" (self: ^MenuItem, offStateImage: ^Image) {
+// msgSend(nil, self, "setOffStateImage:", offStateImage)
+// }
+// @(objc_type=MenuItem, objc_name="mixedStateImage")
+// MenuItem_mixedStateImage :: #force_inline proc "c" (self: ^MenuItem) -> ^Image {
+// return msgSend(^Image, self, "mixedStateImage")
+// }
+// @(objc_type=MenuItem, objc_name="setMixedStateImage")
+// MenuItem_setMixedStateImage :: #force_inline proc "c" (self: ^MenuItem, mixedStateImage: ^Image) {
+// msgSend(nil, self, "setMixedStateImage:", mixedStateImage)
+// }
+@(objc_type=MenuItem, objc_name="isEnabled")
+MenuItem_isEnabled :: #force_inline proc "c" (self: ^MenuItem) -> bool {
+ return msgSend(bool, self, "isEnabled")
+}
+@(objc_type=MenuItem, objc_name="setEnabled")
+MenuItem_setEnabled :: #force_inline proc "c" (self: ^MenuItem, enabled: bool) {
+ msgSend(nil, self, "setEnabled:", enabled)
+}
+@(objc_type=MenuItem, objc_name="isAlternate")
+MenuItem_isAlternate :: #force_inline proc "c" (self: ^MenuItem) -> bool {
+ return msgSend(bool, self, "isAlternate")
+}
+@(objc_type=MenuItem, objc_name="setAlternate")
+MenuItem_setAlternate :: #force_inline proc "c" (self: ^MenuItem, alternate: bool) {
+ msgSend(nil, self, "setAlternate:", alternate)
+}
+@(objc_type=MenuItem, objc_name="indentationLevel")
+MenuItem_indentationLevel :: #force_inline proc "c" (self: ^MenuItem) -> Integer {
+ return msgSend(Integer, self, "indentationLevel")
+}
+@(objc_type=MenuItem, objc_name="setIndentationLevel")
+MenuItem_setIndentationLevel :: #force_inline proc "c" (self: ^MenuItem, indentationLevel: Integer) {
+ msgSend(nil, self, "setIndentationLevel:", indentationLevel)
+}
+@(objc_type=MenuItem, objc_name="target")
+MenuItem_target :: #force_inline proc "c" (self: ^MenuItem) -> id {
+ return msgSend(id, self, "target")
+}
+@(objc_type=MenuItem, objc_name="setTarget")
+MenuItem_setTarget :: #force_inline proc "c" (self: ^MenuItem, target: id) {
+ msgSend(nil, self, "setTarget:", target)
+}
+@(objc_type=MenuItem, objc_name="action")
+MenuItem_action :: #force_inline proc "c" (self: ^MenuItem) -> SEL {
+ return msgSend(SEL, self, "action")
+}
+@(objc_type=MenuItem, objc_name="setAction")
+MenuItem_setAction :: #force_inline proc "c" (self: ^MenuItem, action: SEL) {
+ msgSend(nil, self, "setAction:", action)
+}
+@(objc_type=MenuItem, objc_name="tag")
+MenuItem_tag :: #force_inline proc "c" (self: ^MenuItem) -> Integer {
+ return msgSend(Integer, self, "tag")
+}
+@(objc_type=MenuItem, objc_name="setTag")
+MenuItem_setTag :: #force_inline proc "c" (self: ^MenuItem, tag: Integer) {
+ msgSend(nil, self, "setTag:", tag)
+}
+@(objc_type=MenuItem, objc_name="representedObject")
+MenuItem_representedObject :: #force_inline proc "c" (self: ^MenuItem) -> id {
+ return msgSend(id, self, "representedObject")
+}
+@(objc_type=MenuItem, objc_name="setRepresentedObject")
+MenuItem_setRepresentedObject :: #force_inline proc "c" (self: ^MenuItem, representedObject: id) {
+ msgSend(nil, self, "setRepresentedObject:", representedObject)
+}
+@(objc_type=MenuItem, objc_name="view")
+MenuItem_view :: #force_inline proc "c" (self: ^MenuItem) -> ^View {
+ return msgSend(^View, self, "view")
+}
+@(objc_type=MenuItem, objc_name="setView")
+MenuItem_setView :: #force_inline proc "c" (self: ^MenuItem, view: ^View) {
+ msgSend(nil, self, "setView:", view)
+}
+@(objc_type=MenuItem, objc_name="isHighlighted")
+MenuItem_isHighlighted :: #force_inline proc "c" (self: ^MenuItem) -> bool {
+ return msgSend(bool, self, "isHighlighted")
+}
+@(objc_type=MenuItem, objc_name="isHidden")
+MenuItem_isHidden :: #force_inline proc "c" (self: ^MenuItem) -> bool {
+ return msgSend(bool, self, "isHidden")
+}
+@(objc_type=MenuItem, objc_name="setHidden")
+MenuItem_setHidden :: #force_inline proc "c" (self: ^MenuItem, hidden: bool) {
+ msgSend(nil, self, "setHidden:", hidden)
+}
+@(objc_type=MenuItem, objc_name="isHiddenOrHasHiddenAncestor")
+MenuItem_isHiddenOrHasHiddenAncestor :: #force_inline proc "c" (self: ^MenuItem) -> bool {
+ return msgSend(bool, self, "isHiddenOrHasHiddenAncestor")
+}
+@(objc_type=MenuItem, objc_name="toolTip")
+MenuItem_toolTip :: #force_inline proc "c" (self: ^MenuItem) -> ^String {
+ return msgSend(^String, self, "toolTip")
+}
+@(objc_type=MenuItem, objc_name="setToolTip")
+MenuItem_setToolTip :: #force_inline proc "c" (self: ^MenuItem, toolTip: ^String) {
+ msgSend(nil, self, "setToolTip:", toolTip)
+}
+// @(objc_type=MenuItem, objc_name="badge")
+// MenuItem_badge :: #force_inline proc "c" (self: ^MenuItem) -> ^MenuItemBadge {
+// return msgSend(^MenuItemBadge, self, "badge")
+// }
+// @(objc_type=MenuItem, objc_name="setBadge")
+// MenuItem_setBadge :: #force_inline proc "c" (self: ^MenuItem, badge: ^MenuItemBadge) {
+// msgSend(nil, self, "setBadge:", badge)
+// }
+@(objc_type=MenuItem, objc_name="setMnemonicLocation")
+MenuItem_setMnemonicLocation :: #force_inline proc "c" (self: ^MenuItem, location: UInteger) {
+ msgSend(nil, self, "setMnemonicLocation:", location)
+}
+@(objc_type=MenuItem, objc_name="mnemonicLocation")
+MenuItem_mnemonicLocation :: #force_inline proc "c" (self: ^MenuItem) -> UInteger {
+ return msgSend(UInteger, self, "mnemonicLocation")
+}
+@(objc_type=MenuItem, objc_name="mnemonic")
+MenuItem_mnemonic :: #force_inline proc "c" (self: ^MenuItem) -> ^String {
+ return msgSend(^String, self, "mnemonic")
+}
+@(objc_type=MenuItem, objc_name="setTitleWithMnemonic")
+MenuItem_setTitleWithMnemonic :: #force_inline proc "c" (self: ^MenuItem, stringWithAmpersand: ^String) {
+ msgSend(nil, self, "setTitleWithMnemonic:", stringWithAmpersand)
+}
+@(objc_type=MenuItem, objc_name="load", objc_is_class_method=true)
+MenuItem_load :: #force_inline proc "c" () {
+ msgSend(nil, MenuItem, "load")
+}
+@(objc_type=MenuItem, objc_name="initialize", objc_is_class_method=true)
+MenuItem_initialize :: #force_inline proc "c" () {
+ msgSend(nil, MenuItem, "initialize")
+}
+@(objc_type=MenuItem, objc_name="new", objc_is_class_method=true)
+MenuItem_new :: #force_inline proc "c" () -> ^MenuItem {
+ return msgSend(^MenuItem, MenuItem, "new")
+}
+@(objc_type=MenuItem, objc_name="allocWithZone", objc_is_class_method=true)
+MenuItem_allocWithZone :: #force_inline proc "c" (zone: ^Zone) -> ^MenuItem {
+ return msgSend(^MenuItem, MenuItem, "allocWithZone:", zone)
+}
+@(objc_type=MenuItem, objc_name="alloc", objc_is_class_method=true)
+MenuItem_alloc :: #force_inline proc "c" () -> ^MenuItem {
+ return msgSend(^MenuItem, MenuItem, "alloc")
+}
+@(objc_type=MenuItem, objc_name="copyWithZone", objc_is_class_method=true)
+MenuItem_copyWithZone :: #force_inline proc "c" (zone: ^Zone) -> id {
+ return msgSend(id, MenuItem, "copyWithZone:", zone)
+}
+@(objc_type=MenuItem, objc_name="mutableCopyWithZone", objc_is_class_method=true)
+MenuItem_mutableCopyWithZone :: #force_inline proc "c" (zone: ^Zone) -> id {
+ return msgSend(id, MenuItem, "mutableCopyWithZone:", zone)
+}
+@(objc_type=MenuItem, objc_name="instancesRespondToSelector", objc_is_class_method=true)
+MenuItem_instancesRespondToSelector :: #force_inline proc "c" (aSelector: SEL) -> bool {
+ return msgSend(bool, MenuItem, "instancesRespondToSelector:", aSelector)
+}
+@(objc_type=MenuItem, objc_name="conformsToProtocol", objc_is_class_method=true)
+MenuItem_conformsToProtocol :: #force_inline proc "c" (protocol: ^Protocol) -> bool {
+ return msgSend(bool, MenuItem, "conformsToProtocol:", protocol)
+}
+@(objc_type=MenuItem, objc_name="instanceMethodForSelector", objc_is_class_method=true)
+MenuItem_instanceMethodForSelector :: #force_inline proc "c" (aSelector: SEL) -> IMP {
+ return msgSend(IMP, MenuItem, "instanceMethodForSelector:", aSelector)
+}
+// @(objc_type=MenuItem, objc_name="instanceMethodSignatureForSelector", objc_is_class_method=true)
+// MenuItem_instanceMethodSignatureForSelector :: #force_inline proc "c" (aSelector: SEL) -> ^MethodSignature {
+// return msgSend(^MethodSignature, MenuItem, "instanceMethodSignatureForSelector:", aSelector)
+// }
+@(objc_type=MenuItem, objc_name="isSubclassOfClass", objc_is_class_method=true)
+MenuItem_isSubclassOfClass :: #force_inline proc "c" (aClass: Class) -> bool {
+ return msgSend(bool, MenuItem, "isSubclassOfClass:", aClass)
+}
+@(objc_type=MenuItem, objc_name="resolveClassMethod", objc_is_class_method=true)
+MenuItem_resolveClassMethod :: #force_inline proc "c" (sel: SEL) -> bool {
+ return msgSend(bool, MenuItem, "resolveClassMethod:", sel)
+}
+@(objc_type=MenuItem, objc_name="resolveInstanceMethod", objc_is_class_method=true)
+MenuItem_resolveInstanceMethod :: #force_inline proc "c" (sel: SEL) -> bool {
+ return msgSend(bool, MenuItem, "resolveInstanceMethod:", sel)
+}
+@(objc_type=MenuItem, objc_name="hash", objc_is_class_method=true)
+MenuItem_hash :: #force_inline proc "c" () -> UInteger {
+ return msgSend(UInteger, MenuItem, "hash")
+}
+@(objc_type=MenuItem, objc_name="superclass", objc_is_class_method=true)
+MenuItem_superclass :: #force_inline proc "c" () -> Class {
+ return msgSend(Class, MenuItem, "superclass")
+}
+@(objc_type=MenuItem, objc_name="class", objc_is_class_method=true)
+MenuItem_class :: #force_inline proc "c" () -> Class {
+ return msgSend(Class, MenuItem, "class")
+}
+@(objc_type=MenuItem, objc_name="description", objc_is_class_method=true)
+MenuItem_description :: #force_inline proc "c" () -> ^String {
+ return msgSend(^String, MenuItem, "description")
+}
+@(objc_type=MenuItem, objc_name="debugDescription", objc_is_class_method=true)
+MenuItem_debugDescription :: #force_inline proc "c" () -> ^String {
+ return msgSend(^String, MenuItem, "debugDescription")
+}
+@(objc_type=MenuItem, objc_name="version", objc_is_class_method=true)
+MenuItem_version :: #force_inline proc "c" () -> Integer {
+ return msgSend(Integer, MenuItem, "version")
+}
+@(objc_type=MenuItem, objc_name="setVersion", objc_is_class_method=true)
+MenuItem_setVersion :: #force_inline proc "c" (aVersion: Integer) {
+ msgSend(nil, MenuItem, "setVersion:", aVersion)
+}
+@(objc_type=MenuItem, objc_name="poseAsClass", objc_is_class_method=true)
+MenuItem_poseAsClass :: #force_inline proc "c" (aClass: Class) {
+ msgSend(nil, MenuItem, "poseAsClass:", aClass)
+}
+@(objc_type=MenuItem, objc_name="cancelPreviousPerformRequestsWithTarget_selector_object", objc_is_class_method=true)
+MenuItem_cancelPreviousPerformRequestsWithTarget_selector_object :: #force_inline proc "c" (aTarget: id, aSelector: SEL, anArgument: id) {
+ msgSend(nil, MenuItem, "cancelPreviousPerformRequestsWithTarget:selector:object:", aTarget, aSelector, anArgument)
+}
+@(objc_type=MenuItem, objc_name="cancelPreviousPerformRequestsWithTarget_", objc_is_class_method=true)
+MenuItem_cancelPreviousPerformRequestsWithTarget_ :: #force_inline proc "c" (aTarget: id) {
+ msgSend(nil, MenuItem, "cancelPreviousPerformRequestsWithTarget:", aTarget)
+}
+@(objc_type=MenuItem, objc_name="accessInstanceVariablesDirectly", objc_is_class_method=true)
+MenuItem_accessInstanceVariablesDirectly :: #force_inline proc "c" () -> bool {
+ return msgSend(bool, MenuItem, "accessInstanceVariablesDirectly")
+}
+@(objc_type=MenuItem, objc_name="useStoredAccessor", objc_is_class_method=true)
+MenuItem_useStoredAccessor :: #force_inline proc "c" () -> bool {
+ return msgSend(bool, MenuItem, "useStoredAccessor")
+}
+@(objc_type=MenuItem, objc_name="keyPathsForValuesAffectingValueForKey", objc_is_class_method=true)
+MenuItem_keyPathsForValuesAffectingValueForKey :: #force_inline proc "c" (key: ^String) -> ^Set {
+ return msgSend(^Set, MenuItem, "keyPathsForValuesAffectingValueForKey:", key)
+}
+@(objc_type=MenuItem, objc_name="automaticallyNotifiesObserversForKey", objc_is_class_method=true)
+MenuItem_automaticallyNotifiesObserversForKey :: #force_inline proc "c" (key: ^String) -> bool {
+ return msgSend(bool, MenuItem, "automaticallyNotifiesObserversForKey:", key)
+}
+@(objc_type=MenuItem, objc_name="setKeys", objc_is_class_method=true)
+MenuItem_setKeys :: #force_inline proc "c" (keys: ^Array, dependentKey: ^String) {
+ msgSend(nil, MenuItem, "setKeys:triggerChangeNotificationsForDependentKey:", keys, dependentKey)
+}
+@(objc_type=MenuItem, objc_name="classFallbacksForKeyedArchiver", objc_is_class_method=true)
+MenuItem_classFallbacksForKeyedArchiver :: #force_inline proc "c" () -> ^Array {
+ return msgSend(^Array, MenuItem, "classFallbacksForKeyedArchiver")
+}
+@(objc_type=MenuItem, objc_name="classForKeyedUnarchiver", objc_is_class_method=true)
+MenuItem_classForKeyedUnarchiver :: #force_inline proc "c" () -> Class {
+ return msgSend(Class, MenuItem, "classForKeyedUnarchiver")
+}
+@(objc_type=MenuItem, objc_name="exposeBinding", objc_is_class_method=true)
+MenuItem_exposeBinding :: #force_inline proc "c" (binding: ^String) {
+ msgSend(nil, MenuItem, "exposeBinding:", binding)
+}
+@(objc_type=MenuItem, objc_name="setDefaultPlaceholder", objc_is_class_method=true)
+MenuItem_setDefaultPlaceholder :: #force_inline proc "c" (placeholder: id, marker: id, binding: ^String) {
+ msgSend(nil, MenuItem, "setDefaultPlaceholder:forMarker:withBinding:", placeholder, marker, binding)
+}
+@(objc_type=MenuItem, objc_name="defaultPlaceholderForMarker", objc_is_class_method=true)
+MenuItem_defaultPlaceholderForMarker :: #force_inline proc "c" (marker: id, binding: ^String) -> id {
+ return msgSend(id, MenuItem, "defaultPlaceholderForMarker:withBinding:", marker, binding)
+}
+@(objc_type=MenuItem, objc_name="cancelPreviousPerformRequestsWithTarget")
+MenuItem_cancelPreviousPerformRequestsWithTarget :: proc {
+ MenuItem_cancelPreviousPerformRequestsWithTarget_selector_object,
+ MenuItem_cancelPreviousPerformRequestsWithTarget_,
+} \ No newline at end of file
diff --git a/core/sys/darwin/Foundation/NSWindow.odin b/core/sys/darwin/Foundation/NSWindow.odin
index 57ac2b6f6..f113dd3df 100644
--- a/core/sys/darwin/Foundation/NSWindow.odin
+++ b/core/sys/darwin/Foundation/NSWindow.odin
@@ -146,7 +146,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
return nil
}
if template.windowWillPositionSheetUsingRect != nil {
- windowWillPositionSheetUsingRect :: proc "c" (self: id, window: ^Window, sheet: ^Window, rect: Rect) -> Rect {
+ windowWillPositionSheetUsingRect :: proc "c" (self: id, cmd: SEL, window: ^Window, sheet: ^Window, rect: Rect) -> Rect {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.windowWillPositionSheetUsingRect(window, sheet, rect)
@@ -154,7 +154,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("window:willPositionSheet:usingRect:"), auto_cast windowWillPositionSheetUsingRect, _RECT_ENCODING+"@:@@"+_RECT_ENCODING)
}
if template.windowWillBeginSheet != nil {
- windowWillBeginSheet :: proc "c" (self: id, notification: ^Notification) {
+ windowWillBeginSheet :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowWillBeginSheet(notification)
@@ -162,7 +162,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowWillBeginSheet:"), auto_cast windowWillBeginSheet, "v@:@")
}
if template.windowDidEndSheet != nil {
- windowDidEndSheet :: proc "c" (self: id, notification: ^Notification) {
+ windowDidEndSheet :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidEndSheet(notification)
@@ -170,7 +170,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidEndSheet:"), auto_cast windowDidEndSheet, "v@:@")
}
if template.windowWillResizeToSize != nil {
- windowWillResizeToSize :: proc "c" (self: id, sender: ^Window, frameSize: Size) -> Size {
+ windowWillResizeToSize :: proc "c" (self: id, cmd: SEL, sender: ^Window, frameSize: Size) -> Size {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.windowWillResizeToSize(sender, frameSize)
@@ -178,7 +178,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowWillResize:toSize:"), auto_cast windowWillResizeToSize, _SIZE_ENCODING+"@:@"+_SIZE_ENCODING)
}
if template.windowDidResize != nil {
- windowDidResize :: proc "c" (self: id, notification: ^Notification) {
+ windowDidResize :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidResize(notification)
@@ -186,7 +186,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidResize:"), auto_cast windowDidResize, "v@:@")
}
if template.windowWillStartLiveResize != nil {
- windowWillStartLiveResize :: proc "c" (self: id, notification: ^Notification) {
+ windowWillStartLiveResize :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowWillStartLiveResize(notification)
@@ -194,7 +194,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowWillStartLiveResize:"), auto_cast windowWillStartLiveResize, "v@:@")
}
if template.windowDidEndLiveResize != nil {
- windowDidEndLiveResize :: proc "c" (self: id, notification: ^Notification) {
+ windowDidEndLiveResize :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidEndLiveResize(notification)
@@ -202,7 +202,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidEndLiveResize:"), auto_cast windowDidEndLiveResize, "v@:@")
}
if template.windowWillMiniaturize != nil {
- windowWillMiniaturize :: proc "c" (self: id, notification: ^Notification) {
+ windowWillMiniaturize :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowWillMiniaturize(notification)
@@ -210,7 +210,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowWillMiniaturize:"), auto_cast windowWillMiniaturize, "v@:@")
}
if template.windowDidMiniaturize != nil {
- windowDidMiniaturize :: proc "c" (self: id, notification: ^Notification) {
+ windowDidMiniaturize :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidMiniaturize(notification)
@@ -218,7 +218,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidMiniaturize:"), auto_cast windowDidMiniaturize, "v@:@")
}
if template.windowDidDeminiaturize != nil {
- windowDidDeminiaturize :: proc "c" (self: id, notification: ^Notification) {
+ windowDidDeminiaturize :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidDeminiaturize(notification)
@@ -226,7 +226,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidDeminiaturize:"), auto_cast windowDidDeminiaturize, "v@:@")
}
if template.windowWillUseStandardFrameDefaultFrame != nil {
- windowWillUseStandardFrameDefaultFrame :: proc(self: id, window: ^Window, newFrame: Rect) -> Rect {
+ windowWillUseStandardFrameDefaultFrame :: proc(self: id, cmd: SEL, window: ^Window, newFrame: Rect) -> Rect {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.windowWillUseStandardFrameDefaultFrame(window, newFrame)
@@ -234,7 +234,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowWillUseStandardFrame:defaultFrame:"), auto_cast windowWillUseStandardFrameDefaultFrame, _RECT_ENCODING+"@:@"+_RECT_ENCODING)
}
if template.windowShouldZoomToFrame != nil {
- windowShouldZoomToFrame :: proc "c" (self: id, window: ^Window, newFrame: Rect) -> BOOL {
+ windowShouldZoomToFrame :: proc "c" (self: id, cmd: SEL, window: ^Window, newFrame: Rect) -> BOOL {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.windowShouldZoomToFrame(window, newFrame)
@@ -242,7 +242,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowShouldZoom:toFrame:"), auto_cast windowShouldZoomToFrame, "B@:@"+_RECT_ENCODING)
}
if template.windowWillUseFullScreenContentSize != nil {
- windowWillUseFullScreenContentSize :: proc "c" (self: id, window: ^Window, proposedSize: Size) -> Size {
+ windowWillUseFullScreenContentSize :: proc "c" (self: id, cmd: SEL, window: ^Window, proposedSize: Size) -> Size {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.windowWillUseFullScreenContentSize(window, proposedSize)
@@ -250,7 +250,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("window:willUseFullScreenContentSize:"), auto_cast windowWillUseFullScreenContentSize, _SIZE_ENCODING+"@:@"+_SIZE_ENCODING)
}
if template.windowWillUseFullScreenPresentationOptions != nil {
- windowWillUseFullScreenPresentationOptions :: proc(self: id, window: ^Window, proposedOptions: ApplicationPresentationOptions) -> ApplicationPresentationOptions {
+ windowWillUseFullScreenPresentationOptions :: proc(self: id, cmd: SEL, window: ^Window, proposedOptions: ApplicationPresentationOptions) -> ApplicationPresentationOptions {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.windowWillUseFullScreenPresentationOptions(window, proposedOptions)
@@ -258,7 +258,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("window:willUseFullScreenPresentationOptions:"), auto_cast windowWillUseFullScreenPresentationOptions, _UINTEGER_ENCODING+"@:@"+_UINTEGER_ENCODING)
}
if template.windowWillEnterFullScreen != nil {
- windowWillEnterFullScreen :: proc "c" (self: id, notification: ^Notification) {
+ windowWillEnterFullScreen :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowWillEnterFullScreen(notification)
@@ -266,7 +266,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowWillEnterFullScreen:"), auto_cast windowWillEnterFullScreen, "v@:@")
}
if template.windowDidEnterFullScreen != nil {
- windowDidEnterFullScreen :: proc "c" (self: id, notification: ^Notification) {
+ windowDidEnterFullScreen :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidEnterFullScreen(notification)
@@ -274,7 +274,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidEnterFullScreen:"), auto_cast windowDidEnterFullScreen, "v@:@")
}
if template.windowWillExitFullScreen != nil {
- windowWillExitFullScreen :: proc "c" (self: id, notification: ^Notification) {
+ windowWillExitFullScreen :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowWillExitFullScreen(notification)
@@ -282,7 +282,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowWillExitFullScreen:"), auto_cast windowWillExitFullScreen, "v@:@")
}
if template.windowDidExitFullScreen != nil {
- windowDidExitFullScreen :: proc "c" (self: id, notification: ^Notification) {
+ windowDidExitFullScreen :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidExitFullScreen(notification)
@@ -290,7 +290,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidExitFullScreen:"), auto_cast windowDidExitFullScreen, "v@:@")
}
if template.customWindowsToEnterFullScreenForWindow != nil {
- customWindowsToEnterFullScreenForWindow :: proc "c" (self: id, window: ^Window) -> ^Array {
+ customWindowsToEnterFullScreenForWindow :: proc "c" (self: id, cmd: SEL, window: ^Window) -> ^Array {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.customWindowsToEnterFullScreenForWindow(window)
@@ -298,7 +298,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("customWindowsToEnterFullScreenForWindow:"), auto_cast customWindowsToEnterFullScreenForWindow, "@@:@")
}
if template.customWindowsToEnterFullScreenForWindowOnScreen != nil {
- customWindowsToEnterFullScreenForWindowOnScreen :: proc(self: id, window: ^Window, screen: ^Screen) -> ^Array {
+ customWindowsToEnterFullScreenForWindowOnScreen :: proc(self: id, cmd: SEL, window: ^Window, screen: ^Screen) -> ^Array {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.customWindowsToEnterFullScreenForWindowOnScreen(window, screen)
@@ -306,7 +306,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("customWindowsToEnterFullScreenForWindow:onScreen:"), auto_cast customWindowsToEnterFullScreenForWindowOnScreen, "@@:@@")
}
if template.windowStartCustomAnimationToEnterFullScreenWithDuration != nil {
- windowStartCustomAnimationToEnterFullScreenWithDuration :: proc "c" (self: id, window: ^Window, duration: TimeInterval) {
+ windowStartCustomAnimationToEnterFullScreenWithDuration :: proc "c" (self: id, cmd: SEL, window: ^Window, duration: TimeInterval) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowStartCustomAnimationToEnterFullScreenWithDuration(window, duration)
@@ -314,7 +314,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("window:startCustomAnimationToEnterFullScreenWithDuration:"), auto_cast windowStartCustomAnimationToEnterFullScreenWithDuration, "v@:@@")
}
if template.windowStartCustomAnimationToEnterFullScreenOnScreenWithDuration != nil {
- windowStartCustomAnimationToEnterFullScreenOnScreenWithDuration :: proc(self: id, window: ^Window, screen: ^Screen, duration: TimeInterval) {
+ windowStartCustomAnimationToEnterFullScreenOnScreenWithDuration :: proc(self: id, cmd: SEL, window: ^Window, screen: ^Screen, duration: TimeInterval) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowStartCustomAnimationToEnterFullScreenOnScreenWithDuration(window, screen, duration)
@@ -322,7 +322,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("window:startCustomAnimationToEnterFullScreenOnScreen:withDuration:"), auto_cast windowStartCustomAnimationToEnterFullScreenOnScreenWithDuration, "v@:@@d")
}
if template.windowDidFailToEnterFullScreen != nil {
- windowDidFailToEnterFullScreen :: proc "c" (self: id, window: ^Window) {
+ windowDidFailToEnterFullScreen :: proc "c" (self: id, cmd: SEL, window: ^Window) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidFailToEnterFullScreen(window)
@@ -330,7 +330,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidFailToEnterFullScreen:"), auto_cast windowDidFailToEnterFullScreen, "v@:@")
}
if template.customWindowsToExitFullScreenForWindow != nil {
- customWindowsToExitFullScreenForWindow :: proc "c" (self: id, window: ^Window) -> ^Array {
+ customWindowsToExitFullScreenForWindow :: proc "c" (self: id, cmd: SEL, window: ^Window) -> ^Array {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.customWindowsToExitFullScreenForWindow(window)
@@ -338,7 +338,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("customWindowsToExitFullScreenForWindow:"), auto_cast customWindowsToExitFullScreenForWindow, "@@:@")
}
if template.windowStartCustomAnimationToExitFullScreenWithDuration != nil {
- windowStartCustomAnimationToExitFullScreenWithDuration :: proc "c" (self: id, window: ^Window, duration: TimeInterval) {
+ windowStartCustomAnimationToExitFullScreenWithDuration :: proc "c" (self: id, cmd: SEL, window: ^Window, duration: TimeInterval) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowStartCustomAnimationToExitFullScreenWithDuration(window, duration)
@@ -346,7 +346,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("window:startCustomAnimationToExitFullScreenWithDuration:"), auto_cast windowStartCustomAnimationToExitFullScreenWithDuration, "v@:@d")
}
if template.windowDidFailToExitFullScreen != nil {
- windowDidFailToExitFullScreen :: proc "c" (self: id, window: ^Window) {
+ windowDidFailToExitFullScreen :: proc "c" (self: id, cmd: SEL, window: ^Window) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidFailToExitFullScreen(window)
@@ -354,7 +354,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidFailToExitFullScreen:"), auto_cast windowDidFailToExitFullScreen, "v@:@")
}
if template.windowWillMove != nil {
- windowWillMove :: proc "c" (self: id, notification: ^Notification) {
+ windowWillMove :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowWillMove(notification)
@@ -362,7 +362,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowWillMove:"), auto_cast windowWillMove, "v@:@")
}
if template.windowDidMove != nil {
- windowDidMove :: proc "c" (self: id, notification: ^Notification) {
+ windowDidMove :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidMove(notification)
@@ -370,7 +370,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidMove:"), auto_cast windowDidMove, "v@:@")
}
if template.windowDidChangeScreen != nil {
- windowDidChangeScreen :: proc "c" (self: id, notification: ^Notification) {
+ windowDidChangeScreen :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidChangeScreen(notification)
@@ -378,7 +378,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidChangeScreen:"), auto_cast windowDidChangeScreen, "v@:@")
}
if template.windowDidChangeScreenProfile != nil {
- windowDidChangeScreenProfile :: proc "c" (self: id, notification: ^Notification) {
+ windowDidChangeScreenProfile :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidChangeScreenProfile(notification)
@@ -386,7 +386,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidChangeScreenProfile:"), auto_cast windowDidChangeScreenProfile, "v@:@")
}
if template.windowDidChangeBackingProperties != nil {
- windowDidChangeBackingProperties :: proc "c" (self: id, notification: ^Notification) {
+ windowDidChangeBackingProperties :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidChangeBackingProperties(notification)
@@ -394,7 +394,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidChangeBackingProperties:"), auto_cast windowDidChangeBackingProperties, "v@:@")
}
if template.windowShouldClose != nil {
- windowShouldClose :: proc "c" (self:id, sender: ^Window) -> BOOL {
+ windowShouldClose :: proc "c" (self:id, cmd: SEL, sender: ^Window) -> BOOL {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.windowShouldClose(sender)
@@ -402,7 +402,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowShouldClose:"), auto_cast windowShouldClose, "B@:@")
}
if template.windowWillClose != nil {
- windowWillClose :: proc "c" (self:id, notification: ^Notification) {
+ windowWillClose :: proc "c" (self:id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowWillClose(notification)
@@ -410,7 +410,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowWillClose:"), auto_cast windowWillClose, "v@:@")
}
if template.windowDidBecomeKey != nil {
- windowDidBecomeKey :: proc "c" (self: id, notification: ^Notification) {
+ windowDidBecomeKey :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidBecomeKey(notification)
@@ -418,7 +418,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidBecomeKey:"), auto_cast windowDidBecomeKey, "v@:@")
}
if template.windowDidResignKey != nil {
- windowDidResignKey :: proc "c" (self: id, notification: ^Notification) {
+ windowDidResignKey :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidResignKey(notification)
@@ -426,7 +426,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidResignKey:"), auto_cast windowDidResignKey, "v@:@")
}
if template.windowDidBecomeMain != nil {
- windowDidBecomeMain :: proc "c" (self: id, notification: ^Notification) {
+ windowDidBecomeMain :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidBecomeMain(notification)
@@ -434,7 +434,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidBecomeMain:"), auto_cast windowDidBecomeMain, "v@:@")
}
if template.windowDidResignMain != nil {
- windowDidResignMain :: proc "c" (self: id, notification: ^Notification) {
+ windowDidResignMain :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidResignMain(notification)
@@ -442,7 +442,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidResignMain:"), auto_cast windowDidResignMain, "v@:@")
}
if template.windowWillReturnFieldEditorToObject != nil {
- windowWillReturnFieldEditorToObject :: proc "c" (self:id, sender: ^Window, client: id) -> id {
+ windowWillReturnFieldEditorToObject :: proc "c" (self:id, cmd: SEL, sender: ^Window, client: id) -> id {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.windowWillReturnFieldEditorToObject(sender, client)
@@ -450,7 +450,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowWillReturnFieldEditor:toObject:"), auto_cast windowWillReturnFieldEditorToObject, "@@:@@")
}
if template.windowDidUpdate != nil {
- windowDidUpdate :: proc "c" (self: id, notification: ^Notification) {
+ windowDidUpdate :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidUpdate(notification)
@@ -458,7 +458,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidUpdate:"), auto_cast windowDidUpdate, "v@:@")
}
if template.windowDidExpose != nil {
- windowDidExpose :: proc "c" (self: id, notification: ^Notification) {
+ windowDidExpose :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidExpose(notification)
@@ -466,7 +466,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidExpose:"), auto_cast windowDidExpose, "v@:@")
}
if template.windowDidChangeOcclusionState != nil {
- windowDidChangeOcclusionState :: proc "c" (self: id, notification: ^Notification) {
+ windowDidChangeOcclusionState :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidChangeOcclusionState(notification)
@@ -474,7 +474,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidChangeOcclusionState:"), auto_cast windowDidChangeOcclusionState, "v@:@")
}
if template.windowShouldDragDocumentWithEventFromWithPasteboard != nil {
- windowShouldDragDocumentWithEventFromWithPasteboard :: proc "c" (self: id, window: ^Window, event: ^Event, dragImageLocation: Point, pasteboard: ^Pasteboard) -> BOOL {
+ windowShouldDragDocumentWithEventFromWithPasteboard :: proc "c" (self: id, cmd: SEL, window: ^Window, event: ^Event, dragImageLocation: Point, pasteboard: ^Pasteboard) -> BOOL {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.windowShouldDragDocumentWithEventFromWithPasteboard(window, event, dragImageLocation, pasteboard)
@@ -482,7 +482,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("window:shouldDragDocumentWithEvent:from:withPasteboard:"), auto_cast windowShouldDragDocumentWithEventFromWithPasteboard, "B@:@@"+_POINT_ENCODING+"@")
}
if template.windowWillReturnUndoManager != nil {
- windowWillReturnUndoManager :: proc "c" (self: id, window: ^Window) -> ^UndoManager {
+ windowWillReturnUndoManager :: proc "c" (self: id, cmd: SEL, window: ^Window) -> ^UndoManager {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.windowWillReturnUndoManager(window)
@@ -490,7 +490,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowWillReturnUndoManager:"), auto_cast windowWillReturnUndoManager, "@@:@")
}
if template.windowShouldPopUpDocumentPathMenu != nil {
- windowShouldPopUpDocumentPathMenu :: proc "c" (self: id, window: ^Window, menu: ^Menu) -> BOOL {
+ windowShouldPopUpDocumentPathMenu :: proc "c" (self: id, cmd: SEL, window: ^Window, menu: ^Menu) -> BOOL {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.windowShouldPopUpDocumentPathMenu(window, menu)
@@ -498,7 +498,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("window:shouldPopUpDocumentPathMenu:"), auto_cast windowShouldPopUpDocumentPathMenu, "B@:@@")
}
if template.windowWillEncodeRestorableState != nil {
- windowWillEncodeRestorableState :: proc "c" (self: id, window: ^Window, state: ^Coder) {
+ windowWillEncodeRestorableState :: proc "c" (self: id, cmd: SEL, window: ^Window, state: ^Coder) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowWillEncodeRestorableState(window, state)
@@ -506,7 +506,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("window:willEncodeRestorableState:"), auto_cast windowWillEncodeRestorableState, "v@:@@")
}
if template.windowDidEncodeRestorableState != nil {
- windowDidEncodeRestorableState :: proc "c" (self: id, window: ^Window, state: ^Coder) {
+ windowDidEncodeRestorableState :: proc "c" (self: id, cmd: SEL, window: ^Window, state: ^Coder) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidEncodeRestorableState(window, state)
@@ -514,7 +514,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("window:didDecodeRestorableState:"), auto_cast windowDidEncodeRestorableState, "v@:@@")
}
if template.windowWillResizeForVersionBrowserWithMaxPreferredSizeMaxAllowedSize != nil {
- windowWillResizeForVersionBrowserWithMaxPreferredSizeMaxAllowedSize :: proc "c" (self: id, window: ^Window, maxPreferredFrameSize: Size, maxAllowedFrameSize: Size) -> Size {
+ windowWillResizeForVersionBrowserWithMaxPreferredSizeMaxAllowedSize :: proc "c" (self: id, cmd: SEL, window: ^Window, maxPreferredFrameSize: Size, maxAllowedFrameSize: Size) -> Size {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
return del.windowWillResizeForVersionBrowserWithMaxPreferredSizeMaxAllowedSize(window, maxPreferredFrameSize, maxPreferredFrameSize)
@@ -522,7 +522,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("window:willResizeForVersionBrowserWithMaxPreferredSize:maxAllowedSize:"), auto_cast windowWillResizeForVersionBrowserWithMaxPreferredSizeMaxAllowedSize, _SIZE_ENCODING+"@:@"+_SIZE_ENCODING+_SIZE_ENCODING)
}
if template.windowWillEnterVersionBrowser != nil {
- windowWillEnterVersionBrowser :: proc "c" (self: id, notification: ^Notification) {
+ windowWillEnterVersionBrowser :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowWillEnterVersionBrowser(notification)
@@ -530,7 +530,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowWillEnterVersionBrowser:"), auto_cast windowWillEnterVersionBrowser, "v@:@")
}
if template.windowDidEnterVersionBrowser != nil {
- windowDidEnterVersionBrowser :: proc "c" (self: id, notification: ^Notification) {
+ windowDidEnterVersionBrowser :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidEnterVersionBrowser(notification)
@@ -538,7 +538,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowDidEnterVersionBrowser:"), auto_cast windowDidEnterVersionBrowser, "v@:@")
}
if template.windowWillExitVersionBrowser != nil {
- windowWillExitVersionBrowser :: proc "c" (self: id, notification: ^Notification) {
+ windowWillExitVersionBrowser :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowWillExitVersionBrowser(notification)
@@ -546,7 +546,7 @@ window_delegate_register_and_alloc :: proc(template: WindowDelegateTemplate, cla
class_addMethod(class, intrinsics.objc_find_selector("windowWillExitVersionBrowser:"), auto_cast windowWillExitVersionBrowser, "v@:@")
}
if template.windowDidExitVersionBrowser != nil {
- windowDidExitVersionBrowser :: proc "c" (self: id, notification: ^Notification) {
+ windowDidExitVersionBrowser :: proc "c" (self: id, cmd: SEL, notification: ^Notification) {
del := cast(^_WindowDelegateInternal)object_getIndexedIvars(self)
context = del._context
del.windowDidExitVersionBrowser(notification)
@@ -780,4 +780,4 @@ Window_performWindowDragWithEvent :: proc "c" (self: ^Window, event: ^Event) {
@(objc_type=Window, objc_name="setToolbar")
Window_setToolbar :: proc "c" (self: ^Window, toolbar: ^Toolbar) {
msgSend(nil, self, "setToolbar:", toolbar)
-} \ No newline at end of file
+}
diff --git a/core/sys/darwin/Foundation/objc_helper.odin b/core/sys/darwin/Foundation/objc_helper.odin
new file mode 100644
index 000000000..0748d700b
--- /dev/null
+++ b/core/sys/darwin/Foundation/objc_helper.odin
@@ -0,0 +1,136 @@
+package objc_Foundation
+
+import "base:runtime"
+import "base:intrinsics"
+
+Subclasser_Proc :: proc(cls: Class, vtable: rawptr)
+
+Object_VTable_Info :: struct {
+ vtable: rawptr,
+ size: uint,
+ impl: Subclasser_Proc,
+}
+
+Class_VTable_Info :: struct {
+ _context: runtime.Context,
+ super_vtable: rawptr,
+ protocol_vtable: rawptr,
+}
+
+@(require_results)
+class_get_metaclass :: #force_inline proc "contextless" (cls: Class) -> Class {
+ return (^Class)(cls)^
+}
+
+@(require_results)
+object_get_vtable_info :: proc "contextless" (obj: id) -> ^Class_VTable_Info {
+ return (^Class_VTable_Info)(object_getIndexedIvars(obj))
+}
+
+@(require_results)
+make_subclasser :: #force_inline proc(vtable: ^$T, impl: proc(cls: Class, vt: ^T)) -> Object_VTable_Info {
+ return Object_VTable_Info{
+ vtable = vtable,
+ size = size_of(T),
+ impl = (Subclasser_Proc)(impl),
+ }
+}
+
+@(require_results)
+register_subclass :: proc(
+ class_name: cstring,
+ superclass: Class,
+ superclass_overrides: Maybe(Object_VTable_Info) = nil,
+ protocol: Maybe(Object_VTable_Info) = nil,
+ _context: Maybe(runtime.Context) = nil,
+) -> Class {
+ assert(superclass != nil)
+
+ super_size: uint
+ proto_size: uint
+
+ if superclass_overrides != nil {
+ // Align to 8-byte boundary
+ super_size = (superclass_overrides.?.size + 7)/8 * 8
+ }
+
+ if protocol != nil {
+ // Align to 8-byte boundary
+ proto_size = (protocol.?.size + 7)/8 * 8
+ }
+
+ cls := objc_lookUpClass(class_name)
+ if cls != nil {
+ return cls
+ }
+
+ extra_size := uint(size_of(Class_VTable_Info)) + 8 + super_size + proto_size
+
+ cls = objc_allocateClassPair(superclass, class_name, extra_size)
+ assert(cls != nil)
+
+ if s, ok := superclass_overrides.?; ok {
+ s.impl(cls, s.vtable)
+ }
+
+ if p, ok := protocol.?; ok {
+ p.impl(cls, p.vtable)
+ }
+
+ objc_registerClassPair(cls)
+ meta_cls := class_get_metaclass(cls)
+ meta_size := uint(class_getInstanceSize(meta_cls))
+
+ // Offsets are always aligned to 8-byte boundary
+ info_offset := (meta_size + 7) / 8 * 8
+ super_vtable_offset := (info_offset + size_of(Class_VTable_Info) + 7) / 8 * 8
+ ptoto_vtable_offset := super_vtable_offset + super_size
+
+
+ p_info := (^Class_VTable_Info)(([^]u8)(cls)[info_offset:])
+ p_super_vtable := ([^]u8)(cls)[super_vtable_offset:]
+ p_proto_vtable := ([^]u8)(cls)[ptoto_vtable_offset:]
+
+ intrinsics.mem_zero(p_info, size_of(Class_VTable_Info))
+
+ // Assign the context
+ p_info._context = _context.? or_else context
+
+ if s, ok := superclass_overrides.?; ok {
+ p_info.super_vtable = p_super_vtable
+ intrinsics.mem_copy(p_super_vtable, s.vtable, super_size)
+ }
+ if p, ok := protocol.?; ok {
+ p_info.protocol_vtable = p_proto_vtable
+ intrinsics.mem_copy(p_proto_vtable, p.vtable, p.size)
+ }
+
+ return cls
+}
+
+@(require_results)
+class_get_vtable_info :: proc "contextless" (cls: Class) -> ^Class_VTable_Info {
+ meta_cls := class_get_metaclass(cls)
+ meta_size := uint(class_getInstanceSize(meta_cls))
+
+ // Align to 8-byte boundary
+ info_offset := (meta_size+7) / 8 * 8
+
+ p_cls := ([^]u8)(cls)[info_offset:]
+ ctx := (^Class_VTable_Info)(p_cls)
+ return ctx
+}
+
+@(require_results)
+alloc_user_object :: proc "contextless" (cls: Class, _context: Maybe(runtime.Context) = nil) -> id {
+ info := class_get_vtable_info(cls)
+
+ obj := class_createInstance(cls, size_of(Class_VTable_Info))
+ obj_info := (^Class_VTable_Info)(object_getIndexedIvars(obj))
+ obj_info^ = info^
+
+ if _context != nil {
+ obj_info._context = _context.?
+ }
+ return obj
+} \ No newline at end of file
diff --git a/core/sys/darwin/copyfile.odin b/core/sys/darwin/copyfile.odin
new file mode 100644
index 000000000..6c58b8067
--- /dev/null
+++ b/core/sys/darwin/copyfile.odin
@@ -0,0 +1,67 @@
+package darwin
+
+import "core:sys/posix"
+
+copyfile_state_t :: distinct rawptr
+
+copyfile_flags :: bit_set[enum {
+ ACL,
+ STAT,
+ XATTR,
+ DATA,
+
+ RECURSIVE = 15,
+
+ CHECK,
+ EXCL,
+ NOFOLLOW_SRC,
+ NOFOLLOW_DST,
+ MOVE,
+ UNLINK,
+ PACK,
+ UNPACK,
+
+ CLONE,
+ CLONE_FORCE,
+ RUN_IN_PLACE,
+ DATA_SPARSE,
+ PRESERVE_DST_TRACKED,
+ VERBOSE = 30,
+}; u32]
+
+COPYFILE_SECURITY :: copyfile_flags{.STAT, .ACL}
+COPYFILE_METADATA :: COPYFILE_SECURITY + copyfile_flags{.XATTR}
+COPYFILE_ALL :: COPYFILE_METADATA + copyfile_flags{.DATA}
+
+COPYFILE_NOFOLLOW :: copyfile_flags{.NOFOLLOW_SRC, .NOFOLLOW_DST}
+
+copyfile_state_flag :: enum u32 {
+ SRC_FD = 1,
+ SRC_FILENAME,
+ DST_FD,
+ DST_FILENAME,
+ QUARANTINE,
+ STATUS_CB,
+ STATUS_CTX,
+ COPIED,
+ XATTRNAME,
+ WAS_CLONED,
+ SRC_BSIZE,
+ DST_BSIZE,
+ BSIZE,
+ FORBID_CROSS_MOUNT,
+ NOCPROTECT,
+ PRESERVE_SUID,
+ RECURSIVE_SRC_FTSENT,
+ FORBID_DST_EXISTING_SYMLINKS,
+}
+
+foreign system {
+ copyfile :: proc(from, to: cstring, state: copyfile_state_t, flags: copyfile_flags) -> i32 ---
+ fcopyfile :: proc(from, to: posix.FD, state: copyfile_state_t, flags: copyfile_flags) -> i32 ---
+
+ copyfile_state_alloc :: proc() -> copyfile_state_t ---
+ copyfile_state_free :: proc(state: copyfile_state_t) -> posix.result ---
+ copyfile_state_get :: proc(state: copyfile_state_t, flag: copyfile_state_flag, dst: rawptr) -> posix.result ---
+ copyfile_state_set :: proc(state: copyfile_state_t, flag: copyfile_state_flag, src: rawptr) -> posix.result ---
+}
diff --git a/core/sys/darwin/darwin.odin b/core/sys/darwin/darwin.odin
index d109f5544..96cfc7be6 100644
--- a/core/sys/darwin/darwin.odin
+++ b/core/sys/darwin/darwin.odin
@@ -3,6 +3,7 @@ package darwin
import "core:c"
+@(export)
foreign import system "system:System.framework"
Bool :: b8
diff --git a/core/sys/darwin/sync.odin b/core/sys/darwin/sync.odin
index 58fc7c9e4..6d68dc8f8 100644
--- a/core/sys/darwin/sync.odin
+++ b/core/sys/darwin/sync.odin
@@ -1,7 +1,5 @@
package darwin
-foreign import system "system:System.framework"
-
// #define OS_WAIT_ON_ADDR_AVAILABILITY \
// __API_AVAILABLE(macos(14.4), ios(17.4), tvos(17.4), watchos(10.4))
when ODIN_OS == .Darwin {
diff --git a/core/sys/darwin/xnu_system_call_wrappers.odin b/core/sys/darwin/xnu_system_call_wrappers.odin
index 97a527e9f..43bcb543b 100644
--- a/core/sys/darwin/xnu_system_call_wrappers.odin
+++ b/core/sys/darwin/xnu_system_call_wrappers.odin
@@ -19,16 +19,6 @@ X_OK :: c.int((1 << 0)) /* test for execute or search permission */
W_OK :: c.int((1 << 1)) /* test for write permission */
R_OK :: c.int((1 << 2)) /* test for read permission */
-/* copyfile flags */
-COPYFILE_ACL :: (1 << 0)
-COPYFILE_STAT :: (1 << 1)
-COPYFILE_XATTR :: (1 << 2)
-COPYFILE_DATA :: (1 << 3)
-
-COPYFILE_SECURITY :: (COPYFILE_STAT | COPYFILE_ACL)
-COPYFILE_METADATA :: (COPYFILE_SECURITY | COPYFILE_XATTR)
-COPYFILE_ALL :: (COPYFILE_METADATA | COPYFILE_DATA)
-
/* syslimits.h */
PATH_MAX :: 1024 /* max bytes in pathname */
@@ -290,6 +280,10 @@ syscall_lseek :: #force_inline proc "contextless" (fd: c.int, offset: i64, whenc
return cast(i64)intrinsics.syscall(unix_offset_syscall(.lseek), uintptr(fd), uintptr(offset), uintptr(whence))
}
+syscall_ioctl :: #force_inline proc "contextless" (fd: c.int, request: u32, arg: rawptr) -> c.int {
+ return (cast(c.int)intrinsics.syscall(unix_offset_syscall(.ioctl), uintptr(fd), uintptr(request), uintptr(arg)))
+}
+
syscall_gettid :: #force_inline proc "contextless" () -> u64 {
return cast(u64)intrinsics.syscall(unix_offset_syscall(.gettid))
}
diff --git a/core/sys/es/api.odin b/core/sys/es/api.odin
index 4cf64b748..ae1a1a8bb 100644
--- a/core/sys/es/api.odin
+++ b/core/sys/es/api.odin
@@ -8,564 +8,564 @@ ElementPublic :: struct {
instance : ^INSTANCE_TYPE,
flags : u64 ,
}
-Generic :: rawptr;
-INSTANCE_TYPE :: Instance;
-Element :: ElementPublic;
-Panel :: Element;
-Window :: Element;
-Scrollbar :: Element;
-Button :: Element;
-TextDisplay :: Element;
-IconDisplay :: Element;
-Textbox :: Element;
-ListView :: Element;
-Menu :: Element;
-Choice :: Element;
-ColorWell :: Element;
-Splitter :: Element;
-ImageDisplay :: Element;
-TextPlan :: rawptr;
-Store :: rawptr;
-PaintTarget :: rawptr;
-DirectoryMonitor :: rawptr;
-NodeType :: u8 ;
-Error :: int ;
-Handle :: uint ;
-Response :: i32;
-FileOffset :: u64 ;
-FileOffsetDifference :: i64 ;
-AudioDeviceID :: u64 ;
-SCANCODE_A :: (0x04);
-SCANCODE_B :: (0x05);
-SCANCODE_C :: (0x06);
-SCANCODE_D :: (0x07);
-SCANCODE_E :: (0x08);
-SCANCODE_F :: (0x09);
-SCANCODE_G :: (0x0A);
-SCANCODE_H :: (0x0B);
-SCANCODE_I :: (0x0C);
-SCANCODE_J :: (0x0D);
-SCANCODE_K :: (0x0E);
-SCANCODE_L :: (0x0F);
-SCANCODE_M :: (0x10);
-SCANCODE_N :: (0x11);
-SCANCODE_O :: (0x12);
-SCANCODE_P :: (0x13);
-SCANCODE_Q :: (0x14);
-SCANCODE_R :: (0x15);
-SCANCODE_S :: (0x16);
-SCANCODE_T :: (0x17);
-SCANCODE_U :: (0x18);
-SCANCODE_V :: (0x19);
-SCANCODE_W :: (0x1A);
-SCANCODE_X :: (0x1B);
-SCANCODE_Y :: (0x1C);
-SCANCODE_Z :: (0x1D);
-SCANCODE_1 :: (0x1E);
-SCANCODE_2 :: (0x1F);
-SCANCODE_3 :: (0x20);
-SCANCODE_4 :: (0x21);
-SCANCODE_5 :: (0x22);
-SCANCODE_6 :: (0x23);
-SCANCODE_7 :: (0x24);
-SCANCODE_8 :: (0x25);
-SCANCODE_9 :: (0x26);
-SCANCODE_0 :: (0x27);
-SCANCODE_ENTER :: (0x28);
-SCANCODE_ESCAPE :: (0x29);
-SCANCODE_BACKSPACE :: (0x2A);
-SCANCODE_TAB :: (0x2B);
-SCANCODE_SPACE :: (0x2C);
-SCANCODE_HYPHEN :: (0x2D);
-SCANCODE_EQUALS :: (0x2E);
-SCANCODE_LEFT_BRACE :: (0x2F);
-SCANCODE_RIGHT_BRACE :: (0x30);
-SCANCODE_COMMA :: (0x36);
-SCANCODE_PERIOD :: (0x37);
-SCANCODE_SLASH :: (0x38);
-SCANCODE_PUNCTUATION_1 :: (0x31) ;
-SCANCODE_PUNCTUATION_2 :: (0x32) ;
-SCANCODE_PUNCTUATION_3 :: (0x33) ;
-SCANCODE_PUNCTUATION_4 :: (0x34) ;
-SCANCODE_PUNCTUATION_5 :: (0x35) ;
-SCANCODE_PUNCTUATION_6 :: (0x64) ;
-SCANCODE_F1 :: (0x3A);
-SCANCODE_F2 :: (0x3B);
-SCANCODE_F3 :: (0x3C);
-SCANCODE_F4 :: (0x3D);
-SCANCODE_F5 :: (0x3E);
-SCANCODE_F6 :: (0x3F);
-SCANCODE_F7 :: (0x40);
-SCANCODE_F8 :: (0x41);
-SCANCODE_F9 :: (0x42);
-SCANCODE_F10 :: (0x43);
-SCANCODE_F11 :: (0x44);
-SCANCODE_F12 :: (0x45);
-SCANCODE_F13 :: (0x68);
-SCANCODE_F14 :: (0x69);
-SCANCODE_F15 :: (0x6A);
-SCANCODE_F16 :: (0x6B);
-SCANCODE_F17 :: (0x6C);
-SCANCODE_F18 :: (0x6D);
-SCANCODE_F19 :: (0x6E);
-SCANCODE_F20 :: (0x6F);
-SCANCODE_F21 :: (0x70);
-SCANCODE_F22 :: (0x71);
-SCANCODE_F23 :: (0x72);
-SCANCODE_F24 :: (0x73);
-SCANCODE_CAPS_LOCK :: (0x39);
-SCANCODE_PRINT_SCREEN :: (0x46);
-SCANCODE_SCROLL_LOCK :: (0x47);
-SCANCODE_PAUSE :: (0x48);
-SCANCODE_INSERT :: (0x49);
-SCANCODE_HOME :: (0x4A);
-SCANCODE_PAGE_UP :: (0x4B);
-SCANCODE_DELETE :: (0x4C);
-SCANCODE_END :: (0x4D);
-SCANCODE_PAGE_DOWN :: (0x4E);
-SCANCODE_RIGHT_ARROW :: (0x4F);
-SCANCODE_LEFT_ARROW :: (0x50);
-SCANCODE_DOWN_ARROW :: (0x51);
-SCANCODE_UP_ARROW :: (0x52);
-SCANCODE_NUM_LOCK :: (0x53);
-SCANCODE_CONTEXT_MENU :: (0x65);
-SCANCODE_SYSTEM_REQUEST :: (0x9A);
-SCANCODE_ACTION_EXECUTE :: (0x74);
-SCANCODE_ACTION_HELP :: (0x75);
-SCANCODE_ACTION_MENU :: (0x76);
-SCANCODE_ACTION_SELECT :: (0x77);
-SCANCODE_ACTION_STOP :: (0x78);
-SCANCODE_ACTION_AGAIN :: (0x79);
-SCANCODE_ACTION_UNDO :: (0x7A);
-SCANCODE_ACTION_CUT :: (0x7B);
-SCANCODE_ACTION_COPY :: (0x7C);
-SCANCODE_ACTION_PASTE :: (0x7D);
-SCANCODE_ACTION_FIND :: (0x7E);
-SCANCODE_ACTION_CANCEL :: (0x9B);
-SCANCODE_ACTION_CLEAR :: (0x9C);
-SCANCODE_ACTION_PRIOR :: (0x9D);
-SCANCODE_ACTION_RETURN :: (0x9E);
-SCANCODE_ACTION_SEPARATOR :: (0x9F);
-SCANCODE_MM_MUTE :: (0x7F);
-SCANCODE_MM_LOUDER :: (0x80);
-SCANCODE_MM_QUIETER :: (0x81);
-SCANCODE_MM_NEXT :: (0x103);
-SCANCODE_MM_PREVIOUS :: (0x104);
-SCANCODE_MM_STOP :: (0x105);
-SCANCODE_MM_PAUSE :: (0x106);
-SCANCODE_MM_SELECT :: (0x107);
-SCANCODE_MM_EMAIL :: (0x108);
-SCANCODE_MM_CALC :: (0x109);
-SCANCODE_MM_FILES :: (0x10A);
-SCANCODE_INTERNATIONAL_1 :: (0x87);
-SCANCODE_INTERNATIONAL_2 :: (0x88);
-SCANCODE_INTERNATIONAL_3 :: (0x89);
-SCANCODE_INTERNATIONAL_4 :: (0x8A);
-SCANCODE_INTERNATIONAL_5 :: (0x8B);
-SCANCODE_INTERNATIONAL_6 :: (0x8C);
-SCANCODE_INTERNATIONAL_7 :: (0x8D);
-SCANCODE_INTERNATIONAL_8 :: (0x8E);
-SCANCODE_INTERNATIONAL_9 :: (0x8F);
-SCANCODE_HANGUL_ENGLISH_TOGGLE :: (0x90);
-SCANCODE_HANJA_CONVERSION :: (0x91);
-SCANCODE_KATAKANA :: (0x92);
-SCANCODE_HIRAGANA :: (0x93);
-SCANCODE_HANKAKU_ZENKAKU_TOGGLE :: (0x94);
-SCANCODE_ALTERNATE_ERASE :: (0x99);
-SCANCODE_THOUSANDS_SEPARATOR :: (0xB2);
-SCANCODE_DECIMAL_SEPARATOR :: (0xB3);
-SCANCODE_CURRENCY_UNIT :: (0xB4);
-SCANCODE_CURRENCY_SUBUNIT :: (0xB5);
-SCANCODE_NUM_DIVIDE :: (0x54);
-SCANCODE_NUM_MULTIPLY :: (0x55);
-SCANCODE_NUM_SUBTRACT :: (0x56);
-SCANCODE_NUM_ADD :: (0x57);
-SCANCODE_NUM_ENTER :: (0x58);
-SCANCODE_NUM_1 :: (0x59);
-SCANCODE_NUM_2 :: (0x5A);
-SCANCODE_NUM_3 :: (0x5B);
-SCANCODE_NUM_4 :: (0x5C);
-SCANCODE_NUM_5 :: (0x5D);
-SCANCODE_NUM_6 :: (0x5E);
-SCANCODE_NUM_7 :: (0x5F);
-SCANCODE_NUM_8 :: (0x60);
-SCANCODE_NUM_9 :: (0x61);
-SCANCODE_NUM_0 :: (0x62);
-SCANCODE_NUM_POINT :: (0x63);
-SCANCODE_NUM_EQUALS :: (0x67);
-SCANCODE_NUM_COMMA :: (0x82);
-SCANCODE_NUM_00 :: (0xB0);
-SCANCODE_NUM_000 :: (0xB1);
-SCANCODE_NUM_LEFT_PAREN :: (0xB6);
-SCANCODE_NUM_RIGHT_PAREN :: (0xB7);
-SCANCODE_NUM_LEFT_BRACE :: (0xB8);
-SCANCODE_NUM_RIGHT_BRACE :: (0xB9);
-SCANCODE_NUM_TAB :: (0xBA);
-SCANCODE_NUM_BACKSPACE :: (0xBB);
-SCANCODE_NUM_A :: (0xBC);
-SCANCODE_NUM_B :: (0xBD);
-SCANCODE_NUM_C :: (0xBE);
-SCANCODE_NUM_D :: (0xBF);
-SCANCODE_NUM_E :: (0xC0);
-SCANCODE_NUM_F :: (0xC1);
-SCANCODE_NUM_XOR :: (0xC2);
-SCANCODE_NUM_CARET :: (0xC3);
-SCANCODE_NUM_PERCENT :: (0xC4);
-SCANCODE_NUM_LESS_THAN :: (0xC5);
-SCANCODE_NUM_GREATER_THAN :: (0xC6);
-SCANCODE_NUM_AMPERSAND :: (0xC7);
-SCANCODE_NUM_DOUBLE_AMPERSAND :: (0xC8);
-SCANCODE_NUM_BAR :: (0xC9);
-SCANCODE_NUM_DOUBLE_BAR :: (0xCA);
-SCANCODE_NUM_COLON :: (0xCB);
-SCANCODE_NUM_HASH :: (0xCC);
-SCANCODE_NUM_SPACE :: (0xCD);
-SCANCODE_NUM_AT :: (0xCE);
-SCANCODE_NUM_EXCLAMATION_MARK :: (0xCF);
-SCANCODE_NUM_MEMORY_STORE :: (0xD0);
-SCANCODE_NUM_MEMORY_RECALL :: (0xD1);
-SCANCODE_NUM_MEMORY_CLEAR :: (0xD2);
-SCANCODE_NUM_MEMORY_ADD :: (0xD3);
-SCANCODE_NUM_MEMORY_SUBTRACT :: (0xD4);
-SCANCODE_NUM_MEMORY_MULTIPLY :: (0xD5);
-SCANCODE_NUM_MEMORY_DIVIDE :: (0xD6);
-SCANCODE_NUM_NEGATE :: (0xD7);
-SCANCODE_NUM_CLEAR_ALL :: (0xD8);
-SCANCODE_NUM_CLEAR :: (0xD9);
-SCANCODE_NUM_BINARY :: (0xDA);
-SCANCODE_NUM_OCTAL :: (0xDB);
-SCANCODE_NUM_DECIMAL :: (0xDC);
-SCANCODE_NUM_HEXADECIMAL :: (0xDD);
-SCANCODE_LEFT_CTRL :: (0xE0);
-SCANCODE_LEFT_SHIFT :: (0xE1);
-SCANCODE_LEFT_ALT :: (0xE2);
-SCANCODE_LEFT_FLAG :: (0xE3);
-SCANCODE_RIGHT_CTRL :: (0xE4);
-SCANCODE_RIGHT_SHIFT :: (0xE5);
-SCANCODE_RIGHT_ALT :: (0xE6);
-SCANCODE_RIGHT_FLAG :: (0xE7);
-SCANCODE_ACPI_POWER :: (0x100);
-SCANCODE_ACPI_SLEEP :: (0x101);
-SCANCODE_ACPI_WAKE :: (0x102);
-SCANCODE_WWW_SEARCH :: (0x10B);
-SCANCODE_WWW_HOME :: (0x10C);
-SCANCODE_WWW_BACK :: (0x10D);
-SCANCODE_WWW_FORWARD :: (0x10E);
-SCANCODE_WWW_STOP :: (0x10F);
-SCANCODE_WWW_REFRESH :: (0x110);
-SCANCODE_WWW_STARRED :: (0x111);
-PROCESS_STATE_ALL_THREADS_TERMINATED :: (1);
-PROCESS_STATE_TERMINATING :: (2);
-PROCESS_STATE_CRASHED :: (4);
-PROCESS_STATE_PINGED :: (8);
-FLAGS_DEFAULT :: (0);
-SUCCESS :: (-1);
-ERROR_BUFFER_TOO_SMALL :: (-2);
-ERROR_UNKNOWN :: (-7);
-ERROR_NO_MESSAGES_AVAILABLE :: (-9);
-ERROR_MESSAGE_QUEUE_FULL :: (-10);
-ERROR_PATH_NOT_WITHIN_MOUNTED_VOLUME :: (-14);
-ERROR_PATH_NOT_TRAVERSABLE :: (-15);
-ERROR_FILE_ALREADY_EXISTS :: (-19);
-ERROR_FILE_DOES_NOT_EXIST :: (-20);
-ERROR_DRIVE_ERROR_FILE_DAMAGED :: (-21) ;
-ERROR_ACCESS_NOT_WITHIN_FILE_BOUNDS :: (-22) ;
-ERROR_FILE_PERMISSION_NOT_GRANTED :: (-23);
-ERROR_FILE_IN_EXCLUSIVE_USE :: (-24);
-ERROR_FILE_CANNOT_GET_EXCLUSIVE_USE :: (-25);
-ERROR_INCORRECT_NODE_TYPE :: (-26);
-ERROR_EVENT_NOT_SET :: (-27);
-ERROR_FILE_HAS_WRITERS :: (-28);
-ERROR_TIMEOUT_REACHED :: (-29);
-ERROR_FILE_ON_READ_ONLY_VOLUME :: (-32);
-ERROR_INVALID_DIMENSIONS :: (-34);
-ERROR_DRIVE_CONTROLLER_REPORTED :: (-35);
-ERROR_COULD_NOT_ISSUE_PACKET :: (-36);
-ERROR_HANDLE_TABLE_FULL :: (-37);
-ERROR_COULD_NOT_RESIZE_FILE :: (-38);
-ERROR_DIRECTORY_NOT_EMPTY :: (-39);
-ERROR_NODE_DELETED :: (-41);
-ERROR_VOLUME_MISMATCH :: (-43);
-ERROR_TARGET_WITHIN_SOURCE :: (-44);
-ERROR_TARGET_INVALID_TYPE :: (-45);
-ERROR_MALFORMED_NODE_PATH :: (-47);
-ERROR_OUT_OF_CACHE_RESOURCES :: (-48);
-ERROR_TARGET_IS_SOURCE :: (-49);
-ERROR_INVALID_NAME :: (-50);
-ERROR_CORRUPT_DATA :: (-51);
-ERROR_INSUFFICIENT_RESOURCES :: (-52);
-ERROR_UNSUPPORTED_FEATURE :: (-53);
-ERROR_FILE_TOO_FRAGMENTED :: (-54);
-ERROR_DRIVE_FULL :: (-55);
-ERROR_COULD_NOT_RESOLVE_SYMBOL :: (-56);
-ERROR_ALREADY_EMBEDDED :: (-57);
-ERROR_EVENT_SINK_OVERFLOW :: (-58);
-ERROR_EVENT_SINK_DUPLICATE :: (-59);
-ERROR_UNSUPPORTED_CONVERSION :: (-60);
-ERROR_SOURCE_EMPTY :: (-61);
-ERROR_UNSUPPORTED_EXECUTABLE :: (-62);
-ERROR_NO_ADDRESS_FOR_DOMAIN_NAME :: (-63);
-ERROR_NO_CONNECTED_NETWORK_INTERFACES :: (-64);
-ERROR_BAD_DOMAIN_NAME :: (-65);
-ERROR_LOST_IP_ADDRESS :: (-66);
-ERROR_CONNECTION_RESET :: (-67);
-ERROR_CONNECTION_REFUSED :: (-68);
-SYSTEM_CONSTANT_TIME_STAMP_UNITS_PER_MICROSECOND :: (0);
-SYSTEM_CONSTANT_NO_FANCY_GRAPHICS :: (1);
-SYSTEM_CONSTANT_REPORTED_PROBLEMS :: (2);
-SYSTEM_CONSTANT_RIGHT_TO_LEFT :: (3);
-SYSTEM_CONSTANT_WINDOW_INSET :: (4);
-SYSTEM_CONSTANT_CONTAINER_TAB_BAND_HEIGHT :: (5);
-INVALID_HANDLE :: (( Handle) (0));
-CURRENT_THREAD :: (( Handle) (0x10));
-CURRENT_PROCESS :: (( Handle) (0x11));
-DRAW_ALPHA_OVERWRITE :: (0x100);
-DRAW_ALPHA_FULL :: (0x200) ;
-WAIT_NO_TIMEOUT :: (-1);
-MAX_WAIT_COUNT :: (8);
-MAX_EVENT_FORWARD_COUNT :: (4) ;
-MAX_EVENT_SINK_BUFFER_SIZE :: (256) ;
-MAX_DIRECTORY_CHILD_NAME_LENGTH :: (256);
-PROCESS_EXECUTABLE_NOT_LOADED :: (0);
-PROCESS_EXECUTABLE_FAILED_TO_LOAD :: (1);
-PROCESS_EXECUTABLE_LOADED :: (2);
-SNAPSHOT_MAX_PROCESS_NAME_LENGTH :: (80);
-SYSTEM_SNAPSHOT_PROCESSES :: (1);
-SYSTEM_SNAPSHOT_DRIVES :: (2);
-HANDLED :: (0);
-NOT_HANDLED :: (-1);
-REJECTED :: (-2);
-SHARED_MEMORY_NAME_MAX_LENGTH :: (32);
-MAP_OBJECT_ALL :: (0);
-TEXT_H_LEFT :: (1);
-TEXT_H_RIGHT :: (2);
-TEXT_H_CENTER :: (3);
-TEXT_V_TOP :: (4);
-TEXT_V_BOTTOM :: (8);
-TEXT_V_CENTER :: (12);
-TEXT_WRAP :: (16);
-TEXT_ELLIPSIS :: (32);
-NODE_ACCESS_READ_SHARED :: (0x1) ;
-NODE_ACCESS_READ :: (0x2) ;
-NODE_ACCESS_WRITE :: (0x4) ;
-NODE_ACCESS_WRITE_EXCLUSIVE :: (0x8) ;
-NODE_FILE :: (0);
-NODE_DIRECTORY :: (0x10);
-NODE_INVALID :: (0x20);
-NODE_FAIL_IF_FOUND :: (0x1000);
-NODE_FAIL_IF_NOT_FOUND :: (0x2000);
-NODE_PREVENT_RESIZE :: (0x4000);
-NODE_CREATE_DIRECTORIES :: (0x8000) ;
-NODE_POSIX_NAMESPACE :: (0x10000) ;
-_ES_NODE_FROM_WRITE_EXCLUSIVE :: (0x20000);
-DIRECTORY_CHILDREN_UNKNOWN :: (( FileOffsetDifference) (-1));
-MEMORY_OPEN_FAIL_IF_FOUND :: (0x1000);
-MEMORY_OPEN_FAIL_IF_NOT_FOUND :: (0x2000);
-MAP_OBJECT_READ_WRITE :: (0);
-MAP_OBJECT_READ_ONLY :: (1);
-MAP_OBJECT_COPY_ON_WRITE :: (2);
-STRING_FORMAT_ENOUGH_SPACE :: ( (-1));
-STRING_FORMAT_SIMPLE :: (1 << 0);
-POSIX_SYSCALL_GET_POSIX_FD_PATH :: (0x10000);
-PERMISSION_ACCESS_SYSTEM_FILES :: (1 << 0);
-PERMISSION_ACCESS_USER_FILES :: (1 << 1);
-PERMISSION_PROCESS_CREATE :: (1 << 2);
-PERMISSION_PROCESS_OPEN :: (1 << 3);
-PERMISSION_SCREEN_MODIFY :: (1 << 4) ;
-PERMISSION_SHUTDOWN :: (1 << 5);
-PERMISSION_TAKE_SYSTEM_SNAPSHOT :: (1 << 6);
-PERMISSION_WINDOW_OPEN :: (1 << 7);
-PERMISSION_ALL :: ( (-1));
-PERMISSION_INHERIT :: ( (1) << 63);
-PANEL_STYLE_DEFAULT :: "Panel.Default";
-PANEL_STYLE_TRANSPARENT :: "Panel.Transparent";
-PANEL_STYLE_WINDOW_BACKGROUND :: "Panel.WindowBackground";
-PANEL_STYLE_WINDOW_DIVIDER :: "Panel.WindowDivider";
-PANEL_STYLE_SHEET :: "Panel.Sheet";
-PANEL_STYLE_GROUP_BOX :: "Panel.GroupBox";
-PANEL_STYLE_INDENT :: "Panel.Indent";
-PANEL_BAND_SIZE_DEFAULT :: (-1);
-ELEMENT_FOCUSABLE :: ( (1) << 32);
-ELEMENT_HIDDEN :: ( (1) << 33) ;
-ELEMENT_DISABLED :: ( (1) << 34) ;
-ELEMENT_DEBUG :: ( (1) << 35) ;
-ELEMENT_SCROLL_X :: ( (1) << 36);
-ELEMENT_SCROLL_Y :: ( (1) << 37);
-ELEMENT_NO_HOVER :: ( (1) << 38) ;
-ELEMENT_BLOCK_FOCUS :: ( (1) << 39) ;
-ELEMENT_NOT_TAB_TRAVERSABLE :: ( (1) << 40) ;
-ELEMENT_NO_INFORM_PARENT :: ( (1) << 41) ;
-ELEMENT_CENTER_ACCESS_KEY_HINT :: ( (1) << 42) ;
-ELEMENT_LAYOUT_HINT_HORIZONTAL :: ( (1) << 43) ;
-ELEMENT_STICKY_ACCESS_KEY :: ( (1) << 44) ;
-CELL_NEW_BAND :: ( (1) << 51);
-CELL_COLLAPSABLE :: ( (1) << 51);
-CELL_H_PUSH :: ( (1) << 54);
-CELL_H_EXPAND :: ( (1) << 55);
-CELL_H_SHRINK :: ( (1) << 56);
-CELL_H_LEFT :: ( (1) << 57);
-CELL_H_RIGHT :: ( (1) << 58);
-CELL_V_PUSH :: ( (1) << 59);
-CELL_V_EXPAND :: ( (1) << 60);
-CELL_V_SHRINK :: ( (1) << 61);
-CELL_V_TOP :: ( (1) << 62);
-CELL_V_BOTTOM :: ( (1) << 63);
-PANEL_VERTICAL :: (0x0001);
-PANEL_WRAP :: (0x0002);
-PANEL_TABLE :: (0x0004);
-PANEL_Z_STACK :: (0x0008);
-PANEL_H_LEFT :: (0x0010);
-PANEL_H_RIGHT :: (0x0020);
-PANEL_H_CENTER :: (0x0040);
-PANEL_H_JUSTIFY :: (0x0080);
-PANEL_V_TOP :: (0x0100);
-PANEL_V_BOTTOM :: (0x0200);
-PANEL_V_CENTER :: (0x0400);
-PANEL_V_JUSTIFY :: (0x0800);
-PANEL_H_SCROLL :: (0x1000);
-PANEL_V_SCROLL :: (0x2000);
-PANEL_SWITCHER :: (0x4000);
-TEXTBOX_MULTILINE :: (1 << 0);
-TEXTBOX_EDIT_BASED :: (1 << 1);
-TEXTBOX_COMPACT :: (1 << 2);
-TEXTBOX_NO_SMART_CONTEXT_MENUS :: (1 << 3);
-TEXTBOX_FIND_BACKWARDS :: (1 << 0);
-BUTTON_DEFAULT :: (1 << 0);
-BUTTON_DANGEROUS :: (1 << 1);
-BUTTON_MENU_ITEM :: (1 << 2);
-BUTTON_NOT_FOCUSABLE :: (1 << 3);
-BUTTON_TOOLBAR :: (1 << 4);
-BUTTON_DROPDOWN :: (1 << 5);
-BUTTON_COMPACT :: (1 << 6);
-MENU_ITEM_HEADER :: (1 << 7);
-BUTTON_CHECKBOX :: (1 << 8);
-BUTTON_RADIOBOX :: (1 << 9);
-BUTTON_CANCEL :: (1 << 10);
-BUTTON_PUSH :: (1 << 11);
-COLOR_WELL_HAS_OPACITY :: (1 << 0);
-SCROLLBAR_VERTICAL :: (0 << 0);
-SCROLLBAR_HORIZONTAL :: (1 << 0);
-SPLITTER_VERTICAL :: (0 << 0);
-SPLITTER_HORIZONTAL :: (1 << 0);
-IMAGE_DISPLAY_LOAD_ASYNCHRONOUSLY :: (1 << 0);
-IMAGE_DISPLAY_UNLOAD_WHEN_HIDDEN :: (1 << 1);
-IMAGE_DISPLAY_UPSCALE_NEAREST :: (1 << 2);
-IMAGE_DISPLAY_DOWNSCALE_NEAREST :: (1 << 3);
-IMAGE_DISPLAY_OPAQUE :: (1 << 4);
-LIST_VIEW_HORIZONTAL :: (1 << 0) ;
-LIST_VIEW_VARIABLE_SIZE :: (1 << 1) ;
-LIST_VIEW_TILED :: (1 << 2) ;
-LIST_VIEW_NON_LINEAR :: (1 << 3) ;
-LIST_VIEW_SINGLE_SELECT :: (1 << 4) ;
-LIST_VIEW_MULTI_SELECT :: (1 << 5) ;
-LIST_VIEW_COLUMNS :: (1 << 6) ;
-LIST_VIEW_GROUP_HAS_HEADER :: (1 << 0) ;
-LIST_VIEW_GROUP_HAS_FOOTER :: (1 << 1) ;
-LIST_VIEW_GROUP_INDENT :: (1 << 2) ;
-LIST_VIEW_GROUP_COLLAPSABLE :: (1 << 3) ;
-LIST_VIEW_COLUMN_RIGHT_ALIGNED :: (1 << 0) ;
-LIST_VIEW_COLUMN_ASCENDING :: (1 << 1) ;
-LIST_VIEW_COLUMN_DESCENDING :: (1 << 2) ;
-LIST_VIEW_COLUMN_HAS_MENU :: (1 << 3) ;
-MENU_AT_CURSOR :: (1 << 0);
-MENU_MAXIMUM_HEIGHT :: (1 << 1);
-FONT_SANS :: (0xFFFF);
-FONT_SERIF :: (0xFFFE);
-FONT_MONOSPACED :: (0xFFFD);
-FONT_REGULAR :: (4);
-FONT_BOLD :: (7);
-TEXT_FIGURE_DEFAULT :: (0);
-TEXT_FIGURE_OLD :: (1);
-TEXT_FIGURE_TABULAR :: (2);
-TEXT_DISPLAY_CONTENT_MAX_VALUES :: (8);
-DIRECTORY_MONITOR_SUBTREE :: (1 << 0) ;
-DIRECTORY_MONITOR_CONTENTS :: (1 << 1) ;
-DIRECTORY_MONITOR_MODIFY :: (1 << 2) ;
-COMMAND_SYSTEM_START :: (0xF0000000);
-COMMAND_DELETE :: (0xF0000001);
-COMMAND_SELECT_ALL :: (0xF0000002);
-COMMAND_CUT :: (0xF0000003);
-COMMAND_COPY :: (0xF0000004);
-COMMAND_PASTE :: (0xF0000005);
-AUDIO_STREAM_OVERRUN :: (1 << 0);
-AUDIO_STREAM_UNDERRUN :: (1 << 0);
-AUDIO_STREAM_FORMAT_CHANGED :: (1 << 1);
-AUDIO_STREAM_TERMINATED :: (1 << 2);
-AUDIO_STREAM_RUNNING :: (1 << 0);
-AUDIO_STREAM_MUTED :: (1 << 1);
-AUDIO_STREAM_ONESHOT :: (1 << 2);
-AUDIO_DEFAULT_OUTPUT :: (1);
-SAMPLE_FORMAT_U8 :: (1);
-SAMPLE_FORMAT_S16LE :: (2);
-SAMPLE_FORMAT_S32LE :: (3);
-SAMPLE_FORMAT_F32LE :: (4) ;
-CELL_FILL :: ( CELL_H_FILL | CELL_V_FILL);
-CELL_H_FILL :: ( CELL_H_PUSH | CELL_H_EXPAND | CELL_H_SHRINK);
-CELL_V_FILL :: ( CELL_V_PUSH | CELL_V_EXPAND | CELL_V_SHRINK);
-CELL_CENTER :: ( CELL_H_CENTER | CELL_V_CENTER);
-CELL_PUSH :: ( CELL_H_PUSH | CELL_V_PUSH);
-CELL_EXPAND :: ( CELL_H_EXPAND | CELL_V_EXPAND);
-CELL_CORNER :: ( CELL_H_LEFT | CELL_V_TOP);
-CELL_SHRINK :: ( CELL_H_SHRINK | CELL_V_SHRINK);
-CELL_H_CENTER :: ( CELL_H_LEFT | CELL_H_RIGHT);
-CELL_V_CENTER :: ( CELL_V_TOP | CELL_V_BOTTOM);
-THEME_METRICS_INSETS :: (1 << 0);
-THEME_METRICS_CLIP_INSETS :: (1 << 1);
-THEME_METRICS_GLOBAL_OFFSET :: (1 << 2) ;
-THEME_METRICS_CLIP_ENABLED :: (1 << 3);
-THEME_METRICS_CURSOR :: (1 << 4);
-THEME_METRICS_ENTRANCE_TRANSITION :: (1 << 5);
-THEME_METRICS_EXIT_TRANSITION :: (1 << 6);
-THEME_METRICS_ENTRANCE_DURATION :: (1 << 7);
-THEME_METRICS_EXIT_DURATION :: (1 << 8);
-THEME_METRICS_PREFERRED_WIDTH :: (1 << 9);
-THEME_METRICS_PREFERRED_HEIGHT :: (1 << 10);
-THEME_METRICS_MINIMUM_WIDTH :: (1 << 11);
-THEME_METRICS_MINIMUM_HEIGHT :: (1 << 12);
-THEME_METRICS_MAXIMUM_WIDTH :: (1 << 13);
-THEME_METRICS_MAXIMUM_HEIGHT :: (1 << 14);
-THEME_METRICS_GAP_MAJOR :: (1 << 15);
-THEME_METRICS_GAP_MINOR :: (1 << 16);
-THEME_METRICS_GAP_WRAP :: (1 << 17);
-THEME_METRICS_GAP_ALL :: ( THEME_METRICS_GAP_MAJOR | THEME_METRICS_GAP_MINOR | THEME_METRICS_GAP_WRAP);
-THEME_METRICS_TEXT_COLOR :: (1 << 18);
-THEME_METRICS_SELECTED_BACKGROUND :: (1 << 19);
-THEME_METRICS_SELECTED_TEXT :: (1 << 20);
-THEME_METRICS_ICON_COLOR :: (1 << 21);
-THEME_METRICS_TEXT_ALIGN :: (1 << 22);
-THEME_METRICS_TEXT_SIZE :: (1 << 23);
-THEME_METRICS_FONT_FAMILY :: (1 << 24);
-THEME_METRICS_FONT_WEIGHT :: (1 << 25);
-THEME_METRICS_ICON_SIZE :: (1 << 26);
-THEME_METRICS_IS_ITALIC :: (1 << 27);
-THEME_METRICS_ELLIPSIS :: (1 << 28);
-THEME_METRICS_WRAP_TEXT :: (1 << 29);
-MOVE_WINDOW_MAXIMISED :: (1 << 0);
-MOVE_WINDOW_ADJUST_TO_FIT_SCREEN :: (1 << 1);
-MOVE_WINDOW_HIDDEN :: (1 << 2);
-MOVE_WINDOW_ALWAYS_ON_TOP :: (1 << 3);
-MOVE_WINDOW_AT_BOTTOM :: (1 << 4);
-MOVE_WINDOW_UPDATE_SCREEN :: (1 << 5);
-WINDOW_SOLID_TRUE :: (1 << 0);
-WINDOW_SOLID_NO_ACTIVATE :: (1 << 1);
-THEME_BITMAP_WIDTH :: (400);
-THEME_BITMAP_HEIGHT :: (200);
-THEME_BITMAP_NAME :: "Desktop.ThemeBitmap";
-TEXTBOX_MOVE_CARET_SINGLE :: (2);
-TEXTBOX_MOVE_CARET_WORD :: (3);
-TEXTBOX_MOVE_CARET_LINE :: (4);
-TEXTBOX_MOVE_CARET_VERTICAL :: (5);
-TEXTBOX_MOVE_CARET_ALL :: (6);
-TEXTBOX_MOVE_CARET_FIRST_ONLY :: (1 << 8);
-TEXTBOX_MOVE_CARET_SECOND_ONLY :: (1 << 9);
-TEXTBOX_MOVE_CARET_BACKWARDS :: (1 << 10);
-TEXTBOX_MOVE_CARET_STRONG_WHITESPACE :: (1 << 11);
-GAME_CONTROLLER_MAX_COUNT :: (16);
-DOMAIN_NAME_MAX_LENGTH :: (255);
-ECHO_REQUEST_MAX_LENGTH :: (48);
-CONNECTION_OPEN_WAIT :: (1 << 0);
-FILE_CONTROL_NOTIFY_MONITORS :: (1 << 0);
-FILE_CONTROL_FLUSH :: (1 << 1);
+Generic :: rawptr
+INSTANCE_TYPE :: Instance
+Element :: ElementPublic
+Panel :: Element
+Window :: Element
+Scrollbar :: Element
+Button :: Element
+TextDisplay :: Element
+IconDisplay :: Element
+Textbox :: Element
+ListView :: Element
+Menu :: Element
+Choice :: Element
+ColorWell :: Element
+Splitter :: Element
+ImageDisplay :: Element
+TextPlan :: rawptr
+Store :: rawptr
+PaintTarget :: rawptr
+DirectoryMonitor :: rawptr
+NodeType :: u8
+Error :: int
+Handle :: uint
+Response :: i32
+FileOffset :: u64
+FileOffsetDifference :: i64
+AudioDeviceID :: u64
+SCANCODE_A :: (0x04)
+SCANCODE_B :: (0x05)
+SCANCODE_C :: (0x06)
+SCANCODE_D :: (0x07)
+SCANCODE_E :: (0x08)
+SCANCODE_F :: (0x09)
+SCANCODE_G :: (0x0A)
+SCANCODE_H :: (0x0B)
+SCANCODE_I :: (0x0C)
+SCANCODE_J :: (0x0D)
+SCANCODE_K :: (0x0E)
+SCANCODE_L :: (0x0F)
+SCANCODE_M :: (0x10)
+SCANCODE_N :: (0x11)
+SCANCODE_O :: (0x12)
+SCANCODE_P :: (0x13)
+SCANCODE_Q :: (0x14)
+SCANCODE_R :: (0x15)
+SCANCODE_S :: (0x16)
+SCANCODE_T :: (0x17)
+SCANCODE_U :: (0x18)
+SCANCODE_V :: (0x19)
+SCANCODE_W :: (0x1A)
+SCANCODE_X :: (0x1B)
+SCANCODE_Y :: (0x1C)
+SCANCODE_Z :: (0x1D)
+SCANCODE_1 :: (0x1E)
+SCANCODE_2 :: (0x1F)
+SCANCODE_3 :: (0x20)
+SCANCODE_4 :: (0x21)
+SCANCODE_5 :: (0x22)
+SCANCODE_6 :: (0x23)
+SCANCODE_7 :: (0x24)
+SCANCODE_8 :: (0x25)
+SCANCODE_9 :: (0x26)
+SCANCODE_0 :: (0x27)
+SCANCODE_ENTER :: (0x28)
+SCANCODE_ESCAPE :: (0x29)
+SCANCODE_BACKSPACE :: (0x2A)
+SCANCODE_TAB :: (0x2B)
+SCANCODE_SPACE :: (0x2C)
+SCANCODE_HYPHEN :: (0x2D)
+SCANCODE_EQUALS :: (0x2E)
+SCANCODE_LEFT_BRACE :: (0x2F)
+SCANCODE_RIGHT_BRACE :: (0x30)
+SCANCODE_COMMA :: (0x36)
+SCANCODE_PERIOD :: (0x37)
+SCANCODE_SLASH :: (0x38)
+SCANCODE_PUNCTUATION_1 :: (0x31)
+SCANCODE_PUNCTUATION_2 :: (0x32)
+SCANCODE_PUNCTUATION_3 :: (0x33)
+SCANCODE_PUNCTUATION_4 :: (0x34)
+SCANCODE_PUNCTUATION_5 :: (0x35)
+SCANCODE_PUNCTUATION_6 :: (0x64)
+SCANCODE_F1 :: (0x3A)
+SCANCODE_F2 :: (0x3B)
+SCANCODE_F3 :: (0x3C)
+SCANCODE_F4 :: (0x3D)
+SCANCODE_F5 :: (0x3E)
+SCANCODE_F6 :: (0x3F)
+SCANCODE_F7 :: (0x40)
+SCANCODE_F8 :: (0x41)
+SCANCODE_F9 :: (0x42)
+SCANCODE_F10 :: (0x43)
+SCANCODE_F11 :: (0x44)
+SCANCODE_F12 :: (0x45)
+SCANCODE_F13 :: (0x68)
+SCANCODE_F14 :: (0x69)
+SCANCODE_F15 :: (0x6A)
+SCANCODE_F16 :: (0x6B)
+SCANCODE_F17 :: (0x6C)
+SCANCODE_F18 :: (0x6D)
+SCANCODE_F19 :: (0x6E)
+SCANCODE_F20 :: (0x6F)
+SCANCODE_F21 :: (0x70)
+SCANCODE_F22 :: (0x71)
+SCANCODE_F23 :: (0x72)
+SCANCODE_F24 :: (0x73)
+SCANCODE_CAPS_LOCK :: (0x39)
+SCANCODE_PRINT_SCREEN :: (0x46)
+SCANCODE_SCROLL_LOCK :: (0x47)
+SCANCODE_PAUSE :: (0x48)
+SCANCODE_INSERT :: (0x49)
+SCANCODE_HOME :: (0x4A)
+SCANCODE_PAGE_UP :: (0x4B)
+SCANCODE_DELETE :: (0x4C)
+SCANCODE_END :: (0x4D)
+SCANCODE_PAGE_DOWN :: (0x4E)
+SCANCODE_RIGHT_ARROW :: (0x4F)
+SCANCODE_LEFT_ARROW :: (0x50)
+SCANCODE_DOWN_ARROW :: (0x51)
+SCANCODE_UP_ARROW :: (0x52)
+SCANCODE_NUM_LOCK :: (0x53)
+SCANCODE_CONTEXT_MENU :: (0x65)
+SCANCODE_SYSTEM_REQUEST :: (0x9A)
+SCANCODE_ACTION_EXECUTE :: (0x74)
+SCANCODE_ACTION_HELP :: (0x75)
+SCANCODE_ACTION_MENU :: (0x76)
+SCANCODE_ACTION_SELECT :: (0x77)
+SCANCODE_ACTION_STOP :: (0x78)
+SCANCODE_ACTION_AGAIN :: (0x79)
+SCANCODE_ACTION_UNDO :: (0x7A)
+SCANCODE_ACTION_CUT :: (0x7B)
+SCANCODE_ACTION_COPY :: (0x7C)
+SCANCODE_ACTION_PASTE :: (0x7D)
+SCANCODE_ACTION_FIND :: (0x7E)
+SCANCODE_ACTION_CANCEL :: (0x9B)
+SCANCODE_ACTION_CLEAR :: (0x9C)
+SCANCODE_ACTION_PRIOR :: (0x9D)
+SCANCODE_ACTION_RETURN :: (0x9E)
+SCANCODE_ACTION_SEPARATOR :: (0x9F)
+SCANCODE_MM_MUTE :: (0x7F)
+SCANCODE_MM_LOUDER :: (0x80)
+SCANCODE_MM_QUIETER :: (0x81)
+SCANCODE_MM_NEXT :: (0x103)
+SCANCODE_MM_PREVIOUS :: (0x104)
+SCANCODE_MM_STOP :: (0x105)
+SCANCODE_MM_PAUSE :: (0x106)
+SCANCODE_MM_SELECT :: (0x107)
+SCANCODE_MM_EMAIL :: (0x108)
+SCANCODE_MM_CALC :: (0x109)
+SCANCODE_MM_FILES :: (0x10A)
+SCANCODE_INTERNATIONAL_1 :: (0x87)
+SCANCODE_INTERNATIONAL_2 :: (0x88)
+SCANCODE_INTERNATIONAL_3 :: (0x89)
+SCANCODE_INTERNATIONAL_4 :: (0x8A)
+SCANCODE_INTERNATIONAL_5 :: (0x8B)
+SCANCODE_INTERNATIONAL_6 :: (0x8C)
+SCANCODE_INTERNATIONAL_7 :: (0x8D)
+SCANCODE_INTERNATIONAL_8 :: (0x8E)
+SCANCODE_INTERNATIONAL_9 :: (0x8F)
+SCANCODE_HANGUL_ENGLISH_TOGGLE :: (0x90)
+SCANCODE_HANJA_CONVERSION :: (0x91)
+SCANCODE_KATAKANA :: (0x92)
+SCANCODE_HIRAGANA :: (0x93)
+SCANCODE_HANKAKU_ZENKAKU_TOGGLE :: (0x94)
+SCANCODE_ALTERNATE_ERASE :: (0x99)
+SCANCODE_THOUSANDS_SEPARATOR :: (0xB2)
+SCANCODE_DECIMAL_SEPARATOR :: (0xB3)
+SCANCODE_CURRENCY_UNIT :: (0xB4)
+SCANCODE_CURRENCY_SUBUNIT :: (0xB5)
+SCANCODE_NUM_DIVIDE :: (0x54)
+SCANCODE_NUM_MULTIPLY :: (0x55)
+SCANCODE_NUM_SUBTRACT :: (0x56)
+SCANCODE_NUM_ADD :: (0x57)
+SCANCODE_NUM_ENTER :: (0x58)
+SCANCODE_NUM_1 :: (0x59)
+SCANCODE_NUM_2 :: (0x5A)
+SCANCODE_NUM_3 :: (0x5B)
+SCANCODE_NUM_4 :: (0x5C)
+SCANCODE_NUM_5 :: (0x5D)
+SCANCODE_NUM_6 :: (0x5E)
+SCANCODE_NUM_7 :: (0x5F)
+SCANCODE_NUM_8 :: (0x60)
+SCANCODE_NUM_9 :: (0x61)
+SCANCODE_NUM_0 :: (0x62)
+SCANCODE_NUM_POINT :: (0x63)
+SCANCODE_NUM_EQUALS :: (0x67)
+SCANCODE_NUM_COMMA :: (0x82)
+SCANCODE_NUM_00 :: (0xB0)
+SCANCODE_NUM_000 :: (0xB1)
+SCANCODE_NUM_LEFT_PAREN :: (0xB6)
+SCANCODE_NUM_RIGHT_PAREN :: (0xB7)
+SCANCODE_NUM_LEFT_BRACE :: (0xB8)
+SCANCODE_NUM_RIGHT_BRACE :: (0xB9)
+SCANCODE_NUM_TAB :: (0xBA)
+SCANCODE_NUM_BACKSPACE :: (0xBB)
+SCANCODE_NUM_A :: (0xBC)
+SCANCODE_NUM_B :: (0xBD)
+SCANCODE_NUM_C :: (0xBE)
+SCANCODE_NUM_D :: (0xBF)
+SCANCODE_NUM_E :: (0xC0)
+SCANCODE_NUM_F :: (0xC1)
+SCANCODE_NUM_XOR :: (0xC2)
+SCANCODE_NUM_CARET :: (0xC3)
+SCANCODE_NUM_PERCENT :: (0xC4)
+SCANCODE_NUM_LESS_THAN :: (0xC5)
+SCANCODE_NUM_GREATER_THAN :: (0xC6)
+SCANCODE_NUM_AMPERSAND :: (0xC7)
+SCANCODE_NUM_DOUBLE_AMPERSAND :: (0xC8)
+SCANCODE_NUM_BAR :: (0xC9)
+SCANCODE_NUM_DOUBLE_BAR :: (0xCA)
+SCANCODE_NUM_COLON :: (0xCB)
+SCANCODE_NUM_HASH :: (0xCC)
+SCANCODE_NUM_SPACE :: (0xCD)
+SCANCODE_NUM_AT :: (0xCE)
+SCANCODE_NUM_EXCLAMATION_MARK :: (0xCF)
+SCANCODE_NUM_MEMORY_STORE :: (0xD0)
+SCANCODE_NUM_MEMORY_RECALL :: (0xD1)
+SCANCODE_NUM_MEMORY_CLEAR :: (0xD2)
+SCANCODE_NUM_MEMORY_ADD :: (0xD3)
+SCANCODE_NUM_MEMORY_SUBTRACT :: (0xD4)
+SCANCODE_NUM_MEMORY_MULTIPLY :: (0xD5)
+SCANCODE_NUM_MEMORY_DIVIDE :: (0xD6)
+SCANCODE_NUM_NEGATE :: (0xD7)
+SCANCODE_NUM_CLEAR_ALL :: (0xD8)
+SCANCODE_NUM_CLEAR :: (0xD9)
+SCANCODE_NUM_BINARY :: (0xDA)
+SCANCODE_NUM_OCTAL :: (0xDB)
+SCANCODE_NUM_DECIMAL :: (0xDC)
+SCANCODE_NUM_HEXADECIMAL :: (0xDD)
+SCANCODE_LEFT_CTRL :: (0xE0)
+SCANCODE_LEFT_SHIFT :: (0xE1)
+SCANCODE_LEFT_ALT :: (0xE2)
+SCANCODE_LEFT_FLAG :: (0xE3)
+SCANCODE_RIGHT_CTRL :: (0xE4)
+SCANCODE_RIGHT_SHIFT :: (0xE5)
+SCANCODE_RIGHT_ALT :: (0xE6)
+SCANCODE_RIGHT_FLAG :: (0xE7)
+SCANCODE_ACPI_POWER :: (0x100)
+SCANCODE_ACPI_SLEEP :: (0x101)
+SCANCODE_ACPI_WAKE :: (0x102)
+SCANCODE_WWW_SEARCH :: (0x10B)
+SCANCODE_WWW_HOME :: (0x10C)
+SCANCODE_WWW_BACK :: (0x10D)
+SCANCODE_WWW_FORWARD :: (0x10E)
+SCANCODE_WWW_STOP :: (0x10F)
+SCANCODE_WWW_REFRESH :: (0x110)
+SCANCODE_WWW_STARRED :: (0x111)
+PROCESS_STATE_ALL_THREADS_TERMINATED :: (1)
+PROCESS_STATE_TERMINATING :: (2)
+PROCESS_STATE_CRASHED :: (4)
+PROCESS_STATE_PINGED :: (8)
+FLAGS_DEFAULT :: (0)
+SUCCESS :: (-1)
+ERROR_BUFFER_TOO_SMALL :: (-2)
+ERROR_UNKNOWN :: (-7)
+ERROR_NO_MESSAGES_AVAILABLE :: (-9)
+ERROR_MESSAGE_QUEUE_FULL :: (-10)
+ERROR_PATH_NOT_WITHIN_MOUNTED_VOLUME :: (-14)
+ERROR_PATH_NOT_TRAVERSABLE :: (-15)
+ERROR_FILE_ALREADY_EXISTS :: (-19)
+ERROR_FILE_DOES_NOT_EXIST :: (-20)
+ERROR_DRIVE_ERROR_FILE_DAMAGED :: (-21)
+ERROR_ACCESS_NOT_WITHIN_FILE_BOUNDS :: (-22)
+ERROR_FILE_PERMISSION_NOT_GRANTED :: (-23)
+ERROR_FILE_IN_EXCLUSIVE_USE :: (-24)
+ERROR_FILE_CANNOT_GET_EXCLUSIVE_USE :: (-25)
+ERROR_INCORRECT_NODE_TYPE :: (-26)
+ERROR_EVENT_NOT_SET :: (-27)
+ERROR_FILE_HAS_WRITERS :: (-28)
+ERROR_TIMEOUT_REACHED :: (-29)
+ERROR_FILE_ON_READ_ONLY_VOLUME :: (-32)
+ERROR_INVALID_DIMENSIONS :: (-34)
+ERROR_DRIVE_CONTROLLER_REPORTED :: (-35)
+ERROR_COULD_NOT_ISSUE_PACKET :: (-36)
+ERROR_HANDLE_TABLE_FULL :: (-37)
+ERROR_COULD_NOT_RESIZE_FILE :: (-38)
+ERROR_DIRECTORY_NOT_EMPTY :: (-39)
+ERROR_NODE_DELETED :: (-41)
+ERROR_VOLUME_MISMATCH :: (-43)
+ERROR_TARGET_WITHIN_SOURCE :: (-44)
+ERROR_TARGET_INVALID_TYPE :: (-45)
+ERROR_MALFORMED_NODE_PATH :: (-47)
+ERROR_OUT_OF_CACHE_RESOURCES :: (-48)
+ERROR_TARGET_IS_SOURCE :: (-49)
+ERROR_INVALID_NAME :: (-50)
+ERROR_CORRUPT_DATA :: (-51)
+ERROR_INSUFFICIENT_RESOURCES :: (-52)
+ERROR_UNSUPPORTED_FEATURE :: (-53)
+ERROR_FILE_TOO_FRAGMENTED :: (-54)
+ERROR_DRIVE_FULL :: (-55)
+ERROR_COULD_NOT_RESOLVE_SYMBOL :: (-56)
+ERROR_ALREADY_EMBEDDED :: (-57)
+ERROR_EVENT_SINK_OVERFLOW :: (-58)
+ERROR_EVENT_SINK_DUPLICATE :: (-59)
+ERROR_UNSUPPORTED_CONVERSION :: (-60)
+ERROR_SOURCE_EMPTY :: (-61)
+ERROR_UNSUPPORTED_EXECUTABLE :: (-62)
+ERROR_NO_ADDRESS_FOR_DOMAIN_NAME :: (-63)
+ERROR_NO_CONNECTED_NETWORK_INTERFACES :: (-64)
+ERROR_BAD_DOMAIN_NAME :: (-65)
+ERROR_LOST_IP_ADDRESS :: (-66)
+ERROR_CONNECTION_RESET :: (-67)
+ERROR_CONNECTION_REFUSED :: (-68)
+SYSTEM_CONSTANT_TIME_STAMP_UNITS_PER_MICROSECOND :: (0)
+SYSTEM_CONSTANT_NO_FANCY_GRAPHICS :: (1)
+SYSTEM_CONSTANT_REPORTED_PROBLEMS :: (2)
+SYSTEM_CONSTANT_RIGHT_TO_LEFT :: (3)
+SYSTEM_CONSTANT_WINDOW_INSET :: (4)
+SYSTEM_CONSTANT_CONTAINER_TAB_BAND_HEIGHT :: (5)
+INVALID_HANDLE :: (( Handle) (0))
+CURRENT_THREAD :: (( Handle) (0x10))
+CURRENT_PROCESS :: (( Handle) (0x11))
+DRAW_ALPHA_OVERWRITE :: (0x100)
+DRAW_ALPHA_FULL :: (0x200)
+WAIT_NO_TIMEOUT :: (-1)
+MAX_WAIT_COUNT :: (8)
+MAX_EVENT_FORWARD_COUNT :: (4)
+MAX_EVENT_SINK_BUFFER_SIZE :: (256)
+MAX_DIRECTORY_CHILD_NAME_LENGTH :: (256)
+PROCESS_EXECUTABLE_NOT_LOADED :: (0)
+PROCESS_EXECUTABLE_FAILED_TO_LOAD :: (1)
+PROCESS_EXECUTABLE_LOADED :: (2)
+SNAPSHOT_MAX_PROCESS_NAME_LENGTH :: (80)
+SYSTEM_SNAPSHOT_PROCESSES :: (1)
+SYSTEM_SNAPSHOT_DRIVES :: (2)
+HANDLED :: (0)
+NOT_HANDLED :: (-1)
+REJECTED :: (-2)
+SHARED_MEMORY_NAME_MAX_LENGTH :: (32)
+MAP_OBJECT_ALL :: (0)
+TEXT_H_LEFT :: (1)
+TEXT_H_RIGHT :: (2)
+TEXT_H_CENTER :: (3)
+TEXT_V_TOP :: (4)
+TEXT_V_BOTTOM :: (8)
+TEXT_V_CENTER :: (12)
+TEXT_WRAP :: (16)
+TEXT_ELLIPSIS :: (32)
+NODE_ACCESS_READ_SHARED :: (0x1)
+NODE_ACCESS_READ :: (0x2)
+NODE_ACCESS_WRITE :: (0x4)
+NODE_ACCESS_WRITE_EXCLUSIVE :: (0x8)
+NODE_FILE :: (0)
+NODE_DIRECTORY :: (0x10)
+NODE_INVALID :: (0x20)
+NODE_FAIL_IF_FOUND :: (0x1000)
+NODE_FAIL_IF_NOT_FOUND :: (0x2000)
+NODE_PREVENT_RESIZE :: (0x4000)
+NODE_CREATE_DIRECTORIES :: (0x8000)
+NODE_POSIX_NAMESPACE :: (0x10000)
+_ES_NODE_FROM_WRITE_EXCLUSIVE :: (0x20000)
+DIRECTORY_CHILDREN_UNKNOWN :: (( FileOffsetDifference) (-1))
+MEMORY_OPEN_FAIL_IF_FOUND :: (0x1000)
+MEMORY_OPEN_FAIL_IF_NOT_FOUND :: (0x2000)
+MAP_OBJECT_READ_WRITE :: (0)
+MAP_OBJECT_READ_ONLY :: (1)
+MAP_OBJECT_COPY_ON_WRITE :: (2)
+STRING_FORMAT_ENOUGH_SPACE :: ( (-1))
+STRING_FORMAT_SIMPLE :: (1 << 0)
+POSIX_SYSCALL_GET_POSIX_FD_PATH :: (0x10000)
+PERMISSION_ACCESS_SYSTEM_FILES :: (1 << 0)
+PERMISSION_ACCESS_USER_FILES :: (1 << 1)
+PERMISSION_PROCESS_CREATE :: (1 << 2)
+PERMISSION_PROCESS_OPEN :: (1 << 3)
+PERMISSION_SCREEN_MODIFY :: (1 << 4)
+PERMISSION_SHUTDOWN :: (1 << 5)
+PERMISSION_TAKE_SYSTEM_SNAPSHOT :: (1 << 6)
+PERMISSION_WINDOW_OPEN :: (1 << 7)
+PERMISSION_ALL :: ( (-1))
+PERMISSION_INHERIT :: ( (1) << 63)
+PANEL_STYLE_DEFAULT :: "Panel.Default"
+PANEL_STYLE_TRANSPARENT :: "Panel.Transparent"
+PANEL_STYLE_WINDOW_BACKGROUND :: "Panel.WindowBackground"
+PANEL_STYLE_WINDOW_DIVIDER :: "Panel.WindowDivider"
+PANEL_STYLE_SHEET :: "Panel.Sheet"
+PANEL_STYLE_GROUP_BOX :: "Panel.GroupBox"
+PANEL_STYLE_INDENT :: "Panel.Indent"
+PANEL_BAND_SIZE_DEFAULT :: (-1)
+ELEMENT_FOCUSABLE :: ( (1) << 32)
+ELEMENT_HIDDEN :: ( (1) << 33)
+ELEMENT_DISABLED :: ( (1) << 34)
+ELEMENT_DEBUG :: ( (1) << 35)
+ELEMENT_SCROLL_X :: ( (1) << 36)
+ELEMENT_SCROLL_Y :: ( (1) << 37)
+ELEMENT_NO_HOVER :: ( (1) << 38)
+ELEMENT_BLOCK_FOCUS :: ( (1) << 39)
+ELEMENT_NOT_TAB_TRAVERSABLE :: ( (1) << 40)
+ELEMENT_NO_INFORM_PARENT :: ( (1) << 41)
+ELEMENT_CENTER_ACCESS_KEY_HINT :: ( (1) << 42)
+ELEMENT_LAYOUT_HINT_HORIZONTAL :: ( (1) << 43)
+ELEMENT_STICKY_ACCESS_KEY :: ( (1) << 44)
+CELL_NEW_BAND :: ( (1) << 51)
+CELL_COLLAPSABLE :: ( (1) << 51)
+CELL_H_PUSH :: ( (1) << 54)
+CELL_H_EXPAND :: ( (1) << 55)
+CELL_H_SHRINK :: ( (1) << 56)
+CELL_H_LEFT :: ( (1) << 57)
+CELL_H_RIGHT :: ( (1) << 58)
+CELL_V_PUSH :: ( (1) << 59)
+CELL_V_EXPAND :: ( (1) << 60)
+CELL_V_SHRINK :: ( (1) << 61)
+CELL_V_TOP :: ( (1) << 62)
+CELL_V_BOTTOM :: ( (1) << 63)
+PANEL_VERTICAL :: (0x0001)
+PANEL_WRAP :: (0x0002)
+PANEL_TABLE :: (0x0004)
+PANEL_Z_STACK :: (0x0008)
+PANEL_H_LEFT :: (0x0010)
+PANEL_H_RIGHT :: (0x0020)
+PANEL_H_CENTER :: (0x0040)
+PANEL_H_JUSTIFY :: (0x0080)
+PANEL_V_TOP :: (0x0100)
+PANEL_V_BOTTOM :: (0x0200)
+PANEL_V_CENTER :: (0x0400)
+PANEL_V_JUSTIFY :: (0x0800)
+PANEL_H_SCROLL :: (0x1000)
+PANEL_V_SCROLL :: (0x2000)
+PANEL_SWITCHER :: (0x4000)
+TEXTBOX_MULTILINE :: (1 << 0)
+TEXTBOX_EDIT_BASED :: (1 << 1)
+TEXTBOX_COMPACT :: (1 << 2)
+TEXTBOX_NO_SMART_CONTEXT_MENUS :: (1 << 3)
+TEXTBOX_FIND_BACKWARDS :: (1 << 0)
+BUTTON_DEFAULT :: (1 << 0)
+BUTTON_DANGEROUS :: (1 << 1)
+BUTTON_MENU_ITEM :: (1 << 2)
+BUTTON_NOT_FOCUSABLE :: (1 << 3)
+BUTTON_TOOLBAR :: (1 << 4)
+BUTTON_DROPDOWN :: (1 << 5)
+BUTTON_COMPACT :: (1 << 6)
+MENU_ITEM_HEADER :: (1 << 7)
+BUTTON_CHECKBOX :: (1 << 8)
+BUTTON_RADIOBOX :: (1 << 9)
+BUTTON_CANCEL :: (1 << 10)
+BUTTON_PUSH :: (1 << 11)
+COLOR_WELL_HAS_OPACITY :: (1 << 0)
+SCROLLBAR_VERTICAL :: (0 << 0)
+SCROLLBAR_HORIZONTAL :: (1 << 0)
+SPLITTER_VERTICAL :: (0 << 0)
+SPLITTER_HORIZONTAL :: (1 << 0)
+IMAGE_DISPLAY_LOAD_ASYNCHRONOUSLY :: (1 << 0)
+IMAGE_DISPLAY_UNLOAD_WHEN_HIDDEN :: (1 << 1)
+IMAGE_DISPLAY_UPSCALE_NEAREST :: (1 << 2)
+IMAGE_DISPLAY_DOWNSCALE_NEAREST :: (1 << 3)
+IMAGE_DISPLAY_OPAQUE :: (1 << 4)
+LIST_VIEW_HORIZONTAL :: (1 << 0)
+LIST_VIEW_VARIABLE_SIZE :: (1 << 1)
+LIST_VIEW_TILED :: (1 << 2)
+LIST_VIEW_NON_LINEAR :: (1 << 3)
+LIST_VIEW_SINGLE_SELECT :: (1 << 4)
+LIST_VIEW_MULTI_SELECT :: (1 << 5)
+LIST_VIEW_COLUMNS :: (1 << 6)
+LIST_VIEW_GROUP_HAS_HEADER :: (1 << 0)
+LIST_VIEW_GROUP_HAS_FOOTER :: (1 << 1)
+LIST_VIEW_GROUP_INDENT :: (1 << 2)
+LIST_VIEW_GROUP_COLLAPSABLE :: (1 << 3)
+LIST_VIEW_COLUMN_RIGHT_ALIGNED :: (1 << 0)
+LIST_VIEW_COLUMN_ASCENDING :: (1 << 1)
+LIST_VIEW_COLUMN_DESCENDING :: (1 << 2)
+LIST_VIEW_COLUMN_HAS_MENU :: (1 << 3)
+MENU_AT_CURSOR :: (1 << 0)
+MENU_MAXIMUM_HEIGHT :: (1 << 1)
+FONT_SANS :: (0xFFFF)
+FONT_SERIF :: (0xFFFE)
+FONT_MONOSPACED :: (0xFFFD)
+FONT_REGULAR :: (4)
+FONT_BOLD :: (7)
+TEXT_FIGURE_DEFAULT :: (0)
+TEXT_FIGURE_OLD :: (1)
+TEXT_FIGURE_TABULAR :: (2)
+TEXT_DISPLAY_CONTENT_MAX_VALUES :: (8)
+DIRECTORY_MONITOR_SUBTREE :: (1 << 0)
+DIRECTORY_MONITOR_CONTENTS :: (1 << 1)
+DIRECTORY_MONITOR_MODIFY :: (1 << 2)
+COMMAND_SYSTEM_START :: (0xF0000000)
+COMMAND_DELETE :: (0xF0000001)
+COMMAND_SELECT_ALL :: (0xF0000002)
+COMMAND_CUT :: (0xF0000003)
+COMMAND_COPY :: (0xF0000004)
+COMMAND_PASTE :: (0xF0000005)
+AUDIO_STREAM_OVERRUN :: (1 << 0)
+AUDIO_STREAM_UNDERRUN :: (1 << 0)
+AUDIO_STREAM_FORMAT_CHANGED :: (1 << 1)
+AUDIO_STREAM_TERMINATED :: (1 << 2)
+AUDIO_STREAM_RUNNING :: (1 << 0)
+AUDIO_STREAM_MUTED :: (1 << 1)
+AUDIO_STREAM_ONESHOT :: (1 << 2)
+AUDIO_DEFAULT_OUTPUT :: (1)
+SAMPLE_FORMAT_U8 :: (1)
+SAMPLE_FORMAT_S16LE :: (2)
+SAMPLE_FORMAT_S32LE :: (3)
+SAMPLE_FORMAT_F32LE :: (4)
+CELL_FILL :: ( CELL_H_FILL | CELL_V_FILL)
+CELL_H_FILL :: ( CELL_H_PUSH | CELL_H_EXPAND | CELL_H_SHRINK)
+CELL_V_FILL :: ( CELL_V_PUSH | CELL_V_EXPAND | CELL_V_SHRINK)
+CELL_CENTER :: ( CELL_H_CENTER | CELL_V_CENTER)
+CELL_PUSH :: ( CELL_H_PUSH | CELL_V_PUSH)
+CELL_EXPAND :: ( CELL_H_EXPAND | CELL_V_EXPAND)
+CELL_CORNER :: ( CELL_H_LEFT | CELL_V_TOP)
+CELL_SHRINK :: ( CELL_H_SHRINK | CELL_V_SHRINK)
+CELL_H_CENTER :: ( CELL_H_LEFT | CELL_H_RIGHT)
+CELL_V_CENTER :: ( CELL_V_TOP | CELL_V_BOTTOM)
+THEME_METRICS_INSETS :: (1 << 0)
+THEME_METRICS_CLIP_INSETS :: (1 << 1)
+THEME_METRICS_GLOBAL_OFFSET :: (1 << 2)
+THEME_METRICS_CLIP_ENABLED :: (1 << 3)
+THEME_METRICS_CURSOR :: (1 << 4)
+THEME_METRICS_ENTRANCE_TRANSITION :: (1 << 5)
+THEME_METRICS_EXIT_TRANSITION :: (1 << 6)
+THEME_METRICS_ENTRANCE_DURATION :: (1 << 7)
+THEME_METRICS_EXIT_DURATION :: (1 << 8)
+THEME_METRICS_PREFERRED_WIDTH :: (1 << 9)
+THEME_METRICS_PREFERRED_HEIGHT :: (1 << 10)
+THEME_METRICS_MINIMUM_WIDTH :: (1 << 11)
+THEME_METRICS_MINIMUM_HEIGHT :: (1 << 12)
+THEME_METRICS_MAXIMUM_WIDTH :: (1 << 13)
+THEME_METRICS_MAXIMUM_HEIGHT :: (1 << 14)
+THEME_METRICS_GAP_MAJOR :: (1 << 15)
+THEME_METRICS_GAP_MINOR :: (1 << 16)
+THEME_METRICS_GAP_WRAP :: (1 << 17)
+THEME_METRICS_GAP_ALL :: ( THEME_METRICS_GAP_MAJOR | THEME_METRICS_GAP_MINOR | THEME_METRICS_GAP_WRAP)
+THEME_METRICS_TEXT_COLOR :: (1 << 18)
+THEME_METRICS_SELECTED_BACKGROUND :: (1 << 19)
+THEME_METRICS_SELECTED_TEXT :: (1 << 20)
+THEME_METRICS_ICON_COLOR :: (1 << 21)
+THEME_METRICS_TEXT_ALIGN :: (1 << 22)
+THEME_METRICS_TEXT_SIZE :: (1 << 23)
+THEME_METRICS_FONT_FAMILY :: (1 << 24)
+THEME_METRICS_FONT_WEIGHT :: (1 << 25)
+THEME_METRICS_ICON_SIZE :: (1 << 26)
+THEME_METRICS_IS_ITALIC :: (1 << 27)
+THEME_METRICS_ELLIPSIS :: (1 << 28)
+THEME_METRICS_WRAP_TEXT :: (1 << 29)
+MOVE_WINDOW_MAXIMISED :: (1 << 0)
+MOVE_WINDOW_ADJUST_TO_FIT_SCREEN :: (1 << 1)
+MOVE_WINDOW_HIDDEN :: (1 << 2)
+MOVE_WINDOW_ALWAYS_ON_TOP :: (1 << 3)
+MOVE_WINDOW_AT_BOTTOM :: (1 << 4)
+MOVE_WINDOW_UPDATE_SCREEN :: (1 << 5)
+WINDOW_SOLID_TRUE :: (1 << 0)
+WINDOW_SOLID_NO_ACTIVATE :: (1 << 1)
+THEME_BITMAP_WIDTH :: (400)
+THEME_BITMAP_HEIGHT :: (200)
+THEME_BITMAP_NAME :: "Desktop.ThemeBitmap"
+TEXTBOX_MOVE_CARET_SINGLE :: (2)
+TEXTBOX_MOVE_CARET_WORD :: (3)
+TEXTBOX_MOVE_CARET_LINE :: (4)
+TEXTBOX_MOVE_CARET_VERTICAL :: (5)
+TEXTBOX_MOVE_CARET_ALL :: (6)
+TEXTBOX_MOVE_CARET_FIRST_ONLY :: (1 << 8)
+TEXTBOX_MOVE_CARET_SECOND_ONLY :: (1 << 9)
+TEXTBOX_MOVE_CARET_BACKWARDS :: (1 << 10)
+TEXTBOX_MOVE_CARET_STRONG_WHITESPACE :: (1 << 11)
+GAME_CONTROLLER_MAX_COUNT :: (16)
+DOMAIN_NAME_MAX_LENGTH :: (255)
+ECHO_REQUEST_MAX_LENGTH :: (48)
+CONNECTION_OPEN_WAIT :: (1 << 0)
+FILE_CONTROL_NOTIFY_MONITORS :: (1 << 0)
+FILE_CONTROL_FLUSH :: (1 << 1)
using StandardIcon :: enum i32 {
ICON_NONE,
ICON_ACTION_UNAVAILABLE_SYMBOLIC,
@@ -1968,7 +1968,7 @@ using MemoryProtection :: enum i32 {
MEMORY_PROTECTION_READ_WRITE,
MEMORY_PROTECTION_EXECUTABLE,
}
-UICallbackFunction :: distinct #type proc "c" ( ^Element, ^Message, ^Response);
+UICallbackFunction :: distinct #type proc "c" ( ^Element, ^Message, ^Response)
BatchCall :: struct {
index : SyscallType,
stopBatchIfError : bool,
@@ -2417,7 +2417,7 @@ FormatValue :: struct {
time : u64 ,
},
}
-FragmentShaderCallbackFunction :: distinct #type proc "c" ( i32, i32, ^StyledBox) -> u32 ;
+FragmentShaderCallbackFunction :: distinct #type proc "c" ( i32, i32, ^StyledBox) -> u32
StyledBox :: struct {
bounds : Rectangle,
clip : Rectangle,
@@ -2444,7 +2444,7 @@ CalculationValue :: struct {
error : bool,
number : f64 ,
}
-CommandCallbackFunction :: distinct #type proc "c" ( ^INSTANCE_TYPE, ^Element, ^Command);
+CommandCallbackFunction :: distinct #type proc "c" ( ^INSTANCE_TYPE, ^Element, ^Command)
Command :: struct {
elements : ^^Element,
callback : CommandCallbackFunction,
@@ -2569,332 +2569,332 @@ Connection :: struct {
sendWritePointer : uint ,
handle : Handle,
}
-ThreadEntryFunction :: distinct #type proc "c" ( Generic);
-ComparisonCallbackFunction :: distinct #type proc "c" ( rawptr, rawptr, Generic) -> i32;
-SwapCallbackFunction :: distinct #type proc "c" ( rawptr, rawptr, Generic);
-CRTComparisonCallback :: distinct #type proc "c" ( rawptr, rawptr) -> i32;
-TimerCallbackFunction :: distinct #type proc "c" ( Generic);
-MenuCallbackFunction :: distinct #type proc "c" ( ^Menu, Generic);
-StorePullCallbackFunction :: distinct #type proc "c" ( ^Store, ^INSTANCE_TYPE, Generic, i32, Generic, ^FormatValue);
-StoreCallbackFunction :: distinct #type proc "c" ( ^Store, ^INSTANCE_TYPE, Generic, Generic);
-DirectoryMonitorCallbackFunction :: distinct #type proc "c" ( ^DirectoryMonitor, i32, ^i8 , int , ^i8 , int , Generic);
-Batch :: #force_inline proc "c" (calls_ : ^BatchCall, count_ : int ){ addr := 0x1000 + 0 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^BatchCall, int )) (fp))(calls_, count_); }
-GetCreationArgument :: #force_inline proc "c" (object_ : Handle) -> Generic{ addr := 0x1000 + 1 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle) -> Generic) (fp))(object_); }
-GetSystemInformation :: #force_inline proc "c" (systemInformation_ : ^SystemInformation){ addr := 0x1000 + 2 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^SystemInformation)) (fp))(systemInformation_); }
-HandleClose :: #force_inline proc "c" (handle_ : Handle) -> Error{ addr := 0x1000 + 3 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle) -> Error) (fp))(handle_); }
-InitialiseCStandardLibrary :: #force_inline proc "c" (argc_ : ^i32, argv_ : ^^^i8 ){ addr := 0x1000 + 4 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^i32, ^^^i8 )) (fp))(argc_, argv_); }
-MailslotSendData :: #force_inline proc "c" (mailslot_ : Handle, data_ : rawptr, bytes_ : int ) -> bool{ addr := 0x1000 + 5 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, rawptr, int ) -> bool) (fp))(mailslot_, data_, bytes_); }
-MakeLinuxSystemCall2 :: #force_inline proc "c" (n_ : int , a1_ : int , a2_ : int , a3_ : int , a4_ : int , a5_ : int , a6_ : int ) -> int { addr := 0x1000 + 6 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( int , int , int , int , int , int , int ) -> int ) (fp))(n_, a1_, a2_, a3_, a4_, a5_, a6_); }
-SystemGetConstant :: #force_inline proc "c" (index_ : uint ) -> u64 { addr := 0x1000 + 8 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( uint ) -> u64 ) (fp))(index_); }
-TakeSystemSnapshot :: #force_inline proc "c" (type_ : i32, bufferSize_ : ^int ) -> Handle{ addr := 0x1000 + 9 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32, ^int ) -> Handle) (fp))(type_, bufferSize_); }
-UserGetHomeFolder :: #force_inline proc "c" (buffer_ : ^i8 , bufferBytes_ : int ) -> int { addr := 0x1000 + 10 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , int ) -> int ) (fp))(buffer_, bufferBytes_); }
-_EsInstanceCreate :: #force_inline proc "c" (bytes_ : int , message_ : ^Message, cName_ : cstring ) -> ^Instance{ addr := 0x1000 + 11 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( int , ^Message, cstring ) -> ^Instance) (fp))(bytes_, message_, cName_); }
-_EsSyscall :: #force_inline proc "c" (a_ : uint , b_ : uint , c_ : uint , d_ : uint , e_ : uint , f_ : uint ) -> uint { addr := 0x1000 + 12 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( uint , uint , uint , uint , uint , uint ) -> uint ) (fp))(a_, b_, c_, d_, e_, f_); }
-ApplicationStart :: #force_inline proc "c" (information_ : ^ApplicationStartupInformation){ addr := 0x1000 + 124 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ApplicationStartupInformation)) (fp))(information_); }
-SystemConfigurationReadAll :: #force_inline proc "c" (groupCount_ : ^int ) -> ^SystemConfigurationGroup{ addr := 0x1000 + 164 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^int ) -> ^SystemConfigurationGroup) (fp))(groupCount_); }
-SystemConfigurationReadInteger :: #force_inline proc "c" (section_ : string, key_ : string, defaultValue_ : i64 = 0) -> i64 { addr := 0x1000 + 295 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^u8, int, i64 ) -> i64 ) (fp))(raw_data(section_), len(section_), raw_data(key_), len(key_), defaultValue_); }
-SystemConfigurationGroupReadInteger :: #force_inline proc "c" (group_ : ^SystemConfigurationGroup, key_ : string, defaultValue_ : i64 = 0) -> i64 { addr := 0x1000 + 296 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^SystemConfigurationGroup, ^u8, int, i64 ) -> i64 ) (fp))(group_, raw_data(key_), len(key_), defaultValue_); }
-SystemConfigurationReadString :: #force_inline proc "c" (section_ : string, key_ : string, valueBytes_ : ^int = nil) -> ^i8 { addr := 0x1000 + 297 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^u8, int, ^int ) -> ^i8 ) (fp))(raw_data(section_), len(section_), raw_data(key_), len(key_), valueBytes_); }
-SystemConfigurationGroupReadString :: #force_inline proc "c" (group_ : ^SystemConfigurationGroup, key_ : string, valueBytes_ : ^int = nil) -> ^i8 { addr := 0x1000 + 298 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^SystemConfigurationGroup, ^u8, int, ^int ) -> ^i8 ) (fp))(group_, raw_data(key_), len(key_), valueBytes_); }
-INIParse :: #force_inline proc "c" (s_ : ^INIState) -> bool{ addr := 0x1000 + 7 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^INIState) -> bool) (fp))(s_); }
-INIPeek :: #force_inline proc "c" (s_ : ^INIState) -> bool{ addr := 0x1000 + 87 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^INIState) -> bool) (fp))(s_); }
-INIFormat :: #force_inline proc "c" (s_ : ^INIState, buffer_ : ^i8 , bytes_ : int ) -> int { addr := 0x1000 + 125 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^INIState, ^i8 , int ) -> int ) (fp))(s_, buffer_, bytes_); }
-INIZeroTerminate :: #force_inline proc "c" (s_ : ^INIState){ addr := 0x1000 + 126 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^INIState)) (fp))(s_); }
-CommandAddButton :: #force_inline proc "c" (command_ : ^Command, button_ : ^Button){ addr := 0x1000 + 13 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Command, ^Button)) (fp))(command_, button_); }
-CommandByID :: #force_inline proc "c" (instance_ : ^Instance, stableID_ : u32 ) -> ^Command{ addr := 0x1000 + 14 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Instance, u32 ) -> ^Command) (fp))(instance_, stableID_); }
-CommandRegister :: #force_inline proc "c" (command_ : ^Command, instance_ : ^Instance, callback_ : CommandCallbackFunction, stableID_ : u32 , cDefaultKeyboardShortcut_ : cstring = nil, enabled_ : bool = false) -> ^Command{ addr := 0x1000 + 15 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Command, ^Instance, CommandCallbackFunction, u32 , cstring , bool) -> ^Command) (fp))(command_, instance_, callback_, stableID_, cDefaultKeyboardShortcut_, enabled_); }
-CommandSetCallback :: #force_inline proc "c" (command_ : ^Command, callback_ : CommandCallbackFunction){ addr := 0x1000 + 16 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Command, CommandCallbackFunction)) (fp))(command_, callback_); }
-CommandSetDisabled :: #force_inline proc "c" (command_ : ^Command, disabled_ : bool){ addr := 0x1000 + 17 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Command, bool)) (fp))(command_, disabled_); }
-DialogClose :: #force_inline proc "c" (window_ : ^Window){ addr := 0x1000 + 18 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Window)) (fp))(window_); }
-DialogShow :: #force_inline proc "c" (window_ : ^Window) -> ^Element{ addr := 0x1000 + 19 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Window) -> ^Element) (fp))(window_); }
-DialogShowAlert :: #force_inline proc "c" (window_ : ^Window, title_ : string, content_ : string, iconID_ : u32 , addOKButton_ : bool = false) -> ^Element{ addr := 0x1000 + 20 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Window, ^u8, int, ^u8, int, u32 , bool) -> ^Element) (fp))(window_, raw_data(title_), len(title_), raw_data(content_), len(content_), iconID_, addOKButton_); }
-InstanceDestroy :: #force_inline proc "c" (instance_ : ^INSTANCE_TYPE){ addr := 0x1000 + 300 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^INSTANCE_TYPE)) (fp))(instance_); }
-KeyboardIsAltHeld :: #force_inline proc "c" () -> bool{ addr := 0x1000 + 21 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> bool) (fp))(); }
-KeyboardIsCtrlHeld :: #force_inline proc "c" () -> bool{ addr := 0x1000 + 22 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> bool) (fp))(); }
-KeyboardIsShiftHeld :: #force_inline proc "c" () -> bool{ addr := 0x1000 + 23 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> bool) (fp))(); }
-MessageGetInputText :: #force_inline proc "c" (message_ : ^Message, buffer_ : ^i8 ) -> int { addr := 0x1000 + 24 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Message, ^i8 ) -> int ) (fp))(message_, buffer_); }
-MessageMutexAcquire :: #force_inline proc "c" (){ addr := 0x1000 + 26 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))(); }
-MessageMutexCheck :: #force_inline proc "c" (){ addr := 0x1000 + 27 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))(); }
-MessageMutexRelease :: #force_inline proc "c" (){ addr := 0x1000 + 28 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))(); }
-MessagePost :: #force_inline proc "c" (target_ : ^Element, message_ : ^Message) -> Error{ addr := 0x1000 + 29 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, ^Message) -> Error) (fp))(target_, message_); }
-MessagePostRemote :: #force_inline proc "c" (process_ : Handle, message_ : ^Message) -> Error{ addr := 0x1000 + 30 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, ^Message) -> Error) (fp))(process_, message_); }
-MessageSend :: #force_inline proc "c" (object_ : ^Element, message_ : ^Message) -> Response{ addr := 0x1000 + 31 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, ^Message) -> Response) (fp))(object_, message_); }
-MessageReceive :: #force_inline proc "c" () -> ^Message{ addr := 0x1000 + 318 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> ^Message) (fp))(); }
-MouseGetPosition :: #force_inline proc "c" (relativeElement_ : ^Element = nil) -> Point{ addr := 0x1000 + 32 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element) -> Point) (fp))(relativeElement_); }
-MouseSetPosition :: #force_inline proc "c" (relativeWindow_ : ^Window, x_ : i32, y_ : i32){ addr := 0x1000 + 33 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Window, i32, i32)) (fp))(relativeWindow_, x_, y_); }
-StyleInheritRegister :: #force_inline proc "c" (cStyle_ : cstring , cParent_ : cstring , customMetrics_ : ^ThemeMetrics){ addr := 0x1000 + 239 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( cstring , cstring , ^ThemeMetrics)) (fp))(cStyle_, cParent_, customMetrics_); }
-StyleRefreshAll :: #force_inline proc "c" (window_ : ^Element){ addr := 0x1000 + 37 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element)) (fp))(window_); }
-UISetDPI :: #force_inline proc "c" (dpiScale_ : i32){ addr := 0x1000 + 38 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( i32)) (fp))(dpiScale_); }
-DirectoryEnumerateChildren :: #force_inline proc "c" (path_ : string, buffer_ : ^^DirectoryChild) -> int { addr := 0x1000 + 39 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^^DirectoryChild) -> int ) (fp))(raw_data(path_), len(path_), buffer_); }
-DirectoryEnumerateChildrenFromHandle :: #force_inline proc "c" (directory_ : Handle, buffer_ : ^DirectoryChild, bufferCount_ : int ) -> int { addr := 0x1000 + 40 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, ^DirectoryChild, int ) -> int ) (fp))(directory_, buffer_, bufferCount_); }
-DirectoryMonitorCreate :: #force_inline proc "c" (path_ : string, flags_ : u32 , callback_ : DirectoryMonitorCallbackFunction, _context_ : Generic) -> ^DirectoryMonitor{ addr := 0x1000 + 41 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, u32 , DirectoryMonitorCallbackFunction, Generic) -> ^DirectoryMonitor) (fp))(raw_data(path_), len(path_), flags_, callback_, _context_); }
-DirectoryMonitorCreateFromHandle :: #force_inline proc "c" (directory_ : Handle, flags_ : u32 , callback_ : DirectoryMonitorCallbackFunction, _context_ : Generic) -> ^DirectoryMonitor{ addr := 0x1000 + 42 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, u32 , DirectoryMonitorCallbackFunction, Generic) -> ^DirectoryMonitor) (fp))(directory_, flags_, callback_, _context_); }
-DirectoryMonitorDestroy :: #force_inline proc "c" (monitor_ : ^DirectoryMonitor){ addr := 0x1000 + 43 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^DirectoryMonitor)) (fp))(monitor_); }
-FileControl :: #force_inline proc "c" (file_ : Handle, flags_ : u32 ) -> Error{ addr := 0x1000 + 96 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, u32 ) -> Error) (fp))(file_, flags_); }
-FileReadAll :: #force_inline proc "c" (filePath_ : string, fileSize_ : ^int ) -> rawptr{ addr := 0x1000 + 44 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^int ) -> rawptr) (fp))(raw_data(filePath_), len(filePath_), fileSize_); }
-FileReadSync :: #force_inline proc "c" (file_ : Handle, offset_ : FileOffset, size_ : int , buffer_ : rawptr) -> int { addr := 0x1000 + 45 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, FileOffset, int , rawptr) -> int ) (fp))(file_, offset_, size_, buffer_); }
-FileResize :: #force_inline proc "c" (file_ : Handle, newSize_ : FileOffset) -> Error{ addr := 0x1000 + 46 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, FileOffset) -> Error) (fp))(file_, newSize_); }
-FileWriteAll :: #force_inline proc "c" (filePath_ : string, data_ : rawptr, fileSize_ : int ) -> Error{ addr := 0x1000 + 47 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, rawptr, int ) -> Error) (fp))(raw_data(filePath_), len(filePath_), data_, fileSize_); }
-FileWriteAllGather :: #force_inline proc "c" (filePath_ : string, data_ : ^rawptr, fileSize_ : ^int , gatherCount_ : int ) -> Error{ addr := 0x1000 + 48 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^rawptr, ^int , int ) -> Error) (fp))(raw_data(filePath_), len(filePath_), data_, fileSize_, gatherCount_); }
-FileWriteSync :: #force_inline proc "c" (file_ : Handle, offset_ : FileOffset, size_ : int , buffer_ : rawptr) -> int { addr := 0x1000 + 50 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, FileOffset, int , rawptr) -> int ) (fp))(file_, offset_, size_, buffer_); }
-NodeDelete :: #force_inline proc "c" (node_ : Handle) -> Error{ addr := 0x1000 + 51 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle) -> Error) (fp))(node_); }
-NodeDeleteByPath :: #force_inline proc "c" (filePath_ : string) -> Error{ addr := 0x1000 + 52 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int) -> Error) (fp))(raw_data(filePath_), len(filePath_)); }
-NodeFindUniqueName :: #force_inline proc "c" (buffer_ : ^i8 , originalBytes_ : int , bufferBytes_ : int ) -> int { addr := 0x1000 + 53 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , int , int ) -> int ) (fp))(buffer_, originalBytes_, bufferBytes_); }
-NodeMove :: #force_inline proc "c" (node_ : Handle, newDirectory_ : Handle, newName_ : string) -> Error{ addr := 0x1000 + 54 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, Handle, ^u8, int) -> Error) (fp))(node_, newDirectory_, raw_data(newName_), len(newName_)); }
-NodeOpen :: #force_inline proc "c" (path_ : string, flags_ : u32 , information_ : ^NodeInformation) -> Error{ addr := 0x1000 + 55 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, u32 , ^NodeInformation) -> Error) (fp))(raw_data(path_), len(path_), flags_, information_); }
-NodeOpenRelative :: #force_inline proc "c" (directory_ : Handle, path_ : string, flags_ : u32 , information_ : ^NodeInformation) -> Error{ addr := 0x1000 + 56 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, ^u8, int, u32 , ^NodeInformation) -> Error) (fp))(directory_, raw_data(path_), len(path_), flags_, information_); }
-NodeRefreshInformation :: #force_inline proc "c" (information_ : ^NodeInformation){ addr := 0x1000 + 57 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^NodeInformation)) (fp))(information_); }
-ProcessCrash :: #force_inline proc "c" (error_ : Error, message_ : string){ addr := 0x1000 + 58 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Error, ^u8, int)) (fp))(error_, raw_data(message_), len(message_)); }
-ProcessCreate :: #force_inline proc "c" (executablePath_ : string, information_ : ^ProcessInformation, argument_ : Generic) -> Error{ addr := 0x1000 + 59 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^ProcessInformation, Generic) -> Error) (fp))(raw_data(executablePath_), len(executablePath_), information_, argument_); }
-ProcessCreate2 :: #force_inline proc "c" (arguments_ : ^ProcessCreationArguments, information_ : ^ProcessInformation) -> Error{ addr := 0x1000 + 60 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^ProcessCreationArguments, ^ProcessInformation) -> Error) (fp))(arguments_, information_); }
-ProcessGetExitStatus :: #force_inline proc "c" (process_ : Handle) -> i32{ addr := 0x1000 + 61 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle) -> i32) (fp))(process_); }
-ProcessGetID :: #force_inline proc "c" (process_ : Handle) -> uint { addr := 0x1000 + 62 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle) -> uint ) (fp))(process_); }
-ProcessGetState :: #force_inline proc "c" (process_ : Handle, state_ : ^ProcessState){ addr := 0x1000 + 63 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle, ^ProcessState)) (fp))(process_, state_); }
-ProcessOpen :: #force_inline proc "c" (pid_ : u64 ) -> Handle{ addr := 0x1000 + 64 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( u64 ) -> Handle) (fp))(pid_); }
-ProcessPause :: #force_inline proc "c" (process_ : Handle, resume_ : bool){ addr := 0x1000 + 65 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle, bool)) (fp))(process_, resume_); }
-ProcessTerminate :: #force_inline proc "c" (process_ : Handle, status_ : i32){ addr := 0x1000 + 66 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle, i32)) (fp))(process_, status_); }
-ProcessTerminateCurrent :: #force_inline proc "c" (){ addr := 0x1000 + 67 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))(); }
-ThreadCreate :: #force_inline proc "c" (entryFunction_ : ThreadEntryFunction, information_ : ^ThreadInformation, argument_ : Generic) -> Error{ addr := 0x1000 + 68 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ThreadEntryFunction, ^ThreadInformation, Generic) -> Error) (fp))(entryFunction_, information_, argument_); }
-ThreadGetID :: #force_inline proc "c" (thread_ : Handle) -> uint { addr := 0x1000 + 69 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle) -> uint ) (fp))(thread_); }
-ThreadTerminate :: #force_inline proc "c" (thread_ : Handle){ addr := 0x1000 + 71 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle)) (fp))(thread_); }
-ArenaAllocate :: #force_inline proc "c" (arena_ : ^Arena, zero_ : bool) -> rawptr{ addr := 0x1000 + 72 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Arena, bool) -> rawptr) (fp))(arena_, zero_); }
-ArenaFree :: #force_inline proc "c" (arena_ : ^Arena, pointer_ : rawptr){ addr := 0x1000 + 73 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Arena, rawptr)) (fp))(arena_, pointer_); }
-ArenaInitialise :: #force_inline proc "c" (arena_ : ^Arena, blockSize_ : int , itemSize_ : int ){ addr := 0x1000 + 74 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Arena, int , int )) (fp))(arena_, blockSize_, itemSize_); }
-ConstantBufferCreate :: #force_inline proc "c" (data_ : rawptr, dataBytes_ : int , targetProcess_ : Handle) -> Handle{ addr := 0x1000 + 75 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, int , Handle) -> Handle) (fp))(data_, dataBytes_, targetProcess_); }
-ConstantBufferRead :: #force_inline proc "c" (constantBuffer_ : Handle, output_ : rawptr){ addr := 0x1000 + 76 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle, rawptr)) (fp))(constantBuffer_, output_); }
-ConstantBufferShare :: #force_inline proc "c" (constantBuffer_ : Handle, targetProcess_ : Handle) -> Handle{ addr := 0x1000 + 77 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, Handle) -> Handle) (fp))(constantBuffer_, targetProcess_); }
-HeapAllocate :: #force_inline proc "c" (size_ : int , zeroMemory_ : bool) -> rawptr{ addr := 0x1000 + 78 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( int , bool) -> rawptr) (fp))(size_, zeroMemory_); }
-HeapFree :: #force_inline proc "c" (address_ : rawptr){ addr := 0x1000 + 79 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr)) (fp))(address_); }
-HeapReallocate :: #force_inline proc "c" (oldAddress_ : rawptr, newAllocationSize_ : int , zeroNewSpace_ : bool) -> rawptr{ addr := 0x1000 + 80 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, int , bool) -> rawptr) (fp))(oldAddress_, newAllocationSize_, zeroNewSpace_); }
-HeapValidate :: #force_inline proc "c" (){ addr := 0x1000 + 81 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))(); }
-MemoryCommit :: #force_inline proc "c" (pointer_ : rawptr, bytes_ : int ) -> bool{ addr := 0x1000 + 82 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, int ) -> bool) (fp))(pointer_, bytes_); }
-MemoryCompare :: #force_inline proc "c" (a_ : rawptr, b_ : rawptr, bytes_ : int ) -> i32{ addr := 0x1000 + 83 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, rawptr, int ) -> i32) (fp))(a_, b_, bytes_); }
-MemoryCopy :: #force_inline proc "c" (destination_ : rawptr, source_ : rawptr, bytes_ : int ){ addr := 0x1000 + 84 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, rawptr, int )) (fp))(destination_, source_, bytes_); }
-MemoryCopyReverse :: #force_inline proc "c" (_destination_ : rawptr, _source_ : rawptr, bytes_ : int ){ addr := 0x1000 + 85 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, rawptr, int )) (fp))(_destination_, _source_, bytes_); }
-MemoryDecommit :: #force_inline proc "c" (pointer_ : rawptr, bytes_ : int ) -> bool{ addr := 0x1000 + 320 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, int ) -> bool) (fp))(pointer_, bytes_); }
-MemoryFill :: #force_inline proc "c" (from_ : rawptr, to_ : rawptr, byte_ : u8 ){ addr := 0x1000 + 86 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, rawptr, u8 )) (fp))(from_, to_, byte_); }
-MemoryMove :: #force_inline proc "c" (_start_ : rawptr, _end_ : rawptr, amount_ : int , zeroEmptySpace_ : bool){ addr := 0x1000 + 88 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, rawptr, int , bool)) (fp))(_start_, _end_, amount_, zeroEmptySpace_); }
-MemoryOpen :: #force_inline proc "c" (size_ : int , name_ : string, flags_ : u32 ) -> Handle{ addr := 0x1000 + 89 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( int , ^u8, int, u32 ) -> Handle) (fp))(size_, raw_data(name_), len(name_), flags_); }
-MemoryReserve :: #force_inline proc "c" (size_ : int , protection_ : MemoryProtection = MEMORY_PROTECTION_READ_WRITE, commitAll_ : bool = true) -> rawptr{ addr := 0x1000 + 25 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( int , MemoryProtection, bool) -> rawptr) (fp))(size_, protection_, commitAll_); }
-MemoryShare :: #force_inline proc "c" (sharedMemoryRegion_ : Handle, targetProcess_ : Handle, readOnly_ : bool) -> Handle{ addr := 0x1000 + 90 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, Handle, bool) -> Handle) (fp))(sharedMemoryRegion_, targetProcess_, readOnly_); }
-MemorySumBytes :: #force_inline proc "c" (data_ : ^u8 , bytes_ : int ) -> u8 { addr := 0x1000 + 91 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^u8 , int ) -> u8 ) (fp))(data_, bytes_); }
-MemoryUnreserve :: #force_inline proc "c" (pointer_ : rawptr, size_ : int = 0){ addr := 0x1000 + 319 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, int )) (fp))(pointer_, size_); }
-MemoryZero :: #force_inline proc "c" (destination_ : rawptr, bytes_ : int ){ addr := 0x1000 + 92 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, int )) (fp))(destination_, bytes_); }
-ObjectMap :: #force_inline proc "c" (object_ : Handle, offset_ : uint , size_ : int , flags_ : u32 ) -> rawptr{ addr := 0x1000 + 93 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, uint , int , u32 ) -> rawptr) (fp))(object_, offset_, size_, flags_); }
-AssertionFailure :: #force_inline proc "c" (cFile_ : cstring , line_ : i32){ addr := 0x1000 + 94 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( cstring , i32)) (fp))(cFile_, line_); }
-DoubleParse :: #force_inline proc "c" (string_ : string, endptr_ : ^^i8 ) -> f64 { addr := 0x1000 + 97 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^^i8 ) -> f64 ) (fp))(raw_data(string_), len(string_), endptr_); }
-ExtractArguments :: #force_inline proc "c" (string_ : ^i8 , bytes_ : int , delimiterByte_ : u8 , replacementDelimiter_ : u8 , argvAllocated_ : int , argv_ : ^^i8 , argc_ : ^int ) -> bool{ addr := 0x1000 + 98 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , int , u8 , u8 , int , ^^i8 , ^int ) -> bool) (fp))(string_, bytes_, delimiterByte_, replacementDelimiter_, argvAllocated_, argv_, argc_); }
-RandomU8 :: #force_inline proc "c" () -> u8 { addr := 0x1000 + 301 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> u8 ) (fp))(); }
-RandomU64 :: #force_inline proc "c" () -> u64 { addr := 0x1000 + 302 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> u64 ) (fp))(); }
-IntegerParse :: #force_inline proc "c" (text_ : string) -> i64 { addr := 0x1000 + 101 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int) -> i64 ) (fp))(raw_data(text_), len(text_)); }
-Print :: #force_inline proc "c" (format_ : cstring , _varargs_ : ..any){ addr := 0x1000 + 102 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( cstring , ..any)) (fp))(format_, _varargs_); }
-PrintDirect :: #force_inline proc "c" (string_ : string){ addr := 0x1000 + 103 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" (^u8, int)) (fp))(raw_data(string_), len(string_)); }
-PrintHelloWorld :: #force_inline proc "c" (){ addr := 0x1000 + 104 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))(); }
-RandomAddEntropy :: #force_inline proc "c" (x_ : u64 ){ addr := 0x1000 + 106 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( u64 )) (fp))(x_); }
-RandomSeed :: #force_inline proc "c" (x_ : u64 ){ addr := 0x1000 + 107 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( u64 )) (fp))(x_); }
-RectangleClip :: #force_inline proc "c" (parent_ : Rectangle, rectangle_ : Rectangle, output_ : ^Rectangle) -> bool{ addr := 0x1000 + 108 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Rectangle, Rectangle, ^Rectangle) -> bool) (fp))(parent_, rectangle_, output_); }
-Sort :: #force_inline proc "c" (_base_ : rawptr, nmemb_ : int , size_ : int , compar_ : ComparisonCallbackFunction, argument_ : Generic){ addr := 0x1000 + 109 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, int , int , ComparisonCallbackFunction, Generic)) (fp))(_base_, nmemb_, size_, compar_, argument_); }
-SortWithSwapCallback :: #force_inline proc "c" (_base_ : rawptr, nmemb_ : int , size_ : int , compar_ : ComparisonCallbackFunction, argument_ : Generic, swap_ : SwapCallbackFunction){ addr := 0x1000 + 110 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, int , int , ComparisonCallbackFunction, Generic, SwapCallbackFunction)) (fp))(_base_, nmemb_, size_, compar_, argument_, swap_); }
-TimeStamp :: #force_inline proc "c" () -> u64 { addr := 0x1000 + 252 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> u64 ) (fp))(); }
-TimeStampMs :: #force_inline proc "c" () -> f64 { addr := 0x1000 + 261 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> f64 ) (fp))(); }
-ColorBlend :: #force_inline proc "c" (under_ : u32 , over_ : u32 , fullAlpha_ : bool) -> u32 { addr := 0x1000 + 111 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( u32 , u32 , bool) -> u32 ) (fp))(under_, over_, fullAlpha_); }
-ColorConvertToRGB :: #force_inline proc "c" (h_ : f32 , s_ : f32 , v_ : f32 ) -> u32 { addr := 0x1000 + 112 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 , f32 , f32 ) -> u32 ) (fp))(h_, s_, v_); }
-ColorConvertToHSV :: #force_inline proc "c" (color_ : u32 , h_ : ^f32 , s_ : ^f32 , v_ : ^f32 ) -> bool{ addr := 0x1000 + 113 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( u32 , ^f32 , ^f32 , ^f32 ) -> bool) (fp))(color_, h_, s_, v_); }
-ColorParse :: #force_inline proc "c" (string_ : string) -> u32 { addr := 0x1000 + 114 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int) -> u32 ) (fp))(raw_data(string_), len(string_)); }
-DrawBitmap :: #force_inline proc "c" (painter_ : ^Painter, region_ : Rectangle, bits_ : ^u32 , stride_ : uint ){ addr := 0x1000 + 324 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Painter, Rectangle, ^u32 , uint )) (fp))(painter_, region_, bits_, stride_); }
-DrawInvert :: #force_inline proc "c" (painter_ : ^Painter, bounds_ : Rectangle){ addr := 0x1000 + 95 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Painter, Rectangle)) (fp))(painter_, bounds_); }
-DrawStandardIcon :: #force_inline proc "c" (painter_ : ^Painter, id_ : u32 , size_ : i32, region_ : Rectangle, color_ : u32 ) -> bool{ addr := 0x1000 + 115 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Painter, u32 , i32, Rectangle, u32 ) -> bool) (fp))(painter_, id_, size_, region_, color_); }
-DrawStyledBox :: #force_inline proc "c" (painter_ : ^Painter, box_ : StyledBox){ addr := 0x1000 + 116 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Painter, StyledBox)) (fp))(painter_, box_); }
-DrawPaintTarget :: #force_inline proc "c" (painter_ : ^Painter, source_ : ^PaintTarget, destinationRegion_ : Rectangle, sourceRegion_ : Rectangle, borderRegion_ : Rectangle, mode_ : DrawMode, alpha_ : u16 , clipRegion_ : Rectangle){ addr := 0x1000 + 263 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Painter, ^PaintTarget, Rectangle, Rectangle, Rectangle, DrawMode, u16 , Rectangle)) (fp))(painter_, source_, destinationRegion_, sourceRegion_, borderRegion_, mode_, alpha_, clipRegion_); }
-DrawText :: #force_inline proc "c" (painter_ : ^Painter, plan_ : ^TextPlan, bounds_ : Rectangle, clip_ : ^Rectangle = nil, selectionProperties_ : ^TextSelection = nil){ addr := 0x1000 + 120 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Painter, ^TextPlan, Rectangle, ^Rectangle, ^TextSelection)) (fp))(painter_, plan_, bounds_, clip_, selectionProperties_); }
-FontGetName :: #force_inline proc "c" (family_ : u16 , buffer_ : ^i8 , bufferBytes_ : int ) -> int { addr := 0x1000 + 121 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( u16 , ^i8 , int ) -> int ) (fp))(family_, buffer_, bufferBytes_); }
-IconIDFromString :: #force_inline proc "c" (string_ : string = "") -> u32 { addr := 0x1000 + 127 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int) -> u32 ) (fp))(raw_data(string_), len(string_)); }
-ImageLoad :: #force_inline proc "c" (file_ : ^u8 , fileSize_ : int , width_ : ^u32 , height_ : ^u32 , imageChannels_ : i32) -> ^u8 { addr := 0x1000 + 165 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^u8 , int , ^u32 , ^u32 , i32) -> ^u8 ) (fp))(file_, fileSize_, width_, height_, imageChannels_); }
-PainterBoundsClient :: #force_inline proc "c" (painter_ : ^Painter) -> Rectangle{ addr := 0x1000 + 122 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Painter) -> Rectangle) (fp))(painter_); }
-PainterBoundsInset :: #force_inline proc "c" (painter_ : ^Painter) -> Rectangle{ addr := 0x1000 + 123 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Painter) -> Rectangle) (fp))(painter_); }
-PainterDrawStandardContent :: #force_inline proc "c" (painter_ : ^Painter, text_ : string, iconID_ : u32 ){ addr := 0x1000 + 117 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Painter, ^u8, int, u32 )) (fp))(painter_, raw_data(text_), len(text_), iconID_); }
-PaintTargetClear :: #force_inline proc "c" (target_ : ^PaintTarget){ addr := 0x1000 + 34 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^PaintTarget)) (fp))(target_); }
-PaintTargetEndDirectAccess :: #force_inline proc "c" (target_ : ^PaintTarget){ addr := 0x1000 + 264 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^PaintTarget)) (fp))(target_); }
-PaintTargetStartDirectAccess :: #force_inline proc "c" (target_ : ^PaintTarget, bits_ : ^^u32 , width_ : ^int , height_ : ^int , stride_ : ^int ){ addr := 0x1000 + 276 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^PaintTarget, ^^u32 , ^int , ^int , ^int )) (fp))(target_, bits_, width_, height_, stride_); }
-PaintTargetTake :: #force_inline proc "c" (target_ : ^PaintTarget, width_ : int , height_ : int ) -> bool{ addr := 0x1000 + 35 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^PaintTarget, int , int ) -> bool) (fp))(target_, width_, height_); }
-PaintTargetReturn :: #force_inline proc "c" (target_ : ^PaintTarget){ addr := 0x1000 + 36 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^PaintTarget)) (fp))(target_); }
-TextGetLineHeight :: #force_inline proc "c" (font_ : Font, size_ : u16 ) -> i32{ addr := 0x1000 + 157 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Font, u16 ) -> i32) (fp))(font_, size_); }
-TextGetPartialStringWidth :: #force_inline proc "c" (font_ : Font, size_ : u16 , fullString_ : ^i8 , fullStringBytes_ : int , measureOffset_ : uint , measureBytes_ : int ) -> i32{ addr := 0x1000 + 171 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Font, u16 , ^i8 , int , uint , int ) -> i32) (fp))(font_, size_, fullString_, fullStringBytes_, measureOffset_, measureBytes_); }
-TextGetCharacterAtPoint :: #force_inline proc "c" (font_ : Font, size_ : u16 , fullString_ : ^i8 , fullStringBytes_ : int , measureOffset_ : uint , measureBytes_ : int , pointX_ : ^i32, reverse_ : bool, middle_ : bool) -> int { addr := 0x1000 + 237 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Font, u16 , ^i8 , int , uint , int , ^i32, bool, bool) -> int ) (fp))(font_, size_, fullString_, fullStringBytes_, measureOffset_, measureBytes_, pointX_, reverse_, middle_); }
-AudioStreamClose :: #force_inline proc "c" (stream_ : ^AudioStream){ addr := 0x1000 + 128 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^AudioStream)) (fp))(stream_); }
-AudioStreamOpen :: #force_inline proc "c" (device_ : AudioDeviceID, bufferLengthUs_ : int ) -> ^AudioStream{ addr := 0x1000 + 129 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( AudioDeviceID, int ) -> ^AudioStream) (fp))(device_, bufferLengthUs_); }
-AudioStreamNotify :: #force_inline proc "c" (stream_ : ^AudioStream){ addr := 0x1000 + 130 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^AudioStream)) (fp))(stream_); }
-AudioStreamSend :: #force_inline proc "c" (destination_ : ^AudioStream, source_ : ^AudioStream, time_ : ^f64 ) -> Error{ addr := 0x1000 + 131 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^AudioStream, ^AudioStream, ^f64 ) -> Error) (fp))(destination_, source_, time_); }
-AddressResolve :: #force_inline proc "c" (domain_ : string, flags_ : u32 , address_ : ^Address) -> Error{ addr := 0x1000 + 99 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, u32 , ^Address) -> Error) (fp))(raw_data(domain_), len(domain_), flags_, address_); }
-ConnectionClose :: #force_inline proc "c" (connection_ : ^Connection){ addr := 0x1000 + 321 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Connection)) (fp))(connection_); }
-ConnectionNotify :: #force_inline proc "c" (connection_ : ^Connection){ addr := 0x1000 + 322 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Connection)) (fp))(connection_); }
-ConnectionOpen :: #force_inline proc "c" (connection_ : ^Connection, flags_ : u32 ) -> Error{ addr := 0x1000 + 100 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Connection, u32 ) -> Error) (fp))(connection_, flags_); }
-ConnectionPoll :: #force_inline proc "c" (connection_ : ^Connection){ addr := 0x1000 + 303 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Connection)) (fp))(connection_); }
-ConnectionRead :: #force_inline proc "c" (connection_ : ^Connection, buffer_ : rawptr, bufferBytes_ : int , bytesRead_ : ^int ) -> Error{ addr := 0x1000 + 325 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Connection, rawptr, int , ^int ) -> Error) (fp))(connection_, buffer_, bufferBytes_, bytesRead_); }
-ConnectionWriteSync :: #force_inline proc "c" (connection_ : ^Connection, data_ : rawptr, dataBytes_ : int ) -> Error{ addr := 0x1000 + 323 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Connection, rawptr, int ) -> Error) (fp))(connection_, data_, dataBytes_); }
-GameControllerStatePoll :: #force_inline proc "c" (buffer_ : ^GameControllerState) -> int { addr := 0x1000 + 299 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^GameControllerState) -> int ) (fp))(buffer_); }
-EventCreate :: #force_inline proc "c" (autoReset_ : bool) -> Handle{ addr := 0x1000 + 132 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( bool) -> Handle) (fp))(autoReset_); }
-EventForward :: #force_inline proc "c" (event_ : Handle, eventSink_ : Handle, data_ : Generic){ addr := 0x1000 + 133 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle, Handle, Generic)) (fp))(event_, eventSink_, data_); }
-EventPoll :: #force_inline proc "c" (event_ : Handle) -> Error{ addr := 0x1000 + 134 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle) -> Error) (fp))(event_); }
-EventReset :: #force_inline proc "c" (event_ : Handle){ addr := 0x1000 + 135 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle)) (fp))(event_); }
-EventSet :: #force_inline proc "c" (event_ : Handle){ addr := 0x1000 + 136 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle)) (fp))(event_); }
-EventSinkCreate :: #force_inline proc "c" (ignoreDuplicates_ : bool) -> Handle{ addr := 0x1000 + 137 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( bool) -> Handle) (fp))(ignoreDuplicates_); }
-EventSinkPop :: #force_inline proc "c" (eventSink_ : Handle, data_ : ^Generic) -> Error{ addr := 0x1000 + 138 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, ^Generic) -> Error) (fp))(eventSink_, data_); }
-EventSinkPush :: #force_inline proc "c" (eventSink_ : Handle, data_ : Generic) -> Error{ addr := 0x1000 + 139 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, Generic) -> Error) (fp))(eventSink_, data_); }
-MutexAcquire :: #force_inline proc "c" (mutex_ : ^Mutex){ addr := 0x1000 + 140 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Mutex)) (fp))(mutex_); }
-MutexDestroy :: #force_inline proc "c" (mutex_ : ^Mutex){ addr := 0x1000 + 141 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Mutex)) (fp))(mutex_); }
-MutexRelease :: #force_inline proc "c" (mutex_ : ^Mutex){ addr := 0x1000 + 142 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Mutex)) (fp))(mutex_); }
-PerformanceTimerPush :: #force_inline proc "c" (){ addr := 0x1000 + 143 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))(); }
-PerformanceTimerPop :: #force_inline proc "c" () -> f64 { addr := 0x1000 + 144 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> f64 ) (fp))(); }
-SchedulerYield :: #force_inline proc "c" (){ addr := 0x1000 + 145 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))(); }
-Sleep :: #force_inline proc "c" (milliseconds_ : u64 ){ addr := 0x1000 + 146 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( u64 )) (fp))(milliseconds_); }
-SpinlockAcquire :: #force_inline proc "c" (spinlock_ : ^Spinlock){ addr := 0x1000 + 147 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Spinlock)) (fp))(spinlock_); }
-SpinlockRelease :: #force_inline proc "c" (spinlock_ : ^Spinlock){ addr := 0x1000 + 148 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Spinlock)) (fp))(spinlock_); }
-TimerCreate :: #force_inline proc "c" () -> Handle{ addr := 0x1000 + 149 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> Handle) (fp))(); }
-TimerSet :: #force_inline proc "c" (handle_ : Handle, afterMs_ : u64 , callback_ : TimerCallbackFunction, argument_ : Generic){ addr := 0x1000 + 150 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle, u64 , TimerCallbackFunction, Generic)) (fp))(handle_, afterMs_, callback_, argument_); }
-Wait :: #force_inline proc "c" (objects_ : ^Handle, objectCount_ : int , timeoutMs_ : uint ) -> uint { addr := 0x1000 + 151 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Handle, int , uint ) -> uint ) (fp))(objects_, objectCount_, timeoutMs_); }
-CStringLength :: #force_inline proc "c" (string_ : cstring ) -> int { addr := 0x1000 + 152 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( cstring ) -> int ) (fp))(string_); }
-StringAllocateAndFormat :: #force_inline proc "c" (bytes_ : ^int , format_ : cstring , _varargs_ : ..any) -> ^i8 { addr := 0x1000 + 153 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^int , cstring , ..any) -> ^i8 ) (fp))(bytes_, format_, _varargs_); }
-StringCompare :: #force_inline proc "c" (s1_ : string, s2_ : string) -> i32{ addr := 0x1000 + 155 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^u8, int) -> i32) (fp))(raw_data(s1_), len(s1_), raw_data(s2_), len(s2_)); }
-StringCompareRaw :: #force_inline proc "c" (s1_ : string, s2_ : string) -> i32{ addr := 0x1000 + 156 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^u8, int) -> i32) (fp))(raw_data(s1_), len(s1_), raw_data(s2_), len(s2_)); }
-StringFormat :: #force_inline proc "c" (buffer_ : ^i8 , bufferLength_ : int , format_ : cstring , _varargs_ : ..any) -> int { addr := 0x1000 + 158 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , int , cstring , ..any) -> int ) (fp))(buffer_, bufferLength_, format_, _varargs_); }
-StringFormatTemporary :: #force_inline proc "c" (format_ : cstring , _varargs_ : ..any) -> ^i8 { addr := 0x1000 + 159 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( cstring , ..any) -> ^i8 ) (fp))(format_, _varargs_); }
-StringFormatAppend :: #force_inline proc "c" (buffer_ : ^i8 , bufferLength_ : int , bufferPosition_ : ^int , format_ : cstring , _varargs_ : ..any) -> bool{ addr := 0x1000 + 161 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , int , ^int , cstring , ..any) -> bool) (fp))(buffer_, bufferLength_, bufferPosition_, format_, _varargs_); }
-StringLength :: #force_inline proc "c" (string_ : ^i8 , end_ : u8 ) -> int { addr := 0x1000 + 163 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , u8 ) -> int ) (fp))(string_, end_); }
-StringStartsWith :: #force_inline proc "c" (string_ : string, prefix_ : string, caseInsensitive_ : bool) -> bool{ addr := 0x1000 + 166 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^u8, int, bool) -> bool) (fp))(raw_data(string_), len(string_), raw_data(prefix_), len(prefix_), caseInsensitive_); }
-StringZeroTerminate :: #force_inline proc "c" (string_ : string) -> ^i8 { addr := 0x1000 + 167 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int) -> ^i8 ) (fp))(raw_data(string_), len(string_)); }
-CRTabs :: #force_inline proc "c" (n_ : i32) -> i32{ addr := 0x1000 + 168 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> i32) (fp))(n_); }
-CRTacosf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 169 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_); }
-CRTasinf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 170 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_); }
-CRTatan2f :: #force_inline proc "c" (y_ : f32 , x_ : f32 ) -> f32 { addr := 0x1000 + 172 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 , f32 ) -> f32 ) (fp))(y_, x_); }
-CRTatanf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 173 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_); }
-CRTatoi :: #force_inline proc "c" (string_ : ^i8 ) -> i32{ addr := 0x1000 + 174 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 ) -> i32) (fp))(string_); }
-CRTcalloc :: #force_inline proc "c" (num_ : int , size_ : int ) -> rawptr{ addr := 0x1000 + 175 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( int , int ) -> rawptr) (fp))(num_, size_); }
-CRTceil :: #force_inline proc "c" (x_ : f64 ) -> f64 { addr := 0x1000 + 176 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f64 ) -> f64 ) (fp))(x_); }
-CRTceilf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 177 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_); }
-CRTcosf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 178 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_); }
-CRTexp :: #force_inline proc "c" (x_ : f64 ) -> f64 { addr := 0x1000 + 326 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f64 ) -> f64 ) (fp))(x_); }
-CRTexp2f :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 327 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_); }
-CRTfabs :: #force_inline proc "c" (x_ : f64 ) -> f64 { addr := 0x1000 + 179 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f64 ) -> f64 ) (fp))(x_); }
-CRTfabsf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 344 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_); }
-CRTfloor :: #force_inline proc "c" (x_ : f64 ) -> f64 { addr := 0x1000 + 181 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f64 ) -> f64 ) (fp))(x_); }
-CRTfloorf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 182 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_); }
-CRTfmodf :: #force_inline proc "c" (x_ : f32 , y_ : f32 ) -> f32 { addr := 0x1000 + 183 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 , f32 ) -> f32 ) (fp))(x_, y_); }
-CRTfree :: #force_inline proc "c" (ptr_ : rawptr){ addr := 0x1000 + 184 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr)) (fp))(ptr_); }
-CRTgetenv :: #force_inline proc "c" (name_ : ^i8 ) -> ^i8 { addr := 0x1000 + 185 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 ) -> ^i8 ) (fp))(name_); }
-CRTisalpha :: #force_inline proc "c" (c_ : i32) -> i32{ addr := 0x1000 + 186 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> i32) (fp))(c_); }
-CRTisdigit :: #force_inline proc "c" (c_ : i32) -> i32{ addr := 0x1000 + 187 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> i32) (fp))(c_); }
-CRTisnanf :: #force_inline proc "c" (f_ : f32 ) -> bool{ addr := 0x1000 + 345 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> bool) (fp))(f_); }
-CRTisspace :: #force_inline proc "c" (c_ : i32) -> i32{ addr := 0x1000 + 188 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> i32) (fp))(c_); }
-CRTisupper :: #force_inline proc "c" (c_ : i32) -> i32{ addr := 0x1000 + 189 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> i32) (fp))(c_); }
-CRTisxdigit :: #force_inline proc "c" (c_ : i32) -> i32{ addr := 0x1000 + 190 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> i32) (fp))(c_); }
-CRTmalloc :: #force_inline proc "c" (size_ : int ) -> rawptr{ addr := 0x1000 + 191 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( int ) -> rawptr) (fp))(size_); }
-CRTmemchr :: #force_inline proc "c" (_s_ : rawptr, _c_ : i32, n_ : int ) -> rawptr{ addr := 0x1000 + 192 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, i32, int ) -> rawptr) (fp))(_s_, _c_, n_); }
-CRTmemcmp :: #force_inline proc "c" (s1_ : rawptr, s2_ : rawptr, n_ : int ) -> i32{ addr := 0x1000 + 193 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, rawptr, int ) -> i32) (fp))(s1_, s2_, n_); }
-CRTmemcpy :: #force_inline proc "c" (dest_ : rawptr, src_ : rawptr, n_ : int ) -> rawptr{ addr := 0x1000 + 194 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, rawptr, int ) -> rawptr) (fp))(dest_, src_, n_); }
-CRTmemmove :: #force_inline proc "c" (dest_ : rawptr, src_ : rawptr, n_ : int ) -> rawptr{ addr := 0x1000 + 195 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, rawptr, int ) -> rawptr) (fp))(dest_, src_, n_); }
-CRTmemset :: #force_inline proc "c" (s_ : rawptr, c_ : i32, n_ : int ) -> rawptr{ addr := 0x1000 + 196 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, i32, int ) -> rawptr) (fp))(s_, c_, n_); }
-CRTpowf :: #force_inline proc "c" (x_ : f32 , y_ : f32 ) -> f32 { addr := 0x1000 + 328 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 , f32 ) -> f32 ) (fp))(x_, y_); }
-CRTqsort :: #force_inline proc "c" (_base_ : rawptr, nmemb_ : int , size_ : int , compar_ : CRTComparisonCallback){ addr := 0x1000 + 197 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, int , int , CRTComparisonCallback)) (fp))(_base_, nmemb_, size_, compar_); }
-CRTrealloc :: #force_inline proc "c" (ptr_ : rawptr, size_ : int ) -> rawptr{ addr := 0x1000 + 198 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, int ) -> rawptr) (fp))(ptr_, size_); }
-CRTsinf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 199 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_); }
-CRTsnprintf :: #force_inline proc "c" (buffer_ : ^i8 , bufferSize_ : int , format_ : ^i8 , _varargs_ : ..any) -> i32{ addr := 0x1000 + 200 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , int , ^i8 , ..any) -> i32) (fp))(buffer_, bufferSize_, format_, _varargs_); }
-CRTsprintf :: #force_inline proc "c" (buffer_ : ^i8 , format_ : ^i8 , _varargs_ : ..any) -> i32{ addr := 0x1000 + 201 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^i8 , ..any) -> i32) (fp))(buffer_, format_, _varargs_); }
-CRTsqrt :: #force_inline proc "c" (x_ : f64 ) -> f64 { addr := 0x1000 + 202 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f64 ) -> f64 ) (fp))(x_); }
-CRTsqrtf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 203 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_); }
-CRTstrcat :: #force_inline proc "c" (dest_ : ^i8 , src_ : ^i8 ) -> ^i8 { addr := 0x1000 + 205 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^i8 ) -> ^i8 ) (fp))(dest_, src_); }
-CRTstrchr :: #force_inline proc "c" (s_ : ^i8 , c_ : i32) -> ^i8 { addr := 0x1000 + 206 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , i32) -> ^i8 ) (fp))(s_, c_); }
-CRTstrcmp :: #force_inline proc "c" (s1_ : ^i8 , s2_ : ^i8 ) -> i32{ addr := 0x1000 + 207 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^i8 ) -> i32) (fp))(s1_, s2_); }
-CRTstrcpy :: #force_inline proc "c" (dest_ : ^i8 , src_ : ^i8 ) -> ^i8 { addr := 0x1000 + 208 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^i8 ) -> ^i8 ) (fp))(dest_, src_); }
-CRTstrdup :: #force_inline proc "c" (string_ : ^i8 ) -> ^i8 { addr := 0x1000 + 70 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 ) -> ^i8 ) (fp))(string_); }
-CRTstrerror :: #force_inline proc "c" (errnum_ : i32) -> ^i8 { addr := 0x1000 + 209 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> ^i8 ) (fp))(errnum_); }
-CRTstrlen :: #force_inline proc "c" (s_ : ^i8 ) -> int { addr := 0x1000 + 210 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 ) -> int ) (fp))(s_); }
-CRTstrncmp :: #force_inline proc "c" (s1_ : ^i8 , s2_ : ^i8 , n_ : int ) -> i32{ addr := 0x1000 + 211 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^i8 , int ) -> i32) (fp))(s1_, s2_, n_); }
-CRTstrncpy :: #force_inline proc "c" (dest_ : ^i8 , src_ : ^i8 , n_ : int ) -> ^i8 { addr := 0x1000 + 212 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^i8 , int ) -> ^i8 ) (fp))(dest_, src_, n_); }
-CRTstrnlen :: #force_inline proc "c" (s_ : ^i8 , maxlen_ : int ) -> int { addr := 0x1000 + 213 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , int ) -> int ) (fp))(s_, maxlen_); }
-CRTstrstr :: #force_inline proc "c" (haystack_ : ^i8 , needle_ : ^i8 ) -> ^i8 { addr := 0x1000 + 214 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^i8 ) -> ^i8 ) (fp))(haystack_, needle_); }
-CRTstrtol :: #force_inline proc "c" (nptr_ : ^i8 , endptr_ : ^^i8 , base_ : i32) -> i64 { addr := 0x1000 + 215 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^^i8 , i32) -> i64 ) (fp))(nptr_, endptr_, base_); }
-CRTstrtoul :: #force_inline proc "c" (nptr_ : ^i8 , endptr_ : ^^i8 , base_ : i32) -> u64 { addr := 0x1000 + 216 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^^i8 , i32) -> u64 ) (fp))(nptr_, endptr_, base_); }
-CRTtolower :: #force_inline proc "c" (c_ : i32) -> i32{ addr := 0x1000 + 217 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> i32) (fp))(c_); }
-NewPanel :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil) -> ^Panel{ addr := 0x1000 + 219 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring ) -> ^Panel) (fp))(parent_, flags_, cStyle_); }
-NewSplitter :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil) -> ^Splitter{ addr := 0x1000 + 220 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring ) -> ^Splitter) (fp))(parent_, flags_, cStyle_); }
-NewButton :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil, label_ : string = "") -> ^Button{ addr := 0x1000 + 221 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring , ^u8, int) -> ^Button) (fp))(parent_, flags_, cStyle_, raw_data(label_), len(label_)); }
-NewChoice :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil) -> ^Choice{ addr := 0x1000 + 222 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring ) -> ^Choice) (fp))(parent_, flags_, cStyle_); }
-NewColorWell :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil, colorRGB_ : u32 = 0) -> ^ColorWell{ addr := 0x1000 + 223 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring , u32 ) -> ^ColorWell) (fp))(parent_, flags_, cStyle_, colorRGB_); }
-NewTextDisplay :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil, label_ : string = "") -> ^TextDisplay{ addr := 0x1000 + 224 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring , ^u8, int) -> ^TextDisplay) (fp))(parent_, flags_, cStyle_, raw_data(label_), len(label_)); }
-NewIconDisplay :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil, iconID_ : u32 = 0) -> ^IconDisplay{ addr := 0x1000 + 225 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring , u32 ) -> ^IconDisplay) (fp))(parent_, flags_, cStyle_, iconID_); }
-NewImageDisplay :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil) -> ^ImageDisplay{ addr := 0x1000 + 226 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring ) -> ^ImageDisplay) (fp))(parent_, flags_, cStyle_); }
-NewListView :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil, cItemStyle_ : cstring = nil, cHeaderItemStyle_ : cstring = nil, cFooterItemStyle_ : cstring = nil) -> ^ListView{ addr := 0x1000 + 227 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring , cstring , cstring , cstring ) -> ^ListView) (fp))(parent_, flags_, cStyle_, cItemStyle_, cHeaderItemStyle_, cFooterItemStyle_); }
-NewTextbox :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil) -> ^Textbox{ addr := 0x1000 + 228 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring ) -> ^Textbox) (fp))(parent_, flags_, cStyle_); }
-NewCustomElement :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil) -> ^Element{ addr := 0x1000 + 229 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring ) -> ^Element) (fp))(parent_, flags_, cStyle_); }
-NewWindow :: #force_inline proc "c" (instance_ : ^INSTANCE_TYPE, style_ : WindowStyle) -> ^Window{ addr := 0x1000 + 230 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^INSTANCE_TYPE, WindowStyle) -> ^Window) (fp))(instance_, style_); }
-NewMenu :: #force_inline proc "c" (source_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, userCallback_ : MenuCallbackFunction = nil, _context_ : Generic = nil, fixedWidth_ : i32 = 0, fixedHeight_ : i32 = 0) -> ^Menu{ addr := 0x1000 + 231 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , MenuCallbackFunction, Generic, i32, i32) -> ^Menu) (fp))(source_, flags_, userCallback_, _context_, fixedWidth_, fixedHeight_); }
-NewMenuItem :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 , label_ : string = "", callback_ : MenuCallbackFunction = nil, _context_ : Generic = nil){ addr := 0x1000 + 232 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, u64 , ^u8, int, MenuCallbackFunction, Generic)) (fp))(parent_, flags_, raw_data(label_), len(label_), callback_, _context_); }
-NewMenuCommand :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 , label_ : string, command_ : ^Command){ addr := 0x1000 + 233 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, u64 , ^u8, int, ^Command)) (fp))(parent_, flags_, raw_data(label_), len(label_), command_); }
-NewMenuColumn :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT) -> ^Element{ addr := 0x1000 + 234 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 ) -> ^Element) (fp))(parent_, flags_); }
-NewMenuSeparator :: #force_inline proc "c" (parent_ : ^Element){ addr := 0x1000 + 235 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element)) (fp))(parent_); }
-NewSpacer :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 ) -> ^Element{ addr := 0x1000 + 236 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 ) -> ^Element) (fp))(parent_, flags_); }
-NewTextPlan :: #force_inline proc "c" (properties_ : ^TextDisplayProperties, bounds_ : Rectangle, string_ : ^i8 , textRuns_ : ^TextRun, textRunCount_ : int , singleUse_ : bool) -> ^TextPlan{ addr := 0x1000 + 238 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^TextDisplayProperties, Rectangle, ^i8 , ^TextRun, int , bool) -> ^TextPlan) (fp))(properties_, bounds_, string_, textRuns_, textRunCount_, singleUse_); }
-ElementDraw :: #force_inline proc "c" (element_ : ^Element, painter_ : ^Painter){ addr := 0x1000 + 240 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, ^Painter)) (fp))(element_, painter_); }
-ElementFocus :: #force_inline proc "c" (element_ : ^Element, ensureVisible_ : bool = false){ addr := 0x1000 + 243 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, bool)) (fp))(element_, ensureVisible_); }
-ElementSetDisabled :: #force_inline proc "c" (element_ : ^Element, disabled_ : bool = true){ addr := 0x1000 + 244 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, bool)) (fp))(element_, disabled_); }
-ElementSetHidden :: #force_inline proc "c" (element_ : ^Element, hidden_ : bool = true){ addr := 0x1000 + 245 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, bool)) (fp))(element_, hidden_); }
-ElementSetCallback :: #force_inline proc "c" (element_ : ^Element, callback_ : UICallbackFunction){ addr := 0x1000 + 246 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, UICallbackFunction)) (fp))(element_, callback_); }
-ElementGetSize :: #force_inline proc "c" (element_ : ^Element, width_ : ^i32, height_ : ^i32){ addr := 0x1000 + 247 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, ^i32, ^i32)) (fp))(element_, width_, height_); }
-ElementRepaint :: #force_inline proc "c" (element_ : ^Element, all_ : bool, region_ : Rectangle){ addr := 0x1000 + 248 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, bool, Rectangle)) (fp))(element_, all_, region_); }
-ElementSetCellRange :: #force_inline proc "c" (element_ : ^Element, xFrom_ : i32, yFrom_ : i32, xTo_ : i32 = -1, yTo_ : i32 = -1){ addr := 0x1000 + 251 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, i32, i32, i32, i32)) (fp))(element_, xFrom_, yFrom_, xTo_, yTo_); }
-ElementGetInsets :: #force_inline proc "c" (element_ : ^Element) -> Rectangle{ addr := 0x1000 + 253 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element) -> Rectangle) (fp))(element_); }
-ElementGetInsetSize :: #force_inline proc "c" (element_ : ^Element) -> Rectangle{ addr := 0x1000 + 254 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element) -> Rectangle) (fp))(element_); }
-ElementGetMetrics :: #force_inline proc "c" (element_ : ^Element) -> ThemeMetrics{ addr := 0x1000 + 105 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element) -> ThemeMetrics) (fp))(element_); }
-ElementGetPreferredSize :: #force_inline proc "c" (element_ : ^Element) -> Rectangle{ addr := 0x1000 + 255 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element) -> Rectangle) (fp))(element_); }
-ElementMove :: #force_inline proc "c" (element_ : ^Element, x_ : i32, y_ : i32, width_ : i32, height_ : i32){ addr := 0x1000 + 256 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, i32, i32, i32, i32)) (fp))(element_, x_, y_, width_, height_); }
-ElementGetLayoutParent :: #force_inline proc "c" (element_ : ^Element) -> ^Element{ addr := 0x1000 + 257 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element) -> ^Element) (fp))(element_); }
-ElementDestroy :: #force_inline proc "c" (element_ : ^Element){ addr := 0x1000 + 258 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element)) (fp))(element_); }
-ElementDestroyContents :: #force_inline proc "c" (element_ : ^Element){ addr := 0x1000 + 259 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element)) (fp))(element_); }
-ElementStartAnimating :: #force_inline proc "c" (element_ : ^Element) -> bool{ addr := 0x1000 + 260 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element) -> bool) (fp))(element_); }
-WindowGetBounds :: #force_inline proc "c" (window_ : ^Window) -> Rectangle{ addr := 0x1000 + 265 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Window) -> Rectangle) (fp))(window_); }
-WindowGetToolbar :: #force_inline proc "c" (window_ : ^Window) -> ^Element{ addr := 0x1000 + 266 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Window) -> ^Element) (fp))(window_); }
-WindowSetIcon :: #force_inline proc "c" (window_ : ^Window, iconID_ : u32 ){ addr := 0x1000 + 267 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Window, u32 )) (fp))(window_, iconID_); }
-WindowSetTitle :: #force_inline proc "c" (window_ : ^Window, title_ : string = ""){ addr := 0x1000 + 268 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Window, ^u8, int)) (fp))(window_, raw_data(title_), len(title_)); }
-MenuGetSource :: #force_inline proc "c" (menu_ : ^Menu) -> ^Element{ addr := 0x1000 + 269 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Menu) -> ^Element) (fp))(menu_); }
-ButtonSetIcon :: #force_inline proc "c" (button_ : ^Button, iconID_ : u32 ){ addr := 0x1000 + 270 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Button, u32 )) (fp))(button_, iconID_); }
-ButtonSetCheck :: #force_inline proc "c" (button_ : ^Button, checkState_ : CheckState = CHECK_CHECKED, sendUpdatedMessage_ : bool = true){ addr := 0x1000 + 271 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Button, CheckState, bool)) (fp))(button_, checkState_, sendUpdatedMessage_); }
-ButtonGetCheck :: #force_inline proc "c" (button_ : ^Button) -> CheckState{ addr := 0x1000 + 272 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Button) -> CheckState) (fp))(button_); }
-ButtonOnCommand :: #force_inline proc "c" (button_ : ^Button, callback_ : CommandCallbackFunction, command_ : ^Command = nil){ addr := 0x1000 + 273 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Button, CommandCallbackFunction, ^Command)) (fp))(button_, callback_, command_); }
-ButtonSetCheckBuddy :: #force_inline proc "c" (button_ : ^Button, checkBuddy_ : ^Element){ addr := 0x1000 + 274 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Button, ^Element)) (fp))(button_, checkBuddy_); }
-ButtonGetCheckBuddy :: #force_inline proc "c" (button_ : ^Button) -> ^Element{ addr := 0x1000 + 275 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Button) -> ^Element) (fp))(button_); }
-TextboxFind :: #force_inline proc "c" (textbox_ : ^Textbox, string_ : string, line_ : ^i32 , byte_ : ^i32 , flags_ : u32 ) -> bool{ addr := 0x1000 + 277 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Textbox, ^u8, int, ^i32 , ^i32 , u32 ) -> bool) (fp))(textbox_, raw_data(string_), len(string_), line_, byte_, flags_); }
-TextboxInsert :: #force_inline proc "c" (textbox_ : ^Textbox, string_ : string = "", sendUpdatedMessage_ : bool = true){ addr := 0x1000 + 278 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox, ^u8, int, bool)) (fp))(textbox_, raw_data(string_), len(string_), sendUpdatedMessage_); }
-TextboxGetContents :: #force_inline proc "c" (textbox_ : ^Textbox, bytes_ : ^int = nil) -> ^i8 { addr := 0x1000 + 279 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Textbox, ^int ) -> ^i8 ) (fp))(textbox_, bytes_); }
-TextboxGetLineLength :: #force_inline proc "c" (textbox_ : ^Textbox, line_ : uint = 0) -> int { addr := 0x1000 + 280 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Textbox, uint ) -> int ) (fp))(textbox_, line_); }
-TextboxGetSelection :: #force_inline proc "c" (textbox_ : ^Textbox, fromLine_ : ^i32 , fromByte_ : ^i32 , toLine_ : ^i32 , toByte_ : ^i32 ){ addr := 0x1000 + 281 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox, ^i32 , ^i32 , ^i32 , ^i32 )) (fp))(textbox_, fromLine_, fromByte_, toLine_, toByte_); }
-TextboxMoveCaret :: #force_inline proc "c" (textbox_ : ^Textbox, line_ : i32 , byte_ : i32 ){ addr := 0x1000 + 282 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox, i32 , i32 )) (fp))(textbox_, line_, byte_); }
-TextboxSetSelection :: #force_inline proc "c" (textbox_ : ^Textbox, fromLine_ : i32 , fromByte_ : i32 , toLine_ : i32 , toByte_ : i32 ){ addr := 0x1000 + 283 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox, i32 , i32 , i32 , i32 )) (fp))(textbox_, fromLine_, fromByte_, toLine_, toByte_); }
-TextboxSelectAll :: #force_inline proc "c" (textbox_ : ^Textbox){ addr := 0x1000 + 284 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox)) (fp))(textbox_); }
-TextboxClear :: #force_inline proc "c" (textbox_ : ^Textbox, sendUpdatedMessage_ : bool){ addr := 0x1000 + 285 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox, bool)) (fp))(textbox_, sendUpdatedMessage_); }
-TextboxUseNumberOverlay :: #force_inline proc "c" (textbox_ : ^Textbox, defaultBehaviour_ : bool){ addr := 0x1000 + 286 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox, bool)) (fp))(textbox_, defaultBehaviour_); }
-TextboxUseBreadcrumbOverlay :: #force_inline proc "c" (textbox_ : ^Textbox){ addr := 0x1000 + 287 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox)) (fp))(textbox_); }
-TextboxMoveCaretRelative :: #force_inline proc "c" (textbox_ : ^Textbox, flags_ : u32 ){ addr := 0x1000 + 118 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox, u32 )) (fp))(textbox_, flags_); }
-TextboxEnsureCaretVisible :: #force_inline proc "c" (textbox_ : ^Textbox){ addr := 0x1000 + 119 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox)) (fp))(textbox_); }
-PanelSetBands :: #force_inline proc "c" (panel_ : ^Panel, columnCount_ : int , rowCount_ : int = 0, columns_ : ^PanelBand = nil, rows_ : ^PanelBand = nil){ addr := 0x1000 + 288 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Panel, int , int , ^PanelBand, ^PanelBand)) (fp))(panel_, columnCount_, rowCount_, columns_, rows_); }
-PanelSwitchTo :: #force_inline proc "c" (panel_ : ^Panel, targetChild_ : ^Element, transitionType_ : TransitionType, destroyPreviousAfterTransitionCompletes_ : bool = false){ addr := 0x1000 + 289 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Panel, ^Element, TransitionType, bool)) (fp))(panel_, targetChild_, transitionType_, destroyPreviousAfterTransitionCompletes_); }
-TextPlanGetWidth :: #force_inline proc "c" (plan_ : ^TextPlan) -> i32{ addr := 0x1000 + 290 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^TextPlan) -> i32) (fp))(plan_); }
-TextPlanGetHeight :: #force_inline proc "c" (plan_ : ^TextPlan) -> i32{ addr := 0x1000 + 291 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^TextPlan) -> i32) (fp))(plan_); }
-TextPlanGetLineCount :: #force_inline proc "c" (plan_ : ^TextPlan) -> int { addr := 0x1000 + 292 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^TextPlan) -> int ) (fp))(plan_); }
-TextPlanDestroy :: #force_inline proc "c" (plan_ : ^TextPlan){ addr := 0x1000 + 293 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^TextPlan)) (fp))(plan_); }
-TextDisplaySetContents :: #force_inline proc "c" (display_ : ^TextDisplay, contents_ : string = ""){ addr := 0x1000 + 294 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^TextDisplay, ^u8, int)) (fp))(display_, raw_data(contents_), len(contents_)); }
-ColorWellGetRGB :: #force_inline proc "c" (well_ : ^ColorWell) -> u32 { addr := 0x1000 + 304 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^ColorWell) -> u32 ) (fp))(well_); }
-ColorWellSetRGB :: #force_inline proc "c" (well_ : ^ColorWell, colorRGB_ : u32 , sendChangedMessage_ : bool){ addr := 0x1000 + 305 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ColorWell, u32 , bool)) (fp))(well_, colorRGB_, sendChangedMessage_); }
-ColorWellSetIndeterminate :: #force_inline proc "c" (well_ : ^ColorWell){ addr := 0x1000 + 306 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ColorWell)) (fp))(well_); }
-ChoiceAddMenuItem :: #force_inline proc "c" (choice_ : ^Choice, item_ : Generic){ addr := 0x1000 + 307 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Choice, Generic)) (fp))(choice_, item_); }
-ChoiceSetItem :: #force_inline proc "c" (choice_ : ^Choice, item_ : Generic, sendUpdatedMessage_ : bool = true){ addr := 0x1000 + 308 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Choice, Generic, bool)) (fp))(choice_, item_, sendUpdatedMessage_); }
-ChoiceGetItem :: #force_inline proc "c" (choice_ : ^Choice) -> Generic{ addr := 0x1000 + 309 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Choice) -> Generic) (fp))(choice_); }
-ListViewInsertGroup :: #force_inline proc "c" (view_ : ^ListView, group_ : i32 , flags_ : u32 = FLAGS_DEFAULT){ addr := 0x1000 + 310 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView, i32 , u32 )) (fp))(view_, group_, flags_); }
-ListViewInsert :: #force_inline proc "c" (view_ : ^ListView, group_ : i32 , firstIndex_ : Generic, lastIndex_ : Generic, count_ : i64 = -1){ addr := 0x1000 + 311 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView, i32 , Generic, Generic, i64 )) (fp))(view_, group_, firstIndex_, lastIndex_, count_); }
-ListViewRemove :: #force_inline proc "c" (view_ : ^ListView, group_ : i32 , firstIndex_ : Generic, lastIndex_ : Generic, count_ : i64 = -1){ addr := 0x1000 + 312 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView, i32 , Generic, Generic, i64 )) (fp))(view_, group_, firstIndex_, lastIndex_, count_); }
-ListViewRemoveAll :: #force_inline proc "c" (view_ : ^ListView, group_ : i32 ){ addr := 0x1000 + 313 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView, i32 )) (fp))(view_, group_); }
-ListViewGetIndex :: #force_inline proc "c" (view_ : ^ListView, item_ : ^Element) -> Generic{ addr := 0x1000 + 314 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^ListView, ^Element) -> Generic) (fp))(view_, item_); }
-ListViewSetColumns :: #force_inline proc "c" (view_ : ^ListView, columns_ : ^ListViewColumn, columnCount_ : int ){ addr := 0x1000 + 315 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView, ^ListViewColumn, int )) (fp))(view_, columns_, columnCount_); }
-ListViewSetEmptyMessage :: #force_inline proc "c" (view_ : ^ListView, message_ : string = ""){ addr := 0x1000 + 262 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView, ^u8, int)) (fp))(view_, raw_data(message_), len(message_)); }
-ListViewSelect :: #force_inline proc "c" (view_ : ^ListView, group_ : i32 , index_ : Generic){ addr := 0x1000 + 316 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView, i32 , Generic)) (fp))(view_, group_, index_); }
-ListViewResetSearchBuffer :: #force_inline proc "c" (view_ : ^ListView){ addr := 0x1000 + 317 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView)) (fp))(view_); }
+ThreadEntryFunction :: distinct #type proc "c" ( Generic)
+ComparisonCallbackFunction :: distinct #type proc "c" ( rawptr, rawptr, Generic) -> i32
+SwapCallbackFunction :: distinct #type proc "c" ( rawptr, rawptr, Generic)
+CRTComparisonCallback :: distinct #type proc "c" ( rawptr, rawptr) -> i32
+TimerCallbackFunction :: distinct #type proc "c" ( Generic)
+MenuCallbackFunction :: distinct #type proc "c" ( ^Menu, Generic)
+StorePullCallbackFunction :: distinct #type proc "c" ( ^Store, ^INSTANCE_TYPE, Generic, i32, Generic, ^FormatValue)
+StoreCallbackFunction :: distinct #type proc "c" ( ^Store, ^INSTANCE_TYPE, Generic, Generic)
+DirectoryMonitorCallbackFunction :: distinct #type proc "c" ( ^DirectoryMonitor, i32, ^i8 , int , ^i8 , int , Generic)
+Batch :: #force_inline proc "c" (calls_ : ^BatchCall, count_ : int ){ addr := 0x1000 + 0 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^BatchCall, int )) (fp))(calls_, count_)}
+GetCreationArgument :: #force_inline proc "c" (object_ : Handle) -> Generic{ addr := 0x1000 + 1 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle) -> Generic) (fp))(object_)}
+GetSystemInformation :: #force_inline proc "c" (systemInformation_ : ^SystemInformation){ addr := 0x1000 + 2 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^SystemInformation)) (fp))(systemInformation_)}
+HandleClose :: #force_inline proc "c" (handle_ : Handle) -> Error{ addr := 0x1000 + 3 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle) -> Error) (fp))(handle_)}
+InitialiseCStandardLibrary :: #force_inline proc "c" (argc_ : ^i32, argv_ : ^^^i8 ){ addr := 0x1000 + 4 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^i32, ^^^i8 )) (fp))(argc_, argv_)}
+MailslotSendData :: #force_inline proc "c" (mailslot_ : Handle, data_ : rawptr, bytes_ : int ) -> bool{ addr := 0x1000 + 5 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, rawptr, int ) -> bool) (fp))(mailslot_, data_, bytes_)}
+MakeLinuxSystemCall2 :: #force_inline proc "c" (n_ : int , a1_ : int , a2_ : int , a3_ : int , a4_ : int , a5_ : int , a6_ : int ) -> int { addr := 0x1000 + 6 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( int , int , int , int , int , int , int ) -> int ) (fp))(n_, a1_, a2_, a3_, a4_, a5_, a6_)}
+SystemGetConstant :: #force_inline proc "c" (index_ : uint ) -> u64 { addr := 0x1000 + 8 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( uint ) -> u64 ) (fp))(index_)}
+TakeSystemSnapshot :: #force_inline proc "c" (type_ : i32, bufferSize_ : ^int ) -> Handle{ addr := 0x1000 + 9 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32, ^int ) -> Handle) (fp))(type_, bufferSize_)}
+UserGetHomeFolder :: #force_inline proc "c" (buffer_ : ^i8 , bufferBytes_ : int ) -> int { addr := 0x1000 + 10 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , int ) -> int ) (fp))(buffer_, bufferBytes_)}
+_EsInstanceCreate :: #force_inline proc "c" (bytes_ : int , message_ : ^Message, cName_ : cstring ) -> ^Instance{ addr := 0x1000 + 11 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( int , ^Message, cstring ) -> ^Instance) (fp))(bytes_, message_, cName_)}
+_EsSyscall :: #force_inline proc "c" (a_ : uint , b_ : uint , c_ : uint , d_ : uint , e_ : uint , f_ : uint ) -> uint { addr := 0x1000 + 12 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( uint , uint , uint , uint , uint , uint ) -> uint ) (fp))(a_, b_, c_, d_, e_, f_)}
+ApplicationStart :: #force_inline proc "c" (information_ : ^ApplicationStartupInformation){ addr := 0x1000 + 124 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ApplicationStartupInformation)) (fp))(information_)}
+SystemConfigurationReadAll :: #force_inline proc "c" (groupCount_ : ^int ) -> ^SystemConfigurationGroup{ addr := 0x1000 + 164 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^int ) -> ^SystemConfigurationGroup) (fp))(groupCount_)}
+SystemConfigurationReadInteger :: #force_inline proc "c" (section_ : string, key_ : string, defaultValue_ : i64 = 0) -> i64 { addr := 0x1000 + 295 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^u8, int, i64 ) -> i64 ) (fp))(raw_data(section_), len(section_), raw_data(key_), len(key_), defaultValue_)}
+SystemConfigurationGroupReadInteger :: #force_inline proc "c" (group_ : ^SystemConfigurationGroup, key_ : string, defaultValue_ : i64 = 0) -> i64 { addr := 0x1000 + 296 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^SystemConfigurationGroup, ^u8, int, i64 ) -> i64 ) (fp))(group_, raw_data(key_), len(key_), defaultValue_)}
+SystemConfigurationReadString :: #force_inline proc "c" (section_ : string, key_ : string, valueBytes_ : ^int = nil) -> ^i8 { addr := 0x1000 + 297 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^u8, int, ^int ) -> ^i8 ) (fp))(raw_data(section_), len(section_), raw_data(key_), len(key_), valueBytes_)}
+SystemConfigurationGroupReadString :: #force_inline proc "c" (group_ : ^SystemConfigurationGroup, key_ : string, valueBytes_ : ^int = nil) -> ^i8 { addr := 0x1000 + 298 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^SystemConfigurationGroup, ^u8, int, ^int ) -> ^i8 ) (fp))(group_, raw_data(key_), len(key_), valueBytes_)}
+INIParse :: #force_inline proc "c" (s_ : ^INIState) -> bool{ addr := 0x1000 + 7 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^INIState) -> bool) (fp))(s_)}
+INIPeek :: #force_inline proc "c" (s_ : ^INIState) -> bool{ addr := 0x1000 + 87 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^INIState) -> bool) (fp))(s_)}
+INIFormat :: #force_inline proc "c" (s_ : ^INIState, buffer_ : ^i8 , bytes_ : int ) -> int { addr := 0x1000 + 125 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^INIState, ^i8 , int ) -> int ) (fp))(s_, buffer_, bytes_)}
+INIZeroTerminate :: #force_inline proc "c" (s_ : ^INIState){ addr := 0x1000 + 126 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^INIState)) (fp))(s_)}
+CommandAddButton :: #force_inline proc "c" (command_ : ^Command, button_ : ^Button){ addr := 0x1000 + 13 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Command, ^Button)) (fp))(command_, button_)}
+CommandByID :: #force_inline proc "c" (instance_ : ^Instance, stableID_ : u32 ) -> ^Command{ addr := 0x1000 + 14 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Instance, u32 ) -> ^Command) (fp))(instance_, stableID_)}
+CommandRegister :: #force_inline proc "c" (command_ : ^Command, instance_ : ^Instance, callback_ : CommandCallbackFunction, stableID_ : u32 , cDefaultKeyboardShortcut_ : cstring = nil, enabled_ : bool = false) -> ^Command{ addr := 0x1000 + 15 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Command, ^Instance, CommandCallbackFunction, u32 , cstring , bool) -> ^Command) (fp))(command_, instance_, callback_, stableID_, cDefaultKeyboardShortcut_, enabled_)}
+CommandSetCallback :: #force_inline proc "c" (command_ : ^Command, callback_ : CommandCallbackFunction){ addr := 0x1000 + 16 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Command, CommandCallbackFunction)) (fp))(command_, callback_)}
+CommandSetDisabled :: #force_inline proc "c" (command_ : ^Command, disabled_ : bool){ addr := 0x1000 + 17 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Command, bool)) (fp))(command_, disabled_)}
+DialogClose :: #force_inline proc "c" (window_ : ^Window){ addr := 0x1000 + 18 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Window)) (fp))(window_)}
+DialogShow :: #force_inline proc "c" (window_ : ^Window) -> ^Element{ addr := 0x1000 + 19 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Window) -> ^Element) (fp))(window_)}
+DialogShowAlert :: #force_inline proc "c" (window_ : ^Window, title_ : string, content_ : string, iconID_ : u32 , addOKButton_ : bool = false) -> ^Element{ addr := 0x1000 + 20 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Window, ^u8, int, ^u8, int, u32 , bool) -> ^Element) (fp))(window_, raw_data(title_), len(title_), raw_data(content_), len(content_), iconID_, addOKButton_)}
+InstanceDestroy :: #force_inline proc "c" (instance_ : ^INSTANCE_TYPE){ addr := 0x1000 + 300 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^INSTANCE_TYPE)) (fp))(instance_)}
+KeyboardIsAltHeld :: #force_inline proc "c" () -> bool{ addr := 0x1000 + 21 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> bool) (fp))()}
+KeyboardIsCtrlHeld :: #force_inline proc "c" () -> bool{ addr := 0x1000 + 22 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> bool) (fp))()}
+KeyboardIsShiftHeld :: #force_inline proc "c" () -> bool{ addr := 0x1000 + 23 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> bool) (fp))()}
+MessageGetInputText :: #force_inline proc "c" (message_ : ^Message, buffer_ : ^i8 ) -> int { addr := 0x1000 + 24 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Message, ^i8 ) -> int ) (fp))(message_, buffer_)}
+MessageMutexAcquire :: #force_inline proc "c" (){ addr := 0x1000 + 26 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))()}
+MessageMutexCheck :: #force_inline proc "c" (){ addr := 0x1000 + 27 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))()}
+MessageMutexRelease :: #force_inline proc "c" (){ addr := 0x1000 + 28 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))()}
+MessagePost :: #force_inline proc "c" (target_ : ^Element, message_ : ^Message) -> Error{ addr := 0x1000 + 29 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, ^Message) -> Error) (fp))(target_, message_)}
+MessagePostRemote :: #force_inline proc "c" (process_ : Handle, message_ : ^Message) -> Error{ addr := 0x1000 + 30 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, ^Message) -> Error) (fp))(process_, message_)}
+MessageSend :: #force_inline proc "c" (object_ : ^Element, message_ : ^Message) -> Response{ addr := 0x1000 + 31 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, ^Message) -> Response) (fp))(object_, message_)}
+MessageReceive :: #force_inline proc "c" () -> ^Message{ addr := 0x1000 + 318 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> ^Message) (fp))()}
+MouseGetPosition :: #force_inline proc "c" (relativeElement_ : ^Element = nil) -> Point{ addr := 0x1000 + 32 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element) -> Point) (fp))(relativeElement_)}
+MouseSetPosition :: #force_inline proc "c" (relativeWindow_ : ^Window, x_ : i32, y_ : i32){ addr := 0x1000 + 33 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Window, i32, i32)) (fp))(relativeWindow_, x_, y_)}
+StyleInheritRegister :: #force_inline proc "c" (cStyle_ : cstring , cParent_ : cstring , customMetrics_ : ^ThemeMetrics){ addr := 0x1000 + 239 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( cstring , cstring , ^ThemeMetrics)) (fp))(cStyle_, cParent_, customMetrics_)}
+StyleRefreshAll :: #force_inline proc "c" (window_ : ^Element){ addr := 0x1000 + 37 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element)) (fp))(window_)}
+UISetDPI :: #force_inline proc "c" (dpiScale_ : i32){ addr := 0x1000 + 38 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( i32)) (fp))(dpiScale_)}
+DirectoryEnumerateChildren :: #force_inline proc "c" (path_ : string, buffer_ : ^^DirectoryChild) -> int { addr := 0x1000 + 39 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^^DirectoryChild) -> int ) (fp))(raw_data(path_), len(path_), buffer_)}
+DirectoryEnumerateChildrenFromHandle :: #force_inline proc "c" (directory_ : Handle, buffer_ : ^DirectoryChild, bufferCount_ : int ) -> int { addr := 0x1000 + 40 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, ^DirectoryChild, int ) -> int ) (fp))(directory_, buffer_, bufferCount_)}
+DirectoryMonitorCreate :: #force_inline proc "c" (path_ : string, flags_ : u32 , callback_ : DirectoryMonitorCallbackFunction, _context_ : Generic) -> ^DirectoryMonitor{ addr := 0x1000 + 41 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, u32 , DirectoryMonitorCallbackFunction, Generic) -> ^DirectoryMonitor) (fp))(raw_data(path_), len(path_), flags_, callback_, _context_)}
+DirectoryMonitorCreateFromHandle :: #force_inline proc "c" (directory_ : Handle, flags_ : u32 , callback_ : DirectoryMonitorCallbackFunction, _context_ : Generic) -> ^DirectoryMonitor{ addr := 0x1000 + 42 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, u32 , DirectoryMonitorCallbackFunction, Generic) -> ^DirectoryMonitor) (fp))(directory_, flags_, callback_, _context_)}
+DirectoryMonitorDestroy :: #force_inline proc "c" (monitor_ : ^DirectoryMonitor){ addr := 0x1000 + 43 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^DirectoryMonitor)) (fp))(monitor_)}
+FileControl :: #force_inline proc "c" (file_ : Handle, flags_ : u32 ) -> Error{ addr := 0x1000 + 96 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, u32 ) -> Error) (fp))(file_, flags_)}
+FileReadAll :: #force_inline proc "c" (filePath_ : string, fileSize_ : ^int ) -> rawptr{ addr := 0x1000 + 44 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^int ) -> rawptr) (fp))(raw_data(filePath_), len(filePath_), fileSize_)}
+FileReadSync :: #force_inline proc "c" (file_ : Handle, offset_ : FileOffset, size_ : int , buffer_ : rawptr) -> int { addr := 0x1000 + 45 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, FileOffset, int , rawptr) -> int ) (fp))(file_, offset_, size_, buffer_)}
+FileResize :: #force_inline proc "c" (file_ : Handle, newSize_ : FileOffset) -> Error{ addr := 0x1000 + 46 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, FileOffset) -> Error) (fp))(file_, newSize_)}
+FileWriteAll :: #force_inline proc "c" (filePath_ : string, data_ : rawptr, fileSize_ : int ) -> Error{ addr := 0x1000 + 47 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, rawptr, int ) -> Error) (fp))(raw_data(filePath_), len(filePath_), data_, fileSize_)}
+FileWriteAllGather :: #force_inline proc "c" (filePath_ : string, data_ : ^rawptr, fileSize_ : ^int , gatherCount_ : int ) -> Error{ addr := 0x1000 + 48 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^rawptr, ^int , int ) -> Error) (fp))(raw_data(filePath_), len(filePath_), data_, fileSize_, gatherCount_)}
+FileWriteSync :: #force_inline proc "c" (file_ : Handle, offset_ : FileOffset, size_ : int , buffer_ : rawptr) -> int { addr := 0x1000 + 50 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, FileOffset, int , rawptr) -> int ) (fp))(file_, offset_, size_, buffer_)}
+NodeDelete :: #force_inline proc "c" (node_ : Handle) -> Error{ addr := 0x1000 + 51 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle) -> Error) (fp))(node_)}
+NodeDeleteByPath :: #force_inline proc "c" (filePath_ : string) -> Error{ addr := 0x1000 + 52 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int) -> Error) (fp))(raw_data(filePath_), len(filePath_))}
+NodeFindUniqueName :: #force_inline proc "c" (buffer_ : ^i8 , originalBytes_ : int , bufferBytes_ : int ) -> int { addr := 0x1000 + 53 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , int , int ) -> int ) (fp))(buffer_, originalBytes_, bufferBytes_)}
+NodeMove :: #force_inline proc "c" (node_ : Handle, newDirectory_ : Handle, newName_ : string) -> Error{ addr := 0x1000 + 54 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, Handle, ^u8, int) -> Error) (fp))(node_, newDirectory_, raw_data(newName_), len(newName_))}
+NodeOpen :: #force_inline proc "c" (path_ : string, flags_ : u32 , information_ : ^NodeInformation) -> Error{ addr := 0x1000 + 55 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, u32 , ^NodeInformation) -> Error) (fp))(raw_data(path_), len(path_), flags_, information_)}
+NodeOpenRelative :: #force_inline proc "c" (directory_ : Handle, path_ : string, flags_ : u32 , information_ : ^NodeInformation) -> Error{ addr := 0x1000 + 56 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, ^u8, int, u32 , ^NodeInformation) -> Error) (fp))(directory_, raw_data(path_), len(path_), flags_, information_)}
+NodeRefreshInformation :: #force_inline proc "c" (information_ : ^NodeInformation){ addr := 0x1000 + 57 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^NodeInformation)) (fp))(information_)}
+ProcessCrash :: #force_inline proc "c" (error_ : Error, message_ : string){ addr := 0x1000 + 58 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Error, ^u8, int)) (fp))(error_, raw_data(message_), len(message_))}
+ProcessCreate :: #force_inline proc "c" (executablePath_ : string, information_ : ^ProcessInformation, argument_ : Generic) -> Error{ addr := 0x1000 + 59 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^ProcessInformation, Generic) -> Error) (fp))(raw_data(executablePath_), len(executablePath_), information_, argument_)}
+ProcessCreate2 :: #force_inline proc "c" (arguments_ : ^ProcessCreationArguments, information_ : ^ProcessInformation) -> Error{ addr := 0x1000 + 60 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^ProcessCreationArguments, ^ProcessInformation) -> Error) (fp))(arguments_, information_)}
+ProcessGetExitStatus :: #force_inline proc "c" (process_ : Handle) -> i32{ addr := 0x1000 + 61 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle) -> i32) (fp))(process_)}
+ProcessGetID :: #force_inline proc "c" (process_ : Handle) -> uint { addr := 0x1000 + 62 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle) -> uint ) (fp))(process_)}
+ProcessGetState :: #force_inline proc "c" (process_ : Handle, state_ : ^ProcessState){ addr := 0x1000 + 63 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle, ^ProcessState)) (fp))(process_, state_)}
+ProcessOpen :: #force_inline proc "c" (pid_ : u64 ) -> Handle{ addr := 0x1000 + 64 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( u64 ) -> Handle) (fp))(pid_)}
+ProcessPause :: #force_inline proc "c" (process_ : Handle, resume_ : bool){ addr := 0x1000 + 65 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle, bool)) (fp))(process_, resume_)}
+ProcessTerminate :: #force_inline proc "c" (process_ : Handle, status_ : i32){ addr := 0x1000 + 66 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle, i32)) (fp))(process_, status_)}
+ProcessTerminateCurrent :: #force_inline proc "c" (){ addr := 0x1000 + 67 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))()}
+ThreadCreate :: #force_inline proc "c" (entryFunction_ : ThreadEntryFunction, information_ : ^ThreadInformation, argument_ : Generic) -> Error{ addr := 0x1000 + 68 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ThreadEntryFunction, ^ThreadInformation, Generic) -> Error) (fp))(entryFunction_, information_, argument_)}
+ThreadGetID :: #force_inline proc "c" (thread_ : Handle) -> uint { addr := 0x1000 + 69 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle) -> uint ) (fp))(thread_)}
+ThreadTerminate :: #force_inline proc "c" (thread_ : Handle){ addr := 0x1000 + 71 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle)) (fp))(thread_)}
+ArenaAllocate :: #force_inline proc "c" (arena_ : ^Arena, zero_ : bool) -> rawptr{ addr := 0x1000 + 72 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Arena, bool) -> rawptr) (fp))(arena_, zero_)}
+ArenaFree :: #force_inline proc "c" (arena_ : ^Arena, pointer_ : rawptr){ addr := 0x1000 + 73 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Arena, rawptr)) (fp))(arena_, pointer_)}
+ArenaInitialise :: #force_inline proc "c" (arena_ : ^Arena, blockSize_ : int , itemSize_ : int ){ addr := 0x1000 + 74 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Arena, int , int )) (fp))(arena_, blockSize_, itemSize_)}
+ConstantBufferCreate :: #force_inline proc "c" (data_ : rawptr, dataBytes_ : int , targetProcess_ : Handle) -> Handle{ addr := 0x1000 + 75 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, int , Handle) -> Handle) (fp))(data_, dataBytes_, targetProcess_)}
+ConstantBufferRead :: #force_inline proc "c" (constantBuffer_ : Handle, output_ : rawptr){ addr := 0x1000 + 76 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle, rawptr)) (fp))(constantBuffer_, output_)}
+ConstantBufferShare :: #force_inline proc "c" (constantBuffer_ : Handle, targetProcess_ : Handle) -> Handle{ addr := 0x1000 + 77 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, Handle) -> Handle) (fp))(constantBuffer_, targetProcess_)}
+HeapAllocate :: #force_inline proc "c" (size_ : int , zeroMemory_ : bool) -> rawptr{ addr := 0x1000 + 78 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( int , bool) -> rawptr) (fp))(size_, zeroMemory_)}
+HeapFree :: #force_inline proc "c" (address_ : rawptr){ addr := 0x1000 + 79 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr)) (fp))(address_)}
+HeapReallocate :: #force_inline proc "c" (oldAddress_ : rawptr, newAllocationSize_ : int , zeroNewSpace_ : bool) -> rawptr{ addr := 0x1000 + 80 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, int , bool) -> rawptr) (fp))(oldAddress_, newAllocationSize_, zeroNewSpace_)}
+HeapValidate :: #force_inline proc "c" (){ addr := 0x1000 + 81 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))()}
+MemoryCommit :: #force_inline proc "c" (pointer_ : rawptr, bytes_ : int ) -> bool{ addr := 0x1000 + 82 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, int ) -> bool) (fp))(pointer_, bytes_)}
+MemoryCompare :: #force_inline proc "c" (a_ : rawptr, b_ : rawptr, bytes_ : int ) -> i32{ addr := 0x1000 + 83 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, rawptr, int ) -> i32) (fp))(a_, b_, bytes_)}
+MemoryCopy :: #force_inline proc "c" (destination_ : rawptr, source_ : rawptr, bytes_ : int ){ addr := 0x1000 + 84 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, rawptr, int )) (fp))(destination_, source_, bytes_)}
+MemoryCopyReverse :: #force_inline proc "c" (_destination_ : rawptr, _source_ : rawptr, bytes_ : int ){ addr := 0x1000 + 85 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, rawptr, int )) (fp))(_destination_, _source_, bytes_)}
+MemoryDecommit :: #force_inline proc "c" (pointer_ : rawptr, bytes_ : int ) -> bool{ addr := 0x1000 + 320 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, int ) -> bool) (fp))(pointer_, bytes_)}
+MemoryFill :: #force_inline proc "c" (from_ : rawptr, to_ : rawptr, byte_ : u8 ){ addr := 0x1000 + 86 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, rawptr, u8 )) (fp))(from_, to_, byte_)}
+MemoryMove :: #force_inline proc "c" (_start_ : rawptr, _end_ : rawptr, amount_ : int , zeroEmptySpace_ : bool){ addr := 0x1000 + 88 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, rawptr, int , bool)) (fp))(_start_, _end_, amount_, zeroEmptySpace_)}
+MemoryOpen :: #force_inline proc "c" (size_ : int , name_ : string, flags_ : u32 ) -> Handle{ addr := 0x1000 + 89 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( int , ^u8, int, u32 ) -> Handle) (fp))(size_, raw_data(name_), len(name_), flags_)}
+MemoryReserve :: #force_inline proc "c" (size_ : int , protection_ : MemoryProtection = MEMORY_PROTECTION_READ_WRITE, commitAll_ : bool = true) -> rawptr{ addr := 0x1000 + 25 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( int , MemoryProtection, bool) -> rawptr) (fp))(size_, protection_, commitAll_)}
+MemoryShare :: #force_inline proc "c" (sharedMemoryRegion_ : Handle, targetProcess_ : Handle, readOnly_ : bool) -> Handle{ addr := 0x1000 + 90 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, Handle, bool) -> Handle) (fp))(sharedMemoryRegion_, targetProcess_, readOnly_)}
+MemorySumBytes :: #force_inline proc "c" (data_ : ^u8 , bytes_ : int ) -> u8 { addr := 0x1000 + 91 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^u8 , int ) -> u8 ) (fp))(data_, bytes_)}
+MemoryUnreserve :: #force_inline proc "c" (pointer_ : rawptr, size_ : int = 0){ addr := 0x1000 + 319 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, int )) (fp))(pointer_, size_)}
+MemoryZero :: #force_inline proc "c" (destination_ : rawptr, bytes_ : int ){ addr := 0x1000 + 92 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, int )) (fp))(destination_, bytes_)}
+ObjectMap :: #force_inline proc "c" (object_ : Handle, offset_ : uint , size_ : int , flags_ : u32 ) -> rawptr{ addr := 0x1000 + 93 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, uint , int , u32 ) -> rawptr) (fp))(object_, offset_, size_, flags_)}
+AssertionFailure :: #force_inline proc "c" (cFile_ : cstring , line_ : i32){ addr := 0x1000 + 94 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( cstring , i32)) (fp))(cFile_, line_)}
+DoubleParse :: #force_inline proc "c" (string_ : string, endptr_ : ^^i8 ) -> f64 { addr := 0x1000 + 97 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^^i8 ) -> f64 ) (fp))(raw_data(string_), len(string_), endptr_)}
+ExtractArguments :: #force_inline proc "c" (string_ : ^i8 , bytes_ : int , delimiterByte_ : u8 , replacementDelimiter_ : u8 , argvAllocated_ : int , argv_ : ^^i8 , argc_ : ^int ) -> bool{ addr := 0x1000 + 98 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , int , u8 , u8 , int , ^^i8 , ^int ) -> bool) (fp))(string_, bytes_, delimiterByte_, replacementDelimiter_, argvAllocated_, argv_, argc_)}
+RandomU8 :: #force_inline proc "c" () -> u8 { addr := 0x1000 + 301 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> u8 ) (fp))()}
+RandomU64 :: #force_inline proc "c" () -> u64 { addr := 0x1000 + 302 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> u64 ) (fp))()}
+IntegerParse :: #force_inline proc "c" (text_ : string) -> i64 { addr := 0x1000 + 101 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int) -> i64 ) (fp))(raw_data(text_), len(text_))}
+Print :: #force_inline proc "c" (format_ : cstring , _varargs_ : ..any){ addr := 0x1000 + 102 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( cstring , ..any)) (fp))(format_, _varargs_)}
+PrintDirect :: #force_inline proc "c" (string_ : string){ addr := 0x1000 + 103 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" (^u8, int)) (fp))(raw_data(string_), len(string_))}
+PrintHelloWorld :: #force_inline proc "c" (){ addr := 0x1000 + 104 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))()}
+RandomAddEntropy :: #force_inline proc "c" (x_ : u64 ){ addr := 0x1000 + 106 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( u64 )) (fp))(x_)}
+RandomSeed :: #force_inline proc "c" (x_ : u64 ){ addr := 0x1000 + 107 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( u64 )) (fp))(x_)}
+RectangleClip :: #force_inline proc "c" (parent_ : Rectangle, rectangle_ : Rectangle, output_ : ^Rectangle) -> bool{ addr := 0x1000 + 108 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Rectangle, Rectangle, ^Rectangle) -> bool) (fp))(parent_, rectangle_, output_)}
+Sort :: #force_inline proc "c" (_base_ : rawptr, nmemb_ : int , size_ : int , compar_ : ComparisonCallbackFunction, argument_ : Generic){ addr := 0x1000 + 109 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, int , int , ComparisonCallbackFunction, Generic)) (fp))(_base_, nmemb_, size_, compar_, argument_)}
+SortWithSwapCallback :: #force_inline proc "c" (_base_ : rawptr, nmemb_ : int , size_ : int , compar_ : ComparisonCallbackFunction, argument_ : Generic, swap_ : SwapCallbackFunction){ addr := 0x1000 + 110 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, int , int , ComparisonCallbackFunction, Generic, SwapCallbackFunction)) (fp))(_base_, nmemb_, size_, compar_, argument_, swap_)}
+TimeStamp :: #force_inline proc "c" () -> u64 { addr := 0x1000 + 252 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> u64 ) (fp))()}
+TimeStampMs :: #force_inline proc "c" () -> f64 { addr := 0x1000 + 261 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> f64 ) (fp))()}
+ColorBlend :: #force_inline proc "c" (under_ : u32 , over_ : u32 , fullAlpha_ : bool) -> u32 { addr := 0x1000 + 111 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( u32 , u32 , bool) -> u32 ) (fp))(under_, over_, fullAlpha_)}
+ColorConvertToRGB :: #force_inline proc "c" (h_ : f32 , s_ : f32 , v_ : f32 ) -> u32 { addr := 0x1000 + 112 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 , f32 , f32 ) -> u32 ) (fp))(h_, s_, v_)}
+ColorConvertToHSV :: #force_inline proc "c" (color_ : u32 , h_ : ^f32 , s_ : ^f32 , v_ : ^f32 ) -> bool{ addr := 0x1000 + 113 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( u32 , ^f32 , ^f32 , ^f32 ) -> bool) (fp))(color_, h_, s_, v_)}
+ColorParse :: #force_inline proc "c" (string_ : string) -> u32 { addr := 0x1000 + 114 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int) -> u32 ) (fp))(raw_data(string_), len(string_))}
+DrawBitmap :: #force_inline proc "c" (painter_ : ^Painter, region_ : Rectangle, bits_ : ^u32 , stride_ : uint ){ addr := 0x1000 + 324 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Painter, Rectangle, ^u32 , uint )) (fp))(painter_, region_, bits_, stride_)}
+DrawInvert :: #force_inline proc "c" (painter_ : ^Painter, bounds_ : Rectangle){ addr := 0x1000 + 95 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Painter, Rectangle)) (fp))(painter_, bounds_)}
+DrawStandardIcon :: #force_inline proc "c" (painter_ : ^Painter, id_ : u32 , size_ : i32, region_ : Rectangle, color_ : u32 ) -> bool{ addr := 0x1000 + 115 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Painter, u32 , i32, Rectangle, u32 ) -> bool) (fp))(painter_, id_, size_, region_, color_)}
+DrawStyledBox :: #force_inline proc "c" (painter_ : ^Painter, box_ : StyledBox){ addr := 0x1000 + 116 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Painter, StyledBox)) (fp))(painter_, box_)}
+DrawPaintTarget :: #force_inline proc "c" (painter_ : ^Painter, source_ : ^PaintTarget, destinationRegion_ : Rectangle, sourceRegion_ : Rectangle, borderRegion_ : Rectangle, mode_ : DrawMode, alpha_ : u16 , clipRegion_ : Rectangle){ addr := 0x1000 + 263 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Painter, ^PaintTarget, Rectangle, Rectangle, Rectangle, DrawMode, u16 , Rectangle)) (fp))(painter_, source_, destinationRegion_, sourceRegion_, borderRegion_, mode_, alpha_, clipRegion_)}
+DrawText :: #force_inline proc "c" (painter_ : ^Painter, plan_ : ^TextPlan, bounds_ : Rectangle, clip_ : ^Rectangle = nil, selectionProperties_ : ^TextSelection = nil){ addr := 0x1000 + 120 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Painter, ^TextPlan, Rectangle, ^Rectangle, ^TextSelection)) (fp))(painter_, plan_, bounds_, clip_, selectionProperties_)}
+FontGetName :: #force_inline proc "c" (family_ : u16 , buffer_ : ^i8 , bufferBytes_ : int ) -> int { addr := 0x1000 + 121 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( u16 , ^i8 , int ) -> int ) (fp))(family_, buffer_, bufferBytes_)}
+IconIDFromString :: #force_inline proc "c" (string_ : string = "") -> u32 { addr := 0x1000 + 127 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int) -> u32 ) (fp))(raw_data(string_), len(string_))}
+ImageLoad :: #force_inline proc "c" (file_ : ^u8 , fileSize_ : int , width_ : ^u32 , height_ : ^u32 , imageChannels_ : i32) -> ^u8 { addr := 0x1000 + 165 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^u8 , int , ^u32 , ^u32 , i32) -> ^u8 ) (fp))(file_, fileSize_, width_, height_, imageChannels_)}
+PainterBoundsClient :: #force_inline proc "c" (painter_ : ^Painter) -> Rectangle{ addr := 0x1000 + 122 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Painter) -> Rectangle) (fp))(painter_)}
+PainterBoundsInset :: #force_inline proc "c" (painter_ : ^Painter) -> Rectangle{ addr := 0x1000 + 123 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Painter) -> Rectangle) (fp))(painter_)}
+PainterDrawStandardContent :: #force_inline proc "c" (painter_ : ^Painter, text_ : string, iconID_ : u32 ){ addr := 0x1000 + 117 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Painter, ^u8, int, u32 )) (fp))(painter_, raw_data(text_), len(text_), iconID_)}
+PaintTargetClear :: #force_inline proc "c" (target_ : ^PaintTarget){ addr := 0x1000 + 34 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^PaintTarget)) (fp))(target_)}
+PaintTargetEndDirectAccess :: #force_inline proc "c" (target_ : ^PaintTarget){ addr := 0x1000 + 264 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^PaintTarget)) (fp))(target_)}
+PaintTargetStartDirectAccess :: #force_inline proc "c" (target_ : ^PaintTarget, bits_ : ^^u32 , width_ : ^int , height_ : ^int , stride_ : ^int ){ addr := 0x1000 + 276 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^PaintTarget, ^^u32 , ^int , ^int , ^int )) (fp))(target_, bits_, width_, height_, stride_)}
+PaintTargetTake :: #force_inline proc "c" (target_ : ^PaintTarget, width_ : int , height_ : int ) -> bool{ addr := 0x1000 + 35 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^PaintTarget, int , int ) -> bool) (fp))(target_, width_, height_)}
+PaintTargetReturn :: #force_inline proc "c" (target_ : ^PaintTarget){ addr := 0x1000 + 36 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^PaintTarget)) (fp))(target_)}
+TextGetLineHeight :: #force_inline proc "c" (font_ : Font, size_ : u16 ) -> i32{ addr := 0x1000 + 157 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Font, u16 ) -> i32) (fp))(font_, size_)}
+TextGetPartialStringWidth :: #force_inline proc "c" (font_ : Font, size_ : u16 , fullString_ : ^i8 , fullStringBytes_ : int , measureOffset_ : uint , measureBytes_ : int ) -> i32{ addr := 0x1000 + 171 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Font, u16 , ^i8 , int , uint , int ) -> i32) (fp))(font_, size_, fullString_, fullStringBytes_, measureOffset_, measureBytes_)}
+TextGetCharacterAtPoint :: #force_inline proc "c" (font_ : Font, size_ : u16 , fullString_ : ^i8 , fullStringBytes_ : int , measureOffset_ : uint , measureBytes_ : int , pointX_ : ^i32, reverse_ : bool, middle_ : bool) -> int { addr := 0x1000 + 237 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Font, u16 , ^i8 , int , uint , int , ^i32, bool, bool) -> int ) (fp))(font_, size_, fullString_, fullStringBytes_, measureOffset_, measureBytes_, pointX_, reverse_, middle_)}
+AudioStreamClose :: #force_inline proc "c" (stream_ : ^AudioStream){ addr := 0x1000 + 128 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^AudioStream)) (fp))(stream_)}
+AudioStreamOpen :: #force_inline proc "c" (device_ : AudioDeviceID, bufferLengthUs_ : int ) -> ^AudioStream{ addr := 0x1000 + 129 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( AudioDeviceID, int ) -> ^AudioStream) (fp))(device_, bufferLengthUs_)}
+AudioStreamNotify :: #force_inline proc "c" (stream_ : ^AudioStream){ addr := 0x1000 + 130 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^AudioStream)) (fp))(stream_)}
+AudioStreamSend :: #force_inline proc "c" (destination_ : ^AudioStream, source_ : ^AudioStream, time_ : ^f64 ) -> Error{ addr := 0x1000 + 131 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^AudioStream, ^AudioStream, ^f64 ) -> Error) (fp))(destination_, source_, time_)}
+AddressResolve :: #force_inline proc "c" (domain_ : string, flags_ : u32 , address_ : ^Address) -> Error{ addr := 0x1000 + 99 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, u32 , ^Address) -> Error) (fp))(raw_data(domain_), len(domain_), flags_, address_)}
+ConnectionClose :: #force_inline proc "c" (connection_ : ^Connection){ addr := 0x1000 + 321 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Connection)) (fp))(connection_)}
+ConnectionNotify :: #force_inline proc "c" (connection_ : ^Connection){ addr := 0x1000 + 322 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Connection)) (fp))(connection_)}
+ConnectionOpen :: #force_inline proc "c" (connection_ : ^Connection, flags_ : u32 ) -> Error{ addr := 0x1000 + 100 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Connection, u32 ) -> Error) (fp))(connection_, flags_)}
+ConnectionPoll :: #force_inline proc "c" (connection_ : ^Connection){ addr := 0x1000 + 303 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Connection)) (fp))(connection_)}
+ConnectionRead :: #force_inline proc "c" (connection_ : ^Connection, buffer_ : rawptr, bufferBytes_ : int , bytesRead_ : ^int ) -> Error{ addr := 0x1000 + 325 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Connection, rawptr, int , ^int ) -> Error) (fp))(connection_, buffer_, bufferBytes_, bytesRead_)}
+ConnectionWriteSync :: #force_inline proc "c" (connection_ : ^Connection, data_ : rawptr, dataBytes_ : int ) -> Error{ addr := 0x1000 + 323 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Connection, rawptr, int ) -> Error) (fp))(connection_, data_, dataBytes_)}
+GameControllerStatePoll :: #force_inline proc "c" (buffer_ : ^GameControllerState) -> int { addr := 0x1000 + 299 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^GameControllerState) -> int ) (fp))(buffer_)}
+EventCreate :: #force_inline proc "c" (autoReset_ : bool) -> Handle{ addr := 0x1000 + 132 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( bool) -> Handle) (fp))(autoReset_)}
+EventForward :: #force_inline proc "c" (event_ : Handle, eventSink_ : Handle, data_ : Generic){ addr := 0x1000 + 133 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle, Handle, Generic)) (fp))(event_, eventSink_, data_)}
+EventPoll :: #force_inline proc "c" (event_ : Handle) -> Error{ addr := 0x1000 + 134 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle) -> Error) (fp))(event_)}
+EventReset :: #force_inline proc "c" (event_ : Handle){ addr := 0x1000 + 135 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle)) (fp))(event_)}
+EventSet :: #force_inline proc "c" (event_ : Handle){ addr := 0x1000 + 136 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle)) (fp))(event_)}
+EventSinkCreate :: #force_inline proc "c" (ignoreDuplicates_ : bool) -> Handle{ addr := 0x1000 + 137 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( bool) -> Handle) (fp))(ignoreDuplicates_)}
+EventSinkPop :: #force_inline proc "c" (eventSink_ : Handle, data_ : ^Generic) -> Error{ addr := 0x1000 + 138 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, ^Generic) -> Error) (fp))(eventSink_, data_)}
+EventSinkPush :: #force_inline proc "c" (eventSink_ : Handle, data_ : Generic) -> Error{ addr := 0x1000 + 139 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( Handle, Generic) -> Error) (fp))(eventSink_, data_)}
+MutexAcquire :: #force_inline proc "c" (mutex_ : ^Mutex){ addr := 0x1000 + 140 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Mutex)) (fp))(mutex_)}
+MutexDestroy :: #force_inline proc "c" (mutex_ : ^Mutex){ addr := 0x1000 + 141 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Mutex)) (fp))(mutex_)}
+MutexRelease :: #force_inline proc "c" (mutex_ : ^Mutex){ addr := 0x1000 + 142 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Mutex)) (fp))(mutex_)}
+PerformanceTimerPush :: #force_inline proc "c" (){ addr := 0x1000 + 143 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))()}
+PerformanceTimerPop :: #force_inline proc "c" () -> f64 { addr := 0x1000 + 144 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> f64 ) (fp))()}
+SchedulerYield :: #force_inline proc "c" (){ addr := 0x1000 + 145 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ()) (fp))()}
+Sleep :: #force_inline proc "c" (milliseconds_ : u64 ){ addr := 0x1000 + 146 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( u64 )) (fp))(milliseconds_)}
+SpinlockAcquire :: #force_inline proc "c" (spinlock_ : ^Spinlock){ addr := 0x1000 + 147 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Spinlock)) (fp))(spinlock_)}
+SpinlockRelease :: #force_inline proc "c" (spinlock_ : ^Spinlock){ addr := 0x1000 + 148 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Spinlock)) (fp))(spinlock_)}
+TimerCreate :: #force_inline proc "c" () -> Handle{ addr := 0x1000 + 149 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" () -> Handle) (fp))()}
+TimerSet :: #force_inline proc "c" (handle_ : Handle, afterMs_ : u64 , callback_ : TimerCallbackFunction, argument_ : Generic){ addr := 0x1000 + 150 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( Handle, u64 , TimerCallbackFunction, Generic)) (fp))(handle_, afterMs_, callback_, argument_)}
+Wait :: #force_inline proc "c" (objects_ : ^Handle, objectCount_ : int , timeoutMs_ : uint ) -> uint { addr := 0x1000 + 151 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Handle, int , uint ) -> uint ) (fp))(objects_, objectCount_, timeoutMs_)}
+CStringLength :: #force_inline proc "c" (string_ : cstring ) -> int { addr := 0x1000 + 152 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( cstring ) -> int ) (fp))(string_)}
+StringAllocateAndFormat :: #force_inline proc "c" (bytes_ : ^int , format_ : cstring , _varargs_ : ..any) -> ^i8 { addr := 0x1000 + 153 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^int , cstring , ..any) -> ^i8 ) (fp))(bytes_, format_, _varargs_)}
+StringCompare :: #force_inline proc "c" (s1_ : string, s2_ : string) -> i32{ addr := 0x1000 + 155 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^u8, int) -> i32) (fp))(raw_data(s1_), len(s1_), raw_data(s2_), len(s2_))}
+StringCompareRaw :: #force_inline proc "c" (s1_ : string, s2_ : string) -> i32{ addr := 0x1000 + 156 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^u8, int) -> i32) (fp))(raw_data(s1_), len(s1_), raw_data(s2_), len(s2_))}
+StringFormat :: #force_inline proc "c" (buffer_ : ^i8 , bufferLength_ : int , format_ : cstring , _varargs_ : ..any) -> int { addr := 0x1000 + 158 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , int , cstring , ..any) -> int ) (fp))(buffer_, bufferLength_, format_, _varargs_)}
+StringFormatTemporary :: #force_inline proc "c" (format_ : cstring , _varargs_ : ..any) -> ^i8 { addr := 0x1000 + 159 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( cstring , ..any) -> ^i8 ) (fp))(format_, _varargs_)}
+StringFormatAppend :: #force_inline proc "c" (buffer_ : ^i8 , bufferLength_ : int , bufferPosition_ : ^int , format_ : cstring , _varargs_ : ..any) -> bool{ addr := 0x1000 + 161 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , int , ^int , cstring , ..any) -> bool) (fp))(buffer_, bufferLength_, bufferPosition_, format_, _varargs_)}
+StringLength :: #force_inline proc "c" (string_ : ^i8 , end_ : u8 ) -> int { addr := 0x1000 + 163 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , u8 ) -> int ) (fp))(string_, end_)}
+StringStartsWith :: #force_inline proc "c" (string_ : string, prefix_ : string, caseInsensitive_ : bool) -> bool{ addr := 0x1000 + 166 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int, ^u8, int, bool) -> bool) (fp))(raw_data(string_), len(string_), raw_data(prefix_), len(prefix_), caseInsensitive_)}
+StringZeroTerminate :: #force_inline proc "c" (string_ : string) -> ^i8 { addr := 0x1000 + 167 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" (^u8, int) -> ^i8 ) (fp))(raw_data(string_), len(string_))}
+CRTabs :: #force_inline proc "c" (n_ : i32) -> i32{ addr := 0x1000 + 168 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> i32) (fp))(n_)}
+CRTacosf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 169 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_)}
+CRTasinf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 170 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_)}
+CRTatan2f :: #force_inline proc "c" (y_ : f32 , x_ : f32 ) -> f32 { addr := 0x1000 + 172 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 , f32 ) -> f32 ) (fp))(y_, x_)}
+CRTatanf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 173 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_)}
+CRTatoi :: #force_inline proc "c" (string_ : ^i8 ) -> i32{ addr := 0x1000 + 174 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 ) -> i32) (fp))(string_)}
+CRTcalloc :: #force_inline proc "c" (num_ : int , size_ : int ) -> rawptr{ addr := 0x1000 + 175 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( int , int ) -> rawptr) (fp))(num_, size_)}
+CRTceil :: #force_inline proc "c" (x_ : f64 ) -> f64 { addr := 0x1000 + 176 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f64 ) -> f64 ) (fp))(x_)}
+CRTceilf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 177 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_)}
+CRTcosf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 178 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_)}
+CRTexp :: #force_inline proc "c" (x_ : f64 ) -> f64 { addr := 0x1000 + 326 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f64 ) -> f64 ) (fp))(x_)}
+CRTexp2f :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 327 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_)}
+CRTfabs :: #force_inline proc "c" (x_ : f64 ) -> f64 { addr := 0x1000 + 179 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f64 ) -> f64 ) (fp))(x_)}
+CRTfabsf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 344 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_)}
+CRTfloor :: #force_inline proc "c" (x_ : f64 ) -> f64 { addr := 0x1000 + 181 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f64 ) -> f64 ) (fp))(x_)}
+CRTfloorf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 182 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_)}
+CRTfmodf :: #force_inline proc "c" (x_ : f32 , y_ : f32 ) -> f32 { addr := 0x1000 + 183 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 , f32 ) -> f32 ) (fp))(x_, y_)}
+CRTfree :: #force_inline proc "c" (ptr_ : rawptr){ addr := 0x1000 + 184 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr)) (fp))(ptr_)}
+CRTgetenv :: #force_inline proc "c" (name_ : ^i8 ) -> ^i8 { addr := 0x1000 + 185 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 ) -> ^i8 ) (fp))(name_)}
+CRTisalpha :: #force_inline proc "c" (c_ : i32) -> i32{ addr := 0x1000 + 186 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> i32) (fp))(c_)}
+CRTisdigit :: #force_inline proc "c" (c_ : i32) -> i32{ addr := 0x1000 + 187 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> i32) (fp))(c_)}
+CRTisnanf :: #force_inline proc "c" (f_ : f32 ) -> bool{ addr := 0x1000 + 345 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> bool) (fp))(f_)}
+CRTisspace :: #force_inline proc "c" (c_ : i32) -> i32{ addr := 0x1000 + 188 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> i32) (fp))(c_)}
+CRTisupper :: #force_inline proc "c" (c_ : i32) -> i32{ addr := 0x1000 + 189 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> i32) (fp))(c_)}
+CRTisxdigit :: #force_inline proc "c" (c_ : i32) -> i32{ addr := 0x1000 + 190 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> i32) (fp))(c_)}
+CRTmalloc :: #force_inline proc "c" (size_ : int ) -> rawptr{ addr := 0x1000 + 191 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( int ) -> rawptr) (fp))(size_)}
+CRTmemchr :: #force_inline proc "c" (_s_ : rawptr, _c_ : i32, n_ : int ) -> rawptr{ addr := 0x1000 + 192 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, i32, int ) -> rawptr) (fp))(_s_, _c_, n_)}
+CRTmemcmp :: #force_inline proc "c" (s1_ : rawptr, s2_ : rawptr, n_ : int ) -> i32{ addr := 0x1000 + 193 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, rawptr, int ) -> i32) (fp))(s1_, s2_, n_)}
+CRTmemcpy :: #force_inline proc "c" (dest_ : rawptr, src_ : rawptr, n_ : int ) -> rawptr{ addr := 0x1000 + 194 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, rawptr, int ) -> rawptr) (fp))(dest_, src_, n_)}
+CRTmemmove :: #force_inline proc "c" (dest_ : rawptr, src_ : rawptr, n_ : int ) -> rawptr{ addr := 0x1000 + 195 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, rawptr, int ) -> rawptr) (fp))(dest_, src_, n_)}
+CRTmemset :: #force_inline proc "c" (s_ : rawptr, c_ : i32, n_ : int ) -> rawptr{ addr := 0x1000 + 196 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, i32, int ) -> rawptr) (fp))(s_, c_, n_)}
+CRTpowf :: #force_inline proc "c" (x_ : f32 , y_ : f32 ) -> f32 { addr := 0x1000 + 328 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 , f32 ) -> f32 ) (fp))(x_, y_)}
+CRTqsort :: #force_inline proc "c" (_base_ : rawptr, nmemb_ : int , size_ : int , compar_ : CRTComparisonCallback){ addr := 0x1000 + 197 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( rawptr, int , int , CRTComparisonCallback)) (fp))(_base_, nmemb_, size_, compar_)}
+CRTrealloc :: #force_inline proc "c" (ptr_ : rawptr, size_ : int ) -> rawptr{ addr := 0x1000 + 198 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( rawptr, int ) -> rawptr) (fp))(ptr_, size_)}
+CRTsinf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 199 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_)}
+CRTsnprintf :: #force_inline proc "c" (buffer_ : ^i8 , bufferSize_ : int , format_ : ^i8 , _varargs_ : ..any) -> i32{ addr := 0x1000 + 200 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , int , ^i8 , ..any) -> i32) (fp))(buffer_, bufferSize_, format_, _varargs_)}
+CRTsprintf :: #force_inline proc "c" (buffer_ : ^i8 , format_ : ^i8 , _varargs_ : ..any) -> i32{ addr := 0x1000 + 201 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^i8 , ..any) -> i32) (fp))(buffer_, format_, _varargs_)}
+CRTsqrt :: #force_inline proc "c" (x_ : f64 ) -> f64 { addr := 0x1000 + 202 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f64 ) -> f64 ) (fp))(x_)}
+CRTsqrtf :: #force_inline proc "c" (x_ : f32 ) -> f32 { addr := 0x1000 + 203 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( f32 ) -> f32 ) (fp))(x_)}
+CRTstrcat :: #force_inline proc "c" (dest_ : ^i8 , src_ : ^i8 ) -> ^i8 { addr := 0x1000 + 205 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^i8 ) -> ^i8 ) (fp))(dest_, src_)}
+CRTstrchr :: #force_inline proc "c" (s_ : ^i8 , c_ : i32) -> ^i8 { addr := 0x1000 + 206 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , i32) -> ^i8 ) (fp))(s_, c_)}
+CRTstrcmp :: #force_inline proc "c" (s1_ : ^i8 , s2_ : ^i8 ) -> i32{ addr := 0x1000 + 207 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^i8 ) -> i32) (fp))(s1_, s2_)}
+CRTstrcpy :: #force_inline proc "c" (dest_ : ^i8 , src_ : ^i8 ) -> ^i8 { addr := 0x1000 + 208 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^i8 ) -> ^i8 ) (fp))(dest_, src_)}
+CRTstrdup :: #force_inline proc "c" (string_ : ^i8 ) -> ^i8 { addr := 0x1000 + 70 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 ) -> ^i8 ) (fp))(string_)}
+CRTstrerror :: #force_inline proc "c" (errnum_ : i32) -> ^i8 { addr := 0x1000 + 209 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> ^i8 ) (fp))(errnum_)}
+CRTstrlen :: #force_inline proc "c" (s_ : ^i8 ) -> int { addr := 0x1000 + 210 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 ) -> int ) (fp))(s_)}
+CRTstrncmp :: #force_inline proc "c" (s1_ : ^i8 , s2_ : ^i8 , n_ : int ) -> i32{ addr := 0x1000 + 211 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^i8 , int ) -> i32) (fp))(s1_, s2_, n_)}
+CRTstrncpy :: #force_inline proc "c" (dest_ : ^i8 , src_ : ^i8 , n_ : int ) -> ^i8 { addr := 0x1000 + 212 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^i8 , int ) -> ^i8 ) (fp))(dest_, src_, n_)}
+CRTstrnlen :: #force_inline proc "c" (s_ : ^i8 , maxlen_ : int ) -> int { addr := 0x1000 + 213 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , int ) -> int ) (fp))(s_, maxlen_)}
+CRTstrstr :: #force_inline proc "c" (haystack_ : ^i8 , needle_ : ^i8 ) -> ^i8 { addr := 0x1000 + 214 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^i8 ) -> ^i8 ) (fp))(haystack_, needle_)}
+CRTstrtol :: #force_inline proc "c" (nptr_ : ^i8 , endptr_ : ^^i8 , base_ : i32) -> i64 { addr := 0x1000 + 215 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^^i8 , i32) -> i64 ) (fp))(nptr_, endptr_, base_)}
+CRTstrtoul :: #force_inline proc "c" (nptr_ : ^i8 , endptr_ : ^^i8 , base_ : i32) -> u64 { addr := 0x1000 + 216 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^i8 , ^^i8 , i32) -> u64 ) (fp))(nptr_, endptr_, base_)}
+CRTtolower :: #force_inline proc "c" (c_ : i32) -> i32{ addr := 0x1000 + 217 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( i32) -> i32) (fp))(c_)}
+NewPanel :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil) -> ^Panel{ addr := 0x1000 + 219 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring ) -> ^Panel) (fp))(parent_, flags_, cStyle_)}
+NewSplitter :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil) -> ^Splitter{ addr := 0x1000 + 220 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring ) -> ^Splitter) (fp))(parent_, flags_, cStyle_)}
+NewButton :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil, label_ : string = "") -> ^Button{ addr := 0x1000 + 221 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring , ^u8, int) -> ^Button) (fp))(parent_, flags_, cStyle_, raw_data(label_), len(label_))}
+NewChoice :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil) -> ^Choice{ addr := 0x1000 + 222 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring ) -> ^Choice) (fp))(parent_, flags_, cStyle_)}
+NewColorWell :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil, colorRGB_ : u32 = 0) -> ^ColorWell{ addr := 0x1000 + 223 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring , u32 ) -> ^ColorWell) (fp))(parent_, flags_, cStyle_, colorRGB_)}
+NewTextDisplay :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil, label_ : string = "") -> ^TextDisplay{ addr := 0x1000 + 224 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring , ^u8, int) -> ^TextDisplay) (fp))(parent_, flags_, cStyle_, raw_data(label_), len(label_))}
+NewIconDisplay :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil, iconID_ : u32 = 0) -> ^IconDisplay{ addr := 0x1000 + 225 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring , u32 ) -> ^IconDisplay) (fp))(parent_, flags_, cStyle_, iconID_)}
+NewImageDisplay :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil) -> ^ImageDisplay{ addr := 0x1000 + 226 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring ) -> ^ImageDisplay) (fp))(parent_, flags_, cStyle_)}
+NewListView :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil, cItemStyle_ : cstring = nil, cHeaderItemStyle_ : cstring = nil, cFooterItemStyle_ : cstring = nil) -> ^ListView{ addr := 0x1000 + 227 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring , cstring , cstring , cstring ) -> ^ListView) (fp))(parent_, flags_, cStyle_, cItemStyle_, cHeaderItemStyle_, cFooterItemStyle_)}
+NewTextbox :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil) -> ^Textbox{ addr := 0x1000 + 228 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring ) -> ^Textbox) (fp))(parent_, flags_, cStyle_)}
+NewCustomElement :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, cStyle_ : cstring = nil) -> ^Element{ addr := 0x1000 + 229 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , cstring ) -> ^Element) (fp))(parent_, flags_, cStyle_)}
+NewWindow :: #force_inline proc "c" (instance_ : ^INSTANCE_TYPE, style_ : WindowStyle) -> ^Window{ addr := 0x1000 + 230 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^INSTANCE_TYPE, WindowStyle) -> ^Window) (fp))(instance_, style_)}
+NewMenu :: #force_inline proc "c" (source_ : ^Element, flags_ : u64 = FLAGS_DEFAULT, userCallback_ : MenuCallbackFunction = nil, _context_ : Generic = nil, fixedWidth_ : i32 = 0, fixedHeight_ : i32 = 0) -> ^Menu{ addr := 0x1000 + 231 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 , MenuCallbackFunction, Generic, i32, i32) -> ^Menu) (fp))(source_, flags_, userCallback_, _context_, fixedWidth_, fixedHeight_)}
+NewMenuItem :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 , label_ : string = "", callback_ : MenuCallbackFunction = nil, _context_ : Generic = nil){ addr := 0x1000 + 232 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, u64 , ^u8, int, MenuCallbackFunction, Generic)) (fp))(parent_, flags_, raw_data(label_), len(label_), callback_, _context_)}
+NewMenuCommand :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 , label_ : string, command_ : ^Command){ addr := 0x1000 + 233 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, u64 , ^u8, int, ^Command)) (fp))(parent_, flags_, raw_data(label_), len(label_), command_)}
+NewMenuColumn :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 = FLAGS_DEFAULT) -> ^Element{ addr := 0x1000 + 234 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 ) -> ^Element) (fp))(parent_, flags_)}
+NewMenuSeparator :: #force_inline proc "c" (parent_ : ^Element){ addr := 0x1000 + 235 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element)) (fp))(parent_)}
+NewSpacer :: #force_inline proc "c" (parent_ : ^Element, flags_ : u64 ) -> ^Element{ addr := 0x1000 + 236 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element, u64 ) -> ^Element) (fp))(parent_, flags_)}
+NewTextPlan :: #force_inline proc "c" (properties_ : ^TextDisplayProperties, bounds_ : Rectangle, string_ : ^i8 , textRuns_ : ^TextRun, textRunCount_ : int , singleUse_ : bool) -> ^TextPlan{ addr := 0x1000 + 238 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^TextDisplayProperties, Rectangle, ^i8 , ^TextRun, int , bool) -> ^TextPlan) (fp))(properties_, bounds_, string_, textRuns_, textRunCount_, singleUse_)}
+ElementDraw :: #force_inline proc "c" (element_ : ^Element, painter_ : ^Painter){ addr := 0x1000 + 240 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, ^Painter)) (fp))(element_, painter_)}
+ElementFocus :: #force_inline proc "c" (element_ : ^Element, ensureVisible_ : bool = false){ addr := 0x1000 + 243 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, bool)) (fp))(element_, ensureVisible_)}
+ElementSetDisabled :: #force_inline proc "c" (element_ : ^Element, disabled_ : bool = true){ addr := 0x1000 + 244 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, bool)) (fp))(element_, disabled_)}
+ElementSetHidden :: #force_inline proc "c" (element_ : ^Element, hidden_ : bool = true){ addr := 0x1000 + 245 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, bool)) (fp))(element_, hidden_)}
+ElementSetCallback :: #force_inline proc "c" (element_ : ^Element, callback_ : UICallbackFunction){ addr := 0x1000 + 246 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, UICallbackFunction)) (fp))(element_, callback_)}
+ElementGetSize :: #force_inline proc "c" (element_ : ^Element, width_ : ^i32, height_ : ^i32){ addr := 0x1000 + 247 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, ^i32, ^i32)) (fp))(element_, width_, height_)}
+ElementRepaint :: #force_inline proc "c" (element_ : ^Element, all_ : bool, region_ : Rectangle){ addr := 0x1000 + 248 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, bool, Rectangle)) (fp))(element_, all_, region_)}
+ElementSetCellRange :: #force_inline proc "c" (element_ : ^Element, xFrom_ : i32, yFrom_ : i32, xTo_ : i32 = -1, yTo_ : i32 = -1){ addr := 0x1000 + 251 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, i32, i32, i32, i32)) (fp))(element_, xFrom_, yFrom_, xTo_, yTo_)}
+ElementGetInsets :: #force_inline proc "c" (element_ : ^Element) -> Rectangle{ addr := 0x1000 + 253 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element) -> Rectangle) (fp))(element_)}
+ElementGetInsetSize :: #force_inline proc "c" (element_ : ^Element) -> Rectangle{ addr := 0x1000 + 254 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element) -> Rectangle) (fp))(element_)}
+ElementGetMetrics :: #force_inline proc "c" (element_ : ^Element) -> ThemeMetrics{ addr := 0x1000 + 105 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element) -> ThemeMetrics) (fp))(element_)}
+ElementGetPreferredSize :: #force_inline proc "c" (element_ : ^Element) -> Rectangle{ addr := 0x1000 + 255 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element) -> Rectangle) (fp))(element_)}
+ElementMove :: #force_inline proc "c" (element_ : ^Element, x_ : i32, y_ : i32, width_ : i32, height_ : i32){ addr := 0x1000 + 256 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element, i32, i32, i32, i32)) (fp))(element_, x_, y_, width_, height_)}
+ElementGetLayoutParent :: #force_inline proc "c" (element_ : ^Element) -> ^Element{ addr := 0x1000 + 257 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element) -> ^Element) (fp))(element_)}
+ElementDestroy :: #force_inline proc "c" (element_ : ^Element){ addr := 0x1000 + 258 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element)) (fp))(element_)}
+ElementDestroyContents :: #force_inline proc "c" (element_ : ^Element){ addr := 0x1000 + 259 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Element)) (fp))(element_)}
+ElementStartAnimating :: #force_inline proc "c" (element_ : ^Element) -> bool{ addr := 0x1000 + 260 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Element) -> bool) (fp))(element_)}
+WindowGetBounds :: #force_inline proc "c" (window_ : ^Window) -> Rectangle{ addr := 0x1000 + 265 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Window) -> Rectangle) (fp))(window_)}
+WindowGetToolbar :: #force_inline proc "c" (window_ : ^Window) -> ^Element{ addr := 0x1000 + 266 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Window) -> ^Element) (fp))(window_)}
+WindowSetIcon :: #force_inline proc "c" (window_ : ^Window, iconID_ : u32 ){ addr := 0x1000 + 267 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Window, u32 )) (fp))(window_, iconID_)}
+WindowSetTitle :: #force_inline proc "c" (window_ : ^Window, title_ : string = ""){ addr := 0x1000 + 268 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Window, ^u8, int)) (fp))(window_, raw_data(title_), len(title_))}
+MenuGetSource :: #force_inline proc "c" (menu_ : ^Menu) -> ^Element{ addr := 0x1000 + 269 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Menu) -> ^Element) (fp))(menu_)}
+ButtonSetIcon :: #force_inline proc "c" (button_ : ^Button, iconID_ : u32 ){ addr := 0x1000 + 270 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Button, u32 )) (fp))(button_, iconID_)}
+ButtonSetCheck :: #force_inline proc "c" (button_ : ^Button, checkState_ : CheckState = CHECK_CHECKED, sendUpdatedMessage_ : bool = true){ addr := 0x1000 + 271 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Button, CheckState, bool)) (fp))(button_, checkState_, sendUpdatedMessage_)}
+ButtonGetCheck :: #force_inline proc "c" (button_ : ^Button) -> CheckState{ addr := 0x1000 + 272 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Button) -> CheckState) (fp))(button_)}
+ButtonOnCommand :: #force_inline proc "c" (button_ : ^Button, callback_ : CommandCallbackFunction, command_ : ^Command = nil){ addr := 0x1000 + 273 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Button, CommandCallbackFunction, ^Command)) (fp))(button_, callback_, command_)}
+ButtonSetCheckBuddy :: #force_inline proc "c" (button_ : ^Button, checkBuddy_ : ^Element){ addr := 0x1000 + 274 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Button, ^Element)) (fp))(button_, checkBuddy_)}
+ButtonGetCheckBuddy :: #force_inline proc "c" (button_ : ^Button) -> ^Element{ addr := 0x1000 + 275 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Button) -> ^Element) (fp))(button_)}
+TextboxFind :: #force_inline proc "c" (textbox_ : ^Textbox, string_ : string, line_ : ^i32 , byte_ : ^i32 , flags_ : u32 ) -> bool{ addr := 0x1000 + 277 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Textbox, ^u8, int, ^i32 , ^i32 , u32 ) -> bool) (fp))(textbox_, raw_data(string_), len(string_), line_, byte_, flags_)}
+TextboxInsert :: #force_inline proc "c" (textbox_ : ^Textbox, string_ : string = "", sendUpdatedMessage_ : bool = true){ addr := 0x1000 + 278 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox, ^u8, int, bool)) (fp))(textbox_, raw_data(string_), len(string_), sendUpdatedMessage_)}
+TextboxGetContents :: #force_inline proc "c" (textbox_ : ^Textbox, bytes_ : ^int = nil) -> ^i8 { addr := 0x1000 + 279 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Textbox, ^int ) -> ^i8 ) (fp))(textbox_, bytes_)}
+TextboxGetLineLength :: #force_inline proc "c" (textbox_ : ^Textbox, line_ : uint = 0) -> int { addr := 0x1000 + 280 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Textbox, uint ) -> int ) (fp))(textbox_, line_)}
+TextboxGetSelection :: #force_inline proc "c" (textbox_ : ^Textbox, fromLine_ : ^i32 , fromByte_ : ^i32 , toLine_ : ^i32 , toByte_ : ^i32 ){ addr := 0x1000 + 281 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox, ^i32 , ^i32 , ^i32 , ^i32 )) (fp))(textbox_, fromLine_, fromByte_, toLine_, toByte_)}
+TextboxMoveCaret :: #force_inline proc "c" (textbox_ : ^Textbox, line_ : i32 , byte_ : i32 ){ addr := 0x1000 + 282 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox, i32 , i32 )) (fp))(textbox_, line_, byte_)}
+TextboxSetSelection :: #force_inline proc "c" (textbox_ : ^Textbox, fromLine_ : i32 , fromByte_ : i32 , toLine_ : i32 , toByte_ : i32 ){ addr := 0x1000 + 283 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox, i32 , i32 , i32 , i32 )) (fp))(textbox_, fromLine_, fromByte_, toLine_, toByte_)}
+TextboxSelectAll :: #force_inline proc "c" (textbox_ : ^Textbox){ addr := 0x1000 + 284 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox)) (fp))(textbox_)}
+TextboxClear :: #force_inline proc "c" (textbox_ : ^Textbox, sendUpdatedMessage_ : bool){ addr := 0x1000 + 285 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox, bool)) (fp))(textbox_, sendUpdatedMessage_)}
+TextboxUseNumberOverlay :: #force_inline proc "c" (textbox_ : ^Textbox, defaultBehaviour_ : bool){ addr := 0x1000 + 286 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox, bool)) (fp))(textbox_, defaultBehaviour_)}
+TextboxUseBreadcrumbOverlay :: #force_inline proc "c" (textbox_ : ^Textbox){ addr := 0x1000 + 287 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox)) (fp))(textbox_)}
+TextboxMoveCaretRelative :: #force_inline proc "c" (textbox_ : ^Textbox, flags_ : u32 ){ addr := 0x1000 + 118 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox, u32 )) (fp))(textbox_, flags_)}
+TextboxEnsureCaretVisible :: #force_inline proc "c" (textbox_ : ^Textbox){ addr := 0x1000 + 119 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Textbox)) (fp))(textbox_)}
+PanelSetBands :: #force_inline proc "c" (panel_ : ^Panel, columnCount_ : int , rowCount_ : int = 0, columns_ : ^PanelBand = nil, rows_ : ^PanelBand = nil){ addr := 0x1000 + 288 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Panel, int , int , ^PanelBand, ^PanelBand)) (fp))(panel_, columnCount_, rowCount_, columns_, rows_)}
+PanelSwitchTo :: #force_inline proc "c" (panel_ : ^Panel, targetChild_ : ^Element, transitionType_ : TransitionType, destroyPreviousAfterTransitionCompletes_ : bool = false){ addr := 0x1000 + 289 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Panel, ^Element, TransitionType, bool)) (fp))(panel_, targetChild_, transitionType_, destroyPreviousAfterTransitionCompletes_)}
+TextPlanGetWidth :: #force_inline proc "c" (plan_ : ^TextPlan) -> i32{ addr := 0x1000 + 290 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^TextPlan) -> i32) (fp))(plan_)}
+TextPlanGetHeight :: #force_inline proc "c" (plan_ : ^TextPlan) -> i32{ addr := 0x1000 + 291 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^TextPlan) -> i32) (fp))(plan_)}
+TextPlanGetLineCount :: #force_inline proc "c" (plan_ : ^TextPlan) -> int { addr := 0x1000 + 292 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^TextPlan) -> int ) (fp))(plan_)}
+TextPlanDestroy :: #force_inline proc "c" (plan_ : ^TextPlan){ addr := 0x1000 + 293 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^TextPlan)) (fp))(plan_)}
+TextDisplaySetContents :: #force_inline proc "c" (display_ : ^TextDisplay, contents_ : string = ""){ addr := 0x1000 + 294 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^TextDisplay, ^u8, int)) (fp))(display_, raw_data(contents_), len(contents_))}
+ColorWellGetRGB :: #force_inline proc "c" (well_ : ^ColorWell) -> u32 { addr := 0x1000 + 304 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^ColorWell) -> u32 ) (fp))(well_)}
+ColorWellSetRGB :: #force_inline proc "c" (well_ : ^ColorWell, colorRGB_ : u32 , sendChangedMessage_ : bool){ addr := 0x1000 + 305 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ColorWell, u32 , bool)) (fp))(well_, colorRGB_, sendChangedMessage_)}
+ColorWellSetIndeterminate :: #force_inline proc "c" (well_ : ^ColorWell){ addr := 0x1000 + 306 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ColorWell)) (fp))(well_)}
+ChoiceAddMenuItem :: #force_inline proc "c" (choice_ : ^Choice, item_ : Generic){ addr := 0x1000 + 307 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Choice, Generic)) (fp))(choice_, item_)}
+ChoiceSetItem :: #force_inline proc "c" (choice_ : ^Choice, item_ : Generic, sendUpdatedMessage_ : bool = true){ addr := 0x1000 + 308 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^Choice, Generic, bool)) (fp))(choice_, item_, sendUpdatedMessage_)}
+ChoiceGetItem :: #force_inline proc "c" (choice_ : ^Choice) -> Generic{ addr := 0x1000 + 309 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^Choice) -> Generic) (fp))(choice_)}
+ListViewInsertGroup :: #force_inline proc "c" (view_ : ^ListView, group_ : i32 , flags_ : u32 = FLAGS_DEFAULT){ addr := 0x1000 + 310 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView, i32 , u32 )) (fp))(view_, group_, flags_)}
+ListViewInsert :: #force_inline proc "c" (view_ : ^ListView, group_ : i32 , firstIndex_ : Generic, lastIndex_ : Generic, count_ : i64 = -1){ addr := 0x1000 + 311 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView, i32 , Generic, Generic, i64 )) (fp))(view_, group_, firstIndex_, lastIndex_, count_)}
+ListViewRemove :: #force_inline proc "c" (view_ : ^ListView, group_ : i32 , firstIndex_ : Generic, lastIndex_ : Generic, count_ : i64 = -1){ addr := 0x1000 + 312 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView, i32 , Generic, Generic, i64 )) (fp))(view_, group_, firstIndex_, lastIndex_, count_)}
+ListViewRemoveAll :: #force_inline proc "c" (view_ : ^ListView, group_ : i32 ){ addr := 0x1000 + 313 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView, i32 )) (fp))(view_, group_)}
+ListViewGetIndex :: #force_inline proc "c" (view_ : ^ListView, item_ : ^Element) -> Generic{ addr := 0x1000 + 314 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); return ((proc "c" ( ^ListView, ^Element) -> Generic) (fp))(view_, item_)}
+ListViewSetColumns :: #force_inline proc "c" (view_ : ^ListView, columns_ : ^ListViewColumn, columnCount_ : int ){ addr := 0x1000 + 315 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView, ^ListViewColumn, int )) (fp))(view_, columns_, columnCount_)}
+ListViewSetEmptyMessage :: #force_inline proc "c" (view_ : ^ListView, message_ : string = ""){ addr := 0x1000 + 262 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView, ^u8, int)) (fp))(view_, raw_data(message_), len(message_))}
+ListViewSelect :: #force_inline proc "c" (view_ : ^ListView, group_ : i32 , index_ : Generic){ addr := 0x1000 + 316 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView, i32 , Generic)) (fp))(view_, group_, index_)}
+ListViewResetSearchBuffer :: #force_inline proc "c" (view_ : ^ListView){ addr := 0x1000 + 317 * size_of(int); fp := (rawptr(((^uintptr)(uintptr(addr)))^)); ((proc "c" ( ^ListView)) (fp))(view_)}
diff --git a/core/sys/freebsd/syscalls.odin b/core/sys/freebsd/syscalls.odin
index 83b51138a..96fd9ac3f 100644
--- a/core/sys/freebsd/syscalls.odin
+++ b/core/sys/freebsd/syscalls.odin
@@ -21,6 +21,7 @@ SYS_close : uintptr : 6
SYS_getpid : uintptr : 20
SYS_recvfrom : uintptr : 29
SYS_accept : uintptr : 30
+SYS_getpeername: uintptr : 31
SYS_getsockname: uintptr : 32
SYS_fcntl : uintptr : 92
SYS_fsync : uintptr : 95
@@ -202,26 +203,38 @@ accept_nil :: proc "contextless" (s: Fd) -> (Fd, Errno) {
accept :: proc { accept_T, accept_nil }
-// Get socket name.
-//
-// The getsockname() system call appeared in 4.2BSD.
-getsockname :: proc "contextless" (s: Fd, sockaddr: ^$T) -> Errno {
+getsockname_or_peername :: proc "contextless" (s: Fd, sockaddr: ^$T, is_peer: bool) -> Errno {
// sockaddr must contain a valid pointer, or this will segfault because
// we're telling the syscall that there's memory available to write to.
addrlen: socklen_t = size_of(T)
- result, ok := intrinsics.syscall_bsd(SYS_getsockname,
+ result, ok := intrinsics.syscall_bsd(
+ is_peer ? SYS_getpeername : SYS_getsockname,
cast(uintptr)s,
cast(uintptr)sockaddr,
cast(uintptr)&addrlen)
if !ok {
- return cast(Errno)result
+ return cast(Errno)result
}
return nil
}
+// Get name of connected peer
+//
+// The getpeername() system call appeared in 4.2BSD.
+getpeername :: proc "contextless" (s: Fd, sockaddr: ^$T) -> Errno {
+ return getsockname_or_peername(s, sockaddr, true)
+}
+
+// Get socket name.
+//
+// The getsockname() system call appeared in 4.2BSD.
+getsockname :: proc "contextless" (s: Fd, sockaddr: ^$T) -> Errno {
+ return getsockname_or_peername(s, sockaddr, false)
+}
+
// Synchronize changes to a file.
//
// The fsync() system call appeared in 4.2BSD.
diff --git a/core/sys/info/cpu_arm.odin b/core/sys/info/cpu_arm.odin
index 960e55a56..8f5143394 100644
--- a/core/sys/info/cpu_arm.odin
+++ b/core/sys/info/cpu_arm.odin
@@ -40,9 +40,13 @@ CPU_Feature :: enum u64 {
}
CPU_Features :: distinct bit_set[CPU_Feature; u64]
-
-cpu_features: Maybe(CPU_Features)
-cpu_name: Maybe(string)
+CPU :: struct {
+ name: Maybe(string),
+ features: Maybe(CPU_Features),
+ physical_cores: int,
+ logical_cores: int,
+}
+cpu: CPU
@(private)
cpu_name_buf: [128]byte
@@ -53,7 +57,7 @@ init_cpu_name :: proc "contextless" () {
when ODIN_OS == .Darwin {
if unix.sysctlbyname("machdep.cpu.brand_string", &cpu_name_buf) {
- cpu_name = string(cstring(rawptr(&cpu_name_buf)))
+ cpu.name = string(cstring(rawptr(&cpu_name_buf)))
generic = false
}
}
@@ -61,10 +65,10 @@ init_cpu_name :: proc "contextless" () {
if generic {
when ODIN_ARCH == .arm64 {
copy(cpu_name_buf[:], "ARM64")
- cpu_name = string(cpu_name_buf[:len("ARM64")])
+ cpu.name = string(cpu_name_buf[:len("ARM64")])
} else {
copy(cpu_name_buf[:], "ARM")
- cpu_name = string(cpu_name_buf[:len("ARM")])
+ cpu.name = string(cpu_name_buf[:len("ARM")])
}
}
}
diff --git a/core/sys/info/cpu_darwin.odin b/core/sys/info/cpu_darwin.odin
new file mode 100644
index 000000000..c4a209f6d
--- /dev/null
+++ b/core/sys/info/cpu_darwin.odin
@@ -0,0 +1,12 @@
+package sysinfo
+
+import "core:sys/unix"
+
+@(init, private)
+init_cpu_core_count :: proc "contextless" () {
+ physical, logical: i64
+ unix.sysctlbyname("hw.physicalcpu", &physical)
+ unix.sysctlbyname("hw.logicalcpu", &logical)
+ cpu.physical_cores = int(physical)
+ cpu.logical_cores = int(logical)
+}
diff --git a/core/sys/info/cpu_darwin_arm64.odin b/core/sys/info/cpu_darwin_arm64.odin
index ffa60d1cb..aaeef9ad9 100644
--- a/core/sys/info/cpu_darwin_arm64.odin
+++ b/core/sys/info/cpu_darwin_arm64.odin
@@ -5,7 +5,7 @@ import "core:sys/unix"
@(init, private)
init_cpu_features :: proc "contextless" () {
@(static) features: CPU_Features
- defer cpu_features = features
+ defer cpu.features = features
try_set :: proc "contextless" (name: cstring, feature: CPU_Feature) -> (ok: bool) {
support: b32
diff --git a/core/sys/info/cpu_intel.odin b/core/sys/info/cpu_intel.odin
index 95b53dda0..7c5b38ca4 100644
--- a/core/sys/info/cpu_intel.odin
+++ b/core/sys/info/cpu_intel.odin
@@ -3,12 +3,6 @@ package sysinfo
import "base:intrinsics"
-// cpuid :: proc(ax, cx: u32) -> (eax, ebc, ecx, edx: u32) ---
-cpuid :: intrinsics.x86_cpuid
-
-// xgetbv :: proc(cx: u32) -> (eax, edx: u32) ---
-xgetbv :: intrinsics.x86_xgetbv
-
CPU_Feature :: enum u64 {
aes, // AES hardware implementation (AES NI)
adx, // Multi-precision add-carry instruction extensions
@@ -23,6 +17,7 @@ CPU_Feature :: enum u64 {
popcnt, // Hamming weight instruction POPCNT.
rdrand, // RDRAND instruction (on-chip random number generator)
rdseed, // RDSEED instruction (on-chip random number generator)
+ sha, // SHA Extensions (SHA-1, SHA-224, SHA-256)
sse2, // Streaming SIMD extension 2 (always available on amd64)
sse3, // Streaming SIMD extension 3
ssse3, // Supplemental streaming SIMD extension 3
@@ -48,9 +43,13 @@ CPU_Feature :: enum u64 {
}
CPU_Features :: distinct bit_set[CPU_Feature; u64]
-
-cpu_features: Maybe(CPU_Features)
-cpu_name: Maybe(string)
+CPU :: struct {
+ name: Maybe(string),
+ features: Maybe(CPU_Features),
+ physical_cores: int, // Initialized by cpu_<os>.odin
+ logical_cores: int, // Initialized by cpu_<os>.odin
+}
+cpu: CPU
@(init, private)
init_cpu_features :: proc "c" () {
@@ -87,7 +86,7 @@ init_cpu_features :: proc "c" () {
when ODIN_OS == .FreeBSD || ODIN_OS == .OpenBSD || ODIN_OS == .NetBSD {
// xgetbv is an illegal instruction under FreeBSD 13, OpenBSD 7.1 and NetBSD 10
// return before probing further
- cpu_features = set
+ cpu.features = set
return
}
@@ -115,6 +114,7 @@ init_cpu_features :: proc "c" () {
_, ebx7, ecx7, edx7 := cpuid(7, 0)
try_set(&set, .bmi1, 3, ebx7)
+ try_set(&set, .sha, 29, ebx7)
if os_supports_avx {
try_set(&set, .avx2, 5, ebx7)
}
@@ -149,7 +149,7 @@ init_cpu_features :: proc "c" () {
try_set(&set, .rdseed, 18, ebx7)
try_set(&set, .adx, 19, ebx7)
- cpu_features = set
+ cpu.features = set
}
@(private)
@@ -177,5 +177,11 @@ init_cpu_name :: proc "c" () {
for len(brand) > 0 && brand[len(brand) - 1] == 0 || brand[len(brand) - 1] == ' ' {
brand = brand[:len(brand) - 1]
}
- cpu_name = brand
+ cpu.name = brand
}
+
+// cpuid :: proc(ax, cx: u32) -> (eax, ebc, ecx, edx: u32) ---
+cpuid :: intrinsics.x86_cpuid
+
+// xgetbv :: proc(cx: u32) -> (eax, edx: u32) ---
+xgetbv :: intrinsics.x86_xgetbv \ No newline at end of file
diff --git a/core/sys/info/cpu_linux_arm.odin b/core/sys/info/cpu_linux_arm.odin
index 6408decb7..cde76a83d 100644
--- a/core/sys/info/cpu_linux_arm.odin
+++ b/core/sys/info/cpu_linux_arm.odin
@@ -17,7 +17,7 @@ init_cpu_features :: proc() {
if rerr != .NONE || n == 0 { return }
features: CPU_Features
- defer cpu_features = features
+ defer cpu.features = features
str := string(buf[:n])
for line in strings.split_lines_iterator(&str) {
diff --git a/core/sys/info/cpu_linux_intel.odin b/core/sys/info/cpu_linux_intel.odin
new file mode 100644
index 000000000..e43737475
--- /dev/null
+++ b/core/sys/info/cpu_linux_intel.odin
@@ -0,0 +1,38 @@
+#+build i386, amd64
+#+build linux
+package sysinfo
+
+import "core:sys/linux"
+import "core:strings"
+import "core:strconv"
+
+@(init, private)
+init_cpu_core_count :: proc() {
+ fd, err := linux.open("/proc/cpuinfo", {})
+ if err != .NONE { return }
+ defer linux.close(fd)
+
+ // This is probably enough right?
+ buf: [4096]byte
+ n, rerr := linux.read(fd, buf[:])
+ if rerr != .NONE || n == 0 { return }
+
+ str := string(buf[:n])
+ for line in strings.split_lines_iterator(&str) {
+ key, _, value := strings.partition(line, ":")
+ key = strings.trim_space(key)
+ value = strings.trim_space(value)
+
+ if key == "cpu cores" {
+ if num_physical_cores, ok := strconv.parse_int(value); ok {
+ cpu.physical_cores = num_physical_cores
+ }
+ }
+
+ if key == "siblings" {
+ if num_logical_cores, ok := strconv.parse_int(value); ok {
+ cpu.logical_cores = num_logical_cores
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/core/sys/info/cpu_linux_riscv64.odin b/core/sys/info/cpu_linux_riscv64.odin
index 84f6134d4..3d36d126d 100644
--- a/core/sys/info/cpu_linux_riscv64.odin
+++ b/core/sys/info/cpu_linux_riscv64.odin
@@ -9,7 +9,7 @@ import "core:sys/linux"
@(init, private)
init_cpu_features :: proc() {
_features: CPU_Features
- defer cpu_features = _features
+ defer cpu.features = _features
HWCAP_Bits :: enum u64 {
I = 'I' - 'A',
@@ -109,5 +109,5 @@ init_cpu_features :: proc() {
@(init, private)
init_cpu_name :: proc() {
- cpu_name = "RISCV64"
+ cpu.name = "RISCV64"
}
diff --git a/core/sys/info/cpu_riscv64.odin b/core/sys/info/cpu_riscv64.odin
index c3319c48c..64f2edfd3 100644
--- a/core/sys/info/cpu_riscv64.odin
+++ b/core/sys/info/cpu_riscv64.odin
@@ -95,6 +95,10 @@ CPU_Feature :: enum u64 {
}
CPU_Features :: distinct bit_set[CPU_Feature; u64]
-
-cpu_features: Maybe(CPU_Features)
-cpu_name: Maybe(string)
+CPU :: struct {
+ name: Maybe(string),
+ features: Maybe(CPU_Features),
+ physical_cores: int,
+ logical_cores: int,
+}
+cpu: CPU \ No newline at end of file
diff --git a/core/sys/info/cpu_windows.odin b/core/sys/info/cpu_windows.odin
new file mode 100644
index 000000000..7dd2d2a8c
--- /dev/null
+++ b/core/sys/info/cpu_windows.odin
@@ -0,0 +1,28 @@
+package sysinfo
+
+import sys "core:sys/windows"
+import "base:intrinsics"
+
+@(init, private)
+init_cpu_core_count :: proc() {
+ infos: []sys.SYSTEM_LOGICAL_PROCESSOR_INFORMATION
+ defer delete(infos)
+
+ returned_length: sys.DWORD
+ // Query for the required buffer size.
+ if ok := sys.GetLogicalProcessorInformation(raw_data(infos), &returned_length); !ok {
+ infos = make([]sys.SYSTEM_LOGICAL_PROCESSOR_INFORMATION, returned_length / size_of(sys.SYSTEM_LOGICAL_PROCESSOR_INFORMATION))
+ }
+
+ // If it still doesn't work, return
+ if ok := sys.GetLogicalProcessorInformation(raw_data(infos), &returned_length); !ok {
+ return
+ }
+
+ for info in infos {
+ #partial switch info.Relationship {
+ case .RelationProcessorCore: cpu.physical_cores += 1
+ case .RelationNumaNode: cpu.logical_cores += int(intrinsics.count_ones(info.ProcessorMask))
+ }
+ }
+} \ No newline at end of file
diff --git a/core/sys/info/doc.odin b/core/sys/info/doc.odin
index 2fd34b864..aef444f98 100644
--- a/core/sys/info/doc.odin
+++ b/core/sys/info/doc.odin
@@ -26,13 +26,15 @@ Example:
import si "core:sys/info"
main :: proc() {
- fmt.printfln("Odin: %v", ODIN_VERSION)
- fmt.printfln("OS: %v", si.os_version.as_string)
- fmt.printfln("OS: %#v", si.os_version)
- fmt.printfln("CPU: %v", si.cpu_name)
- fmt.printfln("RAM: %#.1M", si.ram.total_ram)
+ fmt.printfln("Odin: %v", ODIN_VERSION)
+ fmt.printfln("OS: %v", si.os_version.as_string)
+ fmt.printfln("OS: %#v", si.os_version)
+ fmt.printfln("CPU: %v", si.cpu.name)
+ fmt.printfln("CPU: %v", si.cpu.name)
+ fmt.printfln("CPU cores: %vc/%vt", si.cpu.physical_cores, si.cpu.logical_cores)
+ fmt.printfln("RAM: %#.1M", si.ram.total_ram)
- // fmt.printfln("Features: %v", si.cpu_features)
+ // fmt.printfln("Features: %v", si.cpu.features)
// fmt.printfln("MacOS version: %v", si.macos_version)
fmt.println()
diff --git a/core/sys/info/platform_darwin.odin b/core/sys/info/platform_darwin.odin
index 7dc49bcd1..dd7f0fa03 100644
--- a/core/sys/info/platform_darwin.odin
+++ b/core/sys/info/platform_darwin.odin
@@ -34,6 +34,7 @@ init_platform :: proc() {
} else {
os_version.platform = .MacOS
switch version.majorVersion {
+ case 26: ws(&b, "macOS Tahoe")
case 15: ws(&b, "macOS Sequoia")
case 14: ws(&b, "macOS Sonoma")
case 13: ws(&b, "macOS Ventura")
diff --git a/core/sys/info/platform_linux.odin b/core/sys/info/platform_linux.odin
index 45efc3329..9c342e567 100644
--- a/core/sys/info/platform_linux.odin
+++ b/core/sys/info/platform_linux.odin
@@ -16,9 +16,13 @@ init_os_version :: proc () {
b := strings.builder_from_bytes(version_string_buf[:])
// Try to parse `/etc/os-release` for `PRETTY_NAME="Ubuntu 20.04.3 LTS`
- {
+ pretty_parse: {
fd, errno := linux.open("/etc/os-release", {})
- assert(errno == .NONE, "Failed to read /etc/os-release")
+ if errno != .NONE {
+ strings.write_string(&b, "Unknown Linux Distro")
+ break pretty_parse
+ }
+
defer {
cerrno := linux.close(fd)
assert(cerrno == .NONE, "Failed to close the file descriptor")
@@ -26,7 +30,10 @@ init_os_version :: proc () {
os_release_buf: [2048]u8
n, read_errno := linux.read(fd, os_release_buf[:])
- assert(read_errno == .NONE, "Failed to read data from /etc/os-release")
+ if read_errno != .NONE {
+ strings.write_string(&b, "Unknown Linux Distro")
+ break pretty_parse
+ }
release := string(os_release_buf[:n])
// Search the line in the file until we find "PRETTY_NAME="
@@ -59,7 +66,7 @@ init_os_version :: proc () {
os_version.as_string = strings.to_string(b)
// Parse the Linux version out of the release string
- {
+ version_loop: {
version_num, _, version_suffix := strings.partition(release_str, "-")
os_version.version = version_suffix
@@ -72,11 +79,11 @@ init_os_version :: proc () {
case 0: dst = &os_version.major
case 1: dst = &os_version.minor
case 2: dst = &os_version.patch
- case: break
+ case: break version_loop
}
num, ok := strconv.parse_int(part)
- if !ok { break }
+ if !ok { break version_loop }
dst^ = num
}
diff --git a/core/sys/info/sysinfo.odin b/core/sys/info/sysinfo.odin
index f624a1718..75cc237c6 100644
--- a/core/sys/info/sysinfo.odin
+++ b/core/sys/info/sysinfo.odin
@@ -1,6 +1,6 @@
package sysinfo
-when !(ODIN_ARCH == .amd64 || ODIN_ARCH == .i386 || ODIN_ARCH == .arm32 || ODIN_ARCH == .arm64 || ODIN_ARCH == .riscv64) {
+when !(ODIN_ARCH == .amd64 || ODIN_ARCH == .i386 || ODIN_ARCH == .arm32 || ODIN_ARCH == .arm64 || ODIN_ARCH == .riscv64 || ODIN_ARCH == .wasm32 || ODIN_ARCH == .wasm64p32) {
#assert(false, "This package is unsupported on this architecture.")
}
diff --git a/core/sys/linux/bits.odin b/core/sys/linux/bits.odin
index 4493ea767..d4edf354b 100644
--- a/core/sys/linux/bits.odin
+++ b/core/sys/linux/bits.odin
@@ -1,5 +1,10 @@
package linux
+import "base:intrinsics"
+
+@(private)
+log2 :: intrinsics.constant_log2
+
/*
Represents an error returned by most of syscalls
@@ -574,7 +579,7 @@ Inotify_Event_Bits :: enum u32 {
/*
Bits for Mem_Protection bitfield
*/
-Mem_Protection_Bits :: enum{
+Mem_Protection_Bits :: enum {
READ = 0,
WRITE = 1,
EXEC = 2,
@@ -589,11 +594,13 @@ Mem_Protection_Bits :: enum{
/*
Bits for Map_Flags
+
+ See `constants.odin` for `MAP_SHARED_VALIDATE` and `MAP_HUGE_16KB`, et al.
*/
Map_Flags_Bits :: enum {
SHARED = 0,
PRIVATE = 1,
- SHARED_VALIDATE = 2,
+ DROPPABLE = 3,
FIXED = 4,
ANONYMOUS = 5,
// platform-dependent section start
@@ -1839,22 +1846,23 @@ EPoll_Flags_Bits :: enum {
}
EPoll_Event_Kind :: enum u32 {
- IN = 0x001,
- PRI = 0x002,
- OUT = 0x004,
- RDNORM = 0x040,
- RDBAND = 0x080,
- WRNORM = 0x100,
- WRBAND = 0x200,
- MSG = 0x400,
- ERR = 0x008,
- HUP = 0x010,
- RDHUP = 0x2000,
- EXCLUSIVE = 1<<28,
- WAKEUP = 1<<29,
- ONESHOT = 1<<30,
- ET = 1<<31,
-}
+ IN = log2(0x001),
+ PRI = log2(0x002),
+ OUT = log2(0x004),
+ RDNORM = log2(0x040),
+ RDBAND = log2(0x080),
+ WRNORM = log2(0x100),
+ WRBAND = log2(0x200),
+ MSG = log2(0x400),
+ ERR = log2(0x008),
+ HUP = log2(0x010),
+ RDHUP = log2(0x2000),
+ EXCLUSIVE = log2(1<<28),
+ WAKEUP = log2(1<<29),
+ ONESHOT = log2(1<<30),
+ ET = log2(1<<31),
+}
+EPoll_Event_Set :: bit_set[EPoll_Event_Kind; u32]
EPoll_Ctl_Opcode :: enum i32 {
ADD = 1,
diff --git a/core/sys/linux/constants.odin b/core/sys/linux/constants.odin
index 3fba74b4c..ceab17f6d 100644
--- a/core/sys/linux/constants.odin
+++ b/core/sys/linux/constants.odin
@@ -374,5 +374,24 @@ PTRACE_SECCOMP_GET_METADATA :: PTrace_Seccomp_Get_Metadata_Type(.SECCOMP_GET_M
PTRACE_GET_SYSCALL_INFO :: PTrace_Get_Syscall_Info_Type(.GET_SYSCALL_INFO)
PTRACE_GET_RSEQ_CONFIGURATION :: PTrace_Get_RSeq_Configuration_Type(.GET_RSEQ_CONFIGURATION)
+MAP_SHARED_VALIDATE :: Map_Flags{.SHARED, .PRIVATE}
+
+MAP_HUGE_SHIFT :: 26
+MAP_HUGE_MASK :: 63
+
+MAP_HUGE_16KB :: transmute(Map_Flags)(u32(14) << MAP_HUGE_SHIFT)
+MAP_HUGE_64KB :: transmute(Map_Flags)(u32(16) << MAP_HUGE_SHIFT)
+MAP_HUGE_512KB :: transmute(Map_Flags)(u32(19) << MAP_HUGE_SHIFT)
+MAP_HUGE_1MB :: transmute(Map_Flags)(u32(20) << MAP_HUGE_SHIFT)
+MAP_HUGE_2MB :: transmute(Map_Flags)(u32(21) << MAP_HUGE_SHIFT)
+MAP_HUGE_8MB :: transmute(Map_Flags)(u32(23) << MAP_HUGE_SHIFT)
+MAP_HUGE_16MB :: transmute(Map_Flags)(u32(24) << MAP_HUGE_SHIFT)
+MAP_HUGE_32MB :: transmute(Map_Flags)(u32(25) << MAP_HUGE_SHIFT)
+MAP_HUGE_256MB :: transmute(Map_Flags)(u32(28) << MAP_HUGE_SHIFT)
+MAP_HUGE_512MB :: transmute(Map_Flags)(u32(29) << MAP_HUGE_SHIFT)
+MAP_HUGE_1GB :: transmute(Map_Flags)(u32(30) << MAP_HUGE_SHIFT)
+MAP_HUGE_2GB :: transmute(Map_Flags)(u32(31) << MAP_HUGE_SHIFT)
+MAP_HUGE_16GB :: transmute(Map_Flags)(u32(34) << MAP_HUGE_SHIFT)
+
/* Get window size */
TIOCGWINSZ :: 0x5413
diff --git a/core/sys/linux/sys.odin b/core/sys/linux/sys.odin
index 5fc4a0efa..deb22726f 100644
--- a/core/sys/linux/sys.odin
+++ b/core/sys/linux/sys.odin
@@ -1,3 +1,4 @@
+#+build linux
#+no-instrumentation
package linux
@@ -1412,7 +1413,7 @@ umask :: proc "contextless" (mask: Mode) -> Mode {
Available since Linux 1.0.
*/
gettimeofday :: proc "contextless" (tv: ^Time_Val) -> (Errno) {
- ret := syscall(SYS_gettimeofday, tv)
+ ret := syscall(SYS_gettimeofday, tv, rawptr(nil))
return Errno(-ret)
}
diff --git a/core/sys/linux/types.odin b/core/sys/linux/types.odin
index dcc72f72b..08e0026d3 100644
--- a/core/sys/linux/types.odin
+++ b/core/sys/linux/types.odin
@@ -288,7 +288,7 @@ Rename_Flags :: bit_set[Rename_Flags_Bits; u32]
/*
Directory entry record.
- Recommended iterate these with `dirent_iterator()`,
+ Recommended to iterate these with `dirent_iterate_buf()`,
and obtain the name via `dirent_name()`.
*/
Dirent :: struct {
@@ -368,6 +368,8 @@ Mem_Protection :: bit_set[Mem_Protection_Bits; i32]
/*
Flags for mmap.
+
+ See `constants.odin` for `MAP_SHARED_VALIDATE` and `MAP_HUGE_16KB`, et al.
*/
Map_Flags :: bit_set[Map_Flags_Bits; i32]
@@ -1450,7 +1452,7 @@ EPoll_Data :: struct #raw_union {
}
EPoll_Event :: struct #packed {
- events: EPoll_Event_Kind,
+ events: EPoll_Event_Set,
data: EPoll_Data,
}
diff --git a/core/sys/linux/wrappers.odin b/core/sys/linux/wrappers.odin
index ab1992a57..53eb80f86 100644
--- a/core/sys/linux/wrappers.odin
+++ b/core/sys/linux/wrappers.odin
@@ -54,22 +54,45 @@ WCOREDUMP :: #force_inline proc "contextless" (s: u32) -> bool {
// TODO: sigaddset etc
-/// Iterate the results of getdents
-/// Only iterates as much data as loaded in the buffer
-/// In case you need to iterate *all* files in a directory
-/// consider using dirent_get_iterate
-///
-/// Example of using dirent_iterate_buf
-/// // Get dirents into a buffer
-/// buf: [128]u8
-/// sys.getdents(dirfd, buf[:])
-/// // Print the names of the files
-/// for dir in sys.dirent_iterate_buf(buf[:], &offs) {
-/// name := sys.dirent_name(dir)
-/// fmt.println(name)
-/// }
-/// This function doesn't automatically make a request
-/// for the buffer to be refilled
+/*
+Iterate the results of `getdents()`.
+
+This procedure extracts a directory entry from `buf` at the offset `offs`.
+`offs` will be modified to store an offset to the possible next directory entry
+in `buf`. The procedure only iterates as much data as loaded in the buffer and
+does not automatically make a request for the buffer to be refilled.
+
+Inputs:
+- buf: A byte buffer with data from `getdents()`
+- offs: An offset to the next possible directory entry in `buf`
+
+Returns:
+- A pointer to a directory entry in `buf`, or `nil`
+- A bool value denoting if a valid directory entry is returned
+
+Example:
+
+ import "core:fmt"
+ import "core:sys/linux"
+
+ print_names :: proc(dirfd: linux.Fd) {
+ // Get dirents into a buffer.
+ buf: [128]u8
+ // Loop until there are no more entries.
+ for {
+ written, err := linux.getdents(dirfd, buf[:])
+ if err != .NONE || written == 0 {
+ break
+ }
+ // Print the names of the files.
+ offset : int
+ for dir in linux.dirent_iterate_buf(buf[:written], &offset) {
+ name := linux.dirent_name(dir)
+ fmt.println(name)
+ }
+ }
+ }
+*/
dirent_iterate_buf :: proc "contextless" (buf: []u8, offs: ^int) -> (d: ^Dirent, cont: bool) {
// Stopped iterating when there's no space left
if offs^ >= len(buf) {
@@ -82,8 +105,17 @@ dirent_iterate_buf :: proc "contextless" (buf: []u8, offs: ^int) -> (d: ^Dirent,
return dirent, true
}
-/// Obtain the name of dirent as a string
-/// The lifetime of the string is bound to the lifetime of the provided dirent structure
+/*
+Obtain the name of dirent as a string.
+
+The lifetime of the returned string is bound to the lifetime of the provided dirent structure.
+
+Inputs:
+- dirent: A directory entry
+
+Returns:
+- A name of the entry
+*/
dirent_name :: proc "contextless" (dirent: ^Dirent) -> string #no_bounds_check {
str := ([^]u8)(&dirent.name)
// Dirents are aligned to 8 bytes, so there is guaranteed to be a null
@@ -93,10 +125,10 @@ dirent_name :: proc "contextless" (dirent: ^Dirent) -> string #no_bounds_check {
trunc := min(str_size, 8)
str_size -= trunc
for _ in 0..<trunc {
- str_size += 1
if str[str_size] == 0 {
break
}
+ str_size += 1
}
return string(str[:str_size])
}
diff --git a/core/sys/posix/dlfcn.odin b/core/sys/posix/dlfcn.odin
index e84b29d79..378c95c32 100644
--- a/core/sys/posix/dlfcn.odin
+++ b/core/sys/posix/dlfcn.odin
@@ -8,7 +8,10 @@ when ODIN_OS == .Darwin {
} else when ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD {
foreign import lib "system:dl"
} else {
- foreign import lib "system:c"
+ foreign import lib {
+ "system:c",
+ "system:dl",
+ }
}
// dlfcn.h - dynamic linking
diff --git a/core/sys/posix/posix.odin b/core/sys/posix/posix.odin
index d56217407..1e6a0aa9b 100644
--- a/core/sys/posix/posix.odin
+++ b/core/sys/posix/posix.odin
@@ -31,7 +31,7 @@ Unimplemented headers:
- iso646.h | Impossible
- math.h | See `core:c/libc`
- mqueue.h | Targets don't seem to have implemented it
-- regex.h | See `core:regex`
+- regex.h | See `core:text/regex`
- search.h | Not useful in Odin
- spawn.h | Use `fork`, `execve`, etc.
- stdarg.h | See `core:c/libc`
diff --git a/core/sys/posix/signal.odin b/core/sys/posix/signal.odin
index c7e2cc09b..882cd9fa8 100644
--- a/core/sys/posix/signal.odin
+++ b/core/sys/posix/signal.odin
@@ -50,7 +50,7 @@ foreign lib {
/*
Send a signal to a thread.
-
+
As with kill, if sig is 0, only validation (of the pthread_t given) is done and no signal is sent.
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_kill.html ]]
@@ -124,7 +124,7 @@ foreign lib {
sigignore :: proc(sig: Signal) -> result ---
/*
- Removes sig from the signal mask of the calling process and suspend the calling process until
+ Removes sig from the signal mask of the calling process and suspend the calling process until
a signal is received.
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/sighold.html ]]
@@ -166,7 +166,7 @@ foreign lib {
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigpending.html ]]
*/
@(link_name=LSIGPENDING)
- sigpending :: proc(set: ^sigset_t) -> result ---
+ sigpending :: proc(set: ^sigset_t) -> result ---
/*
Wait for one of the given signals.
@@ -333,7 +333,7 @@ SS_Flag_Bits :: enum c.int {
SS_Flags :: bit_set[SS_Flag_Bits; c.int]
Sig :: enum c.int {
- // Resulting set is the union of the current set and the signal set and the complement of
+ // Resulting set is the union of the current set and the signal set and the complement of
// the signal set pointed to by the argument.
BLOCK = SIG_BLOCK,
// Resulting set is the intersection of the current set and the complement of the signal set
@@ -395,6 +395,7 @@ when ODIN_OS == .Darwin {
SIGXFSZ :: 25
SIGVTALRM :: 26
SIGPROF :: 27
+ SIGWINCH :: 28
SIGUSR1 :: 30
SIGUSR2 :: 31
@@ -535,6 +536,7 @@ when ODIN_OS == .Darwin {
SIGXFSZ :: 25
SIGVTALRM :: 26
SIGPROF :: 27
+ SIGWINCH :: 28
SIGUSR1 :: 30
SIGUSR2 :: 31
@@ -565,7 +567,7 @@ when ODIN_OS == .Darwin {
SS_ONSTACK :: 0x0001
SS_DISABLE :: 0x0004
- when ODIN_ARCH == .amd64 || ODIN_ARCH == .arm32 {
+ when ODIN_ARCH == .arm64 || ODIN_ARCH == .arm32 {
MINSIGSTKSZ :: 1024 * 4
} else when ODIN_ARCH == .amd64 || ODIN_ARCH == .i386 {
MINSIGSTKSZ :: 512 * 4
@@ -699,6 +701,7 @@ when ODIN_OS == .Darwin {
SIGXFSZ :: 25
SIGVTALRM :: 26
SIGPROF :: 27
+ SIGWINCH :: 28
SIGUSR1 :: 30
SIGUSR2 :: 31
@@ -876,6 +879,7 @@ when ODIN_OS == .Darwin {
SIGXFSZ :: 25
SIGVTALRM :: 26
SIGPROF :: 27
+ SIGWINCH :: 28
SIGUSR1 :: 30
SIGUSR2 :: 31
@@ -1036,6 +1040,7 @@ when ODIN_OS == .Darwin {
SIGXFSZ :: 25
SIGVTALRM :: 26
SIGPROF :: 27
+ SIGWINCH :: 28
SIGPOLL :: 29
SIGSYS :: 31
@@ -1084,7 +1089,7 @@ when ODIN_OS == .Darwin {
@(private)
__SI_MAX_SIZE :: 128
- when size_of(int) == 8 {
+ when size_of(int) == 8 {
@(private)
_pad0 :: struct {
_pad0: c.int,
diff --git a/core/sys/wasm/js/events.odin b/core/sys/wasm/js/events.odin
index ffa3a1202..37a6e6c35 100644
--- a/core/sys/wasm/js/events.odin
+++ b/core/sys/wasm/js/events.odin
@@ -189,7 +189,7 @@ Key_Location :: enum u8 {
KEYBOARD_MAX_KEY_SIZE :: 32
KEYBOARD_MAX_CODE_SIZE :: 32
-GAMEPAD_MAX_ID_SIZE :: 64
+GAMEPAD_MAX_ID_SIZE :: 96
GAMEPAD_MAX_MAPPING_SIZE :: 64
GAMEPAD_MAX_BUTTONS :: 64
@@ -239,6 +239,12 @@ Gamepad_State :: struct {
_mapping_buf: [GAMEPAD_MAX_MAPPING_SIZE]byte `fmt:"-"`,
}
+Pointer_Type :: enum u8 {
+ Mouse,
+ Pen,
+ Touch,
+}
+
Event :: struct {
kind: Event_Kind,
target_kind: Event_Target_Kind,
@@ -275,6 +281,8 @@ Event :: struct {
repeat: bool,
+ char: rune,
+
_key_len: int `fmt:"-"`,
_code_len: int `fmt:"-"`,
_key_buf: [KEYBOARD_MAX_KEY_SIZE]byte `fmt:"-"`,
@@ -295,6 +303,21 @@ Event :: struct {
button: i16,
buttons: bit_set[0..<16; u16],
+
+ pointer: struct {
+ altitude_angle: f64,
+ azimuth_angle: f64,
+ persistent_device_id: int,
+ pointer_id: int,
+ width: int,
+ height: int,
+ pressure: f64,
+ tangential_pressure: f64,
+ tilt: [2]f64,
+ twist: f64,
+ pointer_type: Pointer_Type,
+ is_primary: bool,
+ },
},
gamepad: Gamepad_State,
@@ -323,13 +346,13 @@ add_event_listener :: proc(id: string, kind: Event_Kind, user_data: rawptr, call
return _add_event_listener(id, event_kind_string[kind], kind, user_data, callback, use_capture)
}
-remove_event_listener :: proc(id: string, kind: Event_Kind, user_data: rawptr, callback: proc(e: Event)) -> bool {
+remove_event_listener :: proc(id: string, kind: Event_Kind, user_data: rawptr, callback: proc(e: Event), use_capture := false) -> bool {
@(default_calling_convention="contextless")
foreign dom_lib {
@(link_name="remove_event_listener")
- _remove_event_listener :: proc(id: string, name: string, user_data: rawptr, callback: proc "odin" (Event)) -> bool ---
+ _remove_event_listener :: proc(id: string, name: string, user_data: rawptr, callback: proc "odin" (Event), use_capture: bool) -> bool ---
}
- return _remove_event_listener(id, event_kind_string[kind], user_data, callback)
+ return _remove_event_listener(id, event_kind_string[kind], user_data, callback, use_capture)
}
add_window_event_listener :: proc(kind: Event_Kind, user_data: rawptr, callback: proc(e: Event), use_capture := false) -> bool {
@@ -341,20 +364,26 @@ add_window_event_listener :: proc(kind: Event_Kind, user_data: rawptr, callback:
return _add_window_event_listener(event_kind_string[kind], kind, user_data, callback, use_capture)
}
-remove_window_event_listener :: proc(kind: Event_Kind, user_data: rawptr, callback: proc(e: Event)) -> bool {
+remove_window_event_listener :: proc(kind: Event_Kind, user_data: rawptr, callback: proc(e: Event), use_capture := false) -> bool {
@(default_calling_convention="contextless")
foreign dom_lib {
@(link_name="remove_window_event_listener")
- _remove_window_event_listener :: proc(name: string, user_data: rawptr, callback: proc "odin" (Event)) -> bool ---
+ _remove_window_event_listener :: proc(name: string, user_data: rawptr, callback: proc "odin" (Event), use_capture: bool) -> bool ---
}
- return _remove_window_event_listener(event_kind_string[kind], user_data, callback)
+ return _remove_window_event_listener(event_kind_string[kind], user_data, callback, use_capture)
}
remove_event_listener_from_event :: proc(e: Event) -> bool {
+ from_use_capture_false: bool
+ from_use_capture_true: bool
if e.id == "" {
- return remove_window_event_listener(e.kind, e.user_data, e.callback)
+ from_use_capture_false = remove_window_event_listener(e.kind, e.user_data, e.callback, false)
+ from_use_capture_true = remove_window_event_listener(e.kind, e.user_data, e.callback, true)
+ } else {
+ from_use_capture_false = remove_event_listener(e.id, e.kind, e.user_data, e.callback, false)
+ from_use_capture_true = remove_event_listener(e.id, e.kind, e.user_data, e.callback, true)
}
- return remove_event_listener(e.id, e.kind, e.user_data, e.callback)
+ return from_use_capture_false || from_use_capture_true
}
add_custom_event_listener :: proc(id: string, name: string, user_data: rawptr, callback: proc(e: Event), use_capture := false) -> bool {
@@ -365,13 +394,13 @@ add_custom_event_listener :: proc(id: string, name: string, user_data: rawptr, c
}
return _add_event_listener(id, name, .Custom, user_data, callback, use_capture)
}
-remove_custom_event_listener :: proc(id: string, name: string, user_data: rawptr, callback: proc(e: Event)) -> bool {
+remove_custom_event_listener :: proc(id: string, name: string, user_data: rawptr, callback: proc(e: Event), use_capture := false) -> bool {
@(default_calling_convention="contextless")
foreign dom_lib {
@(link_name="remove_event_listener")
- _remove_event_listener :: proc(id: string, name: string, user_data: rawptr, callback: proc "odin" (Event)) -> bool ---
+ _remove_event_listener :: proc(id: string, name: string, user_data: rawptr, callback: proc "odin" (Event), use_capture: bool) -> bool ---
}
- return _remove_event_listener(id, name, user_data, callback)
+ return _remove_event_listener(id, name, user_data, callback, use_capture)
}
get_gamepad_state :: proc "contextless" (index: int, s: ^Gamepad_State) -> bool {
@@ -384,7 +413,14 @@ get_gamepad_state :: proc "contextless" (index: int, s: ^Gamepad_State) -> bool
if s == nil {
return false
}
- return _get_gamepad_state(index, s)
+
+ if !_get_gamepad_state(index, s) {
+ return false
+ }
+
+ s.id = string(s._id_buf[:s._id_len])
+ s.mapping = string(s._mapping_buf[:s._mapping_len])
+ return true
}
@@ -415,4 +451,4 @@ do_event_callback :: proc(user_data: rawptr, callback: proc(e: Event)) {
callback(event)
}
-} \ No newline at end of file
+}
diff --git a/core/sys/wasm/js/events_all_targets.odin b/core/sys/wasm/js/events_all_targets.odin
index b7e01ca10..6439396c5 100644
--- a/core/sys/wasm/js/events_all_targets.odin
+++ b/core/sys/wasm/js/events_all_targets.odin
@@ -263,7 +263,7 @@ add_event_listener :: proc(id: string, kind: Event_Kind, user_data: rawptr, call
panic("vendor:wasm/js not supported on non JS targets")
}
-remove_event_listener :: proc(id: string, kind: Event_Kind, user_data: rawptr, callback: proc(e: Event)) -> bool {
+remove_event_listener :: proc(id: string, kind: Event_Kind, user_data: rawptr, callback: proc(e: Event), use_capture := false) -> bool {
panic("vendor:wasm/js not supported on non JS targets")
}
@@ -271,7 +271,7 @@ add_window_event_listener :: proc(kind: Event_Kind, user_data: rawptr, callback:
panic("vendor:wasm/js not supported on non JS targets")
}
-remove_window_event_listener :: proc(kind: Event_Kind, user_data: rawptr, callback: proc(e: Event)) -> bool {
+remove_window_event_listener :: proc(kind: Event_Kind, user_data: rawptr, callback: proc(e: Event), use_capture := false) -> bool {
panic("vendor:wasm/js not supported on non JS targets")
}
@@ -282,6 +282,6 @@ remove_event_listener_from_event :: proc(e: Event) -> bool {
add_custom_event_listener :: proc(id: string, name: string, user_data: rawptr, callback: proc(e: Event), use_capture := false) -> bool {
panic("vendor:wasm/js not supported on non JS targets")
}
-remove_custom_event_listener :: proc(id: string, name: string, user_data: rawptr, callback: proc(e: Event)) -> bool {
+remove_custom_event_listener :: proc(id: string, name: string, user_data: rawptr, callback: proc(e: Event), use_capture := false) -> bool {
panic("vendor:wasm/js not supported on non JS targets")
-} \ No newline at end of file
+}
diff --git a/core/sys/wasm/js/general.odin b/core/sys/wasm/js/general.odin
index 4ed2ae298..22bb08e2b 100644
--- a/core/sys/wasm/js/general.odin
+++ b/core/sys/wasm/js/general.odin
@@ -9,4 +9,5 @@ foreign odin_env {
abort :: proc() -> ! ---
alert :: proc(msg: string) ---
evaluate :: proc(str: string) ---
-} \ No newline at end of file
+ open :: proc(url: string, name := "", specs := "") ---
+}
diff --git a/core/sys/wasm/js/odin.js b/core/sys/wasm/js/odin.js
index 29227c526..37a57a59d 100644
--- a/core/sys/wasm/js/odin.js
+++ b/core/sys/wasm/js/odin.js
@@ -17,7 +17,7 @@ class WasmMemoryInterface {
constructor() {
this.memory = null;
this.exports = null;
- this.listenerMap = {};
+ this.listenerMap = new Map();
// Size (in bytes) of the integer type, should be 4 on `js_wasm32` and 8 on `js_wasm64p32`
this.intSize = 4;
@@ -110,16 +110,12 @@ class WasmMemoryInterface {
}
loadCstring(ptr) {
- return this.loadCstringDirect(this.loadPtr(ptr));
- }
-
- loadCstringDirect(start) {
- if (start == 0) {
+ if (ptr == 0) {
return null;
}
let len = 0;
- for (; this.mem.getUint8(start+len) != 0; len += 1) {}
- return this.loadString(start, len);
+ for (; this.mem.getUint8(ptr+len) != 0; len += 1) {}
+ return this.loadString(ptr, len);
}
storeU8(addr, value) { this.mem.setUint8 (addr, value); }
@@ -402,6 +398,9 @@ class WebGLInterface {
BlendEquation: (mode) => {
this.ctx.blendEquation(mode);
},
+ BlendEquationSeparate: (modeRGB, modeAlpha) => {
+ this.ctx.blendEquationSeparate(modeRGB, modeAlpha);
+ },
BlendFunc: (sfactor, dfactor) => {
this.ctx.blendFunc(sfactor, dfactor);
},
@@ -633,6 +632,13 @@ class WebGLInterface {
GetParameter: (pname) => {
return this.ctx.getParameter(pname);
},
+ GetParameter4i: (pname, v0, v1, v2, v3) => {
+ const i4 = this.ctx.getParameter(pname);
+ this.mem.storeI32(v0, i4[0]);
+ this.mem.storeI32(v1, i4[1]);
+ this.mem.storeI32(v2, i4[2]);
+ this.mem.storeI32(v3, i4[3]);
+ },
GetProgramParameter: (program, pname) => {
return this.ctx.getProgramParameter(this.programs[program], pname)
},
@@ -1315,18 +1321,20 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory) {
} else if (!line.includes("\n")) {
currentLine[isError] = currentLine[isError].concat(line);
} else {
- let lines = line.split("\n");
+ let lines = line.trimEnd().split("\n");
let printLast = lines.length > 1 && line.endsWith("\n");
println(currentLine[isError].concat(lines[0]));
currentLine[isError] = "";
for (let i = 1; i < lines.length-1; i++) {
println(lines[i]);
}
- let last = lines[lines.length-1];
- if (printLast) {
- println(last);
- } else {
- currentLine[isError] = last;
+ if (lines.length > 1) {
+ let last = lines[lines.length-1];
+ if (printLast) {
+ println(last);
+ } else {
+ currentLine[isError] = last;
+ }
}
}
@@ -1393,6 +1401,10 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory) {
info.scrollTop = info.scrollHeight;
};
+ const listener_key = (id, name, data, callback, useCapture) => {
+ return `${id}-${name}-data:${data}-callback:${callback}-useCapture:${useCapture}`;
+ };
+
let webglContext = new WebGLInterface(wasmMemoryInterface);
const env = {};
@@ -1421,6 +1433,13 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory) {
abort: () => { Module.abort() },
evaluate: (str_ptr, str_len) => { eval.call(null, wasmMemoryInterface.loadString(str_ptr, str_len)); },
+ open: (url_ptr, url_len, name_ptr, name_len, specs_ptr, specs_len) => {
+ const url = wasmMemoryInterface.loadString(url_ptr, url_len);
+ const name = wasmMemoryInterface.loadString(name_ptr, name_len);
+ const specs = wasmMemoryInterface.loadString(specs_ptr, specs_len);
+ window.open(url, name, specs);
+ },
+
// return a bigint to be converted to i64
time_now: () => BigInt(Date.now()),
tick_now: () => performance.now(),
@@ -1533,6 +1552,29 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory) {
wmi.storeI16(off(2), e.button);
wmi.storeU16(off(2), e.buttons);
+
+ if (e instanceof PointerEvent) {
+ wmi.storeF64(off(8), e.altitudeAngle);
+ wmi.storeF64(off(8), e.azimuthAngle);
+ wmi.storeInt(off(W), e.persistentDeviceId);
+ wmi.storeInt(off(W), e.pointerId);
+ wmi.storeInt(off(W), e.width);
+ wmi.storeInt(off(W), e.height);
+ wmi.storeF64(off(8), e.pressure);
+ wmi.storeF64(off(8), e.tangentialPressure);
+ wmi.storeF64(off(8), e.tiltX);
+ wmi.storeF64(off(8), e.tiltY);
+ wmi.storeF64(off(8), e.twist);
+ if (e.pointerType == "pen") {
+ wmi.storeU8(off(1), 1);
+ } else if (e.pointerType == "touch") {
+ wmi.storeU8(off(1), 2);
+ } else {
+ wmi.storeU8(off(1), 0);
+ }
+ wmi.storeU8(off(1), !!e.isPrimary);
+ }
+
} else if (e instanceof KeyboardEvent) {
// Note: those strings are constructed
// on the native side from buffers that
@@ -1549,6 +1591,8 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory) {
wmi.storeU8(off(1), !!e.repeat);
+ wmi.storeI32(off(4), e.charCode);
+
wmi.storeInt(off(W, W), e.key.length)
wmi.storeInt(off(W, W), e.code.length)
wmi.storeString(off(32, 1), e.key);
@@ -1588,10 +1632,24 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory) {
}
}
- wmi.storeInt(off(W, W), e.gamepad.id.length)
- wmi.storeInt(off(W, W), e.gamepad.mapping.length)
- wmi.storeString(off(64, 1), e.gamepad.id);
- wmi.storeString(off(64, 1), e.gamepad.mapping);
+ let idLength = e.gamepad.id.length;
+ let id = e.gamepad.id;
+ if (idLength > 96) {
+ idLength = 96;
+ id = id.slice(0, 93) + '...';
+ }
+
+ let mappingLength = e.gamepad.mapping.length;
+ let mapping = e.gamepad.mapping;
+ if (mappingLength > 64) {
+ mappingLength = 61;
+ mapping = mapping.slice(0, 61) + '...';
+ }
+
+ wmi.storeInt(off(W, W), idLength);
+ wmi.storeInt(off(W, W), mappingLength);
+ wmi.storeString(off(96, 1), id);
+ wmi.storeString(off(64, 1), mapping);
}
},
@@ -1602,6 +1660,10 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory) {
if (element == undefined) {
return false;
}
+ let key = listener_key(id, name, data, callback, !!use_capture);
+ if (wasmMemoryInterface.listenerMap.has(key)) {
+ return false;
+ }
let listener = (e) => {
let event_data = {};
@@ -1612,7 +1674,7 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory) {
onEventReceived(event_data, data, callback);
};
- wasmMemoryInterface.listenerMap[{data: data, callback: callback}] = listener;
+ wasmMemoryInterface.listenerMap.set(key, listener);
element.addEventListener(name, listener, !!use_capture);
return true;
},
@@ -1620,6 +1682,11 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory) {
add_window_event_listener: (name_ptr, name_len, name_code, data, callback, use_capture) => {
let name = wasmMemoryInterface.loadString(name_ptr, name_len);
let element = window;
+ let key = listener_key('window', name, data, callback, !!use_capture);
+ if (wasmMemoryInterface.listenerMap.has(key)) {
+ return false;
+ }
+
let listener = (e) => {
let event_data = {};
event_data.id_ptr = 0;
@@ -1629,12 +1696,12 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory) {
onEventReceived(event_data, data, callback);
};
- wasmMemoryInterface.listenerMap[{data: data, callback: callback}] = listener;
+ wasmMemoryInterface.listenerMap.set(key, listener);
element.addEventListener(name, listener, !!use_capture);
return true;
},
- remove_event_listener: (id_ptr, id_len, name_ptr, name_len, data, callback) => {
+ remove_event_listener: (id_ptr, id_len, name_ptr, name_len, data, callback, use_capture) => {
let id = wasmMemoryInterface.loadString(id_ptr, id_len);
let name = wasmMemoryInterface.loadString(name_ptr, name_len);
let element = getElement(id);
@@ -1642,24 +1709,28 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory) {
return false;
}
- let listener = wasmMemoryInterface.listenerMap[{data: data, callback: callback}];
- if (listener == undefined) {
+ let key = listener_key(id, name, data, callback, !!use_capture);
+ let listener = wasmMemoryInterface.listenerMap.get(key);
+ if (listener === undefined) {
return false;
}
- element.removeEventListener(name, listener);
+ wasmMemoryInterface.listenerMap.delete(key);
+
+ element.removeEventListener(name, listener, !!use_capture);
return true;
},
- remove_window_event_listener: (name_ptr, name_len, data, callback) => {
+ remove_window_event_listener: (name_ptr, name_len, data, callback, use_capture) => {
let name = wasmMemoryInterface.loadString(name_ptr, name_len);
let element = window;
- let key = {data: data, callback: callback};
- let listener = wasmMemoryInterface.listenerMap[key];
- if (!listener) {
+
+ let key = listener_key('window', name, data, callback, !!use_capture);
+ let listener = wasmMemoryInterface.listenerMap.get(key);
+ if (listener === undefined) {
return false;
}
- wasmMemoryInterface.listenerMap[key] = undefined;
+ wasmMemoryInterface.listenerMap.delete(key);
- element.removeEventListener(name, listener);
+ element.removeEventListener(name, listener, !!use_capture);
return true;
},
@@ -1756,10 +1827,24 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory) {
}
}
- wmi.storeInt(off(W, W), gamepad.id.length)
- wmi.storeInt(off(W, W), gamepad.mapping.length)
- wmi.storeString(off(64, 1), gamepad.id);
- wmi.storeString(off(64, 1), gamepad.mapping);
+ let idLength = gamepad.id.length;
+ let id = gamepad.id;
+ if (idLength > 96) {
+ idLength = 96;
+ id = id.slice(0, 93) + '...';
+ }
+
+ let mappingLength = gamepad.mapping.length;
+ let mapping = gamepad.mapping;
+ if (mappingLength > 64) {
+ mappingLength = 61;
+ mapping = mapping.slice(0, 61) + '...';
+ }
+
+ wmi.storeInt(off(W, W), idLength);
+ wmi.storeInt(off(W, W), mappingLength);
+ wmi.storeString(off(96, 1), id);
+ wmi.storeString(off(64, 1), mapping);
return true;
}
diff --git a/core/sys/windows/gdi32.odin b/core/sys/windows/gdi32.odin
index 1d7a93d85..cf762bb18 100644
--- a/core/sys/windows/gdi32.odin
+++ b/core/sys/windows/gdi32.odin
@@ -22,7 +22,7 @@ foreign gdi32 {
CreateDIBPatternBrush :: proc(h: HGLOBAL, iUsage: UINT) -> HBRUSH ---
CreateDIBitmap :: proc(hdc: HDC, pbmih: ^BITMAPINFOHEADER, flInit: DWORD, pjBits: VOID, pbmi: ^BITMAPINFO, iUsage: UINT) -> HBITMAP ---
- CreateDIBSection :: proc(hdc: HDC, pbmi: ^BITMAPINFO, usage: UINT, ppvBits: VOID, hSection: HANDLE, offset: DWORD) -> HBITMAP ---
+ CreateDIBSection :: proc(hdc: HDC, pbmi: ^BITMAPINFO, usage: UINT, ppvBits: ^^VOID, hSection: HANDLE, offset: DWORD) -> HBITMAP ---
StretchDIBits :: proc(hdc: HDC, xDest, yDest, DestWidth, DestHeight, xSrc, ySrc, SrcWidth, SrcHeight: INT, lpBits: VOID, lpbmi: ^BITMAPINFO, iUsage: UINT, rop: DWORD) -> INT ---
StretchBlt :: proc(hdcDest: HDC, xDest, yDest, wDest, hDest: INT, hdcSrc: HDC, xSrc, ySrc, wSrc, hSrc: INT, rop: DWORD) -> BOOL ---
diff --git a/core/sys/windows/kernel32.odin b/core/sys/windows/kernel32.odin
index 266dcdbf4..76f2897ac 100644
--- a/core/sys/windows/kernel32.odin
+++ b/core/sys/windows/kernel32.odin
@@ -168,6 +168,7 @@ foreign kernel32 {
ResumeThread :: proc(thread: HANDLE) -> DWORD ---
GetThreadPriority :: proc(thread: HANDLE) -> c_int ---
SetThreadPriority :: proc(thread: HANDLE, priority: c_int) -> BOOL ---
+ GetThreadDescription :: proc(hThread: HANDLE, ppszThreadDescription: ^PCWSTR) -> HRESULT ---
SetThreadDescription :: proc(hThread: HANDLE, lpThreadDescription: PCWSTR) -> HRESULT ---
GetExitCodeThread :: proc(thread: HANDLE, exit_code: ^DWORD) -> BOOL ---
TerminateThread :: proc(thread: HANDLE, exit_code: DWORD) -> BOOL ---
@@ -372,6 +373,12 @@ foreign kernel32 {
bInitialState: BOOL,
lpName: LPCWSTR,
) -> HANDLE ---
+ CreateEventExW :: proc(
+ lpEventAttributes: LPSECURITY_ATTRIBUTES,
+ lpName: LPCWSTR,
+ dwFlags: DWORD,
+ dwDesiredAccess: DWORD,
+ ) -> HANDLE ---
ResetEvent :: proc(hEvent: HANDLE) -> BOOL ---
SetEvent :: proc(hEvent: HANDLE) -> BOOL ---
WaitForMultipleObjects :: proc(
@@ -857,7 +864,6 @@ MEMORY_RESOURCE_NOTIFICATION_TYPE :: enum c_int {
LowMemoryResourceNotification :: MEMORY_RESOURCE_NOTIFICATION_TYPE.LowMemoryResourceNotification
HighMemoryResourceNotification :: MEMORY_RESOURCE_NOTIFICATION_TYPE.HighMemoryResourceNotification
-
@(default_calling_convention="system")
foreign kernel32 {
CreateMemoryResourceNotification :: proc(
@@ -1194,7 +1200,7 @@ DUMMYUNIONNAME_u :: struct #raw_union {
SYSTEM_LOGICAL_PROCESSOR_INFORMATION :: struct {
ProcessorMask: ULONG_PTR,
Relationship: LOGICAL_PROCESSOR_RELATIONSHIP,
- DummyUnion: DUMMYUNIONNAME_u,
+ using DummyUnion: DUMMYUNIONNAME_u,
}
SYSTEM_POWER_STATUS :: struct {
diff --git a/core/sys/windows/ole32.odin b/core/sys/windows/ole32.odin
index 8535a6f87..7409d40dc 100644
--- a/core/sys/windows/ole32.odin
+++ b/core/sys/windows/ole32.odin
@@ -52,6 +52,8 @@ foreign Ole32 {
ppv: ^LPVOID,
) -> HRESULT ---
+ CoTaskMemAlloc :: proc(cb: SIZE_T) -> rawptr ---
+ CoTaskMemRealloc :: proc(pv: rawptr, cb: SIZE_T) -> rawptr ---
CoTaskMemFree :: proc(pv: rawptr) ---
CLSIDFromProgID :: proc(lpszProgID: LPCOLESTR, lpclsid: LPCLSID) -> HRESULT ---
diff --git a/core/sys/windows/scan_codes.odin b/core/sys/windows/scan_codes.odin
new file mode 100644
index 000000000..54949c2f6
--- /dev/null
+++ b/core/sys/windows/scan_codes.odin
@@ -0,0 +1,172 @@
+#+build windows
+package sys_windows
+
+// Win32 scan codes for QWERTY layout
+// https://learn.microsoft.com/en-us/windows/win32/inputdev/about-keyboard-input#scan-codes
+
+KB_SYS_POWERDOWN :: 0xE05E
+KB_SYS_SLEEP :: 0xE05F
+KB_SYS_WAKEUP :: 0xE063
+KB_ERR_ROLLOVER :: 0x00FF
+
+KB_A :: 0x001E
+KB_B :: 0x0030
+KB_C :: 0x002E
+KB_D :: 0x0020
+KB_E :: 0x0012
+KB_F :: 0x0021
+KB_G :: 0x0022
+KB_H :: 0x0023
+KB_I :: 0x0017
+KB_J :: 0x0024
+KB_K :: 0x0025
+KB_L :: 0x0026
+KB_M :: 0x0032
+KB_N :: 0x0031
+KB_O :: 0x0018
+KB_P :: 0x0019
+KB_Q :: 0x0010
+KB_R :: 0x0013
+KB_S :: 0x001F
+KB_T :: 0x0014
+KB_U :: 0x0016
+KB_V :: 0x002F
+KB_W :: 0x0011
+KB_X :: 0x002D
+KB_Y :: 0x0015
+KB_Z :: 0x002C
+
+KB_1_BANG :: 0x0002
+KB_2_AT :: 0x0003
+KB_3_HASH :: 0x0004
+KB_4_DOLLAR :: 0x0005
+KB_5_PERCENT :: 0x0006
+KB_6_CARET :: 0x0007
+KB_7_AMPERSAND :: 0x0008
+KB_8_STAR :: 0x0009
+KB_9_LEFTBRACKET :: 0x000A
+KB_0_RIGHTBRACKET :: 0x000B
+
+KB_RETURN_ENTER :: 0x001C
+KB_ESCAPE :: 0x0001
+KB_DELETE :: 0x000E
+KB_TAB :: 0x000F
+KB_SPACEBAR :: 0x0039
+KB_DASH_UNDERSCORE :: 0x000C
+KB_EQUALS_PLUS :: 0x000D
+KB_LEFTBRACE :: 0x001A
+KB_RIGHTBRACE :: 0x001B
+KB_PIPE_SLASH :: 0x002B
+KB_NONUS :: 0x002B
+KB_SEMICOLON_COLON :: 0x0027
+KB_APOSTR_DOUBLEQUOT :: 0x0028
+KB_GRAVEACC_TILDE :: 0x0029
+KB_COMMA :: 0x0033
+KB_PERIOD :: 0x0034
+KB_QUESTIONMARK :: 0x0035
+KB_CAPSLOCK :: 0x003A
+
+KB_F1 :: 0x003B
+KB_F2 :: 0x003C
+KB_F3 :: 0x003D
+KB_F4 :: 0x003E
+KB_F5 :: 0x003F
+KB_F6 :: 0x0040
+KB_F7 :: 0x0041
+KB_F8 :: 0x0042
+KB_F9 :: 0x0043
+KB_F10 :: 0x0044
+KB_F11 :: 0x0057
+KB_F12 :: 0x0058
+
+KB_PRINTSCREEN :: 0xE037
+KB_SCROLLLOCK :: 0x0046
+KB_PAUSE :: 0xE11D45
+KB_INSERT :: 0xE052
+KB_HOME :: 0xE047
+KB_PAGEUP :: 0xE049
+KB_DELETEFORWARD :: 0xE053
+KB_END :: 0xE04F
+KB_PAGEDOWN :: 0xE051
+KB_RIGHTARROW :: 0xE04D
+KB_LEFTARROW :: 0xE04B
+KB_DOWNARROW :: 0xE050
+KB_UPARROW :: 0xE048
+
+KP_NUMLOCK_CLEAR :: 0x0045
+KP_FORWARDSLASH :: 0xE035
+KP_STAR :: 0x0037
+KP_DASH :: 0x004A
+KP_PLUS :: 0x004E
+KP_ENTER :: 0xE01C
+KP_1_END :: 0x004F
+KP_2_DOWNARROW :: 0x0050
+KP_3_PAGEDN :: 0x0051
+KP_4_LEFTARROW :: 0x004B
+KP_5 :: 0x004C
+KP_6_RIGHTARROW :: 0x004D
+KP_7_HOME :: 0x0047
+KP_8_UPARROW :: 0x0048
+KP_9_PAGEUP :: 0x0049
+KP_0_INSERT :: 0x0052
+KP_PERIOD :: 0x0053
+
+KB_NONUS_SLASHBAR :: 0x0056
+KB_APPLICATION :: 0xE05D
+KB_POWER :: 0xE05E
+KB_EQUALS :: 0x0059
+KB_F13 :: 0x0064
+KB_F14 :: 0x0065
+KB_F15 :: 0x0066
+KB_F16 :: 0x0067
+KB_F17 :: 0x0068
+KB_F18 :: 0x0069
+KB_F19 :: 0x006A
+KB_F20 :: 0x006B
+KB_F21 :: 0x006C
+KB_F22 :: 0x006D
+KB_F23 :: 0x006E
+KB_F24 :: 0x0076
+
+KP_COMMA :: 0x007E
+
+KB_INTERNATIONAL1 :: 0x0073
+KB_INTERNATIONAL2 :: 0x0070
+KB_INTERNATIONAL3 :: 0x007D
+KB_INTERNATIONAL4 :: 0x0079
+KB_INTERNATIONAL5 :: 0x007B
+KB_INTERNATIONAL6 :: 0x005C
+
+KB_LANG1 :: 0x0072
+KB_LANG2 :: 0x0071
+KB_LANG3 :: 0x0078
+KB_LANG4 :: 0x0077
+KB_LANG5 :: 0x0076
+
+KB_LEFTCONTROL :: 0x001D
+KB_LEFTSHIFT :: 0x002A
+KB_LEFTALT :: 0x0038
+KB_LEFTGUI :: 0xE05B
+KB_RIGHTCONTROL :: 0xE01D
+KB_RIGHTSHIFT :: 0x0036
+KB_RIGHTALT :: 0xE038
+KB_RIGHTGUI :: 0xE05C
+
+FN_SCANNEXTTRACK :: 0xE019
+FN_SCANPREVTRACK :: 0xE010
+FN_STOP :: 0xE024
+FN_PLAY_PAUSE :: 0xE022
+FN_MUTE :: 0xE020
+FN_VOLUMEINC :: 0xE030
+FN_VOLUMEDEC :: 0xE02E
+FN_AL_CONSUMERCTRLCONFIG :: 0xE06D
+FN_AL_EMAILREADER :: 0xE06C
+FN_AL_CALCULATOR :: 0xE021
+FN_AL_LOCALMACHINEBROWSER :: 0xE06B
+FN_AC_SEARCH :: 0xE065
+FN_AC_HOME :: 0xE032
+FN_AC_BACK :: 0xE06A
+FN_AC_FORWARD :: 0xE069
+FN_AC_STOP :: 0xE068
+FN_AC_REFRESH :: 0xE067
+FN_AC_BOOKMARKS :: 0xE066
diff --git a/core/sys/windows/types.odin b/core/sys/windows/types.odin
index f698b63d4..92b1cb15c 100644
--- a/core/sys/windows/types.odin
+++ b/core/sys/windows/types.odin
@@ -4845,6 +4845,12 @@ SOMAXCONN :: 128 // The number of messages that can be queued in memory after
SOCKET_ERROR :: -1
// Networking errors
+WSA_INVALID_HANDLE :: 6 // Specified event object handle is invalid.
+WSA_NOT_ENOUGH_MEMORY :: 8 // Insufficient memory available.
+WSA_INVALID_PARAMETER :: 87 // One or more parameters are invalid.
+WSA_OPERATION_ABORTED :: 995 // Overlapped operation aborted.
+WSA_IO_INCOMPLETE :: 996 // Overlapped I/O event object not in signaled state.
+WSA_IO_PENDING :: 997 // Overlapped operations will complete later.
WSAEINTR :: 10004 // Call interrupted. CancelBlockingCall was called. (This is different on Linux.)
WSAEACCES :: 10013 // If you try to bind a Udp socket to the broadcast address without the socket option set.
WSAEFAULT :: 10014 // A pointer that was passed to a WSA function is invalid, such as a buffer size is smaller than you said it was
diff --git a/core/sys/windows/user32.odin b/core/sys/windows/user32.odin
index 94cd57811..49ebb49cb 100644
--- a/core/sys/windows/user32.odin
+++ b/core/sys/windows/user32.odin
@@ -47,6 +47,8 @@ foreign user32 {
lpParam: LPVOID,
) -> HWND ---
+ GetWindowThreadProcessId :: proc(hwnd: HWND, lpdwProcessId: LPDWORD) -> DWORD ---
+
DestroyWindow :: proc(hWnd: HWND) -> BOOL ---
ShowWindow :: proc(hWnd: HWND, nCmdShow: INT) -> BOOL ---
diff --git a/core/sys/windows/util.odin b/core/sys/windows/util.odin
index b3eb800bc..30eecf8a1 100644
--- a/core/sys/windows/util.odin
+++ b/core/sys/windows/util.odin
@@ -75,15 +75,7 @@ LANGIDFROMLCID :: #force_inline proc "contextless" (lcid: LCID) -> LANGID {
return LANGID(lcid)
}
-// this one gave me trouble as it do not mask the values.
-// the _ in the name is also off comparing to the c code
-// i can't find any usage in the odin repo
-@(deprecated = "use MAKEWORD")
-MAKE_WORD :: #force_inline proc "contextless" (x, y: WORD) -> WORD {
- return x << 8 | y
-}
-
-utf8_to_utf16 :: proc(s: string, allocator := context.temp_allocator) -> []u16 {
+utf8_to_utf16_alloc :: proc(s: string, allocator := context.temp_allocator) -> []u16 {
if len(s) < 1 {
return nil
}
@@ -109,14 +101,42 @@ utf8_to_utf16 :: proc(s: string, allocator := context.temp_allocator) -> []u16 {
}
return text[:n]
}
-utf8_to_wstring :: proc(s: string, allocator := context.temp_allocator) -> wstring {
+
+utf8_to_utf16_buf :: proc(buf: []u16, s: string) -> []u16 {
+ n1 := MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, raw_data(s), i32(len(s)), nil, 0)
+ if n1 == 0 {
+ return nil
+ } else if int(n1) > len(buf) {
+ return nil
+ }
+
+ n1 = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, raw_data(s), i32(len(s)), raw_data(buf[:]), n1)
+ if n1 == 0 {
+ return nil
+ } else if int(n1) > len(buf) {
+ return nil
+ }
+ return buf[:n1]
+}
+utf8_to_utf16 :: proc{utf8_to_utf16_alloc, utf8_to_utf16_buf}
+
+utf8_to_wstring_alloc :: proc(s: string, allocator := context.temp_allocator) -> wstring {
if res := utf8_to_utf16(s, allocator); len(res) > 0 {
return raw_data(res)
}
return nil
}
-wstring_to_utf8 :: proc(s: wstring, N: int, allocator := context.temp_allocator) -> (res: string, err: runtime.Allocator_Error) {
+utf8_to_wstring_buf :: proc(buf: []u16, s: string) -> wstring {
+ if res := utf8_to_utf16(buf, s); len(res) > 0 {
+ return raw_data(res)
+ }
+ return nil
+}
+
+utf8_to_wstring :: proc{utf8_to_wstring_alloc, utf8_to_wstring_buf}
+
+wstring_to_utf8_alloc :: proc(s: wstring, N: int, allocator := context.temp_allocator) -> (res: string, err: runtime.Allocator_Error) {
context.allocator = allocator
if N == 0 {
@@ -150,13 +170,49 @@ wstring_to_utf8 :: proc(s: wstring, N: int, allocator := context.temp_allocator)
return string(text[:n]), nil
}
-utf16_to_utf8 :: proc(s: []u16, allocator := context.temp_allocator) -> (res: string, err: runtime.Allocator_Error) {
+wstring_to_utf8_buf :: proc(buf: []u8, s: wstring) -> (res: string) {
+ n := WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, s, -1, nil, 0, nil, nil)
+ if n == 0 {
+ return
+ } else if int(n) > len(buf) {
+ return
+ }
+
+ n2 := WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, s, -1, raw_data(buf), n, nil, nil)
+ if n2 == 0 {
+ return
+ } else if int(n2) > len(buf) {
+ return
+ }
+
+ for i in 0..<n2 {
+ if buf[i] == 0 {
+ n2 = i
+ break
+ }
+ }
+ return string(buf[:n2])
+}
+
+wstring_to_utf8 :: proc{wstring_to_utf8_alloc, wstring_to_utf8_buf}
+
+utf16_to_utf8_alloc :: proc(s: []u16, allocator := context.temp_allocator) -> (res: string, err: runtime.Allocator_Error) {
if len(s) == 0 {
return "", nil
}
return wstring_to_utf8(raw_data(s), len(s), allocator)
}
+utf16_to_utf8_buf :: proc(buf: []u8, s: []u16) -> (res: string) {
+ if len(s) == 0 {
+ return
+ }
+ return wstring_to_utf8(buf, raw_data(s))
+}
+
+utf16_to_utf8 :: proc{utf16_to_utf8_alloc, utf16_to_utf8_buf}
+
+
// AdvAPI32, NetAPI32 and UserENV helpers.
allowed_username :: proc(username: string) -> bool {
diff --git a/core/sys/windows/winerror.odin b/core/sys/windows/winerror.odin
index 61a7d9d86..05ab3d028 100644
--- a/core/sys/windows/winerror.odin
+++ b/core/sys/windows/winerror.odin
@@ -173,6 +173,9 @@ FACILITY :: enum DWORD {
EAS = 85,
WEB = 885,
WEB_SOCKET = 886,
+ XAUDIO2 = 896,
+ XAPO = 897,
+ GAMEINPUT = 906,
MOBILE = 1793,
SQLITE = 1967,
SERVICE_FABRIC = 1968,
@@ -231,6 +234,7 @@ ERROR_PIPE_BUSY : DWORD : 231
// https://learn.microsoft.com/en-us/windows/win32/seccrypto/common-hresult-values
S_OK :: 0x00000000 // Operation successful
+S_FALSE :: 0x00000001
E_NOTIMPL :: 0x80004001 // Not implemented
E_NOINTERFACE :: 0x80004002 // No such interface supported
E_POINTER :: 0x80004003 // Pointer that is not valid
@@ -270,6 +274,10 @@ MAKE_HRESULT :: #force_inline proc "contextless" (#any_int sev: int, #any_int fa
return HRESULT((uint(sev)<<31) | (uint(fac)<<16) | (uint(code)))
}
+HRESULT_FROM_WIN32 :: #force_inline proc "contextless" (#any_int code: int) -> HRESULT {
+ return HRESULT(code) <= 0 ? HRESULT(code) : HRESULT(uint(code & 0x0000FFFF) | (uint(FACILITY.WIN32) << 16) | 0x80000000)
+}
+
DECODE_HRESULT :: #force_inline proc "contextless" (#any_int hr: int) -> (SEVERITY, FACILITY, int) {
return HRESULT_SEVERITY(hr), HRESULT_FACILITY(hr), HRESULT_CODE(hr)
}
diff --git a/core/sys/windows/winmm.odin b/core/sys/windows/winmm.odin
index 3c7ec80e7..b85548b85 100644
--- a/core/sys/windows/winmm.odin
+++ b/core/sys/windows/winmm.odin
@@ -265,7 +265,7 @@ HWAVE :: distinct HANDLE
HWAVEIN :: distinct HANDLE
HWAVEOUT :: distinct HANDLE
-LPHWAVEIN :: ^HWAVEIN
+LPHWAVEIN :: ^HWAVEIN
LPHWAVEOUT :: ^HWAVEOUT
// https://learn.microsoft.com/en-us/windows/win32/multimedia/multimedia-timer-structures
@@ -311,10 +311,285 @@ MAXPNAMELEN :: 32
MAXERRORLENGTH :: 256
MMVERSION :: UINT
+// Input is four characters string
+// Output is little-endian u32 representation
+MAKEFOURCC :: #force_inline proc "contextless" (s: [4]byte) -> DWORD {
+ return (DWORD(s[0])) | (DWORD(s[1]) << 8) | (DWORD(s[2]) << 16) | (DWORD(s[3]) << 24 )
+}
+
/* flags for wFormatTag field of WAVEFORMAT */
WAVE_FORMAT_PCM :: 1
-WAVEFORMATEX :: struct {
+WAVE_FORMAT_UNKNOWN :: 0x0000 /* Microsoft Corporation */
+WAVE_FORMAT_ADPCM :: 0x0002 /* Microsoft Corporation */
+WAVE_FORMAT_IEEE_FLOAT :: 0x0003 /* Microsoft Corporation */
+WAVE_FORMAT_VSELP :: 0x0004 /* Compaq Computer Corp. */
+WAVE_FORMAT_IBM_CVSD :: 0x0005 /* IBM Corporation */
+WAVE_FORMAT_ALAW :: 0x0006 /* Microsoft Corporation */
+WAVE_FORMAT_MULAW :: 0x0007 /* Microsoft Corporation */
+WAVE_FORMAT_DTS :: 0x0008 /* Microsoft Corporation */
+WAVE_FORMAT_DRM :: 0x0009 /* Microsoft Corporation */
+WAVE_FORMAT_WMAVOICE9 :: 0x000A /* Microsoft Corporation */
+WAVE_FORMAT_WMAVOICE10 :: 0x000B /* Microsoft Corporation */
+WAVE_FORMAT_OKI_ADPCM :: 0x0010 /* OKI */
+WAVE_FORMAT_DVI_ADPCM :: 0x0011 /* Intel Corporation */
+WAVE_FORMAT_IMA_ADPCM :: WAVE_FORMAT_DVI_ADPCM /* Intel Corporation */
+WAVE_FORMAT_MEDIASPACE_ADPCM :: 0x0012 /* Videologic */
+WAVE_FORMAT_SIERRA_ADPCM :: 0x0013 /* Sierra Semiconductor Corp */
+WAVE_FORMAT_G723_ADPCM :: 0x0014 /* Antex Electronics Corporation */
+WAVE_FORMAT_DIGISTD :: 0x0015 /* DSP Solutions, Inc. */
+WAVE_FORMAT_DIGIFIX :: 0x0016 /* DSP Solutions, Inc. */
+WAVE_FORMAT_DIALOGIC_OKI_ADPCM :: 0x0017 /* Dialogic Corporation */
+WAVE_FORMAT_MEDIAVISION_ADPCM :: 0x0018 /* Media Vision, Inc. */
+WAVE_FORMAT_CU_CODEC :: 0x0019 /* Hewlett-Packard Company */
+WAVE_FORMAT_HP_DYN_VOICE :: 0x001A /* Hewlett-Packard Company */
+WAVE_FORMAT_YAMAHA_ADPCM :: 0x0020 /* Yamaha Corporation of America */
+WAVE_FORMAT_SONARC :: 0x0021 /* Speech Compression */
+WAVE_FORMAT_DSPGROUP_TRUESPEECH :: 0x0022 /* DSP Group, Inc */
+WAVE_FORMAT_ECHOSC1 :: 0x0023 /* Echo Speech Corporation */
+WAVE_FORMAT_AUDIOFILE_AF36 :: 0x0024 /* Virtual Music, Inc. */
+WAVE_FORMAT_APTX :: 0x0025 /* Audio Processing Technology */
+WAVE_FORMAT_AUDIOFILE_AF10 :: 0x0026 /* Virtual Music, Inc. */
+WAVE_FORMAT_PROSODY_1612 :: 0x0027 /* Aculab plc */
+WAVE_FORMAT_LRC :: 0x0028 /* Merging Technologies S.A. */
+WAVE_FORMAT_DOLBY_AC2 :: 0x0030 /* Dolby Laboratories */
+WAVE_FORMAT_GSM610 :: 0x0031 /* Microsoft Corporation */
+WAVE_FORMAT_MSNAUDIO :: 0x0032 /* Microsoft Corporation */
+WAVE_FORMAT_ANTEX_ADPCME :: 0x0033 /* Antex Electronics Corporation */
+WAVE_FORMAT_CONTROL_RES_VQLPC :: 0x0034 /* Control Resources Limited */
+WAVE_FORMAT_DIGIREAL :: 0x0035 /* DSP Solutions, Inc. */
+WAVE_FORMAT_DIGIADPCM :: 0x0036 /* DSP Solutions, Inc. */
+WAVE_FORMAT_CONTROL_RES_CR10 :: 0x0037 /* Control Resources Limited */
+WAVE_FORMAT_NMS_VBXADPCM :: 0x0038 /* Natural MicroSystems */
+WAVE_FORMAT_CS_IMAADPCM :: 0x0039 /* Crystal Semiconductor IMA ADPCM */
+WAVE_FORMAT_ECHOSC3 :: 0x003A /* Echo Speech Corporation */
+WAVE_FORMAT_ROCKWELL_ADPCM :: 0x003B /* Rockwell International */
+WAVE_FORMAT_ROCKWELL_DIGITALK :: 0x003C /* Rockwell International */
+WAVE_FORMAT_XEBEC :: 0x003D /* Xebec Multimedia Solutions Limited */
+WAVE_FORMAT_G721_ADPCM :: 0x0040 /* Antex Electronics Corporation */
+WAVE_FORMAT_G728_CELP :: 0x0041 /* Antex Electronics Corporation */
+WAVE_FORMAT_MSG723 :: 0x0042 /* Microsoft Corporation */
+WAVE_FORMAT_INTEL_G723_1 :: 0x0043 /* Intel Corp. */
+WAVE_FORMAT_INTEL_G729 :: 0x0044 /* Intel Corp. */
+WAVE_FORMAT_SHARP_G726 :: 0x0045 /* Sharp */
+WAVE_FORMAT_MPEG :: 0x0050 /* Microsoft Corporation */
+WAVE_FORMAT_RT24 :: 0x0052 /* InSoft, Inc. */
+WAVE_FORMAT_PAC :: 0x0053 /* InSoft, Inc. */
+WAVE_FORMAT_MPEGLAYER3 :: 0x0055 /* ISO/MPEG Layer3 Format Tag */
+WAVE_FORMAT_LUCENT_G723 :: 0x0059 /* Lucent Technologies */
+WAVE_FORMAT_CIRRUS :: 0x0060 /* Cirrus Logic */
+WAVE_FORMAT_ESPCM :: 0x0061 /* ESS Technology */
+WAVE_FORMAT_VOXWARE :: 0x0062 /* Voxware Inc */
+WAVE_FORMAT_CANOPUS_ATRAC :: 0x0063 /* Canopus, co., Ltd. */
+WAVE_FORMAT_G726_ADPCM :: 0x0064 /* APICOM */
+WAVE_FORMAT_G722_ADPCM :: 0x0065 /* APICOM */
+WAVE_FORMAT_DSAT :: 0x0066 /* Microsoft Corporation */
+WAVE_FORMAT_DSAT_DISPLAY :: 0x0067 /* Microsoft Corporation */
+WAVE_FORMAT_VOXWARE_BYTE_ALIGNED :: 0x0069 /* Voxware Inc */
+WAVE_FORMAT_VOXWARE_AC8 :: 0x0070 /* Voxware Inc */
+WAVE_FORMAT_VOXWARE_AC10 :: 0x0071 /* Voxware Inc */
+WAVE_FORMAT_VOXWARE_AC16 :: 0x0072 /* Voxware Inc */
+WAVE_FORMAT_VOXWARE_AC20 :: 0x0073 /* Voxware Inc */
+WAVE_FORMAT_VOXWARE_RT24 :: 0x0074 /* Voxware Inc */
+WAVE_FORMAT_VOXWARE_RT29 :: 0x0075 /* Voxware Inc */
+WAVE_FORMAT_VOXWARE_RT29HW :: 0x0076 /* Voxware Inc */
+WAVE_FORMAT_VOXWARE_VR12 :: 0x0077 /* Voxware Inc */
+WAVE_FORMAT_VOXWARE_VR18 :: 0x0078 /* Voxware Inc */
+WAVE_FORMAT_VOXWARE_TQ40 :: 0x0079 /* Voxware Inc */
+WAVE_FORMAT_VOXWARE_SC3 :: 0x007A /* Voxware Inc */
+WAVE_FORMAT_VOXWARE_SC3_1 :: 0x007B /* Voxware Inc */
+WAVE_FORMAT_SOFTSOUND :: 0x0080 /* Softsound, Ltd. */
+WAVE_FORMAT_VOXWARE_TQ60 :: 0x0081 /* Voxware Inc */
+WAVE_FORMAT_MSRT24 :: 0x0082 /* Microsoft Corporation */
+WAVE_FORMAT_G729A :: 0x0083 /* AT&T Labs, Inc. */
+WAVE_FORMAT_MVI_MVI2 :: 0x0084 /* Motion Pixels */
+WAVE_FORMAT_DF_G726 :: 0x0085 /* DataFusion Systems (Pty) (Ltd) */
+WAVE_FORMAT_DF_GSM610 :: 0x0086 /* DataFusion Systems (Pty) (Ltd) */
+WAVE_FORMAT_ISIAUDIO :: 0x0088 /* Iterated Systems, Inc. */
+WAVE_FORMAT_ONLIVE :: 0x0089 /* OnLive! Technologies, Inc. */
+WAVE_FORMAT_MULTITUDE_FT_SX20 :: 0x008A /* Multitude Inc. */
+WAVE_FORMAT_INFOCOM_ITS_G721_ADPCM :: 0x008B /* Infocom */
+WAVE_FORMAT_CONVEDIA_G729 :: 0x008C /* Convedia Corp. */
+WAVE_FORMAT_CONGRUENCY :: 0x008D /* Congruency Inc. */
+WAVE_FORMAT_SBC24 :: 0x0091 /* Siemens Business Communications Sys */
+WAVE_FORMAT_DOLBY_AC3_SPDIF :: 0x0092 /* Sonic Foundry */
+WAVE_FORMAT_MEDIASONIC_G723 :: 0x0093 /* MediaSonic */
+WAVE_FORMAT_PROSODY_8KBPS :: 0x0094 /* Aculab plc */
+WAVE_FORMAT_ZYXEL_ADPCM :: 0x0097 /* ZyXEL Communications, Inc. */
+WAVE_FORMAT_PHILIPS_LPCBB :: 0x0098 /* Philips Speech Processing */
+WAVE_FORMAT_PACKED :: 0x0099 /* Studer Professional Audio AG */
+WAVE_FORMAT_MALDEN_PHONYTALK :: 0x00A0 /* Malden Electronics Ltd. */
+WAVE_FORMAT_RACAL_RECORDER_GSM :: 0x00A1 /* Racal recorders */
+WAVE_FORMAT_RACAL_RECORDER_G720_A :: 0x00A2 /* Racal recorders */
+WAVE_FORMAT_RACAL_RECORDER_G723_1 :: 0x00A3 /* Racal recorders */
+WAVE_FORMAT_RACAL_RECORDER_TETRA_ACELP :: 0x00A4 /* Racal recorders */
+WAVE_FORMAT_NEC_AAC :: 0x00B0 /* NEC Corp. */
+WAVE_FORMAT_RAW_AAC1 :: 0x00FF /* For Raw AAC, with format block AudioSpecificConfig() (as defined by MPEG-4), that follows WAVEFORMATEX */
+WAVE_FORMAT_RHETOREX_ADPCM :: 0x0100 /* Rhetorex Inc. */
+WAVE_FORMAT_IRAT :: 0x0101 /* BeCubed Software Inc. */
+WAVE_FORMAT_VIVO_G723 :: 0x0111 /* Vivo Software */
+WAVE_FORMAT_VIVO_SIREN :: 0x0112 /* Vivo Software */
+WAVE_FORMAT_PHILIPS_CELP :: 0x0120 /* Philips Speech Processing */
+WAVE_FORMAT_PHILIPS_GRUNDIG :: 0x0121 /* Philips Speech Processing */
+WAVE_FORMAT_DIGITAL_G723 :: 0x0123 /* Digital Equipment Corporation */
+WAVE_FORMAT_SANYO_LD_ADPCM :: 0x0125 /* Sanyo Electric Co., Ltd. */
+WAVE_FORMAT_SIPROLAB_ACEPLNET :: 0x0130 /* Sipro Lab Telecom Inc. */
+WAVE_FORMAT_SIPROLAB_ACELP4800 :: 0x0131 /* Sipro Lab Telecom Inc. */
+WAVE_FORMAT_SIPROLAB_ACELP8V3 :: 0x0132 /* Sipro Lab Telecom Inc. */
+WAVE_FORMAT_SIPROLAB_G729 :: 0x0133 /* Sipro Lab Telecom Inc. */
+WAVE_FORMAT_SIPROLAB_G729A :: 0x0134 /* Sipro Lab Telecom Inc. */
+WAVE_FORMAT_SIPROLAB_KELVIN :: 0x0135 /* Sipro Lab Telecom Inc. */
+WAVE_FORMAT_VOICEAGE_AMR :: 0x0136 /* VoiceAge Corp. */
+WAVE_FORMAT_G726ADPCM :: 0x0140 /* Dictaphone Corporation */
+WAVE_FORMAT_DICTAPHONE_CELP68 :: 0x0141 /* Dictaphone Corporation */
+WAVE_FORMAT_DICTAPHONE_CELP54 :: 0x0142 /* Dictaphone Corporation */
+WAVE_FORMAT_QUALCOMM_PUREVOICE :: 0x0150 /* Qualcomm, Inc. */
+WAVE_FORMAT_QUALCOMM_HALFRATE :: 0x0151 /* Qualcomm, Inc. */
+WAVE_FORMAT_TUBGSM :: 0x0155 /* Ring Zero Systems, Inc. */
+WAVE_FORMAT_MSAUDIO1 :: 0x0160 /* Microsoft Corporation */
+WAVE_FORMAT_WMAUDIO2 :: 0x0161 /* Microsoft Corporation */
+WAVE_FORMAT_WMAUDIO3 :: 0x0162 /* Microsoft Corporation */
+WAVE_FORMAT_WMAUDIO_LOSSLESS :: 0x0163 /* Microsoft Corporation */
+WAVE_FORMAT_WMASPDIF :: 0x0164 /* Microsoft Corporation */
+WAVE_FORMAT_UNISYS_NAP_ADPCM :: 0x0170 /* Unisys Corp. */
+WAVE_FORMAT_UNISYS_NAP_ULAW :: 0x0171 /* Unisys Corp. */
+WAVE_FORMAT_UNISYS_NAP_ALAW :: 0x0172 /* Unisys Corp. */
+WAVE_FORMAT_UNISYS_NAP_16K :: 0x0173 /* Unisys Corp. */
+WAVE_FORMAT_SYCOM_ACM_SYC008 :: 0x0174 /* SyCom Technologies */
+WAVE_FORMAT_SYCOM_ACM_SYC701_G726L :: 0x0175 /* SyCom Technologies */
+WAVE_FORMAT_SYCOM_ACM_SYC701_CELP54 :: 0x0176 /* SyCom Technologies */
+WAVE_FORMAT_SYCOM_ACM_SYC701_CELP68 :: 0x0177 /* SyCom Technologies */
+WAVE_FORMAT_KNOWLEDGE_ADVENTURE_ADPCM :: 0x0178 /* Knowledge Adventure, Inc. */
+WAVE_FORMAT_FRAUNHOFER_IIS_MPEG2_AAC :: 0x0180 /* Fraunhofer IIS */
+WAVE_FORMAT_DTS_DS :: 0x0190 /* Digital Theatre Systems, Inc. */
+WAVE_FORMAT_CREATIVE_ADPCM :: 0x0200 /* Creative Labs, Inc */
+WAVE_FORMAT_CREATIVE_FASTSPEECH8 :: 0x0202 /* Creative Labs, Inc */
+WAVE_FORMAT_CREATIVE_FASTSPEECH10 :: 0x0203 /* Creative Labs, Inc */
+WAVE_FORMAT_UHER_ADPCM :: 0x0210 /* UHER informatic GmbH */
+WAVE_FORMAT_ULEAD_DV_AUDIO :: 0x0215 /* Ulead Systems, Inc. */
+WAVE_FORMAT_ULEAD_DV_AUDIO_1 :: 0x0216 /* Ulead Systems, Inc. */
+WAVE_FORMAT_QUARTERDECK :: 0x0220 /* Quarterdeck Corporation */
+WAVE_FORMAT_ILINK_VC :: 0x0230 /* I-link Worldwide */
+WAVE_FORMAT_RAW_SPORT :: 0x0240 /* Aureal Semiconductor */
+WAVE_FORMAT_ESST_AC3 :: 0x0241 /* ESS Technology, Inc. */
+WAVE_FORMAT_GENERIC_PASSTHRU :: 0x0249
+WAVE_FORMAT_IPI_HSX :: 0x0250 /* Interactive Products, Inc. */
+WAVE_FORMAT_IPI_RPELP :: 0x0251 /* Interactive Products, Inc. */
+WAVE_FORMAT_CS2 :: 0x0260 /* Consistent Software */
+WAVE_FORMAT_SONY_SCX :: 0x0270 /* Sony Corp. */
+WAVE_FORMAT_SONY_SCY :: 0x0271 /* Sony Corp. */
+WAVE_FORMAT_SONY_ATRAC3 :: 0x0272 /* Sony Corp. */
+WAVE_FORMAT_SONY_SPC :: 0x0273 /* Sony Corp. */
+WAVE_FORMAT_TELUM_AUDIO :: 0x0280 /* Telum Inc. */
+WAVE_FORMAT_TELUM_IA_AUDIO :: 0x0281 /* Telum Inc. */
+WAVE_FORMAT_NORCOM_VOICE_SYSTEMS_ADPCM :: 0x0285 /* Norcom Electronics Corp. */
+WAVE_FORMAT_FM_TOWNS_SND :: 0x0300 /* Fujitsu Corp. */
+WAVE_FORMAT_MICRONAS :: 0x0350 /* Micronas Semiconductors, Inc. */
+WAVE_FORMAT_MICRONAS_CELP833 :: 0x0351 /* Micronas Semiconductors, Inc. */
+WAVE_FORMAT_BTV_DIGITAL :: 0x0400 /* Brooktree Corporation */
+WAVE_FORMAT_INTEL_MUSIC_CODER :: 0x0401 /* Intel Corp. */
+WAVE_FORMAT_INDEO_AUDIO :: 0x0402 /* Ligos */
+WAVE_FORMAT_QDESIGN_MUSIC :: 0x0450 /* QDesign Corporation */
+WAVE_FORMAT_ON2_VP7_AUDIO :: 0x0500 /* On2 Technologies */
+WAVE_FORMAT_ON2_VP6_AUDIO :: 0x0501 /* On2 Technologies */
+WAVE_FORMAT_VME_VMPCM :: 0x0680 /* AT&T Labs, Inc. */
+WAVE_FORMAT_TPC :: 0x0681 /* AT&T Labs, Inc. */
+WAVE_FORMAT_LIGHTWAVE_LOSSLESS :: 0x08AE /* Clearjump */
+WAVE_FORMAT_OLIGSM :: 0x1000 /* Ing C. Olivetti & C., S.p.A. */
+WAVE_FORMAT_OLIADPCM :: 0x1001 /* Ing C. Olivetti & C., S.p.A. */
+WAVE_FORMAT_OLICELP :: 0x1002 /* Ing C. Olivetti & C., S.p.A. */
+WAVE_FORMAT_OLISBC :: 0x1003 /* Ing C. Olivetti & C., S.p.A. */
+WAVE_FORMAT_OLIOPR :: 0x1004 /* Ing C. Olivetti & C., S.p.A. */
+WAVE_FORMAT_LH_CODEC :: 0x1100 /* Lernout & Hauspie */
+WAVE_FORMAT_LH_CODEC_CELP :: 0x1101 /* Lernout & Hauspie */
+WAVE_FORMAT_LH_CODEC_SBC8 :: 0x1102 /* Lernout & Hauspie */
+WAVE_FORMAT_LH_CODEC_SBC12 :: 0x1103 /* Lernout & Hauspie */
+WAVE_FORMAT_LH_CODEC_SBC16 :: 0x1104 /* Lernout & Hauspie */
+WAVE_FORMAT_NORRIS :: 0x1400 /* Norris Communications, Inc. */
+WAVE_FORMAT_ISIAUDIO_2 :: 0x1401 /* ISIAudio */
+WAVE_FORMAT_SOUNDSPACE_MUSICOMPRESS :: 0x1500 /* AT&T Labs, Inc. */
+WAVE_FORMAT_MPEG_ADTS_AAC :: 0x1600 /* Microsoft Corporation */
+WAVE_FORMAT_MPEG_RAW_AAC :: 0x1601 /* Microsoft Corporation */
+WAVE_FORMAT_MPEG_LOAS :: 0x1602 /* Microsoft Corporation (MPEG-4 Audio Transport Streams (LOAS/LATM) */
+WAVE_FORMAT_NOKIA_MPEG_ADTS_AAC :: 0x1608 /* Microsoft Corporation */
+WAVE_FORMAT_NOKIA_MPEG_RAW_AAC :: 0x1609 /* Microsoft Corporation */
+WAVE_FORMAT_VODAFONE_MPEG_ADTS_AAC :: 0x160A /* Microsoft Corporation */
+WAVE_FORMAT_VODAFONE_MPEG_RAW_AAC :: 0x160B /* Microsoft Corporation */
+WAVE_FORMAT_MPEG_HEAAC :: 0x1610 /* Microsoft Corporation (MPEG-2 AAC or MPEG-4 HE-AAC v1/v2 streams with any payload (ADTS, ADIF, LOAS/LATM, RAW). Format block includes MP4 AudioSpecificConfig() -- see HEAACWAVEFORMAT below */
+WAVE_FORMAT_VOXWARE_RT24_SPEECH :: 0x181C /* Voxware Inc. */
+WAVE_FORMAT_SONICFOUNDRY_LOSSLESS :: 0x1971 /* Sonic Foundry */
+WAVE_FORMAT_INNINGS_TELECOM_ADPCM :: 0x1979 /* Innings Telecom Inc. */
+WAVE_FORMAT_LUCENT_SX8300P :: 0x1C07 /* Lucent Technologies */
+WAVE_FORMAT_LUCENT_SX5363S :: 0x1C0C /* Lucent Technologies */
+WAVE_FORMAT_CUSEEME :: 0x1F03 /* CUSeeMe */
+WAVE_FORMAT_NTCSOFT_ALF2CM_ACM :: 0x1FC4 /* NTCSoft */
+WAVE_FORMAT_DVM :: 0x2000 /* FAST Multimedia AG */
+WAVE_FORMAT_DTS2 :: 0x2001
+WAVE_FORMAT_MAKEAVIS :: 0x3313
+WAVE_FORMAT_DIVIO_MPEG4_AAC :: 0x4143 /* Divio, Inc. */
+WAVE_FORMAT_NOKIA_ADAPTIVE_MULTIRATE :: 0x4201 /* Nokia */
+WAVE_FORMAT_DIVIO_G726 :: 0x4243 /* Divio, Inc. */
+WAVE_FORMAT_LEAD_SPEECH :: 0x434C /* LEAD Technologies */
+WAVE_FORMAT_LEAD_VORBIS :: 0x564C /* LEAD Technologies */
+WAVE_FORMAT_WAVPACK_AUDIO :: 0x5756 /* xiph.org */
+WAVE_FORMAT_ALAC :: 0x6C61 /* Apple Lossless */
+WAVE_FORMAT_OGG_VORBIS_MODE_1 :: 0x674F /* Ogg Vorbis */
+WAVE_FORMAT_OGG_VORBIS_MODE_2 :: 0x6750 /* Ogg Vorbis */
+WAVE_FORMAT_OGG_VORBIS_MODE_3 :: 0x6751 /* Ogg Vorbis */
+WAVE_FORMAT_OGG_VORBIS_MODE_1_PLUS :: 0x676F /* Ogg Vorbis */
+WAVE_FORMAT_OGG_VORBIS_MODE_2_PLUS :: 0x6770 /* Ogg Vorbis */
+WAVE_FORMAT_OGG_VORBIS_MODE_3_PLUS :: 0x6771 /* Ogg Vorbis */
+WAVE_FORMAT_3COM_NBX :: 0x7000 /* 3COM Corp. */
+WAVE_FORMAT_OPUS :: 0x704F /* Opus */
+WAVE_FORMAT_FAAD_AAC :: 0x706D
+WAVE_FORMAT_AMR_NB :: 0x7361 /* AMR Narrowband */
+WAVE_FORMAT_AMR_WB :: 0x7362 /* AMR Wideband */
+WAVE_FORMAT_AMR_WP :: 0x7363 /* AMR Wideband Plus */
+WAVE_FORMAT_GSM_AMR_CBR :: 0x7A21 /* GSMA/3GPP */
+WAVE_FORMAT_GSM_AMR_VBR_SID :: 0x7A22 /* GSMA/3GPP */
+WAVE_FORMAT_COMVERSE_INFOSYS_G723_1 :: 0xA100 /* Comverse Infosys */
+WAVE_FORMAT_COMVERSE_INFOSYS_AVQSBC :: 0xA101 /* Comverse Infosys */
+WAVE_FORMAT_COMVERSE_INFOSYS_SBC :: 0xA102 /* Comverse Infosys */
+WAVE_FORMAT_SYMBOL_G729_A :: 0xA103 /* Symbol Technologies */
+WAVE_FORMAT_VOICEAGE_AMR_WB :: 0xA104 /* VoiceAge Corp. */
+WAVE_FORMAT_INGENIENT_G726 :: 0xA105 /* Ingenient Technologies, Inc. */
+WAVE_FORMAT_MPEG4_AAC :: 0xA106 /* ISO/MPEG-4 */
+WAVE_FORMAT_ENCORE_G726 :: 0xA107 /* Encore Software */
+WAVE_FORMAT_ZOLL_ASAO :: 0xA108 /* ZOLL Medical Corp. */
+WAVE_FORMAT_SPEEX_VOICE :: 0xA109 /* xiph.org */
+WAVE_FORMAT_VIANIX_MASC :: 0xA10A /* Vianix LLC */
+WAVE_FORMAT_WM9_SPECTRUM_ANALYZER :: 0xA10B /* Microsoft */
+WAVE_FORMAT_WMF_SPECTRUM_ANAYZER :: 0xA10C /* Microsoft */
+WAVE_FORMAT_GSM_610 :: 0xA10D
+WAVE_FORMAT_GSM_620 :: 0xA10E
+WAVE_FORMAT_GSM_660 :: 0xA10F
+WAVE_FORMAT_GSM_690 :: 0xA110
+WAVE_FORMAT_GSM_ADAPTIVE_MULTIRATE_WB :: 0xA111
+WAVE_FORMAT_POLYCOM_G722 :: 0xA112 /* Polycom */
+WAVE_FORMAT_POLYCOM_G728 :: 0xA113 /* Polycom */
+WAVE_FORMAT_POLYCOM_G729_A :: 0xA114 /* Polycom */
+WAVE_FORMAT_POLYCOM_SIREN :: 0xA115 /* Polycom */
+WAVE_FORMAT_GLOBAL_IP_ILBC :: 0xA116 /* Global IP */
+WAVE_FORMAT_RADIOTIME_TIME_SHIFT_RADIO :: 0xA117 /* RadioTime */
+WAVE_FORMAT_NICE_ACA :: 0xA118 /* Nice Systems */
+WAVE_FORMAT_NICE_ADPCM :: 0xA119 /* Nice Systems */
+WAVE_FORMAT_VOCORD_G721 :: 0xA11A /* Vocord Telecom */
+WAVE_FORMAT_VOCORD_G726 :: 0xA11B /* Vocord Telecom */
+WAVE_FORMAT_VOCORD_G722_1 :: 0xA11C /* Vocord Telecom */
+WAVE_FORMAT_VOCORD_G728 :: 0xA11D /* Vocord Telecom */
+WAVE_FORMAT_VOCORD_G729 :: 0xA11E /* Vocord Telecom */
+WAVE_FORMAT_VOCORD_G729_A :: 0xA11F /* Vocord Telecom */
+WAVE_FORMAT_VOCORD_G723_1 :: 0xA120 /* Vocord Telecom */
+WAVE_FORMAT_VOCORD_LBC :: 0xA121 /* Vocord Telecom */
+WAVE_FORMAT_NICE_G728 :: 0xA122 /* Nice Systems */
+WAVE_FORMAT_FRACE_TELECOM_G729 :: 0xA123 /* France Telecom */
+WAVE_FORMAT_CODIAN :: 0xA124 /* CODIAN */
+WAVE_FORMAT_DOLBY_AC4 :: 0xAC40 /* Dolby AC-4 */
+WAVE_FORMAT_FLAC :: 0xF1AC /* flac.sourceforge.net */
+WAVE_FORMAT_EXTENSIBLE :: 0xFFFE /* Microsoft */
+
+
+WAVEFORMATEX :: struct #packed {
wFormatTag: WORD,
nChannels: WORD,
nSamplesPerSec: DWORD,
@@ -325,6 +600,20 @@ WAVEFORMATEX :: struct {
}
LPCWAVEFORMATEX :: ^WAVEFORMATEX
+// New wave format development should be based on the WAVEFORMATEXTENSIBLE structure.
+// WAVEFORMATEXTENSIBLE allows you to avoid having to register a new format tag with Microsoft.
+// Simply define a new GUID value for the WAVEFORMATEXTENSIBLE.SubFormat field and use WAVE_FORMAT_EXTENSIBLE in the WAVEFORMATEXTENSIBLE.Format.wFormatTag field.
+WAVEFORMATEXTENSIBLE :: struct #packed {
+ using Format: WAVEFORMATEX,
+ Samples: struct #raw_union {
+ wValidBitsPerSample: WORD, /* bits of precision */
+ wSamplesPerBlock: WORD, /* valid if wBitsPerSample==0 */
+ wReserved: WORD, /* If neither applies, set to zero. */
+ },
+ dwChannelMask: SPEAKER_FLAGS, /* which channels are present in stream */
+ SubFormat: GUID,
+}
+
WAVEHDR :: struct {
lpData: LPSTR, /* pointer to locked data buffer */
dwBufferLength: DWORD, /* length of data buffer */
@@ -360,26 +649,50 @@ WAVEOUTCAPSW :: struct {
}
LPWAVEOUTCAPSW :: ^WAVEOUTCAPSW
+SPEAKER_FLAGS :: distinct bit_set[SPEAKER_FLAG; DWORD]
+SPEAKER_FLAG :: enum DWORD {
+ FRONT_LEFT = 0,
+ FRONT_RIGHT = 1,
+ FRONT_CENTER = 2,
+ LOW_FREQUENCY = 3,
+ BACK_LEFT = 4,
+ BACK_RIGHT = 5,
+ FRONT_LEFT_OF_CENTER = 6,
+ FRONT_RIGHT_OF_CENTER = 7,
+ BACK_CENTER = 8,
+ SIDE_LEFT = 9,
+ SIDE_RIGHT = 10,
+ TOP_CENTER = 11,
+ TOP_FRONT_LEFT = 12,
+ TOP_FRONT_CENTER = 13,
+ TOP_FRONT_RIGHT = 14,
+ TOP_BACK_LEFT = 15,
+ TOP_BACK_CENTER = 16,
+ TOP_BACK_RIGHT = 17,
+ //RESERVED = 0x7FFC0000, // bit mask locations reserved for future use
+ ALL = 31, // used to specify that any possible permutation of speaker configurations
+}
+
// flag values for PlaySound
-SND_SYNC :: 0x0000 /* play synchronously (default) */
-SND_ASYNC :: 0x0001 /* play asynchronously */
-SND_NODEFAULT :: 0x0002 /* silence (!default) if sound not found */
-SND_MEMORY :: 0x0004 /* pszSound points to a memory file */
-SND_LOOP :: 0x0008 /* loop the sound until next sndPlaySound */
-SND_NOSTOP :: 0x0010 /* don't stop any currently playing sound */
-
-SND_NOWAIT :: 0x00002000 /* don't wait if the driver is busy */
-SND_ALIAS :: 0x00010000 /* name is a registry alias */
-SND_ALIAS_ID :: 0x00110000 /* alias is a predefined ID */
-SND_FILENAME :: 0x00020000 /* name is file name */
-SND_RESOURCE :: 0x00040004 /* name is resource name or atom */
-
-SND_PURGE :: 0x0040 /* purge non-static events for task */
-SND_APPLICATION :: 0x0080 /* look for application specific association */
-
-SND_SENTRY :: 0x00080000 /* Generate a SoundSentry event with this sound */
-SND_RING :: 0x00100000 /* Treat this as a "ring" from a communications app - don't duck me */
-SND_SYSTEM :: 0x00200000 /* Treat this as a system sound */
+SND_SYNC :: 0x0000 /* play synchronously (default) */
+SND_ASYNC :: 0x0001 /* play asynchronously */
+SND_NODEFAULT :: 0x0002 /* silence (!default) if sound not found */
+SND_MEMORY :: 0x0004 /* pszSound points to a memory file */
+SND_LOOP :: 0x0008 /* loop the sound until next sndPlaySound */
+SND_NOSTOP :: 0x0010 /* don't stop any currently playing sound */
+
+SND_NOWAIT :: 0x00002000 /* don't wait if the driver is busy */
+SND_ALIAS :: 0x00010000 /* name is a registry alias */
+SND_ALIAS_ID :: 0x00110000 /* alias is a predefined ID */
+SND_FILENAME :: 0x00020000 /* name is file name */
+SND_RESOURCE :: 0x00040004 /* name is resource name or atom */
+
+SND_PURGE :: 0x0040 /* purge non-static events for task */
+SND_APPLICATION :: 0x0080 /* look for application specific association */
+
+SND_SENTRY :: 0x00080000 /* Generate a SoundSentry event with this sound */
+SND_RING :: 0x00100000 /* Treat this as a "ring" from a communications app - don't duck me */
+SND_SYSTEM :: 0x00200000 /* Treat this as a system sound */
CALLBACK_TYPEMASK :: 0x00070000 /* callback type mask */
diff --git a/core/sys/windows/ws2_32.odin b/core/sys/windows/ws2_32.odin
index 5b2952495..cb1071d9e 100644
--- a/core/sys/windows/ws2_32.odin
+++ b/core/sys/windows/ws2_32.odin
@@ -91,6 +91,7 @@ foreign ws2_32 {
WSACleanup :: proc() -> c_int ---
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsagetlasterror)
WSAGetLastError :: proc() -> c_int ---
+ WSASetLastError :: proc(err: c_int) ---
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsapoll)
WSAPoll :: proc(fdArray: ^WSA_POLLFD, fds: c_ulong, timeout: c_int) -> c_int ---
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsaduplicatesocketw)
@@ -130,6 +131,10 @@ foreign ws2_32 {
) -> SOCKET ---
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsaioctl)
WSAIoctl :: proc(s: SOCKET, dwIoControlCode: DWORD, lpvInBuffer: rawptr, cbInBuffer: DWORD, lpvOutBuffer: rawptr, cbOutBuffer: DWORD, lpcbBytesReturned: ^DWORD, lpOverlapped: ^OVERLAPPED, lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> c_int ---
+ // [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsacreateevent)
+ WSACreateEvent :: proc() -> WSAEVENT ---
+ // [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsacloseevent)
+ WSACloseEvent :: proc(hEvent: WSAEVENT) -> bool ---
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsaeventselect)
WSAEventSelect :: proc(s: SOCKET, hEventObject: WSAEVENT, lNetworkEvents: i32) -> c_int ---
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsawaitformultipleevents)
@@ -238,9 +243,9 @@ foreign ws2_32 {
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-ntohs)
ntohs :: proc(netshort: c_ushort) -> c_ushort ---
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-htonl)
- @(deprecated="Use endian specific integers instead, https://odin-lang.org/docs/overview/#basic-types")
+ // Prefer using endian-specific integers instead, https://odin-lang.org/docs/overview/#basic-types
htonl :: proc(hostlong: c_ulong) -> c_ulong ---
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-htons)
- @(deprecated="Use endian specific integers instead, https://odin-lang.org/docs/overview/#basic-types")
+ // Prefer using endian-specific integers instead, https://odin-lang.org/docs/overview/#basic-types
htons :: proc(hostshort: c_ushort) -> c_ushort ---
-}
+} \ No newline at end of file