private void AddDisplay(IntPtr cPtr, Win32Display display) { lock (_displaysLock) { _displays[cPtr] = display; } }
private static void OnTouchUp(IntPtr cPtr, int x, int y, ulong id) { try { Win32Display display = GetDisplay(cPtr); display.TouchUp?.Invoke(display, x, y, id); } catch (Exception e) { Error.SetNativePendingError(e); } }
private static void OnKeyUp(IntPtr cPtr, int key) { try { Win32Display display = GetDisplay(cPtr); display.KeyUp?.Invoke(display, (Key)key); } catch (Exception e) { Error.SetNativePendingError(e); } }
private static void OnChar(IntPtr cPtr, uint c) { try { Win32Display display = GetDisplay(cPtr); display.Char?.Invoke(display, c); } catch (Exception e) { Error.SetNativePendingError(e); } }
private static void OnMouseDoubleClick(IntPtr cPtr, int x, int y, int b) { try { Win32Display display = GetDisplay(cPtr); display.MouseDoubleClick?.Invoke(display, x, y, (MouseButton)b); } catch (Exception e) { Error.SetNativePendingError(e); } }
private static void OnMouseWheel(IntPtr cPtr, int x, int y, int delta) { try { Win32Display display = GetDisplay(cPtr); display.MouseWheel?.Invoke(display, x, y, delta); } catch (Exception e) { Error.SetNativePendingError(e); } }
private static void OnMouseMove(IntPtr cPtr, int x, int y) { try { Win32Display display = GetDisplay(cPtr); display.MouseMove?.Invoke(display, x, y); } catch (Exception e) { Error.SetNativePendingError(e); } }
private static void OnRender(IntPtr cPtr) { try { Win32Display display = GetDisplay(cPtr); display.Render?.Invoke(display); } catch (Exception e) { Error.SetNativePendingError(e); } }
private static void OnFileDropped(IntPtr cPtr, string filename) { try { Win32Display display = GetDisplay(cPtr); display.FileDropped?.Invoke(display, filename); } catch (Exception e) { Error.SetNativePendingError(e); } }
private static void OnStateChanged(IntPtr cPtr, int state) { try { Win32Display display = GetDisplay(cPtr); display.StateChanged?.Invoke(display, (WindowState)state); } catch (Exception e) { Error.SetNativePendingError(e); } }
private static void OnSizeChanged(IntPtr cPtr, int width, int height) { try { Win32Display display = GetDisplay(cPtr); display.SizeChanged?.Invoke(display, width, height); } catch (Exception e) { Error.SetNativePendingError(e); } }