2004-09-14 Mike Kestner <mkestner@ximian.com>

* gdk/* : remaining API audit fixes.

svn path=/trunk/gtk-sharp/; revision=33877
This commit is contained in:
Mike Kestner 2004-09-14 13:25:49 +00:00
parent e4b716e18c
commit 37304e11a8
5 changed files with 137 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2004-09-14 Mike Kestner <mkestner@ximian.com>
* gdk/* : remaining API audit fixes.
2004-09-09 Mike Kestner <mkestner@ximian.com> 2004-09-09 Mike Kestner <mkestner@ximian.com>
* gdk/Device.custom : manual GetHistory impl. * gdk/Device.custom : manual GetHistory impl.

View file

@ -12,11 +12,16 @@
<attr path="/api/namespace/class[@cname='GdkDrag_']/method[@name='Begin']" name="hidden">1</attr> <attr path="/api/namespace/class[@cname='GdkDrag_']/method[@name='Begin']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GdkDrag_']/method[@name='FindWindow']/*/*[@name='dest_window']" name="pass_as">out</attr> <attr path="/api/namespace/class[@cname='GdkDrag_']/method[@name='FindWindow']/*/*[@name='dest_window']" name="pass_as">out</attr>
<attr path="/api/namespace/class[@cname='GdkDrag_']/method[@name='FindWindowForScreen']/*/*[@name='dest_window']" name="pass_as">out</attr> <attr path="/api/namespace/class[@cname='GdkDrag_']/method[@name='FindWindowForScreen']/*/*[@name='dest_window']" name="pass_as">out</attr>
<attr path="/api/namespace/class[@cname='GdkEvent_']/method[@name='HandlerSet']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GdkEvent_']" name="name">EventHelper</attr> <attr path="/api/namespace/class[@cname='GdkEvent_']" name="name">EventHelper</attr>
<attr path="/api/namespace/class[@cname='GdkKeyval_']/method[@name='Name']/return-type" name="type">const-gchar*</attr> <attr path="/api/namespace/class[@cname='GdkKeyval_']/method[@name='Name']/return-type" name="type">const-gchar*</attr>
<attr path="/api/namespace/class[@cname='GdkGlobal']/method[@name='DevicesList']" name="hidden">1</attr> <attr path="/api/namespace/class[@cname='GdkGlobal']/method[@name='DevicesList']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GdkGlobal']/method[@name='FreeTextList']" name="hidden">1</attr> <attr path="/api/namespace/class[@cname='GdkGlobal']/method[@name='FreeTextList']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GdkGlobal']/method[@name='InitCheck']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GdkGlobal']/method[@name='ListVisuals']" name="hidden">1</attr> <attr path="/api/namespace/class[@cname='GdkGlobal']/method[@name='ListVisuals']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GdkGlobal']/method[@name='ParseArgs']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GdkGlobal']/method[@name='StringToCompoundText']" name="hidden">1</attr>
<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='GdkPango_']" name="name">PangoHelper</attr>
<attr path="/api/namespace/class[@cname='GdkPixbuf_']" name="hidden">1</attr> <attr path="/api/namespace/class[@cname='GdkPixbuf_']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GdkPointer_']/method[@name='Grab']/*/*[@name='confine_to']" name="null_ok">1</attr> <attr path="/api/namespace/class[@cname='GdkPointer_']/method[@name='Grab']/*/*[@name='confine_to']" name="null_ok">1</attr>
@ -24,6 +29,8 @@
<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='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="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='data']" name="array">1</attr>
<attr path="/api/namespace/class[@cname='GdkQuery_']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GdkSelection_']/method[@name='PropertyGet']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GdkText_']" name="hidden">1</attr> <attr path="/api/namespace/class[@cname='GdkText_']" name="hidden">1</attr>
<attr path="/api/namespace/enum[@cname='GdkWindowClass']/member[@name='Output']" name="name">InputOutput</attr> <attr path="/api/namespace/enum[@cname='GdkWindowClass']/member[@name='Output']" name="name">InputOutput</attr>
<attr path="/api/namespace/enum[@cname='GdkWindowClass']/member[@name='Only']" name="name">InputOnly</attr> <attr path="/api/namespace/enum[@cname='GdkWindowClass']/member[@name='Only']" name="name">InputOnly</attr>
@ -51,6 +58,8 @@
<attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='DrawPixbuf']/*/*[@name='gc']" name="null_ok">1</attr> <attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='DrawPixbuf']/*/*[@name='gc']" name="null_ok">1</attr>
<attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='DrawPolygon']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='DrawPolygon']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='GetSize']/*/*[@type='gint*']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='GetSize']/*/*[@type='gint*']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GdkKeymap']/method[@name='GetEntriesForKeycode']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GdkKeymap']/method[@name='GetEntriesForKeyval']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GdkPixbuf']/constructor[@cname='gdk_pixbuf_new_from_data']/*/*[@name='data']" name="array">1</attr> <attr path="/api/namespace/object[@cname='GdkPixbuf']/constructor[@cname='gdk_pixbuf_new_from_data']/*/*[@name='data']" name="array">1</attr>
<attr path="/api/namespace/object[@cname='GdkPixbuf']/constructor[@cname='gdk_pixbuf_new_from_file']" name="preferred">1</attr> <attr path="/api/namespace/object[@cname='GdkPixbuf']/constructor[@cname='gdk_pixbuf_new_from_file']" name="preferred">1</attr>
<attr path="/api/namespace/object[@cname='GdkPixbuf']/constructor[@cname='gdk_pixbuf_new_from_inline']/*/*[@name='data']" name="array">1</attr> <attr path="/api/namespace/object[@cname='GdkPixbuf']/constructor[@cname='gdk_pixbuf_new_from_inline']/*/*[@name='data']" name="array">1</attr>
@ -79,8 +88,10 @@
<attr path="/api/namespace/object[@cname='GdkPixmap']/constructor[@cname='gdk_pixmap_new']/*/*[@type='GdkDrawable*']" name="null_ok">1</attr> <attr path="/api/namespace/object[@cname='GdkPixmap']/constructor[@cname='gdk_pixmap_new']/*/*[@type='GdkDrawable*']" name="null_ok">1</attr>
<attr path="/api/namespace/object[@cname='GdkPixmap']/method[@name='CreateFromXpm']/*/*[@type='GdkBitmap**']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GdkPixmap']/method[@name='CreateFromXpm']/*/*[@type='GdkBitmap**']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GdkPixmap']/method[@name='CreateFromXpmD']/*/*[@type='GdkBitmap**']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GdkPixmap']/method[@name='CreateFromXpmD']/*/*[@type='GdkBitmap**']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GdkPixmap']/method[@name='CreateFromXpmD']/*/*[@name='data']" name="type">gchar*</attr>
<attr path="/api/namespace/object[@cname='GdkPixmap']/method[@name='ColormapCreateFromXpm']/*/*[@type='GdkBitmap**']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GdkPixmap']/method[@name='ColormapCreateFromXpm']/*/*[@type='GdkBitmap**']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GdkPixmap']/method[@name='ColormapCreateFromXpmD']/*/*[@type='GdkBitmap**']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GdkPixmap']/method[@name='ColormapCreateFromXpmD']/*/*[@type='GdkBitmap**']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GdkPixmap']/method[@name='ColormapCreateFromXpmD']/*/*[@name='data']" name="type">gchar*</attr>
<attr path="/api/namespace/object[@cname='GdkScreen']/method[@name='GetMonitorGeometry']/*/*[@type='GdkRectangle*']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GdkScreen']/method[@name='GetMonitorGeometry']/*/*[@type='GdkRectangle*']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GdkScreen']/method[@name='GetToplevelWindows']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GdkScreen']/method[@name='GetToplevelWindows']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GdkScreen']/method[@name='Height']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GdkScreen']/method[@name='Height']" name="hidden">1</attr>
@ -123,6 +134,7 @@
<attr path="/api/namespace/struct[@cname='GdkEventWindowState']" name="hidden">1</attr> <attr path="/api/namespace/struct[@cname='GdkEventWindowState']" name="hidden">1</attr>
<attr path="/api/namespace/struct[@cname='GdkPixdata']/method[@name='Deserialize']/*/*[@name='stream']" name="array">1</attr> <attr path="/api/namespace/struct[@cname='GdkPixdata']/method[@name='Deserialize']/*/*[@name='stream']" name="array">1</attr>
<attr path="/api/namespace/struct[@cname='GdkPixdata']/method[@name='Serialize']" name="hidden">1</attr> <attr path="/api/namespace/struct[@cname='GdkPixdata']/method[@name='Serialize']" name="hidden">1</attr>
<attr path="/api/namespace/struct[@cname='GdkPixdata']/method[@name='ToCsource']" name="hidden">1</attr>
<attr path="/api/namespace/struct[@cname='GdkPixmapObject']" name="hidden">1</attr> <attr path="/api/namespace/struct[@cname='GdkPixmapObject']" name="hidden">1</attr>
<attr path="/api/namespace/struct[@cname='GdkRegion']" name="opaque">1</attr> <attr path="/api/namespace/struct[@cname='GdkRegion']" name="opaque">1</attr>
<attr path="/api/namespace/struct[@cname='GdkRegion']/method[@name='GetClipbox']/*/*[@name='rectangle']" name="pass_as">out</attr> <attr path="/api/namespace/struct[@cname='GdkRegion']/method[@name='GetClipbox']/*/*[@name='rectangle']" name="pass_as">out</attr>

View file

@ -135,3 +135,55 @@
return workareas; return workareas;
} }
} }
[DllImport("libgdk-win32-2.0-0.dll")]
static extern bool gdk_init_check(ref int argc, ref IntPtr argv);
public static bool InitCheck (ref string[] argv)
{
IntPtr ptr = GLib.Marshaller.ArgvToArrayPtr (argv);
int count = argv.Length;
bool result = gdk_init_check (ref count, ref ptr);
argv = GLib.Marshaller.ArrayPtrToArgv (ptr, count);
return result;
}
[DllImport("libgdk-win32-2.0-0.dll")]
static extern void gdk_parse_args(ref int argc, ref IntPtr argv);
public static void ParseArgs (ref string[] argv)
{
IntPtr ptr = GLib.Marshaller.ArgvToArrayPtr (argv);
int count = argv.Length;
gdk_parse_args (ref count, ref ptr);
argv = GLib.Marshaller.ArrayPtrToArgv (ptr, count);
}
[DllImport("libgdk-win32-2.0-0.dll")]
static extern void gdk_query_depths (out IntPtr depths, out int n_depths);
public static int[] QueryDepths ()
{
IntPtr ptr;
int count;
gdk_query_depths (out ptr, out count);
int[] result = new int [count];
Marshal.Copy (ptr, result, 0, count);
return result;
}
[DllImport("libgdk-win32-2.0-0.dll")]
static extern void gdk_query_visual_types (out IntPtr types, out int n_types);
public static VisualType[] QueryVisualTypes ()
{
IntPtr ptr;
int count;
gdk_query_visual_types (out ptr, out count);
int[] tmp = new int [count];
Marshal.Copy (ptr, tmp, 0, count);
VisualType[] result = new VisualType [count];
for (int i = 0; i < count; i++)
result [i] = (VisualType) tmp [i];
return result;
}

68
gdk/Keymap.custom Normal file
View file

@ -0,0 +1,68 @@
// Keymap.custom - customizations to Gdk.Keymap
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
[DllImport("libglib-2.0-0.dll")]
static extern void g_free(IntPtr ptr);
[DllImport("libgdk-win32-2.0-0.dll")]
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)
{
IntPtr key_ptr, keyval_ptr;
int count;
if (gdk_keymap_get_entries_for_keycode(Handle, hardware_keycode, out key_ptr, out keyval_ptr, out count)) {
keys = new KeymapKey [count];
keyvals = new uint [count];
int[] tmp = new int [count];
Marshal.Copy (keyval_ptr, tmp, 0, count);
for (int i = 0; i < count; i++) {
IntPtr ptr = new IntPtr ((long) key_ptr + i * Marshal.SizeOf (typeof (KeymapKey)));
keyvals [i] = (uint) tmp [i];
keys [i] = KeymapKey.New (ptr);
}
g_free (key_ptr);
g_free (keyval_ptr);
} else {
keys = new KeymapKey [0];
keyvals = new uint [0];
}
}
[DllImport("libgdk-win32-2.0-0.dll")]
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)
{
IntPtr key_ptr;
int count;
if (gdk_keymap_get_entries_for_keyval(Handle, keyval, out key_ptr, out count)) {
KeymapKey[] result = new KeymapKey [count];
for (int i = 0; i < count; i++) {
IntPtr ptr = new IntPtr ((long) key_ptr + i * Marshal.SizeOf (typeof (KeymapKey)));
result [i] = KeymapKey.New (ptr);
}
g_free (key_ptr);
return result;
} else
return new KeymapKey [0];
}

View file

@ -50,6 +50,7 @@ customs = \
DragContext.custom \ DragContext.custom \
Drawable.custom \ Drawable.custom \
Global.custom \ Global.custom \
Keymap.custom \
Pixbuf.custom \ Pixbuf.custom \
PixbufLoader.custom \ PixbufLoader.custom \
Pixdata.custom \ Pixdata.custom \