Home | History | Annotate | Line # | Download | only in atom
      1 #ifndef __XCB_ATOM_H__
      2 #define __XCB_ATOM_H__
      3 
      4 #include <xcb/xcb.h>
      5 
      6 #ifdef __cplusplus
      7 extern "C" {
      8 #endif
      9 
     10 enum xcb_atom_fast_tag_t {
     11 	TAG_COOKIE,
     12 	TAG_VALUE
     13 };
     14 typedef struct {
     15 	enum xcb_atom_fast_tag_t tag;
     16 	union {
     17 		xcb_intern_atom_cookie_t cookie;
     18 		xcb_atom_t atom;
     19 	} u;
     20 } xcb_atom_fast_cookie_t;
     21 
     22 /**
     23  * @brief Get an atom synchronously.
     24  * @param connection The connection to the X server.
     25  * @param atom_name The name of the atom that should be returned.
     26  * @return The requested atom, or XCB_NONE if there is an error.
     27  *
     28  * xcb_atom_get() is essentially a synchronous version of xcb_intern_atom(),
     29  * use it only on non-performance critical execution paths.
     30  */
     31 xcb_atom_t xcb_atom_get(xcb_connection_t *connection, const char *atom_name);
     32 xcb_atom_t xcb_atom_get_predefined(uint16_t name_len, const char *name);
     33 xcb_atom_fast_cookie_t xcb_atom_get_fast(xcb_connection_t *c, uint8_t only_if_exists, uint16_t name_len, const char *name);
     34 xcb_atom_t xcb_atom_get_fast_reply(xcb_connection_t *c, xcb_atom_fast_cookie_t cookie, xcb_generic_error_t **e);
     35 
     36 const char *xcb_atom_get_name_predefined(xcb_atom_t atom);
     37 int xcb_atom_get_name(xcb_connection_t *c, xcb_atom_t atom, const char **namep, int *lengthp);
     38 
     39 char *xcb_atom_name_by_screen(const char *base, uint8_t screen);
     40 char *xcb_atom_name_by_resource(const char *base, uint32_t resource);
     41 char *xcb_atom_name_unique(const char *base, uint32_t id);
     42 
     43 extern const xcb_atom_t PRIMARY;
     44 extern const xcb_atom_t SECONDARY;
     45 extern const xcb_atom_t ARC;
     46 extern const xcb_atom_t ATOM;
     47 extern const xcb_atom_t BITMAP;
     48 extern const xcb_atom_t CARDINAL;
     49 extern const xcb_atom_t COLORMAP;
     50 extern const xcb_atom_t CURSOR;
     51 extern const xcb_atom_t CUT_BUFFER0;
     52 extern const xcb_atom_t CUT_BUFFER1;
     53 extern const xcb_atom_t CUT_BUFFER2;
     54 extern const xcb_atom_t CUT_BUFFER3;
     55 extern const xcb_atom_t CUT_BUFFER4;
     56 extern const xcb_atom_t CUT_BUFFER5;
     57 extern const xcb_atom_t CUT_BUFFER6;
     58 extern const xcb_atom_t CUT_BUFFER7;
     59 extern const xcb_atom_t DRAWABLE;
     60 extern const xcb_atom_t FONT;
     61 extern const xcb_atom_t INTEGER;
     62 extern const xcb_atom_t PIXMAP;
     63 extern const xcb_atom_t POINT;
     64 extern const xcb_atom_t RECTANGLE;
     65 extern const xcb_atom_t RESOURCE_MANAGER;
     66 extern const xcb_atom_t RGB_COLOR_MAP;
     67 extern const xcb_atom_t RGB_BEST_MAP;
     68 extern const xcb_atom_t RGB_BLUE_MAP;
     69 extern const xcb_atom_t RGB_DEFAULT_MAP;
     70 extern const xcb_atom_t RGB_GRAY_MAP;
     71 extern const xcb_atom_t RGB_GREEN_MAP;
     72 extern const xcb_atom_t RGB_RED_MAP;
     73 extern const xcb_atom_t STRING;
     74 extern const xcb_atom_t VISUALID;
     75 extern const xcb_atom_t WINDOW;
     76 extern const xcb_atom_t WM_COMMAND;
     77 extern const xcb_atom_t WM_HINTS;
     78 extern const xcb_atom_t WM_CLIENT_MACHINE;
     79 extern const xcb_atom_t WM_ICON_NAME;
     80 extern const xcb_atom_t WM_ICON_SIZE;
     81 extern const xcb_atom_t WM_NAME;
     82 extern const xcb_atom_t WM_NORMAL_HINTS;
     83 extern const xcb_atom_t WM_SIZE_HINTS;
     84 extern const xcb_atom_t WM_ZOOM_HINTS;
     85 extern const xcb_atom_t MIN_SPACE;
     86 extern const xcb_atom_t NORM_SPACE;
     87 extern const xcb_atom_t MAX_SPACE;
     88 extern const xcb_atom_t END_SPACE;
     89 extern const xcb_atom_t SUPERSCRIPT_X;
     90 extern const xcb_atom_t SUPERSCRIPT_Y;
     91 extern const xcb_atom_t SUBSCRIPT_X;
     92 extern const xcb_atom_t SUBSCRIPT_Y;
     93 extern const xcb_atom_t UNDERLINE_POSITION;
     94 extern const xcb_atom_t UNDERLINE_THICKNESS;
     95 extern const xcb_atom_t STRIKEOUT_ASCENT;
     96 extern const xcb_atom_t STRIKEOUT_DESCENT;
     97 extern const xcb_atom_t ITALIC_ANGLE;
     98 extern const xcb_atom_t X_HEIGHT;
     99 extern const xcb_atom_t QUAD_WIDTH;
    100 extern const xcb_atom_t WEIGHT;
    101 extern const xcb_atom_t POINT_SIZE;
    102 extern const xcb_atom_t RESOLUTION;
    103 extern const xcb_atom_t COPYRIGHT;
    104 extern const xcb_atom_t NOTICE;
    105 extern const xcb_atom_t FONT_NAME;
    106 extern const xcb_atom_t FAMILY_NAME;
    107 extern const xcb_atom_t FULL_NAME;
    108 extern const xcb_atom_t CAP_HEIGHT;
    109 extern const xcb_atom_t WM_CLASS;
    110 extern const xcb_atom_t WM_TRANSIENT_FOR;
    111 
    112 #ifdef __cplusplus
    113 }
    114 #endif
    115 
    116 #endif /* __XCB_ATOM_H__ */
    117