2004-02-12 Mike Kestner <mkestner@ximian.com>

* gdk/Gdk.metadata : hide the GList API
	* gdk/*.custom : manually wrap GList api using typed arrays
	* gdk/gdk-api.xml : regen.

svn path=/trunk/gtk-sharp/; revision=23035
This commit is contained in:
Mike Kestner 2004-02-12 18:45:19 +00:00
parent 766b004949
commit d54f980494
7 changed files with 167 additions and 10 deletions

View file

@ -1,3 +1,9 @@
2004-02-12 Mike Kestner <mkestner@ximian.com>
* gdk/Gdk.metadata : hide the GList API
* gdk/*.custom : manually wrap GList api using typed arrays
* gdk/gdk-api.xml : regen.
2004-02-12 Mike Kestner <mkestner@ximian.com> 2004-02-12 Mike Kestner <mkestner@ximian.com>
* gdk/Gdk.metadata : hide the GSList API * gdk/Gdk.metadata : hide the GSList API

21
gdk/Display.custom Normal file
View file

@ -0,0 +1,21 @@
// Display.custom - customizations to Gdk.Display
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
[DllImport("libgdk-win32-2.0-0.dll")]
static extern IntPtr gdk_display_list_devices (IntPtr raw);
public Device[] ListDevices ()
{
IntPtr raw_ret = gdk_display_list_devices (Handle);
if (raw_ret == IntPtr.Zero)
return new Device [0];
GLib.List list = new GLib.List(raw_ret);
Device[] result = new Device [list.Count];
for (int i = 0; i < list.Count; i++)
result [i] = list [i] as Device;
return result;
}

View file

@ -7,7 +7,10 @@
<attr path="//boxed[@cname='GdkColor']/method[@name='Parse']/*/*[@type='GdkColor*']" name="pass_as">ref</attr> <attr path="//boxed[@cname='GdkColor']/method[@name='Parse']/*/*[@type='GdkColor*']" name="pass_as">ref</attr>
<attr path="//boxed[@cname='GdkCursor']" name="opaque">1</attr> <attr path="//boxed[@cname='GdkCursor']" name="opaque">1</attr>
<attr path="//callback[@cname='GdkPixbufDestroyNotify']/*/*[@type='guchar*']" name="array">1</attr> <attr path="//callback[@cname='GdkPixbufDestroyNotify']/*/*[@type='guchar*']" name="array">1</attr>
<attr path="//class[@cname='GdkDrag_']/method[@name='Begin']" name="hidden">1</attr>
<attr path="//class[@cname='GdkEvent_']" name="name">EventHelper</attr> <attr path="//class[@cname='GdkEvent_']" name="name">EventHelper</attr>
<attr path="//class[@cname='GdkGlobal']/method[@name='DevicesList']" name="hidden">1</attr>
<attr path="//class[@cname='GdkGlobal']/method[@name='ListVisuals']" name="hidden">1</attr>
<attr path="//class[@cname='GdkPango_']" name="name">PangoHelper</attr> <attr path="//class[@cname='GdkPango_']" name="name">PangoHelper</attr>
<attr path="//class[@cname='GdkPixbuf_']" name="hidden">1</attr> <attr path="//class[@cname='GdkPixbuf_']" name="hidden">1</attr>
<attr path="//class[@cname='GdkPointer_']/method[@name='Grab']/*/*[@name='confine_to']" name="null_ok">1</attr> <attr path="//class[@cname='GdkPointer_']/method[@name='Grab']/*/*[@name='confine_to']" name="null_ok">1</attr>
@ -18,6 +21,7 @@
<attr path="//object[@cname='GdkColormap']/method[@name='AllocColors']/*/*[@name='success']" name="array">1</attr> <attr path="//object[@cname='GdkColormap']/method[@name='AllocColors']/*/*[@name='success']" name="array">1</attr>
<attr path="//object[@cname='GdkColormap']/method[@name='QueryColor']/*/*[@type='GdkColor*']" name="pass_as">ref</attr> <attr path="//object[@cname='GdkColormap']/method[@name='QueryColor']/*/*[@type='GdkColor*']" name="pass_as">ref</attr>
<attr path="//object[@cname='GdkColormap']/method[@name='FreeColors']/*/*[@type='GdkColor*']" name="array">1</attr> <attr path="//object[@cname='GdkColormap']/method[@name='FreeColors']/*/*[@type='GdkColor*']" name="array">1</attr>
<attr path="//object[@cname='GdkDisplay']/method[@name='ListDevices']" name="hidden">1</attr>
<attr path="//object[@cname='GdkDisplayManager']/method[@name='ListDisplays']" name="hidden">1</attr> <attr path="//object[@cname='GdkDisplayManager']/method[@name='ListDisplays']" name="hidden">1</attr>
<attr path="//object[@cname='GdkDrawable']/method[@name='DrawLines']" name="hidden">1</attr> <attr path="//object[@cname='GdkDrawable']/method[@name='DrawLines']" name="hidden">1</attr>
<attr path="//object[@cname='GdkDrawable']/method[@name='DrawPolygon']" name="hidden">1</attr> <attr path="//object[@cname='GdkDrawable']/method[@name='DrawPolygon']" name="hidden">1</attr>
@ -42,16 +46,22 @@
<attr path="//object[@cname='GdkPixbufLoader']/method[@name='Write']/*/*[@name='buf']" name="array">1</attr> <attr path="//object[@cname='GdkPixbufLoader']/method[@name='Write']/*/*[@name='buf']" name="array">1</attr>
<attr path="//object[@cname='GdkPixmap']" name="parent">GdkDrawable</attr> <attr path="//object[@cname='GdkPixmap']" name="parent">GdkDrawable</attr>
<attr path="//object[@cname='GdkPixmap']/constructor[@cname='gdk_pixmap_new']/*/*[@type='GdkDrawable*']" name="null_ok">1</attr> <attr path="//object[@cname='GdkPixmap']/constructor[@cname='gdk_pixmap_new']/*/*[@type='GdkDrawable*']" name="null_ok">1</attr>
<attr path="//object[@cname='GdkScreen']/method[@name='GetToplevelWindows']" name="hidden">1</attr>
<attr path="//object[@cname='GdkScreen']/method[@name='Height']" name="hidden">1</attr> <attr path="//object[@cname='GdkScreen']/method[@name='Height']" name="hidden">1</attr>
<attr path="//object[@cname='GdkScreen']/method[@name='HeightMm']" name="hidden">1</attr> <attr path="//object[@cname='GdkScreen']/method[@name='HeightMm']" name="hidden">1</attr>
<attr path="//object[@cname='GdkScreen']/method[@name='ListVisuals']" name="hidden">1</attr>
<attr path="//object[@cname='GdkScreen']/method[@name='Width']" name="hidden">1</attr> <attr path="//object[@cname='GdkScreen']/method[@name='Width']" name="hidden">1</attr>
<attr path="//object[@cname='GdkScreen']/method[@name='WidthMm']" name="hidden">1</attr> <attr path="//object[@cname='GdkScreen']/method[@name='WidthMm']" name="hidden">1</attr>
<attr path="//object[@cname='GdkWindow']/method[@name='GetChildren']" name="hidden">1</attr>
<attr path="//object[@cname='GdkWindow']" name="parent">GdkDrawable</attr> <attr path="//object[@cname='GdkWindow']" name="parent">GdkDrawable</attr>
<attr path="//object[@cname='GdkWindow']/method[@name='GetInternalPaintInfo']/*/*[@type='gint*']" name="pass_as">out</attr> <attr path="//object[@cname='GdkWindow']/method[@name='GetInternalPaintInfo']/*/*[@type='gint*']" name="pass_as">out</attr>
<attr path="//object[@cname='GdkWindow']/method[@name='GetInternalPaintInfo']/*/*[@type='GdkDrawable**']" name="pass_as">out</attr> <attr path="//object[@cname='GdkWindow']/method[@name='GetInternalPaintInfo']/*/*[@type='GdkDrawable**']" name="pass_as">out</attr>
<attr path="//object[@cname='GdkWindow']/method[@name='GetOrigin']/*/*[@type='gint*']" name="pass_as">out</attr> <attr path="//object[@cname='GdkWindow']/method[@name='GetOrigin']/*/*[@type='gint*']" name="pass_as">out</attr>
<attr path="//object[@cname='GdkWindow']/method[@name='GetPointer']/*/*[@type='gint*']" name="pass_as">out</attr> <attr path="//object[@cname='GdkWindow']/method[@name='GetPointer']/*/*[@type='gint*']" name="pass_as">out</attr>
<attr path="//object[@cname='GdkWindow']/method[@name='GetPointer']/*/*[@type='GdkModifierType*']" name="pass_as">out</attr> <attr path="//object[@cname='GdkWindow']/method[@name='GetPointer']/*/*[@type='GdkModifierType*']" name="pass_as">out</attr>
<attr path="//object[@cname='GdkWindow']/method[@name='GetToplevels']" name="hidden">1</attr>
<attr path="//object[@cname='GdkWindow']/method[@name='PeekChildren']" name="hidden">1</attr>
<attr path="//object[@cname='GdkWindow']/method[@name='SetIconList']" name="hidden">1</attr>
<attr path="//struct[@cname='GdkPixmapObject']" name="hidden">1</attr> <attr path="//struct[@cname='GdkPixmapObject']" name="hidden">1</attr>
<attr path="//struct[@cname='GdkTimeCoord']/field[@cname='axes']" name="array_len">128</attr> <attr path="//struct[@cname='GdkTimeCoord']/field[@cname='axes']" name="array_len">128</attr>
<attr path="//struct[@cname='GdkWindowObject']" name="hidden">1</attr> <attr path="//struct[@cname='GdkWindowObject']" name="hidden">1</attr>

36
gdk/Global.custom Normal file
View file

@ -0,0 +1,36 @@
// Global.custom - customizations to Gdk.Global
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
[DllImport("libgdk-win32-2.0-0.dll")]
static extern IntPtr gdk_devices_list ();
public static Device[] DevicesList ()
{
IntPtr raw_ret = gdk_devices_list ();
if (raw_ret == IntPtr.Zero)
return new Device [0];
GLib.List list = new GLib.List(raw_ret);
Device[] result = new Device [list.Count];
for (int i = 0; i < list.Count; i++)
result [i] = list [i] as Device;
return result;
}
[DllImport("libgdk-win32-2.0-0.dll")]
static extern IntPtr gdk_list_visuals ();
public static Visual[] ListVisuals ()
{
IntPtr raw_ret = gdk_list_visuals ();
if (raw_ret == IntPtr.Zero)
return new Visual [0];
GLib.List list = new GLib.List(raw_ret);
Visual[] result = new Visual [list.Count];
for (int i = 0; i < list.Count; i++)
result [i] = list [i] as Visual;
return result;
}

38
gdk/Screen.custom Normal file
View file

@ -0,0 +1,38 @@
// Screen.custom - customizations to Gdk.Screen
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
[DllImport("libgdk-win32-2.0-0.dll")]
static extern IntPtr gdk_screen_get_toplevel_windows (IntPtr raw);
public Window[] ToplevelWindows
{
get {
IntPtr raw_ret = gdk_screen_get_toplevel_windows (Handle);
if (raw_ret == IntPtr.Zero)
return new Window [0];
GLib.List list = new GLib.List(raw_ret);
Window[] result = new Window [list.Count];
for (int i = 0; i < list.Count; i++)
result [i] = list [i] as Window;
return result;
}
}
[DllImport("libgdk-win32-2.0-0.dll")]
static extern IntPtr gdk_screen_list_visuals (IntPtr raw);
public Visual[] ListVisuals ()
{
IntPtr raw_ret = gdk_screen_list_visuals (Handle);
if (raw_ret == IntPtr.Zero)
return new Visual [0];
GLib.List list = new GLib.List(raw_ret);
Visual[] result = new Visual [list.Count];
for (int i = 0; i < list.Count; i++)
result [i] = list [i] as Visual;
return result;
}

View file

@ -1,11 +1,29 @@
// Gdk.Window.custom - Gdk Window class customizations // Gdk.Window.custom - Gdk Window class customizations
// //
// Author: Moritz Balz <ich@mbalz.de> // Author: Moritz Balz <ich@mbalz.de>
// Mike Kestner <mkestner@ximian.com>
// //
// (c) 2003 Moritz Balz // (c) 2003 Moritz Balz
// (c) 2004 Novell, Inc.
// //
// This code is inserted after the automatically generated code. // This code is inserted after the automatically generated code.
[DllImport("libgdk-win32-2.0-0.dll")]
static extern IntPtr gdk_window_get_children(IntPtr raw);
public Window[] Children {
get {
IntPtr raw_ret = gdk_window_get_children(Handle);
if (raw_ret == IntPtr.Zero)
return new Window [0];
GLib.List list = new GLib.List(raw_ret);
Window[] result = new Window [list.Count];
for (int i = 0; i < list.Count; i++)
result [i] = list [i] as Window;
return result;
}
}
public System.Drawing.Rectangle FrameExtents { public System.Drawing.Rectangle FrameExtents {
get { get {
Gdk.Rectangle rect = Gdk.Rectangle.Zero; Gdk.Rectangle rect = Gdk.Rectangle.Zero;
@ -14,6 +32,18 @@
} }
} }
[DllImport("libgdk-win32-2.0-0.dll")]
static extern void gdk_window_set_icon_list(IntPtr raw, IntPtr pixbufs);
public Pixbuf[] IconList {
set {
GLib.List list = new GLib.List(IntPtr.Zero);
foreach (Pixbuf val in value)
list.Append (val.Handle);
gdk_window_set_icon_list(Handle, list.Handle);
}
}
public void Move (System.Drawing.Point p) { public void Move (System.Drawing.Point p) {
gdk_window_move (Handle, p.X, p.Y); gdk_window_move (Handle, p.X, p.Y);
} }
@ -51,6 +81,22 @@
} }
} }
[DllImport("libgdk-win32-2.0-0.dll")]
static extern IntPtr gdk_window_get_toplevels();
public static Window[] Toplevels {
get {
IntPtr raw_ret = gdk_window_get_toplevels();
if (raw_ret == IntPtr.Zero)
return new Window [0];
GLib.List list = new GLib.List(raw_ret);
Window[] result = new Window [list.Count];
for (int i = 0; i < list.Count; i++)
result [i] = list [i] as Window;
return result;
}
}
public void MoveResize (System.Drawing.Rectangle rect) { public void MoveResize (System.Drawing.Rectangle rect) {
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);
} }

View file

@ -702,7 +702,7 @@
<parameter type="guint32" name="time_" /> <parameter type="guint32" name="time_" />
</parameters> </parameters>
</method> </method>
<method name="ListDevices" cname="gdk_display_list_devices"> <method name="ListDevices" cname="gdk_display_list_devices" hidden="1">
<return-type type="GList*" /> <return-type type="GList*" />
</method> </method>
<method name="Open" cname="gdk_display_open" shared="true"> <method name="Open" cname="gdk_display_open" shared="true">
@ -1539,7 +1539,7 @@
<method name="GetSystemVisual" cname="gdk_screen_get_system_visual"> <method name="GetSystemVisual" cname="gdk_screen_get_system_visual">
<return-type type="GdkVisual*" /> <return-type type="GdkVisual*" />
</method> </method>
<method name="GetToplevelWindows" cname="gdk_screen_get_toplevel_windows"> <method name="GetToplevelWindows" cname="gdk_screen_get_toplevel_windows" hidden="1">
<return-type type="GList*" /> <return-type type="GList*" />
</method> </method>
<method name="GetType" cname="gdk_screen_get_type" shared="true"> <method name="GetType" cname="gdk_screen_get_type" shared="true">
@ -1557,7 +1557,7 @@
<method name="HeightMm" cname="gdk_screen_height_mm" shared="true" hidden="1"> <method name="HeightMm" cname="gdk_screen_height_mm" shared="true" hidden="1">
<return-type type="gint" /> <return-type type="gint" />
</method> </method>
<method name="ListVisuals" cname="gdk_screen_list_visuals"> <method name="ListVisuals" cname="gdk_screen_list_visuals" hidden="1">
<return-type type="GList*" /> <return-type type="GList*" />
</method> </method>
<method name="MakeDisplayName" cname="gdk_screen_make_display_name"> <method name="MakeDisplayName" cname="gdk_screen_make_display_name">
@ -1741,7 +1741,7 @@
<method name="Fullscreen" cname="gdk_window_fullscreen"> <method name="Fullscreen" cname="gdk_window_fullscreen">
<return-type type="void" /> <return-type type="void" />
</method> </method>
<method name="GetChildren" cname="gdk_window_get_children"> <method name="GetChildren" cname="gdk_window_get_children" hidden="1">
<return-type type="GList*" /> <return-type type="GList*" />
</method> </method>
<method name="GetDecorations" cname="gdk_window_get_decorations"> <method name="GetDecorations" cname="gdk_window_get_decorations">
@ -1815,7 +1815,7 @@
<method name="GetToplevel" cname="gdk_window_get_toplevel"> <method name="GetToplevel" cname="gdk_window_get_toplevel">
<return-type type="GdkWindow*" /> <return-type type="GdkWindow*" />
</method> </method>
<method name="GetToplevels" cname="gdk_window_get_toplevels" shared="true"> <method name="GetToplevels" cname="gdk_window_get_toplevels" shared="true" hidden="1">
<return-type type="GList*" /> <return-type type="GList*" />
</method> </method>
<method name="GetUpdateArea" cname="gdk_window_get_update_area"> <method name="GetUpdateArea" cname="gdk_window_get_update_area">
@ -1915,7 +1915,7 @@
<parameter type="gint" name="attributes_mask" /> <parameter type="gint" name="attributes_mask" />
</parameters> </parameters>
</constructor> </constructor>
<method name="PeekChildren" cname="gdk_window_peek_children"> <method name="PeekChildren" cname="gdk_window_peek_children" hidden="1">
<return-type type="GList*" /> <return-type type="GList*" />
</method> </method>
<method name="ProcessAllUpdates" cname="gdk_window_process_all_updates" shared="true"> <method name="ProcessAllUpdates" cname="gdk_window_process_all_updates" shared="true">
@ -2029,7 +2029,7 @@
<parameter type="GdkBitmap*" name="mask" /> <parameter type="GdkBitmap*" name="mask" />
</parameters> </parameters>
</method> </method>
<method name="SetIconList" cname="gdk_window_set_icon_list"> <method name="SetIconList" cname="gdk_window_set_icon_list" hidden="1">
<return-type type="void" /> <return-type type="void" />
<parameters> <parameters>
<parameter type="GList*" name="pixbufs" /> <parameter type="GList*" name="pixbufs" />
@ -2757,7 +2757,7 @@
<parameter type="gpointer" name="data" /> <parameter type="gpointer" name="data" />
</parameters> </parameters>
</method> </method>
<method name="DevicesList" cname="gdk_devices_list" shared="true"> <method name="DevicesList" cname="gdk_devices_list" shared="true" hidden="1">
<return-type type="GList*" /> <return-type type="GList*" />
</method> </method>
<method name="EventsPending" cname="gdk_events_pending" shared="true"> <method name="EventsPending" cname="gdk_events_pending" shared="true">
@ -2805,7 +2805,7 @@
<parameter type="GdkExtensionMode" name="mode" /> <parameter type="GdkExtensionMode" name="mode" />
</parameters> </parameters>
</method> </method>
<method name="ListVisuals" cname="gdk_list_visuals" shared="true"> <method name="ListVisuals" cname="gdk_list_visuals" shared="true" hidden="1">
<return-type type="GList*" /> <return-type type="GList*" />
</method> </method>
<method name="NotifyStartupComplete" cname="gdk_notify_startup_complete" shared="true"> <method name="NotifyStartupComplete" cname="gdk_notify_startup_complete" shared="true">
@ -2894,7 +2894,7 @@
<parameter type="guint32" name="time_" /> <parameter type="guint32" name="time_" />
</parameters> </parameters>
</method> </method>
<method name="Begin" cname="gdk_drag_begin" shared="true"> <method name="Begin" cname="gdk_drag_begin" shared="true" hidden="1">
<return-type type="GdkDragContext*" /> <return-type type="GdkDragContext*" />
<parameters> <parameters>
<parameter type="GdkWindow*" name="window" /> <parameter type="GdkWindow*" name="window" />