diff --git a/core/sys/darwin/Foundation/NSBundle.odin b/core/sys/darwin/Foundation/NSBundle.odin index 4f5a8e928..5e136378b 100644 --- a/core/sys/darwin/Foundation/NSBundle.odin +++ b/core/sys/darwin/Foundation/NSBundle.odin @@ -105,7 +105,6 @@ Bundle_sharedFrameworksURL :: proc(self: ^Bundle) -> ^URL { return msgSend(^URL, self, "sharedFrameworksURL") } - @(objc_type=Bundle, objc_name="sharedSupportURL") Bundle_sharedSupportURL :: proc(self: ^Bundle) -> ^URL { return msgSend(^URL, self, "sharedSupportURL") @@ -121,9 +120,6 @@ Bundle_appStoreReceiptURL :: proc(self: ^Bundle) -> ^URL { return msgSend(^URL, self, "appStoreReceiptURL") } - - - @(objc_type=Bundle, objc_name="bundlePath") Bundle_bundlePath :: proc(self: ^Bundle) -> ^String { return msgSend(^String, self, "bundlePath") @@ -154,7 +150,6 @@ Bundle_sharedFrameworksPath :: proc(self: ^Bundle) -> ^String { return msgSend(^String, self, "sharedFrameworksPath") } - @(objc_type=Bundle, objc_name="sharedSupportPath") Bundle_sharedSupportPath :: proc(self: ^Bundle) -> ^String { return msgSend(^String, self, "sharedSupportPath") @@ -175,7 +170,6 @@ Bundle_bundleIdentifier :: proc(self: ^Bundle) -> ^String { return msgSend(^String, self, "bundleIdentifier") } - @(objc_type=Bundle, objc_name="infoDictionary") Bundle_infoDictionary :: proc(self: ^Bundle) -> ^Dictionary { return msgSend(^Dictionary, self, "infoDictionary") diff --git a/core/sys/darwin/Foundation/NSDate.odin b/core/sys/darwin/Foundation/NSDate.odin index cd63d313a..e30cb07d0 100644 --- a/core/sys/darwin/Foundation/NSDate.odin +++ b/core/sys/darwin/Foundation/NSDate.odin @@ -13,7 +13,6 @@ Date_init :: proc(self: ^Date) -> ^Date { return msgSend(^Date, self, "init") } - @(objc_type=Date, objc_name="dateWithTimeIntervalSinceNow") Date_dateWithTimeIntervalSinceNow :: proc(secs: TimeInterval) -> ^Date { return msgSend(^Date, Date, "dateWithTimeIntervalSinceNow:", secs) diff --git a/core/sys/darwin/Foundation/NSDictionary.odin b/core/sys/darwin/Foundation/NSDictionary.odin index 1f009841a..3832c05f1 100644 --- a/core/sys/darwin/Foundation/NSDictionary.odin +++ b/core/sys/darwin/Foundation/NSDictionary.odin @@ -29,7 +29,6 @@ Dictionary_init :: proc(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 { return msgSend(^Dictionary, self, "initWithObjects:forKeys:count", objects, forKeys, count) diff --git a/core/sys/darwin/Foundation/NSNotification.odin b/core/sys/darwin/Foundation/NSNotification.odin index 182d33896..ec8dddab7 100644 --- a/core/sys/darwin/Foundation/NSNotification.odin +++ b/core/sys/darwin/Foundation/NSNotification.odin @@ -14,7 +14,6 @@ Notification_init :: proc(self: ^Notification) -> ^Notification { return msgSend(^Notification, self, "init") } - @(objc_type=Notification, objc_name="name") Notification_name :: proc(self: ^Notification) -> ^String { return msgSend(^String, self, "name") diff --git a/core/sys/darwin/Foundation/NSNumber.odin b/core/sys/darwin/Foundation/NSNumber.odin index 4f7ef311b..016698805 100644 --- a/core/sys/darwin/Foundation/NSNumber.odin +++ b/core/sys/darwin/Foundation/NSNumber.odin @@ -63,7 +63,6 @@ Value_pointerValue :: proc(self: ^Value) -> rawptr { @(objc_class="NSNumber") Number :: struct{using _: Copying(Number), using _: Value} - @(objc_type=Number, objc_name="alloc", objc_is_class_method=true) Number_alloc :: proc() -> ^Number { return msgSend(^Number, Number, "alloc") diff --git a/core/sys/darwin/Foundation/NSString.odin b/core/sys/darwin/Foundation/NSString.odin index ae1d6d43f..45b5df37b 100644 --- a/core/sys/darwin/Foundation/NSString.odin +++ b/core/sys/darwin/Foundation/NSString.odin @@ -49,12 +49,12 @@ StringCompareOption :: enum UInteger { unichar :: distinct u16 -foreign Foundation { - __CFStringMakeConstantString :: proc "c" (c: cstring) -> ^String --- -} AT :: MakeConstantString MakeConstantString :: proc "c" (#const c: cstring) -> ^String { + foreign Foundation { + __CFStringMakeConstantString :: proc "c" (c: cstring) -> ^String --- + } return __CFStringMakeConstantString(c) } diff --git a/core/sys/darwin/Foundation/NSURL.odin b/core/sys/darwin/Foundation/NSURL.odin index 9813b6e59..72e5fc906 100644 --- a/core/sys/darwin/Foundation/NSURL.odin +++ b/core/sys/darwin/Foundation/NSURL.odin @@ -14,14 +14,17 @@ URL_init :: proc(self: ^URL) -> ^URL { return msgSend(^URL, self, "init") } - +@(objc_type=URL, objc_name="initWithString") URL_initWithString :: proc(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 { return msgSend(^URL, self, "initFileURLWithPath:", path) } +@(objc_type=URL, objc_name="fileSystemRepresentation") URL_fileSystemRepresentation :: proc(self: ^URL) -> ^String { return msgSend(^String, self, "fileSystemRepresentation") } \ No newline at end of file diff --git a/core/sys/darwin/Foundation/NSWindow.odin b/core/sys/darwin/Foundation/NSWindow.odin index e109284d1..df675cfeb 100644 --- a/core/sys/darwin/Foundation/NSWindow.odin +++ b/core/sys/darwin/Foundation/NSWindow.odin @@ -23,7 +23,6 @@ View :: struct {using _: Responder} View_layer :: proc(self: ^View) -> ^Layer { return msgSend(^Layer, self, "layer") } - @(objc_type=View, objc_name="setLayer") View_setLayer :: proc(self: ^View, layer: ^Layer) { msgSend(nil, self, "setLayer:", layer) @@ -32,13 +31,10 @@ View_setLayer :: proc(self: ^View, layer: ^Layer) { View_setSubLayer :: proc(self: ^View, layer: ^Layer) { msgSend(nil, self, "setSubLayer:", layer) } - - @(objc_type=View, objc_name="wantsLayer") View_wantsLayer :: proc(self: ^View) -> BOOL { return msgSend(BOOL, self, "wantsLayer") } - @(objc_type=View, objc_name="setWantsLayer") View_setWantsLayer :: proc(self: ^View, wantsLayer: BOOL) { msgSend(nil, self, "setWantsLayer:", wantsLayer) @@ -52,7 +48,6 @@ Window :: struct {using _: Responder} Window_contentView :: proc(self: ^Window) -> ^View { return msgSend(^View, self, "contentView") } - @(objc_type=Window, objc_name="frame") Window_frame :: proc(self: ^Window) -> Rect { return msgSend(Rect, self, "frame") @@ -61,7 +56,6 @@ Window_frame :: proc(self: ^Window) -> Rect { Window_setFrame :: proc(self: ^Window, frame: Rect) { msgSend(nil, self, "setFrame:", frame) } - @(objc_type=Window, objc_name="opaque") Window_opaque :: proc(self: ^Window) -> NS.BOOL { return msgSend(NS.BOOL, self, "opaque") @@ -70,7 +64,6 @@ Window_opaque :: proc(self: ^Window) -> NS.BOOL { Window_setOpaque :: proc(self: ^Window, ok: NS.BOOL) { msgSend(nil, self, "setOpaque:", ok) } - @(objc_type=Window, objc_name="backgroundColor") Window_backgroundColor :: proc(self: ^Window) -> ^NS.Color { return msgSend(^NS.Color, self, "backgroundColor")