mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-10 19:05:38 +00:00
2007-06-25 Ankit Jain <jankit@novell.com>
* gdk/Gdk.metadata : hide Property.Get for manual impl. * gdk/Property.custom : manually marshal the data param in Get. svn path=/trunk/gtk-sharp/; revision=80684
This commit is contained in:
parent
9dc9b1d79e
commit
0c857a906c
|
@ -1,3 +1,8 @@
|
|||
2007-06-25 Ankit Jain <jankit@novell.com>
|
||||
|
||||
* gdk/Gdk.metadata : hide Property.Get for manual impl.
|
||||
* gdk/Property.custom : manually marshal the data param in Get.
|
||||
|
||||
2007-06-19 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* gdk/Property.custom : obsolete compat overload for Change().
|
||||
|
|
|
@ -33,9 +33,7 @@
|
|||
<attr path="/api/namespace/class[@cname='GdkGlobal']/method[@name='StringToCompoundTextForDisplay']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/class[@cname='GdkPango_']" name="name">PangoHelper</attr>
|
||||
<attr path="/api/namespace/class[@cname='GdkPixbuf_']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/class[@cname='GdkProperty_']/method[@name='Get']/*/*[@name='actual_property_type']" name="pass_as">out</attr>
|
||||
<attr path="/api/namespace/class[@cname='GdkProperty_']/method[@name='Get']/*/*[@name='data']" name="pass_as">out</attr>
|
||||
<attr path="/api/namespace/class[@cname='GdkProperty_']/method[@name='Get']/*/*[@name='data']" name="array">1</attr>
|
||||
<attr path="/api/namespace/class[@cname='GdkProperty_']/method[@name='Get']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/class[@cname='GdkProperty_']/method[@name='Change']/*/*[@name='data']" name="array">1</attr>
|
||||
<attr path="/api/namespace/class[@cname='GdkQuery_']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/class[@cname='GdkRgb_']/method[@name='FindColor']/*/*[@name='color']" name="pass_as">ref</attr>
|
||||
|
|
|
@ -29,3 +29,22 @@
|
|||
return data;
|
||||
}
|
||||
|
||||
[DllImport("libgdk-win32-2.0-0.dll")]
|
||||
static extern bool gdk_property_get(IntPtr window, IntPtr property, IntPtr type, UIntPtr offset, UIntPtr length, int 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) {
|
||||
IntPtr actual_property_type_as_native;
|
||||
IntPtr actual_data;
|
||||
bool raw_ret = gdk_property_get(window == null ? IntPtr.Zero : window.Handle, property == null ? IntPtr.Zero : property.Handle, type == null ? IntPtr.Zero : type.Handle, new UIntPtr (offset), new UIntPtr (length), pdelete, out actual_property_type_as_native, out actual_format, out actual_length, out actual_data);
|
||||
data = null;
|
||||
if (raw_ret) {
|
||||
data = new byte [actual_length];
|
||||
Marshal.Copy (actual_data, data, 0, actual_length);
|
||||
GLib.Marshaller.Free (actual_data);
|
||||
}
|
||||
|
||||
bool ret = raw_ret;
|
||||
actual_property_type = actual_property_type_as_native == IntPtr.Zero ? null : (Gdk.Atom) GLib.Opaque.GetOpaque (actual_property_type_as_native, typeof (Gdk.Atom), false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue