mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-10 21:15:28 +00:00
gdk: Fix dll name and use a const for all DllImports in custom code
In Windows builds of GTK+ 3.x, the dll filename for GDK is libgdk-3-0.dll. We use this opportunity to use a common const in the DllImport for all custom code.
This commit is contained in:
parent
016891bb7a
commit
30f758d984
|
@ -35,7 +35,7 @@ namespace Gdk {
|
||||||
Pixel = 0;
|
Pixel = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern uint gdk_color_hash(ref Gdk.Color raw);
|
static extern uint gdk_color_hash(ref Gdk.Color raw);
|
||||||
|
|
||||||
public override int GetHashCode() {
|
public override int GetHashCode() {
|
||||||
|
|
|
@ -25,10 +25,10 @@ namespace Gdk {
|
||||||
|
|
||||||
public partial class Device {
|
public partial class Device {
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_device_free_history(IntPtr events, int n_events);
|
static extern void gdk_device_free_history(IntPtr events, int n_events);
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern bool gdk_device_get_history(IntPtr device, IntPtr window, uint start, uint stop, out IntPtr events, out int n_events);
|
static extern bool gdk_device_get_history(IntPtr device, IntPtr window, uint start, uint stop, out IntPtr events, out int n_events);
|
||||||
|
|
||||||
public TimeCoord[] GetHistory (Gdk.Window window, uint start, uint stop)
|
public TimeCoord[] GetHistory (Gdk.Window window, uint start, uint stop)
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Gdk {
|
||||||
|
|
||||||
public partial class Display {
|
public partial class Display {
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_display_get_pointer(IntPtr raw, IntPtr screen, out int x, out int y, out int mask);
|
static extern void gdk_display_get_pointer(IntPtr raw, IntPtr screen, out int x, out int y, out int mask);
|
||||||
|
|
||||||
[Obsolete]
|
[Obsolete]
|
||||||
|
@ -36,7 +36,7 @@ namespace Gdk {
|
||||||
mask = (Gdk.ModifierType) mask_as_int;
|
mask = (Gdk.ModifierType) mask_as_int;
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_display_get_pointer(IntPtr raw, out IntPtr screen, out int x, out int y, out int mask);
|
static extern void gdk_display_get_pointer(IntPtr raw, out IntPtr screen, out int x, out int y, out int mask);
|
||||||
|
|
||||||
public void GetPointer(out Gdk.Screen screen, out int x, out int y, out Gdk.ModifierType mask) {
|
public void GetPointer(out Gdk.Screen screen, out int x, out int y, out Gdk.ModifierType mask) {
|
||||||
|
@ -66,7 +66,7 @@ namespace Gdk {
|
||||||
GetPointer (out screen, out x, out y, out mod);
|
GetPointer (out screen, out x, out y, out mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern IntPtr gdk_display_list_devices (IntPtr raw);
|
static extern IntPtr gdk_display_list_devices (IntPtr raw);
|
||||||
|
|
||||||
public Device[] ListDevices ()
|
public Device[] ListDevices ()
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace Gdk {
|
||||||
|
|
||||||
public partial class DisplayManager {
|
public partial class DisplayManager {
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern IntPtr gdk_display_manager_list_displays (IntPtr raw);
|
static extern IntPtr gdk_display_manager_list_displays (IntPtr raw);
|
||||||
|
|
||||||
public Display[] ListDisplays ()
|
public Display[] ListDisplays ()
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace Gdk {
|
||||||
get { return raw; }
|
get { return raw; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern IntPtr gdk_event_get_type ();
|
static extern IntPtr gdk_event_get_type ();
|
||||||
|
|
||||||
public static GLib.GType GType {
|
public static GLib.GType GType {
|
||||||
|
|
|
@ -26,7 +26,9 @@ namespace Gdk {
|
||||||
|
|
||||||
public partial class Global {
|
public partial class Global {
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
internal const string GdkNativeDll = "libgdk-3-0.dll";
|
||||||
|
|
||||||
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern IntPtr gdk_list_visuals ();
|
static extern IntPtr gdk_list_visuals ();
|
||||||
|
|
||||||
public static Visual[] ListVisuals ()
|
public static Visual[] ListVisuals ()
|
||||||
|
@ -105,7 +107,7 @@ namespace Gdk {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern bool gdk_init_check(ref int argc, ref IntPtr argv);
|
static extern bool gdk_init_check(ref int argc, ref IntPtr argv);
|
||||||
|
|
||||||
public static bool InitCheck (ref string[] argv)
|
public static bool InitCheck (ref string[] argv)
|
||||||
|
@ -119,7 +121,7 @@ namespace Gdk {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_parse_args(ref int argc, ref IntPtr argv);
|
static extern void gdk_parse_args(ref int argc, ref IntPtr argv);
|
||||||
|
|
||||||
public static void ParseArgs (ref string[] argv)
|
public static void ParseArgs (ref string[] argv)
|
||||||
|
@ -132,7 +134,7 @@ namespace Gdk {
|
||||||
argv = a.GetArgs (argc);
|
argv = a.GetArgs (argc);
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_query_depths (out IntPtr depths, out int n_depths);
|
static extern void gdk_query_depths (out IntPtr depths, out int n_depths);
|
||||||
|
|
||||||
public static int[] QueryDepths ()
|
public static int[] QueryDepths ()
|
||||||
|
@ -144,7 +146,7 @@ namespace Gdk {
|
||||||
Marshal.Copy (ptr, result, 0, count);
|
Marshal.Copy (ptr, result, 0, count);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_query_visual_types (out IntPtr types, out int n_types);
|
static extern void gdk_query_visual_types (out IntPtr types, out int n_types);
|
||||||
|
|
||||||
public static VisualType[] QueryVisualTypes ()
|
public static VisualType[] QueryVisualTypes ()
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Gdk {
|
||||||
|
|
||||||
public partial class Keymap {
|
public partial class Keymap {
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern bool gdk_keymap_get_entries_for_keycode(IntPtr raw, uint hardware_keycode, out IntPtr keys, out IntPtr keyvals, out int n_entries);
|
static extern bool gdk_keymap_get_entries_for_keycode(IntPtr raw, uint hardware_keycode, out IntPtr keys, out IntPtr keyvals, out int n_entries);
|
||||||
|
|
||||||
public void GetEntriesForKeycode(uint hardware_keycode, out Gdk.KeymapKey[] keys, out uint[] keyvals)
|
public void GetEntriesForKeycode(uint hardware_keycode, out Gdk.KeymapKey[] keys, out uint[] keyvals)
|
||||||
|
@ -51,7 +51,7 @@ namespace Gdk {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern bool gdk_keymap_get_entries_for_keyval(IntPtr raw, uint keyval, out IntPtr keys, out int n_keys);
|
static extern bool gdk_keymap_get_entries_for_keyval(IntPtr raw, uint keyval, out IntPtr keys, out int n_keys);
|
||||||
|
|
||||||
public KeymapKey[] GetEntriesForKeyval (uint keyval)
|
public KeymapKey[] GetEntriesForKeyval (uint keyval)
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Gdk {
|
||||||
|
|
||||||
public partial class Property {
|
public partial class Property {
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_property_change(IntPtr window, IntPtr property, IntPtr type, int format, int mode, out byte data, int nelements);
|
static extern void gdk_property_change(IntPtr window, IntPtr property, IntPtr type, int format, int mode, out byte data, int nelements);
|
||||||
|
|
||||||
[Obsolete ("Replaced by corrected overload with data parameter")]
|
[Obsolete ("Replaced by corrected overload with data parameter")]
|
||||||
|
@ -36,7 +36,7 @@ namespace Gdk {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern bool gdk_property_get(IntPtr window, IntPtr property, IntPtr type, UIntPtr offset, UIntPtr length, bool pdelete, out IntPtr actual_property_type, out int actual_format, out int actual_length, out IntPtr data);
|
static extern bool gdk_property_get(IntPtr window, IntPtr property, IntPtr type, UIntPtr offset, UIntPtr length, bool pdelete, out IntPtr actual_property_type, out int actual_format, out int actual_length, out IntPtr data);
|
||||||
|
|
||||||
public static bool Get(Gdk.Window window, Gdk.Atom property, Gdk.Atom type, ulong offset, ulong length, int pdelete, out Gdk.Atom actual_property_type, out int actual_format, out int actual_length, out byte[] data) {
|
public static bool Get(Gdk.Window window, Gdk.Atom property, Gdk.Atom type, ulong offset, ulong length, int pdelete, out Gdk.Atom actual_property_type, out int actual_format, out int actual_length, out byte[] data) {
|
||||||
|
|
|
@ -219,7 +219,7 @@ namespace Gdk {
|
||||||
return Offset (rect, dr.X, dr.Y);
|
return Offset (rect, dr.X, dr.Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern IntPtr gdk_rectangle_get_type();
|
static extern IntPtr gdk_rectangle_get_type();
|
||||||
|
|
||||||
public static GLib.GType GType {
|
public static GLib.GType GType {
|
||||||
|
@ -230,7 +230,7 @@ namespace Gdk {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_rectangle_union (ref Rectangle src1, ref Rectangle src2, out Rectangle dest);
|
static extern void gdk_rectangle_union (ref Rectangle src1, ref Rectangle src2, out Rectangle dest);
|
||||||
|
|
||||||
public Gdk.Rectangle Union (Gdk.Rectangle src)
|
public Gdk.Rectangle Union (Gdk.Rectangle src)
|
||||||
|
@ -240,7 +240,7 @@ namespace Gdk {
|
||||||
return dest;
|
return dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern bool gdk_rectangle_intersect (ref Rectangle src1, ref Rectangle src2, out Rectangle dest);
|
static extern bool gdk_rectangle_intersect (ref Rectangle src1, ref Rectangle src2, out Rectangle dest);
|
||||||
|
|
||||||
public bool Intersect (Gdk.Rectangle src, out Gdk.Rectangle dest)
|
public bool Intersect (Gdk.Rectangle src, out Gdk.Rectangle dest)
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace Gdk {
|
||||||
|
|
||||||
public partial class Screen {
|
public partial class Screen {
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern IntPtr gdk_screen_get_toplevel_windows (IntPtr raw);
|
static extern IntPtr gdk_screen_get_toplevel_windows (IntPtr raw);
|
||||||
|
|
||||||
public Window[] ToplevelWindows
|
public Window[] ToplevelWindows
|
||||||
|
@ -42,7 +42,7 @@ namespace Gdk {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern IntPtr gdk_screen_list_visuals (IntPtr raw);
|
static extern IntPtr gdk_screen_list_visuals (IntPtr raw);
|
||||||
|
|
||||||
public Visual[] ListVisuals ()
|
public Visual[] ListVisuals ()
|
||||||
|
@ -57,10 +57,10 @@ namespace Gdk {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern IntPtr gdk_screen_get_font_options(IntPtr raw);
|
static extern IntPtr gdk_screen_get_font_options(IntPtr raw);
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_screen_set_font_options(IntPtr raw, IntPtr options);
|
static extern void gdk_screen_set_font_options(IntPtr raw, IntPtr options);
|
||||||
|
|
||||||
[GLib.Property ("font-options")]
|
[GLib.Property ("font-options")]
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Gdk {
|
||||||
|
|
||||||
public class TextProperty {
|
public class TextProperty {
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern int gdk_text_property_to_utf8_list_for_display(IntPtr display, IntPtr encoding, int format, byte[] text, int length, out IntPtr list);
|
static extern int gdk_text_property_to_utf8_list_for_display(IntPtr display, IntPtr encoding, int format, byte[] text, int length, out IntPtr list);
|
||||||
|
|
||||||
public static string[] ToStringListForDisplay (Gdk.Display display, Gdk.Atom encoding, int format, byte[] text, int length)
|
public static string[] ToStringListForDisplay (Gdk.Display display, Gdk.Atom encoding, int format, byte[] text, int length)
|
||||||
|
|
|
@ -32,10 +32,10 @@ namespace Gdk {
|
||||||
|
|
||||||
public Window (Gdk.Window parent, Gdk.WindowAttr attributes, Gdk.WindowAttributesType attributes_mask) : this (parent, attributes, (int)attributes_mask) {}
|
public Window (Gdk.Window parent, Gdk.WindowAttr attributes, Gdk.WindowAttributesType attributes_mask) : this (parent, attributes, (int)attributes_mask) {}
|
||||||
|
|
||||||
[DllImport("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern IntPtr gdk_window_get_background_pattern(IntPtr raw);
|
static extern IntPtr gdk_window_get_background_pattern(IntPtr raw);
|
||||||
|
|
||||||
[DllImport("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_window_set_background_pattern(IntPtr raw, IntPtr pattern);
|
static extern void gdk_window_set_background_pattern(IntPtr raw, IntPtr pattern);
|
||||||
|
|
||||||
public Cairo.Pattern BackgroundPattern {
|
public Cairo.Pattern BackgroundPattern {
|
||||||
|
@ -49,7 +49,7 @@ namespace Gdk {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern IntPtr gdk_window_get_children(IntPtr raw);
|
static extern IntPtr gdk_window_get_children(IntPtr raw);
|
||||||
|
|
||||||
public Window[] Children {
|
public Window[] Children {
|
||||||
|
@ -65,7 +65,7 @@ namespace Gdk {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_window_set_icon_list(IntPtr raw, IntPtr pixbufs);
|
static extern void gdk_window_set_icon_list(IntPtr raw, IntPtr pixbufs);
|
||||||
|
|
||||||
public Pixbuf[] IconList {
|
public Pixbuf[] IconList {
|
||||||
|
@ -80,7 +80,7 @@ namespace Gdk {
|
||||||
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern IntPtr g_object_ref (IntPtr raw);
|
static extern IntPtr g_object_ref (IntPtr raw);
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_window_destroy(IntPtr raw);
|
static extern void gdk_window_destroy(IntPtr raw);
|
||||||
|
|
||||||
public void Destroy ()
|
public void Destroy ()
|
||||||
|
@ -97,10 +97,10 @@ namespace Gdk {
|
||||||
gdk_window_move_resize (Handle, rect.X, rect.Y, rect.Width, rect.Height);
|
gdk_window_move_resize (Handle, rect.X, rect.Y, rect.Width, rect.Height);
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_window_get_user_data (IntPtr raw, out IntPtr data);
|
static extern void gdk_window_get_user_data (IntPtr raw, out IntPtr data);
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_window_set_user_data(IntPtr raw, IntPtr user_data);
|
static extern void gdk_window_set_user_data(IntPtr raw, IntPtr user_data);
|
||||||
public IntPtr UserData {
|
public IntPtr UserData {
|
||||||
get {
|
get {
|
||||||
|
@ -113,10 +113,10 @@ namespace Gdk {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_window_add_filter (IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data);
|
static extern void gdk_window_add_filter (IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data);
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gdk_window_remove_filter (IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data);
|
static extern void gdk_window_remove_filter (IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data);
|
||||||
|
|
||||||
static IDictionary<FilterFunc, GdkSharp.FilterFuncWrapper> filter_all_hash;
|
static IDictionary<FilterFunc, GdkSharp.FilterFuncWrapper> filter_all_hash;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
Please DO NOT MODIFY THIS FILE, modify .metadata files instead.
|
Please DO NOT MODIFY THIS FILE, modify .metadata files instead.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<namespace name="Gdk" library="libgdk-win32-3.0-0.dll">
|
<namespace name="Gdk" library="libgdk-3-0.dll">
|
||||||
<enum name="AxisUse" cname="GdkAxisUse" gtype="gdk_axis_use_get_type" type="enum">
|
<enum name="AxisUse" cname="GdkAxisUse" gtype="gdk_axis_use_get_type" type="enum">
|
||||||
<member cname="GDK_AXIS_IGNORE" name="Ignore" />
|
<member cname="GDK_AXIS_IGNORE" name="Ignore" />
|
||||||
<member cname="GDK_AXIS_X" name="X" />
|
<member cname="GDK_AXIS_X" name="X" />
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
<dllmap dll="libgio-2.0-0.dll" target="libgio-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
<dllmap dll="libgio-2.0-0.dll" target="libgio-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||||
<dllmap dll="libglib-2.0-0.dll" target="libglib-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
<dllmap dll="libglib-2.0-0.dll" target="libglib-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||||
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||||
<dllmap dll="libgdk-win32-3.0-0.dll" target="libgdk-3@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
<dllmap dll="libgdk-3-0.dll" target="libgdk-3@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||||
<dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
<dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -30,22 +30,24 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Gtk.DotNet {
|
namespace Gtk.DotNet {
|
||||||
public class Graphics {
|
public class Graphics {
|
||||||
|
|
||||||
|
private const string GdkNativeDll = "libgdk-3-0.dll";
|
||||||
|
|
||||||
private Graphics () {}
|
private Graphics () {}
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
internal static extern IntPtr gdk_win32_drawable_get_handle(IntPtr raw);
|
internal static extern IntPtr gdk_win32_drawable_get_handle(IntPtr raw);
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
internal static extern IntPtr gdk_win32_hdc_get(IntPtr drawable, IntPtr gc, int usage);
|
internal static extern IntPtr gdk_win32_hdc_get(IntPtr drawable, IntPtr gc, int usage);
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
internal static extern void gdk_win32_hdc_release(IntPtr drawable,IntPtr gc,int usage);
|
internal static extern void gdk_win32_hdc_release(IntPtr drawable,IntPtr gc,int usage);
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
internal static extern IntPtr gdk_x11_drawable_get_xdisplay (IntPtr raw);
|
internal static extern IntPtr gdk_x11_drawable_get_xdisplay (IntPtr raw);
|
||||||
|
|
||||||
[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport (GdkNativeDll, CallingConvention = CallingConvention.Cdecl)]
|
||||||
internal static extern IntPtr gdk_x11_drawable_get_xid (IntPtr raw);
|
internal static extern IntPtr gdk_x11_drawable_get_xid (IntPtr raw);
|
||||||
|
|
||||||
public static System.Drawing.Graphics FromDrawable (Gdk.Window drawable)
|
public static System.Drawing.Graphics FromDrawable (Gdk.Window drawable)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<dllmap dll="libgdk-win32-3.0-0.dll" target="libgdk-3@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
<dllmap dll="libgdk-3-0.dll" target="libgdk-3@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
</library>
|
</library>
|
||||||
</api>
|
</api>
|
||||||
<api filename="../gdk/gdk-api.raw">
|
<api filename="../gdk/gdk-api.raw">
|
||||||
<library name="libgdk-win32-3.0-0.dll">
|
<library name="libgdk-3-0.dll">
|
||||||
<namespace name="Gdk">
|
<namespace name="Gdk">
|
||||||
<directory path="gtk+-3.0.0/gdk">
|
<directory path="gtk+-3.0.0/gdk">
|
||||||
<exclude>gdkalias.h</exclude>
|
<exclude>gdkalias.h</exclude>
|
||||||
|
|
Loading…
Reference in a new issue