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>.
64 <!-- # Unused Parameters # -->
68 <!-- ##### MACRO GDK_PIXMAP_XID ##### -->
70 Returns the X pixmap belonging to a #GdkPixmap.
74 @Returns: the Xlib <type>XPixmap</type> of @win.
75 <!-- # Unused Parameters # -->
79 <!-- ##### MACRO GDK_DISPLAY_XDISPLAY ##### -->
81 Returns the display of a #GdkDisplay.
84 @display: a #GdkDisplay.
87 <!-- ##### MACRO GDK_DRAWABLE_XDISPLAY ##### -->
89 Returns the display of a #GdkDrawable.
93 @Returns: an Xlib <type>Display*</type>.
96 <!-- ##### MACRO GDK_DRAWABLE_XID ##### -->
98 Returns the X resource (window or pixmap) belonging to a #GdkDrawable.
101 @win: a #GdkDrawable.
102 @Returns: the ID of @win's X resource.
105 <!-- ##### MACRO GDK_IMAGE_XDISPLAY ##### -->
107 Returns the display of a #GdkImage.
111 @Returns: an Xlib <type>Display*</type>.
114 <!-- ##### MACRO GDK_IMAGE_XIMAGE ##### -->
116 Returns the X image belonging to a #GdkImage.
120 @Returns: an <type>XImage*</type>.
123 <!-- ##### MACRO GDK_GC_XDISPLAY ##### -->
125 Returns the display of a #GdkGC.
129 @Returns: an Xlib <type>Display*</type>.
132 <!-- ##### MACRO GDK_COLORMAP_XDISPLAY ##### -->
134 Returns the display of a #GdkColormap.
137 @cmap: a #GdkColormap.
138 @Returns: an Xlib <type>Display*</type>.
141 <!-- ##### MACRO GDK_COLORMAP_XCOLORMAP ##### -->
143 Returns the X colormap belonging to a #GdkColormap.
146 @cmap: a #GdkColormap.
147 @Returns: an Xlib <type>Colormap</type>.
150 <!-- ##### MACRO GDK_SCREEN_XDISPLAY ##### -->
152 Returns the display of a #GdkScreen.
155 @screen: a #GdkScreen.
156 @Returns: an Xlib <type>Display*</type>.
159 <!-- ##### MACRO GDK_SCREEN_XNUMBER ##### -->
161 Returns the index of a #GdkScreen.
164 @screen: a #GdkScreen
165 @Returns: the position of @screen among the screens of
169 <!-- ##### MACRO GDK_SCREEN_XSCREEN ##### -->
171 Returns the screen of a #GdkScreen.
174 @screen: a #GdkScreen
175 @Returns: an Xlib <type>Screen*</type>.
178 <!-- ##### MACRO GDK_VISUAL_XVISUAL ##### -->
180 Returns the X visual belonging to a #GdkVisual.
184 @Returns: an Xlib <type>Visual*</type>.
187 <!-- ##### MACRO GDK_FONT_XDISPLAY ##### -->
189 Returns the display of a #GdkFont.
193 @Returns: an Xlib <type>Display*</type>.
196 <!-- ##### MACRO GDK_FONT_XFONT ##### -->
198 Returns the X font belonging to a #GdkFont.
202 @Returns: an Xlib <type>XFontStruct*</type> or an <type>XFontSet</type>.
205 <!-- ##### MACRO GDK_CURSOR_XCURSOR ##### -->
207 Returns the X cursor belonging to a #GdkCursor.
210 @cursor: a #GdkCursor.
211 @Returns: an Xlib <type>Cursor</type>.
214 <!-- ##### MACRO GDK_CURSOR_XDISPLAY ##### -->
216 Returns the display of a #GdkCursor.
219 @cursor: a #GdkCursor.
220 @Returns: an Xlib <type>Display*</type>.
223 <!-- ##### MACRO GDK_GC_XGC ##### -->
225 Returns the X GC of a #GdkGC.
228 Note that the clip origin, clip region and tile/stipple origin fields of the
229 returned GC may not be in sync with @gc. If you need that,
230 use GDK_GC_GET_XGC().
234 @Returns: an Xlib <type>GC</type>.
237 <!-- ##### MACRO GDK_GC_GET_XGC ##### -->
239 Returns the X GC of a #GdkGC.
243 @Returns: an Xlib <type>GC</type>.
246 <!-- ##### MACRO GDK_WINDOW_XWINDOW ##### -->
248 Another name for GDK_DRAWABLE_XID().
253 <!-- ##### FUNCTION gdkx_visual_get ##### -->
255 Returns a #GdkVisual corresponding to a X visual.
258 @xvisualid: a X visual id.
259 @Returns: the #GdkVisual.
262 <!-- ##### FUNCTION gdkx_colormap_get ##### -->
266 @xcolormap: a X colormap.
267 @Returns: the #GdkColormap.
270 <!-- ##### FUNCTION gdk_pixmap_foreign_new ##### -->
279 <!-- ##### FUNCTION gdk_pixmap_foreign_new_for_display ##### -->
289 <!-- ##### FUNCTION gdk_window_foreign_new ##### -->
298 <!-- ##### FUNCTION gdk_window_foreign_new_for_display ##### -->
308 <!-- ##### FUNCTION gdk_xid_table_lookup ##### -->
310 Returns the Gdk object associated with the given X id.
314 @Returns: the associated Gdk object, which may be a #GdkPixmap,
315 a #GdkWindow or a #GdkFont.
318 <!-- ##### FUNCTION gdk_xid_table_lookup_for_display ##### -->
328 <!-- ##### FUNCTION gdk_window_lookup ##### -->
336 <!-- ##### FUNCTION gdk_window_lookup_for_display ##### -->
346 <!-- ##### FUNCTION gdk_pixmap_lookup ##### -->
354 <!-- ##### FUNCTION gdk_pixmap_lookup_for_display ##### -->
364 <!-- ##### MACRO gdk_font_lookup ##### -->
366 Obtains the #GdkFont for the given Xlib font ID, or %NULL if no #GdkFont has
367 been created for @xid.
373 <!-- ##### MACRO gdk_font_lookup_for_display ##### -->
375 Obtains the #GdkFont for the given Xlib font ID on @display, or %NULL if no
376 #GdkFont has been created for @xid.
383 <!-- ##### FUNCTION gdk_x11_lookup_xdisplay ##### -->
392 <!-- ##### FUNCTION gdk_x11_get_server_time ##### -->
401 <!-- ##### FUNCTION gdk_net_wm_supports ##### -->
410 <!-- ##### FUNCTION gdk_x11_screen_supports_net_wm_hint ##### -->
420 <!-- ##### FUNCTION gdk_x11_colormap_get_xcolormap ##### -->
422 Returns the X colormap belonging to a #GdkColormap.
425 @colormap: a #GdkColormap.
426 @Returns: an Xlib <type>Colormap</type>.
429 <!-- ##### FUNCTION gdk_x11_colormap_get_xdisplay ##### -->
431 Returns the display of a #GdkColormap.
434 @colormap: a #GdkColormap.
435 @Returns: an Xlib <type>Display*</type>.
438 <!-- ##### FUNCTION gdk_x11_cursor_get_xcursor ##### -->
440 Returns the X cursor belonging to a #GdkCursor.
443 @cursor: a #GdkCursor.
445 <!-- # Unused Parameters # -->
446 @Retursn: an Xlib <type>Cursor</type.
449 <!-- ##### FUNCTION gdk_x11_cursor_get_xdisplay ##### -->
451 Returns the display of a #GdkCursor.
454 @cursor: a #GdkCursor.
455 @Returns: an Xlib <type>Display*</type>.
458 <!-- ##### FUNCTION gdk_x11_display_get_xdisplay ##### -->
467 <!-- ##### FUNCTION gdk_x11_drawable_get_xdisplay ##### -->
469 Returns the display of a #GdkDrawable.
472 @drawable: a #GdkDrawable.
473 @Returns: an Xlib <type>Display*</type>.
476 <!-- ##### FUNCTION gdk_x11_drawable_get_xid ##### -->
478 Returns the X resource (window or pixmap) belonging to a #GdkDrawable.
481 @drawable: a #GdkDrawable.
482 @Returns: the ID of @win's X resource.
485 <!-- ##### FUNCTION gdk_x11_font_get_name ##### -->
494 <!-- ##### FUNCTION gdk_x11_font_get_xdisplay ##### -->
496 Returns the display of a #GdkFont.
500 @Returns: an Xlib <type>Display*</type>.
503 <!-- ##### FUNCTION gdk_x11_font_get_xfont ##### -->
505 Returns the X font belonging to a #GdkFont.
509 @Returns: an Xlib <type>XFontStruct*</type> or an <type>XFontSet</type>.
512 <!-- ##### FUNCTION gdk_x11_gc_get_xdisplay ##### -->
514 Returns the display of a #GdkGC.
518 @Returns: an Xlib <type>Display*</type>.
521 <!-- ##### FUNCTION gdk_x11_gc_get_xgc ##### -->
523 Returns the X GC of a #GdkGC.
527 @Returns: an Xlib <type>GC</type>.
530 <!-- ##### FUNCTION gdk_x11_get_default_root_xwindow ##### -->
532 Gets the root window of the default screen
533 (see gdk_x11_get_default_screen()).
536 @Returns: an Xlib <type>Window</type>.
539 <!-- ##### FUNCTION gdk_x11_get_default_screen ##### -->
547 <!-- ##### FUNCTION gdk_x11_get_default_xdisplay ##### -->
549 Gets the default GTK+ display.
552 @Returns: the Xlib <type>Display*</type> for the display
553 specified in the <option>--display</option> command line option
554 or the <envar>DISPLAY</envar> environment variable.
557 <!-- ##### FUNCTION gdk_x11_grab_server ##### -->
559 Call <function>XGrabServer()</function> on the default display.
560 To ungrab the server again, use gdk_x11_ungrab_server().
563 gdk_x11_grab_server()/gdk_x11_ungrab_server() calls can be nested.
568 <!-- ##### FUNCTION gdk_x11_image_get_xdisplay ##### -->
570 Returns the display of a #GdkImage.
574 @Returns: an Xlib <type>Display*</type>.
575 <!-- # Unused Parameters # -->
576 @drawable: a #GdkImage.
579 <!-- ##### FUNCTION gdk_x11_image_get_ximage ##### -->
581 Returns the X image belonging to a #GdkImage.
585 @Returns: an <type>XImage*</type>.
588 <!-- ##### FUNCTION gdk_x11_screen_get_screen_number ##### -->
597 <!-- ##### FUNCTION gdk_x11_screen_get_xscreen ##### -->
606 <!-- ##### FUNCTION gdk_x11_ungrab_server ##### -->
608 Ungrab the default display after it has been grabbed with
609 gdk_x11_grab_server().
614 <!-- ##### FUNCTION gdk_x11_visual_get_xvisual ##### -->
616 Returns the X visual belonging to a #GdkVisual.
619 @visual: a #GdkVisual.
620 @Returns: an Xlib <type>Visual*</type>.
623 <!-- ##### FUNCTION gdk_x11_atom_to_xatom ##### -->
632 <!-- ##### FUNCTION gdk_x11_atom_to_xatom_for_display ##### -->
640 <!-- # Unused Parameters # -->
644 <!-- ##### FUNCTION gdk_x11_xatom_to_atom ##### -->
653 <!-- ##### FUNCTION gdk_x11_xatom_to_atom_for_display ##### -->
663 <!-- ##### FUNCTION gdk_x11_get_xatom_by_name ##### -->
672 <!-- ##### FUNCTION gdk_x11_get_xatom_by_name_for_display ##### -->
682 <!-- ##### FUNCTION gdk_x11_get_xatom_name ##### -->
691 <!-- ##### FUNCTION gdk_x11_get_xatom_name_for_display ##### -->