INativeControlHostImpl.cs 1018 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Diagnostics.CodeAnalysis;
  3. using Avalonia.Metadata;
  4. using Avalonia.Platform;
  5. namespace Avalonia.Controls.Platform
  6. {
  7. [Unstable]
  8. public interface INativeControlHostImpl
  9. {
  10. INativeControlHostDestroyableControlHandle CreateDefaultChild(IPlatformHandle parent);
  11. INativeControlHostControlTopLevelAttachment CreateNewAttachment(Func<IPlatformHandle, IPlatformHandle> create);
  12. INativeControlHostControlTopLevelAttachment CreateNewAttachment(IPlatformHandle handle);
  13. bool IsCompatibleWith(IPlatformHandle handle);
  14. }
  15. [Unstable]
  16. public interface INativeControlHostDestroyableControlHandle : IPlatformHandle
  17. {
  18. void Destroy();
  19. }
  20. [Unstable]
  21. public interface INativeControlHostControlTopLevelAttachment : IDisposable
  22. {
  23. INativeControlHostImpl? AttachedTo { get; set; }
  24. bool IsCompatibleWith(INativeControlHostImpl host);
  25. void HideWithSize(Size size);
  26. void ShowInBounds(Rect rect);
  27. }
  28. }