WindowImpl.cs 943 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using Avalonia.Controls;
  3. using Avalonia.Gtk3.Interop;
  4. using Avalonia.Platform;
  5. namespace Avalonia.Gtk3
  6. {
  7. class WindowImpl : TopLevelImpl, IWindowImpl
  8. {
  9. public WindowState WindowState { get; set; } //STUB
  10. public void SetTitle(string title)
  11. {
  12. using (var t = new Utf8Buffer(title))
  13. Native.GtkWindowSetTitle(GtkWidget, t);
  14. }
  15. public IDisposable ShowDialog()
  16. {
  17. return null;
  18. //STUB
  19. }
  20. public void SetSystemDecorations(bool enabled) => Native.GtkWindowSetDecorated(GtkWidget, enabled);
  21. public void SetIcon(IWindowIconImpl icon)
  22. {
  23. //STUB
  24. }
  25. public WindowImpl() : base(Native.GtkWindowNew(GtkWindowType.TopLevel))
  26. {
  27. }
  28. public void SetCoverTaskbarWhenMaximized(bool enable)
  29. {
  30. //Why do we even have that?
  31. }
  32. }
  33. }