public static void OnDraw() { global::Uno.Application app = global::Uno.Application.Current; global::Uno.Graphics.GraphicsController gc = app.GraphicsController; gc.SetRenderTarget(gc.Backbuffer); gc.Clear(gc.ClearColor, gc.ClearDepth); app.Draw(); }
public static void OnWindowSizeChanged(global::Uno.Runtime.Implementation.PlatformWindowHandle handle) { global::Uno.Application app = global::Uno.Application.Current; if (app != null) { app.GraphicsController.UpdateBackbuffer(); app.Window.OnResized(global::System.EventArgs.Empty); } }
public static bool OnMouseUp(global::Uno.Runtime.Implementation.PlatformWindowHandle handle, int x, int y, global::Uno.Platform.MouseButton button) { global::Uno.Application app = global::Uno.Application.Current; if (app == null) { return(false); } global::Uno.Platform.PointerEventArgs args = new global::Uno.Platform.PointerEventArgs(global::Uno.Platform.PointerType.Mouse, Bootstrapper.GetEventModifiers(handle), button == global::Uno.Platform.MouseButton.Left, new global::Uno.Float2((float)x, (float)y), 0, button, new global::Uno.Float2(0.0f, 0.0f), global::Uno.Platform.WheelDeltaMode.DeltaPixel); global::Uno.Platform.EventSources.MouseSource.OnPointerReleased(args); return(args.Handled); }
public static bool OnMouseWheel(global::Uno.Runtime.Implementation.PlatformWindowHandle handle, float dHori, float dVert, int wheelDeltaMode) { global::Uno.Application app = global::Uno.Application.Current; if (app == null) { return(false); } global::Uno.Platform.PointerEventArgs args = new global::Uno.Platform.PointerEventArgs(global::Uno.Platform.PointerType.Mouse, Bootstrapper.GetEventModifiers(handle), false, new global::Uno.Float2((float)Bootstrapper._lastMouseX, (float)Bootstrapper._lastMouseY), 0, 0, new global::Uno.Float2(dHori, dVert), (global::Uno.Platform.WheelDeltaMode)wheelDeltaMode); global::Uno.Platform.EventSources.MouseSource.OnPointerWheelChanged(args); return(args.Handled); }
public static bool OnMouseOut(global::Uno.Runtime.Implementation.PlatformWindowHandle handle) { global::Uno.Application app = global::Uno.Application.Current; if (app == null) { return(false); } global::Uno.Platform.EventModifiers modifiers = Bootstrapper.GetEventModifiers(handle); global::Uno.Platform.PointerEventArgs args = new global::Uno.Platform.PointerEventArgs(global::Uno.Platform.PointerType.Mouse, modifiers, modifiers.HasFlag(global::Uno.Platform.EventModifiers.LeftButton), new global::Uno.Float2(0.0f, 0.0f), 0, 0, new global::Uno.Float2(0.0f, 0.0f), global::Uno.Platform.WheelDeltaMode.DeltaPixel); global::Uno.Platform.EventSources.MouseSource.OnPointerLeft(args); return(args.Handled); }
public static bool OnTouchMove(global::Uno.Runtime.Implementation.PlatformWindowHandle handle, float x, float y, int id) { global::Uno.Application app = global::Uno.Application.Current; if (Bootstrapper._fingerCount == 1) { Bootstrapper._lastPrimaryFingerId = id; } if (app == null) { return(false); } global::Uno.Platform.PointerEventArgs args = new global::Uno.Platform.PointerEventArgs(global::Uno.Platform.PointerType.Touch, Bootstrapper.GetEventModifiers(handle), Bootstrapper.IsPrimaryFinger(handle, id), new global::Uno.Float2(x, y), id, 0, new global::Uno.Float2(0.0f, 0.0f), global::Uno.Platform.WheelDeltaMode.DeltaPixel); global::Uno.Platform.EventSources.MouseSource.OnPointerMoved(args); return(args.Handled); }