* generator/ClassBase.cs (IgnoreMethod): Don't ignore GetFoo and

SetFoo methods if they aren't in the right form to be turned into
        property accessors. (Causes 13 previously ignored methods to now
        be wrapped. See doc/ChangeLog.)

        * gtk/Gtk.metadata: Fix up a few of those newly-exposed methods

svn path=/trunk/gtk-sharp/; revision=37891
This commit is contained in:
Dan Winship 2004-12-17 17:55:07 +00:00
parent 93209fbd15
commit 104dbedf07
15 changed files with 261 additions and 9 deletions

View file

@ -1,3 +1,12 @@
2004-12-17 Dan Winship <danw@novell.com>
* generator/ClassBase.cs (IgnoreMethod): Don't ignore GetFoo and
SetFoo methods if they aren't in the right form to be turned into
property accessors. (Causes 13 previously ignored methods to now
be wrapped. See doc/ChangeLog.)
* gtk/Gtk.metadata: Fix up a few of those newly-exposed methods
2004-12-16 Dan Winship <danw@novell.com>
* generator/ManagedCallString.cs (Setup, Finish, ToString): Add

View file

@ -1,3 +1,20 @@
2004-12-17 Dan Winship <danw@novell.com>
* en/Gnome/FontPicker.xml (SetFontName):
* en/Gnome/IconEntry.xml (SetFilename):
* en/GnomeDb/Combo.xml (SetModel):
* en/GnomeDb/List.xml (SetModel):
* en/Gtk/Combo.xml (SetValueInList):
* en/Gtk/FontButton.xml (SetFontName):
* en/Gtk/FontSelection.xml (SetFontName):
* en/Gtk/Image.xml (GetStock, GetIconSet, GetPixmap, GetImage):
* en/Gtk/Table.xml (SetRowSpacing, GetRowSpacing): Newly-visible
methods
* en/Gnome/Entry.xml (OnTextInserted):
* en/Gnome/FileEntry.xml (OnTextInserted): belatedly update for
previous change
2004-12-17 Shane Landrum <epicene@pobox.com>
* en/Gtk/FontSelectionDialog.xml: Doc 1 property

View file

@ -440,14 +440,14 @@
</Docs>
</Member>
<Member MemberName="OnTextInserted">
<MemberSignature Language="C#" Value="protected virtual void OnTextInserted (string text, out int position);" />
<MemberSignature Language="C#" Value="protected virtual void OnTextInserted (string text, ref int position);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="text" Type="System.String" />
<Parameter Name="position" Type="System.Int32&amp;" RefType="out" />
<Parameter Name="position" Type="System.Int32&amp;" RefType="ref" />
</Parameters>
<Docs>
<summary>Default handler for the <see cref="M:Gnome.Entry.TextInserted" /> event.</summary>

View file

@ -531,14 +531,14 @@
</Docs>
</Member>
<Member MemberName="OnTextInserted">
<MemberSignature Language="C#" Value="protected virtual void OnTextInserted (string text, out int position);" />
<MemberSignature Language="C#" Value="protected virtual void OnTextInserted (string text, ref int position);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="text" Type="System.String" />
<Parameter Name="position" Type="System.Int32&amp;" RefType="out" />
<Parameter Name="position" Type="System.Int32&amp;" RefType="ref" />
</Parameters>
<Docs>
<summary>Default handler for the <see cref="M:Gnome.FileEntry.TextInserted" /> event.</summary>

View file

@ -302,5 +302,21 @@
<remarks>Chain to this constructor if you have manually registered a native <see cref="T:GLib.GType" /> value for your subclass.</remarks>
</Docs>
</Member>
<Member MemberName="SetFontName">
<MemberSignature Language="C#" Value="public bool SetFontName (string fontname);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="fontname" Type="System.String" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="fontname">a <see cref="T:System.String" /></param>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
</Members>
</Type>

View file

@ -306,5 +306,21 @@
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="SetFilename">
<MemberSignature Language="C#" Value="public bool SetFilename (string filename);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filename" Type="System.String" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="filename">a <see cref="T:System.String" /></param>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
</Members>
</Type>

View file

@ -109,5 +109,22 @@
<remarks>Chain to this constructor if you have manually registered a native <see cref="T:GLib.GType" /> value for your subclass.</remarks>
</Docs>
</Member>
<Member MemberName="SetModel">
<MemberSignature Language="C#" Value="public void SetModel (Gda.DataModel model, int pos);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="model" Type="Gda.DataModel" />
<Parameter Name="pos" Type="System.Int32" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="model">a <see cref="T:Gda.DataModel" /></param>
<param name="pos">a <see cref="T:System.Int32" /></param>
<remarks>To be added</remarks>
</Docs>
</Member>
</Members>
</Type>

View file

@ -176,5 +176,22 @@
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="SetModel">
<MemberSignature Language="C#" Value="public void SetModel (Gda.DataModel model, int col);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="model" Type="Gda.DataModel" />
<Parameter Name="col" Type="System.Int32" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="model">a <see cref="T:Gda.DataModel" /></param>
<param name="col">a <see cref="T:System.Int32" /></param>
<remarks>To be added</remarks>
</Docs>
</Member>
</Members>
</Type>
</Type>

View file

@ -347,5 +347,22 @@ class ComboSample
<remarks />
</Docs>
</Member>
<Member MemberName="SetValueInList">
<MemberSignature Language="C#" Value="public void SetValueInList (bool val, bool ok_if_empty);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="val" Type="System.Boolean" />
<Parameter Name="ok_if_empty" Type="System.Boolean" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="val">a <see cref="T:System.Boolean" /></param>
<param name="ok_if_empty">a <see cref="T:System.Boolean" /></param>
<remarks>To be added</remarks>
</Docs>
</Member>
</Members>
</Type>

View file

@ -208,5 +208,21 @@
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="SetFontName">
<MemberSignature Language="C#" Value="public bool SetFontName (string fontname);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="fontname" Type="System.String" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="fontname">a <see cref="T:System.String" /></param>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
</Members>
</Type>

View file

@ -94,7 +94,7 @@
<param name="value">The name of a system font to select.</param>
<returns>The name of the currently selected font.</returns>
<remarks>
<para>If this property is used to alter the widget's font name to a font that could not be found, the widget will retain its original font selection.</para>
<para>If this property is used to alter the widget's font name to a font that could not be found, the widget will retain its original font selection. See also <see cref="M:Gtk.FontSelection.SetFontName" />, which returns a value indicating whether or not the new font name was found.</para>
</remarks>
</Docs>
</Member>
@ -154,5 +154,21 @@
<remarks>Chain to this constructor if you have manually registered a native <see cref="T:GLib.GType" /> value for your subclass.</remarks>
</Docs>
</Member>
<Member MemberName="SetFontName">
<MemberSignature Language="C#" Value="public bool SetFontName (string fontname);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="fontname" Type="System.String" />
</Parameters>
<Docs>
<summary>Set the current font selection</summary>
<param name="fontname">the name of the font to be selected</param>
<returns><see langword="true" /> if the font was found and selected</returns>
<remarks>This can be used instead of setting <see cref="P:Gtk.FontSelection.FontName" /> property if you need to know whether or not <paramref name="fontname" /> was valid.</remarks>
</Docs>
</Member>
</Members>
</Type>

View file

@ -600,5 +600,73 @@ masked by the given <see cref="Gdk.Pixmap" />.</summary>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="GetStock">
<MemberSignature Language="C#" Value="public void GetStock (out string stock_id, out Gtk.IconSize size);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="stock_id" Type="System.String&amp;" RefType="out" />
<Parameter Name="size" Type="Gtk.IconSize&amp;" RefType="out" />
</Parameters>
<Docs>
<summary>Get the stock item name and size, if this is a stock image</summary>
<param name="stock_id">the stock item name</param>
<param name="size">the stock item size, a <see cref="T:Gtk.IconSize" /></param>
<remarks>If the <see cref="T:Gtk.Image" /> is displaying a stock image, this method can be used to retrieve the stock item name and the size.</remarks>
</Docs>
</Member>
<Member MemberName="GetIconSet">
<MemberSignature Language="C#" Value="public void GetIconSet (out Gtk.IconSet icon_set, out Gtk.IconSize size);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="icon_set" Type="Gtk.IconSet&amp;" RefType="out" />
<Parameter Name="size" Type="Gtk.IconSize&amp;" RefType="out" />
</Parameters>
<Docs>
<summary>Get the icon set and size, if this image is using an icon set</summary>
<param name="icon_set">the <see cref="T:Gtk.IconSet" /></param>
<param name="size">the icon size, a <see cref="T:Gtk.IconSize" /></param>
<remarks>If the <see cref="T:Gtk.Image" /> is displaying an image from an icon set, this method can be used to retrieve the icon set and the size.</remarks>
</Docs>
</Member>
<Member MemberName="GetPixmap">
<MemberSignature Language="C#" Value="public void GetPixmap (out Gdk.Pixmap pixmap, out Gdk.Pixmap mask);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="pixmap" Type="Gdk.Pixmap&amp;" RefType="out" />
<Parameter Name="mask" Type="Gdk.Pixmap&amp;" RefType="out" />
</Parameters>
<Docs>
<summary>Get the pixmap and mask for an image</summary>
<param name="pixmap">the <see cref="T:Gdk.Pixmap" /></param>
<param name="mask">the mask</param>
<remarks></remarks>
</Docs>
</Member>
<Member MemberName="GetImage">
<MemberSignature Language="C#" Value="public void GetImage (out Gdk.Image gdk_image, out Gdk.Pixmap mask);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="gdk_image" Type="Gdk.Image&amp;" RefType="out" />
<Parameter Name="mask" Type="Gdk.Pixmap&amp;" RefType="out" />
</Parameters>
<Docs>
<summary>Get the image data and mask for an image</summary>
<param name="gdk_image">the image data</param>
<param name="mask">the mask</param>
<remarks></remarks>
</Docs>
</Member>
</Members>
</Type>

View file

@ -14,7 +14,7 @@
<remarks>
<para>The Table widget allows a programmer to arrange widgets in rows and columns, making it easy to align many widgets adjacent to each other, horizontally and vertically.</para>
<para>Tables are created with a specific size - the number of rows and columns. This can be changed dynamically with the <see cref="M:Gtk.Table.Resize" /> method. Widgets are packed into the table with <see cref="M:Gtk.Table.Attach" /> methods.</para>
<para>The layout of a table can be altered by setting the spacing between rows and columns. This is done with the <see cref="P:Gtk.Table.ColumnSpacing" /> and <see cref="P:Gtk.Table.RowSpacing" /> properties, respectively. The spacing of individual cells can be adjusted with <see cref="M:Gtk.Table.SetColSpacing" />.</para>
<para>The layout of a table can be altered by setting the spacing between rows and columns. This is done with the <see cref="P:Gtk.Table.ColumnSpacing" /> and <see cref="P:Gtk.Table.RowSpacing" /> properties, respectively. The spacing of individual cells can be adjusted with <see cref="M:Gtk.Table.SetColSpacing" /> and <see cref="M:Gtk.Table.SetRowSpacing" />.</para>
<para>The following shows how to create a table with three widgets:
<example>
<code lang="C#">
@ -91,6 +91,41 @@ public Widget MakeTableTester()
<remarks />
</Docs>
</Member>
<Member MemberName="SetRowSpacing">
<MemberSignature Language="C#" Value="public void SetRowSpacing (uint row, uint spacing);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="row" Type="System.UInt32" />
<Parameter Name="spacing" Type="System.UInt32" />
</Parameters>
<Docs>
<summary>Sets the spacing around a specified row.</summary>
<param name="row">A zero-indexed row number to adjust the spacing of.</param>
<param name="spacing">The number of pixels on each side of the <paramref name="row" />.</param>
<remarks>
<para>To adjust the spacing between all rows, use the <see cref="P:Gtk.Table.RowSpacing" /> property.</para>
</remarks>
</Docs>
</Member>
<Member MemberName="GetRowSpacing">
<MemberSignature Language="C#" Value="public uint GetRowSpacing (uint row);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.UInt32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="row" Type="System.UInt32" />
</Parameters>
<Docs>
<summary>The spacing currently set for a given row.</summary>
<param name="row">A zero-indexed row number to retrieve spacing information from.</param>
<returns>The number of pixels of spacing assigned to the specified <paramref name="row" />.</returns>
<remarks />
</Docs>
</Member>
<Member MemberName="Resize">
<MemberSignature Language="C#" Value="public void Resize (uint rows, uint columns);" />
<MemberType>Method</MemberType>

View file

@ -235,8 +235,8 @@ namespace GtkSharp.Generation {
protected bool IgnoreMethod (Method method)
{
string mname = method.Name;
return ((mname.StartsWith("Set") || mname.StartsWith("Get")) &&
(props != null) && props.ContainsKey(mname.Substring(3)));
return ((method.IsSetter || (method.IsGetter && mname.StartsWith("Get"))) &&
(props != null) && props.ContainsKey(mname.Substring(3)));
}
public void GenMethods (GenerationInfo gen_info, Hashtable collisions, ClassBase implementor)

View file

@ -128,7 +128,9 @@
<attr path="/api/namespace/object[@cname='GtkCheckMenuItem']/method[@name='Toggled']" name="name">Toggle</attr>
<attr path="/api/namespace/object[@cname='GtkClipboard']/method[@name='SetWithData']/*/*[@name='targets']" name="array">1</attr>
<attr path="/api/namespace/object[@cname='GtkClipboard']/method[@name='SetWithOwner']/*/*[@name='targets']" name="array">1</attr>
<attr path="/api/namespace/object[@cname='GtkColorButton']/method[@name='GetColor']/*/*[@name='color']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkColorSelection']/method[@name='GetColor']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkColorSelection']/method[@name='GetCurrentColor']/*/*[@name='color']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkColorSelection']/method[@name='GetPreviousColor']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkColorSelection']/method[@name='PaletteFromString']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkColorSelection']/method[@name='PaletteToString']" name="hidden">1</attr>
@ -180,6 +182,12 @@
<attr path="/api/namespace/object[@cname='GtkImage']/constructor[@cname='gtk_image_new_from_icon_set']/*/*[@name='size']" name="property_name">icon_size</attr>
<attr path="/api/namespace/object[@cname='GtkImage']/constructor[@cname='gtk_image_new_from_stock']/*/*[@name='stock_id']" name="property_name">stock</attr>
<attr path="/api/namespace/object[@cname='GtkImage']/constructor[@cname='gtk_image_new_from_stock']/*/*[@name='size']" name="property_name">icon_size</attr>
<attr path="/api/namespace/object[@cname='GtkImage']/method[@name='GetIconSet']/*/*[@name='icon_set']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkImage']/method[@name='GetImage']/*/*[@name='gdk_image']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkImage']/method[@name='GetImage']/*/*[@name='mask']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkImage']/method[@name='GetPixmap']/*/*[@name='pixmap']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkImage']/method[@name='GetPixmap']/*/*[@name='mask']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkImage']/method[@name='GetStock']/*/*[@name='stock_id']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkImage']/method[@name='SetFromPixmap']/*/*[@type='GdkBitmap*']" name="null_ok">1</attr>
<attr path="/api/namespace/object[@cname='GtkIMContext']/signal[@name='DeleteSurrounding']" name="name">SurroundingDeleted</attr>
<attr path="/api/namespace/object[@cname='GtkInvisible']/property[@name='Screen']" name="new_flag">1</attr>