|
|
@ -36,7 +36,19 @@ namespace Avalonia.Gtk3.Interop |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gtk)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gtk)] |
|
|
public delegate IntPtr gtk_widget_get_window(IntPtr gtkWidget); |
|
|
public delegate IntPtr gtk_widget_get_window(IntPtr gtkWidget); |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gtk)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gtk)] |
|
|
|
|
|
public delegate IntPtr gtk_widget_get_screen(IntPtr gtkWidget); |
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gtk)] |
|
|
public delegate IntPtr gtk_widget_set_double_buffered(IntPtr gtkWidget, bool value); |
|
|
public delegate IntPtr gtk_widget_set_double_buffered(IntPtr gtkWidget, bool value); |
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gtk)] |
|
|
|
|
|
public delegate IntPtr gtk_widget_set_events(IntPtr gtkWidget, uint flags); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gdk)] |
|
|
|
|
|
public delegate int gdk_screen_get_height(IntPtr screen); |
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gdk)] |
|
|
|
|
|
public delegate int gdk_screen_get_width(IntPtr screen); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gtk)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gtk)] |
|
|
public delegate void gtk_widget_realize(IntPtr gtkWidget); |
|
|
public delegate void gtk_widget_realize(IntPtr gtkWidget); |
|
|
@ -50,12 +62,29 @@ namespace Avalonia.Gtk3.Interop |
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gtk)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gtk)] |
|
|
public delegate void gtk_window_get_size(IntPtr gtkWindow, out int width, out int height); |
|
|
public delegate void gtk_window_get_size(IntPtr gtkWindow, out int width, out int height); |
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gtk)] |
|
|
|
|
|
public delegate void gtk_window_resize(IntPtr gtkWindow, int width, int height); |
|
|
|
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gtk)] |
|
|
|
|
|
public delegate void gtk_widget_queue_draw_area(IntPtr gtkWindow, int x, int y, int width, int height); |
|
|
|
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gdk)] |
|
|
|
|
|
public delegate void gdk_window_invalidate_rect(IntPtr window, ref GdkRectangle rect, bool invalidate_children); |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gobject)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gobject)] |
|
|
public delegate ulong g_signal_connect_object(IntPtr instance, [MarshalAs(UnmanagedType.AnsiBStr)]string signal, IntPtr handler, IntPtr userData, int flags); |
|
|
public delegate ulong g_signal_connect_object(IntPtr instance, [MarshalAs(UnmanagedType.AnsiBStr)]string signal, IntPtr handler, IntPtr userData, int flags); |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gobject)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Gobject)] |
|
|
public delegate ulong g_signal_handler_disconnect(IntPtr instance, ulong connectionId); |
|
|
public delegate ulong g_signal_handler_disconnect(IntPtr instance, ulong connectionId); |
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl), GtkImport(GtkDll.Glib)] |
|
|
|
|
|
public delegate ulong g_timeout_add(uint interval, timeout_callback callback, IntPtr data); |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
public delegate bool signal_widget_draw(IntPtr gtkWidget, IntPtr cairoContext, IntPtr userData); |
|
|
public delegate bool signal_widget_draw(IntPtr gtkWidget, IntPtr cairoContext, IntPtr userData); |
|
|
|
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
|
|
|
public delegate bool signal_onevent(IntPtr gtkWidget, IntPtr ev, IntPtr userData); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
|
|
|
public delegate bool timeout_callback(IntPtr data); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -69,12 +98,19 @@ namespace Avalonia.Gtk3.Interop |
|
|
public static D.gtk_widget_hide GtkWidgetHide; |
|
|
public static D.gtk_widget_hide GtkWidgetHide; |
|
|
public static D.gdk_get_native_handle GetNativeGdkWindowHandle; |
|
|
public static D.gdk_get_native_handle GetNativeGdkWindowHandle; |
|
|
public static D.gtk_widget_get_window GtkWidgetGetWindow; |
|
|
public static D.gtk_widget_get_window GtkWidgetGetWindow; |
|
|
|
|
|
public static D.gtk_widget_get_screen GtkWidgetGetScreen; |
|
|
public static D.gtk_widget_realize GtkWidgetRealize; |
|
|
public static D.gtk_widget_realize GtkWidgetRealize; |
|
|
public static D.gtk_window_get_size GtkWindowGetSize; |
|
|
public static D.gtk_window_get_size GtkWindowGetSize; |
|
|
|
|
|
public static D.gtk_window_resize GtkWindowResize; |
|
|
public static D.g_signal_connect_object GSignalConnectObject; |
|
|
public static D.g_signal_connect_object GSignalConnectObject; |
|
|
public static D.g_signal_handler_disconnect GSignalHandlerDisconnect; |
|
|
public static D.g_signal_handler_disconnect GSignalHandlerDisconnect; |
|
|
|
|
|
public static D.g_timeout_add GTimeoutAdd; |
|
|
public static D.gtk_widget_set_double_buffered GtkWidgetSetDoubleBuffered; |
|
|
public static D.gtk_widget_set_double_buffered GtkWidgetSetDoubleBuffered; |
|
|
|
|
|
public static D.gtk_widget_set_events GtkWidgetSetEvents; |
|
|
|
|
|
public static D.gdk_window_invalidate_rect GdkWindowInvalidateRect; |
|
|
|
|
|
public static D.gtk_widget_queue_draw_area GtkWidgetQueueDrawArea; |
|
|
|
|
|
public static D.gdk_screen_get_height GdkScreenGetHeight; |
|
|
|
|
|
public static D.gdk_screen_get_width GdkScreenGetWidth; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
@ -84,4 +120,21 @@ namespace Avalonia.Gtk3.Interop |
|
|
TopLevel, |
|
|
TopLevel, |
|
|
Popup |
|
|
Popup |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)] |
|
|
|
|
|
public struct GdkRectangle |
|
|
|
|
|
{ |
|
|
|
|
|
public int X, Y, Width, Height; |
|
|
|
|
|
|
|
|
|
|
|
public static GdkRectangle FromRect(Rect rect) |
|
|
|
|
|
{ |
|
|
|
|
|
return new GdkRectangle |
|
|
|
|
|
{ |
|
|
|
|
|
X = (int) rect.X, |
|
|
|
|
|
Y = (int) rect.Y, |
|
|
|
|
|
Width = (int) rect.Width, |
|
|
|
|
|
Height = (int) rect.Height |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|