csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.1 KiB
48 lines
1.1 KiB
using System;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Gtk3.Interop;
|
|
using Avalonia.Platform;
|
|
|
|
namespace Avalonia.Gtk3
|
|
{
|
|
class WindowImpl : TopLevelImpl, IWindowImpl
|
|
{
|
|
public WindowState WindowState { get; set; } //STUB
|
|
public void SetTitle(string title)
|
|
{
|
|
using (var t = new Utf8Buffer(title))
|
|
Native.GtkWindowSetTitle(_gtkWidget, t);
|
|
}
|
|
|
|
public IDisposable ShowDialog()
|
|
{
|
|
return null;
|
|
//STUB
|
|
}
|
|
|
|
public void SetSystemDecorations(bool enabled) => Native.GtkWindowSetDecorated(_gtkWidget, enabled);
|
|
|
|
public void SetIcon(IWindowIconImpl icon)
|
|
{
|
|
//STUB
|
|
}
|
|
|
|
public WindowImpl() : base(Native.GtkWindowNew(GtkWindowType.TopLevel))
|
|
{
|
|
}
|
|
|
|
public override Size ClientSize
|
|
{
|
|
get
|
|
{
|
|
int w, h;
|
|
Native.GtkWindowGetSize(_gtkWidget, out w, out h);
|
|
return new Size(w, h);
|
|
}
|
|
set
|
|
{
|
|
//STUB
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|