mirror of
https://github.com/elementary/gala.git
synced 2024-11-25 03:06:14 +01:00
Add custom binding for XRectangle to avoid warning
This commit is contained in:
parent
b27f0d5fad
commit
1688545087
@ -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};
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user