[vala] x11: Add drawable, pixmap and RECTANGLE structs.
- From: Evan Nemerson <evann src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] x11: Add drawable, pixmap and RECTANGLE structs.
- Date: Mon, 16 Nov 2009 20:53:30 +0000 (UTC)
commit f59ee7ec3fedc65b1e8768fa7ba037e44fa04670
Author: Nicolas Bruguier <nicolas bruguier supersonicimagine fr>
Date: Mon Nov 16 12:49:26 2009 -0800
x11: Add drawable, pixmap and RECTANGLE structs.
Fixes bug 598174.
vapi/x11.vapi | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 54 insertions(+), 2 deletions(-)
---
diff --git a/vapi/x11.vapi b/vapi/x11.vapi
index 062e50c..a47d5db 100644
--- a/vapi/x11.vapi
+++ b/vapi/x11.vapi
@@ -20,7 +20,7 @@
* Jürg Billeter <j bitron ch>
*/
-[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "X11/Xlib.h,X11/Xatom.h,X11/Xutil.h")]
+[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "X11/Xlib.h,X11/Xatom.h,X11/Xutil.h,X11/Xregion.h")]
namespace X {
// Note: must be called before opening a display or calling any other Xlib function,
// see http://tronche.com/gui/x/xlib/display/XInitThreads.html
@@ -141,6 +141,9 @@ namespace X {
[CCode (cname = "XExtendedMaxRequestSize")]
public long max_extended_request_size ();
+ [CCode (cname = "XEventsQueued")]
+ public int events_queued (int mode);
+
[CCode (cname = "XNextEvent")]
public int next_event (ref Event event_return);
@@ -263,12 +266,44 @@ namespace X {
[SimpleType]
[IntegerType (rank = 9)]
+ [CCode (cname = "XID", type_id = "G_TYPE_INT",
+ marshaller_type_name = "INT",
+ get_value_function = "g_value_get_int",
+ set_value_function = "g_value_set_int", default_value = "0",
+ type_signature = "i")]
+ public struct ID {
+ }
+
+ [SimpleType]
+ [IntegerType (rank = 9)]
+ [CCode (cname = "Drawable", type_id = "G_TYPE_INT",
+ marshaller_type_name = "INT",
+ get_value_function = "g_value_get_int",
+ set_value_function = "g_value_set_int", default_value = "0",
+ type_signature = "i")]
+ public struct Drawable : ID
+ {
+ }
+
+ [SimpleType]
+ [IntegerType (rank = 9)]
[CCode (cname = "Window", type_id = "G_TYPE_INT",
marshaller_type_name = "INT",
get_value_function = "g_value_get_int",
set_value_function = "g_value_set_int", default_value = "0",
type_signature = "i")]
- public struct Window {
+ public struct Window : Drawable {
+ }
+
+
+ [SimpleType]
+ [IntegerType (rank = 9)]
+ [CCode (cname = "Pixmap", type_id = "G_TYPE_INT",
+ marshaller_type_name = "INT",
+ get_value_function = "g_value_get_int",
+ set_value_function = "g_value_set_int", default_value = "0",
+ type_signature = "i")]
+ public struct Pixmap : Drawable {
}
public struct Visual {
@@ -752,6 +787,14 @@ namespace X {
public ClientMessageEventData data;
}
+ [CCode (cname = "RECTANGLE", has_type_id = "false")]
+ public struct Rectangle {
+ public short x;
+ public short y;
+ public short width;
+ public short height;
+ }
+
// union
public struct ClientMessageEventData {
public unowned char[] b;
@@ -759,6 +802,13 @@ namespace X {
public unowned long[] l;
}
+ [CCode (cprefix = "Queued")]
+ public enum QueuedMode {
+ Already,
+ AfterFlush,
+ AfterReading
+ }
+
[CCode (cprefix = "PropMode")]
public enum PropMode {
Replace,
@@ -864,6 +914,8 @@ namespace X {
public int width_of_screen ();
}
+ public const X.ID None;
+
public const X.Atom XA_ATOM;
public const X.Atom XA_CARDINAL;
public const X.Atom XA_WINDOW;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]