Replace the remaining .kry and C application sources with Ziran modules, move vendored dependencies to their current pointers, and add Ziran tests for the ported hosts and policies. Co-Authored-By: Claude Opus 5.5 <[email protected]>
31 lines
723 B
Ziran
31 lines
723 B
Ziran
#import, file "../src/platform/window_close_host.zi";
|
|
|
|
#program_export
|
|
main :: () -> s32 {
|
|
app_close_window_id = 42
|
|
event: WindowEventHeader
|
|
event.event_type = 0x200
|
|
event.window_id = 41
|
|
event.event = 14
|
|
AppWindowCloseEvent(null, cast(*void)(*event))
|
|
if native_take_window_close() != 0 {
|
|
return 1
|
|
}
|
|
|
|
event.window_id = 42
|
|
event.event = 4
|
|
AppWindowCloseEvent(null, cast(*void)(*event))
|
|
if native_take_window_close() != 0 {
|
|
return 2
|
|
}
|
|
|
|
event.event = 14
|
|
AppWindowCloseEvent(null, cast(*void)(*event))
|
|
if native_take_window_close() != 1 ||
|
|
native_take_window_close() != 0 {
|
|
return 3
|
|
}
|
|
app_close_window_id = 0
|
|
return 0
|
|
}
|