Exemple #1
0
 private void AddDisplay(IntPtr cPtr, Win32Display display)
 {
     lock (_displaysLock)
     {
         _displays[cPtr] = display;
     }
 }
Exemple #2
0
 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);
     }
 }
Exemple #3
0
 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);
     }
 }
Exemple #4
0
 private static void OnChar(IntPtr cPtr, uint c)
 {
     try
     {
         Win32Display display = GetDisplay(cPtr);
         display.Char?.Invoke(display, c);
     }
     catch (Exception e)
     {
         Error.SetNativePendingError(e);
     }
 }
Exemple #5
0
 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);
     }
 }
Exemple #6
0
 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);
     }
 }
Exemple #7
0
 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);
     }
 }
Exemple #8
0
 private static void OnRender(IntPtr cPtr)
 {
     try
     {
         Win32Display display = GetDisplay(cPtr);
         display.Render?.Invoke(display);
     }
     catch (Exception e)
     {
         Error.SetNativePendingError(e);
     }
 }
Exemple #9
0
 private static void OnFileDropped(IntPtr cPtr, string filename)
 {
     try
     {
         Win32Display display = GetDisplay(cPtr);
         display.FileDropped?.Invoke(display, filename);
     }
     catch (Exception e)
     {
         Error.SetNativePendingError(e);
     }
 }
Exemple #10
0
 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);
     }
 }
Exemple #11
0
 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);
     }
 }