1 <!-- ##### SECTION Title ##### -->
2 X Window System Interaction
4 <!-- ##### SECTION Short_Description ##### -->
7 <!-- ##### SECTION Long_Description ##### -->
12 <!-- ##### SECTION See_Also ##### -->
17 <!-- ##### MACRO GDK_ROOT_WINDOW ##### -->
19 Obtains the Xlib window id of the root window of the current screen.
24 <!-- ##### MACRO GDK_ROOT_PARENT ##### -->
26 Obtains the Xlib window id of the root window of the default screen.
31 <!-- ##### MACRO GDK_DISPLAY ##### -->
36 @Returns: an Xlib <type>Display*</type>.
39 <!-- ##### MACRO GDK_WINDOW_XDISPLAY ##### -->
41 Returns the display of a #GdkWindow.
45 @Returns: an Xlib <type>Display*</type>.
48 <!-- ##### MACRO GDK_WINDOW_XID ##### -->
50 Returns the X window belonging to a #GdkWindow.
54 @Returns: the Xlib <type>Window</type> of @win.
57 <!-- ##### MACRO GDK_PIXMAP_XDISPLAY ##### -->
59 Returns the display of a #GdkPixmap.
63 @Returns: an Xlib <type>Display*</type>.
66 <!-- ##### MACRO GDK_PIXMAP_XID ##### -->
68 Returns the X pixmap belonging to a #GdkPixmap.
72 @Returns: the Xlib <type>XPixmap</type> of @win.
75 <!-- ##### MACRO GDK_DRAWABLE_XDISPLAY ##### -->
77 Returns the display of a #GdkDrawable.
81 @Returns: an Xlib <type>Display*</type>.
84 <!-- ##### MACRO GDK_DRAWABLE_XID ##### -->
86 Returns the X resource (window or pixmap) belonging to a #GdkDrawable.
90 @Returns: the ID of @win's X resource.
93 <!-- ##### MACRO GDK_IMAGE_XDISPLAY ##### -->
95 Returns the display of a #GdkImage.
99 @Returns: an Xlib <type>Display*</type>.
102 <!-- ##### MACRO GDK_IMAGE_XIMAGE ##### -->
104 Returns the X image belonging to a #GdkImage.
108 @Returns: an <type>XImage*</type>.
111 <!-- ##### MACRO GDK_GC_XDISPLAY ##### -->
113 Returns the display of a #GdkGC.
117 @Returns: an Xlib <type>Display*</type>.
120 <!-- ##### MACRO GDK_COLORMAP_XDISPLAY ##### -->
122 Returns the display of a #GdkColormap.
125 @cmap: a #GdkColormap.
126 @Returns: an Xlib <type>Display*</type>.
129 <!-- ##### MACRO GDK_COLORMAP_XCOLORMAP ##### -->
131 Returns the X colormap belonging to a #GdkColormap.
134 @cmap: a #GdkColormap.
135 @Returns: an Xlib <type>Colormap</type>.
138 <!-- ##### MACRO GDK_VISUAL_XVISUAL ##### -->
140 Returns the X visual belonging to a #GdkVisual.
144 @Returns: an Xlib <type>Visual*</type>.
147 <!-- ##### MACRO GDK_FONT_XDISPLAY ##### -->
149 Returns the display of a #GdkFont.
153 @Returns: an Xlib <type>Display*</type>.
156 <!-- ##### MACRO GDK_FONT_XFONT ##### -->
158 Returns the X font belonging to a #GdkFont.
162 @Returns: an Xlib <type>XFontStruct*</type> or an <type>XFontSet</type>.
165 <!-- ##### MACRO GDK_CURSOR_XCURSOR ##### -->
167 Returns the X cursor belonging to a #GdkCursor.
170 @cursor: a #GdkCursor.
171 @Returns: an Xlib <type>Cursor</type>.
174 <!-- ##### MACRO GDK_CURSOR_XDISPLAY ##### -->
176 Returns the display of a #GdkCursor.
179 @cursor: a #GdkCursor.
180 @Returns: an Xlib <type>Display*</type>.
183 <!-- ##### MACRO GDK_GC_XGC ##### -->
185 Returns the X GC of a #GdkGC.
188 Note that the clip origin, clip region and tile/stipple origin fields of the
189 returned GC may not be in sync with @gc. If you need that,
190 use GDK_GC_GET_XGC().
194 @Returns: an Xlib <type>GC</type>.
197 <!-- ##### MACRO GDK_GC_GET_XGC ##### -->
199 Returns the X GC of a #GdkGC.
203 @Returns: an Xlib <type>GC</type>.
206 <!-- ##### MACRO GDK_WINDOW_XWINDOW ##### -->
208 Another name for GDK_DRAWABLE_XID().
213 <!-- ##### FUNCTION gdkx_visual_get ##### -->
215 Returns a #GdkVisual corresponding to a X visual.
218 @xvisualid: a X visual id.
219 @Returns: the #GdkVisual.
222 <!-- ##### FUNCTION gdkx_colormap_get ##### -->
224 Returns a #GdkColormap corresponding to a X colormap.
227 @xcolormap: a X colormap.
228 @Returns: the #GdkColormap.
231 <!-- ##### FUNCTION gdk_pixmap_foreign_new ##### -->
240 <!-- ##### FUNCTION gdk_window_foreign_new ##### -->
249 <!-- ##### FUNCTION gdk_xid_table_lookup ##### -->
251 Returns the Gdk object associated with the given X id.
255 @Returns: the associated Gdk object, which may be a #GdkPixmap,
256 a #GdkWindow or a #GdkFont.
259 <!-- ##### FUNCTION gdk_window_lookup ##### -->
261 Obtains the #GdkWindow for the given Xlib window ID, or %NULL if no #GdkWindow has
262 been created for @xid.
267 <!-- # Unused Parameters # -->
271 <!-- ##### FUNCTION gdk_pixmap_lookup ##### -->
273 Obtains the #GdkPixmap for the given Xlib pixmap ID, or %NULL if no #GdkPixmap has
274 been created for @xid.
279 <!-- # Unused Parameters # -->
283 <!-- ##### MACRO gdk_font_lookup ##### -->
285 Obtains the #GdkFont for the given Xlib pixmap ID, or %NULL if no #GdkPixmap has
286 been created for @xid.
292 <!-- ##### FUNCTION gdk_x11_get_server_time ##### -->
301 <!-- ##### FUNCTION gdk_net_wm_supports ##### -->
310 <!-- ##### FUNCTION gdk_x11_colormap_get_xcolormap ##### -->
312 Returns the X colormap belonging to a #GdkColormap.
315 @colormap: a #GdkColormap.
316 @Returns: an Xlib <type>Colormap</type>.
319 <!-- ##### FUNCTION gdk_x11_colormap_get_xdisplay ##### -->
321 Returns the display of a #GdkColormap.
324 @colormap: a #GdkColormap.
325 @Returns: an Xlib <type>Display*</type>.
328 <!-- ##### FUNCTION gdk_x11_cursor_get_xcursor ##### -->
330 Returns the X cursor belonging to a #GdkCursor.
333 @cursor: a #GdkCursor.
335 <!-- # Unused Parameters # -->
336 @Retursn: an Xlib <type>Cursor</type.
339 <!-- ##### FUNCTION gdk_x11_cursor_get_xdisplay ##### -->
341 Returns the display of a #GdkCursor.
344 @cursor: a #GdkCursor.
345 @Returns: an Xlib <type>Display*</type>.
348 <!-- ##### FUNCTION gdk_x11_drawable_get_xdisplay ##### -->
350 Returns the display of a #GdkDrawable.
353 @drawable: a #GdkDrawable.
354 @Returns: an Xlib <type>Display*</type>.
357 <!-- ##### FUNCTION gdk_x11_drawable_get_xid ##### -->
359 Returns the X resource (window or pixmap) belonging to a #GdkDrawable.
362 @drawable: a #GdkDrawable.
363 @Returns: the ID of @win's X resource.
366 <!-- ##### FUNCTION gdk_x11_font_get_name ##### -->
375 <!-- ##### FUNCTION gdk_x11_font_get_xdisplay ##### -->
377 Returns the display of a #GdkFont.
381 @Returns: an Xlib <type>Display*</type>.
384 <!-- ##### FUNCTION gdk_x11_font_get_xfont ##### -->
386 Returns the X font belonging to a #GdkFont.
390 @Returns: an Xlib <type>XFontStruct*</type> or an <type>XFontSet</type>.
393 <!-- ##### FUNCTION gdk_x11_gc_get_xdisplay ##### -->
395 Returns the display of a #GdkGC.
399 @Returns: an Xlib <type>Display*</type>.
402 <!-- ##### FUNCTION gdk_x11_gc_get_xgc ##### -->
404 Returns the X GC of a #GdkGC.
408 @Returns: an Xlib <type>GC</type>.
411 <!-- ##### FUNCTION gdk_x11_get_default_root_xwindow ##### -->
413 Gets the root window of the default screen
414 (see gdk_x11_get_default_screen()).
417 @Returns: an Xlib <type>Window</type>.
420 <!-- ##### FUNCTION gdk_x11_get_default_screen ##### -->
428 <!-- ##### FUNCTION gdk_x11_get_default_xdisplay ##### -->
430 Gets the default GTK+ display.
433 @Returns: the Xlib <type>Display*</type> for the display
434 specified in the <option>--display</option> command line option
435 or the <envar>DISPLAY</envar> environment variable.
438 <!-- ##### FUNCTION gdk_x11_grab_server ##### -->
440 Call <function>XGrabServer()</function> on the default display.
441 To ungrab the server again, use gdk_x11_ungrab_server().
444 gdk_x11_grab_server()/gdk_x11_ungrab_server() calls can be nested.
449 <!-- ##### FUNCTION gdk_x11_image_get_xdisplay ##### -->
451 Returns the display of a #GdkImage.
455 @Returns: an Xlib <type>Display*</type>.
456 <!-- # Unused Parameters # -->
457 @drawable: a #GdkImage.
460 <!-- ##### FUNCTION gdk_x11_image_get_ximage ##### -->
462 Returns the X image belonging to a #GdkImage.
466 @Returns: an <type>XImage*</type>.
469 <!-- ##### FUNCTION gdk_x11_ungrab_server ##### -->
471 Ungrab the default display after it has been grabbed with
472 gdk_x11_grab_server().
477 <!-- ##### FUNCTION gdk_x11_visual_get_xvisual ##### -->
479 Returns the X visual belonging to a #GdkVisual.
482 @visual: a #GdkVisual.
483 @Returns: an Xlib <type>Visual*</type>.
486 <!-- ##### FUNCTION gdk_x11_atom_to_xatom ##### -->
495 <!-- ##### FUNCTION gdk_x11_xatom_to_atom ##### -->
504 <!-- ##### FUNCTION gdk_x11_get_xatom_by_name ##### -->
513 <!-- ##### FUNCTION gdk_x11_get_xatom_name ##### -->