Regenerate, with newer Clutter and GLib versions.
[girtod.git] / gtk2 / clutterx11.d
blob32d8b33bad4b379b92951e707988095a3786b2c2
1 // *** DO NOT EDIT ***
2 // Automatically generated from "/usr/share/gir-1.0/ClutterX11-1.0.gir"
4 module ClutterX11;
5 public import gtk2.atk;
6 alias gtk2.atk Atk;
7 public import gtk2.clutter;
8 alias gtk2.clutter Clutter;
9 public import gtk2.cogl;
10 alias gtk2.cogl Cogl;
11 public import gtk2.coglpango;
12 alias gtk2.coglpango CoglPango;
13 public import gtk2.gl;
14 alias gtk2.gl GL;
15 public import gtk2.glib2;
16 alias gtk2.glib2 GLib2;
17 public import gtk2.gobject2;
18 alias gtk2.gobject2 GObject2;
19 public import gtk2.gio2;
20 alias gtk2.gio2 Gio2;
21 public import gtk2.json;
22 alias gtk2.json Json;
23 public import gtk2.pango;
24 alias gtk2.pango Pango;
25 public import gtk2.pangocairo;
26 alias gtk2.pangocairo PangoCairo;
27 public import gtk2.pangoft2;
28 alias gtk2.pangoft2 PangoFT2;
29 public import gtk2.cairo;
30 alias gtk2.cairo cairo;
31 public import gtk2.fontconfig2;
32 alias gtk2.fontconfig2 fontconfig2;
33 public import gtk2.freetype2;
34 alias gtk2.freetype2 freetype2;
35 public import gtk2.xlib2;
36 alias gtk2.xlib2 xlib2;
38 // package: "clutter-x11-1.0";
39 // C header: "clutter/x11/clutter-x11.h";
41 // c:symbol-prefixes: ["clutter_x11"]
42 // c:identifier-prefixes: ["ClutterX11"]
44 // module ClutterX11;
47 // VERSION: 0.6
48 // Filter function for X11 native events.
49 // RETURNS: the result of the filtering
50 // <xev>: Native X11 event structure
51 // <cev>: Clutter event structure
52 // <data>: user data passed to the filter function
53 extern (C) alias Clutter.X11FilterReturn function (xlib.XEvent* xev, Clutter.Event* cev, void* data) FilterFunc;
55 // Return values for the #ClutterX11FilterFunc function.
56 enum FilterReturn /* Version 0.6 */ {
57 CONTINUE = 0,
58 TRANSLATE = 1,
59 REMOVE = 2
61 // The #ClutterX11TexturePixmap structure contains only private data
62 struct TexturePixmap /* : Clutter.Texture */ /* Version 0.8 */ {
63 mixin Atk.ImplementorIface.__interface__;
64 mixin Clutter.Animatable.__interface__;
65 mixin Clutter.Container.__interface__;
66 mixin Clutter.Scriptable.__interface__;
67 alias parent this;
68 alias parent super_;
69 alias parent texture;
70 Clutter.Texture parent;
71 private TexturePixmapPrivate* priv;
74 // VERSION: 0.8
75 // Creates a new #ClutterX11TexturePixmap which can be used to display the
76 // contents of an X11 Pixmap inside a Clutter scene graph
77 // RETURNS: A new #ClutterX11TexturePixmap
78 static TexturePixmap* new_()() {
79 return clutter_x11_texture_pixmap_new();
82 // VERSION: 0.8
83 // Creates a new #ClutterX11TexturePixmap for @pixmap
84 // RETURNS: A new #ClutterX11TexturePixmap bound to the given X Pixmap
85 // <pixmap>: the X Pixmap to which this texture should be bound
86 static TexturePixmap* new_with_pixmap()(xlib.Pixmap pixmap) {
87 return clutter_x11_texture_pixmap_new_with_pixmap(pixmap);
90 // VERSION: 0.8
91 // Creates a new #ClutterX11TexturePixmap for @window
92 // RETURNS: A new #ClutterX11TexturePixmap bound to the given X window.
93 // <window>: the X window to which this texture should be bound
94 static TexturePixmap* new_with_window()(xlib.Window window) {
95 return clutter_x11_texture_pixmap_new_with_window(window);
98 // VERSION: 0.8
99 // Enables or disables the automatic updates ot @texture in case the backing
100 // pixmap or window is damaged
101 // <setting>: %TRUE to enable automatic updates
102 void set_automatic()(int setting) {
103 clutter_x11_texture_pixmap_set_automatic(&this, setting);
106 // VERSION: 0.8
107 // Sets the X Pixmap to which the texture should be bound.
108 // <pixmap>: the X Pixmap to which the texture should be bound
109 void set_pixmap()(xlib.Pixmap pixmap) {
110 clutter_x11_texture_pixmap_set_pixmap(&this, pixmap);
113 // VERSION: 0.8
114 // Sets up a suitable pixmap for the window, using the composite and damage
115 // extensions if possible, and then calls
116 // clutter_x11_texture_pixmap_set_pixmap().
118 // If you want to display a window in a #ClutterTexture, you probably want
119 // this function, or its older sister, clutter_glx_texture_pixmap_set_window().
121 // This function has no effect unless the XComposite extension is available.
122 // <window>: the X window to which the texture should be bound
123 // <automatic>: %TRUE for automatic window updates, %FALSE for manual.
124 void set_window()(xlib.Window window, int automatic) {
125 clutter_x11_texture_pixmap_set_window(&this, window, automatic);
128 // VERSION: 0.8
129 // Resets the texture's pixmap from its window, perhaps in response to the
130 // pixmap's invalidation as the window changed size.
131 void sync_window()() {
132 clutter_x11_texture_pixmap_sync_window(&this);
135 // VERSION: 0.8
136 // Performs the actual binding of texture to the current content of
137 // the pixmap. Can be called to update the texture if the pixmap
138 // content has changed.
139 // <x>: the X coordinate of the area to update
140 // <y>: the Y coordinate of the area to update
141 // <width>: the width of the area to update
142 // <height>: the height of the area to update
143 void update_area()(int x, int y, int width, int height) {
144 clutter_x11_texture_pixmap_update_area(&this, x, y, width, height);
147 // VERSION: 1.2
148 // ::queue-damage-redraw is emitted to notify that some sub-region
149 // of the texture has been changed (either by an automatic damage
150 // update or by an explicit call to
151 // clutter_x11_texture_pixmap_update_area). This usually means a
152 // redraw needs to be queued for the actor.
154 // The default handler will queue a clipped redraw in response to
155 // the damage, using the assumption that the pixmap is being painted
156 // to a rectangle covering the transformed allocation of the actor.
157 // If you sub-class and change the paint method so this isn't true
158 // then you must also provide your own damage signal handler to
159 // queue a redraw that blocks this default behaviour.
160 // <x>: The top left x position of the damage region
161 // <y>: The top left y position of the damage region
162 // <width>: The width of the damage region
163 // <height>: The height of the damage region
164 extern (C) alias static void function (TexturePixmap* this_, int x, int y, int width, int height, void* user_data=null) signal_queue_damage_redraw;
166 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
167 return super_.signal_connect!name(cb, data, cf);
170 ulong signal_connect(string name:"queue-damage-redraw", CB:signal_queue_damage_redraw)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
171 return signal_connect_data!()(&this, cast(char*)"queue-damage-redraw",
172 cast(GObject2.Callback)cb, data, null, cf);
175 // VERSION: 0.8
176 // The ::update-area signal is emitted to ask the texture to update its
177 // content from its source pixmap.
178 extern (C) alias static void function (TexturePixmap* this_, int object, int p0, int p1, int p2, void* user_data=null) signal_update_area;
179 ulong signal_connect(string name:"update-area", CB:signal_update_area)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
180 return signal_connect_data!()(&this, cast(char*)"update-area",
181 cast(GObject2.Callback)cb, data, null, cf);
185 // The #ClutterX11TexturePixmapClass structure contains only private data
186 struct TexturePixmapClass /* Version 0.8 */ {
187 private Clutter.TextureClass parent_class;
189 // <x>: the X coordinate of the area to update
190 // <y>: the Y coordinate of the area to update
191 // <width>: the width of the area to update
192 // <height>: the height of the area to update
193 extern (C) void function (TexturePixmap* texture, int x, int y, int width, int height) update_area;
196 struct TexturePixmapPrivate {
199 struct XInputDevice {
202 enum XInputEventTypes {
203 KEY_PRESS_EVENT = 0,
204 KEY_RELEASE_EVENT = 1,
205 BUTTON_PRESS_EVENT = 2,
206 BUTTON_RELEASE_EVENT = 3,
207 MOTION_NOTIFY_EVENT = 4,
208 LAST_EVENT = 5
211 // Unintrospectable function: add_filter() / clutter_x11_add_filter()
212 // VERSION: 0.6
213 // Adds an event filter function.
214 // <func>: a filter function
215 // <data>: user data to be passed to the filter function, or %NULL
216 static void add_filter()(FilterFunc func, void* data) {
217 clutter_x11_add_filter(func, data);
221 // VERSION: 0.8
222 // Disables the internal polling of X11 events in the main loop.
224 // Libraries or applications calling this function will be responsible of
225 // polling all X11 events.
227 // You also must call clutter_x11_handle_event() to let Clutter process
228 // events and maintain its internal state.
230 // <warning>This function can only be called before calling
231 // clutter_init().</warning>
233 // <note>Even with event handling disabled, Clutter will still select
234 // all the events required to maintain its internal state on the stage
235 // Window; compositors using Clutter and input regions to pass events
236 // through to application windows should not rely on an empty input
237 // region, and should instead clear it themselves explicitly using the
238 // XFixes extension.</note>
240 // This function should not be normally used by applications.
241 static void disable_event_retrieval()() {
242 clutter_x11_disable_event_retrieval();
246 // VERSION: 0.8
247 // Enables the use of the XInput extension if present on connected
248 // XServer and support built into Clutter. XInput allows for multiple
249 // pointing devices to be used.
251 // This function must be called before clutter_init().
253 // Since XInput might not be supported by the X server, you might
254 // want to use clutter_x11_has_xinput() to see if support was enabled.
255 static void enable_xinput()() {
256 clutter_x11_enable_xinput();
260 // VERSION: 1.4
261 // Retrieves the group for the modifiers set in @event
262 // RETURNS: the group id
263 // <event>: a #ClutterEvent of type %CLUTTER_KEY_PRESS or %CLUTTER_KEY_RELEASE
264 static int event_get_key_group()(Clutter.Event* event) {
265 return clutter_x11_event_get_key_group(event);
269 // Unintrospectable function: get_current_event_time() / clutter_x11_get_current_event_time()
270 // VERSION: 1.0
271 // Retrieves the timestamp of the last X11 event processed by
272 // Clutter. This might be different from the timestamp returned
273 // by clutter_get_current_event_time(), as Clutter may synthesize
274 // or throttle events.
275 // RETURNS: a timestamp, in milliseconds
276 static xlib.Time get_current_event_time()() {
277 return clutter_x11_get_current_event_time();
281 // VERSION: 0.6
282 // Retrieves the pointer to the default display.
283 // RETURNS: the default display
284 static xlib.Display* get_default_display()() {
285 return clutter_x11_get_default_display();
289 // VERSION: 0.6
290 // Gets the number of the default X Screen object.
291 // RETURNS: the number of the default screen
292 static int get_default_screen()() {
293 return clutter_x11_get_default_screen();
297 // VERSION: 0.8
298 // DEPRECATED (v1.2) function: get_input_devices - Use clutter_device_manager_peek_devices() instead
299 // Retrieves a pointer to the list of input devices
303 // pointer to the internal list of input devices; the returned list is
304 // owned by Clutter and should not be modified or freed
305 // RETURNS: a
306 static GLib2.SList* get_input_devices()() {
307 return clutter_x11_get_input_devices();
311 // Unintrospectable function: get_root_window() / clutter_x11_get_root_window()
312 // VERSION: 0.6
313 // Retrieves the root window.
314 // RETURNS: the id of the root window
315 static xlib.Window get_root_window()() {
316 return clutter_x11_get_root_window();
320 // VERSION: 0.8
321 // Gets the stage for a particular X window.
323 // does not exist for the window
324 // RETURNS: A #ClutterStage, or% NULL if a stage
325 // <win>: an X Window ID
326 static Clutter.Stage* get_stage_from_window()(xlib.Window win) {
327 return clutter_x11_get_stage_from_window(win);
331 // Unintrospectable function: get_stage_visual() / clutter_x11_get_stage_visual()
332 // VERSION: 0.4
333 // DEPRECATED (v1.2) function: get_stage_visual - Use clutter_x11_get_visual_info() instead
334 // Returns an XVisualInfo suitable for creating a foreign window for the given
335 // stage. NOTE: It doesn't do as the name may suggest, which is return the
336 // XVisualInfo that was used to create an existing window for the given stage.
338 // XXX: It might be best to deprecate this function and replace with something
339 // along the lines of clutter_backend_x11_get_foreign_visual () or perhaps
340 // clutter_stage_x11_get_foreign_visual ()
342 // foreign stage. Use XFree() to free the returned value instead
343 // RETURNS: An XVisualInfo suitable for creating a
344 // <stage>: a #ClutterStage
345 static xlib.XVisualInfo* /*new*/ get_stage_visual()(Clutter.Stage* stage) {
346 return clutter_x11_get_stage_visual(stage);
350 // Unintrospectable function: get_stage_window() / clutter_x11_get_stage_window()
351 // VERSION: 0.4
352 // Gets the stages X Window.
353 // RETURNS: An XID for the stage window.
354 // <stage>: a #ClutterStage
355 static xlib.Window get_stage_window()(Clutter.Stage* stage) {
356 return clutter_x11_get_stage_window(stage);
360 // VERSION: 1.2
361 // Retrieves whether the Clutter X11 backend is using ARGB visuals by default
362 // RETURNS: %TRUE if ARGB visuals are queried by default
363 static int get_use_argb_visual()() {
364 return clutter_x11_get_use_argb_visual();
368 // Unintrospectable function: get_visual_info() / clutter_x11_get_visual_info()
369 // VERSION: 1.2
370 // Retrieves the <structname>XVisualInfo</structname> used by the Clutter X11
371 // backend.
373 // <varname>None</varname>. The returned value should be freed using XFree()
374 // when done
375 // RETURNS: a <structname>XVisualInfo</structname>, or
376 static xlib.XVisualInfo* /*new*/ get_visual_info()() {
377 return clutter_x11_get_visual_info();
381 // VERSION: 0.8
382 // This function processes a single X event; it can be used to hook
383 // into external X11 event processing (for example, a GDK filter
384 // function).
386 // If clutter_x11_disable_event_retrieval() has been called, you must
387 // let this function process events to update Clutter's internal state.
389 // indicates that Clutter has internally handled the event and the
390 // caller should do no further processing. %CLUTTER_X11_FILTER_CONTINUE
391 // indicates that Clutter is either not interested in the event,
392 // or has used the event to update internal state without taking
393 // any exclusive action. %CLUTTER_X11_FILTER_TRANSLATE will not
394 // occur.
395 // RETURNS: #ClutterX11FilterReturn. %CLUTTER_X11_FILTER_REMOVE
396 // <xevent>: pointer to XEvent structure
397 static Clutter.X11FilterReturn handle_event()(xlib.XEvent* xevent) {
398 return clutter_x11_handle_event(xevent);
402 // Retrieves whether Clutter is running on an X11 server with the
403 // XComposite extension
404 // RETURNS: %TRUE if the XComposite extension is available
405 static int has_composite_extension()() {
406 return clutter_x11_has_composite_extension();
410 // VERSION: 0.8
411 // Queries the X11 backend to check if event collection has been disabled.
412 // RETURNS: TRUE if event retrival has been disabled. FALSE otherwise.
413 static int has_event_retrieval()() {
414 return clutter_x11_has_event_retrieval();
418 // VERSION: 0.8
419 // Gets whether Clutter has XInput support.
421 // and XInput support is available at run time.
422 // RETURNS: %TRUE if Clutter was compiled with XInput support
423 static int has_xinput()() {
424 return clutter_x11_has_xinput();
428 // Unintrospectable function: remove_filter() / clutter_x11_remove_filter()
429 // VERSION: 0.6
430 // Removes the given filter function.
431 // <func>: a filter function
432 // <data>: user data to be passed to the filter function, or %NULL
433 static void remove_filter()(FilterFunc func, void* data) {
434 clutter_x11_remove_filter(func, data);
438 // VERSION: 0.8
439 // Sets the display connection Clutter should use; must be called
440 // before clutter_init(), clutter_init_with_args() or other functions
441 // pertaining Clutter's initialization process.
443 // If you are parsing the command line arguments by retrieving Clutter's
444 // #GOptionGroup with clutter_get_option_group() and calling
445 // g_option_context_parse() yourself, you should also call
446 // clutter_x11_set_display() before g_option_context_parse().
447 // <xdpy>: pointer to a X display connection.
448 static void set_display()(xlib.Display* xdpy) {
449 clutter_x11_set_display(xdpy);
453 // VERSION: 0.4
454 // Target the #ClutterStage to use an existing external X Window
455 // RETURNS: %TRUE if foreign window is valid
456 // <stage>: a #ClutterStage
457 // <xwindow>: an existing X Window id
458 static int set_stage_foreign()(Clutter.Stage* stage, xlib.Window xwindow) {
459 return clutter_x11_set_stage_foreign(stage, xwindow);
463 // VERSION: 1.2
464 // Sets whether the Clutter X11 backend should request ARGB visuals by default
465 // or not.
467 // By default, Clutter requests RGB visuals.
469 // <note>If no ARGB visuals are found, the X11 backend will fall back to
470 // requesting a RGB visual instead.</note>
472 // ARGB visuals are required for the #ClutterStage:use-alpha property to work.
474 // <note>This function can only be called once, and before clutter_init() is
475 // called.</note>
476 // <use_argb>: %TRUE if ARGB visuals should be requested by default
477 static void set_use_argb_visual()(int use_argb) {
478 clutter_x11_set_use_argb_visual(use_argb);
482 // VERSION: 0.6
483 // Traps every X error until clutter_x11_untrap_x_errors() is called.
484 static void trap_x_errors()() {
485 clutter_x11_trap_x_errors();
489 // VERSION: 0.4
490 // Removes the X error trap and returns the current status.
491 // RETURNS: the trapped error code, or 0 for success
492 static int untrap_x_errors()() {
493 return clutter_x11_untrap_x_errors();
497 // C prototypes:
499 extern (C) {
500 TexturePixmap* clutter_x11_texture_pixmap_new();
501 TexturePixmap* clutter_x11_texture_pixmap_new_with_pixmap(xlib.Pixmap pixmap);
502 TexturePixmap* clutter_x11_texture_pixmap_new_with_window(xlib.Window window);
503 void clutter_x11_texture_pixmap_set_automatic(TexturePixmap* this_, int setting);
504 void clutter_x11_texture_pixmap_set_pixmap(TexturePixmap* this_, xlib.Pixmap pixmap);
505 void clutter_x11_texture_pixmap_set_window(TexturePixmap* this_, xlib.Window window, int automatic);
506 void clutter_x11_texture_pixmap_sync_window(TexturePixmap* this_);
507 void clutter_x11_texture_pixmap_update_area(TexturePixmap* this_, int x, int y, int width, int height);
508 void clutter_x11_add_filter(FilterFunc func, void* data);
509 void clutter_x11_disable_event_retrieval();
510 void clutter_x11_enable_xinput();
511 int clutter_x11_event_get_key_group(Clutter.Event* event);
512 xlib.Time clutter_x11_get_current_event_time();
513 xlib.Display* clutter_x11_get_default_display();
514 int clutter_x11_get_default_screen();
515 GLib2.SList* clutter_x11_get_input_devices();
516 xlib.Window clutter_x11_get_root_window();
517 Clutter.Stage* clutter_x11_get_stage_from_window(xlib.Window win);
518 xlib.XVisualInfo* /*new*/ clutter_x11_get_stage_visual(Clutter.Stage* stage);
519 xlib.Window clutter_x11_get_stage_window(Clutter.Stage* stage);
520 int clutter_x11_get_use_argb_visual();
521 xlib.XVisualInfo* /*new*/ clutter_x11_get_visual_info();
522 Clutter.X11FilterReturn clutter_x11_handle_event(xlib.XEvent* xevent);
523 int clutter_x11_has_composite_extension();
524 int clutter_x11_has_event_retrieval();
525 int clutter_x11_has_xinput();
526 void clutter_x11_remove_filter(FilterFunc func, void* data);
527 void clutter_x11_set_display(xlib.Display* xdpy);
528 int clutter_x11_set_stage_foreign(Clutter.Stage* stage, xlib.Window xwindow);
529 void clutter_x11_set_use_argb_visual(int use_argb);
530 void clutter_x11_trap_x_errors();
531 int clutter_x11_untrap_x_errors();