Hide the Copy, Free and Hash methods in Gdk.Color and override GetHashCode().

svn path=/trunk/gtk-sharp/; revision=13606
This commit is contained in:
Lee Mallabone 2003-04-14 18:01:28 +00:00
parent 9d3c4431c7
commit 90fac8a1ad
4 changed files with 28 additions and 4 deletions

View file

@ -3,6 +3,9 @@
* api/gtk-api.xml, sources/Gtk.metadata, gtk/ColorSelection.custom:
Fix up API in ColorSelection - Palette{From,To}String now work, and
PreviousColor is now a C# property.
* api/gdk-api.xml, sources/Gdk.metadata, gdk/Color.custom: Hide the
Copy, Free and Hash methods in Gdk.Color and override GetHashCode().
2003-04-12 Alp Toker <alp@atoker.com>

View file

@ -1809,7 +1809,7 @@
<field cname="red" type="guint16"/>
<field cname="green" type="guint16"/>
<field cname="blue" type="guint16"/>
<method name="Copy" cname="gdk_color_copy">
<method name="Copy" cname="gdk_color_copy" hidden="1">
<return-type type="GdkColor*"/>
</method>
<method name="Equal" cname="gdk_color_equal">
@ -1818,13 +1818,13 @@
<parameter type="const-GdkColor*" name="colorb"/>
</parameters>
</method>
<method name="Free" cname="gdk_color_free">
<method name="Free" cname="gdk_color_free" hidden="1">
<return-type type="void"/>
</method>
<method name="GetType" cname="gdk_color_get_type" shared="true">
<return-type type="GType"/>
</method>
<method name="Hash" cname="gdk_color_hash">
<method name="Hash" cname="gdk_color_hash" hidden="1">
<return-type type="guint"/>
</method>
<method name="Parse" cname="gdk_color_parse" shared="true">

View file

@ -32,4 +32,12 @@ public Color (System.Drawing.Color color)
green = (ushort) (g << 8 | g);
blue = (ushort) (b << 8 | b);
pixel = 0;
}
}
[DllImport("libgdk-win32-2.0-0.dll")]
static extern uint gdk_color_hash(ref Gdk.Color raw);
public override int GetHashCode() {
return (int) gdk_color_hash(ref this);
}

View file

@ -183,6 +183,19 @@
</attribute>
</data>
</rule>
<rule>
<class name="GdkColor">
<method>Hash</method>
<method>Copy</method>
<method>Free</method>
</class>
<data>
<attribute target="method">
<name>hidden</name>
<value>1</value>
</attribute>
</data>
</rule>
<rule>
<class name="GdkPixbuf">
<method>AddAlpha</method>