PopupImpl.cs 882 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using Avalonia.Native.Interop;
  3. using Avalonia.Platform;
  4. namespace Avalonia.Native
  5. {
  6. public class PopupImpl : WindowBaseImpl, IPopupImpl
  7. {
  8. IAvnPopup _native;
  9. public PopupImpl(IAvaloniaNativeFactory factory)
  10. {
  11. using (var e = new PopupEvents(this))
  12. Init(_native = factory.CreatePopup(e), factory.CreateScreens());
  13. }
  14. public override void Dispose()
  15. {
  16. _native.Dispose();
  17. base.Dispose();
  18. }
  19. class PopupEvents : WindowBaseEvents, IAvnWindowEvents
  20. {
  21. readonly PopupImpl _parent;
  22. public PopupEvents(PopupImpl parent) : base(parent)
  23. {
  24. _parent = parent;
  25. }
  26. void IAvnWindowEvents.WindowStateChanged(AvnWindowState state)
  27. {
  28. }
  29. }
  30. }
  31. }