GtkSharp/glib/EnumWrapper.cs
Rachel Hestilow 1f4ff5bb86 2002-06-24 Rachel Hestilow <hestilow@ximian.com>
* glib/EnumWrapper.cs: New class which holds an enum int.

	* glib/Value.cs: Add support for glib enum types. We needed
	to use EnumWrapper for this because otherwise the int operator
	wouldn't know which glib function to use.

	* generator/BoxedGen.cs, ClassBase.cs, Ctor.cs, EnumGen.cs,
	InterfaceGen.cs, Method.cs, ObjectGen.cs, Signal.cs, StructGen.cs:
	Create more doc stubs.

	* generator/Property.cs: Generate enum values correctly.

	* generator/Ctor.cs: Refactor generation to honor metadata-specified
	collision preference.

	* parser/Gtk.metadata: Added constructor collision preferences to
	all known clashes.

	* parse/Gdk.metadata: Added (for Pixbuf clashes).

svn path=/trunk/gtk-sharp/; revision=5437
2002-06-24 22:04:10 +00:00

26 lines
473 B
C#

// EnumWrapper.cs - Class to hold arbitrary glib enums
//
// Author: Rachel Hestilow <hestilow@ximian.com>
//
// (c) 2002 Rachel Hestilow
namespace GLib {
using System;
using System.Runtime.InteropServices;
// <summary> Enum wrapping class </summary>
// <remarks> </remarks>
public class EnumWrapper {
int val;
public EnumWrapper (int val) {
this.val = val;
}
public static explicit operator int (EnumWrapper wrap) {
return wrap.val;
}
}
}