Add custom binding for XRectangle to avoid warning

This commit is contained in:
Rico Tzschichholz 2012-06-05 08:31:48 +02:00
parent b27f0d5fad
commit 1688545087
2 changed files with 11 additions and 3 deletions

View File

@ -176,13 +176,13 @@ namespace Gala
**/
public void set_input_area (InputArea area)
{
X.Rectangle rect;
X.Xrectangle rect;
int width, height;
screen.get_size (out width, out height);
switch (area) {
case InputArea.FULLSCREEN:
rect = {0, 0, (short)width, (short)height};
rect = {0, 0, (ushort)width, (ushort)height};
break;
case InputArea.HOT_CORNER: //leave one pix in the bottom left
rect = {(short)(width - 1), (short)(height - 1), 1, 1};

View File

@ -5,7 +5,7 @@
namespace X {
namespace Fixes {
[CCode (cheader_filename = "X11/extensions/Xfixes.h", cname = "XFixesCreateRegion")]
public static X.XserverRegion create_region (X.Display display, [CCode (array_length = true)] X.Rectangle[] rectangles);
public static X.XserverRegion create_region (X.Display display, [CCode (array_length = true)] X.Xrectangle[] rectangles);
[CCode (cheader_filename = "X11/extensions/Xfixes.h", cname = "XFixesDestroyRegion")]
public static void destroy_region (X.Display display, X.XserverRegion region);
}
@ -13,4 +13,12 @@ namespace X {
[CCode (cheader_filename = "X11/extensions/Xfixes.h", cname = "XserverRegion", has_type_id = false)]
public struct XserverRegion {
}
[SimpleType]
[CCode (cheader_filename = "X11/Xlib.h", cname = "XRectangle", has_type_id = false)]
public struct Xrectangle {
public short x;
public short y;
public ushort width;
public ushort height;
}
}