mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Merge pull request #2120 from jceipek/fix-nsapplication-shouldTerminateAfterLastWindowClosed
Fix signature for `shouldTerminateAfterLastWindowClosed` delegate proc
This commit is contained in:
+3
-3
@@ -11,7 +11,7 @@ ActivationPolicy :: enum UInteger {
|
|||||||
ApplicationDelegate :: struct {
|
ApplicationDelegate :: struct {
|
||||||
willFinishLaunching: proc "c" (self: ^ApplicationDelegate, notification: ^Notification),
|
willFinishLaunching: proc "c" (self: ^ApplicationDelegate, notification: ^Notification),
|
||||||
didFinishLaunching: proc "c" (self: ^ApplicationDelegate, notification: ^Notification),
|
didFinishLaunching: proc "c" (self: ^ApplicationDelegate, notification: ^Notification),
|
||||||
shouldTerminateAfterLastWindowClosed: proc "c" (self: ^ApplicationDelegate, sender: ^Application),
|
shouldTerminateAfterLastWindowClosed: proc "c" (self: ^ApplicationDelegate, sender: ^Application) -> BOOL,
|
||||||
|
|
||||||
user_data: rawptr,
|
user_data: rawptr,
|
||||||
}
|
}
|
||||||
@@ -34,9 +34,9 @@ Application_setDelegate :: proc(self: ^Application, delegate: ^ApplicationDelega
|
|||||||
del := (^ApplicationDelegate)(self->pointerValue())
|
del := (^ApplicationDelegate)(self->pointerValue())
|
||||||
del->didFinishLaunching(notification)
|
del->didFinishLaunching(notification)
|
||||||
}
|
}
|
||||||
shouldTerminateAfterLastWindowClosed :: proc "c" (self: ^Value, _: SEL, application: ^Application) {
|
shouldTerminateAfterLastWindowClosed :: proc "c" (self: ^Value, _: SEL, application: ^Application) -> BOOL {
|
||||||
del := (^ApplicationDelegate)(self->pointerValue())
|
del := (^ApplicationDelegate)(self->pointerValue())
|
||||||
del->shouldTerminateAfterLastWindowClosed(application)
|
return del->shouldTerminateAfterLastWindowClosed(application)
|
||||||
}
|
}
|
||||||
|
|
||||||
wrapper := Value.valueWithPointer(delegate)
|
wrapper := Value.valueWithPointer(delegate)
|
||||||
|
|||||||
Reference in New Issue
Block a user