IWindowBaseImpl.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using System;
  2. namespace Avalonia.Platform
  3. {
  4. public interface IWindowBaseImpl : ITopLevelImpl
  5. {
  6. /// <summary>
  7. /// Shows the top level.
  8. /// </summary>
  9. void Show();
  10. /// <summary>
  11. /// Hides the window.
  12. /// </summary>
  13. void Hide();
  14. /// <summary>
  15. /// Gets the scaling factor for Window positioning and sizing.
  16. /// </summary>
  17. double DesktopScaling { get; }
  18. /// <summary>
  19. /// Gets the position of the window in device pixels.
  20. /// </summary>
  21. PixelPoint Position { get; }
  22. /// <summary>
  23. /// Gets or sets a method called when the window's position changes.
  24. /// </summary>
  25. Action<PixelPoint> PositionChanged { get; set; }
  26. /// <summary>
  27. /// Activates the window.
  28. /// </summary>
  29. void Activate();
  30. /// <summary>
  31. /// Gets or sets a method called when the window is deactivated (loses focus).
  32. /// </summary>
  33. Action Deactivated { get; set; }
  34. /// <summary>
  35. /// Gets or sets a method called when the window is activated (receives focus).
  36. /// </summary>
  37. Action Activated { get; set; }
  38. /// <summary>
  39. /// Gets the platform window handle.
  40. /// </summary>
  41. IPlatformHandle Handle { get; }
  42. /// <summary>
  43. /// Gets a maximum client size hint for an auto-sizing window, in device-independent pixels.
  44. /// </summary>
  45. Size MaxAutoSizeHint { get; }
  46. /// <summary>
  47. /// Sets whether this window appears on top of all other windows
  48. /// </summary>
  49. void SetTopmost(bool value);
  50. /// <summary>
  51. /// Gets platform specific display information
  52. /// </summary>
  53. IScreenImpl Screen { get; }
  54. }
  55. }