| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Linq;
- using System.Runtime.InteropServices;
- using System.Text;
- using System.Threading.Tasks;
- namespace Avalonia.Gtk3.Interop
- {
- class GObject : SafeHandle
- {
- public GObject() : base(IntPtr.Zero, true)
- {
- }
- public GObject(IntPtr handle, bool owned = true) : base(IntPtr.Zero, owned)
- {
- this.handle = handle;
- }
- protected override bool ReleaseHandle()
- {
- if (handle != IntPtr.Zero)
- {
- Debug.Assert(Native.GTypeCheckInstanceIsFundamentallyA(handle, new IntPtr(Native.G_TYPE_OBJECT)),
- "Handle is not a GObject");
- Native.GObjectUnref(handle);
- }
- handle = IntPtr.Zero;
- return true;
- }
- public override bool IsInvalid => handle == IntPtr.Zero;
- }
- class GInputStream : GObject
- {
-
- }
- class GtkWidget : GObject
- {
-
- }
- class GtkWindow : GtkWidget
- {
- public static GtkWindow Null { get; } = new GtkWindow();
- }
- class GtkImContext : GObject
- {
- }
- class GdkScreen : GObject
- {
- public GdkScreen() : base(IntPtr.Zero, false)
- {
- }
- public GdkScreen(IntPtr handle, bool owned = true) : base(handle, owned)
- {
- this.handle = handle;
- }
- }
- class UnownedGdkScreen : GdkScreen
- {
- public UnownedGdkScreen() : base(IntPtr.Zero, false)
- {
- }
- public UnownedGdkScreen(IntPtr handle, bool owned = true) : base(IntPtr.Zero, false)
- {
- this.handle = handle;
- }
- }
- class GtkDialog : GtkWindow
- {
-
- }
- class GtkFileChooser : GtkDialog
- {
-
- }
- }
|