static Point TranslateCoordinates(Xwt.Toolkit sourceToolkit, Xwt.Toolkit targetToolkit, Point point) { if (sourceToolkit == targetToolkit) { return(point); } sourceToolkit.Invoke(() => { var desktopBounds = Desktop.Bounds; point.X -= desktopBounds.X; point.Y -= desktopBounds.Y; }); targetToolkit.Invoke(() => { var desktopBounds = Desktop.Bounds; point.X += desktopBounds.X; point.Y += desktopBounds.Y; }); return(point); }
public static void Exit() { Toolkit.InvokePlatformCode(delegate { engine.ExitApplication(); }); }
internal void SetActive() { currentEngine = this; }
public static void Run() { Toolkit.InvokePlatformCode(delegate { engine.RunApplication(); }); }
internal UILoop(Toolkit toolkit) { this.toolkit = toolkit; }
/// <summary> /// Initialize Xwt with the specified type. /// </summary> /// <param name="type">The toolkit type.</param> public static void Initialize(ToolkitType type) { Initialize(Toolkit.GetBackendType(type)); toolkit.Type = type; }
/// <summary> /// Releases all resources used by the application /// </summary> /// <remarks>This method must be called before the application process ends</remarks> public static void Dispose() { ResourceManager.Dispose(); Toolkit.DisposeAll(); }
internal Screen(object backend, Toolkit toolkit) : base(backend, toolkit) { }
public void SetActive() { currentEngine = this; }
protected XwtObject() { ToolkitEngine = Toolkit.CurrentEngine; }
protected XwtObject(object backend, Toolkit toolkit) { this.backend = backend; ToolkitEngine = Toolkit.CurrentEngine; }