#import "modules/std.sx"; #import "modules/ui/types.sx"; #import "modules/ui/events.sx"; #import "modules/platform/types.sx"; Platform :: protocol { init :: (title: [:0]u8, w: s32, h: s32) -> bool; run_frame_loop :: (frame_fn: Closure()); poll_events :: () -> []Event; begin_frame :: () -> FrameContext; end_frame :: (); safe_insets :: () -> EdgeInsets; keyboard :: () -> KeyboardState; show_keyboard :: (); hide_keyboard :: (); // Request the run loop to stop. On iOS/Android this is a no-op // (mobile apps don't quit on user request); on SDL it tears down the // `while !quit` loop. stop :: (); shutdown :: (); }