Example #1
0
 static CursorStatus HandleCursor(WindowID inwindowid, int x, int y, void *inrefcon) =>
 Utils.TryGetObject <WindowBase>(inrefcon)?.OnCursorRequested(x, y) ?? CursorStatus.Default;
Example #2
0
 static void HandleKey(WindowID inwindowid, byte inkey, KeyFlags inflags, byte invirtualkey, void *inrefcon, int losingfocus) =>
 Utils.TryGetObject <WindowBase>(inrefcon)?.OnKeyEvent(inkey, inflags, invirtualkey, losingfocus == 1);
Example #3
0
 static int HandleMouseRightClick(WindowID inwindowid, int x, int y, MouseStatus inmouse, void *inrefcon) =>
 (Utils.TryGetObject <WindowBase>(inrefcon)?.OnMouseRightButtonEvent(x, y, inmouse) == true).ToInt();
Example #4
0
 static int HandleMouseWheel(WindowID inwindowid, int x, int y, int wheel, int clicks, void *inrefcon) =>
 (Utils.TryGetObject <WindowBase>(inrefcon)?.OnMouseWheelEvent(x, y, (MouseWheel)wheel, clicks) == true).ToInt();
Example #5
0
 static void DrawWindow(WindowID inwindowid, void *inrefcon) =>
 Utils.TryGetObject <WindowBase>(inrefcon)?.OnDrawWindow();