pub const EVENT_CODE_SOURCE: &str = "// Xila\'s event contract, independent of LVGL\'s native discriminants.\n// Keep the event order stable; the executor translates at the call boundary.\n// This file is included as source by `xila-graphics` and by guest bindings.\n\n#[repr(C)]\n#[derive(Clone, Copy, Debug, PartialEq, Eq)]\npub enum EventCode {\n All = 0,\n Pressed,\n Pressing,\n PressLost,\n ShortClicked,\n SingleClicked,\n DoubleClicked,\n TripleClicked,\n LongPressed,\n LongPressedRepeat,\n Clicked,\n Released,\n ScrollBegin,\n ScrollThrowBegin,\n ScrollEnd,\n Scroll,\n Gesture,\n Key,\n Rotary,\n Focused,\n Defocused,\n Leave,\n HitTest,\n IndevReset,\n HoverOver,\n HoverLeave,\n CoverCheck,\n RefreshExtDrawSize,\n DrawMainBegin,\n DrawMain,\n DrawMainEnd,\n DrawPostBegin,\n DrawPost,\n DrawPostEnd,\n DrawTaskAdded,\n ValueChanged,\n Insert,\n Refresh,\n Ready,\n Cancel,\n Create,\n Delete,\n ChildChanged,\n ChildCreated,\n ChildDeleted,\n ScreenUnloadStart,\n ScreenLoadStart,\n ScreenLoaded,\n ScreenUnloaded,\n SizeChanged,\n StyleChanged,\n LayoutChanged,\n GetSelfSize,\n InvalidateArea,\n ResolutionChanged,\n ColorFormatChanged,\n RefreshRequest,\n RefreshStart,\n RefreshReady,\n RenderStart,\n RenderReady,\n FlushStart,\n FlushFinish,\n FlushWaitStart,\n FlushWaitFinish,\n Vsync,\n VsyncRequest,\n Last,\n Preprocess = 0x8000,\n MarkedDeleting = 0x10000,\n}\n\n// A literal, `EventCode::Last + 3`: cbindgen cannot name the enum\'s variant in\n// a C expression, so the executor\'s tests check the two agree.\n/// Xila window close request, separate from LVGL\'s standard events.\npub const EVENT_CLOSE_REQUESTED: u32 = 70;\n";Expand description
The Xila event contract shared by guests and the executor, as Rust source.
xila-graphics compiles this file as the host’s event_code module and
guest bindings include the same text, so the two cannot drift.