File indexing completed on 2025-01-18 10:14:41
0001 #ifndef __XCB_AUX_H__
0002 #define __XCB_AUX_H__
0003
0004
0005 #ifdef __cplusplus
0006 extern "C" {
0007 #endif
0008
0009
0010 uint8_t xcb_aux_get_depth (xcb_connection_t *c,
0011 xcb_screen_t *screen);
0012
0013 uint8_t xcb_aux_get_depth_of_visual (xcb_screen_t *screen,
0014 xcb_visualid_t id);
0015
0016 xcb_screen_t *xcb_aux_get_screen (xcb_connection_t *c,
0017 int screen);
0018
0019 xcb_visualtype_t *xcb_aux_get_visualtype (xcb_connection_t *c,
0020 int screen,
0021 xcb_visualid_t vid);
0022
0023 xcb_visualtype_t *
0024 xcb_aux_find_visual_by_id (xcb_screen_t *screen,
0025 xcb_visualid_t id);
0026
0027 xcb_visualtype_t *
0028 xcb_aux_find_visual_by_attrs (xcb_screen_t *screen,
0029 int8_t class_,
0030 int8_t depth);
0031
0032 void xcb_aux_sync (xcb_connection_t *c);
0033
0034
0035
0036
0037 #define XCB_AUX_INTERNAL_OFFSETOF(paramsp, param) \
0038 ((uint32_t const*)(&((paramsp)->param))-(uint32_t const*)(paramsp))
0039
0040
0041
0042
0043
0044
0045
0046
0047 #define XCB_AUX_ADD_PARAM(maskp, paramsp, param, value) \
0048 ((*(maskp)|=1<<XCB_AUX_INTERNAL_OFFSETOF((paramsp),param)), \
0049 ((paramsp)->param=(value)))
0050
0051 typedef struct {
0052 uint32_t back_pixmap;
0053 uint32_t back_pixel;
0054 uint32_t border_pixmap;
0055 uint32_t border_pixel;
0056 uint32_t bit_gravity;
0057 uint32_t win_gravity;
0058 uint32_t backing_store;
0059 uint32_t backing_planes;
0060 uint32_t backing_pixel;
0061 uint32_t override_redirect;
0062 uint32_t save_under;
0063 uint32_t event_mask;
0064 uint32_t dont_propagate;
0065 uint32_t colormap;
0066 uint32_t cursor;
0067 } xcb_params_cw_t;
0068
0069 xcb_void_cookie_t
0070 xcb_aux_create_window (xcb_connection_t *c,
0071 uint8_t depth,
0072 xcb_window_t wid,
0073 xcb_window_t parent,
0074 int16_t x,
0075 int16_t y,
0076 uint16_t width,
0077 uint16_t height,
0078 uint16_t border_width,
0079 uint16_t class_,
0080 xcb_visualid_t visual,
0081 uint32_t mask,
0082 const xcb_params_cw_t *params);
0083
0084 xcb_void_cookie_t
0085 xcb_aux_create_window_checked (xcb_connection_t *c,
0086 uint8_t depth,
0087 xcb_window_t wid,
0088 xcb_window_t parent,
0089 int16_t x,
0090 int16_t y,
0091 uint16_t width,
0092 uint16_t height,
0093 uint16_t border_width,
0094 uint16_t class_,
0095 xcb_visualid_t visual,
0096 uint32_t mask,
0097 const xcb_params_cw_t *params);
0098
0099 xcb_void_cookie_t
0100 xcb_aux_change_window_attributes (xcb_connection_t *c,
0101 xcb_window_t window,
0102 uint32_t mask,
0103 const xcb_params_cw_t *params);
0104
0105 xcb_void_cookie_t
0106 xcb_aux_change_window_attributes_checked (xcb_connection_t *c,
0107 xcb_window_t window,
0108 uint32_t mask,
0109 const xcb_params_cw_t *params);
0110
0111 typedef struct {
0112 int32_t x;
0113 int32_t y;
0114 uint32_t width;
0115 uint32_t height;
0116 uint32_t border_width;
0117 uint32_t sibling;
0118 uint32_t stack_mode;
0119 } xcb_params_configure_window_t;
0120
0121 xcb_void_cookie_t
0122 xcb_aux_configure_window (xcb_connection_t *c,
0123 xcb_window_t window,
0124 uint16_t mask,
0125 const xcb_params_configure_window_t *params);
0126
0127 typedef struct {
0128 uint32_t function;
0129 uint32_t plane_mask;
0130 uint32_t foreground;
0131 uint32_t background;
0132 uint32_t line_width;
0133 uint32_t line_style;
0134 uint32_t cap_style;
0135 uint32_t join_style;
0136 uint32_t fill_style;
0137 uint32_t fill_rule;
0138 uint32_t tile;
0139 uint32_t stipple;
0140 uint32_t tile_stipple_origin_x;
0141 uint32_t tile_stipple_origin_y;
0142 uint32_t font;
0143 uint32_t subwindow_mode;
0144 uint32_t graphics_exposures;
0145 uint32_t clip_originX;
0146 uint32_t clip_originY;
0147 uint32_t mask;
0148 uint32_t dash_offset;
0149 uint32_t dash_list;
0150 uint32_t arc_mode;
0151 } xcb_params_gc_t;
0152
0153 xcb_void_cookie_t
0154 xcb_aux_create_gc (xcb_connection_t *c,
0155 xcb_gcontext_t cid,
0156 xcb_drawable_t drawable,
0157 uint32_t mask,
0158 const xcb_params_gc_t *params);
0159
0160 xcb_void_cookie_t
0161 xcb_aux_create_gc_checked (xcb_connection_t *c,
0162 xcb_gcontext_t gid,
0163 xcb_drawable_t drawable,
0164 uint32_t mask,
0165 const xcb_params_gc_t *params);
0166 xcb_void_cookie_t
0167 xcb_aux_change_gc (xcb_connection_t *c,
0168 xcb_gcontext_t gc,
0169 uint32_t mask,
0170 const xcb_params_gc_t *params);
0171
0172 xcb_void_cookie_t
0173 xcb_aux_change_gc_checked (xcb_connection_t *c,
0174 xcb_gcontext_t gc,
0175 uint32_t mask,
0176 const xcb_params_gc_t *params);
0177 typedef struct {
0178 uint32_t key_click_percent;
0179 uint32_t bell_percent;
0180 uint32_t bell_pitch;
0181 uint32_t bell_duration;
0182 uint32_t led;
0183 uint32_t led_mode;
0184 uint32_t key;
0185 uint32_t auto_repeat_mode;
0186 } xcb_params_keyboard_t;
0187
0188 xcb_void_cookie_t
0189 xcb_aux_change_keyboard_control (xcb_connection_t *c,
0190 uint32_t mask,
0191 const xcb_params_keyboard_t *params);
0192
0193 int
0194 xcb_aux_parse_color(const char *color_name,
0195 uint16_t *red, uint16_t *green, uint16_t *blue);
0196
0197 xcb_void_cookie_t
0198 xcb_aux_set_line_attributes_checked (xcb_connection_t *dpy,
0199 xcb_gcontext_t gc,
0200 uint16_t linewidth,
0201 int32_t linestyle,
0202 int32_t capstyle,
0203 int32_t joinstyle);
0204
0205 xcb_void_cookie_t
0206 xcb_aux_clear_window(xcb_connection_t * dpy,
0207 xcb_window_t w);
0208
0209 #ifdef __cplusplus
0210 }
0211 #endif
0212
0213
0214 #endif