mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-06-01 23:30:25 +00:00
2005-06-01 Mike Kestner <mkestner@novell.com>
* glib/Value.cs : handle enum/flags types in Val. [Fixes #75112] svn path=/trunk/gtk-sharp/; revision=45310
This commit is contained in:
parent
f6f9fd0c79
commit
c881d7c5aa
|
@ -1,3 +1,8 @@
|
||||||
|
2005-06-01 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
|
* glib/Value.cs : handle enum/flags types in Val.
|
||||||
|
[Fixes #75112]
|
||||||
|
|
||||||
2005-06-01 Dan Winship <danw@novell.com>
|
2005-06-01 Dan Winship <danw@novell.com>
|
||||||
|
|
||||||
* glib/Value.cs: Add a constructor and an explicit cast for
|
* glib/Value.cs: Add a constructor and an explicit cast for
|
||||||
|
|
|
@ -316,6 +316,10 @@ namespace GLib {
|
||||||
return (string) this;
|
return (string) this;
|
||||||
else if (type == ManagedValue.GType)
|
else if (type == ManagedValue.GType)
|
||||||
return ManagedValue.ObjectForWrapper (g_value_get_boxed (ref this));
|
return ManagedValue.ObjectForWrapper (g_value_get_boxed (ref this));
|
||||||
|
else if (g_type_is_a (type.Val, GLib.GType.Enum.Val))
|
||||||
|
return (EnumWrapper) this;
|
||||||
|
else if (g_type_is_a (type.Val, GLib.GType.Flags.Val))
|
||||||
|
return (EnumWrapper) this;
|
||||||
else if (g_type_is_a (type.Val, GType.Object.Val))
|
else if (g_type_is_a (type.Val, GType.Object.Val))
|
||||||
return (GLib.Object) this;
|
return (GLib.Object) this;
|
||||||
else
|
else
|
||||||
|
@ -354,6 +358,10 @@ namespace GLib {
|
||||||
g_value_set_pointer (ref this, buf);
|
g_value_set_pointer (ref this, buf);
|
||||||
} else if (type == ManagedValue.GType) {
|
} else if (type == ManagedValue.GType) {
|
||||||
g_value_set_boxed (ref this, ManagedValue.WrapObject (value));
|
g_value_set_boxed (ref this, ManagedValue.WrapObject (value));
|
||||||
|
} else if (g_type_is_a (type.Val, GLib.GType.Enum.Val)) {
|
||||||
|
g_value_set_enum (ref this, (int) value);
|
||||||
|
} else if (g_type_is_a (type.Val, GLib.GType.Flags.Val)) {
|
||||||
|
g_value_set_flags (ref this, (uint) value);
|
||||||
} else if (g_type_is_a (type.Val, GLib.GType.Boxed.Val)) {
|
} else if (g_type_is_a (type.Val, GLib.GType.Boxed.Val)) {
|
||||||
if (value is IWrapper) {
|
if (value is IWrapper) {
|
||||||
g_value_set_boxed (ref this, ((IWrapper)value).Handle);
|
g_value_set_boxed (ref this, ((IWrapper)value).Handle);
|
||||||
|
|
Loading…
Reference in a new issue