Ryujinx-GtkSharp/gdk/Color.custom
Mike Kestner d41f6593b0 2004-02-10 Mike Kestner <mkestner@ximian.com>
* art/Art.metadata : mark a field private
	* art/art-api.xml : regen
	* gda/Gda.metadata : mark a few structs opaque
	* gda/gda-api.xml : regen
	* gdk/*.custom : fix changed field names
	* gdk/gdk-api.xml : regen
	* generator/Field.cs : StudlyCase simple typed field names.
	* gnome/Gnome.metadata : mark FontEntry.weight private to
	avoid collision with Weight field. s|//|/api/namespace|g
	* gnome/gnome-api.xml : regen
	* gtk/Gtk.metadata : rename AccelKey.accel_key to key to
	avoid collision with type name.
	* gtk/*.custom : fix changed field names
	* gtk/gtk-api.xml : regen
	* pango/pango-api.xml : regen
	* parser/gapi_pp.pl : add a private_regex to hide BACKEND
	and ENGINE apis, which are by convention private.
	* sample/* : make compile
	* sample/GtkDemo/* : make compile
	* sample/test/* : make compile
	* sources/gtk-sharp-sources.xml : exclude a bunch of pango
	source files.

svn path=/trunk/gtk-sharp/; revision=22947
2004-02-10 16:04:50 +00:00

44 lines
898 B
Plaintext

// Gdk.Color.custom - Gdk Color class customizations
//
// Author: Jasper van Putten <Jaspervp@gmx.net>, Miguel de Icaza.
//
// (c) 2002 Jasper van Putten
// (c) 2003 Miguel de Icaza.
//
// This code is inserted after the automatically generated code.
public override string ToString ()
{
return String.Format ("rgb:{0:x}/{1:x}/{2:x}", Red, Green, Blue);
}
public Color (byte r, byte g, byte b)
{
Red = (ushort) (r << 8 | r);
Green = (ushort) (g << 8 | g);
Blue = (ushort) (b << 8 | b);
Pixel = 0;
}
public Color (System.Drawing.Color color)
{
byte r, g, b;
r = color.R;
g = color.G;
b = color.B;
Red = (ushort) (r << 8 | r);
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);
}