mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Correct types
This commit is contained in:
@@ -2,6 +2,11 @@ package objc_Foundation
|
||||
|
||||
import NS "core:sys/darwin/Foundation"
|
||||
|
||||
Rect :: struct {
|
||||
x, y: f64,
|
||||
width, height: f64,
|
||||
}
|
||||
|
||||
@(objc_class="CALayer")
|
||||
Layer :: struct { using _: NS.Object }
|
||||
|
||||
@@ -19,6 +24,19 @@ 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")
|
||||
}
|
||||
|
||||
@(objc_type=Window, objc_name="setFrame")
|
||||
Window_setFrame :: proc(self: ^Window, frame: Rect) {
|
||||
msgSend(nil, self, "setFrame:", frame)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@(objc_type=View, objc_name="layer")
|
||||
View_layer :: proc(self: ^View) -> ^Layer {
|
||||
return msgSend(^Layer, self, "layer")
|
||||
@@ -29,7 +47,6 @@ View_setLayer :: proc(self: ^View, layer: ^Layer) {
|
||||
msgSend(nil, self, "setLayer:", layer)
|
||||
}
|
||||
|
||||
|
||||
@(objc_type=View, objc_name="wantsLayer")
|
||||
View_wantsLayer :: proc(self: ^View) -> BOOL {
|
||||
return msgSend(BOOL, self, "wantsLayer")
|
||||
|
||||
Reference in New Issue
Block a user