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

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

svn path=/trunk/gtk-sharp/; revision=23045
This commit is contained in:
Mike Kestner 2004-02-12 22:38:43 +00:00
parent bba2334f84
commit f692bf6d37
7 changed files with 156 additions and 12 deletions

View File

@ -1,3 +1,9 @@
2004-02-12 Mike Kestner <mkestner@ximian.com>
* gnome/Gnome.metadata : hide the GList API
* gnome/*.custom : manually wrap GList api using typed arrays
* gnome/gnome-api.xml : regen.
2004-02-12 Mike Kestner <mkestner@ximian.com>
* glade/Glade.metadata : hide a GList method.

41
gnome/Font.custom Normal file
View File

@ -0,0 +1,41 @@
// Font.custom - customizations to Gnome.Font
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
[DllImport("gnomeprint-2-2")]
static extern IntPtr gnome_font_list ();
public static string[] List ()
{
IntPtr list_ptr = gnome_font_list ();
if (list_ptr == IntPtr.Zero)
return new string [0];
GLib.List list = new GLib.List (list_ptr, typeof (string));
string[] result = new string [list.Count];
int i = 0;
foreach (string val in list)
result [i++] = val;
return result;
}
[DllImport("gnomeprint-2-2")]
static extern IntPtr gnome_font_style_list (string family);
public static string[] StyleList (string family)
{
IntPtr list_ptr = gnome_font_style_list (family);
if (list_ptr == IntPtr.Zero)
return new string [0];
GLib.List list = new GLib.List (list_ptr, typeof (string));
string[] result = new string [list.Count];
int i = 0;
foreach (string val in list)
result [i++] = val;
return result;
}

41
gnome/FontFamily.custom Normal file
View File

@ -0,0 +1,41 @@
// FontFamily.custom - customizations to Gnome.FontFamily
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
[DllImport("gnomeprint-2-2")]
static extern IntPtr gnome_font_family_list ();
public static string[] List ()
{
IntPtr list_ptr = gnome_font_family_list ();
if (list_ptr == IntPtr.Zero)
return new string [0];
GLib.List list = new GLib.List (list_ptr, typeof (string));
string[] result = new string [list.Count];
int i = 0;
foreach (string val in list)
result [i++] = val;
return result;
}
[DllImport("gnomeprint-2-2")]
static extern IntPtr gnome_font_family_style_list (IntPtr raw);
public string[] StyleList ()
{
IntPtr list_ptr = gnome_font_family_style_list (Handle);
if (list_ptr == IntPtr.Zero)
return new string [0];
GLib.List list = new GLib.List (list_ptr, typeof (string));
string[] result = new string [list.Count];
int i = 0;
foreach (string val in list)
result [i++] = val;
return result;
}

View File

@ -54,21 +54,30 @@
<attr path="/api/namespace/object[@cname='GnomeFileEntry']/method[@name='GnomeEntry']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomeFileEntry']/method[@name='GtkEntry']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomeFileEntry']/signal[@name='Activate']" name="name">Activated</attr>
<attr path="/api/namespace/object[@cname='GnomeFont']/method/return-type[@type='const-guchar*']" name="type">const-gchar*</attr>
<attr path="/api/namespace/object[@cname='GnomeFont']/method[@name='List']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomeFont']/method[@name='ListFree']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomeFont']/method[@name='StyleList']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomeFont']/method[@name='StyleListFree']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomeFont']/method/*/*[@type='const-guchar*']" name="type">const-gchar*</attr>
<attr path="/api/namespace/object[@cname='GnomeFont']/method/*/*[@type='const-guchar*']" name="type">const-gchar*</attr>
<attr path="/api/namespace/object[@cname='GnomeFontPreview']/method/*/*[@type='const-guchar*']" name="type">const-gchar*</attr>
<attr path="/api/namespace/object[@cname='GnomeFontFace']/method/return-type[@type='const-guchar*']" name="type">const-gchar*</attr>
<attr path="/api/namespace/object[@cname='GnomeFontFace']/method/*/*[@type='const-guchar*']" name="type">const-gchar*</attr>
<attr path="/api/namespace/object[@cname='GnomeFontFamily']/method[@name='List']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomeFontFamily']/method[@name='ListFree']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomeFontFamily']/method[@name='StyleList']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomeFontFamily']/method[@name='StyleListFree']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GnomeIcon_']/method[@name='LookupSync']/*/*[@name='thumbnail_factory']" name="null_ok">1</attr>
<attr path="/api/namespace/object[@cname='GnomeIconEntry']/method[@name='PickDialog']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomeIconList']/constructor[@cname='gnome_icon_list_new']/*/*[@type='GtkAdjustment*']" name="null_ok">1</attr>
<attr path="/api/namespace/object[@cname='GnomeIconList']/method[@name='GetSelection']/return-type" name="element_type">int</attr>
<attr path="/api/namespace/object[@cname='GnomeIconList']/method[@name='GetSelection']" name="hidden">i</attr>
<attr path="/api/namespace/object[@cname='GnomeIconList']/method[@name='SetHadjustment']/*/*[@type='GtkAdjustment*']" name="null_ok">1</attr>
<attr path="/api/namespace/object[@cname='GnomeIconList']/method[@name='SetVadjustment']/*/*[@type='GtkAdjustment*']" name="null_ok">1</attr>
<attr path="/api/namespace/object[@cname='GnomeIconList']/signal[@name='FocusIcon']" name="name">IconFocused</attr>
<attr path="/api/namespace/object[@cname='GnomeIconList']/signal[@name='SelectIcon']" name="name">IconSelected</attr>
<attr path="/api/namespace/object[@cname='GnomeIconList']/signal[@name='UnselectIcon']" name="name">IconUnselected</attr>
<attr path="/api/namespace/object[@cname='GnomeIconTheme']/method[@name='GetSearchPath']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomeIconTheme']/method[@name='ListIcons']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomePrintConfig']/method/*/*[@type='const-guchar*']" name="type">const-gchar*</attr>
<attr path="/api/namespace/object[@cname='GnomePrintConfig']/method[@name='Get']/return-type" name="type">gchar*</attr>
<attr path="/api/namespace/object[@cname='GnomePrintDialog']/method/*/*[@type='const-guchar*']" name="type">const-gchar*</attr>

24
gnome/IconList.custom Normal file
View File

@ -0,0 +1,24 @@
// IconList.custom - customizations to Gnome.IconList
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
[DllImport("gnomeui-2")]
static extern IntPtr gnome_icon_list_get_selection (IntPtr raw);
public int[] Selection {
get {
IntPtr list_ptr = gnome_icon_list_get_selection (Handle);
if (list_ptr == IntPtr.Zero)
return new int [0];
GLib.List list = new GLib.List (list_ptr, typeof (int));
int[] result = new int [list.Count];
int i = 0;
foreach (int val in list)
result [i++] = val;
return result;
}
}

23
gnome/IconTheme.custom Normal file
View File

@ -0,0 +1,23 @@
// IconTheme.custom - customizations to Gnome.IconTheme
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
[DllImport("gnomeui-2")]
static extern IntPtr gnome_icon_theme_list_icons (IntPtr raw, string context);
public string[] ListIcons (string context)
{
IntPtr list_ptr = gnome_icon_theme_list_icons (Handle, context);
if (list_ptr == IntPtr.Zero)
return new string [0];
GLib.List list = new GLib.List (list_ptr, typeof (string));
string[] result = new string [list.Count];
int i = 0;
foreach (string val in list)
result [i++] = val;
return result;
}

View File

@ -3556,7 +3556,7 @@
<method name="GetNumIcons" cname="gnome_icon_list_get_num_icons">
<return-type type="guint" />
</method>
<method name="GetSelection" cname="gnome_icon_list_get_selection">
<method name="GetSelection" cname="gnome_icon_list_get_selection" hidden="i">
<return-type type="GList*" element_type="int" />
</method>
<method name="GetSelectionMode" cname="gnome_icon_list_get_selection_mode">
@ -3882,7 +3882,7 @@
<parameter type="const-char*" name="icon_name" />
</parameters>
</method>
<method name="ListIcons" cname="gnome_icon_theme_list_icons">
<method name="ListIcons" cname="gnome_icon_theme_list_icons" hidden="1">
<return-type type="GList*" />
<parameters>
<parameter type="const-char*" name="context" />
@ -4704,10 +4704,10 @@
<parameter type="int" name="n" />
</parameters>
</method>
<method name="List" cname="gnome_font_list" shared="true">
<method name="List" cname="gnome_font_list" shared="true" hidden="1">
<return-type type="GList*" />
</method>
<method name="ListFree" cname="gnome_font_list_free" shared="true">
<method name="ListFree" cname="gnome_font_list_free" shared="true" hidden="1">
<return-type type="void" />
<parameters>
<parameter type="GList*" name="fontlist" />
@ -4719,13 +4719,13 @@
<parameter type="gint" name="unicode" />
</parameters>
</method>
<method name="StyleList" cname="gnome_font_style_list" shared="true">
<method name="StyleList" cname="gnome_font_style_list" shared="true" hidden="1">
<return-type type="GList*" />
<parameters>
<parameter name="family" type="const-gchar*" />
</parameters>
</method>
<method name="StyleListFree" cname="gnome_font_style_list_free" shared="true">
<method name="StyleListFree" cname="gnome_font_style_list_free" shared="true" hidden="1">
<return-type type="void" />
<parameters>
<parameter type="GList*" name="styles" />
@ -4909,10 +4909,10 @@
<method name="GetType" cname="gnome_font_family_get_type" shared="true">
<return-type type="GType" />
</method>
<method name="List" cname="gnome_font_family_list" shared="true">
<method name="List" cname="gnome_font_family_list" shared="true" hidden="1">
<return-type type="GList*" />
</method>
<method name="ListFree" cname="gnome_font_family_list_free" shared="true">
<method name="ListFree" cname="gnome_font_family_list_free" shared="true" hidden="1">
<return-type type="void" />
<parameters>
<parameter type="GList*" name="fontlist" />
@ -4923,10 +4923,10 @@
<parameter type="const-gchar*" name="name" />
</parameters>
</constructor>
<method name="StyleList" cname="gnome_font_family_style_list">
<method name="StyleList" cname="gnome_font_family_style_list" hidden="1">
<return-type type="GList*" />
</method>
<method name="StyleListFree" cname="gnome_font_family_style_list_free" shared="true">
<method name="StyleListFree" cname="gnome_font_family_style_list_free" shared="true" hidden="1">
<return-type type="void" />
<parameters>
<parameter type="GList*" name="list" />