![]() | ![]() | ![]() | GDK Reference Manual | ![]() |
---|
X Window System Interaction — X backend-specific functions
#include <gdk/gdk.h> #define GDK_ROOT_WINDOW () #define GDK_ROOT_PARENT () #define GDK_DISPLAY () #define GDK_WINDOW_XDISPLAY (win) #define GDK_WINDOW_XID (win) #define GDK_PIXMAP_XDISPLAY (pix) #define GDK_PIXMAP_XID (pix) #define GDK_DISPLAY_XDISPLAY (display) #define GDK_DRAWABLE_XDISPLAY (win) #define GDK_DRAWABLE_XID (win) #define GDK_IMAGE_XDISPLAY (image) #define GDK_IMAGE_XIMAGE (image) #define GDK_GC_XDISPLAY (gc) #define GDK_COLORMAP_XDISPLAY (cmap) #define GDK_COLORMAP_XCOLORMAP (cmap) #define GDK_SCREEN_XDISPLAY (screen) #define GDK_SCREEN_XNUMBER (screen) #define GDK_SCREEN_XSCREEN (screen) #define GDK_VISUAL_XVISUAL (vis) #define GDK_FONT_XDISPLAY (font) #define GDK_FONT_XFONT (font) #define GDK_CURSOR_XCURSOR (cursor) #define GDK_CURSOR_XDISPLAY (cursor) #define GDK_GC_XGC (gc) #define GDK_GC_GET_XGC (gc) #define GDK_WINDOW_XWINDOW GdkVisual* gdkx_visual_get (VisualID xvisualid); GdkColormap* gdkx_colormap_get (Colormap xcolormap); GdkPixmap* gdk_pixmap_foreign_new (GdkNativeWindow anid); GdkPixmap* gdk_pixmap_foreign_new_for_display (GdkDisplay *display, GdkNativeWindow anid); GdkWindow* gdk_window_foreign_new (GdkNativeWindow anid); GdkWindow* gdk_window_foreign_new_for_display (GdkDisplay *display, GdkNativeWindow anid); gpointer gdk_xid_table_lookup (XID xid); gpointer gdk_xid_table_lookup_for_display (GdkDisplay *display, XID xid); GdkWindow* gdk_window_lookup (GdkNativeWindow anid); GdkWindow* gdk_window_lookup_for_display (GdkDisplay *display, GdkNativeWindow anid); GdkPixmap* gdk_pixmap_lookup (GdkNativeWindow anid); GdkPixmap* gdk_pixmap_lookup_for_display (GdkDisplay *display, GdkNativeWindow anid); #define gdk_font_lookup (xid) #define gdk_font_lookup_for_display (display, xid) GdkDisplay* gdk_x11_lookup_xdisplay (Display *xdisplay); guint32 gdk_x11_get_server_time (GdkWindow *window); gboolean gdk_net_wm_supports (GdkAtom property); gboolean gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen, GdkAtom property); const char* gdk_x11_screen_get_window_manager_name (GdkScreen *screen); GdkVisual* gdk_x11_screen_lookup_visual (GdkScreen *screen, VisualID xvisualid); GdkColormap* gdk_x11_colormap_foreign_new (GdkVisual *visual, Colormap xcolormap); Colormap gdk_x11_colormap_get_xcolormap (GdkColormap *colormap); Display* gdk_x11_colormap_get_xdisplay (GdkColormap *colormap); Cursor gdk_x11_cursor_get_xcursor (GdkCursor *cursor); Display* gdk_x11_cursor_get_xdisplay (GdkCursor *cursor); Display* gdk_x11_display_get_xdisplay (GdkDisplay *display); void gdk_x11_display_grab (GdkDisplay *display); void gdk_x11_display_ungrab (GdkDisplay *display); void gdk_x11_register_standard_event_type (GdkDisplay *display, gint event_base, gint n_events); Display* gdk_x11_drawable_get_xdisplay (GdkDrawable *drawable); XID gdk_x11_drawable_get_xid (GdkDrawable *drawable); G_CONST_RETURN char* gdk_x11_font_get_name (GdkFont *font); Display* gdk_x11_font_get_xdisplay (GdkFont *font); gpointer gdk_x11_font_get_xfont (GdkFont *font); Display* gdk_x11_gc_get_xdisplay (GdkGC *gc); GC gdk_x11_gc_get_xgc (GdkGC *gc); Window gdk_x11_get_default_root_xwindow (void); gint gdk_x11_get_default_screen (void); Display* gdk_x11_get_default_xdisplay (void); void gdk_x11_grab_server (void); Display* gdk_x11_image_get_xdisplay (GdkImage *image); XImage* gdk_x11_image_get_ximage (GdkImage *image); int gdk_x11_screen_get_screen_number (GdkScreen *screen); Screen* gdk_x11_screen_get_xscreen (GdkScreen *screen); void gdk_x11_ungrab_server (void); Visual* gdk_x11_visual_get_xvisual (GdkVisual *visual); Atom gdk_x11_atom_to_xatom (GdkAtom atom); Atom gdk_x11_atom_to_xatom_for_display (GdkDisplay *display, GdkAtom atom); GdkAtom gdk_x11_xatom_to_atom (Atom xatom); GdkAtom gdk_x11_xatom_to_atom_for_display (GdkDisplay *display, Atom xatom); Atom gdk_x11_get_xatom_by_name (const gchar *atom_name); Atom gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display, const gchar *atom_name); G_CONST_RETURN gchar* gdk_x11_get_xatom_name (Atom xatom); G_CONST_RETURN gchar* gdk_x11_get_xatom_name_for_display (GdkDisplay *display, Atom xatom);
#define GDK_ROOT_WINDOW() (gdk_x11_get_default_root_xwindow ())
Obtains the Xlib window id of the root window of the current screen.
#define GDK_ROOT_PARENT() (gdk_get_default_root_window ())
GDK_ROOT_PARENT is deprecated and should not be used in newly-written code.
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(pix)
Returns the display of a GdkPixmap.
pix : | |
Returns : | an Xlib Display*. |
#define GDK_PIXMAP_XID(pix)
Returns the X pixmap belonging to a GdkPixmap.
pix : | |
Returns : | the Xlib XPixmap of win. |
#define GDK_DISPLAY_XDISPLAY(display)
Returns the display of a GdkDisplay.
display : | a GdkDisplay. |
#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_SCREEN_XDISPLAY(screen)
Returns the display of a GdkScreen.
screen : | a GdkScreen. |
Returns : | an Xlib Display*. |
#define GDK_SCREEN_XNUMBER(screen)
Returns the index of a GdkScreen.
screen : | a GdkScreen |
Returns : | the position of screen among the screens of its display. |
#define GDK_SCREEN_XSCREEN(screen)
Returns the screen of a GdkScreen.
screen : | a GdkScreen |
Returns : | an Xlib Screen*. |
#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))
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))
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 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);
gdkx_colormap_get is deprecated and should not be used in newly-written code.
Returns a GdkColormap 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+
Always use gdk_x11_colormap_foreign_new() instead.
xcolormap : | the XID of a colormap for the default screen. |
Returns : | the existing GdkColormap object if it was already known to GTK+, otherwise warns and return NULL. |
GdkPixmap* gdk_pixmap_foreign_new (GdkNativeWindow anid);
Wraps a native window for the default display 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. |
GdkPixmap* gdk_pixmap_foreign_new_for_display (GdkDisplay *display, GdkNativeWindow anid);
Wraps a native pixmap 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.
display : | The GdkDisplay where anid is located. |
anid : | a native pixmap handle. |
Returns : | the newly-created GdkPixmap wrapper for the native pixmap or NULL if the pixmap has been destroyed. |
Since 2.2
GdkWindow* gdk_window_foreign_new (GdkNativeWindow anid);
Wraps a native window for the default display 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. |
GdkWindow* gdk_window_foreign_new_for_display (GdkDisplay *display, 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.
display : | the GdkDisplay where the window handle comes from. |
anid : | a native window handle. |
Returns : | the newly-created GdkWindow wrapper for the native window or NULL if the window has been destroyed. |
Since 2.2
gpointer gdk_xid_table_lookup (XID xid);
Returns the Gdk object associated with the given X id.
gpointer gdk_xid_table_lookup_for_display (GdkDisplay *display, XID xid);
Returns the GDK object associated with the given X id.
display : | the GdkDisplay. |
xid : | an X id. |
Returns : | a GDK object associated with the given X id. |
Since 2.2
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.
anid : | a native window handle. |
Returns : | the GdkWindow wrapper for the native window, or NULL if there is none. |
GdkWindow* gdk_window_lookup_for_display (GdkDisplay *display, 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.
display : | the GdkDisplay corresponding to the window handle |
anid : | a native window handle. |
Returns : | the GdkWindow wrapper for the native window, or NULL if there is none. |
Since 2.2
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.
anid : | a native pixmap handle. |
Returns : | the GdkWindow wrapper for the native window, or NULL if there is none. |
GdkPixmap* gdk_pixmap_lookup_for_display (GdkDisplay *display, 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.
display : | the GdkDisplay associated with anid |
anid : | a native pixmap handle. |
Returns : | the GdkPixmap wrapper for the native pixmap, or NULL if there is none. |
Since 2.2
#define gdk_font_lookup(xid) ((GdkFont*) gdk_xid_table_lookup (xid))
gdk_font_lookup is deprecated and should not be used in newly-written code.
Obtains the GdkFont for the given Xlib font ID, or NULL if no GdkFont has been created for xid.
xid : |
#define gdk_font_lookup_for_display(display, xid) ((GdkFont*) gdk_xid_table_lookup_for_display (display, xid))
gdk_font_lookup_for_display is deprecated and should not be used in newly-written code.
Obtains the GdkFont for the given Xlib font ID on display, or NULL if no GdkFont has been created for xid.
display : | a GdkDisplay |
xid : | an Xlib font ID Since: 2.2 |
GdkDisplay* gdk_x11_lookup_xdisplay (Display *xdisplay);
Find the GdkDisplay corresponding to display, if any exists.
xdisplay : | a pointer to an X Display |
Returns : | the GdkDisplay, if found, otherwise NULL. |
Since 2.2
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 for the default screen supports a certain hint from the Extended Window Manager Hints Specification. See gdk_x11_screen_supports_net_wm_hint() for complete details.
property : | a property atom. |
Returns : | TRUE if the window manager supports property |
gboolean gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen, 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_x11_screen_supports_net_wm_hint() will return FALSE for every property. You can monitor the window_manager_changed signal on GdkScreen to detect a window manager change.
screen : | the relevant GdkScreen. |
property : | a property atom. |
Returns : | TRUE if the window manager supports property |
Since 2.2
const char* gdk_x11_screen_get_window_manager_name (GdkScreen *screen);
Returns the name of the window manager for screen.
screen : | a GdkScreen |
Returns : | the name of the window manager screen screen, or "unknown" if the window manager is unknown. The string is owned by GDK and should not be freed. |
Since 2.2
GdkVisual* gdk_x11_screen_lookup_visual (GdkScreen *screen, VisualID xvisualid);
Looks up the GdkVisual for a particular screen and X Visual ID.
screen : | a GdkScreen. |
xvisualid : | an X Visual ID. |
Returns : | the GdkVisual (owned by the screen object), or NULL if the visual ID wasn't found. |
Since 2.2
GdkColormap* gdk_x11_colormap_foreign_new (GdkVisual *visual, Colormap xcolormap);
If xcolormap refers to a colormap previously known to GTK+, returns a new reference to the existing GdkColormap object, otherwise creates a new GdkColormap object and returns that
visual : | a GdkVisual |
xcolormap : | The XID of a colormap with visual visual |
Returns : | the GdkColormap object for xcolormap. Free with g_object_unref(). Note that for colormap created with gdk_x11_colormap_foreign_new(), unref'ing the last reference to the object will only free the GdkColoramp object and not call XFreeColormap() |
Since 2.2
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 : | an Xlib Cursor. |
Display* gdk_x11_cursor_get_xdisplay (GdkCursor *cursor);
Returns the display of a GdkCursor.
cursor : | a GdkCursor. |
Returns : | an Xlib Display*. |
Display* gdk_x11_display_get_xdisplay (GdkDisplay *display);
Returns the X display of a GdkDisplay.
display : | a GdkDisplay |
Returns : | an X display. |
Since 2.2
void gdk_x11_display_grab (GdkDisplay *display);
Call XGrabServer() on display. To ungrab the display again, use gdk_x11_display_ungrab().
gdk_x11_display_grab()/gdk_x11_display_ungrab() calls can be nested.
display : | a GdkDisplay |
Since 2.2
void gdk_x11_display_ungrab (GdkDisplay *display);
Ungrab display after it has been grabbed with gdk_x11_display_grab().
display : | a GdkDisplay |
Since 2.2
void gdk_x11_register_standard_event_type (GdkDisplay *display, gint event_base, gint n_events);
Registers interest in receiving extension events with type codes between event_base and event_base + n_events - 1. 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).
If an event type is registered, events of this type will go through global and window-specific filters (see gdk_window_add_filter()). Unregistered events will only go through global filters. GDK may register the events of some X extensions on its own.
This function should only be needed in unusual circumstances, e.g. when filtering XInput extension events on the root window.
display : | a GdkDisplay |
event_base : | first event type code to register |
n_events : | number of event type codes to register |
Since 2.4
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 drawable's X resource. |
G_CONST_RETURN char* gdk_x11_font_get_name (GdkFont *font);
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);
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);
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 or the DISPLAY environment variable when 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 gdk_x11_display_grab() 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 : | a GdkImage. |
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*. |
int gdk_x11_screen_get_screen_number (GdkScreen *screen);
Returns the index of a GdkScreen.
screen : | a GdkScreen. |
Returns : | the position of screen among the screens of its display. |
Since 2.2
Screen* gdk_x11_screen_get_xscreen (GdkScreen *screen);
Returns the screen of a GdkScreen.
screen : | a GdkScreen. |
Returns : | an Xlib Screen* |
Since 2.2
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. |
Atom gdk_x11_atom_to_xatom_for_display (GdkDisplay *display, GdkAtom atom);
Converts from a GdkAtom to the X atom for a GdkDisplay with the same string value.
display : | A GdkDisplay |
atom : | A GdkAtom |
Returns : | the X atom corresponding to atom. |
Since 2.2
GdkAtom gdk_x11_xatom_to_atom (Atom xatom);
Convert 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. |
GdkAtom gdk_x11_xatom_to_atom_for_display (GdkDisplay *display, Atom xatom);
Convert from an X atom for a GdkDisplay to the corresponding GdkAtom.
display : | A GdkDisplay |
xatom : | an X atom |
Returns : | the corresponding GdkAtom. |
Since 2.2
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. |
Atom gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display, const gchar *atom_name);
Returns the X atom for a GdkDisplay 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.
display : | a GdkDisplay |
atom_name : | a string |
Returns : | a X atom for a GdkDisplay |
Since 2.2
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. |
G_CONST_RETURN gchar* gdk_x11_get_xatom_name_for_display (GdkDisplay *display, Atom xatom);
Returns the name of an X atom for its 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.
display : | the GdkDisplay where xatom is defined |
xatom : | an X atom |
Returns : | name of the X atom; this string is owned by GDK, so it shouldn't be modifed or freed. |
Since 2.2
<< Pango Interaction | Index >> |