<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="gdk-X-Window-System-Interaction">
<refmeta>
<refentrytitle role="top_of_page" id="gdk-X-Window-System-Interaction.top_of_page">X Window System Interaction</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>X Window System Interaction</refname>
<refpurpose>X backend-specific functions</refpurpose>
</refnamediv>

<refsynopsisdiv id="gdk-X-Window-System-Interaction.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

#include &lt;gdk/gdkx.h&gt;

#define             <link linkend="GDK-ROOT-WINDOW--CAPS">GDK_ROOT_WINDOW</link>                     ()
#define             <link linkend="GDK-ROOT-PARENT--CAPS">GDK_ROOT_PARENT</link>                     ()
#define             <link linkend="GDK-DISPLAY--CAPS">GDK_DISPLAY</link>                         ()
#define             <link linkend="GDK-WINDOW-XDISPLAY--CAPS">GDK_WINDOW_XDISPLAY</link>                 (win)
#define             <link linkend="GDK-WINDOW-XID--CAPS">GDK_WINDOW_XID</link>                      (win)
#define             <link linkend="GDK-PIXMAP-XDISPLAY--CAPS">GDK_PIXMAP_XDISPLAY</link>                 (pix)
#define             <link linkend="GDK-PIXMAP-XID--CAPS">GDK_PIXMAP_XID</link>                      (pix)
#define             <link linkend="GDK-DISPLAY-XDISPLAY--CAPS">GDK_DISPLAY_XDISPLAY</link>                (display)
#define             <link linkend="GDK-DRAWABLE-XDISPLAY--CAPS">GDK_DRAWABLE_XDISPLAY</link>               (win)
#define             <link linkend="GDK-DRAWABLE-XID--CAPS">GDK_DRAWABLE_XID</link>                    (win)
#define             <link linkend="GDK-IMAGE-XDISPLAY--CAPS">GDK_IMAGE_XDISPLAY</link>                  (image)
#define             <link linkend="GDK-IMAGE-XIMAGE--CAPS">GDK_IMAGE_XIMAGE</link>                    (image)
#define             <link linkend="GDK-GC-XDISPLAY--CAPS">GDK_GC_XDISPLAY</link>                     (gc)
#define             <link linkend="GDK-COLORMAP-XDISPLAY--CAPS">GDK_COLORMAP_XDISPLAY</link>               (cmap)
#define             <link linkend="GDK-COLORMAP-XCOLORMAP--CAPS">GDK_COLORMAP_XCOLORMAP</link>              (cmap)
#define             <link linkend="GDK-SCREEN-XDISPLAY--CAPS">GDK_SCREEN_XDISPLAY</link>                 (screen)
#define             <link linkend="GDK-SCREEN-XNUMBER--CAPS">GDK_SCREEN_XNUMBER</link>                  (screen)
#define             <link linkend="GDK-SCREEN-XSCREEN--CAPS">GDK_SCREEN_XSCREEN</link>                  (screen)
#define             <link linkend="GDK-VISUAL-XVISUAL--CAPS">GDK_VISUAL_XVISUAL</link>                  (vis)
#define             <link linkend="GDK-FONT-XDISPLAY--CAPS">GDK_FONT_XDISPLAY</link>                   (font)
#define             <link linkend="GDK-FONT-XFONT--CAPS">GDK_FONT_XFONT</link>                      (font)
#define             <link linkend="GDK-CURSOR-XCURSOR--CAPS">GDK_CURSOR_XCURSOR</link>                  (cursor)
#define             <link linkend="GDK-CURSOR-XDISPLAY--CAPS">GDK_CURSOR_XDISPLAY</link>                 (cursor)
#define             <link linkend="GDK-GC-XGC--CAPS">GDK_GC_XGC</link>                          (gc)
#define             <link linkend="GDK-GC-GET-XGC--CAPS">GDK_GC_GET_XGC</link>                      (gc)
#define             <link linkend="GDK-WINDOW-XWINDOW--CAPS">GDK_WINDOW_XWINDOW</link>
<link linkend="GdkVisual">GdkVisual</link>*          <link linkend="gdkx-visual-get">gdkx_visual_get</link>                     (<link linkend="VisualID">VisualID</link> xvisualid);
<link linkend="GdkColormap">GdkColormap</link>*        <link linkend="gdkx-colormap-get">gdkx_colormap_get</link>                   (<link linkend="Colormap">Colormap</link> xcolormap);
<link linkend="GdkPixmap">GdkPixmap</link>*          <link linkend="gdk-pixmap-foreign-new">gdk_pixmap_foreign_new</link>              (<link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);
<link linkend="GdkPixmap">GdkPixmap</link>*          <link linkend="gdk-pixmap-foreign-new-for-display">gdk_pixmap_foreign_new_for_display</link>  (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);
<link linkend="GdkPixmap">GdkPixmap</link>*          <link linkend="gdk-pixmap-foreign-new-for-screen">gdk_pixmap_foreign_new_for_screen</link>   (<link linkend="GdkScreen">GdkScreen</link> *screen,
                                                         <link linkend="GdkNativeWindow">GdkNativeWindow</link> anid,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height,
                                                         <link linkend="gint">gint</link> depth);
<link linkend="GdkWindow">GdkWindow</link>*          <link linkend="gdk-window-foreign-new">gdk_window_foreign_new</link>              (<link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);
<link linkend="GdkWindow">GdkWindow</link> *         <link linkend="gdk-window-foreign-new-for-display">gdk_window_foreign_new_for_display</link>  (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);
<link linkend="gpointer">gpointer</link>            <link linkend="gdk-xid-table-lookup">gdk_xid_table_lookup</link>                (<link linkend="XID--CAPS">XID</link> xid);
<link linkend="gpointer">gpointer</link>            <link linkend="gdk-xid-table-lookup-for-display">gdk_xid_table_lookup_for_display</link>    (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="XID--CAPS">XID</link> xid);
<link linkend="GdkWindow">GdkWindow</link>*          <link linkend="gdk-window-lookup">gdk_window_lookup</link>                   (<link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);
<link linkend="GdkWindow">GdkWindow</link>*          <link linkend="gdk-window-lookup-for-display">gdk_window_lookup_for_display</link>       (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);
<link linkend="GdkPixmap">GdkPixmap</link>*          <link linkend="gdk-pixmap-lookup">gdk_pixmap_lookup</link>                   (<link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);
<link linkend="GdkPixmap">GdkPixmap</link>*          <link linkend="gdk-pixmap-lookup-for-display">gdk_pixmap_lookup_for_display</link>       (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);
#define             <link linkend="gdk-font-lookup">gdk_font_lookup</link>                     (xid)
#define             <link linkend="gdk-font-lookup-for-display">gdk_font_lookup_for_display</link>         (display, xid)
<link linkend="GdkDisplay">GdkDisplay</link> *        <link linkend="gdk-x11-lookup-xdisplay">gdk_x11_lookup_xdisplay</link>             (<link linkend="Display">Display</link> *xdisplay);
<link linkend="guint32">guint32</link>             <link linkend="gdk-x11-get-server-time">gdk_x11_get_server_time</link>             (<link linkend="GdkWindow">GdkWindow</link> *window);
<link linkend="gboolean">gboolean</link>            <link linkend="gdk-net-wm-supports">gdk_net_wm_supports</link>                 (<link linkend="GdkAtom">GdkAtom</link> property);
<link linkend="gboolean">gboolean</link>            <link linkend="gdk-x11-screen-supports-net-wm-hint">gdk_x11_screen_supports_net_wm_hint</link> (<link linkend="GdkScreen">GdkScreen</link> *screen,
                                                         <link linkend="GdkAtom">GdkAtom</link> property);
const <link linkend="char">char</link>*         <link linkend="gdk-x11-screen-get-window-manager-name">gdk_x11_screen_get_window_manager_name</link>
                                                        (<link linkend="GdkScreen">GdkScreen</link> *screen);
<link linkend="XID--CAPS">XID</link>                 <link linkend="gdk-x11-screen-get-monitor-output">gdk_x11_screen_get_monitor_output</link>   (<link linkend="GdkScreen">GdkScreen</link> *screen,
                                                         <link linkend="gint">gint</link> monitor_num);
<link linkend="GdkVisual">GdkVisual</link>*          <link linkend="gdk-x11-screen-lookup-visual">gdk_x11_screen_lookup_visual</link>        (<link linkend="GdkScreen">GdkScreen</link> *screen,
                                                         <link linkend="VisualID">VisualID</link> xvisualid);
<link linkend="void">void</link>                <link linkend="gdk-x11-window-set-user-time">gdk_x11_window_set_user_time</link>        (<link linkend="GdkWindow">GdkWindow</link> *window,
                                                         <link linkend="guint32">guint32</link> timestamp);
<link linkend="void">void</link>                <link linkend="gdk-x11-window-move-to-current-desktop">gdk_x11_window_move_to_current_desktop</link>
                                                        (<link linkend="GdkWindow">GdkWindow</link> *window);
<link linkend="guint32">guint32</link>             <link linkend="gdk-x11-display-get-user-time">gdk_x11_display_get_user_time</link>       (<link linkend="GdkDisplay">GdkDisplay</link> *display);
<link linkend="GdkColormap">GdkColormap</link> *       <link linkend="gdk-x11-colormap-foreign-new">gdk_x11_colormap_foreign_new</link>        (<link linkend="GdkVisual">GdkVisual</link> *visual,
                                                         <link linkend="Colormap">Colormap</link> xcolormap);
<link linkend="Colormap">Colormap</link>            <link linkend="gdk-x11-colormap-get-xcolormap">gdk_x11_colormap_get_xcolormap</link>      (<link linkend="GdkColormap">GdkColormap</link> *colormap);
<link linkend="Display">Display</link> *           <link linkend="gdk-x11-colormap-get-xdisplay">gdk_x11_colormap_get_xdisplay</link>       (<link linkend="GdkColormap">GdkColormap</link> *colormap);
<link linkend="Cursor">Cursor</link>              <link linkend="gdk-x11-cursor-get-xcursor">gdk_x11_cursor_get_xcursor</link>          (<link linkend="GdkCursor">GdkCursor</link> *cursor);
<link linkend="Display">Display</link> *           <link linkend="gdk-x11-cursor-get-xdisplay">gdk_x11_cursor_get_xdisplay</link>         (<link linkend="GdkCursor">GdkCursor</link> *cursor);
<link linkend="void">void</link>                <link linkend="gdk-x11-display-broadcast-startup-message">gdk_x11_display_broadcast_startup_message</link>
                                                        (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         const <link linkend="char">char</link> *message_type,
                                                         ...);
const <link linkend="gchar">gchar</link> *       <link linkend="gdk-x11-display-get-startup-notification-id">gdk_x11_display_get_startup_notification_id</link>
                                                        (<link linkend="GdkDisplay">GdkDisplay</link> *display);
<link linkend="Display">Display</link> *           <link linkend="gdk-x11-display-get-xdisplay">gdk_x11_display_get_xdisplay</link>        (<link linkend="GdkDisplay">GdkDisplay</link> *display);
<link linkend="void">void</link>                <link linkend="gdk-x11-display-grab">gdk_x11_display_grab</link>                (<link linkend="GdkDisplay">GdkDisplay</link> *display);
<link linkend="void">void</link>                <link linkend="gdk-x11-display-ungrab">gdk_x11_display_ungrab</link>              (<link linkend="GdkDisplay">GdkDisplay</link> *display);
<link linkend="void">void</link>                <link linkend="gdk-x11-display-set-cursor-theme">gdk_x11_display_set_cursor_theme</link>    (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         const <link linkend="gchar">gchar</link> *theme,
                                                         const <link linkend="gint">gint</link> size);
<link linkend="void">void</link>                <link linkend="gdk-x11-register-standard-event-type">gdk_x11_register_standard_event_type</link>
                                                        (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="gint">gint</link> event_base,
                                                         <link linkend="gint">gint</link> n_events);
<link linkend="Display">Display</link> *           <link linkend="gdk-x11-drawable-get-xdisplay">gdk_x11_drawable_get_xdisplay</link>       (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);
<link linkend="XID--CAPS">XID</link>                 <link linkend="gdk-x11-drawable-get-xid">gdk_x11_drawable_get_xid</link>            (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);
const <link linkend="char">char</link> *        <link linkend="gdk-x11-font-get-name">gdk_x11_font_get_name</link>               (<link linkend="GdkFont">GdkFont</link> *font);
<link linkend="Display">Display</link> *           <link linkend="gdk-x11-font-get-xdisplay">gdk_x11_font_get_xdisplay</link>           (<link linkend="GdkFont">GdkFont</link> *font);
<link linkend="gpointer">gpointer</link>            <link linkend="gdk-x11-font-get-xfont">gdk_x11_font_get_xfont</link>              (<link linkend="GdkFont">GdkFont</link> *font);
<link linkend="Display">Display</link> *           <link linkend="gdk-x11-gc-get-xdisplay">gdk_x11_gc_get_xdisplay</link>             (<link linkend="GdkGC">GdkGC</link> *gc);
<link linkend="GC--CAPS">GC</link>                  <link linkend="gdk-x11-gc-get-xgc">gdk_x11_gc_get_xgc</link>                  (<link linkend="GdkGC">GdkGC</link> *gc);
<link linkend="Window">Window</link>              <link linkend="gdk-x11-get-default-root-xwindow">gdk_x11_get_default_root_xwindow</link>    (void);
<link linkend="gint">gint</link>                <link linkend="gdk-x11-get-default-screen">gdk_x11_get_default_screen</link>          (void);
<link linkend="Display">Display</link> *           <link linkend="gdk-x11-get-default-xdisplay">gdk_x11_get_default_xdisplay</link>        (void);
<link linkend="void">void</link>                <link linkend="gdk-x11-grab-server">gdk_x11_grab_server</link>                 (void);
<link linkend="Display">Display</link> *           <link linkend="gdk-x11-image-get-xdisplay">gdk_x11_image_get_xdisplay</link>          (<link linkend="GdkImage">GdkImage</link> *image);
<link linkend="XImage">XImage</link> *            <link linkend="gdk-x11-image-get-ximage">gdk_x11_image_get_ximage</link>            (<link linkend="GdkImage">GdkImage</link> *image);
<link linkend="int">int</link>                 <link linkend="gdk-x11-screen-get-screen-number">gdk_x11_screen_get_screen_number</link>    (<link linkend="GdkScreen">GdkScreen</link> *screen);
<link linkend="Screen">Screen</link> *            <link linkend="gdk-x11-screen-get-xscreen">gdk_x11_screen_get_xscreen</link>          (<link linkend="GdkScreen">GdkScreen</link> *screen);
<link linkend="void">void</link>                <link linkend="gdk-x11-ungrab-server">gdk_x11_ungrab_server</link>               (void);
<link linkend="Visual">Visual</link> *            <link linkend="gdk-x11-visual-get-xvisual">gdk_x11_visual_get_xvisual</link>          (<link linkend="GdkVisual">GdkVisual</link> *visual);
<link linkend="Atom">Atom</link>                <link linkend="gdk-x11-atom-to-xatom">gdk_x11_atom_to_xatom</link>               (<link linkend="GdkAtom">GdkAtom</link> atom);
<link linkend="Atom">Atom</link>                <link linkend="gdk-x11-atom-to-xatom-for-display">gdk_x11_atom_to_xatom_for_display</link>   (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="GdkAtom">GdkAtom</link> atom);
<link linkend="GdkAtom">GdkAtom</link>             <link linkend="gdk-x11-xatom-to-atom">gdk_x11_xatom_to_atom</link>               (<link linkend="Atom">Atom</link> xatom);
<link linkend="GdkAtom">GdkAtom</link>             <link linkend="gdk-x11-xatom-to-atom-for-display">gdk_x11_xatom_to_atom_for_display</link>   (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="Atom">Atom</link> xatom);
<link linkend="Atom">Atom</link>                <link linkend="gdk-x11-get-xatom-by-name">gdk_x11_get_xatom_by_name</link>           (const <link linkend="gchar">gchar</link> *atom_name);
<link linkend="Atom">Atom</link>                <link linkend="gdk-x11-get-xatom-by-name-for-display">gdk_x11_get_xatom_by_name_for_display</link>
                                                        (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         const <link linkend="gchar">gchar</link> *atom_name);
const <link linkend="gchar">gchar</link> *       <link linkend="gdk-x11-get-xatom-name">gdk_x11_get_xatom_name</link>              (<link linkend="Atom">Atom</link> xatom);
const <link linkend="gchar">gchar</link> *       <link linkend="gdk-x11-get-xatom-name-for-display">gdk_x11_get_xatom_name_for_display</link>  (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="Atom">Atom</link> xatom);
</synopsis>
</refsynopsisdiv>









<refsect1 id="gdk-X-Window-System-Interaction.description" role="desc">
<title role="desc.title">Description</title>
<para>
</para>
</refsect1>

<refsect1 id="gdk-X-Window-System-Interaction.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GDK-ROOT-WINDOW--CAPS" role="macro">
<title>GDK_ROOT_WINDOW()</title>
<indexterm zone="GDK-ROOT-WINDOW--CAPS"><primary sortas="ROOT_WINDOW">GDK_ROOT_WINDOW</primary></indexterm><programlisting>#define GDK_ROOT_WINDOW()             (gdk_x11_get_default_root_xwindow ())
</programlisting>
<para>
Obtains the Xlib window id of the root window of the current screen.
</para></refsect2>
<refsect2 id="GDK-ROOT-PARENT--CAPS" role="macro" condition="deprecated:">
<title>GDK_ROOT_PARENT()</title>
<indexterm zone="GDK-ROOT-PARENT--CAPS" role="deprecated"><primary sortas="ROOT_PARENT">GDK_ROOT_PARENT</primary></indexterm><programlisting>#define GDK_ROOT_PARENT()             (gdk_get_default_root_window ())
</programlisting>
<warning><para><literal>GDK_ROOT_PARENT</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Obtains the Xlib window id of the root window of the default screen.
</para></refsect2>
<refsect2 id="GDK-DISPLAY--CAPS" role="macro">
<title>GDK_DISPLAY()</title>
<indexterm zone="GDK-DISPLAY--CAPS"><primary sortas="DISPLAY">GDK_DISPLAY</primary></indexterm><programlisting>#define GDK_DISPLAY()                 gdk_display
</programlisting>
<para>
The current display.
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-WINDOW-XDISPLAY--CAPS" role="macro">
<title>GDK_WINDOW_XDISPLAY()</title>
<indexterm zone="GDK-WINDOW-XDISPLAY--CAPS"><primary sortas="WINDOW_XDISPLAY">GDK_WINDOW_XDISPLAY</primary></indexterm><programlisting>#define             GDK_WINDOW_XDISPLAY(win)</programlisting>
<para>
Returns the display of a <link linkend="GdkWindow"><type>GdkWindow</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>win</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkWindow"><type>GdkWindow</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-WINDOW-XID--CAPS" role="macro">
<title>GDK_WINDOW_XID()</title>
<indexterm zone="GDK-WINDOW-XID--CAPS"><primary sortas="WINDOW_XID">GDK_WINDOW_XID</primary></indexterm><programlisting>#define             GDK_WINDOW_XID(win)</programlisting>
<para>
Returns the X window belonging to a <link linkend="GdkWindow"><type>GdkWindow</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>win</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkWindow"><type>GdkWindow</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>the Xlib <type>Window</type> of <parameter>win</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-PIXMAP-XDISPLAY--CAPS" role="macro">
<title>GDK_PIXMAP_XDISPLAY()</title>
<indexterm zone="GDK-PIXMAP-XDISPLAY--CAPS"><primary sortas="PIXMAP_XDISPLAY">GDK_PIXMAP_XDISPLAY</primary></indexterm><programlisting>#define             GDK_PIXMAP_XDISPLAY(pix)</programlisting>
<para>
Returns the display of a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>pix</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-PIXMAP-XID--CAPS" role="macro">
<title>GDK_PIXMAP_XID()</title>
<indexterm zone="GDK-PIXMAP-XID--CAPS"><primary sortas="PIXMAP_XID">GDK_PIXMAP_XID</primary></indexterm><programlisting>#define             GDK_PIXMAP_XID(pix)</programlisting>
<para>
Returns the X pixmap belonging to a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>pix</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>the Xlib <type>XPixmap</type> of <parameter>win</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-DISPLAY-XDISPLAY--CAPS" role="macro">
<title>GDK_DISPLAY_XDISPLAY()</title>
<indexterm zone="GDK-DISPLAY-XDISPLAY--CAPS"><primary sortas="DISPLAY_XDISPLAY">GDK_DISPLAY_XDISPLAY</primary></indexterm><programlisting>#define             GDK_DISPLAY_XDISPLAY(display)</programlisting>
<para>
Returns the display of a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-DRAWABLE-XDISPLAY--CAPS" role="macro">
<title>GDK_DRAWABLE_XDISPLAY()</title>
<indexterm zone="GDK-DRAWABLE-XDISPLAY--CAPS"><primary sortas="DRAWABLE_XDISPLAY">GDK_DRAWABLE_XDISPLAY</primary></indexterm><programlisting>#define             GDK_DRAWABLE_XDISPLAY(win)</programlisting>
<para>
Returns the display of a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>win</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-DRAWABLE-XID--CAPS" role="macro">
<title>GDK_DRAWABLE_XID()</title>
<indexterm zone="GDK-DRAWABLE-XID--CAPS"><primary sortas="DRAWABLE_XID">GDK_DRAWABLE_XID</primary></indexterm><programlisting>#define             GDK_DRAWABLE_XID(win)</programlisting>
<para>
Returns the X resource (window or pixmap) belonging to a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>win</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>the ID of <parameter>win</parameter>'s X resource.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-IMAGE-XDISPLAY--CAPS" role="macro">
<title>GDK_IMAGE_XDISPLAY()</title>
<indexterm zone="GDK-IMAGE-XDISPLAY--CAPS"><primary sortas="IMAGE_XDISPLAY">GDK_IMAGE_XDISPLAY</primary></indexterm><programlisting>#define GDK_IMAGE_XDISPLAY(image)     (gdk_x11_image_get_xdisplay (image))
</programlisting>
<para>
Returns the display of a <link linkend="GdkImage"><type>GdkImage</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>image</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkImage"><type>GdkImage</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-IMAGE-XIMAGE--CAPS" role="macro">
<title>GDK_IMAGE_XIMAGE()</title>
<indexterm zone="GDK-IMAGE-XIMAGE--CAPS"><primary sortas="IMAGE_XIMAGE">GDK_IMAGE_XIMAGE</primary></indexterm><programlisting>#define GDK_IMAGE_XIMAGE(image)       (gdk_x11_image_get_ximage (image))
</programlisting>
<para>
Returns the X image belonging to a <link linkend="GdkImage"><type>GdkImage</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>image</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkImage"><type>GdkImage</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an <type>XImage*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-GC-XDISPLAY--CAPS" role="macro">
<title>GDK_GC_XDISPLAY()</title>
<indexterm zone="GDK-GC-XDISPLAY--CAPS"><primary sortas="GC_XDISPLAY">GDK_GC_XDISPLAY</primary></indexterm><programlisting>#define             GDK_GC_XDISPLAY(gc)</programlisting>
<para>
Returns the display of a <link linkend="GdkGC"><type>GdkGC</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-COLORMAP-XDISPLAY--CAPS" role="macro">
<title>GDK_COLORMAP_XDISPLAY()</title>
<indexterm zone="GDK-COLORMAP-XDISPLAY--CAPS"><primary sortas="COLORMAP_XDISPLAY">GDK_COLORMAP_XDISPLAY</primary></indexterm><programlisting>#define GDK_COLORMAP_XDISPLAY(cmap)   (gdk_x11_colormap_get_xdisplay (cmap))
</programlisting>
<para>
Returns the display of a <link linkend="GdkColormap"><type>GdkColormap</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>cmap</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkColormap"><type>GdkColormap</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-COLORMAP-XCOLORMAP--CAPS" role="macro">
<title>GDK_COLORMAP_XCOLORMAP()</title>
<indexterm zone="GDK-COLORMAP-XCOLORMAP--CAPS"><primary sortas="COLORMAP_XCOLORMAP">GDK_COLORMAP_XCOLORMAP</primary></indexterm><programlisting>#define GDK_COLORMAP_XCOLORMAP(cmap)  (gdk_x11_colormap_get_xcolormap (cmap))
</programlisting>
<para>
Returns the X colormap belonging to a <link linkend="GdkColormap"><type>GdkColormap</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>cmap</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkColormap"><type>GdkColormap</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>Colormap</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-SCREEN-XDISPLAY--CAPS" role="macro">
<title>GDK_SCREEN_XDISPLAY()</title>
<indexterm zone="GDK-SCREEN-XDISPLAY--CAPS"><primary sortas="SCREEN_XDISPLAY">GDK_SCREEN_XDISPLAY</primary></indexterm><programlisting>#define             GDK_SCREEN_XDISPLAY(screen)</programlisting>
<para>
Returns the display of a <link linkend="GdkScreen"><type>GdkScreen</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>screen</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkScreen"><type>GdkScreen</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-SCREEN-XNUMBER--CAPS" role="macro">
<title>GDK_SCREEN_XNUMBER()</title>
<indexterm zone="GDK-SCREEN-XNUMBER--CAPS"><primary sortas="SCREEN_XNUMBER">GDK_SCREEN_XNUMBER</primary></indexterm><programlisting>#define             GDK_SCREEN_XNUMBER(screen)</programlisting>
<para>
Returns the index of a <link linkend="GdkScreen"><type>GdkScreen</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>screen</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkScreen"><type>GdkScreen</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>the position of <parameter>screen</parameter> among the screens of
  its display.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-SCREEN-XSCREEN--CAPS" role="macro">
<title>GDK_SCREEN_XSCREEN()</title>
<indexterm zone="GDK-SCREEN-XSCREEN--CAPS"><primary sortas="SCREEN_XSCREEN">GDK_SCREEN_XSCREEN</primary></indexterm><programlisting>#define             GDK_SCREEN_XSCREEN(screen)</programlisting>
<para>
Returns the screen of a <link linkend="GdkScreen"><type>GdkScreen</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>screen</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkScreen"><type>GdkScreen</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>Screen*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-VISUAL-XVISUAL--CAPS" role="macro">
<title>GDK_VISUAL_XVISUAL()</title>
<indexterm zone="GDK-VISUAL-XVISUAL--CAPS"><primary sortas="VISUAL_XVISUAL">GDK_VISUAL_XVISUAL</primary></indexterm><programlisting>#define             GDK_VISUAL_XVISUAL(vis)</programlisting>
<para>
Returns the X visual belonging to a <link linkend="GdkVisual"><type>GdkVisual</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>vis</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkVisual"><type>GdkVisual</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>Visual*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-FONT-XDISPLAY--CAPS" role="macro" condition="deprecated:">
<title>GDK_FONT_XDISPLAY()</title>
<indexterm zone="GDK-FONT-XDISPLAY--CAPS" role="deprecated"><primary sortas="FONT_XDISPLAY">GDK_FONT_XDISPLAY</primary></indexterm><programlisting>#define GDK_FONT_XDISPLAY(font)       (gdk_x11_font_get_xdisplay (font))
</programlisting>
<warning><para><literal>GDK_FONT_XDISPLAY</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Returns the display of a <link linkend="GdkFont"><type>GdkFont</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkFont"><type>GdkFont</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-FONT-XFONT--CAPS" role="macro" condition="deprecated:">
<title>GDK_FONT_XFONT()</title>
<indexterm zone="GDK-FONT-XFONT--CAPS" role="deprecated"><primary sortas="FONT_XFONT">GDK_FONT_XFONT</primary></indexterm><programlisting>#define GDK_FONT_XFONT(font)          (gdk_x11_font_get_xfont (font))
</programlisting>
<warning><para><literal>GDK_FONT_XFONT</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Returns the X font belonging to a <link linkend="GdkFont"><type>GdkFont</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkFont"><type>GdkFont</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>XFontStruct*</type> or an <type>XFontSet</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-CURSOR-XCURSOR--CAPS" role="macro">
<title>GDK_CURSOR_XCURSOR()</title>
<indexterm zone="GDK-CURSOR-XCURSOR--CAPS"><primary sortas="CURSOR_XCURSOR">GDK_CURSOR_XCURSOR</primary></indexterm><programlisting>#define GDK_CURSOR_XCURSOR(cursor)    (gdk_x11_cursor_get_xcursor (cursor))
</programlisting>
<para>
Returns the X cursor belonging to a <link linkend="GdkCursor"><type>GdkCursor</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>cursor</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkCursor"><type>GdkCursor</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>Cursor</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-CURSOR-XDISPLAY--CAPS" role="macro">
<title>GDK_CURSOR_XDISPLAY()</title>
<indexterm zone="GDK-CURSOR-XDISPLAY--CAPS"><primary sortas="CURSOR_XDISPLAY">GDK_CURSOR_XDISPLAY</primary></indexterm><programlisting>#define GDK_CURSOR_XDISPLAY(cursor)   (gdk_x11_cursor_get_xdisplay (cursor))
</programlisting>
<para>
Returns the display of a <link linkend="GdkCursor"><type>GdkCursor</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>cursor</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkCursor"><type>GdkCursor</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-GC-XGC--CAPS" role="macro">
<title>GDK_GC_XGC()</title>
<indexterm zone="GDK-GC-XGC--CAPS"><primary sortas="GC_XGC">GDK_GC_XGC</primary></indexterm><programlisting>#define             GDK_GC_XGC(gc)</programlisting>
<para>
Returns the X GC of a <link linkend="GdkGC"><type>GdkGC</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>GC</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-GC-GET-XGC--CAPS" role="macro">
<title>GDK_GC_GET_XGC()</title>
<indexterm zone="GDK-GC-GET-XGC--CAPS"><primary sortas="GC_GET_XGC">GDK_GC_GET_XGC</primary></indexterm><programlisting>#define GDK_GC_GET_XGC(gc)	      (GDK_GC_X11(gc)-&gt;dirty_mask ? _gdk_x11_gc_flush (gc) : ((GdkGCX11 *)(gc))-&gt;xgc)
</programlisting>
<para>
Returns the X GC of a <link linkend="GdkGC"><type>GdkGC</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>an Xlib <type>GC</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GDK-WINDOW-XWINDOW--CAPS" role="macro">
<title>GDK_WINDOW_XWINDOW</title>
<indexterm zone="GDK-WINDOW-XWINDOW--CAPS"><primary sortas="WINDOW_XWINDOW">GDK_WINDOW_XWINDOW</primary></indexterm><programlisting>#define             GDK_WINDOW_XWINDOW</programlisting>
<para>
Another name for <link linkend="GDK-DRAWABLE-XID--CAPS"><function>GDK_DRAWABLE_XID()</function></link>.
</para></refsect2>
<refsect2 id="gdkx-visual-get" role="function">
<title>gdkx_visual_get ()</title>
<indexterm zone="gdkx-visual-get"><primary sortas="x_visual_get">gdkx_visual_get</primary></indexterm><programlisting><link linkend="GdkVisual">GdkVisual</link>*          gdkx_visual_get                     (<link linkend="VisualID">VisualID</link> xvisualid);</programlisting>
<para>
Returns a <link linkend="GdkVisual"><type>GdkVisual</type></link> corresponding to a X visual.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>xvisualid</parameter>&#160;:</term>
<listitem><simpara> a X visual id.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GdkVisual"><type>GdkVisual</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdkx-colormap-get" role="function" condition="deprecated:">
<title>gdkx_colormap_get ()</title>
<indexterm zone="gdkx-colormap-get" role="deprecated"><primary sortas="x_colormap_get">gdkx_colormap_get</primary></indexterm><programlisting><link linkend="GdkColormap">GdkColormap</link>*        gdkx_colormap_get                   (<link linkend="Colormap">Colormap</link> xcolormap);</programlisting>
<warning><para><literal>gdkx_colormap_get</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Returns a <link linkend="GdkColormap"><type>GdkColormap</type></link> corresponding to a X colormap;
this function only works if the colormap is already
known to GTK+ (a colormap created by GTK+ or the default
colormap for the screen), since GTK+ 
</para>
<para>
Always use <link linkend="gdk-x11-colormap-foreign-new"><function>gdk_x11_colormap_foreign_new()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>xcolormap</parameter>&#160;:</term>
<listitem><simpara> the XID of a colormap for the default screen.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the existing <link linkend="GdkColormap"><type>GdkColormap</type></link> object if it was
 already known to GTK+, otherwise warns and return
 <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-pixmap-foreign-new" role="function">
<title>gdk_pixmap_foreign_new ()</title>
<indexterm zone="gdk-pixmap-foreign-new"><primary sortas="pixmap_foreign_new">gdk_pixmap_foreign_new</primary></indexterm><programlisting><link linkend="GdkPixmap">GdkPixmap</link>*          gdk_pixmap_foreign_new              (<link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);</programlisting>
<para>
Wraps a native window for the default display in a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>.
This may fail if the pixmap has been destroyed.
</para>
<para>
For example in the X backend, a native pixmap handle is an Xlib
<type>XID</type>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>anid</parameter>&#160;:</term>
<listitem><simpara> a native pixmap handle.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the newly-created <link linkend="GdkPixmap"><type>GdkPixmap</type></link> wrapper for the 
   native pixmap or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the pixmap has been destroyed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-pixmap-foreign-new-for-display" role="function" condition="since:2.2">
<title>gdk_pixmap_foreign_new_for_display ()</title>
<indexterm zone="gdk-pixmap-foreign-new-for-display" role="2.2"><primary sortas="pixmap_foreign_new_for_display">gdk_pixmap_foreign_new_for_display</primary></indexterm><programlisting><link linkend="GdkPixmap">GdkPixmap</link>*          gdk_pixmap_foreign_new_for_display  (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);</programlisting>
<para>
Wraps a native pixmap in a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>.
This may fail if the pixmap has been destroyed.
</para>
<para>
For example in the X backend, a native pixmap handle is an Xlib
<type>XID</type>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> The <link linkend="GdkDisplay"><type>GdkDisplay</type></link> where <parameter>anid</parameter> is located.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>anid</parameter>&#160;:</term>
<listitem><simpara> a native pixmap handle.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the newly-created <link linkend="GdkPixmap"><type>GdkPixmap</type></link> wrapper for the 
   native pixmap or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the pixmap has been destroyed.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-pixmap-foreign-new-for-screen" role="function" condition="since:2.10">
<title>gdk_pixmap_foreign_new_for_screen ()</title>
<indexterm zone="gdk-pixmap-foreign-new-for-screen" role="2.10"><primary sortas="pixmap_foreign_new_for_screen">gdk_pixmap_foreign_new_for_screen</primary></indexterm><programlisting><link linkend="GdkPixmap">GdkPixmap</link>*          gdk_pixmap_foreign_new_for_screen   (<link linkend="GdkScreen">GdkScreen</link> *screen,
                                                         <link linkend="GdkNativeWindow">GdkNativeWindow</link> anid,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height,
                                                         <link linkend="gint">gint</link> depth);</programlisting>
<para>
Wraps a native pixmap in a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>.
This may fail if the pixmap has been destroyed.
</para>
<para>
For example in the X backend, a native pixmap handle is an Xlib
<type>XID</type>.
</para>
<para>
This function is an alternative to <link linkend="gdk-pixmap-foreign-new-for-display"><function>gdk_pixmap_foreign_new_for_display()</function></link>
for cases where the dimensions of the pixmap are known. For the X
backend, this avoids a roundtrip to the server.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>screen</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkScreen"><type>GdkScreen</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>anid</parameter>&#160;:</term>
<listitem><simpara> a native pixmap handle
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> the width of the pixmap identified by <parameter>anid</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&#160;:</term>
<listitem><simpara> the height of the pixmap identified by <parameter>anid</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>depth</parameter>&#160;:</term>
<listitem><simpara> the depth of the pixmap identified by <parameter>anid</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the newly-created <link linkend="GdkPixmap"><type>GdkPixmap</type></link> wrapper for the 
   native pixmap or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the pixmap has been destroyed.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.10</para></refsect2>
<refsect2 id="gdk-window-foreign-new" role="function">
<title>gdk_window_foreign_new ()</title>
<indexterm zone="gdk-window-foreign-new"><primary sortas="window_foreign_new">gdk_window_foreign_new</primary></indexterm><programlisting><link linkend="GdkWindow">GdkWindow</link>*          gdk_window_foreign_new              (<link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);</programlisting>
<para>
Wraps a native window for the default display in a <link linkend="GdkWindow"><type>GdkWindow</type></link>.
This may fail if the window has been destroyed.
</para>
<para>
For example in the X backend, a native window handle is an Xlib
<type>XID</type>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>anid</parameter>&#160;:</term>
<listitem><simpara> a native window handle.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the newly-created <link linkend="GdkWindow"><type>GdkWindow</type></link> wrapper for the
   native window or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the window has been destroyed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-window-foreign-new-for-display" role="function" condition="since:2.2">
<title>gdk_window_foreign_new_for_display ()</title>
<indexterm zone="gdk-window-foreign-new-for-display" role="2.2"><primary sortas="window_foreign_new_for_display">gdk_window_foreign_new_for_display</primary></indexterm><programlisting><link linkend="GdkWindow">GdkWindow</link> *         gdk_window_foreign_new_for_display  (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);</programlisting>
<para>
Wraps a native window in a <link linkend="GdkWindow"><type>GdkWindow</type></link>.
This may fail if the window has been destroyed. If the window
was already known to GDK, a new reference to the existing 
<link linkend="GdkWindow"><type>GdkWindow</type></link> is returned.
</para>
<para>
For example in the X backend, a native window handle is an Xlib
<type>XID</type>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="GdkDisplay"><type>GdkDisplay</type></link> where the window handle comes from.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>anid</parameter>&#160;:</term>
<listitem><simpara> a native window handle.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GdkWindow"><type>GdkWindow</type></link> wrapper for the native window or 
  <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the window has been destroyed. The wrapper will be
  newly created, if one doesn't exist already.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-xid-table-lookup" role="function">
<title>gdk_xid_table_lookup ()</title>
<indexterm zone="gdk-xid-table-lookup"><primary sortas="xid_table_lookup">gdk_xid_table_lookup</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            gdk_xid_table_lookup                (<link linkend="XID--CAPS">XID</link> xid);</programlisting>
<para>
Returns the Gdk object associated with the given X id.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>xid</parameter>&#160;:</term>
<listitem><simpara> an X id.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the associated Gdk object, which may be a <link linkend="GdkPixmap"><type>GdkPixmap</type></link>,
a <link linkend="GdkWindow"><type>GdkWindow</type></link> or a <link linkend="GdkFont"><type>GdkFont</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-xid-table-lookup-for-display" role="function" condition="since:2.2">
<title>gdk_xid_table_lookup_for_display ()</title>
<indexterm zone="gdk-xid-table-lookup-for-display" role="2.2"><primary sortas="xid_table_lookup_for_display">gdk_xid_table_lookup_for_display</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            gdk_xid_table_lookup_for_display    (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="XID--CAPS">XID</link> xid);</programlisting>
<para>
Returns the GDK object associated with the given X id.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="GdkDisplay"><type>GdkDisplay</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>xid</parameter>&#160;:</term>
<listitem><simpara> an X id.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a GDK object associated with the given X id.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-window-lookup" role="function">
<title>gdk_window_lookup ()</title>
<indexterm zone="gdk-window-lookup"><primary sortas="window_lookup">gdk_window_lookup</primary></indexterm><programlisting><link linkend="GdkWindow">GdkWindow</link>*          gdk_window_lookup                   (<link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);</programlisting>
<para>
Looks up the <link linkend="GdkWindow"><type>GdkWindow</type></link> that wraps the given native window handle. 
</para>
<para>
For example in the X backend, a native window handle is an Xlib
<type>XID</type>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>anid</parameter>&#160;:</term>
<listitem><simpara> a native window handle.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GdkWindow"><type>GdkWindow</type></link> wrapper for the native window, 
   or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if there is none.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-window-lookup-for-display" role="function" condition="since:2.2">
<title>gdk_window_lookup_for_display ()</title>
<indexterm zone="gdk-window-lookup-for-display" role="2.2"><primary sortas="window_lookup_for_display">gdk_window_lookup_for_display</primary></indexterm><programlisting><link linkend="GdkWindow">GdkWindow</link>*          gdk_window_lookup_for_display       (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);</programlisting>
<para>
Looks up the <link linkend="GdkWindow"><type>GdkWindow</type></link> that wraps the given native window handle.
</para>
<para>
For example in the X backend, a native window handle is an Xlib
<type>XID</type>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="GdkDisplay"><type>GdkDisplay</type></link> corresponding to the window handle
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>anid</parameter>&#160;:</term>
<listitem><simpara> a native window handle.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GdkWindow"><type>GdkWindow</type></link> wrapper for the native window, 
   or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if there is none.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-pixmap-lookup" role="function">
<title>gdk_pixmap_lookup ()</title>
<indexterm zone="gdk-pixmap-lookup"><primary sortas="pixmap_lookup">gdk_pixmap_lookup</primary></indexterm><programlisting><link linkend="GdkPixmap">GdkPixmap</link>*          gdk_pixmap_lookup                   (<link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);</programlisting>
<para>
Looks up the <link linkend="GdkPixmap"><type>GdkPixmap</type></link> that wraps the given native pixmap handle.
</para>
<para>
For example in the X backend, a native pixmap handle is an Xlib
<type>XID</type>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>anid</parameter>&#160;:</term>
<listitem><simpara> a native pixmap handle.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GdkWindow"><type>GdkWindow</type></link> wrapper for the native window,
   or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if there is none.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-pixmap-lookup-for-display" role="function" condition="since:2.2">
<title>gdk_pixmap_lookup_for_display ()</title>
<indexterm zone="gdk-pixmap-lookup-for-display" role="2.2"><primary sortas="pixmap_lookup_for_display">gdk_pixmap_lookup_for_display</primary></indexterm><programlisting><link linkend="GdkPixmap">GdkPixmap</link>*          gdk_pixmap_lookup_for_display       (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="GdkNativeWindow">GdkNativeWindow</link> anid);</programlisting>
<para>
Looks up the <link linkend="GdkPixmap"><type>GdkPixmap</type></link> that wraps the given native pixmap handle.
</para>
<para>
For example in the X backend, a native pixmap handle is an Xlib
<type>XID</type>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="GdkDisplay"><type>GdkDisplay</type></link> associated with <parameter>anid</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>anid</parameter>&#160;:</term>
<listitem><simpara> a native pixmap handle.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GdkPixmap"><type>GdkPixmap</type></link> wrapper for the native pixmap,
   or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if there is none.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-font-lookup" role="macro" condition="deprecated:">
<title>gdk_font_lookup()</title>
<indexterm zone="gdk-font-lookup" role="deprecated"><primary sortas="font_lookup">gdk_font_lookup</primary></indexterm><programlisting>#define gdk_font_lookup(xid)	   ((GdkFont*) gdk_xid_table_lookup (xid))
</programlisting>
<warning><para><literal>gdk_font_lookup</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Obtains the <link linkend="GdkFont"><type>GdkFont</type></link> for the given Xlib font ID, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if no <link linkend="GdkFont"><type>GdkFont</type></link> has
been created for <parameter>xid</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>xid</parameter>&#160;:</term>
<listitem><simpara>an Xlib font ID
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-font-lookup-for-display" role="macro" condition="deprecated:">
<title>gdk_font_lookup_for_display()</title>
<indexterm zone="gdk-font-lookup-for-display" role="deprecated"><primary sortas="font_lookup_for_display">gdk_font_lookup_for_display</primary></indexterm><programlisting>#define gdk_font_lookup_for_display(display, xid) ((GdkFont*) gdk_xid_table_lookup_for_display (display, ((xid)|XID_FONT_BIT)))
</programlisting>
<warning><para><literal>gdk_font_lookup_for_display</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Obtains the <link linkend="GdkFont"><type>GdkFont</type></link> for the given Xlib font ID on <parameter>display</parameter>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if no
<link linkend="GdkFont"><type>GdkFont</type></link> has been created for <parameter>xid</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>xid</parameter>&#160;:</term>
<listitem><simpara>an Xlib font ID
Since: 2.2
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-lookup-xdisplay" role="function" condition="since:2.2">
<title>gdk_x11_lookup_xdisplay ()</title>
<indexterm zone="gdk-x11-lookup-xdisplay" role="2.2"><primary sortas="x11_lookup_xdisplay">gdk_x11_lookup_xdisplay</primary></indexterm><programlisting><link linkend="GdkDisplay">GdkDisplay</link> *        gdk_x11_lookup_xdisplay             (<link linkend="Display">Display</link> *xdisplay);</programlisting>
<para>
Find the <link linkend="GdkDisplay"><type>GdkDisplay</type></link> corresponding to <parameter>display</parameter>, if any exists.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>xdisplay</parameter>&#160;:</term>
<listitem><simpara> a pointer to an X Display
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GdkDisplay"><type>GdkDisplay</type></link>, if found, otherwise <link linkend="NULL--CAPS"><literal>NULL</literal></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-x11-get-server-time" role="function">
<title>gdk_x11_get_server_time ()</title>
<indexterm zone="gdk-x11-get-server-time"><primary sortas="x11_get_server_time">gdk_x11_get_server_time</primary></indexterm><programlisting><link linkend="guint32">guint32</link>             gdk_x11_get_server_time             (<link linkend="GdkWindow">GdkWindow</link> *window);</programlisting>
<para>
Routine to get the current X server time stamp.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>window</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkWindow"><type>GdkWindow</type></link>, used for communication with the server.
         The window must have GDK_PROPERTY_CHANGE_MASK in its
         events mask or a hang will result.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the time stamp.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-net-wm-supports" role="function">
<title>gdk_net_wm_supports ()</title>
<indexterm zone="gdk-net-wm-supports"><primary sortas="net_wm_supports">gdk_net_wm_supports</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gdk_net_wm_supports                 (<link linkend="GdkAtom">GdkAtom</link> property);</programlisting>
<para>
This function is specific to the X11 backend of GDK, and indicates
whether the window manager for the default screen supports a certain
hint from the Extended Window Manager Hints Specification. See
<link linkend="gdk-x11-screen-supports-net-wm-hint"><function>gdk_x11_screen_supports_net_wm_hint()</function></link> for complete details.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>property</parameter>&#160;:</term>
<listitem><simpara> a property atom.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the window manager supports <parameter>property</parameter>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-screen-supports-net-wm-hint" role="function" condition="since:2.2">
<title>gdk_x11_screen_supports_net_wm_hint ()</title>
<indexterm zone="gdk-x11-screen-supports-net-wm-hint" role="2.2"><primary sortas="x11_screen_supports_net_wm_hint">gdk_x11_screen_supports_net_wm_hint</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gdk_x11_screen_supports_net_wm_hint (<link linkend="GdkScreen">GdkScreen</link> *screen,
                                                         <link linkend="GdkAtom">GdkAtom</link> property);</programlisting>
<para>
This function is specific to the X11 backend of GDK, and indicates
whether the window manager supports a certain hint from the
Extended Window Manager Hints Specification. You can find this
specification on 
<ulink url="http://www.freedesktop.org">http://www.freedesktop.org</ulink>.
</para>
<para>
When using this function, keep in mind that the window manager
can change over time; so you shouldn't use this function in
a way that impacts persistent application state. A common bug
is that your application can start up before the window manager
does when the user logs in, and before the window manager starts
<link linkend="gdk-x11-screen-supports-net-wm-hint"><function>gdk_x11_screen_supports_net_wm_hint()</function></link> will return <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> for every property.
You can monitor the window_manager_changed signal on <link linkend="GdkScreen"><type>GdkScreen</type></link> to detect
a window manager change.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>screen</parameter>&#160;:</term>
<listitem><simpara> the relevant <link linkend="GdkScreen"><type>GdkScreen</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>property</parameter>&#160;:</term>
<listitem><simpara> a property atom.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the window manager supports <parameter>property</parameter>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-x11-screen-get-window-manager-name" role="function" condition="since:2.2">
<title>gdk_x11_screen_get_window_manager_name ()</title>
<indexterm zone="gdk-x11-screen-get-window-manager-name" role="2.2"><primary sortas="x11_screen_get_window_manager_name">gdk_x11_screen_get_window_manager_name</primary></indexterm><programlisting>const <link linkend="char">char</link>*         gdk_x11_screen_get_window_manager_name
                                                        (<link linkend="GdkScreen">GdkScreen</link> *screen);</programlisting>
<para>
Returns the name of the window manager for <parameter>screen</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>screen</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkScreen"><type>GdkScreen</type></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the name of the window manager screen <parameter>screen</parameter>, or 
"unknown" if the window manager is unknown. The string is owned by GDK
and should not be freed.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-x11-screen-get-monitor-output" role="function" condition="since:2.14">
<title>gdk_x11_screen_get_monitor_output ()</title>
<indexterm zone="gdk-x11-screen-get-monitor-output" role="2.14"><primary sortas="x11_screen_get_monitor_output">gdk_x11_screen_get_monitor_output</primary></indexterm><programlisting><link linkend="XID--CAPS">XID</link>                 gdk_x11_screen_get_monitor_output   (<link linkend="GdkScreen">GdkScreen</link> *screen,
                                                         <link linkend="gint">gint</link> monitor_num);</programlisting>
<para>
Gets the XID of the specified output/monitor.
If the X server does not support version 1.2 of the RANDR 
extension, 0 is returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>screen</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkScreen"><type>GdkScreen</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>monitor_num</parameter>&#160;:</term>
<listitem><simpara> number of the monitor 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the XID of the monitor

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.14</para></refsect2>
<refsect2 id="gdk-x11-screen-lookup-visual" role="function" condition="since:2.2">
<title>gdk_x11_screen_lookup_visual ()</title>
<indexterm zone="gdk-x11-screen-lookup-visual" role="2.2"><primary sortas="x11_screen_lookup_visual">gdk_x11_screen_lookup_visual</primary></indexterm><programlisting><link linkend="GdkVisual">GdkVisual</link>*          gdk_x11_screen_lookup_visual        (<link linkend="GdkScreen">GdkScreen</link> *screen,
                                                         <link linkend="VisualID">VisualID</link> xvisualid);</programlisting>
<para>
Looks up the <link linkend="GdkVisual"><type>GdkVisual</type></link> for a particular screen and X Visual ID.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>screen</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkScreen"><type>GdkScreen</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>xvisualid</parameter>&#160;:</term>
<listitem><simpara> an X Visual ID.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GdkVisual"><type>GdkVisual</type></link> (owned by the screen object), or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
  if the visual ID wasn't found.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-x11-window-set-user-time" role="function" condition="since:2.6">
<title>gdk_x11_window_set_user_time ()</title>
<indexterm zone="gdk-x11-window-set-user-time" role="2.6"><primary sortas="x11_window_set_user_time">gdk_x11_window_set_user_time</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_x11_window_set_user_time        (<link linkend="GdkWindow">GdkWindow</link> *window,
                                                         <link linkend="guint32">guint32</link> timestamp);</programlisting>
<para>
The application can use this call to update the _NET_WM_USER_TIME
property on a toplevel window.  This property stores an Xserver
time which represents the time of the last user input event
received for this window.  This property may be used by the window
manager to alter the focus, stacking, and/or placement behavior of
windows when they are mapped depending on whether the new window
was created by a user action or is a "pop-up" window activated by a
timer or some other event.
</para>
<para>
Note that this property is automatically updated by GDK, so this
function should only be used by applications which handle input
events bypassing GDK.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>window</parameter>&#160;:</term>
<listitem><simpara> A toplevel <link linkend="GdkWindow"><type>GdkWindow</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>timestamp</parameter>&#160;:</term>
<listitem><simpara> An XServer timestamp to which the property should be set
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gdk-x11-window-move-to-current-desktop" role="function" condition="since:2.8">
<title>gdk_x11_window_move_to_current_desktop ()</title>
<indexterm zone="gdk-x11-window-move-to-current-desktop" role="2.8"><primary sortas="x11_window_move_to_current_desktop">gdk_x11_window_move_to_current_desktop</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_x11_window_move_to_current_desktop
                                                        (<link linkend="GdkWindow">GdkWindow</link> *window);</programlisting>
<para>
Moves the window to the correct workspace when running under a 
window manager that supports multiple workspaces, as described
in the <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended 
Window Manager Hints</ulink>.  Will not do anything if the
window is already on all workspaces.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>window</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkWindow"><type>GdkWindow</type></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.8</para></refsect2>
<refsect2 id="gdk-x11-display-get-user-time" role="function" condition="since:2.8">
<title>gdk_x11_display_get_user_time ()</title>
<indexterm zone="gdk-x11-display-get-user-time" role="2.8"><primary sortas="x11_display_get_user_time">gdk_x11_display_get_user_time</primary></indexterm><programlisting><link linkend="guint32">guint32</link>             gdk_x11_display_get_user_time       (<link linkend="GdkDisplay">GdkDisplay</link> *display);</programlisting>
<para>
Returns the timestamp of the last user interaction on 
<parameter>display</parameter>. The timestamp is taken from events caused
by user interaction such as key presses or pointer 
movements. See <link linkend="gdk-x11-window-set-user-time"><function>gdk_x11_window_set_user_time()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the timestamp of the last user interaction 

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.8</para></refsect2>
<refsect2 id="gdk-x11-colormap-foreign-new" role="function" condition="since:2.2">
<title>gdk_x11_colormap_foreign_new ()</title>
<indexterm zone="gdk-x11-colormap-foreign-new" role="2.2"><primary sortas="x11_colormap_foreign_new">gdk_x11_colormap_foreign_new</primary></indexterm><programlisting><link linkend="GdkColormap">GdkColormap</link> *       gdk_x11_colormap_foreign_new        (<link linkend="GdkVisual">GdkVisual</link> *visual,
                                                         <link linkend="Colormap">Colormap</link> xcolormap);</programlisting>
<para>
If xcolormap refers to a colormap previously known to GTK+,
returns a new reference to the existing <link linkend="GdkColormap"><type>GdkColormap</type></link> object,
otherwise creates a new GdkColormap object and returns that</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>visual</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkVisual"><type>GdkVisual</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>xcolormap</parameter>&#160;:</term>
<listitem><simpara> The XID of a colormap with visual <parameter>visual</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GdkColormap"><type>GdkColormap</type></link> object for <parameter>xcolormap</parameter>.
  Free with <link linkend="g-object-unref"><function>g_object_unref()</function></link>. Note that for colormap created
  with <link linkend="gdk-x11-colormap-foreign-new"><function>gdk_x11_colormap_foreign_new()</function></link>, unref'ing the last
  reference to the object will only free the <link linkend="GdkColoramp"><type>GdkColoramp</type></link>
  object and not call <link linkend="XFreeColormap"><function>XFreeColormap()</function></link>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-x11-colormap-get-xcolormap" role="function">
<title>gdk_x11_colormap_get_xcolormap ()</title>
<indexterm zone="gdk-x11-colormap-get-xcolormap"><primary sortas="x11_colormap_get_xcolormap">gdk_x11_colormap_get_xcolormap</primary></indexterm><programlisting><link linkend="Colormap">Colormap</link>            gdk_x11_colormap_get_xcolormap      (<link linkend="GdkColormap">GdkColormap</link> *colormap);</programlisting>
<para>
Returns the X colormap belonging to a <link linkend="GdkColormap"><type>GdkColormap</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>colormap</parameter>&#160;:</term>
<listitem><simpara>  a <link linkend="GdkColormap"><type>GdkColormap</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an Xlib <type>Colormap</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-colormap-get-xdisplay" role="function">
<title>gdk_x11_colormap_get_xdisplay ()</title>
<indexterm zone="gdk-x11-colormap-get-xdisplay"><primary sortas="x11_colormap_get_xdisplay">gdk_x11_colormap_get_xdisplay</primary></indexterm><programlisting><link linkend="Display">Display</link> *           gdk_x11_colormap_get_xdisplay       (<link linkend="GdkColormap">GdkColormap</link> *colormap);</programlisting>
<para>
Returns the display of a <link linkend="GdkColormap"><type>GdkColormap</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>colormap</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkColormap"><type>GdkColormap</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-cursor-get-xcursor" role="function">
<title>gdk_x11_cursor_get_xcursor ()</title>
<indexterm zone="gdk-x11-cursor-get-xcursor"><primary sortas="x11_cursor_get_xcursor">gdk_x11_cursor_get_xcursor</primary></indexterm><programlisting><link linkend="Cursor">Cursor</link>              gdk_x11_cursor_get_xcursor          (<link linkend="GdkCursor">GdkCursor</link> *cursor);</programlisting>
<para>
Returns the X cursor belonging to a <link linkend="GdkCursor"><type>GdkCursor</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>cursor</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkCursor"><type>GdkCursor</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an Xlib <type>Cursor</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-cursor-get-xdisplay" role="function">
<title>gdk_x11_cursor_get_xdisplay ()</title>
<indexterm zone="gdk-x11-cursor-get-xdisplay"><primary sortas="x11_cursor_get_xdisplay">gdk_x11_cursor_get_xdisplay</primary></indexterm><programlisting><link linkend="Display">Display</link> *           gdk_x11_cursor_get_xdisplay         (<link linkend="GdkCursor">GdkCursor</link> *cursor);</programlisting>
<para>
Returns the display of a <link linkend="GdkCursor"><type>GdkCursor</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>cursor</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkCursor"><type>GdkCursor</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-display-broadcast-startup-message" role="function" condition="since:2.12">
<title>gdk_x11_display_broadcast_startup_message ()</title>
<indexterm zone="gdk-x11-display-broadcast-startup-message" role="2.12"><primary sortas="x11_display_broadcast_startup_message">gdk_x11_display_broadcast_startup_message</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_x11_display_broadcast_startup_message
                                                        (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         const <link linkend="char">char</link> *message_type,
                                                         ...);</programlisting>
<para>
Sends a startup notification message of type <parameter>message_type</parameter> to
<parameter>display</parameter>. 
</para>
<para>
This is a convenience function for use by code that implements the
freedesktop startup notification specification. Applications should
not normally need to call it directly. See the <ulink
url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">Startup
Notification Protocol specification</ulink> for
definitions of the message types and keys that can be used.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>message_type</parameter>&#160;:</term>
<listitem><simpara> startup notification message type ("new", "change",
or "remove")
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>...</parameter>&#160;:</term>
<listitem><simpara> a list of key/value pairs (as strings), terminated by a
<link linkend="NULL--CAPS"><literal>NULL</literal></link> key. (A <link linkend="NULL--CAPS"><literal>NULL</literal></link> value for a key will cause that key to be
skipped in the output.)
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.12</para></refsect2>
<refsect2 id="gdk-x11-display-get-startup-notification-id" role="function" condition="since:2.12">
<title>gdk_x11_display_get_startup_notification_id ()</title>
<indexterm zone="gdk-x11-display-get-startup-notification-id" role="2.12"><primary sortas="x11_display_get_startup_notification_id">gdk_x11_display_get_startup_notification_id</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link> *       gdk_x11_display_get_startup_notification_id
                                                        (<link linkend="GdkDisplay">GdkDisplay</link> *display);</programlisting>
<para>
Gets the startup notification ID for a display.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the startup notification ID for <parameter>display</parameter>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.12</para></refsect2>
<refsect2 id="gdk-x11-display-get-xdisplay" role="function" condition="since:2.2">
<title>gdk_x11_display_get_xdisplay ()</title>
<indexterm zone="gdk-x11-display-get-xdisplay" role="2.2"><primary sortas="x11_display_get_xdisplay">gdk_x11_display_get_xdisplay</primary></indexterm><programlisting><link linkend="Display">Display</link> *           gdk_x11_display_get_xdisplay        (<link linkend="GdkDisplay">GdkDisplay</link> *display);</programlisting>
<para>
Returns the X display of a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an X display.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-x11-display-grab" role="function" condition="since:2.2">
<title>gdk_x11_display_grab ()</title>
<indexterm zone="gdk-x11-display-grab" role="2.2"><primary sortas="x11_display_grab">gdk_x11_display_grab</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_x11_display_grab                (<link linkend="GdkDisplay">GdkDisplay</link> *display);</programlisting>
<para>
Call <link linkend="XGrabServer"><function>XGrabServer()</function></link> on <parameter>display</parameter>. 
To ungrab the display again, use <link linkend="gdk-x11-display-ungrab"><function>gdk_x11_display_ungrab()</function></link>. 
</para>
<para>
<link linkend="gdk-x11-display-grab"><function>gdk_x11_display_grab()</function></link>/<link linkend="gdk-x11-display-ungrab"><function>gdk_x11_display_ungrab()</function></link> calls can be nested.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDisplay"><type>GdkDisplay</type></link> 
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-x11-display-ungrab" role="function" condition="since:2.2">
<title>gdk_x11_display_ungrab ()</title>
<indexterm zone="gdk-x11-display-ungrab" role="2.2"><primary sortas="x11_display_ungrab">gdk_x11_display_ungrab</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_x11_display_ungrab              (<link linkend="GdkDisplay">GdkDisplay</link> *display);</programlisting>
<para>
Ungrab <parameter>display</parameter> after it has been grabbed with 
<link linkend="gdk-x11-display-grab"><function>gdk_x11_display_grab()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-x11-display-set-cursor-theme" role="function" condition="since:2.8">
<title>gdk_x11_display_set_cursor_theme ()</title>
<indexterm zone="gdk-x11-display-set-cursor-theme" role="2.8"><primary sortas="x11_display_set_cursor_theme">gdk_x11_display_set_cursor_theme</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_x11_display_set_cursor_theme    (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         const <link linkend="gchar">gchar</link> *theme,
                                                         const <link linkend="gint">gint</link> size);</programlisting>
<para>
Sets the cursor theme from which the images for cursor
should be taken. 
</para>
<para>
If the windowing system supports it, existing cursors created 
with <link linkend="gdk-cursor-new"><function>gdk_cursor_new()</function></link>, <link linkend="gdk-cursor-new-for-display"><function>gdk_cursor_new_for_display()</function></link> and 
<link linkend="gdk-cursor-new-for-name"><function>gdk_cursor_new_for_name()</function></link> are updated to reflect the theme 
change. Custom cursors constructed with <link linkend="gdk-cursor-new-from-pixmap"><function>gdk_cursor_new_from_pixmap()</function></link> 
or <link linkend="gdk-cursor-new-from-pixbuf"><function>gdk_cursor_new_from_pixbuf()</function></link> will have to be handled
by the application (GTK+ applications can learn about 
cursor theme changes by listening for change notification
for the corresponding <link linkend="GtkSetting"><type>GtkSetting</type></link>).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>theme</parameter>&#160;:</term>
<listitem><simpara> the name of the cursor theme to use, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to unset
        a previously set value 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter>&#160;:</term>
<listitem><simpara> the cursor size to use, or 0 to keep the previous size
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.8</para></refsect2>
<refsect2 id="gdk-x11-register-standard-event-type" role="function" condition="since:2.4">
<title>gdk_x11_register_standard_event_type ()</title>
<indexterm zone="gdk-x11-register-standard-event-type" role="2.4"><primary sortas="x11_register_standard_event_type">gdk_x11_register_standard_event_type</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_x11_register_standard_event_type
                                                        (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="gint">gint</link> event_base,
                                                         <link linkend="gint">gint</link> n_events);</programlisting>
<para>
Registers interest in receiving extension events with type codes
between <parameter>event_base</parameter> and <literal>event_base + n_events - 1</literal>.
The registered events must have the window field in the same place
as core X events (this is not the case for e.g. XKB extension events).
</para>
<para>
If an event type is registered, events of this type will go through
global and window-specific filters (see <link linkend="gdk-window-add-filter"><function>gdk_window_add_filter()</function></link>). 
Unregistered events will only go through global filters.
GDK may register the events of some X extensions on its own.
</para>
<para>
This function should only be needed in unusual circumstances, e.g.
when filtering XInput extension events on the root window.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>event_base</parameter>&#160;:</term>
<listitem><simpara> first event type code to register
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_events</parameter>&#160;:</term>
<listitem><simpara> number of event type codes to register
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gdk-x11-drawable-get-xdisplay" role="function">
<title>gdk_x11_drawable_get_xdisplay ()</title>
<indexterm zone="gdk-x11-drawable-get-xdisplay"><primary sortas="x11_drawable_get_xdisplay">gdk_x11_drawable_get_xdisplay</primary></indexterm><programlisting><link linkend="Display">Display</link> *           gdk_x11_drawable_get_xdisplay       (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);</programlisting>
<para>
Returns the display of a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-drawable-get-xid" role="function">
<title>gdk_x11_drawable_get_xid ()</title>
<indexterm zone="gdk-x11-drawable-get-xid"><primary sortas="x11_drawable_get_xid">gdk_x11_drawable_get_xid</primary></indexterm><programlisting><link linkend="XID--CAPS">XID</link>                 gdk_x11_drawable_get_xid            (<link linkend="GdkDrawable">GdkDrawable</link> *drawable);</programlisting>
<para>
Returns the X resource (window or pixmap) belonging to a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDrawable"><type>GdkDrawable</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the ID of <parameter>drawable</parameter>'s X resource.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-font-get-name" role="function" condition="deprecated:">
<title>gdk_x11_font_get_name ()</title>
<indexterm zone="gdk-x11-font-get-name" role="deprecated"><primary sortas="x11_font_get_name">gdk_x11_font_get_name</primary></indexterm><programlisting>const <link linkend="char">char</link> *        gdk_x11_font_get_name               (<link linkend="GdkFont">GdkFont</link> *font);</programlisting>
<warning><para><literal>gdk_x11_font_get_name</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Return the X Logical Font Description (for font->type == GDK_FONT_FONT)
or comma separated list of XLFDs (for font->type == GDK_FONT_FONTSET)
that was used to load the font. If the same font was loaded
via multiple names, which name is returned is undefined.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkFont"><type>GdkFont</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the name of the font. This string is owned
  by GDK and must not be modified or freed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-font-get-xdisplay" role="function" condition="deprecated:">
<title>gdk_x11_font_get_xdisplay ()</title>
<indexterm zone="gdk-x11-font-get-xdisplay" role="deprecated"><primary sortas="x11_font_get_xdisplay">gdk_x11_font_get_xdisplay</primary></indexterm><programlisting><link linkend="Display">Display</link> *           gdk_x11_font_get_xdisplay           (<link linkend="GdkFont">GdkFont</link> *font);</programlisting>
<warning><para><literal>gdk_x11_font_get_xdisplay</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Returns the display of a <link linkend="GdkFont"><type>GdkFont</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkFont"><type>GdkFont</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>  an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-font-get-xfont" role="function" condition="deprecated:">
<title>gdk_x11_font_get_xfont ()</title>
<indexterm zone="gdk-x11-font-get-xfont" role="deprecated"><primary sortas="x11_font_get_xfont">gdk_x11_font_get_xfont</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            gdk_x11_font_get_xfont              (<link linkend="GdkFont">GdkFont</link> *font);</programlisting>
<warning><para><literal>gdk_x11_font_get_xfont</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Returns the X font belonging to a <link linkend="GdkFont"><type>GdkFont</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkFont"><type>GdkFont</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an Xlib <type>XFontStruct*</type> or an <type>XFontSet</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-gc-get-xdisplay" role="function">
<title>gdk_x11_gc_get_xdisplay ()</title>
<indexterm zone="gdk-x11-gc-get-xdisplay"><primary sortas="x11_gc_get_xdisplay">gdk_x11_gc_get_xdisplay</primary></indexterm><programlisting><link linkend="Display">Display</link> *           gdk_x11_gc_get_xdisplay             (<link linkend="GdkGC">GdkGC</link> *gc);</programlisting>
<para>
Returns the display of a <link linkend="GdkGC"><type>GdkGC</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-gc-get-xgc" role="function">
<title>gdk_x11_gc_get_xgc ()</title>
<indexterm zone="gdk-x11-gc-get-xgc"><primary sortas="x11_gc_get_xgc">gdk_x11_gc_get_xgc</primary></indexterm><programlisting><link linkend="GC--CAPS">GC</link>                  gdk_x11_gc_get_xgc                  (<link linkend="GdkGC">GdkGC</link> *gc);</programlisting>
<para>
Returns the X GC of a <link linkend="GdkGC"><type>GdkGC</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>gc</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkGC"><type>GdkGC</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an Xlib <type>GC</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-get-default-root-xwindow" role="function">
<title>gdk_x11_get_default_root_xwindow ()</title>
<indexterm zone="gdk-x11-get-default-root-xwindow"><primary sortas="x11_get_default_root_xwindow">gdk_x11_get_default_root_xwindow</primary></indexterm><programlisting><link linkend="Window">Window</link>              gdk_x11_get_default_root_xwindow    (void);</programlisting>
<para>
Gets the root window of the default screen 
(see <link linkend="gdk-x11-get-default-screen"><function>gdk_x11_get_default_screen()</function></link>).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an Xlib <type>Window</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-get-default-screen" role="function">
<title>gdk_x11_get_default_screen ()</title>
<indexterm zone="gdk-x11-get-default-screen"><primary sortas="x11_get_default_screen">gdk_x11_get_default_screen</primary></indexterm><programlisting><link linkend="gint">gint</link>                gdk_x11_get_default_screen          (void);</programlisting>
<para>
Gets the default GTK+ screen number.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> returns the screen number specified by
  the --display command line option or the DISPLAY environment
  variable when <link linkend="gdk-init"><function>gdk_init()</function></link> calls <link linkend="XOpenDisplay"><function>XOpenDisplay()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-get-default-xdisplay" role="function">
<title>gdk_x11_get_default_xdisplay ()</title>
<indexterm zone="gdk-x11-get-default-xdisplay"><primary sortas="x11_get_default_xdisplay">gdk_x11_get_default_xdisplay</primary></indexterm><programlisting><link linkend="Display">Display</link> *           gdk_x11_get_default_xdisplay        (void);</programlisting>
<para>
Gets the default GTK+ display.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the Xlib <type>Display*</type> for the display
specified in the <option>--display</option> command line option 
or the <envar>DISPLAY</envar> environment variable.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-grab-server" role="function">
<title>gdk_x11_grab_server ()</title>
<indexterm zone="gdk-x11-grab-server"><primary sortas="x11_grab_server">gdk_x11_grab_server</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_x11_grab_server                 (void);</programlisting>
<para>
Call <link linkend="gdk-x11-display-grab"><function>gdk_x11_display_grab()</function></link> on the default display. 
To ungrab the server again, use <link linkend="gdk-x11-ungrab-server"><function>gdk_x11_ungrab_server()</function></link>. 
</para>
<para>
<link linkend="gdk-x11-grab-server"><function>gdk_x11_grab_server()</function></link>/<link linkend="gdk-x11-ungrab-server"><function>gdk_x11_ungrab_server()</function></link> calls can be nested.</para>
<para>
</para></refsect2>
<refsect2 id="gdk-x11-image-get-xdisplay" role="function">
<title>gdk_x11_image_get_xdisplay ()</title>
<indexterm zone="gdk-x11-image-get-xdisplay"><primary sortas="x11_image_get_xdisplay">gdk_x11_image_get_xdisplay</primary></indexterm><programlisting><link linkend="Display">Display</link> *           gdk_x11_image_get_xdisplay          (<link linkend="GdkImage">GdkImage</link> *image);</programlisting>
<para>
Returns the display of a <link linkend="GdkImage"><type>GdkImage</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkImage"><type>GdkImage</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an Xlib <type>Display*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-image-get-ximage" role="function">
<title>gdk_x11_image_get_ximage ()</title>
<indexterm zone="gdk-x11-image-get-ximage"><primary sortas="x11_image_get_ximage">gdk_x11_image_get_ximage</primary></indexterm><programlisting><link linkend="XImage">XImage</link> *            gdk_x11_image_get_ximage            (<link linkend="GdkImage">GdkImage</link> *image);</programlisting>
<para>
Returns the X image belonging to a <link linkend="GdkImage"><type>GdkImage</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkImage"><type>GdkImage</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an <type>XImage*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-screen-get-screen-number" role="function" condition="since:2.2">
<title>gdk_x11_screen_get_screen_number ()</title>
<indexterm zone="gdk-x11-screen-get-screen-number" role="2.2"><primary sortas="x11_screen_get_screen_number">gdk_x11_screen_get_screen_number</primary></indexterm><programlisting><link linkend="int">int</link>                 gdk_x11_screen_get_screen_number    (<link linkend="GdkScreen">GdkScreen</link> *screen);</programlisting>
<para>
Returns the index of a <link linkend="GdkScreen"><type>GdkScreen</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>screen</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkScreen"><type>GdkScreen</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the position of <parameter>screen</parameter> among the screens of
  its display.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-x11-screen-get-xscreen" role="function" condition="since:2.2">
<title>gdk_x11_screen_get_xscreen ()</title>
<indexterm zone="gdk-x11-screen-get-xscreen" role="2.2"><primary sortas="x11_screen_get_xscreen">gdk_x11_screen_get_xscreen</primary></indexterm><programlisting><link linkend="Screen">Screen</link> *            gdk_x11_screen_get_xscreen          (<link linkend="GdkScreen">GdkScreen</link> *screen);</programlisting>
<para>
Returns the screen of a <link linkend="GdkScreen"><type>GdkScreen</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>screen</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkScreen"><type>GdkScreen</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an Xlib <type>Screen*</type>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-x11-ungrab-server" role="function">
<title>gdk_x11_ungrab_server ()</title>
<indexterm zone="gdk-x11-ungrab-server"><primary sortas="x11_ungrab_server">gdk_x11_ungrab_server</primary></indexterm><programlisting><link linkend="void">void</link>                gdk_x11_ungrab_server               (void);</programlisting>
<para>
Ungrab the default display after it has been grabbed with 
<link linkend="gdk-x11-grab-server"><function>gdk_x11_grab_server()</function></link>.</para>
<para>
</para></refsect2>
<refsect2 id="gdk-x11-visual-get-xvisual" role="function">
<title>gdk_x11_visual_get_xvisual ()</title>
<indexterm zone="gdk-x11-visual-get-xvisual"><primary sortas="x11_visual_get_xvisual">gdk_x11_visual_get_xvisual</primary></indexterm><programlisting><link linkend="Visual">Visual</link> *            gdk_x11_visual_get_xvisual          (<link linkend="GdkVisual">GdkVisual</link> *visual);</programlisting>
<para>
Returns the X visual belonging to a <link linkend="GdkVisual"><type>GdkVisual</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>visual</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkVisual"><type>GdkVisual</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an Xlib <type>Visual*</type>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-atom-to-xatom" role="function">
<title>gdk_x11_atom_to_xatom ()</title>
<indexterm zone="gdk-x11-atom-to-xatom"><primary sortas="x11_atom_to_xatom">gdk_x11_atom_to_xatom</primary></indexterm><programlisting><link linkend="Atom">Atom</link>                gdk_x11_atom_to_xatom               (<link linkend="GdkAtom">GdkAtom</link> atom);</programlisting>
<para>
Converts from a <link linkend="GdkAtom"><type>GdkAtom</type></link> to the X atom for the default GDK display
with the same string value.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>atom</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GdkAtom"><type>GdkAtom</type></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the X atom corresponding to <parameter>atom</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-atom-to-xatom-for-display" role="function" condition="since:2.2">
<title>gdk_x11_atom_to_xatom_for_display ()</title>
<indexterm zone="gdk-x11-atom-to-xatom-for-display" role="2.2"><primary sortas="x11_atom_to_xatom_for_display">gdk_x11_atom_to_xatom_for_display</primary></indexterm><programlisting><link linkend="Atom">Atom</link>                gdk_x11_atom_to_xatom_for_display   (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="GdkAtom">GdkAtom</link> atom);</programlisting>
<para>
Converts from a <link linkend="GdkAtom"><type>GdkAtom</type></link> to the X atom for a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>
with the same string value. The special value <link linkend="GDK-NONE--CAPS"><literal>GDK_NONE</literal></link>
is converted to <link linkend="None"><literal>None</literal></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GdkDisplay"><type>GdkDisplay</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>atom</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GdkAtom"><type>GdkAtom</type></link>, or <link linkend="GDK-NONE--CAPS"><literal>GDK_NONE</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the X atom corresponding to <parameter>atom</parameter>, or <link linkend="None"><literal>None</literal></link>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-x11-xatom-to-atom" role="function">
<title>gdk_x11_xatom_to_atom ()</title>
<indexterm zone="gdk-x11-xatom-to-atom"><primary sortas="x11_xatom_to_atom">gdk_x11_xatom_to_atom</primary></indexterm><programlisting><link linkend="GdkAtom">GdkAtom</link>             gdk_x11_xatom_to_atom               (<link linkend="Atom">Atom</link> xatom);</programlisting>
<para>
Convert from an X atom for the default display to the corresponding
<link linkend="GdkAtom"><type>GdkAtom</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>xatom</parameter>&#160;:</term>
<listitem><simpara> an X atom for the default GDK display
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the corresponding G<link linkend="dkAtom"><type>dkAtom</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-xatom-to-atom-for-display" role="function" condition="since:2.2">
<title>gdk_x11_xatom_to_atom_for_display ()</title>
<indexterm zone="gdk-x11-xatom-to-atom-for-display" role="2.2"><primary sortas="x11_xatom_to_atom_for_display">gdk_x11_xatom_to_atom_for_display</primary></indexterm><programlisting><link linkend="GdkAtom">GdkAtom</link>             gdk_x11_xatom_to_atom_for_display   (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="Atom">Atom</link> xatom);</programlisting>
<para>
Convert from an X atom for a <link linkend="GdkDisplay"><type>GdkDisplay</type></link> to the corresponding
<link linkend="GdkAtom"><type>GdkAtom</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GdkDisplay"><type>GdkDisplay</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>xatom</parameter>&#160;:</term>
<listitem><simpara> an X atom 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the corresponding <link linkend="GdkAtom"><type>GdkAtom</type></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-x11-get-xatom-by-name" role="function">
<title>gdk_x11_get_xatom_by_name ()</title>
<indexterm zone="gdk-x11-get-xatom-by-name"><primary sortas="x11_get_xatom_by_name">gdk_x11_get_xatom_by_name</primary></indexterm><programlisting><link linkend="Atom">Atom</link>                gdk_x11_get_xatom_by_name           (const <link linkend="gchar">gchar</link> *atom_name);</programlisting>
<para>
Returns the X atom for GDK's default display corresponding to <parameter>atom_name</parameter>.
This function caches the result, so if called repeatedly it is much
faster than <link linkend="XInternAtom"><function>XInternAtom()</function></link>, which is a round trip to the server each time.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>atom_name</parameter>&#160;:</term>
<listitem><simpara> a string
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a X atom for GDK's default display.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-get-xatom-by-name-for-display" role="function" condition="since:2.2">
<title>gdk_x11_get_xatom_by_name_for_display ()</title>
<indexterm zone="gdk-x11-get-xatom-by-name-for-display" role="2.2"><primary sortas="x11_get_xatom_by_name_for_display">gdk_x11_get_xatom_by_name_for_display</primary></indexterm><programlisting><link linkend="Atom">Atom</link>                gdk_x11_get_xatom_by_name_for_display
                                                        (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         const <link linkend="gchar">gchar</link> *atom_name);</programlisting>
<para>
Returns the X atom for a <link linkend="GdkDisplay"><type>GdkDisplay</type></link> corresponding to <parameter>atom_name</parameter>.
This function caches the result, so if called repeatedly it is much
faster than <link linkend="XInternAtom"><function>XInternAtom()</function></link>, which is a round trip to the server each time.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>atom_name</parameter>&#160;:</term>
<listitem><simpara> a string
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a X atom for a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gdk-x11-get-xatom-name" role="function">
<title>gdk_x11_get_xatom_name ()</title>
<indexterm zone="gdk-x11-get-xatom-name"><primary sortas="x11_get_xatom_name">gdk_x11_get_xatom_name</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link> *       gdk_x11_get_xatom_name              (<link linkend="Atom">Atom</link> xatom);</programlisting>
<para>
Returns the name of an X atom for GDK's default display. This
function is meant mainly for debugging, so for convenience, unlike
<function><link linkend="XAtomName"><function>XAtomName()</function></link></function> and <link linkend="gdk-atom-name"><function>gdk_atom_name()</function></link>, the result 
doesn't need to be freed. Also, this function will never return <link linkend="NULL--CAPS"><literal>NULL</literal></link>, 
even if <parameter>xatom</parameter> is invalid.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>xatom</parameter>&#160;:</term>
<listitem><simpara> an X atom for GDK's default display
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> name of the X atom; this string is owned by GTK+,
  so it shouldn't be modifed or freed. 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gdk-x11-get-xatom-name-for-display" role="function" condition="since:2.2">
<title>gdk_x11_get_xatom_name_for_display ()</title>
<indexterm zone="gdk-x11-get-xatom-name-for-display" role="2.2"><primary sortas="x11_get_xatom_name_for_display">gdk_x11_get_xatom_name_for_display</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link> *       gdk_x11_get_xatom_name_for_display  (<link linkend="GdkDisplay">GdkDisplay</link> *display,
                                                         <link linkend="Atom">Atom</link> xatom);</programlisting>
<para>
Returns the name of an X atom for its display. This
function is meant mainly for debugging, so for convenience, unlike
<link linkend="XAtomName"><function>XAtomName()</function></link> and <link linkend="gdk-atom-name"><function>gdk_atom_name()</function></link>, the result doesn't need to
be freed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="GdkDisplay"><type>GdkDisplay</type></link> where <parameter>xatom</parameter> is defined
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>xatom</parameter>&#160;:</term>
<listitem><simpara> an X atom 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> name of the X atom; this string is owned by GDK,
  so it shouldn't be modifed or freed. 

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>

</refsect1>




</refentry>
