Merge branch 'master' into separate-int-word-sizes

This commit is contained in:
gingerBill
2023-06-06 22:42:04 +01:00
147 changed files with 19917 additions and 10151 deletions
+53 -53
View File
@@ -58,38 +58,38 @@ ApplicationPresentationOptionsDisableCursorLocationAssistance :: ApplicationPres
Application :: struct {using _: Object}
@(objc_type=Application, objc_name="sharedApplication", objc_is_class_method=true)
Application_sharedApplication :: proc() -> ^Application {
Application_sharedApplication :: proc "c" () -> ^Application {
return msgSend(^Application, Application, "sharedApplication")
}
@(objc_type=Application, objc_name="setActivationPolicy")
Application_setActivationPolicy :: proc(self: ^Application, activationPolicy: ActivationPolicy) -> BOOL {
Application_setActivationPolicy :: proc "c" (self: ^Application, activationPolicy: ActivationPolicy) -> BOOL {
return msgSend(BOOL, self, "setActivationPolicy:", activationPolicy)
}
@(objc_type=Application, objc_name="activateIgnoringOtherApps")
Application_activateIgnoringOtherApps :: proc(self: ^Application, ignoreOtherApps: BOOL) {
Application_activateIgnoringOtherApps :: proc "c" (self: ^Application, ignoreOtherApps: BOOL) {
msgSend(nil, self, "activateIgnoringOtherApps:", ignoreOtherApps)
}
@(objc_type=Application, objc_name="setMainMenu")
Application_setMainMenu :: proc(self: ^Application, menu: ^Menu) {
Application_setMainMenu :: proc "c" (self: ^Application, menu: ^Menu) {
msgSend(nil, self, "setMainMenu:", menu)
}
@(objc_type=Application, objc_name="windows")
Application_windows :: proc(self: ^Application) -> ^Array {
Application_windows :: proc "c" (self: ^Application) -> ^Array {
return msgSend(^Array, self, "windows")
}
@(objc_type=Application, objc_name="run")
Application_run :: proc(self: ^Application) {
Application_run :: proc "c" (self: ^Application) {
msgSend(nil, self, "run")
}
@(objc_type=Application, objc_name="terminate")
Application_terminate :: proc(self: ^Application, sender: ^Object) {
Application_terminate :: proc "c" (self: ^Application, sender: ^Object) {
msgSend(nil, self, "terminate:", sender)
}
@@ -99,81 +99,81 @@ Application_terminate :: proc(self: ^Application, sender: ^Object) {
RunningApplication :: struct {using _: Object}
@(objc_type=RunningApplication, objc_name="currentApplication", objc_is_class_method=true)
RunningApplication_currentApplication :: proc() -> ^RunningApplication {
RunningApplication_currentApplication :: proc "c" () -> ^RunningApplication {
return msgSend(^RunningApplication, RunningApplication, "currentApplication")
}
@(objc_type=RunningApplication, objc_name="localizedName")
RunningApplication_localizedName :: proc(self: ^RunningApplication) -> ^String {
RunningApplication_localizedName :: proc "c" (self: ^RunningApplication) -> ^String {
return msgSend(^String, self, "localizedName")
}
ApplicationDelegateTemplate :: struct {
// Launching Applications
applicationWillFinishLaunching: proc(notification: ^Notification),
applicationDidFinishLaunching: proc(notification: ^Notification),
applicationWillFinishLaunching: proc(notification: ^Notification),
applicationDidFinishLaunching: proc(notification: ^Notification),
// Managing Active Status
applicationWillBecomeActive: proc(notification: ^Notification),
applicationDidBecomeActive: proc(notification: ^Notification),
applicationWillResignActive: proc(notification: ^Notification),
applicationDidResignActive: proc(notification: ^Notification),
applicationWillBecomeActive: proc(notification: ^Notification),
applicationDidBecomeActive: proc(notification: ^Notification),
applicationWillResignActive: proc(notification: ^Notification),
applicationDidResignActive: proc(notification: ^Notification),
// Terminating Applications
applicationShouldTerminate: proc(sender: ^Application) -> ApplicationTerminateReply,
applicationShouldTerminateAfterLastWindowClosed: proc(sender: ^Application) -> BOOL,
applicationWillTerminate: proc(notification: ^Notification),
applicationShouldTerminate: proc(sender: ^Application) -> ApplicationTerminateReply,
applicationShouldTerminateAfterLastWindowClosed: proc(sender: ^Application) -> BOOL,
applicationWillTerminate: proc(notification: ^Notification),
// Hiding Applications
applicationWillHide: proc(notification: ^Notification),
applicationDidHide: proc(notification: ^Notification),
applicationWillUnhide: proc(notification: ^Notification),
applicationDidUnhide: proc(notification: ^Notification),
applicationWillHide: proc(notification: ^Notification),
applicationDidHide: proc(notification: ^Notification),
applicationWillUnhide: proc(notification: ^Notification),
applicationDidUnhide: proc(notification: ^Notification),
// Managing Windows
applicationWillUpdate: proc(notification: ^Notification),
applicationDidUpdate: proc(notification: ^Notification),
applicationShouldHandleReopenHasVisibleWindows: proc(sender: ^Application, flag: BOOL) -> BOOL,
applicationWillUpdate: proc(notification: ^Notification),
applicationDidUpdate: proc(notification: ^Notification),
applicationShouldHandleReopenHasVisibleWindows: proc(sender: ^Application, flag: BOOL) -> BOOL,
// Managing the Dock Menu
applicationDockMenu: proc(sender: ^Application) -> ^Menu,
applicationDockMenu: proc(sender: ^Application) -> ^Menu,
// Localizing Keyboard Shortcuts
applicationShouldAutomaticallyLocalizeKeyEquivalents: proc(application: ^Application) -> BOOL,
applicationShouldAutomaticallyLocalizeKeyEquivalents: proc(application: ^Application) -> BOOL,
// Displaying Errors
applicationWillPresentError: proc(application: ^Application, error: ^Error) -> ^Error,
applicationWillPresentError: proc(application: ^Application, error: ^Error) -> ^Error,
// Managing the Screen
applicationDidChangeScreenParameters: proc(notification: ^Notification),
applicationDidChangeScreenParameters: proc(notification: ^Notification),
// Continuing User Activities
applicationWillContinueUserActivityWithType: proc(application: ^Application, userActivityType: ^String) -> BOOL,
applicationContinueUserActivityRestorationHandler: proc(application: ^Application, userActivity: ^UserActivity, restorationHandler: ^Block) -> BOOL,
applicationDidFailToContinueUserActivityWithTypeError: proc(application: ^Application, userActivityType: ^String, error: ^Error),
applicationDidUpdateUserActivity: proc(application: ^Application, userActivity: ^UserActivity),
applicationWillContinueUserActivityWithType: proc(application: ^Application, userActivityType: ^String) -> BOOL,
applicationContinueUserActivityRestorationHandler: proc(application: ^Application, userActivity: ^UserActivity, restorationHandler: ^Block) -> BOOL,
applicationDidFailToContinueUserActivityWithTypeError: proc(application: ^Application, userActivityType: ^String, error: ^Error),
applicationDidUpdateUserActivity: proc(application: ^Application, userActivity: ^UserActivity),
// Handling Push Notifications
applicationDidRegisterForRemoteNotificationsWithDeviceToken: proc(application: ^Application, deviceToken: ^Data),
applicationDidFailToRegisterForRemoteNotificationsWithError: proc(application: ^Application, error: ^Error),
applicationDidReceiveRemoteNotification: proc(application: ^Application, userInfo: ^Dictionary),
applicationDidReceiveRemoteNotification: proc(application: ^Application, userInfo: ^Dictionary),
// Handling CloudKit Invitations
// TODO: if/when we have cloud kit bindings implement
// applicationUserDidAcceptCloudKitShareWithMetadata: proc(application: ^Application, metadata: ^CKShareMetadata),
// applicationUserDidAcceptCloudKitShareWithMetadata: proc(application: ^Application, metadata: ^CKShareMetadata),
// Handling SiriKit Intents
// TODO: if/when we have siri kit bindings implement
// applicationHandlerForIntent: proc(application: ^Application, intent: ^INIntent) -> id,
// applicationHandlerForIntent: proc(application: ^Application, intent: ^INIntent) -> id,
// Opening Files
applicationOpenURLs: proc(application: ^Application, urls: ^Array),
applicationOpenFile: proc(sender: ^Application, filename: ^String) -> BOOL,
applicationOpenFileWithoutUI: proc(sender: id, filename: ^String) -> BOOL,
applicationOpenTempFile: proc(sender: ^Application, filename: ^String) -> BOOL,
applicationOpenFiles: proc(sender: ^Application, filenames: ^Array),
applicationShouldOpenUntitledFile: proc(sender: ^Application) -> BOOL,
applicationOpenUntitledFile: proc(sender: ^Application) -> BOOL,
applicationOpenURLs: proc(application: ^Application, urls: ^Array),
applicationOpenFile: proc(sender: ^Application, filename: ^String) -> BOOL,
applicationOpenFileWithoutUI: proc(sender: id, filename: ^String) -> BOOL,
applicationOpenTempFile: proc(sender: ^Application, filename: ^String) -> BOOL,
applicationOpenFiles: proc(sender: ^Application, filenames: ^Array),
applicationShouldOpenUntitledFile: proc(sender: ^Application) -> BOOL,
applicationOpenUntitledFile: proc(sender: ^Application) -> BOOL,
// Printing
applicationPrintFile: proc(sender: ^Application, filename: ^String) -> BOOL,
applicationPrintFilesWithSettingsShowPrintPanels: proc(application: ^Application, fileNames: ^Array, printSettings: ^Dictionary, showPrintPanels: BOOL) -> ApplicationPrintReply,
applicationPrintFile: proc(sender: ^Application, filename: ^String) -> BOOL,
applicationPrintFilesWithSettingsShowPrintPanels: proc(application: ^Application, fileNames: ^Array, printSettings: ^Dictionary, showPrintPanels: BOOL) -> ApplicationPrintReply,
// Restoring Application State
applicationSupportsSecureRestorableState: proc(app: ^Application) -> BOOL,
applicationProtectedDataDidBecomeAvailable: proc(notification: ^Notification),
applicationProtectedDataWillBecomeUnavailable: proc(notification: ^Notification),
applicationWillEncodeRestorableState: proc(app: ^Application, coder: ^Coder),
applicationDidDecodeRestorableState: proc(app: ^Application, coder: ^Coder),
applicationSupportsSecureRestorableState: proc(app: ^Application) -> BOOL,
applicationProtectedDataDidBecomeAvailable: proc(notification: ^Notification),
applicationProtectedDataWillBecomeUnavailable: proc(notification: ^Notification),
applicationWillEncodeRestorableState: proc(app: ^Application, coder: ^Coder),
applicationDidDecodeRestorableState: proc(app: ^Application, coder: ^Coder),
// Handling Changes to the Occlusion State
applicationDidChangeOcclusionState: proc(notification: ^Notification),
applicationDidChangeOcclusionState: proc(notification: ^Notification),
// Scripting Your App
applicationDelegateHandlesKey: proc(sender: ^Application, key: ^String) -> BOOL,
applicationDelegateHandlesKey: proc(sender: ^Application, key: ^String) -> BOOL,
}
ApplicationDelegate :: struct { using _: Object }
@@ -559,6 +559,6 @@ application_delegate_register_and_alloc :: proc(template: ApplicationDelegateTem
}
@(objc_type=Application, objc_name="setDelegate")
Application_setDelegate :: proc(self: ^Application, delegate: ^ApplicationDelegate) {
Application_setDelegate :: proc "c" (self: ^Application, delegate: ^ApplicationDelegate) {
msgSend(nil, self, "setDelegate:", delegate)
}
+7 -7
View File
@@ -8,35 +8,35 @@ Array :: struct {
}
@(objc_type=Array, objc_name="alloc", objc_is_class_method=true)
Array_alloc :: proc() -> ^Array {
Array_alloc :: proc "c" () -> ^Array {
return msgSend(^Array, Array, "alloc")
}
@(objc_type=Array, objc_name="init")
Array_init :: proc(self: ^Array) -> ^Array {
Array_init :: proc "c" (self: ^Array) -> ^Array {
return msgSend(^Array, self, "init")
}
@(objc_type=Array, objc_name="initWithObjects")
Array_initWithObjects :: proc(self: ^Array, objects: [^]^Object, count: UInteger) -> ^Array {
Array_initWithObjects :: proc "c" (self: ^Array, objects: [^]^Object, count: UInteger) -> ^Array {
return msgSend(^Array, self, "initWithObjects:count:", objects, count)
}
@(objc_type=Array, objc_name="initWithCoder")
Array_initWithCoder :: proc(self: ^Array, coder: ^Coder) -> ^Array {
Array_initWithCoder :: proc "c" (self: ^Array, coder: ^Coder) -> ^Array {
return msgSend(^Array, self, "initWithCoder:", coder)
}
@(objc_type=Array, objc_name="object")
Array_object :: proc(self: ^Array, index: UInteger) -> ^Object {
Array_object :: proc "c" (self: ^Array, index: UInteger) -> ^Object {
return msgSend(^Object, self, "objectAtIndex:", index)
}
@(objc_type=Array, objc_name="objectAs")
Array_objectAs :: proc(self: ^Array, index: UInteger, $T: typeid) -> T where intrinsics.type_is_pointer(T), intrinsics.type_is_subtype_of(T, ^Object) {
Array_objectAs :: proc "c" (self: ^Array, index: UInteger, $T: typeid) -> T where intrinsics.type_is_pointer(T), intrinsics.type_is_subtype_of(T, ^Object) {
return (T)(Array_object(self, index))
}
@(objc_type=Array, objc_name="count")
Array_count :: proc(self: ^Array) -> UInteger {
Array_count :: proc "c" (self: ^Array) -> UInteger {
return msgSend(UInteger, self, "count")
}
+6 -6
View File
@@ -4,30 +4,30 @@ package objc_Foundation
AutoreleasePool :: struct {using _: Object}
@(objc_type=AutoreleasePool, objc_name="alloc", objc_is_class_method=true)
AutoreleasePool_alloc :: proc() -> ^AutoreleasePool {
AutoreleasePool_alloc :: proc "c" () -> ^AutoreleasePool {
return msgSend(^AutoreleasePool, AutoreleasePool, "alloc")
}
@(objc_type=AutoreleasePool, objc_name="init")
AutoreleasePool_init :: proc(self: ^AutoreleasePool) -> ^AutoreleasePool {
AutoreleasePool_init :: proc "c" (self: ^AutoreleasePool) -> ^AutoreleasePool {
return msgSend(^AutoreleasePool, self, "init")
}
@(objc_type=AutoreleasePool, objc_name="drain")
AutoreleasePool_drain :: proc(self: ^AutoreleasePool) {
AutoreleasePool_drain :: proc "c" (self: ^AutoreleasePool) {
msgSend(nil, self, "drain")
}
@(objc_type=AutoreleasePool, objc_name="addObject")
AutoreleasePool_addObject :: proc(self: ^AutoreleasePool, obj: ^Object) {
AutoreleasePool_addObject :: proc "c" (self: ^AutoreleasePool, obj: ^Object) {
msgSend(nil, self, "addObject:", obj)
}
@(objc_type=AutoreleasePool, objc_name="showPools")
AutoreleasePool_showPools :: proc(self: ^AutoreleasePool, obj: ^Object) {
AutoreleasePool_showPools :: proc "c" (self: ^AutoreleasePool, obj: ^Object) {
msgSend(nil, self, "showPools")
}
@(deferred_out=AutoreleasePool_drain)
scoped_autoreleasepool :: proc() -> ^AutoreleasePool {
scoped_autoreleasepool :: proc "c" () -> ^AutoreleasePool {
return AutoreleasePool.alloc()->init()
}
+37 -37
View File
@@ -4,188 +4,188 @@ package objc_Foundation
Bundle :: struct { using _: Object }
@(objc_type=Bundle, objc_name="mainBundle", objc_is_class_method=true)
Bundle_mainBundle :: proc() -> ^Bundle {
Bundle_mainBundle :: proc "c" () -> ^Bundle {
return msgSend(^Bundle, Bundle, "mainBundle")
}
@(objc_type=Bundle, objc_name="bundleWithPath", objc_is_class_method=true)
Bundle_bundleWithPath :: proc(path: ^String) -> ^Bundle {
Bundle_bundleWithPath :: proc "c" (path: ^String) -> ^Bundle {
return msgSend(^Bundle, Bundle, "bundleWithPath:", path)
}
@(objc_type=Bundle, objc_name="bundleWithURL", objc_is_class_method=true)
Bundle_bundleWithURL :: proc(url: ^URL) -> ^Bundle {
Bundle_bundleWithURL :: proc "c" (url: ^URL) -> ^Bundle {
return msgSend(^Bundle, Bundle, "bundleWithUrl:", url)
}
@(objc_type=Bundle, objc_name="alloc", objc_is_class_method=true)
Bundle_alloc :: proc() -> ^Bundle {
Bundle_alloc :: proc "c" () -> ^Bundle {
return msgSend(^Bundle, Bundle, "alloc")
}
@(objc_type=Bundle, objc_name="init")
Bundle_init :: proc(self: ^Bundle) -> ^Bundle {
Bundle_init :: proc "c" (self: ^Bundle) -> ^Bundle {
return msgSend(^Bundle, self, "init")
}
@(objc_type=Bundle, objc_name="initWithPath")
Bundle_initWithPath :: proc(self: ^Bundle, path: ^String) -> ^Bundle {
Bundle_initWithPath :: proc "c" (self: ^Bundle, path: ^String) -> ^Bundle {
return msgSend(^Bundle, self, "initWithPath:", path)
}
@(objc_type=Bundle, objc_name="initWithURL")
Bundle_initWithURL :: proc(self: ^Bundle, url: ^URL) -> ^Bundle {
Bundle_initWithURL :: proc "c" (self: ^Bundle, url: ^URL) -> ^Bundle {
return msgSend(^Bundle, self, "initWithUrl:", url)
}
@(objc_type=Bundle, objc_name="allBundles")
Bundle_allBundles :: proc() -> (all: ^Array) {
Bundle_allBundles :: proc "c" () -> (all: ^Array) {
return msgSend(type_of(all), Bundle, "allBundles")
}
@(objc_type=Bundle, objc_name="allFrameworks")
Bundle_allFrameworks :: proc() -> (all: ^Array) {
Bundle_allFrameworks :: proc "c" () -> (all: ^Array) {
return msgSend(type_of(all), Bundle, "allFrameworks")
}
@(objc_type=Bundle, objc_name="load")
Bundle_load :: proc(self: ^Bundle) -> BOOL {
Bundle_load :: proc "c" (self: ^Bundle) -> BOOL {
return msgSend(BOOL, self, "load")
}
@(objc_type=Bundle, objc_name="unload")
Bundle_unload :: proc(self: ^Bundle) -> BOOL {
Bundle_unload :: proc "c" (self: ^Bundle) -> BOOL {
return msgSend(BOOL, self, "unload")
}
@(objc_type=Bundle, objc_name="isLoaded")
Bundle_isLoaded :: proc(self: ^Bundle) -> BOOL {
Bundle_isLoaded :: proc "c" (self: ^Bundle) -> BOOL {
return msgSend(BOOL, self, "isLoaded")
}
@(objc_type=Bundle, objc_name="preflightAndReturnError")
Bundle_preflightAndReturnError :: proc(self: ^Bundle) -> (ok: BOOL, error: ^Error) {
Bundle_preflightAndReturnError :: proc "contextless" (self: ^Bundle) -> (ok: BOOL, error: ^Error) {
ok = msgSend(BOOL, self, "preflightAndReturnError:", &error)
return
}
@(objc_type=Bundle, objc_name="loadAndReturnError")
Bundle_loadAndReturnError :: proc(self: ^Bundle) -> (ok: BOOL, error: ^Error) {
Bundle_loadAndReturnError :: proc "contextless" (self: ^Bundle) -> (ok: BOOL, error: ^Error) {
ok = msgSend(BOOL, self, "loadAndReturnError:", &error)
return
}
@(objc_type=Bundle, objc_name="bundleURL")
Bundle_bundleURL :: proc(self: ^Bundle) -> ^URL {
Bundle_bundleURL :: proc "c" (self: ^Bundle) -> ^URL {
return msgSend(^URL, self, "bundleURL")
}
@(objc_type=Bundle, objc_name="resourceURL")
Bundle_resourceURL :: proc(self: ^Bundle) -> ^URL {
Bundle_resourceURL :: proc "c" (self: ^Bundle) -> ^URL {
return msgSend(^URL, self, "resourceURL")
}
@(objc_type=Bundle, objc_name="executableURL")
Bundle_executableURL :: proc(self: ^Bundle) -> ^URL {
Bundle_executableURL :: proc "c" (self: ^Bundle) -> ^URL {
return msgSend(^URL, self, "executableURL")
}
@(objc_type=Bundle, objc_name="URLForAuxiliaryExecutable")
Bundle_URLForAuxiliaryExecutable :: proc(self: ^Bundle, executableName: ^String) -> ^URL {
Bundle_URLForAuxiliaryExecutable :: proc "c" (self: ^Bundle, executableName: ^String) -> ^URL {
return msgSend(^URL, self, "URLForAuxiliaryExecutable:", executableName)
}
@(objc_type=Bundle, objc_name="privateFrameworksURL")
Bundle_privateFrameworksURL :: proc(self: ^Bundle) -> ^URL {
Bundle_privateFrameworksURL :: proc "c" (self: ^Bundle) -> ^URL {
return msgSend(^URL, self, "privateFrameworksURL")
}
@(objc_type=Bundle, objc_name="sharedFrameworksURL")
Bundle_sharedFrameworksURL :: proc(self: ^Bundle) -> ^URL {
Bundle_sharedFrameworksURL :: proc "c" (self: ^Bundle) -> ^URL {
return msgSend(^URL, self, "sharedFrameworksURL")
}
@(objc_type=Bundle, objc_name="sharedSupportURL")
Bundle_sharedSupportURL :: proc(self: ^Bundle) -> ^URL {
Bundle_sharedSupportURL :: proc "c" (self: ^Bundle) -> ^URL {
return msgSend(^URL, self, "sharedSupportURL")
}
@(objc_type=Bundle, objc_name="builtInPlugInsURL")
Bundle_builtInPlugInsURL :: proc(self: ^Bundle) -> ^URL {
Bundle_builtInPlugInsURL :: proc "c" (self: ^Bundle) -> ^URL {
return msgSend(^URL, self, "builtInPlugInsURL")
}
@(objc_type=Bundle, objc_name="appStoreReceiptURL")
Bundle_appStoreReceiptURL :: proc(self: ^Bundle) -> ^URL {
Bundle_appStoreReceiptURL :: proc "c" (self: ^Bundle) -> ^URL {
return msgSend(^URL, self, "appStoreReceiptURL")
}
@(objc_type=Bundle, objc_name="bundlePath")
Bundle_bundlePath :: proc(self: ^Bundle) -> ^String {
Bundle_bundlePath :: proc "c" (self: ^Bundle) -> ^String {
return msgSend(^String, self, "bundlePath")
}
@(objc_type=Bundle, objc_name="resourcePath")
Bundle_resourcePath :: proc(self: ^Bundle) -> ^String {
Bundle_resourcePath :: proc "c" (self: ^Bundle) -> ^String {
return msgSend(^String, self, "resourcePath")
}
@(objc_type=Bundle, objc_name="executablePath")
Bundle_executablePath :: proc(self: ^Bundle) -> ^String {
Bundle_executablePath :: proc "c" (self: ^Bundle) -> ^String {
return msgSend(^String, self, "executablePath")
}
@(objc_type=Bundle, objc_name="PathForAuxiliaryExecutable")
Bundle_PathForAuxiliaryExecutable :: proc(self: ^Bundle, executableName: ^String) -> ^String {
Bundle_PathForAuxiliaryExecutable :: proc "c" (self: ^Bundle, executableName: ^String) -> ^String {
return msgSend(^String, self, "PathForAuxiliaryExecutable:", executableName)
}
@(objc_type=Bundle, objc_name="privateFrameworksPath")
Bundle_privateFrameworksPath :: proc(self: ^Bundle) -> ^String {
Bundle_privateFrameworksPath :: proc "c" (self: ^Bundle) -> ^String {
return msgSend(^String, self, "privateFrameworksPath")
}
@(objc_type=Bundle, objc_name="sharedFrameworksPath")
Bundle_sharedFrameworksPath :: proc(self: ^Bundle) -> ^String {
Bundle_sharedFrameworksPath :: proc "c" (self: ^Bundle) -> ^String {
return msgSend(^String, self, "sharedFrameworksPath")
}
@(objc_type=Bundle, objc_name="sharedSupportPath")
Bundle_sharedSupportPath :: proc(self: ^Bundle) -> ^String {
Bundle_sharedSupportPath :: proc "c" (self: ^Bundle) -> ^String {
return msgSend(^String, self, "sharedSupportPath")
}
@(objc_type=Bundle, objc_name="builtInPlugInsPath")
Bundle_builtInPlugInsPath :: proc(self: ^Bundle) -> ^String {
Bundle_builtInPlugInsPath :: proc "c" (self: ^Bundle) -> ^String {
return msgSend(^String, self, "builtInPlugInsPath")
}
@(objc_type=Bundle, objc_name="appStoreReceiptPath")
Bundle_appStoreReceiptPath :: proc(self: ^Bundle) -> ^String {
Bundle_appStoreReceiptPath :: proc "c" (self: ^Bundle) -> ^String {
return msgSend(^String, self, "appStoreReceiptPath")
}
@(objc_type=Bundle, objc_name="bundleIdentifier")
Bundle_bundleIdentifier :: proc(self: ^Bundle) -> ^String {
Bundle_bundleIdentifier :: proc "c" (self: ^Bundle) -> ^String {
return msgSend(^String, self, "bundleIdentifier")
}
@(objc_type=Bundle, objc_name="infoDictionary")
Bundle_infoDictionary :: proc(self: ^Bundle) -> ^Dictionary {
Bundle_infoDictionary :: proc "c" (self: ^Bundle) -> ^Dictionary {
return msgSend(^Dictionary, self, "infoDictionary")
}
@(objc_type=Bundle, objc_name="localizedInfoDictionary")
Bundle_localizedInfoDictionary :: proc(self: ^Bundle) -> ^Dictionary {
Bundle_localizedInfoDictionary :: proc "c" (self: ^Bundle) -> ^Dictionary {
return msgSend(^Dictionary, self, "localizedInfoDictionary")
}
@(objc_type=Bundle, objc_name="objectForInfoDictionaryKey")
Bundle_objectForInfoDictionaryKey :: proc(self: ^Bundle, key: ^String) -> ^Object {
Bundle_objectForInfoDictionaryKey :: proc "c" (self: ^Bundle, key: ^String) -> ^Object {
return msgSend(^Object, self, "objectForInfoDictionaryKey:", key)
}
@(objc_type=Bundle, objc_name="localizedStringForKey")
Bundle_localizedStringForKey :: proc(self: ^Bundle, key: ^String, value: ^String = nil, tableName: ^String = nil) -> ^String {
Bundle_localizedStringForKey :: proc "c" (self: ^Bundle, key: ^String, value: ^String = nil, tableName: ^String = nil) -> ^String {
return msgSend(^String, self, "localizedStringForKey:value:table:", key, value, tableName)
}
+4 -4
View File
@@ -4,21 +4,21 @@ package objc_Foundation
Data :: struct {using _: Copying(Data)}
@(objc_type=Data, objc_name="alloc", objc_is_class_method=true)
Data_alloc :: proc() -> ^Data {
Data_alloc :: proc "c" () -> ^Data {
return msgSend(^Data, Data, "alloc")
}
@(objc_type=Data, objc_name="init")
Data_init :: proc(self: ^Data) -> ^Data {
Data_init :: proc "c" (self: ^Data) -> ^Data {
return msgSend(^Data, self, "init")
}
@(objc_type=Data, objc_name="mutableBytes")
Data_mutableBytes :: proc(self: ^Data) -> rawptr {
Data_mutableBytes :: proc "c" (self: ^Data) -> rawptr {
return msgSend(rawptr, self, "mutableBytes")
}
@(objc_type=Data, objc_name="length")
Data_length :: proc(self: ^Data) -> UInteger {
Data_length :: proc "c" (self: ^Data) -> UInteger {
return msgSend(UInteger, self, "length")
}
+3 -3
View File
@@ -4,16 +4,16 @@ package objc_Foundation
Date :: struct {using _: Copying(Date)}
@(objc_type=Date, objc_name="alloc", objc_is_class_method=true)
Date_alloc :: proc() -> ^Date {
Date_alloc :: proc "c" () -> ^Date {
return msgSend(^Date, Date, "alloc")
}
@(objc_type=Date, objc_name="init")
Date_init :: proc(self: ^Date) -> ^Date {
Date_init :: proc "c" (self: ^Date) -> ^Date {
return msgSend(^Date, self, "init")
}
@(objc_type=Date, objc_name="dateWithTimeIntervalSinceNow")
Date_dateWithTimeIntervalSinceNow :: proc(secs: TimeInterval) -> ^Date {
Date_dateWithTimeIntervalSinceNow :: proc "c" (secs: TimeInterval) -> ^Date {
return msgSend(^Date, Date, "dateWithTimeIntervalSinceNow:", secs)
}
+9 -9
View File
@@ -4,47 +4,47 @@ package objc_Foundation
Dictionary :: struct {using _: Copying(Dictionary)}
@(objc_type=Dictionary, objc_name="dictionary", objc_is_class_method=true)
Dictionary_dictionary :: proc() -> ^Dictionary {
Dictionary_dictionary :: proc "c" () -> ^Dictionary {
return msgSend(^Dictionary, Dictionary, "dictionary")
}
@(objc_type=Dictionary, objc_name="dictionaryWithObject", objc_is_class_method=true)
Dictionary_dictionaryWithObject :: proc(object: ^Object, forKey: ^Object) -> ^Dictionary {
Dictionary_dictionaryWithObject :: proc "c" (object: ^Object, forKey: ^Object) -> ^Dictionary {
return msgSend(^Dictionary, Dictionary, "dictionaryWithObject:forKey:", object, forKey)
}
@(objc_type=Dictionary, objc_name="dictionaryWithObjects", objc_is_class_method=true)
Dictionary_dictionaryWithObjects :: proc(objects: [^]^Object, forKeys: [^]^Object, count: UInteger) -> ^Dictionary {
Dictionary_dictionaryWithObjects :: proc "c" (objects: [^]^Object, forKeys: [^]^Object, count: UInteger) -> ^Dictionary {
return msgSend(^Dictionary, Dictionary, "dictionaryWithObjects:forKeys:count", objects, forKeys, count)
}
@(objc_type=Dictionary, objc_name="alloc", objc_is_class_method=true)
Dictionary_alloc :: proc() -> ^Dictionary {
Dictionary_alloc :: proc "c" () -> ^Dictionary {
return msgSend(^Dictionary, Dictionary, "alloc")
}
@(objc_type=Dictionary, objc_name="init")
Dictionary_init :: proc(self: ^Dictionary) -> ^Dictionary {
Dictionary_init :: proc "c" (self: ^Dictionary) -> ^Dictionary {
return msgSend(^Dictionary, self, "init")
}
@(objc_type=Dictionary, objc_name="initWithObjects")
Dictionary_initWithObjects :: proc(self: ^Dictionary, objects: [^]^Object, forKeys: [^]^Object, count: UInteger) -> ^Dictionary {
Dictionary_initWithObjects :: proc "c" (self: ^Dictionary, objects: [^]^Object, forKeys: [^]^Object, count: UInteger) -> ^Dictionary {
return msgSend(^Dictionary, self, "initWithObjects:forKeys:count", objects, forKeys, count)
}
@(objc_type=Dictionary, objc_name="objectForKey")
Dictionary_objectForKey :: proc(self: ^Dictionary, key: ^Object) -> ^Object {
Dictionary_objectForKey :: proc "c" (self: ^Dictionary, key: ^Object) -> ^Object {
return msgSend(^Dictionary, self, "objectForKey:", key)
}
@(objc_type=Dictionary, objc_name="count")
Dictionary_count :: proc(self: ^Dictionary) -> UInteger {
Dictionary_count :: proc "c" (self: ^Dictionary) -> UInteger {
return msgSend(UInteger, self, "count")
}
@(objc_type=Dictionary, objc_name="keyEnumerator")
Dictionary_keyEnumerator :: proc(self: ^Dictionary, $KeyType: typeid) -> (enumerator: ^Enumerator(KeyType)) {
Dictionary_keyEnumerator :: proc "c" (self: ^Dictionary, $KeyType: typeid) -> (enumerator: ^Enumerator(KeyType)) {
return msgSend(type_of(enumerator), self, "keyEnumerator")
}
+6 -6
View File
@@ -20,30 +20,30 @@ Enumerator :: struct($T: typeid) where intrinsics.type_is_pointer(T), intrinsics
@(objc_type=FastEnumeration, objc_name="alloc", objc_is_class_method=true)
FastEnumeration_alloc :: proc() -> ^FastEnumeration {
FastEnumeration_alloc :: proc "c" () -> ^FastEnumeration {
return msgSend(^FastEnumeration, FastEnumeration, "alloc")
}
@(objc_type=FastEnumeration, objc_name="init")
FastEnumeration_init :: proc(self: ^FastEnumeration) -> ^FastEnumeration {
FastEnumeration_init :: proc "c" (self: ^FastEnumeration) -> ^FastEnumeration {
return msgSend(^FastEnumeration, self, "init")
}
@(objc_type=FastEnumeration, objc_name="countByEnumerating")
FastEnumeration_countByEnumerating :: proc(self: ^FastEnumeration, state: ^FastEnumerationState, buffer: [^]^Object, len: UInteger) -> UInteger {
FastEnumeration_countByEnumerating :: proc "c" (self: ^FastEnumeration, state: ^FastEnumerationState, buffer: [^]^Object, len: UInteger) -> UInteger {
return msgSend(UInteger, self, "countByEnumeratingWithState:objects:count:", state, buffer, len)
}
Enumerator_nextObject :: proc(self: ^$E/Enumerator($T)) -> T {
Enumerator_nextObject :: proc "c" (self: ^$E/Enumerator($T)) -> T {
return msgSend(T, self, "nextObject")
}
Enumerator_allObjects :: proc(self: ^$E/Enumerator($T)) -> (all: ^Array) {
Enumerator_allObjects :: proc "c" (self: ^$E/Enumerator($T)) -> (all: ^Array) {
return msgSend(type_of(all), self, "allObjects")
}
Enumerator_iterator :: proc(self: ^$E/Enumerator($T)) -> (obj: T, ok: bool) {
Enumerator_iterator :: proc "contextless" (self: ^$E/Enumerator($T)) -> (obj: T, ok: bool) {
obj = msgSend(T, self, "nextObject")
ok = obj != nil
return
+11 -11
View File
@@ -33,56 +33,56 @@ Error :: struct { using _: Copying(Error) }
@(objc_type=Error, objc_name="alloc", objc_is_class_method=true)
Error_alloc :: proc() -> ^Error {
Error_alloc :: proc "c" () -> ^Error {
return msgSend(^Error, Error, "alloc")
}
@(objc_type=Error, objc_name="init")
Error_init :: proc(self: ^Error) -> ^Error {
Error_init :: proc "c" (self: ^Error) -> ^Error {
return msgSend(^Error, self, "init")
}
@(objc_type=Error, objc_name="errorWithDomain", objc_is_class_method=true)
Error_errorWithDomain :: proc(domain: ErrorDomain, code: Integer, userInfo: ^Dictionary) -> ^Error {
Error_errorWithDomain :: proc "c" (domain: ErrorDomain, code: Integer, userInfo: ^Dictionary) -> ^Error {
return msgSend(^Error, Error, "errorWithDomain:code:userInfo:", domain, code, userInfo)
}
@(objc_type=Error, objc_name="initWithDomain")
Error_initWithDomain :: proc(self: ^Error, domain: ErrorDomain, code: Integer, userInfo: ^Dictionary) -> ^Error {
Error_initWithDomain :: proc "c" (self: ^Error, domain: ErrorDomain, code: Integer, userInfo: ^Dictionary) -> ^Error {
return msgSend(^Error, self, "initWithDomain:code:userInfo:", domain, code, userInfo)
}
@(objc_type=Error, objc_name="code")
Error_code :: proc(self: ^Error) -> Integer {
Error_code :: proc "c" (self: ^Error) -> Integer {
return msgSend(Integer, self, "code")
}
@(objc_type=Error, objc_name="domain")
Error_domain :: proc(self: ^Error) -> ErrorDomain {
Error_domain :: proc "c" (self: ^Error) -> ErrorDomain {
return msgSend(ErrorDomain, self, "domain")
}
@(objc_type=Error, objc_name="userInfo")
Error_userInfo :: proc(self: ^Error) -> ^Dictionary {
Error_userInfo :: proc "c" (self: ^Error) -> ^Dictionary {
return msgSend(^Dictionary, self, "userInfo")
}
@(objc_type=Error, objc_name="localizedDescription")
Error_localizedDescription :: proc(self: ^Error) -> ^String {
Error_localizedDescription :: proc "c" (self: ^Error) -> ^String {
return msgSend(^String, self, "localizedDescription")
}
@(objc_type=Error, objc_name="localizedRecoveryOptions")
Error_localizedRecoveryOptions :: proc(self: ^Error) -> (options: ^Array) {
Error_localizedRecoveryOptions :: proc "c" (self: ^Error) -> (options: ^Array) {
return msgSend(type_of(options), self, "localizedRecoveryOptions")
}
@(objc_type=Error, objc_name="localizedRecoverySuggestion")
Error_localizedRecoverySuggestion :: proc(self: ^Error) -> ^String {
Error_localizedRecoverySuggestion :: proc "c" (self: ^Error) -> ^String {
return msgSend(^String, self, "localizedRecoverySuggestion")
}
@(objc_type=Error, objc_name="localizedFailureReason")
Error_localizedFailureReason :: proc(self: ^Error) -> ^String {
Error_localizedFailureReason :: proc "c" (self: ^Error) -> ^String {
return msgSend(^String, self, "localizedFailureReason")
}
+10 -10
View File
@@ -2,10 +2,10 @@ package objc_Foundation
Locking :: struct($T: typeid) {using _: Object}
Locking_lock :: proc(self: ^Locking($T)) {
Locking_lock :: proc "c" (self: ^Locking($T)) {
msgSend(nil, self, "lock")
}
Locking_unlock :: proc(self: ^Locking($T)) {
Locking_unlock :: proc "c" (self: ^Locking($T)) {
msgSend(nil, self, "unlock")
}
@@ -14,40 +14,40 @@ Condition :: struct {using _: Locking(Condition) }
@(objc_type=Condition, objc_name="alloc", objc_is_class_method=true)
Condition_alloc :: proc() -> ^Condition {
Condition_alloc :: proc "c" () -> ^Condition {
return msgSend(^Condition, Condition, "alloc")
}
@(objc_type=Condition, objc_name="init")
Condition_init :: proc(self: ^Condition) -> ^Condition {
Condition_init :: proc "c" (self: ^Condition) -> ^Condition {
return msgSend(^Condition, self, "init")
}
@(objc_type=Condition, objc_name="wait")
Condition_wait :: proc(self: ^Condition) {
Condition_wait :: proc "c" (self: ^Condition) {
msgSend(nil, self, "wait")
}
@(objc_type=Condition, objc_name="waitUntilDate")
Condition_waitUntilDate :: proc(self: ^Condition, limit: ^Date) -> BOOL {
Condition_waitUntilDate :: proc "c" (self: ^Condition, limit: ^Date) -> BOOL {
return msgSend(BOOL, self, "waitUntilDate:", limit)
}
@(objc_type=Condition, objc_name="signal")
Condition_signal :: proc(self: ^Condition) {
Condition_signal :: proc "c" (self: ^Condition) {
msgSend(nil, self, "signal")
}
@(objc_type=Condition, objc_name="broadcast")
Condition_broadcast :: proc(self: ^Condition) {
Condition_broadcast :: proc "c" (self: ^Condition) {
msgSend(nil, self, "broadcast")
}
@(objc_type=Condition, objc_name="lock")
Condition_lock :: proc(self: ^Condition) {
Condition_lock :: proc "c" (self: ^Condition) {
msgSend(nil, self, "lock")
}
@(objc_type=Condition, objc_name="unlock")
Condition_unlock :: proc(self: ^Condition) {
Condition_unlock :: proc "c" (self: ^Condition) {
msgSend(nil, self, "unlock")
}
+11 -11
View File
@@ -27,11 +27,11 @@ MenuItemCallback :: proc "c" (unused: rawptr, name: SEL, sender: ^Object)
MenuItem :: struct {using _: Object}
@(objc_type=MenuItem, objc_name="alloc", objc_is_class_method=true)
MenuItem_alloc :: proc() -> ^MenuItem {
MenuItem_alloc :: proc "c" () -> ^MenuItem {
return msgSend(^MenuItem, MenuItem, "alloc")
}
@(objc_type=MenuItem, objc_name="registerActionCallback", objc_is_class_method=true)
MenuItem_registerActionCallback :: proc(name: cstring, callback: MenuItemCallback) -> SEL {
MenuItem_registerActionCallback :: proc "c" (name: cstring, callback: MenuItemCallback) -> SEL {
s := string(name)
n := len(s)
sel: SEL
@@ -51,22 +51,22 @@ MenuItem_registerActionCallback :: proc(name: cstring, callback: MenuItemCallbac
}
@(objc_type=MenuItem, objc_name="init")
MenuItem_init :: proc(self: ^MenuItem) -> ^MenuItem {
MenuItem_init :: proc "c" (self: ^MenuItem) -> ^MenuItem {
return msgSend(^MenuItem, self, "init")
}
@(objc_type=MenuItem, objc_name="setKeyEquivalentModifierMask")
MenuItem_setKeyEquivalentModifierMask :: proc(self: ^MenuItem, modifierMask: KeyEquivalentModifierMask) {
MenuItem_setKeyEquivalentModifierMask :: proc "c" (self: ^MenuItem, modifierMask: KeyEquivalentModifierMask) {
msgSend(nil, self, "setKeyEquivalentModifierMask:", modifierMask)
}
@(objc_type=MenuItem, objc_name="keyEquivalentModifierMask")
MenuItem_keyEquivalentModifierMask :: proc(self: ^MenuItem) -> KeyEquivalentModifierMask {
MenuItem_keyEquivalentModifierMask :: proc "c" (self: ^MenuItem) -> KeyEquivalentModifierMask {
return msgSend(KeyEquivalentModifierMask, self, "keyEquivalentModifierMask")
}
@(objc_type=MenuItem, objc_name="setSubmenu")
MenuItem_setSubmenu :: proc(self: ^MenuItem, submenu: ^Menu) {
MenuItem_setSubmenu :: proc "c" (self: ^MenuItem, submenu: ^Menu) {
msgSend(nil, self, "setSubmenu:", submenu)
}
@@ -77,27 +77,27 @@ MenuItem_setSubmenu :: proc(self: ^MenuItem, submenu: ^Menu) {
Menu :: struct {using _: Object}
@(objc_type=Menu, objc_name="alloc", objc_is_class_method=true)
Menu_alloc :: proc() -> ^Menu {
Menu_alloc :: proc "c" () -> ^Menu {
return msgSend(^Menu, Menu, "alloc")
}
@(objc_type=Menu, objc_name="init")
Menu_init :: proc(self: ^Menu) -> ^Menu {
Menu_init :: proc "c" (self: ^Menu) -> ^Menu {
return msgSend(^Menu, self, "init")
}
@(objc_type=Menu, objc_name="initWithTitle")
Menu_initWithTitle :: proc(self: ^Menu, title: ^String) -> ^Menu {
Menu_initWithTitle :: proc "c" (self: ^Menu, title: ^String) -> ^Menu {
return msgSend(^Menu, self, "initWithTitle:", title)
}
@(objc_type=Menu, objc_name="addItem")
Menu_addItem :: proc(self: ^Menu, item: ^MenuItem) {
Menu_addItem :: proc "c" (self: ^Menu, item: ^MenuItem) {
msgSend(nil, self, "addItem:", item)
}
@(objc_type=Menu, objc_name="addItemWithTitle")
Menu_addItemWithTitle :: proc(self: ^Menu, title: ^String, selector: SEL, keyEquivalent: ^String) -> ^MenuItem {
Menu_addItemWithTitle :: proc "c" (self: ^Menu, title: ^String, selector: SEL, keyEquivalent: ^String) -> ^MenuItem {
return msgSend(^MenuItem, self, "addItemWithTitle:action:keyEquivalent:", title, selector, keyEquivalent)
}
+10 -10
View File
@@ -5,27 +5,27 @@ Notification :: struct{using _: Object}
@(objc_type=Notification, objc_name="alloc", objc_is_class_method=true)
Notification_alloc :: proc() -> ^Notification {
Notification_alloc :: proc "c" () -> ^Notification {
return msgSend(^Notification, Notification, "alloc")
}
@(objc_type=Notification, objc_name="init")
Notification_init :: proc(self: ^Notification) -> ^Notification {
Notification_init :: proc "c" (self: ^Notification) -> ^Notification {
return msgSend(^Notification, self, "init")
}
@(objc_type=Notification, objc_name="name")
Notification_name :: proc(self: ^Notification) -> ^String {
Notification_name :: proc "c" (self: ^Notification) -> ^String {
return msgSend(^String, self, "name")
}
@(objc_type=Notification, objc_name="object")
Notification_object :: proc(self: ^Notification) -> ^Object {
Notification_object :: proc "c" (self: ^Notification) -> ^Object {
return msgSend(^Object, self, "object")
}
@(objc_type=Notification, objc_name="userInfo")
Notification_userInfo :: proc(self: ^Notification) -> ^Dictionary {
Notification_userInfo :: proc "c" (self: ^Notification) -> ^Dictionary {
return msgSend(^Dictionary, self, "userInfo")
}
@@ -36,25 +36,25 @@ NotificationCenter :: struct{using _: Object}
@(objc_type=NotificationCenter, objc_name="alloc", objc_is_class_method=true)
NotificationCenter_alloc :: proc() -> ^NotificationCenter {
NotificationCenter_alloc :: proc "c" () -> ^NotificationCenter {
return msgSend(^NotificationCenter, NotificationCenter, "alloc")
}
@(objc_type=NotificationCenter, objc_name="init")
NotificationCenter_init :: proc(self: ^NotificationCenter) -> ^NotificationCenter {
NotificationCenter_init :: proc "c" (self: ^NotificationCenter) -> ^NotificationCenter {
return msgSend(^NotificationCenter, self, "init")
}
@(objc_type=NotificationCenter, objc_name="defaultCenter", objc_is_class_method=true)
NotificationCenter_defaultCenter :: proc() -> ^NotificationCenter {
NotificationCenter_defaultCenter :: proc "c" () -> ^NotificationCenter {
return msgSend(^NotificationCenter, NotificationCenter, "defaultCenter")
}
@(objc_type=NotificationCenter, objc_name="addObserver")
NotificationCenter_addObserverName :: proc(self: ^NotificationCenter, name: NotificationName, pObj: ^Object, pQueue: rawptr, block: ^Block) -> ^Object {
NotificationCenter_addObserverName :: proc "c" (self: ^NotificationCenter, name: NotificationName, pObj: ^Object, pQueue: rawptr, block: ^Block) -> ^Object {
return msgSend(^Object, self, "addObserverName:object:queue:block:", name, pObj, pQueue, block)
}
@(objc_type=NotificationCenter, objc_name="removeObserver")
NotificationCenter_removeObserver :: proc(self: ^NotificationCenter, pObserver: ^Object) {
NotificationCenter_removeObserver :: proc "c" (self: ^NotificationCenter, pObserver: ^Object) {
msgSend(nil, self, "removeObserver:", pObserver)
}
+55 -54
View File
@@ -12,37 +12,37 @@ when ODIN_OS == .Darwin {
Value :: struct{using _: Copying(Value)}
@(objc_type=Value, objc_name="alloc", objc_is_class_method=true)
Value_alloc :: proc() -> ^Value {
Value_alloc :: proc "c" () -> ^Value {
return msgSend(^Value, Value, "alloc")
}
@(objc_type=Value, objc_name="init")
Value_init :: proc(self: ^Value) -> ^Value {
Value_init :: proc "c" (self: ^Value) -> ^Value {
return msgSend(^Value, self, "init")
}
@(objc_type=Value, objc_name="valueWithBytes", objc_is_class_method=true)
Value_valueWithBytes :: proc(value: rawptr, type: cstring) -> ^Value {
Value_valueWithBytes :: proc "c" (value: rawptr, type: cstring) -> ^Value {
return msgSend(^Value, Value, "valueWithBytes:objCType:", value, type)
}
@(objc_type=Value, objc_name="valueWithPointer", objc_is_class_method=true)
Value_valueWithPointer :: proc(pointer: rawptr) -> ^Value {
Value_valueWithPointer :: proc "c" (pointer: rawptr) -> ^Value {
return msgSend(^Value, Value, "valueWithPointer:", pointer)
}
@(objc_type=Value, objc_name="initWithBytes")
Value_initWithBytes :: proc(self: ^Value, value: rawptr, type: cstring) -> ^Value {
Value_initWithBytes :: proc "c" (self: ^Value, value: rawptr, type: cstring) -> ^Value {
return msgSend(^Value, self, "initWithBytes:objCType:", value, type)
}
@(objc_type=Value, objc_name="initWithCoder")
Value_initWithCoder :: proc(self: ^Value, coder: ^Coder) -> ^Value {
Value_initWithCoder :: proc "c" (self: ^Value, coder: ^Coder) -> ^Value {
return msgSend(^Value, self, "initWithCoder:", coder)
}
@(objc_type=Value, objc_name="getValue")
Value_getValue :: proc(self: ^Value, value: rawptr, size: UInteger) {
Value_getValue :: proc "c" (self: ^Value, value: rawptr, size: UInteger) {
msgSend(nil, self, "getValue:size:", value, size)
}
@@ -67,29 +67,30 @@ Value_pointerValue :: proc "c" (self: ^Value) -> rawptr {
Number :: struct{using _: Copying(Number), using _: Value}
@(objc_type=Number, objc_name="alloc", objc_is_class_method=true)
Number_alloc :: proc() -> ^Number {
Number_alloc :: proc "c" () -> ^Number {
return msgSend(^Number, Number, "alloc")
}
@(objc_type=Number, objc_name="init")
Number_init :: proc(self: ^Number) -> ^Number {
Number_init :: proc "c" (self: ^Number) -> ^Number {
return msgSend(^Number, self, "init")
}
@(objc_type=Number, objc_name="numberWithI8", objc_is_class_method=true) Number_numberWithI8 :: proc(value: i8) -> ^Number { return msgSend(^Number, Number, "numberWithChar:", value) }
@(objc_type=Number, objc_name="numberWithU8", objc_is_class_method=true) Number_numberWithU8 :: proc(value: u8) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedChar:", value) }
@(objc_type=Number, objc_name="numberWithI16", objc_is_class_method=true) Number_numberWithI16 :: proc(value: i16) -> ^Number { return msgSend(^Number, Number, "numberWithShort:", value) }
@(objc_type=Number, objc_name="numberWithU16", objc_is_class_method=true) Number_numberWithU16 :: proc(value: u16) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedShort:", value) }
@(objc_type=Number, objc_name="numberWithI32", objc_is_class_method=true) Number_numberWithI32 :: proc(value: i32) -> ^Number { return msgSend(^Number, Number, "numberWithInt:", value) }
@(objc_type=Number, objc_name="numberWithU32", objc_is_class_method=true) Number_numberWithU32 :: proc(value: u32) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedInt:", value) }
@(objc_type=Number, objc_name="numberWithInt", objc_is_class_method=true) Number_numberWithInt :: proc(value: int) -> ^Number { return msgSend(^Number, Number, "numberWithLong:", value) }
@(objc_type=Number, objc_name="numberWithUint", objc_is_class_method=true) Number_numberWithUint :: proc(value: uint) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedLong:", value) }
@(objc_type=Number, objc_name="numberWithU64", objc_is_class_method=true) Number_numberWithU64 :: proc(value: u64) -> ^Number { return msgSend(^Number, Number, "numberWithLongLong:", value) }
@(objc_type=Number, objc_name="numberWithI64", objc_is_class_method=true) Number_numberWithI64 :: proc(value: i64) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedLongLong:", value) }
@(objc_type=Number, objc_name="numberWithF32", objc_is_class_method=true) Number_numberWithF32 :: proc(value: f32) -> ^Number { return msgSend(^Number, Number, "numberWithFloat:", value) }
@(objc_type=Number, objc_name="numberWithF64", objc_is_class_method=true) Number_numberWithF64 :: proc(value: f64) -> ^Number { return msgSend(^Number, Number, "numberWithDouble:", value) }
@(objc_type=Number, objc_name="numberWithBool", objc_is_class_method=true) Number_numberWithBool :: proc(value: BOOL) -> ^Number { return msgSend(^Number, Number, "numberWithBool:", value) }
@(objc_type=Number, objc_name="numberWithI8", objc_is_class_method=true) Number_numberWithI8 :: proc "c" (value: i8) -> ^Number { return msgSend(^Number, Number, "numberWithChar:", value) }
@(objc_type=Number, objc_name="numberWithU8", objc_is_class_method=true) Number_numberWithU8 :: proc "c" (value: u8) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedChar:", value) }
@(objc_type=Number, objc_name="numberWithI16", objc_is_class_method=true) Number_numberWithI16 :: proc "c" (value: i16) -> ^Number { return msgSend(^Number, Number, "numberWithShort:", value) }
@(objc_type=Number, objc_name="numberWithU16", objc_is_class_method=true) Number_numberWithU16 :: proc "c" (value: u16) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedShort:", value) }
@(objc_type=Number, objc_name="numberWithI32", objc_is_class_method=true) Number_numberWithI32 :: proc "c" (value: i32) -> ^Number { return msgSend(^Number, Number, "numberWithInt:", value) }
@(objc_type=Number, objc_name="numberWithU32", objc_is_class_method=true) Number_numberWithU32 :: proc "c" (value: u32) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedInt:", value) }
@(objc_type=Number, objc_name="numberWithInt", objc_is_class_method=true) Number_numberWithInt :: proc "c" (value: int) -> ^Number { return msgSend(^Number, Number, "numberWithLong:", value) }
@(objc_type=Number, objc_name="numberWithUint", objc_is_class_method=true) Number_numberWithUint :: proc "c" (value: uint) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedLong:", value) }
@(objc_type=Number, objc_name="numberWithU64", objc_is_class_method=true) Number_numberWithU64 :: proc "c" (value: u64) -> ^Number { return msgSend(^Number, Number, "numberWithLongLong:", value) }
@(objc_type=Number, objc_name="numberWithI64", objc_is_class_method=true) Number_numberWithI64 :: proc "c" (value: i64) -> ^Number { return msgSend(^Number, Number, "numberWithUnsignedLongLong:", value) }
@(objc_type=Number, objc_name="numberWithF32", objc_is_class_method=true) Number_numberWithF32 :: proc "c" (value: f32) -> ^Number { return msgSend(^Number, Number, "numberWithFloat:", value) }
@(objc_type=Number, objc_name="numberWithF64", objc_is_class_method=true) Number_numberWithF64 :: proc "c" (value: f64) -> ^Number { return msgSend(^Number, Number, "numberWithDouble:", value) }
@(objc_type=Number, objc_name="numberWithBool", objc_is_class_method=true) Number_numberWithBool :: proc "c" (value: BOOL) -> ^Number { return msgSend(^Number, Number, "numberWithBool:", value) }
@(objc_type=Number, objc_name="number", objc_is_class_method=true)
Number_number :: proc{
Number_numberWithI8,
Number_numberWithU8,
@@ -106,49 +107,49 @@ Number_number :: proc{
Number_numberWithBool,
}
@(objc_type=Number, objc_name="initWithI8") Number_initWithI8 :: proc(self: ^Number, value: i8) -> ^Number { return msgSend(^Number, self, "initWithChar:", value) }
@(objc_type=Number, objc_name="initWithU8") Number_initWithU8 :: proc(self: ^Number, value: u8) -> ^Number { return msgSend(^Number, self, "initWithUnsignedChar:", value) }
@(objc_type=Number, objc_name="initWithI16") Number_initWithI16 :: proc(self: ^Number, value: i16) -> ^Number { return msgSend(^Number, self, "initWithShort:", value) }
@(objc_type=Number, objc_name="initWithU16") Number_initWithU16 :: proc(self: ^Number, value: u16) -> ^Number { return msgSend(^Number, self, "initWithUnsignedShort:", value) }
@(objc_type=Number, objc_name="initWithI32") Number_initWithI32 :: proc(self: ^Number, value: i32) -> ^Number { return msgSend(^Number, self, "initWithInt:", value) }
@(objc_type=Number, objc_name="initWithU32") Number_initWithU32 :: proc(self: ^Number, value: u32) -> ^Number { return msgSend(^Number, self, "initWithUnsignedInt:", value) }
@(objc_type=Number, objc_name="initWithInt") Number_initWithInt :: proc(self: ^Number, value: int) -> ^Number { return msgSend(^Number, self, "initWithLong:", value) }
@(objc_type=Number, objc_name="initWithUint") Number_initWithUint :: proc(self: ^Number, value: uint) -> ^Number { return msgSend(^Number, self, "initWithUnsignedLong:", value) }
@(objc_type=Number, objc_name="initWithU64") Number_initWithU64 :: proc(self: ^Number, value: u64) -> ^Number { return msgSend(^Number, self, "initWithLongLong:", value) }
@(objc_type=Number, objc_name="initWithI64") Number_initWithI64 :: proc(self: ^Number, value: i64) -> ^Number { return msgSend(^Number, self, "initWithUnsignedLongLong:", value) }
@(objc_type=Number, objc_name="initWithF32") Number_initWithF32 :: proc(self: ^Number, value: f32) -> ^Number { return msgSend(^Number, self, "initWithFloat:", value) }
@(objc_type=Number, objc_name="initWithF64") Number_initWithF64 :: proc(self: ^Number, value: f64) -> ^Number { return msgSend(^Number, self, "initWithDouble:", value) }
@(objc_type=Number, objc_name="initWithBool") Number_initWithBool :: proc(self: ^Number, value: BOOL) -> ^Number { return msgSend(^Number, self, "initWithBool:", value) }
@(objc_type=Number, objc_name="initWithI8") Number_initWithI8 :: proc "c" (self: ^Number, value: i8) -> ^Number { return msgSend(^Number, self, "initWithChar:", value) }
@(objc_type=Number, objc_name="initWithU8") Number_initWithU8 :: proc "c" (self: ^Number, value: u8) -> ^Number { return msgSend(^Number, self, "initWithUnsignedChar:", value) }
@(objc_type=Number, objc_name="initWithI16") Number_initWithI16 :: proc "c" (self: ^Number, value: i16) -> ^Number { return msgSend(^Number, self, "initWithShort:", value) }
@(objc_type=Number, objc_name="initWithU16") Number_initWithU16 :: proc "c" (self: ^Number, value: u16) -> ^Number { return msgSend(^Number, self, "initWithUnsignedShort:", value) }
@(objc_type=Number, objc_name="initWithI32") Number_initWithI32 :: proc "c" (self: ^Number, value: i32) -> ^Number { return msgSend(^Number, self, "initWithInt:", value) }
@(objc_type=Number, objc_name="initWithU32") Number_initWithU32 :: proc "c" (self: ^Number, value: u32) -> ^Number { return msgSend(^Number, self, "initWithUnsignedInt:", value) }
@(objc_type=Number, objc_name="initWithInt") Number_initWithInt :: proc "c" (self: ^Number, value: int) -> ^Number { return msgSend(^Number, self, "initWithLong:", value) }
@(objc_type=Number, objc_name="initWithUint") Number_initWithUint :: proc "c" (self: ^Number, value: uint) -> ^Number { return msgSend(^Number, self, "initWithUnsignedLong:", value) }
@(objc_type=Number, objc_name="initWithU64") Number_initWithU64 :: proc "c" (self: ^Number, value: u64) -> ^Number { return msgSend(^Number, self, "initWithLongLong:", value) }
@(objc_type=Number, objc_name="initWithI64") Number_initWithI64 :: proc "c" (self: ^Number, value: i64) -> ^Number { return msgSend(^Number, self, "initWithUnsignedLongLong:", value) }
@(objc_type=Number, objc_name="initWithF32") Number_initWithF32 :: proc "c" (self: ^Number, value: f32) -> ^Number { return msgSend(^Number, self, "initWithFloat:", value) }
@(objc_type=Number, objc_name="initWithF64") Number_initWithF64 :: proc "c" (self: ^Number, value: f64) -> ^Number { return msgSend(^Number, self, "initWithDouble:", value) }
@(objc_type=Number, objc_name="initWithBool") Number_initWithBool :: proc "c" (self: ^Number, value: BOOL) -> ^Number { return msgSend(^Number, self, "initWithBool:", value) }
@(objc_type=Number, objc_name="i8Value") Number_i8Value :: proc(self: ^Number) -> i8 { return msgSend(i8, self, "charValue") }
@(objc_type=Number, objc_name="u8Value") Number_u8Value :: proc(self: ^Number) -> u8 { return msgSend(u8, self, "unsignedCharValue") }
@(objc_type=Number, objc_name="i16Value") Number_i16Value :: proc(self: ^Number) -> i16 { return msgSend(i16, self, "shortValue") }
@(objc_type=Number, objc_name="u16Value") Number_u16Value :: proc(self: ^Number) -> u16 { return msgSend(u16, self, "unsignedShortValue") }
@(objc_type=Number, objc_name="i32Value") Number_i32Value :: proc(self: ^Number) -> i32 { return msgSend(i32, self, "intValue") }
@(objc_type=Number, objc_name="u32Value") Number_u32Value :: proc(self: ^Number) -> u32 { return msgSend(u32, self, "unsignedIntValue") }
@(objc_type=Number, objc_name="intValue") Number_intValue :: proc(self: ^Number) -> int { return msgSend(int, self, "longValue") }
@(objc_type=Number, objc_name="uintValue") Number_uintValue :: proc(self: ^Number) -> uint { return msgSend(uint, self, "unsignedLongValue") }
@(objc_type=Number, objc_name="u64Value") Number_u64Value :: proc(self: ^Number) -> u64 { return msgSend(u64, self, "longLongValue") }
@(objc_type=Number, objc_name="i64Value") Number_i64Value :: proc(self: ^Number) -> i64 { return msgSend(i64, self, "unsignedLongLongValue") }
@(objc_type=Number, objc_name="f32Value") Number_f32Value :: proc(self: ^Number) -> f32 { return msgSend(f32, self, "floatValue") }
@(objc_type=Number, objc_name="f64Value") Number_f64Value :: proc(self: ^Number) -> f64 { return msgSend(f64, self, "doubleValue") }
@(objc_type=Number, objc_name="boolValue") Number_boolValue :: proc(self: ^Number) -> BOOL { return msgSend(BOOL, self, "boolValue") }
@(objc_type=Number, objc_name="integerValue") Number_integerValue :: proc(self: ^Number) -> Integer { return msgSend(Integer, self, "integerValue") }
@(objc_type=Number, objc_name="uintegerValue") Number_uintegerValue :: proc(self: ^Number) -> UInteger { return msgSend(UInteger, self, "unsignedIntegerValue") }
@(objc_type=Number, objc_name="stringValue") Number_stringValue :: proc(self: ^Number) -> ^String { return msgSend(^String, self, "stringValue") }
@(objc_type=Number, objc_name="i8Value") Number_i8Value :: proc "c" (self: ^Number) -> i8 { return msgSend(i8, self, "charValue") }
@(objc_type=Number, objc_name="u8Value") Number_u8Value :: proc "c" (self: ^Number) -> u8 { return msgSend(u8, self, "unsignedCharValue") }
@(objc_type=Number, objc_name="i16Value") Number_i16Value :: proc "c" (self: ^Number) -> i16 { return msgSend(i16, self, "shortValue") }
@(objc_type=Number, objc_name="u16Value") Number_u16Value :: proc "c" (self: ^Number) -> u16 { return msgSend(u16, self, "unsignedShortValue") }
@(objc_type=Number, objc_name="i32Value") Number_i32Value :: proc "c" (self: ^Number) -> i32 { return msgSend(i32, self, "intValue") }
@(objc_type=Number, objc_name="u32Value") Number_u32Value :: proc "c" (self: ^Number) -> u32 { return msgSend(u32, self, "unsignedIntValue") }
@(objc_type=Number, objc_name="intValue") Number_intValue :: proc "c" (self: ^Number) -> int { return msgSend(int, self, "longValue") }
@(objc_type=Number, objc_name="uintValue") Number_uintValue :: proc "c" (self: ^Number) -> uint { return msgSend(uint, self, "unsignedLongValue") }
@(objc_type=Number, objc_name="u64Value") Number_u64Value :: proc "c" (self: ^Number) -> u64 { return msgSend(u64, self, "longLongValue") }
@(objc_type=Number, objc_name="i64Value") Number_i64Value :: proc "c" (self: ^Number) -> i64 { return msgSend(i64, self, "unsignedLongLongValue") }
@(objc_type=Number, objc_name="f32Value") Number_f32Value :: proc "c" (self: ^Number) -> f32 { return msgSend(f32, self, "floatValue") }
@(objc_type=Number, objc_name="f64Value") Number_f64Value :: proc "c" (self: ^Number) -> f64 { return msgSend(f64, self, "doubleValue") }
@(objc_type=Number, objc_name="boolValue") Number_boolValue :: proc "c" (self: ^Number) -> BOOL { return msgSend(BOOL, self, "boolValue") }
@(objc_type=Number, objc_name="integerValue") Number_integerValue :: proc "c" (self: ^Number) -> Integer { return msgSend(Integer, self, "integerValue") }
@(objc_type=Number, objc_name="uintegerValue") Number_uintegerValue :: proc "c" (self: ^Number) -> UInteger { return msgSend(UInteger, self, "unsignedIntegerValue") }
@(objc_type=Number, objc_name="stringValue") Number_stringValue :: proc "c" (self: ^Number) -> ^String { return msgSend(^String, self, "stringValue") }
@(objc_type=Number, objc_name="compare")
Number_compare :: proc(self, other: ^Number) -> ComparisonResult {
Number_compare :: proc "c" (self, other: ^Number) -> ComparisonResult {
return msgSend(ComparisonResult, self, "compare:", other)
}
@(objc_type=Number, objc_name="isEqualToNumber")
Number_isEqualToNumber :: proc(self, other: ^Number) -> BOOL {
Number_isEqualToNumber :: proc "c" (self, other: ^Number) -> BOOL {
return msgSend(BOOL, self, "isEqualToNumber:", other)
}
@(objc_type=Number, objc_name="descriptionWithLocale")
Number_descriptionWithLocale :: proc(self: ^Number, locale: ^Object) -> ^String {
Number_descriptionWithLocale :: proc "c" (self: ^Number, locale: ^Object) -> ^String {
return msgSend(^String, self, "descriptionWithLocale:", locale)
}
+14 -14
View File
@@ -21,67 +21,67 @@ Object :: struct {using _: intrinsics.objc_object}
@(objc_class="NSObject")
Copying :: struct($T: typeid) {using _: Object}
alloc :: proc($T: typeid) -> ^T where intrinsics.type_is_subtype_of(T, Object) {
alloc :: proc "c" ($T: typeid) -> ^T where intrinsics.type_is_subtype_of(T, Object) {
return msgSend(^T, T, "alloc")
}
@(objc_type=Object, objc_name="init")
init :: proc(self: ^$T) -> ^T where intrinsics.type_is_subtype_of(T, Object) {
init :: proc "c" (self: ^$T) -> ^T where intrinsics.type_is_subtype_of(T, Object) {
return msgSend(^T, self, "init")
}
@(objc_type=Object, objc_name="copy")
copy :: proc(self: ^Copying($T)) -> ^T where intrinsics.type_is_subtype_of(T, Object) {
copy :: proc "c" (self: ^Copying($T)) -> ^T where intrinsics.type_is_subtype_of(T, Object) {
return msgSend(^T, self, "copy")
}
new :: proc($T: typeid) -> ^T where intrinsics.type_is_subtype_of(T, Object) {
new :: proc "c" ($T: typeid) -> ^T where intrinsics.type_is_subtype_of(T, Object) {
return init(alloc(T))
}
@(objc_type=Object, objc_name="retain")
retain :: proc(self: ^Object) {
retain :: proc "c" (self: ^Object) {
_ = msgSend(^Object, self, "retain")
}
@(objc_type=Object, objc_name="release")
release :: proc(self: ^Object) {
release :: proc "c" (self: ^Object) {
msgSend(nil, self, "release")
}
@(objc_type=Object, objc_name="autorelease")
autorelease :: proc(self: ^Object) {
autorelease :: proc "c" (self: ^Object) {
msgSend(nil, self, "autorelease")
}
@(objc_type=Object, objc_name="retainCount")
retainCount :: proc(self: ^Object) -> UInteger {
retainCount :: proc "c" (self: ^Object) -> UInteger {
return msgSend(UInteger, self, "retainCount")
}
@(objc_type=Object, objc_name="class")
class :: proc(self: ^Object) -> Class {
class :: proc "c" (self: ^Object) -> Class {
return msgSend(Class, self, "class")
}
@(objc_type=Object, objc_name="hash")
hash :: proc(self: ^Object) -> UInteger {
hash :: proc "c" (self: ^Object) -> UInteger {
return msgSend(UInteger, self, "hash")
}
@(objc_type=Object, objc_name="isEqual")
isEqual :: proc(self, pObject: ^Object) -> BOOL {
isEqual :: proc "c" (self, pObject: ^Object) -> BOOL {
return msgSend(BOOL, self, "isEqual:", pObject)
}
@(objc_type=Object, objc_name="description")
description :: proc(self: ^Object) -> ^String {
description :: proc "c" (self: ^Object) -> ^String {
return msgSend(^String, self, "description")
}
@(objc_type=Object, objc_name="debugDescription")
debugDescription :: proc(self: ^Object) -> ^String {
debugDescription :: proc "c" (self: ^Object) -> ^String {
if msgSendSafeCheck(self, intrinsics.objc_find_selector("debugDescription")) {
return msgSend(^String, self, "debugDescription")
}
return nil
}
bridgingCast :: proc($T: typeid, obj: ^Object) where intrinsics.type_is_pointer(T), intrinsics.type_is_subtype_of(T, ^Object) {
bridgingCast :: proc "c" ($T: typeid, obj: ^Object) where intrinsics.type_is_pointer(T), intrinsics.type_is_subtype_of(T, ^Object) {
return (T)(obj)
}
+6 -6
View File
@@ -4,28 +4,28 @@ package objc_Foundation
OpenPanel :: struct{ using _: SavePanel }
@(objc_type=OpenPanel, objc_name="openPanel", objc_is_class_method=true)
OpenPanel_openPanel :: proc() -> ^OpenPanel {
OpenPanel_openPanel :: proc "c" () -> ^OpenPanel {
return msgSend(^OpenPanel, OpenPanel, "openPanel")
}
@(objc_type=OpenPanel, objc_name="URLs")
OpenPanel_URLs :: proc(self: ^OpenPanel) -> ^Array {
OpenPanel_URLs :: proc "c" (self: ^OpenPanel) -> ^Array {
return msgSend(^Array, self, "URLs")
}
@(objc_type=OpenPanel, objc_name="setCanChooseFiles")
OpenPanel_setCanChooseFiles :: proc(self: ^OpenPanel, setting: BOOL) {
OpenPanel_setCanChooseFiles :: proc "c" (self: ^OpenPanel, setting: BOOL) {
msgSend(nil, self, "setCanChooseFiles:", setting)
}
@(objc_type=OpenPanel, objc_name="setCanChooseDirectories")
OpenPanel_setCanChooseDirectories :: proc(self: ^OpenPanel, setting: BOOL) {
OpenPanel_setCanChooseDirectories :: proc "c" (self: ^OpenPanel, setting: BOOL) {
msgSend(nil, self, "setCanChooseDirectories:", setting)
}
@(objc_type=OpenPanel, objc_name="setResolvesAliases")
OpenPanel_setResolvesAliases :: proc(self: ^OpenPanel, setting: BOOL) {
OpenPanel_setResolvesAliases :: proc "c" (self: ^OpenPanel, setting: BOOL) {
msgSend(nil, self, "setResolvesAliases:", setting)
}
@(objc_type=OpenPanel, objc_name="setAllowsMultipleSelection")
OpenPanel_setAllowsMultipleSelection :: proc(self: ^OpenPanel, setting: BOOL) {
OpenPanel_setAllowsMultipleSelection :: proc "c" (self: ^OpenPanel, setting: BOOL) {
msgSend(nil, self, "setAllowsMultipleSelection:", setting)
}
+4 -4
View File
@@ -5,18 +5,18 @@ Range :: struct {
length: UInteger,
}
Range_Make :: proc(loc, len: UInteger) -> Range {
Range_Make :: proc "c" (loc, len: UInteger) -> Range {
return Range{loc, len}
}
Range_Equal :: proc(a, b: Range) -> BOOL {
Range_Equal :: proc "c" (a, b: Range) -> BOOL {
return a == b
}
Range_LocationInRange :: proc(self: Range, loc: UInteger) -> BOOL {
Range_LocationInRange :: proc "c" (self: Range, loc: UInteger) -> BOOL {
return !((loc < self.location) && ((loc - self.location) < self.length))
}
Range_Max :: proc(self: Range) -> UInteger {
Range_Max :: proc "c" (self: Range) -> UInteger {
return self.location + self.length
}
+1 -1
View File
@@ -4,6 +4,6 @@ package objc_Foundation
SavePanel :: struct{ using _: Panel }
@(objc_type=SavePanel, objc_name="runModal")
SavePanel_runModal :: proc(self: ^SavePanel) -> ModalResponse {
SavePanel_runModal :: proc "c" (self: ^SavePanel) -> ModalResponse {
return msgSend(ModalResponse, self, "runModal")
}
+15 -15
View File
@@ -64,77 +64,77 @@ MakeConstantString :: proc "c" (#const c: cstring) -> ^String {
@(objc_type=String, objc_name="alloc", objc_is_class_method=true)
String_alloc :: proc() -> ^String {
String_alloc :: proc "c" () -> ^String {
return msgSend(^String, String, "alloc")
}
@(objc_type=String, objc_name="init")
String_init :: proc(self: ^String) -> ^String {
String_init :: proc "c" (self: ^String) -> ^String {
return msgSend(^String, self, "init")
}
@(objc_type=String, objc_name="initWithString")
String_initWithString :: proc(self: ^String, other: ^String) -> ^String {
String_initWithString :: proc "c" (self: ^String, other: ^String) -> ^String {
return msgSend(^String, self, "initWithString:", other)
}
@(objc_type=String, objc_name="initWithCString")
String_initWithCString :: proc(self: ^String, pString: cstring, encoding: StringEncoding) -> ^String {
String_initWithCString :: proc "c" (self: ^String, pString: cstring, encoding: StringEncoding) -> ^String {
return msgSend(^String, self, "initWithCstring:encoding:", pString, encoding)
}
@(objc_type=String, objc_name="initWithBytesNoCopy")
String_initWithBytesNoCopy :: proc(self: ^String, pBytes: rawptr, length: UInteger, encoding: StringEncoding, freeWhenDone: bool) -> ^String {
String_initWithBytesNoCopy :: proc "c" (self: ^String, pBytes: rawptr, length: UInteger, encoding: StringEncoding, freeWhenDone: bool) -> ^String {
return msgSend(^String, self, "initWithBytesNoCopy:length:encoding:freeWhenDone:", pBytes, length, encoding, freeWhenDone)
}
@(objc_type=String, objc_name="initWithOdinString")
String_initWithOdinString :: proc(self: ^String, str: string) -> ^String {
String_initWithOdinString :: proc "c" (self: ^String, str: string) -> ^String {
return String_initWithBytesNoCopy(self, raw_data(str), UInteger(len(str)), .UTF8, false)
}
@(objc_type=String, objc_name="characterAtIndex")
String_characterAtIndex :: proc(self: ^String, index: UInteger) -> unichar {
String_characterAtIndex :: proc "c" (self: ^String, index: UInteger) -> unichar {
return msgSend(unichar, self, "characterAtIndex:", index)
}
@(objc_type=String, objc_name="length")
String_length :: proc(self: ^String) -> UInteger {
String_length :: proc "c" (self: ^String) -> UInteger {
return msgSend(UInteger, self, "length")
}
@(objc_type=String, objc_name="cstringUsingEncoding")
String_cstringUsingEncoding :: proc(self: ^String, encoding: StringEncoding) -> cstring {
String_cstringUsingEncoding :: proc "c" (self: ^String, encoding: StringEncoding) -> cstring {
return msgSend(cstring, self, "cStringUsingEncoding:", encoding)
}
@(objc_type=String, objc_name="UTF8String")
String_UTF8String :: proc(self: ^String) -> cstring {
String_UTF8String :: proc "c" (self: ^String) -> cstring {
return msgSend(cstring, self, "UTF8String")
}
@(objc_type=String, objc_name="odinString")
String_odinString :: proc(self: ^String) -> string {
String_odinString :: proc "c" (self: ^String) -> string {
return string(String_UTF8String(self))
}
@(objc_type=String, objc_name="maximumLengthOfBytesUsingEncoding")
String_maximumLengthOfBytesUsingEncoding :: proc(self: ^String, encoding: StringEncoding) -> UInteger {
String_maximumLengthOfBytesUsingEncoding :: proc "c" (self: ^String, encoding: StringEncoding) -> UInteger {
return msgSend(UInteger, self, "maximumLengthOfBytesUsingEncoding:", encoding)
}
@(objc_type=String, objc_name="lengthOfBytesUsingEncoding")
String_lengthOfBytesUsingEncoding :: proc(self: ^String, encoding: StringEncoding) -> UInteger {
String_lengthOfBytesUsingEncoding :: proc "c" (self: ^String, encoding: StringEncoding) -> UInteger {
return msgSend(UInteger, self, "lengthOfBytesUsingEncoding:", encoding)
}
@(objc_type=String, objc_name="isEqualToString")
String_isEqualToString :: proc(self, other: ^String) -> BOOL {
String_isEqualToString :: proc "c" (self, other: ^String) -> BOOL {
return msgSend(BOOL, self, "isEqualToString:", other)
}
@(objc_type=String, objc_name="rangeOfString")
String_rangeOfString :: proc(self, other: ^String, options: StringCompareOptions) -> Range {
String_rangeOfString :: proc "c" (self, other: ^String, options: StringCompareOptions) -> Range {
return msgSend(Range, self, "rangeOfString:options:", other, options)
}
+5 -5
View File
@@ -5,26 +5,26 @@ URL :: struct{using _: Copying(URL)}
@(objc_type=URL, objc_name="alloc", objc_is_class_method=true)
URL_alloc :: proc() -> ^URL {
URL_alloc :: proc "c" () -> ^URL {
return msgSend(^URL, URL, "alloc")
}
@(objc_type=URL, objc_name="init")
URL_init :: proc(self: ^URL) -> ^URL {
URL_init :: proc "c" (self: ^URL) -> ^URL {
return msgSend(^URL, self, "init")
}
@(objc_type=URL, objc_name="initWithString")
URL_initWithString :: proc(self: ^URL, value: ^String) -> ^URL {
URL_initWithString :: proc "c" (self: ^URL, value: ^String) -> ^URL {
return msgSend(^URL, self, "initWithString:", value)
}
@(objc_type=URL, objc_name="initFileURLWithPath")
URL_initFileURLWithPath :: proc(self: ^URL, path: ^String) -> ^URL {
URL_initFileURLWithPath :: proc "c" (self: ^URL, path: ^String) -> ^URL {
return msgSend(^URL, self, "initFileURLWithPath:", path)
}
@(objc_type=URL, objc_name="fileSystemRepresentation")
URL_fileSystemRepresentation :: proc(self: ^URL) -> cstring {
URL_fileSystemRepresentation :: proc "c" (self: ^URL) -> cstring {
return msgSend(cstring, self, "fileSystemRepresentation")
}
+2 -2
View File
@@ -4,11 +4,11 @@ package objc_Foundation
UserDefaults :: struct { using _: Object }
@(objc_type=UserDefaults, objc_name="standardUserDefaults", objc_is_class_method=true)
UserDefaults_standardUserDefaults :: proc() -> ^UserDefaults {
UserDefaults_standardUserDefaults :: proc "c" () -> ^UserDefaults {
return msgSend(^UserDefaults, UserDefaults, "standardUserDefaults")
}
@(objc_type=UserDefaults, objc_name="setBoolForKey")
UserDefaults_setBoolForKey :: proc(self: ^UserDefaults, value: BOOL, name: ^String) {
UserDefaults_setBoolForKey :: proc "c" (self: ^UserDefaults, value: BOOL, name: ^String) {
msgSend(nil, self, "setBool:forKey:", value, name)
}
+77 -77
View File
@@ -53,75 +53,75 @@ BackingStoreType :: enum NS.UInteger {
WindowDelegateTemplate :: struct {
// Managing Sheets
windowWillPositionSheetUsingRect: proc(window: ^Window, sheet: ^Window, rect: Rect) -> Rect,
windowWillBeginSheet: proc(notification: ^Notification),
windowDidEndSheet: proc(notification: ^Notification),
windowWillPositionSheetUsingRect: proc(window: ^Window, sheet: ^Window, rect: Rect) -> Rect,
windowWillBeginSheet: proc(notification: ^Notification),
windowDidEndSheet: proc(notification: ^Notification),
// Sizing Windows
windowWillResizeToSize: proc(sender: ^Window, frameSize: Size) -> Size,
windowDidResize: proc(notification: ^Notification),
windowWillStartLiveResize: proc(noitifcation: ^Notification),
windowDidEndLiveResize: proc(notification: ^Notification),
windowWillResizeToSize: proc(sender: ^Window, frameSize: Size) -> Size,
windowDidResize: proc(notification: ^Notification),
windowWillStartLiveResize: proc(noitifcation: ^Notification),
windowDidEndLiveResize: proc(notification: ^Notification),
// Minimizing Windows
windowWillMiniaturize: proc(notification: ^Notification),
windowDidMiniaturize: proc(notification: ^Notification),
windowDidDeminiaturize: proc(notification: ^Notification),
windowWillMiniaturize: proc(notification: ^Notification),
windowDidMiniaturize: proc(notification: ^Notification),
windowDidDeminiaturize: proc(notification: ^Notification),
// Zooming window
windowWillUseStandardFrameDefaultFrame: proc(window: ^Window, newFrame: Rect) -> Rect,
windowShouldZoomToFrame: proc(window: ^Window, newFrame: Rect) -> BOOL,
windowWillUseStandardFrameDefaultFrame: proc(window: ^Window, newFrame: Rect) -> Rect,
windowShouldZoomToFrame: proc(window: ^Window, newFrame: Rect) -> BOOL,
// Managing Full-Screen Presentation
windowWillUseFullScreenContentSize: proc(window: ^Window, proposedSize: Size) -> Size,
windowWillUseFullScreenPresentationOptions: proc(window: ^Window, proposedOptions: ApplicationPresentationOptions) -> ApplicationPresentationOptions,
windowWillEnterFullScreen: proc(notification: ^Notification),
windowDidEnterFullScreen: proc(notification: ^Notification),
windowWillExitFullScreen: proc(notification: ^Notification),
windowDidExitFullScreen: proc(notification: ^Notification),
windowWillUseFullScreenContentSize: proc(window: ^Window, proposedSize: Size) -> Size,
windowWillUseFullScreenPresentationOptions: proc(window: ^Window, proposedOptions: ApplicationPresentationOptions) -> ApplicationPresentationOptions,
windowWillEnterFullScreen: proc(notification: ^Notification),
windowDidEnterFullScreen: proc(notification: ^Notification),
windowWillExitFullScreen: proc(notification: ^Notification),
windowDidExitFullScreen: proc(notification: ^Notification),
// Custom Full-Screen Presentation Animations
customWindowsToEnterFullScreenForWindow: proc(window: ^Window) -> ^Array,
customWindowsToEnterFullScreenForWindowOnScreen: proc(window: ^Window, screen: ^Screen) -> ^Array,
windowStartCustomAnimationToEnterFullScreenWithDuration: proc(window: ^Window, duration: TimeInterval),
windowStartCustomAnimationToEnterFullScreenOnScreenWithDuration: proc(window: ^Window, screen: ^Screen, duration: TimeInterval),
windowDidFailToEnterFullScreen: proc(window: ^Window),
customWindowsToExitFullScreenForWindow: proc(window: ^Window) -> ^Array,
windowStartCustomAnimationToExitFullScreenWithDuration: proc(window: ^Window, duration: TimeInterval),
windowDidFailToExitFullScreen: proc(window: ^Window),
customWindowsToEnterFullScreenForWindow: proc(window: ^Window) -> ^Array,
customWindowsToEnterFullScreenForWindowOnScreen: proc(window: ^Window, screen: ^Screen) -> ^Array,
windowStartCustomAnimationToEnterFullScreenWithDuration: proc(window: ^Window, duration: TimeInterval),
windowStartCustomAnimationToEnterFullScreenOnScreenWithDuration: proc(window: ^Window, screen: ^Screen, duration: TimeInterval),
windowDidFailToEnterFullScreen: proc(window: ^Window),
customWindowsToExitFullScreenForWindow: proc(window: ^Window) -> ^Array,
windowStartCustomAnimationToExitFullScreenWithDuration: proc(window: ^Window, duration: TimeInterval),
windowDidFailToExitFullScreen: proc(window: ^Window),
// Moving Windows
windowWillMove: proc(notification: ^Notification),
windowDidMove: proc(notification: ^Notification),
windowDidChangeScreen: proc(notification: ^Notification),
windowDidChangeScreenProfile: proc(notification: ^Notification),
windowDidChangeBackingProperties: proc(notification: ^Notification),
windowWillMove: proc(notification: ^Notification),
windowDidMove: proc(notification: ^Notification),
windowDidChangeScreen: proc(notification: ^Notification),
windowDidChangeScreenProfile: proc(notification: ^Notification),
windowDidChangeBackingProperties: proc(notification: ^Notification),
// Closing Windows
windowShouldClose: proc(sender: ^Window) -> BOOL,
windowWillClose: proc(notification: ^Notification),
windowShouldClose: proc(sender: ^Window) -> BOOL,
windowWillClose: proc(notification: ^Notification),
// Managing Key Status
windowDidBecomeKey: proc(notification: ^Notification),
windowDidResignKey: proc(notification: ^Notification),
windowDidBecomeKey: proc(notification: ^Notification),
windowDidResignKey: proc(notification: ^Notification),
// Managing Main Status
windowDidBecomeMain: proc(notification: ^Notification),
windowDidResignMain: proc(notification: ^Notification),
windowDidBecomeMain: proc(notification: ^Notification),
windowDidResignMain: proc(notification: ^Notification),
// Managing Field Editors
windowWillReturnFieldEditorToObject: proc(sender: ^Window, client: id) -> id,
windowWillReturnFieldEditorToObject: proc(sender: ^Window, client: id) -> id,
// Updating Windows
windowDidUpdate: proc (notification: ^Notification),
windowDidUpdate: proc (notification: ^Notification),
// Exposing Windows
windowDidExpose: proc (notification: ^Notification),
windowDidExpose: proc (notification: ^Notification),
// Managing Occlusion State
windowDidChangeOcclusionState: proc(notification: ^Notification),
windowDidChangeOcclusionState: proc(notification: ^Notification),
// Dragging Windows
windowShouldDragDocumentWithEventFromWithPasteboard: proc(window: ^Window, event: ^Event, dragImageLocation: Point, pasteboard: ^Pasteboard) -> BOOL,
windowShouldDragDocumentWithEventFromWithPasteboard: proc(window: ^Window, event: ^Event, dragImageLocation: Point, pasteboard: ^Pasteboard) -> BOOL,
// Getting the Undo Manager
windowWillReturnUndoManager: proc(window: ^Window) -> ^UndoManager,
windowWillReturnUndoManager: proc(window: ^Window) -> ^UndoManager,
// Managing Titles
windowShouldPopUpDocumentPathMenu: proc(window: ^Window, menu: ^Menu) -> BOOL,
windowShouldPopUpDocumentPathMenu: proc(window: ^Window, menu: ^Menu) -> BOOL,
// Managing Restorable State
windowWillEncodeRestorableState: proc(window: ^Window, state: ^Coder),
windowDidEncodeRestorableState: proc(window: ^Window, state: ^Coder),
windowWillEncodeRestorableState: proc(window: ^Window, state: ^Coder),
windowDidEncodeRestorableState: proc(window: ^Window, state: ^Coder),
// Managing Presentation in Version Browsers
windowWillResizeForVersionBrowserWithMaxPreferredSizeMaxAllowedSize: proc(window: ^Window, maxPreferredFrameSize: Size, maxAllowedFrameSize: Size) -> Size,
windowWillEnterVersionBrowser: proc(notification: ^Notification),
windowDidEnterVersionBrowser: proc(notification: ^Notification),
windowWillExitVersionBrowser: proc(notification: ^Notification),
windowDidExitVersionBrowser: proc(notification: ^Notification),
windowWillEnterVersionBrowser: proc(notification: ^Notification),
windowDidEnterVersionBrowser: proc(notification: ^Notification),
windowWillExitVersionBrowser: proc(notification: ^Notification),
windowDidExitVersionBrowser: proc(notification: ^Notification),
}
WindowDelegate :: struct { using _: Object }
@@ -562,19 +562,19 @@ Color :: struct {using _: Object}
Layer :: struct { using _: NS.Object }
@(objc_type=Layer, objc_name="contentsScale")
Layer_contentsScale :: proc(self: ^Layer) -> Float {
Layer_contentsScale :: proc "c" (self: ^Layer) -> Float {
return msgSend(Float, self, "contentsScale")
}
@(objc_type=Layer, objc_name="setContentsScale")
Layer_setContentsScale :: proc(self: ^Layer, scale: Float) {
Layer_setContentsScale :: proc "c" (self: ^Layer, scale: Float) {
msgSend(nil, self, "setContentsScale:", scale)
}
@(objc_type=Layer, objc_name="frame")
Layer_frame :: proc(self: ^Layer) -> Rect {
Layer_frame :: proc "c" (self: ^Layer) -> Rect {
return msgSend(Rect, self, "frame")
}
@(objc_type=Layer, objc_name="addSublayer")
Layer_addSublayer :: proc(self: ^Layer, layer: ^Layer) {
Layer_addSublayer :: proc "c" (self: ^Layer, layer: ^Layer) {
msgSend(nil, self, "addSublayer:", layer)
}
@@ -586,23 +586,23 @@ View :: struct {using _: Responder}
@(objc_type=View, objc_name="initWithFrame")
View_initWithFrame :: proc(self: ^View, frame: Rect) -> ^View {
View_initWithFrame :: proc "c" (self: ^View, frame: Rect) -> ^View {
return msgSend(^View, self, "initWithFrame:", frame)
}
@(objc_type=View, objc_name="layer")
View_layer :: proc(self: ^View) -> ^Layer {
View_layer :: proc "c" (self: ^View) -> ^Layer {
return msgSend(^Layer, self, "layer")
}
@(objc_type=View, objc_name="setLayer")
View_setLayer :: proc(self: ^View, layer: ^Layer) {
View_setLayer :: proc "c" (self: ^View, layer: ^Layer) {
msgSend(nil, self, "setLayer:", layer)
}
@(objc_type=View, objc_name="wantsLayer")
View_wantsLayer :: proc(self: ^View) -> BOOL {
View_wantsLayer :: proc "c" (self: ^View) -> BOOL {
return msgSend(BOOL, self, "wantsLayer")
}
@(objc_type=View, objc_name="setWantsLayer")
View_setWantsLayer :: proc(self: ^View, wantsLayer: BOOL) {
View_setWantsLayer :: proc "c" (self: ^View, wantsLayer: BOOL) {
msgSend(nil, self, "setWantsLayer:", wantsLayer)
}
@@ -610,7 +610,7 @@ View_setWantsLayer :: proc(self: ^View, wantsLayer: BOOL) {
Window :: struct {using _: Responder}
@(objc_type=Window, objc_name="alloc", objc_is_class_method=true)
Window_alloc :: proc() -> ^Window {
Window_alloc :: proc "c" () -> ^Window {
return msgSend(^Window, Window, "alloc")
}
@@ -630,70 +630,70 @@ Window_initWithContentRect :: proc (self: ^Window, contentRect: Rect, styleMask:
return self
}
@(objc_type=Window, objc_name="contentView")
Window_contentView :: proc(self: ^Window) -> ^View {
Window_contentView :: proc "c" (self: ^Window) -> ^View {
return msgSend(^View, self, "contentView")
}
@(objc_type=Window, objc_name="setContentView")
Window_setContentView :: proc(self: ^Window, content_view: ^View) {
Window_setContentView :: proc "c" (self: ^Window, content_view: ^View) {
msgSend(nil, self, "setContentView:", content_view)
}
@(objc_type=Window, objc_name="contentLayoutRect")
Window_contentLayoutRect :: proc(self: ^Window) -> Rect {
Window_contentLayoutRect :: proc "c" (self: ^Window) -> Rect {
return msgSend(Rect, self, "contentLayoutRect")
}
@(objc_type=Window, objc_name="frame")
Window_frame :: proc(self: ^Window) -> Rect {
Window_frame :: proc "c" (self: ^Window) -> Rect {
return msgSend(Rect, self, "frame")
}
@(objc_type=Window, objc_name="setFrame")
Window_setFrame :: proc(self: ^Window, frame: Rect) {
Window_setFrame :: proc "c" (self: ^Window, frame: Rect) {
msgSend(nil, self, "setFrame:", frame)
}
@(objc_type=Window, objc_name="opaque")
Window_opaque :: proc(self: ^Window) -> NS.BOOL {
Window_opaque :: proc "c" (self: ^Window) -> NS.BOOL {
return msgSend(NS.BOOL, self, "opaque")
}
@(objc_type=Window, objc_name="setOpaque")
Window_setOpaque :: proc(self: ^Window, ok: NS.BOOL) {
Window_setOpaque :: proc "c" (self: ^Window, ok: NS.BOOL) {
msgSend(nil, self, "setOpaque:", ok)
}
@(objc_type=Window, objc_name="backgroundColor")
Window_backgroundColor :: proc(self: ^Window) -> ^NS.Color {
Window_backgroundColor :: proc "c" (self: ^Window) -> ^NS.Color {
return msgSend(^NS.Color, self, "backgroundColor")
}
@(objc_type=Window, objc_name="setBackgroundColor")
Window_setBackgroundColor :: proc(self: ^Window, color: ^NS.Color) {
Window_setBackgroundColor :: proc "c" (self: ^Window, color: ^NS.Color) {
msgSend(nil, self, "setBackgroundColor:", color)
}
@(objc_type=Window, objc_name="makeKeyAndOrderFront")
Window_makeKeyAndOrderFront :: proc(self: ^Window, key: ^NS.Object) {
Window_makeKeyAndOrderFront :: proc "c" (self: ^Window, key: ^NS.Object) {
msgSend(nil, self, "makeKeyAndOrderFront:", key)
}
@(objc_type=Window, objc_name="setTitle")
Window_setTitle :: proc(self: ^Window, title: ^NS.String) {
Window_setTitle :: proc "c" (self: ^Window, title: ^NS.String) {
msgSend(nil, self, "setTitle:", title)
}
@(objc_type=Window, objc_name="setTitlebarAppearsTransparent")
Window_setTitlebarAppearsTransparent :: proc(self: ^Window, ok: NS.BOOL) {
Window_setTitlebarAppearsTransparent :: proc "c" (self: ^Window, ok: NS.BOOL) {
msgSend(nil, self, "setTitlebarAppearsTransparent:", ok)
}
@(objc_type=Window, objc_name="setMovable")
Window_setMovable :: proc(self: ^Window, ok: NS.BOOL) {
Window_setMovable :: proc "c" (self: ^Window, ok: NS.BOOL) {
msgSend(nil, self, "setMovable:", ok)
}
@(objc_type=Window, objc_name="setMovableByWindowBackground")
Window_setMovableByWindowBackground :: proc(self: ^Window, ok: NS.BOOL) {
Window_setMovableByWindowBackground :: proc "c" (self: ^Window, ok: NS.BOOL) {
msgSend(nil, self, "setMovableByWindowBackground:", ok)
}
@(objc_type=Window, objc_name="setStyleMask")
Window_setStyleMask :: proc(self: ^Window, style_mask: WindowStyleMask) {
Window_setStyleMask :: proc "c" (self: ^Window, style_mask: WindowStyleMask) {
msgSend(nil, self, "setStyleMask:", style_mask)
}
@(objc_type=Window, objc_name="close")
Window_close :: proc(self: ^Window) {
Window_close :: proc "c" (self: ^Window) {
msgSend(nil, self, "close")
}
@(objc_type=Window, objc_name="setDelegate")
Window_setDelegate :: proc(self: ^Window, delegate: ^WindowDelegate) {
Window_setDelegate :: proc "c" (self: ^Window, delegate: ^WindowDelegate) {
msgSend(nil, self, "setDelegate:", delegate)
}
+3 -3
View File
@@ -13,12 +13,12 @@ foreign Foundation {
objc_allocateClassPair :: proc "c" (superclass : Class, name : cstring, extraBytes : c.size_t) -> Class ---
objc_registerClassPair :: proc "c" (cls : Class) ---
class_addMethod :: proc "c" (cls: Class, name: SEL, imp: IMP, types: cstring) -> BOOL ---
class_addMethod :: proc "c" (cls: Class, name: SEL, imp: IMP, types: cstring) -> BOOL ---
class_getInstanceMethod :: proc "c" (cls: Class, name: SEL) -> Method ---
class_createInstance :: proc "c" (cls: Class, extraBytes: c.size_t) -> id ---
class_createInstance :: proc "c" (cls: Class, extraBytes: c.size_t) -> id ---
method_setImplementation :: proc "c" (method: Method, imp: IMP) ---
object_getIndexedIvars :: proc(obj: id) -> rawptr ---
object_getIndexedIvars :: proc(obj: id) -> rawptr ---
}
+1575 -1559
View File
File diff suppressed because it is too large Load Diff
+47 -47
View File
@@ -24,34 +24,34 @@ ViewDelegate :: struct {
View :: struct {using _: NS.View}
@(objc_type=View, objc_name="alloc", objc_is_class_method=true)
View_alloc :: proc() -> ^View {
View_alloc :: proc "c" () -> ^View {
return msgSend(^View, View, "alloc")
}
@(objc_type=View, objc_name="initWithFrame")
View_initWithFrame :: proc(self: ^View, frame: NS.Rect, device: ^MTL.Device) -> ^View {
View_initWithFrame :: proc "c" (self: ^View, frame: NS.Rect, device: ^MTL.Device) -> ^View {
return msgSend(^View, self, "initWithFrame:device:", frame, device)
}
@(objc_type=View, objc_name="initWithCoder")
View_initWithCoder :: proc(self: ^View, coder: ^NS.Coder) -> ^View {
View_initWithCoder :: proc "c" (self: ^View, coder: ^NS.Coder) -> ^View {
return msgSend(^View, self, "initWithCoder:", coder)
}
@(objc_type=View, objc_name="setDevice")
View_setDevice :: proc(self: ^View, device: ^MTL.Device) {
View_setDevice :: proc "c" (self: ^View, device: ^MTL.Device) {
msgSend(nil, self, "setDevice:", device)
}
@(objc_type=View, objc_name="device")
View_device :: proc(self: ^View) -> ^MTL.Device {
View_device :: proc "c" (self: ^View) -> ^MTL.Device {
return msgSend(^MTL.Device, self, "device")
}
@(objc_type=View, objc_name="draw")
View_draw :: proc(self: ^View) {
View_draw :: proc "c" (self: ^View) {
msgSend(nil, self, "draw")
}
@(objc_type=View, objc_name="setDelegate")
View_setDelegate :: proc(self: ^View, delegate: ^ViewDelegate) {
View_setDelegate :: proc "c" (self: ^View, delegate: ^ViewDelegate) {
drawDispatch :: proc "c" (self: ^NS.Value, cmd: NS.SEL, view: ^View) {
del := (^ViewDelegate)(self->pointerValue())
del->drawInMTKView(view)
@@ -72,7 +72,7 @@ View_setDelegate :: proc(self: ^View, delegate: ^ViewDelegate) {
}
@(objc_type=View, objc_name="delegate")
View_delegate :: proc(self: ^View) -> ^ViewDelegate {
View_delegate :: proc "c" (self: ^View) -> ^ViewDelegate {
wrapper := msgSend(^NS.Value, self, "delegate")
if wrapper != nil {
return (^ViewDelegate)(wrapper->pointerValue())
@@ -81,179 +81,179 @@ View_delegate :: proc(self: ^View) -> ^ViewDelegate {
}
@(objc_type=View, objc_name="currentDrawable")
View_currentDrawable :: proc(self: ^View) -> ^CA.MetalDrawable {
View_currentDrawable :: proc "c" (self: ^View) -> ^CA.MetalDrawable {
return msgSend(^CA.MetalDrawable, self, "currentDrawable")
}
@(objc_type=View, objc_name="setFramebufferOnly")
View_setFramebufferOnly :: proc(self: ^View, framebufferOnly: bool) {
View_setFramebufferOnly :: proc "c" (self: ^View, framebufferOnly: bool) {
msgSend(nil, self, "setFramebufferOnly:", framebufferOnly)
}
@(objc_type=View, objc_name="framebufferOnly")
View_framebufferOnly :: proc(self: ^View) -> bool {
View_framebufferOnly :: proc "c" (self: ^View) -> bool {
return msgSend(bool, self, "framebufferOnly")
}
@(objc_type=View, objc_name="setDepthStencilAttachmentTextureUsage")
View_setDepthStencilAttachmentTextureUsage :: proc(self: ^View, textureUsage: MTL.TextureUsage) {
View_setDepthStencilAttachmentTextureUsage :: proc "c" (self: ^View, textureUsage: MTL.TextureUsage) {
msgSend(nil, self, "setDepthStencilAttachmentTextureUsage:", textureUsage)
}
@(objc_type=View, objc_name="depthStencilAttachmentTextureUsage")
View_depthStencilAttachmentTextureUsage :: proc(self: ^View) -> MTL.TextureUsage {
View_depthStencilAttachmentTextureUsage :: proc "c" (self: ^View) -> MTL.TextureUsage {
return msgSend(MTL.TextureUsage, self, "depthStencilAttachmentTextureUsage")
}
@(objc_type=View, objc_name="setMultisampleColorAttachmentTextureUsage")
View_setMultisampleColorAttachmentTextureUsage :: proc(self: ^View, textureUsage: MTL.TextureUsage) {
View_setMultisampleColorAttachmentTextureUsage :: proc "c" (self: ^View, textureUsage: MTL.TextureUsage) {
msgSend(nil, self, "setMultisampleColorAttachmentTextureUsage:", textureUsage)
}
@(objc_type=View, objc_name="multisampleColorAttachmentTextureUsage")
View_multisampleColorAttachmentTextureUsage :: proc(self: ^View) -> MTL.TextureUsage {
View_multisampleColorAttachmentTextureUsage :: proc "c" (self: ^View) -> MTL.TextureUsage {
return msgSend(MTL.TextureUsage, self, "multisampleColorAttachmentTextureUsage")
}
@(objc_type=View, objc_name="setPresentsWithTransaction")
View_setPresentsWithTransaction :: proc(self: ^View, presentsWithTransaction: bool) {
View_setPresentsWithTransaction :: proc "c" (self: ^View, presentsWithTransaction: bool) {
msgSend(nil, self, "setPresentsWithTransaction:", presentsWithTransaction)
}
@(objc_type=View, objc_name="presentsWithTransaction")
View_presentsWithTransaction :: proc(self: ^View) -> bool {
View_presentsWithTransaction :: proc "c" (self: ^View) -> bool {
return msgSend(bool, self, "presentsWithTransaction")
}
@(objc_type=View, objc_name="setColorPixelFormat")
View_setColorPixelFormat :: proc(self: ^View, colorPixelFormat: MTL.PixelFormat) {
View_setColorPixelFormat :: proc "c" (self: ^View, colorPixelFormat: MTL.PixelFormat) {
msgSend(nil, self, "setColorPixelFormat:", colorPixelFormat)
}
@(objc_type=View, objc_name="colorPixelFormat")
View_colorPixelFormat :: proc(self: ^View) -> MTL.PixelFormat {
View_colorPixelFormat :: proc "c" (self: ^View) -> MTL.PixelFormat {
return msgSend(MTL.PixelFormat, self, "colorPixelFormat")
}
@(objc_type=View, objc_name="setDepthStencilPixelFormat")
View_setDepthStencilPixelFormat :: proc(self: ^View, colorPixelFormat: MTL.PixelFormat) {
View_setDepthStencilPixelFormat :: proc "c" (self: ^View, colorPixelFormat: MTL.PixelFormat) {
msgSend(nil, self, "setDepthStencilPixelFormat:", colorPixelFormat)
}
@(objc_type=View, objc_name="depthStencilPixelFormat")
View_depthStencilPixelFormat :: proc(self: ^View) -> MTL.PixelFormat {
View_depthStencilPixelFormat :: proc "c" (self: ^View) -> MTL.PixelFormat {
return msgSend(MTL.PixelFormat, self, "depthStencilPixelFormat")
}
@(objc_type=View, objc_name="setSampleCount")
View_setSampleCount :: proc(self: ^View, sampleCount: NS.UInteger) {
View_setSampleCount :: proc "c" (self: ^View, sampleCount: NS.UInteger) {
msgSend(nil, self, "setSampleCount:", sampleCount)
}
@(objc_type=View, objc_name="sampleCount")
View_sampleCount :: proc(self: ^View) -> NS.UInteger {
View_sampleCount :: proc "c" (self: ^View) -> NS.UInteger {
return msgSend(NS.UInteger, self, "sampleCount")
}
@(objc_type=View, objc_name="setClearColor")
View_setClearColor :: proc(self: ^View, clearColor: MTL.ClearColor) {
View_setClearColor :: proc "c" (self: ^View, clearColor: MTL.ClearColor) {
msgSend(nil, self, "setClearColor:", clearColor)
}
@(objc_type=View, objc_name="clearColor")
View_clearColor :: proc(self: ^View) -> MTL.ClearColor {
View_clearColor :: proc "c" (self: ^View) -> MTL.ClearColor {
return msgSend(MTL.ClearColor, self, "clearColor")
}
@(objc_type=View, objc_name="setClearDepth")
View_setClearDepth :: proc(self: ^View, clearDepth: f64) {
View_setClearDepth :: proc "c" (self: ^View, clearDepth: f64) {
msgSend(nil, self, "setClearDepth:", clearDepth)
}
@(objc_type=View, objc_name="clearDepth")
View_clearDepth :: proc(self: ^View) -> f64 {
View_clearDepth :: proc "c" (self: ^View) -> f64 {
return msgSend(f64, self, "clearDepth")
}
@(objc_type=View, objc_name="setClearStencil")
View_setClearStencil :: proc(self: ^View, clearStencil: u32) {
View_setClearStencil :: proc "c" (self: ^View, clearStencil: u32) {
msgSend(nil, self, "setClearStencil:", clearStencil)
}
@(objc_type=View, objc_name="clearStencil")
View_clearStencil :: proc(self: ^View) -> u32 {
View_clearStencil :: proc "c" (self: ^View) -> u32 {
return msgSend(u32, self, "clearStencil")
}
@(objc_type=View, objc_name="depthStencilTexture")
View_depthStencilTexture :: proc(self: ^View) -> ^MTL.Texture {
View_depthStencilTexture :: proc "c" (self: ^View) -> ^MTL.Texture {
return msgSend(^MTL.Texture, self, "depthStencilTexture")
}
@(objc_type=View, objc_name="multisampleColorTexture")
View_multisampleColorTexture :: proc(self: ^View) -> ^MTL.Texture {
View_multisampleColorTexture :: proc "c" (self: ^View) -> ^MTL.Texture {
return msgSend(^MTL.Texture, self, "multisampleColorTexture")
}
@(objc_type=View, objc_name="releaseDrawables")
View_releaseDrawables :: proc(self: ^View) {
View_releaseDrawables :: proc "c" (self: ^View) {
msgSend(nil, self, "releaseDrawables")
}
@(objc_type=View, objc_name="currentRenderPassDescriptor")
View_currentRenderPassDescriptor :: proc(self: ^View) -> ^MTL.RenderPassDescriptor {
View_currentRenderPassDescriptor :: proc "c" (self: ^View) -> ^MTL.RenderPassDescriptor {
return msgSend(^MTL.RenderPassDescriptor, self, "currentRenderPassDescriptor")
}
@(objc_type=View, objc_name="setPreferredFramesPerSecond")
View_setPreferredFramesPerSecond :: proc(self: ^View, preferredFramesPerSecond: NS.Integer) {
View_setPreferredFramesPerSecond :: proc "c" (self: ^View, preferredFramesPerSecond: NS.Integer) {
msgSend(nil, self, "setPreferredFramesPerSecond:", preferredFramesPerSecond)
}
@(objc_type=View, objc_name="preferredFramesPerSecond")
View_preferredFramesPerSecond :: proc(self: ^View) -> NS.Integer {
View_preferredFramesPerSecond :: proc "c" (self: ^View) -> NS.Integer {
return msgSend(NS.Integer, self, "preferredFramesPerSecond")
}
@(objc_type=View, objc_name="setEnableSetNeedsDisplay")
View_setEnableSetNeedsDisplay :: proc(self: ^View, enableSetNeedsDisplay: bool) {
View_setEnableSetNeedsDisplay :: proc "c" (self: ^View, enableSetNeedsDisplay: bool) {
msgSend(nil, self, "setEnableSetNeedsDisplay:", enableSetNeedsDisplay)
}
@(objc_type=View, objc_name="enableSetNeedsDisplay")
View_enableSetNeedsDisplay :: proc(self: ^View) -> bool {
View_enableSetNeedsDisplay :: proc "c" (self: ^View) -> bool {
return msgSend(bool, self, "enableSetNeedsDisplay")
}
@(objc_type=View, objc_name="setAutoresizeDrawable")
View_setAutoresizeDrawable :: proc(self: ^View, autoresizeDrawable: bool) {
View_setAutoresizeDrawable :: proc "c" (self: ^View, autoresizeDrawable: bool) {
msgSend(nil, self, "setAutoresizeDrawable:", autoresizeDrawable)
}
@(objc_type=View, objc_name="autoresizeDrawable")
View_autoresizeDrawable :: proc(self: ^View) -> bool {
View_autoresizeDrawable :: proc "c" (self: ^View) -> bool {
return msgSend(bool, self, "autoresizeDrawable")
}
@(objc_type=View, objc_name="setDrawableSize")
View_setDrawableSize :: proc(self: ^View, drawableSize: NS.Size) {
View_setDrawableSize :: proc "c" (self: ^View, drawableSize: NS.Size) {
msgSend(nil, self, "setDrawableSize:", drawableSize)
}
@(objc_type=View, objc_name="drawableSize")
View_drawableSize :: proc(self: ^View) -> NS.Size {
View_drawableSize :: proc "c" (self: ^View) -> NS.Size {
return msgSend(NS.Size, self, "drawableSize")
}
@(objc_type=View, objc_name="preferredDrawableSize")
View_preferredDrawableSize :: proc(self: ^View) -> NS.Size {
View_preferredDrawableSize :: proc "c" (self: ^View) -> NS.Size {
return msgSend(NS.Size, self, "preferredDrawableSize")
}
@(objc_type=View, objc_name="preferredDevice")
View_preferredDevice :: proc(self: ^View) -> ^MTL.Device {
View_preferredDevice :: proc "c" (self: ^View) -> ^MTL.Device {
return msgSend(^MTL.Device, self, "preferredDevice")
}
@(objc_type=View, objc_name="setPaused")
View_setPaused :: proc(self: ^View, isPaused: bool) {
View_setPaused :: proc "c" (self: ^View, isPaused: bool) {
msgSend(nil, self, "setPaused:", isPaused)
}
@(objc_type=View, objc_name="isPaused")
View_isPaused :: proc(self: ^View) -> bool {
View_isPaused :: proc "c" (self: ^View) -> bool {
return msgSend(bool, self, "isPaused")
}
@(objc_type=View, objc_name="setColorSpace")
View_setColorSpace :: proc(self: ^View, colorSpace: ColorSpaceRef) {
View_setColorSpace :: proc "c" (self: ^View, colorSpace: ColorSpaceRef) {
msgSend(nil, self, "setColorSpace:", colorSpace)
}
@(objc_type=View, objc_name="colorSpace")
View_colorSpace :: proc(self: ^View) -> ColorSpaceRef {
View_colorSpace :: proc "c" (self: ^View) -> ColorSpaceRef {
return msgSend(ColorSpaceRef, self, "colorSpace")
}
+17 -17
View File
@@ -11,74 +11,74 @@ msgSend :: intrinsics.objc_send
MetalLayer :: struct{ using _: NS.Layer}
@(objc_type=MetalLayer, objc_name="layer", objc_is_class_method=true)
MetalLayer_layer :: proc() -> ^MetalLayer {
MetalLayer_layer :: proc "c" () -> ^MetalLayer {
return msgSend(^MetalLayer, MetalLayer, "layer")
}
@(objc_type=MetalLayer, objc_name="device")
MetalLayer_device :: proc(self: ^MetalLayer) -> ^MTL.Device {
MetalLayer_device :: proc "c" (self: ^MetalLayer) -> ^MTL.Device {
return msgSend(^MTL.Device, self, "device")
}
@(objc_type=MetalLayer, objc_name="setDevice")
MetalLayer_setDevice :: proc(self: ^MetalLayer, device: ^MTL.Device) {
MetalLayer_setDevice :: proc "c" (self: ^MetalLayer, device: ^MTL.Device) {
msgSend(nil, self, "setDevice:", device)
}
@(objc_type=MetalLayer, objc_name="opaque")
MetalLayer_opaque :: proc(self: ^MetalLayer) -> NS.BOOL {
MetalLayer_opaque :: proc "c" (self: ^MetalLayer) -> NS.BOOL {
return msgSend(NS.BOOL, self, "opaque")
}
@(objc_type=MetalLayer, objc_name="setOpaque")
MetalLayer_setOpaque :: proc(self: ^MetalLayer, opaque: NS.BOOL) {
MetalLayer_setOpaque :: proc "c" (self: ^MetalLayer, opaque: NS.BOOL) {
msgSend(nil, self, "setOpaque:", opaque)
}
@(objc_type=MetalLayer, objc_name="preferredDevice")
MetalLayer_preferredDevice :: proc(self: ^MetalLayer) -> ^MTL.Device {
MetalLayer_preferredDevice :: proc "c" (self: ^MetalLayer) -> ^MTL.Device {
return msgSend(^MTL.Device, self, "preferredDevice")
}
@(objc_type=MetalLayer, objc_name="pixelFormat")
MetalLayer_pixelFormat :: proc(self: ^MetalLayer) -> MTL.PixelFormat {
MetalLayer_pixelFormat :: proc "c" (self: ^MetalLayer) -> MTL.PixelFormat {
return msgSend(MTL.PixelFormat, self, "pixelFormat")
}
@(objc_type=MetalLayer, objc_name="setPixelFormat")
MetalLayer_setPixelFormat :: proc(self: ^MetalLayer, pixelFormat: MTL.PixelFormat) {
MetalLayer_setPixelFormat :: proc "c" (self: ^MetalLayer, pixelFormat: MTL.PixelFormat) {
msgSend(nil, self, "setPixelFormat:", pixelFormat)
}
@(objc_type=MetalLayer, objc_name="framebufferOnly")
MetalLayer_framebufferOnly :: proc(self: ^MetalLayer) -> NS.BOOL {
MetalLayer_framebufferOnly :: proc "c" (self: ^MetalLayer) -> NS.BOOL {
return msgSend(NS.BOOL, self, "framebufferOnly")
}
@(objc_type=MetalLayer, objc_name="setFramebufferOnly")
MetalLayer_setFramebufferOnly :: proc(self: ^MetalLayer, ok: NS.BOOL) {
MetalLayer_setFramebufferOnly :: proc "c" (self: ^MetalLayer, ok: NS.BOOL) {
msgSend(nil, self, "setFramebufferOnly:", ok)
}
@(objc_type=MetalLayer, objc_name="drawableSize")
MetalLayer_drawableSize :: proc(self: ^MetalLayer) -> NS.Size {
MetalLayer_drawableSize :: proc "c" (self: ^MetalLayer) -> NS.Size {
return msgSend(NS.Size, self, "drawableSize")
}
@(objc_type=MetalLayer, objc_name="setDrawableSize")
MetalLayer_setDrawableSize :: proc(self: ^MetalLayer, drawableSize: NS.Size) {
MetalLayer_setDrawableSize :: proc "c" (self: ^MetalLayer, drawableSize: NS.Size) {
msgSend(nil, self, "setDrawableSize:", drawableSize)
}
@(objc_type=MetalLayer, objc_name="frame")
MetalLayer_frame :: proc(self: ^MetalLayer) -> NS.Rect {
MetalLayer_frame :: proc "c" (self: ^MetalLayer) -> NS.Rect {
return msgSend(NS.Rect, self, "frame")
}
@(objc_type=MetalLayer, objc_name="setFrame")
MetalLayer_setFrame :: proc(self: ^MetalLayer, frame: NS.Rect) {
MetalLayer_setFrame :: proc "c" (self: ^MetalLayer, frame: NS.Rect) {
msgSend(nil, self, "setFrame:", frame)
}
@(objc_type=MetalLayer, objc_name="nextDrawable")
MetalLayer_nextDrawable :: proc(self: ^MetalLayer) -> ^MetalDrawable {
MetalLayer_nextDrawable :: proc "c" (self: ^MetalLayer) -> ^MetalDrawable {
return msgSend(^MetalDrawable, self, "nextDrawable")
}
@@ -88,11 +88,11 @@ MetalLayer_nextDrawable :: proc(self: ^MetalLayer) -> ^MetalDrawable {
MetalDrawable :: struct { using _: MTL.Drawable }
@(objc_type=MetalDrawable, objc_name="layer")
MetalDrawable_layer :: proc(self: ^MetalDrawable) -> ^MetalLayer {
MetalDrawable_layer :: proc "c" (self: ^MetalDrawable) -> ^MetalLayer {
return msgSend(^MetalLayer, self, "layer")
}
@(objc_type=MetalDrawable, objc_name="texture")
MetalDrawable_texture :: proc(self: ^MetalDrawable) -> ^MTL.Texture {
MetalDrawable_texture :: proc "c" (self: ^MetalDrawable) -> ^MTL.Texture {
return msgSend(^MTL.Texture, self, "texture")
}
+2
View File
@@ -1992,6 +1992,8 @@ ROOT_SIGNATURE_FLAG :: enum u32 {
LOCAL_ROOT_SIGNATURE = 7,
DENY_AMPLIFICATION_SHADER_ROOT_ACCESS = 8,
DENY_MESH_SHADER_ROOT_ACCESS = 9,
CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED = 10,
SAMPLER_HEAP_DIRECTLY_INDEXED = 11,
}
STATIC_BORDER_COLOR :: enum i32 {
+4 -4
View File
@@ -375,7 +375,7 @@ MAPPED_RECT :: struct {
}
ADAPTER_DESC :: struct {
Description: [128]i16,
Description: [128]u16 `fmt:"s,0"`,
VendorId: u32,
DeviceId: u32,
SubSysId: u32,
@@ -387,7 +387,7 @@ ADAPTER_DESC :: struct {
}
OUTPUT_DESC :: struct {
DeviceName: [32]i16,
DeviceName: [32]u16 `fmt:"s,0"`,
DesktopCoordinates: RECT,
AttachedToDesktop: BOOL,
Rotation: MODE_ROTATION,
@@ -613,7 +613,7 @@ ADAPTER_FLAG :: enum u32 { // TODO: convert to bit_set
}
ADAPTER_DESC1 :: struct {
Description: [128]i16,
Description: [128]u16 `fmt:"s,0"`,
VendorId: u32,
DeviceId: u32,
SubSysId: u32,
@@ -890,7 +890,7 @@ COMPUTE_PREEMPTION_GRANULARITY :: enum i32 {
}
ADAPTER_DESC2 :: struct {
Description: [128]i16,
Description: [128]u16 `fmt:"s,0"`,
VendorId: u32,
DeviceId: u32,
SubSysId: u32,
+1 -1
View File
@@ -38,7 +38,7 @@ GLOBALSINDEX :: -10002
** space (and to reserve some numbers for pseudo-indices).
** (It must fit into max(size_t)/32.)
*/
MAXSTACK :: 1000000 when size_of(rawptr) == 4 else 15000
MAXSTACK :: 1000000
/*
+1 -1
View File
@@ -44,7 +44,7 @@ REGISTRYINDEX :: -FIRSTPSEUDOIDX
** space (and to reserve some numbers for pseudo-indices).
** (It must fit into max(size_t)/32.)
*/
MAXSTACK :: 1000000 when size_of(rawptr) == 4 else 15000
MAXSTACK :: 1000000
/*
+1 -1
View File
@@ -42,7 +42,7 @@ REGISTRYINDEX :: -MAXSTACK - 1000
** space (and to reserve some numbers for pseudo-indices).
** (It must fit into max(size_t)/32.)
*/
MAXSTACK :: 1000000 when size_of(rawptr) == 4 else 15000
MAXSTACK :: 1000000
/*
+1 -1
View File
@@ -44,7 +44,7 @@ REGISTRYINDEX :: -MAXSTACK - 1000
** space (and to reserve some numbers for pseudo-indices).
** (It must fit into max(size_t)/32.)
*/
MAXSTACK :: 1000000 when size_of(rawptr) >= 4 else 15000
MAXSTACK :: 1000000
/*
+1 -1
View File
@@ -200,7 +200,7 @@ fontinfo :: struct {
numGlyphs: c.int,
loca, head, glyf, hhea, hmtx, kern: c.int,
loca, head, glyf, hhea, hmtx, kern, gpos, svg: c.int,
index_map: c.int,
indexToLocFormat: c.int,
+72 -25
View File
@@ -16,6 +16,11 @@ file_and_urls = [
("vulkan_macos.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vulkan/vulkan_macos.h', False),
("vulkan_ios.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vulkan/vulkan_ios.h', False),
("vulkan_wayland.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vulkan/vulkan_wayland.h', False),
# Vulkan Video
("vulkan_video_codec_h264std.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vk_video/vulkan_video_codec_h264std.h', False),
("vulkan_video_codec_h265std.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vk_video/vulkan_video_codec_h265std.h', False),
("vulkan_video_codec_h264std_decode.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vk_video/vulkan_video_codec_h264std_decode.h', False),
("vulkan_video_codec_h265std_decode.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vk_video/vulkan_video_codec_h265std_decode.h', False),
]
for file, url, _ in file_and_urls:
@@ -37,11 +42,15 @@ def no_vk(t):
t = t.replace('PFN_', 'Proc')
t = t.replace('PFN_', 'Proc')
t = t.replace('VK_', '')
# Vulkan Video
t = t.replace('STD_', '')
t = t.replace('Std', '')
return t
OPAQUE_STRUCTS = """
wl_surface :: struct {} // Opaque struct defined by Wayland
wl_display :: struct {} // Opaque struct defined by Wayland
wl_surface :: struct {} // Opaque struct defined by Wayland
wl_display :: struct {} // Opaque struct defined by Wayland
IOSurfaceRef :: struct {} // Opaque struct defined by Apples CoreGraphics framework
"""
def convert_type(t, prev_name, curr_name):
@@ -56,6 +65,7 @@ def convert_type(t, prev_name, curr_name):
'int64_t': 'i64',
'int': 'c.int',
'uint8_t': 'u8',
'int8_t': 'i8',
"uint16_t": 'u16',
"char": "byte",
"void": "void",
@@ -70,6 +80,7 @@ def convert_type(t, prev_name, curr_name):
"const void* const *": "[^]rawptr",
"const AccelerationStructureGeometryKHR* const*": "^[^]AccelerationStructureGeometryKHR",
"const AccelerationStructureBuildRangeInfoKHR* const*": "^[^]AccelerationStructureBuildRangeInfoKHR",
"const MicromapUsageEXT* const*": "^[^]MicromapUsageEXT",
"struct BaseOutStructure": "BaseOutStructure",
"struct BaseInStructure": "BaseInStructure",
"struct wl_display": "wl_display",
@@ -261,6 +272,12 @@ def parse_constants(f):
for name, value in allowed_data:
f.write("{}{} :: {}\n".format(name, "".rjust(max_len-len(name)), value))
f.write("\n// Vulkan Video Constants\n")
vulkan_video_data = re.findall(r"#define STD_(\w+)\s*(.*?)U?\n", src, re.S)
max_len = max(len(name) for name, value in vulkan_video_data)
for name, value in vulkan_video_data:
f.write("{}{} :: {}\n".format(name, "".rjust(max_len-len(name)), value))
f.write("\n// Vendor Constants\n")
fixes = '|'.join(ext_suffixes)
inner = r"((?:(?:" + fixes + r")\w+)|(?:\w+" + fixes + r"))"
@@ -284,6 +301,7 @@ def parse_enums(f):
f.write("// Enums\n")
data = re.findall(r"typedef enum Vk(\w+) {(.+?)} \w+;", src, re.S)
data += re.findall(r"typedef enum Std(\w+) {(.+?)} \w+;", src, re.S)
data.sort(key=lambda x: x[0])
@@ -384,7 +402,16 @@ def parse_enums(f):
used_flags.append('.'+flags[i])
else:
used_flags.append('{}({})'.format(enum_name, i))
s = "{enum_name}s_{n} :: {enum_name}s{{".format(enum_name=enum_name, n=n)
# Make sure the 's' is after Flags and not the extension name.
ext_suffix = ''
for suffix in ext_suffixes:
if not enum_name.endswith(suffix):
continue
ext_suffix = suffix
enum_name = remove_suffix(enum_name, ext_suffix)
break
s = "{enum_name}s{ext_suffix}_{n} :: {enum_name}s{ext_suffix}{{".format(enum_name=enum_name, ext_suffix=ext_suffix, n=n)
s += ', '.join(used_flags)
s += "}\n"
f.write(s)
@@ -406,6 +433,7 @@ def parse_enums(f):
def parse_structs(f):
data = re.findall(r"typedef (struct|union) Vk(\w+?) {(.+?)} \w+?;", src, re.S)
data += re.findall(r"typedef (struct|union) Std(\w+?) {(.+?)} \w+?;", src, re.S)
for _type, name, fields in data:
fields = re.findall(r"\s+(.+?)\s+([_a-zA-Z0-9[\]]+);", fields)
@@ -417,6 +445,18 @@ def parse_structs(f):
prev_name = ""
ffields = []
for type_, fname in fields:
# If the typename has a colon in it, then it is a C bit field.
if ":" in type_:
bit_field = type_.split(' ')
# Get rid of empty spaces
bit_field = list(filter(bool, bit_field))
# [type, typename, :]
assert len(bit_field) == 3, "Failed to parse the bit field!"
bit_field_type = do_type(bit_field[0], prev_name, fname)
f.write("\tbit_field: {},{}\n".format(bit_field_type, comment or ""))
break
if '[' in fname:
fname, type_ = parse_array(fname, type_)
comment = None
@@ -430,7 +470,7 @@ def parse_structs(f):
ffields.append(tuple([n, t, comment]))
prev_name = fname
max_len = max(len(n) for n, _, _ in ffields)
max_len = max([len(n) for n, _, _ in ffields], default=0)
for n, t, comment in ffields:
k = max_len-len(n)+len(t)
@@ -660,27 +700,28 @@ SetProcAddressType :: #type proc(p: rawptr, name: cstring)
RemoteAddressNV :: distinct rawptr // Declared inline before MemoryGetRemoteAddressInfoNV
// Base constants
LOD_CLAMP_NONE :: 1000.0
REMAINING_MIP_LEVELS :: ~u32(0)
REMAINING_ARRAY_LAYERS :: ~u32(0)
WHOLE_SIZE :: ~u64(0)
ATTACHMENT_UNUSED :: ~u32(0)
TRUE :: 1
FALSE :: 0
QUEUE_FAMILY_IGNORED :: ~u32(0)
SUBPASS_EXTERNAL :: ~u32(0)
MAX_PHYSICAL_DEVICE_NAME_SIZE :: 256
UUID_SIZE :: 16
MAX_MEMORY_TYPES :: 32
MAX_MEMORY_HEAPS :: 16
MAX_EXTENSION_NAME_SIZE :: 256
MAX_DESCRIPTION_SIZE :: 256
MAX_DEVICE_GROUP_SIZE :: 32
LUID_SIZE_KHX :: 8
LUID_SIZE :: 8
MAX_QUEUE_FAMILY_EXTERNAL :: ~u32(1)
MAX_GLOBAL_PRIORITY_SIZE_EXT :: 16
QUEUE_FAMILY_EXTERNAL :: MAX_QUEUE_FAMILY_EXTERNAL
LOD_CLAMP_NONE :: 1000.0
REMAINING_MIP_LEVELS :: ~u32(0)
REMAINING_ARRAY_LAYERS :: ~u32(0)
WHOLE_SIZE :: ~u64(0)
ATTACHMENT_UNUSED :: ~u32(0)
TRUE :: 1
FALSE :: 0
QUEUE_FAMILY_IGNORED :: ~u32(0)
SUBPASS_EXTERNAL :: ~u32(0)
MAX_PHYSICAL_DEVICE_NAME_SIZE :: 256
MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT :: 32
UUID_SIZE :: 16
MAX_MEMORY_TYPES :: 32
MAX_MEMORY_HEAPS :: 16
MAX_EXTENSION_NAME_SIZE :: 256
MAX_DESCRIPTION_SIZE :: 256
MAX_DEVICE_GROUP_SIZE :: 32
LUID_SIZE_KHX :: 8
LUID_SIZE :: 8
MAX_QUEUE_FAMILY_EXTERNAL :: ~u32(1)
MAX_GLOBAL_PRIORITY_SIZE_EXT :: 16
QUEUE_FAMILY_EXTERNAL :: MAX_QUEUE_FAMILY_EXTERNAL
"""[1::])
parse_constants(f)
@@ -726,6 +767,12 @@ when ODIN_OS == .Windows {
CAMetalLayer :: struct {}
MTLBuffer_id :: rawptr
MTLTexture_id :: rawptr
MTLSharedEvent_id :: rawptr
MTLDevice_id :: rawptr
MTLCommandQueue_id :: rawptr
/********************************/
""")
f.write("\n")
+22 -9
View File
@@ -2,9 +2,9 @@
// File: vk_icd.h
//
/*
* Copyright (c) 2015-2016 The Khronos Group Inc.
* Copyright (c) 2015-2016 Valve Corporation
* Copyright (c) 2015-2016 LunarG, Inc.
* Copyright (c) 2015-2023 LunarG, Inc.
* Copyright (c) 2015-2023 The Khronos Group Inc.
* Copyright (c) 2015-2023 Valve Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,9 +19,7 @@
* limitations under the License.
*
*/
#ifndef VKICD_H
#define VKICD_H
#pragma once
#include "vulkan.h"
#include <stdbool.h>
@@ -42,7 +40,17 @@
// call for any API version > 1.0. Otherwise, the loader will
// manually determine if it can support the expected version.
// Version 6 - Add support for vk_icdEnumerateAdapterPhysicalDevices.
#define CURRENT_LOADER_ICD_INTERFACE_VERSION 6
// Version 7 - If an ICD supports any of the following functions, they must be
// queryable with vk_icdGetInstanceProcAddr:
// vk_icdNegotiateLoaderICDInterfaceVersion
// vk_icdGetPhysicalDeviceProcAddr
// vk_icdEnumerateAdapterPhysicalDevices (Windows only)
// In addition, these functions no longer need to be exported directly.
// This version allows drivers provided through the extension
// VK_LUNARG_direct_driver_loading be able to support the entire
// Driver-Loader interface.
#define CURRENT_LOADER_ICD_INTERFACE_VERSION 7
#define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0
#define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4
@@ -70,7 +78,7 @@ extern "C" {
#endif
VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pVersion);
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(VkInstance instance, const char* pName);
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance isntance, const char* pName);
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance instance, const char* pName);
#if defined(VK_USE_PLATFORM_WIN32_KHR)
VKAPI_ATTR VkResult VKAPI_CALL vk_icdEnumerateAdapterPhysicalDevices(VkInstance instance, LUID adapterLUID,
uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
@@ -123,6 +131,7 @@ typedef enum {
VK_ICD_WSI_PLATFORM_VI,
VK_ICD_WSI_PLATFORM_GGP,
VK_ICD_WSI_PLATFORM_SCREEN,
VK_ICD_WSI_PLATFORM_FUCHSIA,
} VkIcdWsiPlatform;
typedef struct {
@@ -242,4 +251,8 @@ typedef struct {
} VkIcdSurfaceScreen;
#endif // VK_USE_PLATFORM_SCREEN_QNX
#endif // VKICD_H
#ifdef VK_USE_PLATFORM_FUCHSIA
typedef struct {
VkIcdSurfaceBase base;
} VkIcdSurfaceImagePipe;
#endif // VK_USE_PLATFORM_FUCHSIA
+5 -12
View File
@@ -2,9 +2,9 @@
// File: vk_layer.h
//
/*
* Copyright (c) 2015-2017 The Khronos Group Inc.
* Copyright (c) 2015-2017 Valve Corporation
* Copyright (c) 2015-2017 LunarG, Inc.
* Copyright (c) 2015-2023 LunarG, Inc.
* Copyright (c) 2015-2023 The Khronos Group Inc.
* Copyright (c) 2015-2023 Valve Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,21 +19,14 @@
* limitations under the License.
*
*/
#pragma once
/* Need to define dispatch table
* Core struct can then have ptr to dispatch table at the top
* Along with object ptrs for current and next OBJ
*/
#pragma once
#include "vulkan.h"
#if defined(__GNUC__) && __GNUC__ >= 4
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
#else
#define VK_LAYER_EXPORT
#endif
#include "vulkan_core.h"
#define MAX_NUM_UNKNOWN_EXTS 250
+1 -1
View File
@@ -2,7 +2,7 @@
// File: vk_platform.h
//
/*
** Copyright 2014-2022 The Khronos Group Inc.
** Copyright 2014-2023 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
+3024 -244
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -2,7 +2,7 @@
#define VULKAN_IOS_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
** Copyright 2015-2023 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
+1 -1
View File
@@ -2,7 +2,7 @@
#define VULKAN_MACOS_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
** Copyright 2015-2023 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
+141 -2
View File
@@ -2,7 +2,7 @@
#define VULKAN_METAL_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
** Copyright 2015-2023 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
@@ -20,7 +20,6 @@ extern "C" {
#define VK_EXT_metal_surface 1
#ifdef __OBJC__
@class CAMetalLayer;
#else
@@ -47,6 +46,146 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT(
VkSurfaceKHR* pSurface);
#endif
#define VK_EXT_metal_objects 1
#ifdef __OBJC__
@protocol MTLDevice;
typedef id<MTLDevice> MTLDevice_id;
#else
typedef void* MTLDevice_id;
#endif
#ifdef __OBJC__
@protocol MTLCommandQueue;
typedef id<MTLCommandQueue> MTLCommandQueue_id;
#else
typedef void* MTLCommandQueue_id;
#endif
#ifdef __OBJC__
@protocol MTLBuffer;
typedef id<MTLBuffer> MTLBuffer_id;
#else
typedef void* MTLBuffer_id;
#endif
#ifdef __OBJC__
@protocol MTLTexture;
typedef id<MTLTexture> MTLTexture_id;
#else
typedef void* MTLTexture_id;
#endif
typedef struct __IOSurface* IOSurfaceRef;
#ifdef __OBJC__
@protocol MTLSharedEvent;
typedef id<MTLSharedEvent> MTLSharedEvent_id;
#else
typedef void* MTLSharedEvent_id;
#endif
#define VK_EXT_METAL_OBJECTS_SPEC_VERSION 1
#define VK_EXT_METAL_OBJECTS_EXTENSION_NAME "VK_EXT_metal_objects"
typedef enum VkExportMetalObjectTypeFlagBitsEXT {
VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = 0x00000001,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = 0x00000002,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = 0x00000004,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = 0x00000008,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = 0x00000010,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = 0x00000020,
VK_EXPORT_METAL_OBJECT_TYPE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
} VkExportMetalObjectTypeFlagBitsEXT;
typedef VkFlags VkExportMetalObjectTypeFlagsEXT;
typedef struct VkExportMetalObjectCreateInfoEXT {
VkStructureType sType;
const void* pNext;
VkExportMetalObjectTypeFlagBitsEXT exportObjectType;
} VkExportMetalObjectCreateInfoEXT;
typedef struct VkExportMetalObjectsInfoEXT {
VkStructureType sType;
const void* pNext;
} VkExportMetalObjectsInfoEXT;
typedef struct VkExportMetalDeviceInfoEXT {
VkStructureType sType;
const void* pNext;
MTLDevice_id mtlDevice;
} VkExportMetalDeviceInfoEXT;
typedef struct VkExportMetalCommandQueueInfoEXT {
VkStructureType sType;
const void* pNext;
VkQueue queue;
MTLCommandQueue_id mtlCommandQueue;
} VkExportMetalCommandQueueInfoEXT;
typedef struct VkExportMetalBufferInfoEXT {
VkStructureType sType;
const void* pNext;
VkDeviceMemory memory;
MTLBuffer_id mtlBuffer;
} VkExportMetalBufferInfoEXT;
typedef struct VkImportMetalBufferInfoEXT {
VkStructureType sType;
const void* pNext;
MTLBuffer_id mtlBuffer;
} VkImportMetalBufferInfoEXT;
typedef struct VkExportMetalTextureInfoEXT {
VkStructureType sType;
const void* pNext;
VkImage image;
VkImageView imageView;
VkBufferView bufferView;
VkImageAspectFlagBits plane;
MTLTexture_id mtlTexture;
} VkExportMetalTextureInfoEXT;
typedef struct VkImportMetalTextureInfoEXT {
VkStructureType sType;
const void* pNext;
VkImageAspectFlagBits plane;
MTLTexture_id mtlTexture;
} VkImportMetalTextureInfoEXT;
typedef struct VkExportMetalIOSurfaceInfoEXT {
VkStructureType sType;
const void* pNext;
VkImage image;
IOSurfaceRef ioSurface;
} VkExportMetalIOSurfaceInfoEXT;
typedef struct VkImportMetalIOSurfaceInfoEXT {
VkStructureType sType;
const void* pNext;
IOSurfaceRef ioSurface;
} VkImportMetalIOSurfaceInfoEXT;
typedef struct VkExportMetalSharedEventInfoEXT {
VkStructureType sType;
const void* pNext;
VkSemaphore semaphore;
VkEvent event;
MTLSharedEvent_id mtlSharedEvent;
} VkExportMetalSharedEventInfoEXT;
typedef struct VkImportMetalSharedEventInfoEXT {
VkStructureType sType;
const void* pNext;
MTLSharedEvent_id mtlSharedEvent;
} VkImportMetalSharedEventInfoEXT;
typedef void (VKAPI_PTR *PFN_vkExportMetalObjectsEXT)(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkExportMetalObjectsEXT(
VkDevice device,
VkExportMetalObjectsInfoEXT* pMetalObjectsInfo);
#endif
#ifdef __cplusplus
}
#endif
+310
View File
@@ -0,0 +1,310 @@
#ifndef VULKAN_VIDEO_CODEC_H264STD_H_
#define VULKAN_VIDEO_CODEC_H264STD_H_ 1
/*
** Copyright 2015-2023 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define vulkan_video_codec_h264std 1
#include <stdint.h>
#define STD_VIDEO_H264_CPB_CNT_LIST_SIZE 32
#define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS 6
#define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS 16
#define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS 6
#define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS 64
#define STD_VIDEO_H264_MAX_NUM_LIST_REF 32
#define STD_VIDEO_H264_MAX_CHROMA_PLANES 2
typedef enum StdVideoH264ChromaFormatIdc {
STD_VIDEO_H264_CHROMA_FORMAT_IDC_MONOCHROME = 0,
STD_VIDEO_H264_CHROMA_FORMAT_IDC_420 = 1,
STD_VIDEO_H264_CHROMA_FORMAT_IDC_422 = 2,
STD_VIDEO_H264_CHROMA_FORMAT_IDC_444 = 3,
STD_VIDEO_H264_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_CHROMA_FORMAT_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264ChromaFormatIdc;
typedef enum StdVideoH264ProfileIdc {
STD_VIDEO_H264_PROFILE_IDC_BASELINE = 66,
STD_VIDEO_H264_PROFILE_IDC_MAIN = 77,
STD_VIDEO_H264_PROFILE_IDC_HIGH = 100,
STD_VIDEO_H264_PROFILE_IDC_HIGH_444_PREDICTIVE = 244,
STD_VIDEO_H264_PROFILE_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_PROFILE_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264ProfileIdc;
typedef enum StdVideoH264LevelIdc {
STD_VIDEO_H264_LEVEL_IDC_1_0 = 0,
STD_VIDEO_H264_LEVEL_IDC_1_1 = 1,
STD_VIDEO_H264_LEVEL_IDC_1_2 = 2,
STD_VIDEO_H264_LEVEL_IDC_1_3 = 3,
STD_VIDEO_H264_LEVEL_IDC_2_0 = 4,
STD_VIDEO_H264_LEVEL_IDC_2_1 = 5,
STD_VIDEO_H264_LEVEL_IDC_2_2 = 6,
STD_VIDEO_H264_LEVEL_IDC_3_0 = 7,
STD_VIDEO_H264_LEVEL_IDC_3_1 = 8,
STD_VIDEO_H264_LEVEL_IDC_3_2 = 9,
STD_VIDEO_H264_LEVEL_IDC_4_0 = 10,
STD_VIDEO_H264_LEVEL_IDC_4_1 = 11,
STD_VIDEO_H264_LEVEL_IDC_4_2 = 12,
STD_VIDEO_H264_LEVEL_IDC_5_0 = 13,
STD_VIDEO_H264_LEVEL_IDC_5_1 = 14,
STD_VIDEO_H264_LEVEL_IDC_5_2 = 15,
STD_VIDEO_H264_LEVEL_IDC_6_0 = 16,
STD_VIDEO_H264_LEVEL_IDC_6_1 = 17,
STD_VIDEO_H264_LEVEL_IDC_6_2 = 18,
STD_VIDEO_H264_LEVEL_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_LEVEL_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264LevelIdc;
typedef enum StdVideoH264PocType {
STD_VIDEO_H264_POC_TYPE_0 = 0,
STD_VIDEO_H264_POC_TYPE_1 = 1,
STD_VIDEO_H264_POC_TYPE_2 = 2,
STD_VIDEO_H264_POC_TYPE_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_POC_TYPE_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264PocType;
typedef enum StdVideoH264AspectRatioIdc {
STD_VIDEO_H264_ASPECT_RATIO_IDC_UNSPECIFIED = 0,
STD_VIDEO_H264_ASPECT_RATIO_IDC_SQUARE = 1,
STD_VIDEO_H264_ASPECT_RATIO_IDC_12_11 = 2,
STD_VIDEO_H264_ASPECT_RATIO_IDC_10_11 = 3,
STD_VIDEO_H264_ASPECT_RATIO_IDC_16_11 = 4,
STD_VIDEO_H264_ASPECT_RATIO_IDC_40_33 = 5,
STD_VIDEO_H264_ASPECT_RATIO_IDC_24_11 = 6,
STD_VIDEO_H264_ASPECT_RATIO_IDC_20_11 = 7,
STD_VIDEO_H264_ASPECT_RATIO_IDC_32_11 = 8,
STD_VIDEO_H264_ASPECT_RATIO_IDC_80_33 = 9,
STD_VIDEO_H264_ASPECT_RATIO_IDC_18_11 = 10,
STD_VIDEO_H264_ASPECT_RATIO_IDC_15_11 = 11,
STD_VIDEO_H264_ASPECT_RATIO_IDC_64_33 = 12,
STD_VIDEO_H264_ASPECT_RATIO_IDC_160_99 = 13,
STD_VIDEO_H264_ASPECT_RATIO_IDC_4_3 = 14,
STD_VIDEO_H264_ASPECT_RATIO_IDC_3_2 = 15,
STD_VIDEO_H264_ASPECT_RATIO_IDC_2_1 = 16,
STD_VIDEO_H264_ASPECT_RATIO_IDC_EXTENDED_SAR = 255,
STD_VIDEO_H264_ASPECT_RATIO_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_ASPECT_RATIO_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264AspectRatioIdc;
typedef enum StdVideoH264WeightedBipredIdc {
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_DEFAULT = 0,
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT = 1,
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_IMPLICIT = 2,
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264WeightedBipredIdc;
typedef enum StdVideoH264ModificationOfPicNumsIdc {
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_SUBTRACT = 0,
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_ADD = 1,
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_LONG_TERM = 2,
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_END = 3,
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264ModificationOfPicNumsIdc;
typedef enum StdVideoH264MemMgmtControlOp {
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_END = 0,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_SHORT_TERM = 1,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_LONG_TERM = 2,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_LONG_TERM = 3,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_SET_MAX_LONG_TERM_INDEX = 4,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_ALL = 5,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_CURRENT_AS_LONG_TERM = 6,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264MemMgmtControlOp;
typedef enum StdVideoH264CabacInitIdc {
STD_VIDEO_H264_CABAC_INIT_IDC_0 = 0,
STD_VIDEO_H264_CABAC_INIT_IDC_1 = 1,
STD_VIDEO_H264_CABAC_INIT_IDC_2 = 2,
STD_VIDEO_H264_CABAC_INIT_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_CABAC_INIT_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264CabacInitIdc;
typedef enum StdVideoH264DisableDeblockingFilterIdc {
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_DISABLED = 0,
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_ENABLED = 1,
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_PARTIAL = 2,
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264DisableDeblockingFilterIdc;
typedef enum StdVideoH264SliceType {
STD_VIDEO_H264_SLICE_TYPE_P = 0,
STD_VIDEO_H264_SLICE_TYPE_B = 1,
STD_VIDEO_H264_SLICE_TYPE_I = 2,
STD_VIDEO_H264_SLICE_TYPE_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_SLICE_TYPE_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264SliceType;
typedef enum StdVideoH264PictureType {
STD_VIDEO_H264_PICTURE_TYPE_P = 0,
STD_VIDEO_H264_PICTURE_TYPE_B = 1,
STD_VIDEO_H264_PICTURE_TYPE_I = 2,
STD_VIDEO_H264_PICTURE_TYPE_IDR = 5,
STD_VIDEO_H264_PICTURE_TYPE_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_PICTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264PictureType;
typedef enum StdVideoH264NonVclNaluType {
STD_VIDEO_H264_NON_VCL_NALU_TYPE_SPS = 0,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PPS = 1,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_AUD = 2,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PREFIX = 3,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_SEQUENCE = 4,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_STREAM = 5,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PRECODED = 6,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_INVALID = 0x7FFFFFFF,
STD_VIDEO_H264_NON_VCL_NALU_TYPE_MAX_ENUM = 0x7FFFFFFF
} StdVideoH264NonVclNaluType;
typedef struct StdVideoH264SpsVuiFlags {
uint32_t aspect_ratio_info_present_flag : 1;
uint32_t overscan_info_present_flag : 1;
uint32_t overscan_appropriate_flag : 1;
uint32_t video_signal_type_present_flag : 1;
uint32_t video_full_range_flag : 1;
uint32_t color_description_present_flag : 1;
uint32_t chroma_loc_info_present_flag : 1;
uint32_t timing_info_present_flag : 1;
uint32_t fixed_frame_rate_flag : 1;
uint32_t bitstream_restriction_flag : 1;
uint32_t nal_hrd_parameters_present_flag : 1;
uint32_t vcl_hrd_parameters_present_flag : 1;
} StdVideoH264SpsVuiFlags;
typedef struct StdVideoH264HrdParameters {
uint8_t cpb_cnt_minus1;
uint8_t bit_rate_scale;
uint8_t cpb_size_scale;
uint8_t reserved1;
uint32_t bit_rate_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
uint32_t cpb_size_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
uint8_t cbr_flag[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
uint32_t initial_cpb_removal_delay_length_minus1;
uint32_t cpb_removal_delay_length_minus1;
uint32_t dpb_output_delay_length_minus1;
uint32_t time_offset_length;
} StdVideoH264HrdParameters;
typedef struct StdVideoH264SequenceParameterSetVui {
StdVideoH264SpsVuiFlags flags;
StdVideoH264AspectRatioIdc aspect_ratio_idc;
uint16_t sar_width;
uint16_t sar_height;
uint8_t video_format;
uint8_t colour_primaries;
uint8_t transfer_characteristics;
uint8_t matrix_coefficients;
uint32_t num_units_in_tick;
uint32_t time_scale;
uint8_t max_num_reorder_frames;
uint8_t max_dec_frame_buffering;
uint8_t chroma_sample_loc_type_top_field;
uint8_t chroma_sample_loc_type_bottom_field;
uint32_t reserved1;
const StdVideoH264HrdParameters* pHrdParameters;
} StdVideoH264SequenceParameterSetVui;
typedef struct StdVideoH264SpsFlags {
uint32_t constraint_set0_flag : 1;
uint32_t constraint_set1_flag : 1;
uint32_t constraint_set2_flag : 1;
uint32_t constraint_set3_flag : 1;
uint32_t constraint_set4_flag : 1;
uint32_t constraint_set5_flag : 1;
uint32_t direct_8x8_inference_flag : 1;
uint32_t mb_adaptive_frame_field_flag : 1;
uint32_t frame_mbs_only_flag : 1;
uint32_t delta_pic_order_always_zero_flag : 1;
uint32_t separate_colour_plane_flag : 1;
uint32_t gaps_in_frame_num_value_allowed_flag : 1;
uint32_t qpprime_y_zero_transform_bypass_flag : 1;
uint32_t frame_cropping_flag : 1;
uint32_t seq_scaling_matrix_present_flag : 1;
uint32_t vui_parameters_present_flag : 1;
} StdVideoH264SpsFlags;
typedef struct StdVideoH264ScalingLists {
uint16_t scaling_list_present_mask;
uint16_t use_default_scaling_matrix_mask;
uint8_t ScalingList4x4[STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS];
uint8_t ScalingList8x8[STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS];
} StdVideoH264ScalingLists;
typedef struct StdVideoH264SequenceParameterSet {
StdVideoH264SpsFlags flags;
StdVideoH264ProfileIdc profile_idc;
StdVideoH264LevelIdc level_idc;
StdVideoH264ChromaFormatIdc chroma_format_idc;
uint8_t seq_parameter_set_id;
uint8_t bit_depth_luma_minus8;
uint8_t bit_depth_chroma_minus8;
uint8_t log2_max_frame_num_minus4;
StdVideoH264PocType pic_order_cnt_type;
int32_t offset_for_non_ref_pic;
int32_t offset_for_top_to_bottom_field;
uint8_t log2_max_pic_order_cnt_lsb_minus4;
uint8_t num_ref_frames_in_pic_order_cnt_cycle;
uint8_t max_num_ref_frames;
uint8_t reserved1;
uint32_t pic_width_in_mbs_minus1;
uint32_t pic_height_in_map_units_minus1;
uint32_t frame_crop_left_offset;
uint32_t frame_crop_right_offset;
uint32_t frame_crop_top_offset;
uint32_t frame_crop_bottom_offset;
uint32_t reserved2;
const int32_t* pOffsetForRefFrame;
const StdVideoH264ScalingLists* pScalingLists;
const StdVideoH264SequenceParameterSetVui* pSequenceParameterSetVui;
} StdVideoH264SequenceParameterSet;
typedef struct StdVideoH264PpsFlags {
uint32_t transform_8x8_mode_flag : 1;
uint32_t redundant_pic_cnt_present_flag : 1;
uint32_t constrained_intra_pred_flag : 1;
uint32_t deblocking_filter_control_present_flag : 1;
uint32_t weighted_pred_flag : 1;
uint32_t bottom_field_pic_order_in_frame_present_flag : 1;
uint32_t entropy_coding_mode_flag : 1;
uint32_t pic_scaling_matrix_present_flag : 1;
} StdVideoH264PpsFlags;
typedef struct StdVideoH264PictureParameterSet {
StdVideoH264PpsFlags flags;
uint8_t seq_parameter_set_id;
uint8_t pic_parameter_set_id;
uint8_t num_ref_idx_l0_default_active_minus1;
uint8_t num_ref_idx_l1_default_active_minus1;
StdVideoH264WeightedBipredIdc weighted_bipred_idc;
int8_t pic_init_qp_minus26;
int8_t pic_init_qs_minus26;
int8_t chroma_qp_index_offset;
int8_t second_chroma_qp_index_offset;
const StdVideoH264ScalingLists* pScalingLists;
} StdVideoH264PictureParameterSet;
#ifdef __cplusplus
}
#endif
#endif
+75
View File
@@ -0,0 +1,75 @@
#ifndef VULKAN_VIDEO_CODEC_H264STD_DECODE_H_
#define VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ 1
/*
** Copyright 2015-2023 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define vulkan_video_codec_h264std_decode 1
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
#define STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE 2
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264_decode"
typedef enum StdVideoDecodeH264FieldOrderCount {
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_TOP = 0,
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_BOTTOM = 1,
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_INVALID = 0x7FFFFFFF,
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_MAX_ENUM = 0x7FFFFFFF
} StdVideoDecodeH264FieldOrderCount;
typedef struct StdVideoDecodeH264PictureInfoFlags {
uint32_t field_pic_flag : 1;
uint32_t is_intra : 1;
uint32_t IdrPicFlag : 1;
uint32_t bottom_field_flag : 1;
uint32_t is_reference : 1;
uint32_t complementary_field_pair : 1;
} StdVideoDecodeH264PictureInfoFlags;
typedef struct StdVideoDecodeH264PictureInfo {
StdVideoDecodeH264PictureInfoFlags flags;
uint8_t seq_parameter_set_id;
uint8_t pic_parameter_set_id;
uint8_t reserved1;
uint8_t reserved2;
uint16_t frame_num;
uint16_t idr_pic_id;
int32_t PicOrderCnt[STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE];
} StdVideoDecodeH264PictureInfo;
typedef struct StdVideoDecodeH264ReferenceInfoFlags {
uint32_t top_field_flag : 1;
uint32_t bottom_field_flag : 1;
uint32_t used_for_long_term_reference : 1;
uint32_t is_non_existing : 1;
} StdVideoDecodeH264ReferenceInfoFlags;
typedef struct StdVideoDecodeH264ReferenceInfo {
StdVideoDecodeH264ReferenceInfoFlags flags;
uint16_t FrameNum;
uint16_t reserved;
int32_t PicOrderCnt[STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE];
} StdVideoDecodeH264ReferenceInfo;
#ifdef __cplusplus
}
#endif
#endif
+443
View File
@@ -0,0 +1,443 @@
#ifndef VULKAN_VIDEO_CODEC_H265STD_H_
#define VULKAN_VIDEO_CODEC_H265STD_H_ 1
/*
** Copyright 2015-2023 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define vulkan_video_codec_h265std 1
#define STD_VIDEO_H265_SUBLAYERS_LIST_SIZE 7
#define STD_VIDEO_H265_CPB_CNT_LIST_SIZE 32
#define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS 6
#define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS 16
#define STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS 6
#define STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS 64
#define STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS 6
#define STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS 64
#define STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS 2
#define STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS 64
#define STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE 3
#define STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE 128
#define STD_VIDEO_H265_MAX_DPB_SIZE 16
#define STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS 32
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE 6
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE 19
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE 21
#define STD_VIDEO_H265_MAX_NUM_LIST_REF 15
#define STD_VIDEO_H265_MAX_CHROMA_PLANES 2
#define STD_VIDEO_H265_MAX_SHORT_TERM_REF_PIC_SETS 64
#define STD_VIDEO_H265_MAX_LONG_TERM_PICS 16
#define STD_VIDEO_H265_MAX_DELTA_POC 48
typedef enum StdVideoH265ChromaFormatIdc {
STD_VIDEO_H265_CHROMA_FORMAT_IDC_MONOCHROME = 0,
STD_VIDEO_H265_CHROMA_FORMAT_IDC_420 = 1,
STD_VIDEO_H265_CHROMA_FORMAT_IDC_422 = 2,
STD_VIDEO_H265_CHROMA_FORMAT_IDC_444 = 3,
STD_VIDEO_H265_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H265_CHROMA_FORMAT_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH265ChromaFormatIdc;
typedef enum StdVideoH265ProfileIdc {
STD_VIDEO_H265_PROFILE_IDC_MAIN = 1,
STD_VIDEO_H265_PROFILE_IDC_MAIN_10 = 2,
STD_VIDEO_H265_PROFILE_IDC_MAIN_STILL_PICTURE = 3,
STD_VIDEO_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSIONS = 4,
STD_VIDEO_H265_PROFILE_IDC_SCC_EXTENSIONS = 9,
STD_VIDEO_H265_PROFILE_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H265_PROFILE_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH265ProfileIdc;
typedef enum StdVideoH265LevelIdc {
STD_VIDEO_H265_LEVEL_IDC_1_0 = 0,
STD_VIDEO_H265_LEVEL_IDC_2_0 = 1,
STD_VIDEO_H265_LEVEL_IDC_2_1 = 2,
STD_VIDEO_H265_LEVEL_IDC_3_0 = 3,
STD_VIDEO_H265_LEVEL_IDC_3_1 = 4,
STD_VIDEO_H265_LEVEL_IDC_4_0 = 5,
STD_VIDEO_H265_LEVEL_IDC_4_1 = 6,
STD_VIDEO_H265_LEVEL_IDC_5_0 = 7,
STD_VIDEO_H265_LEVEL_IDC_5_1 = 8,
STD_VIDEO_H265_LEVEL_IDC_5_2 = 9,
STD_VIDEO_H265_LEVEL_IDC_6_0 = 10,
STD_VIDEO_H265_LEVEL_IDC_6_1 = 11,
STD_VIDEO_H265_LEVEL_IDC_6_2 = 12,
STD_VIDEO_H265_LEVEL_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H265_LEVEL_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH265LevelIdc;
typedef enum StdVideoH265SliceType {
STD_VIDEO_H265_SLICE_TYPE_B = 0,
STD_VIDEO_H265_SLICE_TYPE_P = 1,
STD_VIDEO_H265_SLICE_TYPE_I = 2,
STD_VIDEO_H265_SLICE_TYPE_INVALID = 0x7FFFFFFF,
STD_VIDEO_H265_SLICE_TYPE_MAX_ENUM = 0x7FFFFFFF
} StdVideoH265SliceType;
typedef enum StdVideoH265PictureType {
STD_VIDEO_H265_PICTURE_TYPE_P = 0,
STD_VIDEO_H265_PICTURE_TYPE_B = 1,
STD_VIDEO_H265_PICTURE_TYPE_I = 2,
STD_VIDEO_H265_PICTURE_TYPE_IDR = 3,
STD_VIDEO_H265_PICTURE_TYPE_INVALID = 0x7FFFFFFF,
STD_VIDEO_H265_PICTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
} StdVideoH265PictureType;
typedef enum StdVideoH265AspectRatioIdc {
STD_VIDEO_H265_ASPECT_RATIO_IDC_UNSPECIFIED = 0,
STD_VIDEO_H265_ASPECT_RATIO_IDC_SQUARE = 1,
STD_VIDEO_H265_ASPECT_RATIO_IDC_12_11 = 2,
STD_VIDEO_H265_ASPECT_RATIO_IDC_10_11 = 3,
STD_VIDEO_H265_ASPECT_RATIO_IDC_16_11 = 4,
STD_VIDEO_H265_ASPECT_RATIO_IDC_40_33 = 5,
STD_VIDEO_H265_ASPECT_RATIO_IDC_24_11 = 6,
STD_VIDEO_H265_ASPECT_RATIO_IDC_20_11 = 7,
STD_VIDEO_H265_ASPECT_RATIO_IDC_32_11 = 8,
STD_VIDEO_H265_ASPECT_RATIO_IDC_80_33 = 9,
STD_VIDEO_H265_ASPECT_RATIO_IDC_18_11 = 10,
STD_VIDEO_H265_ASPECT_RATIO_IDC_15_11 = 11,
STD_VIDEO_H265_ASPECT_RATIO_IDC_64_33 = 12,
STD_VIDEO_H265_ASPECT_RATIO_IDC_160_99 = 13,
STD_VIDEO_H265_ASPECT_RATIO_IDC_4_3 = 14,
STD_VIDEO_H265_ASPECT_RATIO_IDC_3_2 = 15,
STD_VIDEO_H265_ASPECT_RATIO_IDC_2_1 = 16,
STD_VIDEO_H265_ASPECT_RATIO_IDC_EXTENDED_SAR = 255,
STD_VIDEO_H265_ASPECT_RATIO_IDC_INVALID = 0x7FFFFFFF,
STD_VIDEO_H265_ASPECT_RATIO_IDC_MAX_ENUM = 0x7FFFFFFF
} StdVideoH265AspectRatioIdc;
typedef struct StdVideoH265DecPicBufMgr {
uint32_t max_latency_increase_plus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
uint8_t max_dec_pic_buffering_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
uint8_t max_num_reorder_pics[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
} StdVideoH265DecPicBufMgr;
typedef struct StdVideoH265SubLayerHrdParameters {
uint32_t bit_rate_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
uint32_t cpb_size_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
uint32_t cpb_size_du_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
uint32_t bit_rate_du_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
uint32_t cbr_flag;
} StdVideoH265SubLayerHrdParameters;
typedef struct StdVideoH265HrdFlags {
uint32_t nal_hrd_parameters_present_flag : 1;
uint32_t vcl_hrd_parameters_present_flag : 1;
uint32_t sub_pic_hrd_params_present_flag : 1;
uint32_t sub_pic_cpb_params_in_pic_timing_sei_flag : 1;
uint32_t fixed_pic_rate_general_flag : 8;
uint32_t fixed_pic_rate_within_cvs_flag : 8;
uint32_t low_delay_hrd_flag : 8;
} StdVideoH265HrdFlags;
typedef struct StdVideoH265HrdParameters {
StdVideoH265HrdFlags flags;
uint8_t tick_divisor_minus2;
uint8_t du_cpb_removal_delay_increment_length_minus1;
uint8_t dpb_output_delay_du_length_minus1;
uint8_t bit_rate_scale;
uint8_t cpb_size_scale;
uint8_t cpb_size_du_scale;
uint8_t initial_cpb_removal_delay_length_minus1;
uint8_t au_cpb_removal_delay_length_minus1;
uint8_t dpb_output_delay_length_minus1;
uint8_t cpb_cnt_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
uint16_t elemental_duration_in_tc_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
uint16_t reserved[3];
const StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersNal;
const StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersVcl;
} StdVideoH265HrdParameters;
typedef struct StdVideoH265VpsFlags {
uint32_t vps_temporal_id_nesting_flag : 1;
uint32_t vps_sub_layer_ordering_info_present_flag : 1;
uint32_t vps_timing_info_present_flag : 1;
uint32_t vps_poc_proportional_to_timing_flag : 1;
} StdVideoH265VpsFlags;
typedef struct StdVideoH265ProfileTierLevelFlags {
uint32_t general_tier_flag : 1;
uint32_t general_progressive_source_flag : 1;
uint32_t general_interlaced_source_flag : 1;
uint32_t general_non_packed_constraint_flag : 1;
uint32_t general_frame_only_constraint_flag : 1;
} StdVideoH265ProfileTierLevelFlags;
typedef struct StdVideoH265ProfileTierLevel {
StdVideoH265ProfileTierLevelFlags flags;
StdVideoH265ProfileIdc general_profile_idc;
StdVideoH265LevelIdc general_level_idc;
} StdVideoH265ProfileTierLevel;
typedef struct StdVideoH265VideoParameterSet {
StdVideoH265VpsFlags flags;
uint8_t vps_video_parameter_set_id;
uint8_t vps_max_sub_layers_minus1;
uint8_t reserved1;
uint8_t reserved2;
uint32_t vps_num_units_in_tick;
uint32_t vps_time_scale;
uint32_t vps_num_ticks_poc_diff_one_minus1;
uint32_t reserved3;
const StdVideoH265DecPicBufMgr* pDecPicBufMgr;
const StdVideoH265HrdParameters* pHrdParameters;
const StdVideoH265ProfileTierLevel* pProfileTierLevel;
} StdVideoH265VideoParameterSet;
typedef struct StdVideoH265ScalingLists {
uint8_t ScalingList4x4[STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS];
uint8_t ScalingList8x8[STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS];
uint8_t ScalingList16x16[STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS];
uint8_t ScalingList32x32[STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS];
uint8_t ScalingListDCCoef16x16[STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS];
uint8_t ScalingListDCCoef32x32[STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS];
} StdVideoH265ScalingLists;
typedef struct StdVideoH265SpsVuiFlags {
uint32_t aspect_ratio_info_present_flag : 1;
uint32_t overscan_info_present_flag : 1;
uint32_t overscan_appropriate_flag : 1;
uint32_t video_signal_type_present_flag : 1;
uint32_t video_full_range_flag : 1;
uint32_t colour_description_present_flag : 1;
uint32_t chroma_loc_info_present_flag : 1;
uint32_t neutral_chroma_indication_flag : 1;
uint32_t field_seq_flag : 1;
uint32_t frame_field_info_present_flag : 1;
uint32_t default_display_window_flag : 1;
uint32_t vui_timing_info_present_flag : 1;
uint32_t vui_poc_proportional_to_timing_flag : 1;
uint32_t vui_hrd_parameters_present_flag : 1;
uint32_t bitstream_restriction_flag : 1;
uint32_t tiles_fixed_structure_flag : 1;
uint32_t motion_vectors_over_pic_boundaries_flag : 1;
uint32_t restricted_ref_pic_lists_flag : 1;
} StdVideoH265SpsVuiFlags;
typedef struct StdVideoH265SequenceParameterSetVui {
StdVideoH265SpsVuiFlags flags;
StdVideoH265AspectRatioIdc aspect_ratio_idc;
uint16_t sar_width;
uint16_t sar_height;
uint8_t video_format;
uint8_t colour_primaries;
uint8_t transfer_characteristics;
uint8_t matrix_coeffs;
uint8_t chroma_sample_loc_type_top_field;
uint8_t chroma_sample_loc_type_bottom_field;
uint8_t reserved1;
uint8_t reserved2;
uint16_t def_disp_win_left_offset;
uint16_t def_disp_win_right_offset;
uint16_t def_disp_win_top_offset;
uint16_t def_disp_win_bottom_offset;
uint32_t vui_num_units_in_tick;
uint32_t vui_time_scale;
uint32_t vui_num_ticks_poc_diff_one_minus1;
uint16_t min_spatial_segmentation_idc;
uint16_t reserved3;
uint8_t max_bytes_per_pic_denom;
uint8_t max_bits_per_min_cu_denom;
uint8_t log2_max_mv_length_horizontal;
uint8_t log2_max_mv_length_vertical;
const StdVideoH265HrdParameters* pHrdParameters;
} StdVideoH265SequenceParameterSetVui;
typedef struct StdVideoH265PredictorPaletteEntries {
uint16_t PredictorPaletteEntries[STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE][STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE];
} StdVideoH265PredictorPaletteEntries;
typedef struct StdVideoH265SpsFlags {
uint32_t sps_temporal_id_nesting_flag : 1;
uint32_t separate_colour_plane_flag : 1;
uint32_t conformance_window_flag : 1;
uint32_t sps_sub_layer_ordering_info_present_flag : 1;
uint32_t scaling_list_enabled_flag : 1;
uint32_t sps_scaling_list_data_present_flag : 1;
uint32_t amp_enabled_flag : 1;
uint32_t sample_adaptive_offset_enabled_flag : 1;
uint32_t pcm_enabled_flag : 1;
uint32_t pcm_loop_filter_disabled_flag : 1;
uint32_t long_term_ref_pics_present_flag : 1;
uint32_t sps_temporal_mvp_enabled_flag : 1;
uint32_t strong_intra_smoothing_enabled_flag : 1;
uint32_t vui_parameters_present_flag : 1;
uint32_t sps_extension_present_flag : 1;
uint32_t sps_range_extension_flag : 1;
uint32_t transform_skip_rotation_enabled_flag : 1;
uint32_t transform_skip_context_enabled_flag : 1;
uint32_t implicit_rdpcm_enabled_flag : 1;
uint32_t explicit_rdpcm_enabled_flag : 1;
uint32_t extended_precision_processing_flag : 1;
uint32_t intra_smoothing_disabled_flag : 1;
uint32_t high_precision_offsets_enabled_flag : 1;
uint32_t persistent_rice_adaptation_enabled_flag : 1;
uint32_t cabac_bypass_alignment_enabled_flag : 1;
uint32_t sps_scc_extension_flag : 1;
uint32_t sps_curr_pic_ref_enabled_flag : 1;
uint32_t palette_mode_enabled_flag : 1;
uint32_t sps_palette_predictor_initializers_present_flag : 1;
uint32_t intra_boundary_filtering_disabled_flag : 1;
} StdVideoH265SpsFlags;
typedef struct StdVideoH265ShortTermRefPicSetFlags {
uint32_t inter_ref_pic_set_prediction_flag : 1;
uint32_t delta_rps_sign : 1;
} StdVideoH265ShortTermRefPicSetFlags;
typedef struct StdVideoH265ShortTermRefPicSet {
StdVideoH265ShortTermRefPicSetFlags flags;
uint32_t delta_idx_minus1;
uint16_t use_delta_flag;
uint16_t abs_delta_rps_minus1;
uint16_t used_by_curr_pic_flag;
uint16_t used_by_curr_pic_s0_flag;
uint16_t used_by_curr_pic_s1_flag;
uint16_t reserved1;
uint8_t reserved2;
uint8_t reserved3;
uint8_t num_negative_pics;
uint8_t num_positive_pics;
uint16_t delta_poc_s0_minus1[STD_VIDEO_H265_MAX_DPB_SIZE];
uint16_t delta_poc_s1_minus1[STD_VIDEO_H265_MAX_DPB_SIZE];
} StdVideoH265ShortTermRefPicSet;
typedef struct StdVideoH265LongTermRefPicsSps {
uint32_t used_by_curr_pic_lt_sps_flag;
uint32_t lt_ref_pic_poc_lsb_sps[STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS];
} StdVideoH265LongTermRefPicsSps;
typedef struct StdVideoH265SequenceParameterSet {
StdVideoH265SpsFlags flags;
StdVideoH265ChromaFormatIdc chroma_format_idc;
uint32_t pic_width_in_luma_samples;
uint32_t pic_height_in_luma_samples;
uint8_t sps_video_parameter_set_id;
uint8_t sps_max_sub_layers_minus1;
uint8_t sps_seq_parameter_set_id;
uint8_t bit_depth_luma_minus8;
uint8_t bit_depth_chroma_minus8;
uint8_t log2_max_pic_order_cnt_lsb_minus4;
uint8_t log2_min_luma_coding_block_size_minus3;
uint8_t log2_diff_max_min_luma_coding_block_size;
uint8_t log2_min_luma_transform_block_size_minus2;
uint8_t log2_diff_max_min_luma_transform_block_size;
uint8_t max_transform_hierarchy_depth_inter;
uint8_t max_transform_hierarchy_depth_intra;
uint8_t num_short_term_ref_pic_sets;
uint8_t num_long_term_ref_pics_sps;
uint8_t pcm_sample_bit_depth_luma_minus1;
uint8_t pcm_sample_bit_depth_chroma_minus1;
uint8_t log2_min_pcm_luma_coding_block_size_minus3;
uint8_t log2_diff_max_min_pcm_luma_coding_block_size;
uint8_t reserved1;
uint8_t reserved2;
uint8_t palette_max_size;
uint8_t delta_palette_max_predictor_size;
uint8_t motion_vector_resolution_control_idc;
uint8_t sps_num_palette_predictor_initializers_minus1;
uint32_t conf_win_left_offset;
uint32_t conf_win_right_offset;
uint32_t conf_win_top_offset;
uint32_t conf_win_bottom_offset;
const StdVideoH265ProfileTierLevel* pProfileTierLevel;
const StdVideoH265DecPicBufMgr* pDecPicBufMgr;
const StdVideoH265ScalingLists* pScalingLists;
const StdVideoH265ShortTermRefPicSet* pShortTermRefPicSet;
const StdVideoH265LongTermRefPicsSps* pLongTermRefPicsSps;
const StdVideoH265SequenceParameterSetVui* pSequenceParameterSetVui;
const StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries;
} StdVideoH265SequenceParameterSet;
typedef struct StdVideoH265PpsFlags {
uint32_t dependent_slice_segments_enabled_flag : 1;
uint32_t output_flag_present_flag : 1;
uint32_t sign_data_hiding_enabled_flag : 1;
uint32_t cabac_init_present_flag : 1;
uint32_t constrained_intra_pred_flag : 1;
uint32_t transform_skip_enabled_flag : 1;
uint32_t cu_qp_delta_enabled_flag : 1;
uint32_t pps_slice_chroma_qp_offsets_present_flag : 1;
uint32_t weighted_pred_flag : 1;
uint32_t weighted_bipred_flag : 1;
uint32_t transquant_bypass_enabled_flag : 1;
uint32_t tiles_enabled_flag : 1;
uint32_t entropy_coding_sync_enabled_flag : 1;
uint32_t uniform_spacing_flag : 1;
uint32_t loop_filter_across_tiles_enabled_flag : 1;
uint32_t pps_loop_filter_across_slices_enabled_flag : 1;
uint32_t deblocking_filter_control_present_flag : 1;
uint32_t deblocking_filter_override_enabled_flag : 1;
uint32_t pps_deblocking_filter_disabled_flag : 1;
uint32_t pps_scaling_list_data_present_flag : 1;
uint32_t lists_modification_present_flag : 1;
uint32_t slice_segment_header_extension_present_flag : 1;
uint32_t pps_extension_present_flag : 1;
uint32_t cross_component_prediction_enabled_flag : 1;
uint32_t chroma_qp_offset_list_enabled_flag : 1;
uint32_t pps_curr_pic_ref_enabled_flag : 1;
uint32_t residual_adaptive_colour_transform_enabled_flag : 1;
uint32_t pps_slice_act_qp_offsets_present_flag : 1;
uint32_t pps_palette_predictor_initializers_present_flag : 1;
uint32_t monochrome_palette_flag : 1;
uint32_t pps_range_extension_flag : 1;
} StdVideoH265PpsFlags;
typedef struct StdVideoH265PictureParameterSet {
StdVideoH265PpsFlags flags;
uint8_t pps_pic_parameter_set_id;
uint8_t pps_seq_parameter_set_id;
uint8_t sps_video_parameter_set_id;
uint8_t num_extra_slice_header_bits;
uint8_t num_ref_idx_l0_default_active_minus1;
uint8_t num_ref_idx_l1_default_active_minus1;
int8_t init_qp_minus26;
uint8_t diff_cu_qp_delta_depth;
int8_t pps_cb_qp_offset;
int8_t pps_cr_qp_offset;
int8_t pps_beta_offset_div2;
int8_t pps_tc_offset_div2;
uint8_t log2_parallel_merge_level_minus2;
uint8_t log2_max_transform_skip_block_size_minus2;
uint8_t diff_cu_chroma_qp_offset_depth;
uint8_t chroma_qp_offset_list_len_minus1;
int8_t cb_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE];
int8_t cr_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE];
uint8_t log2_sao_offset_scale_luma;
uint8_t log2_sao_offset_scale_chroma;
int8_t pps_act_y_qp_offset_plus5;
int8_t pps_act_cb_qp_offset_plus5;
int8_t pps_act_cr_qp_offset_plus3;
uint8_t pps_num_palette_predictor_initializers;
uint8_t luma_bit_depth_entry_minus8;
uint8_t chroma_bit_depth_entry_minus8;
uint8_t num_tile_columns_minus1;
uint8_t num_tile_rows_minus1;
uint8_t reserved1;
uint8_t reserved2;
uint16_t column_width_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE];
uint16_t row_height_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE];
uint32_t reserved3;
const StdVideoH265ScalingLists* pScalingLists;
const StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries;
} StdVideoH265PictureParameterSet;
#ifdef __cplusplus
}
#endif
#endif
+65
View File
@@ -0,0 +1,65 @@
#ifndef VULKAN_VIDEO_CODEC_H265STD_DECODE_H_
#define VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ 1
/*
** Copyright 2015-2023 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define vulkan_video_codec_h265std_decode 1
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
#define STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE 8
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_decode"
typedef struct StdVideoDecodeH265PictureInfoFlags {
uint32_t IrapPicFlag : 1;
uint32_t IdrPicFlag : 1;
uint32_t IsReference : 1;
uint32_t short_term_ref_pic_set_sps_flag : 1;
} StdVideoDecodeH265PictureInfoFlags;
typedef struct StdVideoDecodeH265PictureInfo {
StdVideoDecodeH265PictureInfoFlags flags;
uint8_t sps_video_parameter_set_id;
uint8_t pps_seq_parameter_set_id;
uint8_t pps_pic_parameter_set_id;
uint8_t NumDeltaPocsOfRefRpsIdx;
int32_t PicOrderCntVal;
uint16_t NumBitsForSTRefPicSetInSlice;
uint16_t reserved;
uint8_t RefPicSetStCurrBefore[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
uint8_t RefPicSetStCurrAfter[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
uint8_t RefPicSetLtCurr[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
} StdVideoDecodeH265PictureInfo;
typedef struct StdVideoDecodeH265ReferenceInfoFlags {
uint32_t used_for_long_term_reference : 1;
uint32_t unused_for_reference : 1;
} StdVideoDecodeH265ReferenceInfoFlags;
typedef struct StdVideoDecodeH265ReferenceInfo {
StdVideoDecodeH265ReferenceInfoFlags flags;
int32_t PicOrderCntVal;
} StdVideoDecodeH265ReferenceInfo;
#ifdef __cplusplus
}
#endif
#endif
+19 -1
View File
@@ -2,7 +2,7 @@
#define VULKAN_WIN32_H_ 1
/*
** Copyright 2015-2022 The Khronos Group Inc.
** Copyright 2015-2023 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
@@ -308,6 +308,24 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT(
VkDeviceGroupPresentModeFlagsKHR* pModes);
#endif
#define VK_NV_acquire_winrt_display 1
#define VK_NV_ACQUIRE_WINRT_DISPLAY_SPEC_VERSION 1
#define VK_NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME "VK_NV_acquire_winrt_display"
typedef VkResult (VKAPI_PTR *PFN_vkAcquireWinrtDisplayNV)(VkPhysicalDevice physicalDevice, VkDisplayKHR display);
typedef VkResult (VKAPI_PTR *PFN_vkGetWinrtDisplayNV)(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireWinrtDisplayNV(
VkPhysicalDevice physicalDevice,
VkDisplayKHR display);
VKAPI_ATTR VkResult VKAPI_CALL vkGetWinrtDisplayNV(
VkPhysicalDevice physicalDevice,
uint32_t deviceRelativeId,
VkDisplayKHR* pDisplay);
#endif
#ifdef __cplusplus
}
#endif
+924 -756
View File
File diff suppressed because it is too large Load Diff
+1603 -955
View File
File diff suppressed because it is too large Load Diff
+3628 -2912
View File
File diff suppressed because it is too large Load Diff
+2050 -263
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -50,7 +50,7 @@ foreign webgl {
AttachShader :: proc(program: Program, shader: Shader) ---
BindAttribLocation :: proc(program: Program, index: i32, name: string) ---
BindBuffer :: proc(target: Enum, buffer: Buffer) ---
BindFramebuffer :: proc(target: Enum, buffer: Buffer) ---
BindFramebuffer :: proc(target: Enum, framebuffer: Framebuffer) ---
BindTexture :: proc(target: Enum, texture: Texture) ---
BlendColor :: proc(red, green, blue, alpha: f32) ---
BlendEquation :: proc(mode: Enum) ---
+2 -2
View File
@@ -313,8 +313,8 @@ class WebGLInterface {
this.ctx.bindBuffer(target, bufferObj)
}
},
BindFramebuffer: (target, buffer) => {
// TODO: BindFramebuffer
BindFramebuffer: (target, framebuffer) => {
this.ctx.bindFramebuffer(target, framebuffer ? this.framebuffers[framebuffer] : null)
},
BindTexture: (target, texture) => {
this.ctx.bindTexture(target, texture ? this.textures[texture] : null)