aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn <terids@gmail.com>2025-11-03 17:54:42 +0000
committerGlenn <terids@gmail.com>2025-11-03 17:54:42 +0000
commit8b3d74f797e118b165c7669d0249291a56a1a2a5 (patch)
tree4c7ad330481179fee700f8734d61ae54d6ca736d
parent406eb9c7f56436c44ccef093973fe35d59c30a75 (diff)
Add getter for the WindowDelegate from the Window
-rw-r--r--core/sys/darwin/Foundation/NSWindow.odin4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/sys/darwin/Foundation/NSWindow.odin b/core/sys/darwin/Foundation/NSWindow.odin
index ffe848ad4..2e51d7b64 100644
--- a/core/sys/darwin/Foundation/NSWindow.odin
+++ b/core/sys/darwin/Foundation/NSWindow.odin
@@ -776,6 +776,10 @@ Window_close :: proc "c" (self: ^Window) {
Window_setDelegate :: proc "c" (self: ^Window, delegate: ^WindowDelegate) {
msgSend(nil, self, "setDelegate:", delegate)
}
+@(objc_type = Window, objc_name = "delegate")
+Window_delegate :: proc "c" (self: ^Window) -> ^WindowDelegate {
+ return msgSend(^WindowDelegate, self, "delegate")
+}
@(objc_type=Window, objc_name="backingScaleFactor")
Window_backingScaleFactor :: proc "c" (self: ^Window) -> Float {
return msgSend(Float, self, "backingScaleFactor")