(Resending a modified patch, per juergbi.)
This patch fixes cnames for the X11 bindings and provides bindings for
new methods which came from my original bindings that I wrote for
AllTray earlier this year.
Signed-off-by: Michael B. Trausch m...@trausch.us
---
vapi/x11.vapi | 236
- 1 files
changed, 233 insertions(+), 3 deletions(-)
--- Mike
--
Fix the cause, not the symptom.
--- Steve Maguire
From 422f788fa199e8b86dd437a016381a7d3aa2b2b9 Mon Sep 17 00:00:00 2001
From: Michael B. Trausch m...@trausch.us
Date: Sun, 31 May 2009 14:38:50 -0400
Subject: [PATCH] Enhance X11 bindings and fix some cnames
This patch fixes cnames for the X11 bindings and provides bindings for
new methods which came from my original bindings that I wrote for
AllTray earlier this year.
Signed-off-by: Michael B. Trausch m...@trausch.us
---
vapi/x11.vapi | 236 -
1 files changed, 233 insertions(+), 3 deletions(-)
diff --git a/vapi/x11.vapi b/vapi/x11.vapi
index b7944f3..7f73d9c 100644
--- a/vapi/x11.vapi
+++ b/vapi/x11.vapi
@@ -22,87 +22,202 @@
[CCode (cprefix = , lower_case_cprefix = , cheader_filename = X11/Xlib.h,X11/Xatom.h,X11/Xutil.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
+ [CCode (cname = XInitThreads)]
+ public Status init_threads ();
+
[Compact]
[CCode (cname = Display, ref_function = , unref_function = )]
public class Display {
+ [CCode (cname = XOpenDisplay)]
+ public Display (string? name = null);
+
+ [CCode (cname = XAllPlanes)]
+ public static ulong get_all_planes ();
+
[CCode (cname = XAddToSaveSet)]
public int add_to_save_set (Window w);
+
[CCode (cname = XAllowEvents)]
public int allow_events (int event_mode, int time);
+
+ [CCode (cname = XBitmapBitOrder)]
+ public int bitmap_bit_order ();
+
+ [CCode (cname = XBitmapUnit)]
+ public int bitmap_scanline_unit ();
+
+ [CCode (cname = XBitmapPad)]
+ public int bitmap_scanline_padding ();
+
[CCode (cname = XChangeProperty)]
public int change_property (Window w, Atom property, Atom type, int format, int mode, [CCode (array_length = false)] uchar[] data, int nelements);
+
[CCode (cname = XChangeWindowAttributes)]
public int change_window_attributes (Window w, ulong valuemask, SetWindowAttributes attributes);
+
[CCode (cname = XConfigureWindow)]
public int configure_window (Window w, uint value_mask, WindowChanges values);
+
[CCode (cname = ConnectionNumber)]
public int connection_number ();
+
[CCode (cname = DefaultRootWindow)]
public Window default_root_window ();
+
+ [CCode (cname = XDefaultScreenOfDisplay)]
+ public unowned Screen default_screen ();
+
+ [CCode (cname = XScreenOfDisplay)]
+ public unowned Screen screen_by_id (int screen_number);
+
[CCode (cname = DisplayString)]
public string display_string ();
+
+ [CCode (cname = XQLength)]
+ public int event_queue_length ();
+
[CCode (cname = XFlush)]
public int flush ();
+
[CCode (cname = XGetKeyboardMapping, array_length = false)]
public weak uint[] get_keyboard_mapping (uint first_keycode, int keycode_count, ref int keysyms_per_keycode_return);
+
[CCode (cname = XGetModifierMapping)]
public ModifierKeymap get_modifier_mapping ();
+
[CCode (cname = XGetSelectionOwner)]
public Window get_selection_owner (Atom selection);
+
[CCode (cname = XGetWindowAttributes)]
public void get_window_attributes (Window w, out WindowAttributes window_attributes_return);
+
[CCode (cname = XGetWindowProperty)]
public int get_window_property (Window w, Atom property, long long_offset, long long_length, bool delete, Atom req_type, out Atom actual_type_return, out int actual_format_return, out ulong nitems_return, out ulong bytes_after_return, out void* prop_return);
+
[CCode (cname = XGrabButton)]
public int grab_button (uint button, uint modifiers, Window grab_window, bool owner_events, uint event_mask, int pointer_mode, int keyboard_mode, Window confine_to, uint cursor);
+
[CCode (cname = XGrabPointer)]
public int grab_pointer (Window grab_window, bool owner_events, uint event_mask, int pointer_mode, int keyboard_mode, Window confine_to, uint cursor, int time);
+
[CCode (cname = XGrabServer)]
public int grab_server ();
+
+ [CCode (cname = XImageByteOrder)]
+ public int image_byte_order ();
+
[CCode (cname = XInternAtom)]
public Atom intern_atom (string atom_name, bool only_if_exists);
+
[CCode (cname = XInternAtoms)]
public void intern_atoms (string[] names, bool only_if_exists, [CCode (array_length = false)] Atom[] atoms_return);
+
+ [CCode (cname = XInternalConnectionNumbers)]
+ public Status internal_connection_numbers (ref int[] fd_return);
+
[CCode (cname = XDisplayKeycodes)]
public int keycodes (ref int