mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-19 01:01:31 -07:00
Minor aesthetic clean ups of Foundation
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user