gdk: Add explicit conversion to and from GLib.Value for Rectangle
This allows the valtest sample to compile and work.
This commit is contained in:
parent
6300effd3a
commit
3ff334d0cc
1 changed files with 13 additions and 0 deletions
|
@ -71,6 +71,19 @@ namespace Gdk {
|
||||||
{
|
{
|
||||||
return !(r1 == r2);
|
return !(r1 == r2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static explicit operator GLib.Value (Gdk.Rectangle boxed)
|
||||||
|
{
|
||||||
|
GLib.Value val = GLib.Value.Empty;
|
||||||
|
val.Init (Gdk.Rectangle.GType);
|
||||||
|
val.Val = boxed;
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static explicit operator Gdk.Rectangle (GLib.Value val)
|
||||||
|
{
|
||||||
|
return (Gdk.Rectangle) val.Val;
|
||||||
|
}
|
||||||
|
|
||||||
public override string ToString ()
|
public override string ToString ()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue