| GDK Reference Manual | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | |
| #define GDK_ROOT_WINDOW() | 
Obtains the Xlib window id of the root window of the current screen.
| #define GDK_ROOT_PARENT() | 
Obtains the Xlib window id of the root window of the default screen.
| #define GDK_WINDOW_XDISPLAY(win) | 
Returns the display of a GdkWindow.
| win : | a GdkWindow. | 
| Returns : | an Xlib Display*. | 
| #define GDK_WINDOW_XID(win) | 
Returns the X window belonging to a GdkWindow.
| win : | a GdkWindow. | 
| Returns : | the Xlib Window of win. | 
| #define GDK_PIXMAP_XDISPLAY(win) | 
Returns the display of a GdkPixmap.
| win : | a GdkPixmap. | 
| Returns : | an Xlib Display*. | 
| #define GDK_PIXMAP_XID(win) | 
Returns the X pixmap belonging to a GdkPixmap.
| win : | a GdkPixmap. | 
| Returns : | the Xlib XPixmap of win. | 
| #define GDK_DRAWABLE_XDISPLAY(win) | 
Returns the display of a GdkDrawable.
| win : | a GdkDrawable. | 
| Returns : | an Xlib Display*. | 
| #define GDK_DRAWABLE_XID(win) | 
Returns the X resource (window or pixmap) belonging to a GdkDrawable.
| win : | a GdkDrawable. | 
| Returns : | the ID of win's X resource. | 
| #define GDK_IMAGE_XDISPLAY(image) (gdk_x11_image_get_xdisplay (image)) | 
Returns the display of a GdkImage.
| image : | a GdkImage. | 
| Returns : | an Xlib Display*. | 
| #define GDK_IMAGE_XIMAGE(image) (gdk_x11_image_get_ximage (image)) | 
Returns the X image belonging to a GdkImage.
| image : | a GdkImage. | 
| Returns : | an XImage*. | 
| #define GDK_GC_XDISPLAY(gc) | 
Returns the display of a GdkGC.
| gc : | a GdkGC. | 
| Returns : | an Xlib Display*. | 
| #define GDK_COLORMAP_XDISPLAY(cmap) (gdk_x11_colormap_get_xdisplay (cmap)) | 
Returns the display of a GdkColormap.
| cmap : | a GdkColormap. | 
| Returns : | an Xlib Display*. | 
| #define GDK_COLORMAP_XCOLORMAP(cmap) (gdk_x11_colormap_get_xcolormap (cmap)) | 
Returns the X colormap belonging to a GdkColormap.
| cmap : | a GdkColormap. | 
| Returns : | an Xlib Colormap. | 
| #define GDK_VISUAL_XVISUAL(vis) | 
Returns the X visual belonging to a GdkVisual.
| vis : | a GdkVisual. | 
| Returns : | an Xlib Visual*. | 
| #define GDK_FONT_XDISPLAY(font) (gdk_x11_font_get_xdisplay (font)) | 
| Warning | 
| GDK_FONT_XDISPLAY is deprecated and should not be used in newly-written code. | 
Returns the display of a GdkFont.
| font : | a GdkFont. | 
| Returns : | an Xlib Display*. | 
| #define GDK_FONT_XFONT(font) (gdk_x11_font_get_xfont (font)) | 
| Warning | 
| GDK_FONT_XFONT is deprecated and should not be used in newly-written code. | 
Returns the X font belonging to a GdkFont.
| font : | a GdkFont. | 
| Returns : | an Xlib XFontStruct* or an XFontSet. | 
| #define GDK_CURSOR_XCURSOR(cursor) (gdk_x11_cursor_get_xcursor (cursor)) | 
Returns the X cursor belonging to a GdkCursor.
| cursor : | a GdkCursor. | 
| Returns : | an Xlib Cursor. | 
| #define GDK_CURSOR_XDISPLAY(cursor) (gdk_x11_cursor_get_xdisplay (cursor)) | 
Returns the display of a GdkCursor.
| cursor : | a GdkCursor. | 
| Returns : | an Xlib Display*. | 
| #define GDK_GC_XGC(gc) | 
Returns the X GC of a GdkGC.
Note: Note that the clip origin, clip region and tile/stipple origin fields of the returned GC may not be in sync with gc. If you need that, use GDK_GC_GET_XGC().
| gc : | a GdkGC. | 
| Returns : | an Xlib GC. | 
| #define GDK_GC_GET_XGC(gc) (GDK_GC_X11(gc)->dirty_mask ? _gdk_x11_gc_flush (gc) : ((GdkGCX11 *)(gc))->xgc) | 
Returns the X GC of a GdkGC.
| gc : | a GdkGC. | 
| Returns : | an Xlib GC. | 
| GdkVisual* gdkx_visual_get (VisualID xvisualid); | 
Returns a GdkVisual corresponding to a X visual.
| xvisualid : | a X visual id. | 
| Returns : | the GdkVisual. | 
| GdkColormap* gdkx_colormap_get (Colormap xcolormap); | 
Returns a GdkColormap corresponding to a X colormap.
| xcolormap : | a X colormap. | 
| Returns : | the GdkColormap. | 
| GdkPixmap* gdk_pixmap_foreign_new (GdkNativeWindow anid); | 
Wraps a native window in a GdkPixmap. This may fail if the pixmap has been destroyed.
For example in the X backend, a native pixmap handle is an Xlib XID.
| anid : | a native pixmap handle. | 
| Returns : | the newly-created GdkPixmap wrapper for the native pixmap or NULL if the pixmap has been destroyed. | 
| GdkWindow* gdk_window_foreign_new (GdkNativeWindow anid); | 
Wraps a native window in a GdkWindow. This may fail if the window has been destroyed.
For example in the X backend, a native window handle is an Xlib XID.
| anid : | a native window handle. | 
| Returns : | the newly-created GdkWindow wrapper for the native window or NULL if the window has been destroyed. | 
| gpointer gdk_xid_table_lookup (XID xid); | 
Returns the Gdk object associated with the given X id.
| xid : | an X id. | 
| Returns : | the associated Gdk object, which may be a GdkPixmap, a GdkWindow or a GdkFont. | 
| GdkWindow* gdk_window_lookup (GdkNativeWindow anid); | 
Looks up the GdkWindow that wraps the given native window handle.
For example in the X backend, a native window handle is an Xlib XID.
Obtains the GdkWindow for the given Xlib window ID, or NULL if no GdkWindow has been created for xid.
| anid : | a native window handle. | 
| Returns : | the GdkWindow wrapper for the native window, or NULL if there is none. | 
| GdkPixmap* gdk_pixmap_lookup (GdkNativeWindow anid); | 
Looks up the GdkPixmap that wraps the given native pixmap handle.
For example in the X backend, a native pixmap handle is an Xlib XID.
Obtains the GdkPixmap for the given Xlib pixmap ID, or NULL if no GdkPixmap has been created for xid.
| anid : | a native pixmap handle. | 
| Returns : | the GdkWindow wrapper for the native window, or NULL if there is none. | 
| #define gdk_font_lookup(xid) ((GdkFont*) gdk_xid_table_lookup (xid)) | 
| Warning | 
| gdk_font_lookup is deprecated and should not be used in newly-written code. | 
Obtains the GdkFont for the given Xlib pixmap ID, or NULL if no GdkPixmap has been created for xid.
| xid : | 
 | 
| guint32 gdk_x11_get_server_time (GdkWindow *window); | 
Routine to get the current X server time stamp.
| window : | a GdkWindow, used for communication with the server. The window must have GDK_PROPERTY_CHANGE_MASK in its events mask or a hang will result. | 
| Returns : | the time stamp. | 
| gboolean gdk_net_wm_supports (GdkAtom property); | 
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 http://www.freedesktop.org.
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 gdk_net_wm_supports() will return FALSE for every property.
| property : | a property atom | 
| Returns : | TRUE if the window manager supports property | 
| Colormap gdk_x11_colormap_get_xcolormap (GdkColormap *colormap); | 
Returns the X colormap belonging to a GdkColormap.
| colormap : | a GdkColormap. | 
| Returns : | an Xlib Colormap. | 
| Display* gdk_x11_colormap_get_xdisplay (GdkColormap *colormap); | 
Returns the display of a GdkColormap.
| colormap : | a GdkColormap. | 
| Returns : | an Xlib Display*. | 
| Cursor gdk_x11_cursor_get_xcursor (GdkCursor *cursor); | 
Returns the X cursor belonging to a GdkCursor.
| cursor : | a GdkCursor. | 
| Returns : | 
| Display* gdk_x11_cursor_get_xdisplay (GdkCursor *cursor); | 
Returns the display of a GdkCursor.
| cursor : | a GdkCursor. | 
| Returns : | an Xlib Display*. | 
| Display* gdk_x11_drawable_get_xdisplay (GdkDrawable *drawable); | 
Returns the display of a GdkDrawable.
| drawable : | a GdkDrawable. | 
| Returns : | an Xlib Display*. | 
| XID gdk_x11_drawable_get_xid (GdkDrawable *drawable); | 
Returns the X resource (window or pixmap) belonging to a GdkDrawable.
| drawable : | a GdkDrawable. | 
| Returns : | the ID of win's X resource. | 
| G_CONST_RETURN char* gdk_x11_font_get_name (GdkFont *font); | 
| Warning | 
| gdk_x11_font_get_name is deprecated and should not be used in newly-written code. | 
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.
| font : | a GdkFont. | 
| Returns : | the name of the font. This string is owned by GDK and must not be modified or freed. | 
| Display* gdk_x11_font_get_xdisplay (GdkFont *font); | 
| Warning | 
| gdk_x11_font_get_xdisplay is deprecated and should not be used in newly-written code. | 
Returns the display of a GdkFont.
| font : | a GdkFont. | 
| Returns : | an Xlib Display*. | 
| gpointer gdk_x11_font_get_xfont (GdkFont *font); | 
| Warning | 
| gdk_x11_font_get_xfont is deprecated and should not be used in newly-written code. | 
Returns the X font belonging to a GdkFont.
| font : | a GdkFont. | 
| Returns : | an Xlib XFontStruct* or an XFontSet. | 
| Display* gdk_x11_gc_get_xdisplay (GdkGC *gc); | 
Returns the display of a GdkGC.
| gc : | a GdkGC. | 
| Returns : | an Xlib Display*. | 
| GC gdk_x11_gc_get_xgc (GdkGC *gc); | 
Returns the X GC of a GdkGC.
| gc : | a GdkGC. | 
| Returns : | an Xlib GC. | 
| Window      gdk_x11_get_default_root_xwindow
                                            (void); | 
Gets the root window of the default screen (see gdk_x11_get_default_screen()).
| Returns : | an Xlib Window. | 
| gint gdk_x11_get_default_screen (void); | 
Gets the default GTK+ screen number.
| Returns : | returns the screen number specified by the --display command line option on the DISPLAY environment variable gdk_init() calls XOpenDisplay(). | 
| Display* gdk_x11_get_default_xdisplay (void); | 
Gets the default GTK+ display.
| Returns : | the Xlib Display* for the display specified in the --display command line option or the DISPLAY environment variable. | 
| void gdk_x11_grab_server (void); | 
Call XGrabServer() on the default display. To ungrab the server again, use gdk_x11_ungrab_server().
gdk_x11_grab_server()/gdk_x11_ungrab_server() calls can be nested.
| Display* gdk_x11_image_get_xdisplay (GdkImage *image); | 
Returns the display of a GdkImage.
| image : | |
| Returns : | an Xlib Display*. | 
| XImage* gdk_x11_image_get_ximage (GdkImage *image); | 
Returns the X image belonging to a GdkImage.
| image : | a GdkImage. | 
| Returns : | an XImage*. | 
| void gdk_x11_ungrab_server (void); | 
Ungrab the default display after it has been grabbed with gdk_x11_grab_server().
| Visual* gdk_x11_visual_get_xvisual (GdkVisual *visual); | 
Returns the X visual belonging to a GdkVisual.
| visual : | a GdkVisual. | 
| Returns : | an Xlib Visual*. | 
| Atom gdk_x11_atom_to_xatom (GdkAtom atom); | 
Converts from a GdkAtom to the X atom for the default GDK display with the same string value.
| atom : | A GdkAtom | 
| Returns : | the X atom corresponding to atom. | 
| GdkAtom gdk_x11_xatom_to_atom (Atom xatom); | 
Converts from an X atom for the default display to the corresponding GdkAtom.
| xatom : | an X atom for the default GDK display | 
| Returns : | the corresponding GdkAtom. | 
| Atom gdk_x11_get_xatom_by_name (const gchar *atom_name); | 
Returns the X atom for GDK's default display corresponding to atom_name. This function caches the result, so if called repeatedly it is much faster than XInternAtom(), which is a round trip to the server each time.
| atom_name : | a string | 
| Returns : | a X atom for GDK's default display. | 
| G_CONST_RETURN gchar* gdk_x11_get_xatom_name (Atom xatom); | 
Returns the name of an X atom for GDK's default display. This function is meant mainly for debugging, so for convenience, unlike XAtomName() and gdk_atom_name(), the result doesn't need to be freed. Also, this function will never return NULL, even if xatom is invalid.
| xatom : | an X atom for GDK's default display | 
| Returns : | name of the X atom; this string is owned by GTK+, so it shouldn't be modifed or freed. |