IWindowBaseImpl.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. using System;
  2. using Avalonia.Controls;
  3. namespace Avalonia.Platform
  4. {
  5. public interface IWindowBaseImpl : ITopLevelImpl
  6. {
  7. /// <summary>
  8. /// Shows the top level.
  9. /// </summary>
  10. void Show();
  11. /// <summary>
  12. /// Hides the window.
  13. /// </summary>
  14. void Hide();
  15. /// <summary>
  16. /// Starts moving a window with left button being held. Should be called from left mouse button press event handler.
  17. /// </summary>
  18. void BeginMoveDrag();
  19. /// <summary>
  20. /// Starts resizing a window. This function is used if an application has window resizing controls.
  21. /// Should be called from left mouse button press event handler
  22. /// </summary>
  23. void BeginResizeDrag(WindowEdge edge);
  24. /// <summary>
  25. /// Gets position of the window relatively to the screen
  26. /// </summary>
  27. Point Position { get; set; }
  28. /// <summary>
  29. /// Gets or sets a method called when the window's position changes.
  30. /// </summary>
  31. Action<Point> PositionChanged { get; set; }
  32. /// <summary>
  33. /// Activates the window.
  34. /// </summary>
  35. void Activate();
  36. /// <summary>
  37. /// Gets or sets a method called when the window is deactivated (loses focus).
  38. /// </summary>
  39. Action Deactivated { get; set; }
  40. /// <summary>
  41. /// Gets or sets a method called when the window is activated (receives focus).
  42. /// </summary>
  43. Action Activated { get; set; }
  44. /// <summary>
  45. /// Gets the platform window handle.
  46. /// </summary>
  47. IPlatformHandle Handle { get; }
  48. /// <summary>
  49. /// Gets the maximum size of a window on the system.
  50. /// </summary>
  51. Size MaxClientSize { get; }
  52. /// <summary>
  53. /// Sets the client size of the top level.
  54. /// </summary>
  55. void Resize(Size clientSize);
  56. /// <summary>
  57. /// Minimum width of the window.
  58. /// </summary>
  59. ///
  60. void SetMinMaxSize(Size minSize, Size maxSize);
  61. /// <summary>
  62. /// Sets whether this window appears on top of all other windows
  63. /// </summary>
  64. void SetTopmost(bool value);
  65. /// <summary>
  66. /// Gets platform specific display information
  67. /// </summary>
  68. IScreenImpl Screen { get; }
  69. }
  70. }