summaryrefslogtreecommitdiff
path: root/icccm
diff options
context:
space:
mode:
authorTORRI Vincent <torri@alf94-3-82-66-248-160.fbx.proxad.net>2007-04-06 17:54:52 +0200
committerTORRI Vincent <torri@alf94-3-82-66-248-160.fbx.proxad.net>2007-04-06 17:54:52 +0200
commitbcd43a037f489dcad787c435e13a1c0d48cce9ea (patch)
tree05fb4459c138c4da2691bcdf9e6777e3a577af5e /icccm
parent252a23ab53801912589d95c44649f9200f2b41ed (diff)
event/events.c
event/xcb_event.h icccm/icccm.c icccm/xcb_icccm.h property/prop.c property/xcb_property.h wm/manage.c wm/xcb_wm.h wm/xcbwm-test.c xcb namespace added, _t sufix added for some types, formatting
Diffstat (limited to 'icccm')
-rw-r--r--icccm/icccm.c502
-rw-r--r--icccm/xcb_icccm.h410
2 files changed, 456 insertions, 456 deletions
diff --git a/icccm/icccm.c b/icccm/icccm.c
index 969d8aa..7c51bdd 100644
--- a/icccm/icccm.c
+++ b/icccm/icccm.c
@@ -5,18 +5,18 @@
static int
-get_text_property(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t property,
- uint8_t *format,
- xcb_atom_t *encoding,
- uint32_t *name_len,
- char **name)
+xcb_get_text_property(xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_atom_t property,
+ uint8_t *format,
+ xcb_atom_t *encoding,
+ uint32_t *name_len,
+ char **name)
{
xcb_get_property_cookie_t cookie;
xcb_get_property_reply_t *reply;
- cookie = get_any_property(c, 0, window, property, 128);
+ cookie = xcb_get_any_property(c, 0, window, property, 128);
reply = xcb_get_property_reply(c, cookie, 0);
if(!reply)
return 0;
@@ -39,97 +39,97 @@ get_text_property(xcb_connection_t *c,
/* WM_NAME */
void
-set_wm_name (xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t encoding,
- uint32_t name_len,
- const char *name)
+xcb_set_wm_name (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_atom_t encoding,
+ uint32_t name_len,
+ const char *name)
{
xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, WM_NAME, encoding, 8, name_len, name);
}
int
-get_wm_name (xcb_connection_t *c,
- xcb_window_t window,
- uint8_t *format,
- xcb_atom_t *encoding,
- uint32_t *name_len,
- char **name)
+xcb_get_wm_name (xcb_connection_t *c,
+ xcb_window_t window,
+ uint8_t *format,
+ xcb_atom_t *encoding,
+ uint32_t *name_len,
+ char **name)
{
- return get_text_property(c, window, WM_NAME, format, encoding, name_len, name);
+ return xcb_get_text_property(c, window, WM_NAME, format, encoding, name_len, name);
}
void
-watch_wm_name (property_handlers_t *prophs,
- uint32_t long_len,
- generic_property_handler handler,
- void *data)
+xcb_watch_wm_name (xcb_property_handlers_t *prophs,
+ uint32_t long_len,
+ xcb_generic_property_handler_t handler,
+ void *data)
{
- set_property_handler(prophs, WM_NAME, long_len, handler, data);
+ xcb_set_property_handler(prophs, WM_NAME, long_len, handler, data);
}
/* WM_ICON_NAME */
void
-set_wm_icon_name (xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t encoding,
- uint32_t name_len,
- const char *name)
+xcb_set_wm_icon_name (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_atom_t encoding,
+ uint32_t name_len,
+ const char *name)
{
xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, WM_ICON_NAME, encoding, 8, name_len, name);
}
int
-get_wm_icon_name (xcb_connection_t *c,
- xcb_window_t window,
- uint8_t *format,
- xcb_atom_t *encoding,
- uint32_t *name_len,
- char **name)
+xcb_get_wm_icon_name (xcb_connection_t *c,
+ xcb_window_t window,
+ uint8_t *format,
+ xcb_atom_t *encoding,
+ uint32_t *name_len,
+ char **name)
{
- return get_text_property(c, window, WM_ICON_NAME, format, encoding, name_len, name);
+ return xcb_get_text_property(c, window, WM_ICON_NAME, format, encoding, name_len, name);
}
void
-watch_wm_icon_name (property_handlers_t *prophs,
- uint32_t long_len,
- generic_property_handler handler,
- void *data)
+xcb_watch_wm_icon_name (xcb_property_handlers_t *prophs,
+ uint32_t long_len,
+ xcb_generic_property_handler_t handler,
+ void *data)
{
- set_property_handler(prophs, WM_ICON_NAME, long_len, handler, data);
+ xcb_set_property_handler(prophs, WM_ICON_NAME, long_len, handler, data);
}
/* WM_CLIENT_MACHINE */
void
-set_wm_client_machine (xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t encoding,
- uint32_t name_len,
- const char *name)
+xcb_set_wm_client_machine (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_atom_t encoding,
+ uint32_t name_len,
+ const char *name)
{
xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, WM_CLIENT_MACHINE, encoding, 8, name_len, name);
}
int
-get_wm_client_machine (xcb_connection_t *c,
- xcb_window_t window,
- uint8_t *format,
- xcb_atom_t *encoding,
- uint32_t *name_len,
- char **name)
+xcb_get_wm_client_machine (xcb_connection_t *c,
+ xcb_window_t window,
+ uint8_t *format,
+ xcb_atom_t *encoding,
+ uint32_t *name_len,
+ char **name)
{
- return get_text_property(c, window, WM_CLIENT_MACHINE, format, encoding, name_len, name);
+ return xcb_get_text_property(c, window, WM_CLIENT_MACHINE, format, encoding, name_len, name);
}
void
-watch_wm_client_machine (property_handlers_t *prophs,
- uint32_t long_len,
- generic_property_handler handler,
- void *data)
+xcb_watch_wm_client_machine (xcb_property_handlers_t *prophs,
+ uint32_t long_len,
+ xcb_generic_property_handler_t handler,
+ void *data)
{
- set_property_handler(prophs, WM_CLIENT_MACHINE, long_len, handler, data);
+ xcb_set_property_handler(prophs, WM_CLIENT_MACHINE, long_len, handler, data);
}
/* WM_SIZE_HINTS */
@@ -145,9 +145,9 @@ typedef enum {
PAspect = 1 << 7,
PBaseSize = 1 << 8,
PWinGravity = 1 << 9
-} SizeHintsFlags;
+} xcb_size_hints_flags_t;
-struct size_hints_t {
+struct xcb_size_hints_t {
uint32_t flags;
int32_t x, y, width, height;
int32_t min_width, min_height;
@@ -159,227 +159,227 @@ struct size_hints_t {
uint32_t win_gravity;
};
-size_hints_t *
-alloc_size_hints()
+xcb_size_hints_t *
+xcb_alloc_size_hints()
{
- return calloc(1, sizeof(size_hints_t));
+ return calloc(1, sizeof(xcb_size_hints_t));
}
void
-free_size_hints(size_hints_t *hints)
+xcb_free_size_hints(xcb_size_hints_t *hints)
{
free(hints);
}
void
-size_hints_get_position (size_hints_t *hints,
- int32_t *x,
- int32_t *y)
+xcb_size_hints_get_position (xcb_size_hints_t *hints,
+ int32_t *x,
+ int32_t *y)
{
*x = hints->x;
*y = hints->y;
}
void
-size_hints_get_size (size_hints_t *hints,
- int32_t *width,
- int32_t *height)
+xcb_size_hints_get_size (xcb_size_hints_t *hints,
+ int32_t *width,
+ int32_t *height)
{
*width = hints->width;
*height = hints->height;
}
void
-size_hints_get_min_size (size_hints_t *hints,
- int32_t *min_width,
- int32_t *min_height)
+xcb_size_hints_get_min_size (xcb_size_hints_t *hints,
+ int32_t *min_width,
+ int32_t *min_height)
{
*min_width = hints->min_width;
*min_height = hints->min_height;
}
void
-size_hints_get_max_size (size_hints_t *hints,
- int32_t *max_width,
- int32_t *max_height)
+xcb_size_hints_get_max_size (xcb_size_hints_t *hints,
+ int32_t *max_width,
+ int32_t *max_height)
{
*max_width = hints->max_width;
*max_height = hints->max_height;
}
void
-size_hints_get_increase (size_hints_t *hints,
- int32_t *width_inc,
- int32_t *height_inc)
+xcb_size_hints_get_increase (xcb_size_hints_t *hints,
+ int32_t *width_inc,
+ int32_t *height_inc)
{
*width_inc = hints->width_inc;
*height_inc = hints->height_inc;
}
void
-size_hints_get_min_aspect (size_hints_t *hints,
- int32_t *min_aspect_num,
- int32_t *min_aspect_den)
+xcb_size_hints_get_min_aspect (xcb_size_hints_t *hints,
+ int32_t *min_aspect_num,
+ int32_t *min_aspect_den)
{
*min_aspect_num = hints->min_aspect_num;
*min_aspect_den = hints->min_aspect_den;
}
void
-size_hints_get_max_aspect (size_hints_t *hints,
- int32_t *max_aspect_num,
- int32_t *max_aspect_den)
+xcb_size_hints_get_max_aspect (xcb_size_hints_t *hints,
+ int32_t *max_aspect_num,
+ int32_t *max_aspect_den)
{
*max_aspect_num = hints->max_aspect_num;
*max_aspect_den = hints->max_aspect_den;
}
void
-size_hints_get_base_size (size_hints_t *hints,
- int32_t *base_width,
- int32_t *base_height)
+xcb_size_hints_get_base_size (xcb_size_hints_t *hints,
+ int32_t *base_width,
+ int32_t *base_height)
{
*base_width = hints->base_width;
*base_height = hints->base_height;
}
uint32_t
-size_hints_get_win_gravity (size_hints_t *hints)
+xcb_size_hints_get_win_gravity (xcb_size_hints_t *hints)
{
return hints->win_gravity;
}
uint8_t
-size_hints_is_us_position (size_hints_t *hints)
+xcb_size_hints_is_us_position (xcb_size_hints_t *hints)
{
return (hints->flags & USPosition);
}
uint8_t
-size_hints_is_us_size (size_hints_t *hints)
+xcb_size_hints_is_us_size (xcb_size_hints_t *hints)
{
return (hints->flags & USSize);
}
uint8_t
-size_hints_is_p_position (size_hints_t *hints)
+xcb_size_hints_is_p_position (xcb_size_hints_t *hints)
{
return (hints->flags & PPosition);
}
uint8_t
-size_hints_is_p_size (size_hints_t *hints)
+xcb_size_hints_is_p_size (xcb_size_hints_t *hints)
{
return (hints->flags & PSize);
}
uint8_t
-size_hints_is_p_min_size (size_hints_t *hints)
+xcb_size_hints_is_p_min_size (xcb_size_hints_t *hints)
{
return (hints->flags & PMinSize);
}
uint8_t
-size_hints_is_p_max_size (size_hints_t *hints)
+xcb_size_hints_is_p_max_size (xcb_size_hints_t *hints)
{
return (hints->flags & PMaxSize);
}
uint8_t
-size_hints_is_p_resize_inc (size_hints_t *hints)
+xcb_size_hints_is_p_resize_inc (xcb_size_hints_t *hints)
{
return (hints->flags & PResizeInc);
}
uint8_t
-size_hints_is_p_aspect (size_hints_t *hints)
+xcb_size_hints_is_p_aspect (xcb_size_hints_t *hints)
{
return (hints->flags & PAspect);
}
uint8_t
-size_hints_is_p_base_size (size_hints_t *hints)
+xcb_size_hints_is_p_base_size (xcb_size_hints_t *hints)
{
return (hints->flags & PBaseSize);
}
uint8_t
-size_hints_is_p_win_gravity (size_hints_t *hints)
+xcb_size_hints_is_p_win_gravity (xcb_size_hints_t *hints)
{
return (hints->flags & PWinGravity);
}
void
-size_hints_set_flag_none (size_hints_t *hints)
+xcb_size_hints_set_flag_none (xcb_size_hints_t *hints)
{
hints->flags = 0;
}
void
-size_hints_set_flag_us_position (size_hints_t *hints)
+xcb_size_hints_set_flag_us_position (xcb_size_hints_t *hints)
{
hints->flags = USPosition;
}
void
-size_hints_set_flag_us_size (size_hints_t *hints)
+xcb_size_hints_set_flag_us_size (xcb_size_hints_t *hints)
{
hints->flags = USSize;
}
void
-size_hints_set_flag_p_position (size_hints_t *hints)
+xcb_size_hints_set_flag_p_position (xcb_size_hints_t *hints)
{
hints->flags = PPosition;
}
void
-size_hints_set_flag_p_size (size_hints_t *hints)
+xcb_size_hints_set_flag_p_size (xcb_size_hints_t *hints)
{
hints->flags = PSize;
}
void
-size_hints_set_flag_p_min_size (size_hints_t *hints)
+xcb_size_hints_set_flag_p_min_size (xcb_size_hints_t *hints)
{
hints->flags = PMinSize;
}
void
-size_hints_set_flag_p_max_size (size_hints_t *hints)
+xcb_size_hints_set_flag_p_max_size (xcb_size_hints_t *hints)
{
hints->flags = PMaxSize;
}
void
-size_hints_set_flag_p_resize_inc (size_hints_t *hints)
+xcb_size_hints_set_flag_p_resize_inc (xcb_size_hints_t *hints)
{
hints->flags = PResizeInc;
}
void
-size_hints_set_flag_p_aspect (size_hints_t *hints)
+xcb_size_hints_set_flag_p_aspect (xcb_size_hints_t *hints)
{
hints->flags = PAspect;
}
void
-size_hints_set_flag_p_base_size (size_hints_t *hints)
+xcb_size_hints_set_flag_p_base_size (xcb_size_hints_t *hints)
{
hints->flags = PBaseSize;
}
void
-size_hints_set_flag_p_win_gravity (size_hints_t *hints)
+xcb_size_hints_set_flag_p_win_gravity (xcb_size_hints_t *hints)
{
hints->flags = PWinGravity;
}
void
-size_hints_set_position (size_hints_t *hints,
- int user_specified,
- int32_t x,
- int32_t y)
+xcb_size_hints_set_position (xcb_size_hints_t *hints,
+ int user_specified,
+ int32_t x,
+ int32_t y)
{
hints->flags &= ~(USPosition | PPosition);
if (user_specified)
@@ -391,10 +391,10 @@ size_hints_set_position (size_hints_t *hints,
}
void
-size_hints_set_size (size_hints_t *hints,
- int user_specified,
- int32_t width,
- int32_t height)
+xcb_size_hints_set_size (xcb_size_hints_t *hints,
+ int user_specified,
+ int32_t width,
+ int32_t height)
{
hints->flags &= ~(USSize | PSize);
if (user_specified)
@@ -406,9 +406,9 @@ size_hints_set_size (size_hints_t *hints,
}
void
-size_hints_set_min_size (size_hints_t *hints,
- int32_t min_width,
- int32_t min_height)
+xcb_size_hints_set_min_size (xcb_size_hints_t *hints,
+ int32_t min_width,
+ int32_t min_height)
{
hints->flags |= PMinSize;
hints->min_width = min_width;
@@ -416,9 +416,9 @@ size_hints_set_min_size (size_hints_t *hints,
}
void
-size_hints_set_max_size (size_hints_t *hints,
- int32_t max_width,
- int32_t max_height)
+xcb_size_hints_set_max_size (xcb_size_hints_t *hints,
+ int32_t max_width,
+ int32_t max_height)
{
hints->flags |= PMaxSize;
hints->max_width = max_width;
@@ -426,9 +426,9 @@ size_hints_set_max_size (size_hints_t *hints,
}
void
-size_hints_set_resize_inc (size_hints_t *hints,
- int32_t width_inc,
- int32_t height_inc)
+xcb_size_hints_set_resize_inc (xcb_size_hints_t *hints,
+ int32_t width_inc,
+ int32_t height_inc)
{
hints->flags |= PResizeInc;
hints->width_inc = width_inc;
@@ -436,11 +436,11 @@ size_hints_set_resize_inc (size_hints_t *hints,
}
void
-size_hints_set_aspect (size_hints_t *hints,
- int32_t min_aspect_num,
- int32_t min_aspect_den,
- int32_t max_aspect_num,
- int32_t max_aspect_den)
+xcb_size_hints_set_aspect (xcb_size_hints_t *hints,
+ int32_t min_aspect_num,
+ int32_t min_aspect_den,
+ int32_t max_aspect_num,
+ int32_t max_aspect_den)
{
hints->flags |= PAspect;
hints->min_aspect_num = min_aspect_num;
@@ -450,9 +450,9 @@ size_hints_set_aspect (size_hints_t *hints,
}
void
-size_hints_set_base_size (size_hints_t *hints,
- int32_t base_width,
- int32_t base_height)
+xcb_size_hints_set_base_size (xcb_size_hints_t *hints,
+ int32_t base_width,
+ int32_t base_height)
{
hints->flags |= PBaseSize;
hints->base_width = base_width;
@@ -460,31 +460,31 @@ size_hints_set_base_size (size_hints_t *hints,
}
void
-size_hints_set_win_gravity (size_hints_t *hints,
- uint8_t win_gravity)
+xcb_size_hints_set_win_gravity (xcb_size_hints_t *hints,
+ uint8_t win_gravity)
{
hints->flags |= PWinGravity;
hints->win_gravity = win_gravity;
}
void
-set_wm_size_hints (xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t property,
- size_hints_t *hints)
+xcb_set_wm_size_hints (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_atom_t property,
+ xcb_size_hints_t *hints)
{
xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, property, WM_SIZE_HINTS, 32, sizeof(*hints) / 4, hints);
}
int
-get_wm_size_hints (xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t property,
- size_hints_t *hints,
- long *supplied)
+xcb_get_wm_size_hints (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_atom_t property,
+ xcb_size_hints_t *hints,
+ long *supplied)
{
xcb_get_property_cookie_t cookie;
- xcb_get_property_reply_t *rep;
+ xcb_get_property_reply_t *rep;
cookie = xcb_get_property (c, 0, window,
property, WM_SIZE_HINTS,
@@ -508,7 +508,7 @@ get_wm_size_hints (xcb_connection_t *c,
prop = (char *)malloc(sizeof(char)*length);
memcpy(prop, xcb_get_property_value (rep), length);
prop[length] = '\0';
- hints = (size_hints_t *)strdup (prop);
+ hints = (xcb_size_hints_t *)strdup (prop);
*supplied = (USPosition | USSize |
PPosition | PSize |
@@ -538,257 +538,257 @@ get_wm_size_hints (xcb_connection_t *c,
/* WM_NORMAL_HINTS */
void
-set_wm_normal_hints (xcb_connection_t *c,
- xcb_window_t window,
- size_hints_t *hints)
+xcb_set_wm_normal_hints (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_size_hints_t *hints)
{
- set_wm_size_hints(c, window, WM_NORMAL_HINTS, hints);
+ xcb_set_wm_size_hints(c, window, WM_NORMAL_HINTS, hints);
}
int
-get_wm_normal_hints (xcb_connection_t *c,
- xcb_window_t window,
- size_hints_t *hints,
- long *supplied)
+xcb_get_wm_normal_hints (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_size_hints_t *hints,
+ long *supplied)
{
- return (get_wm_size_hints (c, window, WM_NORMAL_HINTS, hints, supplied));
+ return (xcb_get_wm_size_hints (c, window, WM_NORMAL_HINTS, hints, supplied));
}
/* WM_HINTS */
-struct wm_hints_t {
- int32_t flags; /* marks which fields in this structure are defined */
+struct xcb_wm_hints_t {
+ int32_t flags; /* marks which fields in this structure are defined */
uint8_t input; /* does this application rely on the window manager
- to get keyboard input? */
- int32_t initial_state; /* see below */
+ to get keyboard input? */
+ int32_t initial_state; /* see below */
xcb_pixmap_t icon_pixmap; /* pixmap to be used as icon */
xcb_window_t icon_window; /* window to be used as icon */
- int32_t icon_x; /* initial position of icon */
- int32_t icon_y;
+ int32_t icon_x; /* initial position of icon */
+ int32_t icon_y;
xcb_pixmap_t icon_mask; /* icon mask bitmap */
xcb_window_t window_group; /* id of related window group */
/* this structure may be extended in the future */
};
typedef enum {
- xcb_wm_input_hint_t = (1L << 0),
- xcb_wm_state_hint_t = (1L << 1),
- xcb_wm_icon_pixmap_hint_t = (1L << 2),
- xcb_wm_icon_window_hint_t = (1L << 3),
- xcb_wm_icon_position_hint_t = (1L << 4),
- xcb_wm_icon_mask_hint_t = (1L << 5),
- xcb_wm_window_group_hint_t = (1L << 6),
- xcb_wmx_urgency_hint_t = (1L << 8)
+ XCB_WM_INPUT_HINT = (1L << 0),
+ XCB_WM_STATE_HINT = (1L << 1),
+ XCB_WM_ICON_PIXMAP_HINT = (1L << 2),
+ XCB_WM_ICON_WINDOW_HINT = (1L << 3),
+ XCB_WM_ICON_POSITION_HINT = (1L << 4),
+ XCB_WM_ICON_MASK_HINT = (1L << 5),
+ XCB_WM_WINDOW_GROUP_HINT = (1L << 6),
+ XCB_WM_X_URGENCY_HINT = (1L << 8)
} xcb_wm_t;
-#define xcb_wm_all_hints (InputHint | StateHint | IconPixmapHint | \
- IconWindowHint| IconPositionHint | IconMaskHint | \
- WindowGroupHint)
+#define XCB_WM_ALL_HINTS (XCB_WM_INPUT_HINT | XCB_WM_STATE_HINT | XCB_WM_ICON_PIXMAP_HINT | \
+ XCB_WM_ICON_WINDOW_HINT | XCB_WM_ICON_POSITION_HINT | XCB_WM_ICON_MASK_HINT | \
+ XCB_WM_WINDOW_GROUP_HINT)
-wm_hints_t *
-alloc_wm_hints()
+xcb_wm_hints_t *
+xcb_alloc_wm_hints()
{
- return calloc(1, sizeof(wm_hints_t));
+ return calloc(1, sizeof(xcb_wm_hints_t));
}
uint8_t
-wm_hints_get_input(wm_hints_t *hints)
+xcb_wm_hints_get_input(xcb_wm_hints_t *hints)
{
return hints->input;
}
xcb_pixmap_t
-wm_hints_get_icon_pixmap(wm_hints_t *hints)
+xcb_wm_hints_get_icon_pixmap(xcb_wm_hints_t *hints)
{
return hints->icon_pixmap;
}
xcb_pixmap_t
-wm_hints_get_icon_mask(wm_hints_t *hints)
+xcb_wm_hints_get_icon_mask(xcb_wm_hints_t *hints)
{
return hints->icon_mask;
}
xcb_window_t
-wm_hints_get_icon_window(wm_hints_t *hints)
+xcb_wm_hints_get_icon_window(xcb_wm_hints_t *hints)
{
return hints->icon_window;
}
xcb_window_t
-wm_hints_get_window_group(wm_hints_t *hints)
+xcb_wm_hints_get_window_group(xcb_wm_hints_t *hints)
{
return hints->window_group;
}
uint8_t
-wm_hints_is_input_hint(wm_hints_t *hints)
+xcb_wm_hints_is_input_hint(xcb_wm_hints_t *hints)
{
- return (hints->flags & xcb_wm_input_hint_t);
+ return (hints->flags & XCB_WM_INPUT_HINT);
}
uint8_t
-wm_hints_is_state_hint(wm_hints_t *hints)
+xcb_wm_hints_is_state_hint(xcb_wm_hints_t *hints)
{
- return (hints->flags & xcb_wm_state_hint_t);
+ return (hints->flags & XCB_WM_STATE_HINT);
}
uint8_t
-wm_hints_is_icon_pixmap_hint(wm_hints_t *hints)
+xcb_wm_hints_is_icon_pixmap_hint(xcb_wm_hints_t *hints)
{
- return (hints->flags & xcb_wm_icon_pixmap_hint_t);
+ return (hints->flags & XCB_WM_ICON_PIXMAP_HINT);
}
uint8_t
-wm_hints_is_icon_window_hint(wm_hints_t *hints)
+xcb_wm_hints_is_icon_window_hint(xcb_wm_hints_t *hints)
{
- return (hints->flags & xcb_wm_icon_window_hint_t);
+ return (hints->flags & XCB_WM_ICON_WINDOW_HINT);
}
uint8_t
-wm_hints_is_icon_position_hint(wm_hints_t *hints)
+xcb_wm_hints_is_icon_position_hint(xcb_wm_hints_t *hints)
{
- return (hints->flags & xcb_wm_icon_position_hint_t);
+ return (hints->flags & XCB_WM_ICON_POSITION_HINT);
}
uint8_t
-wm_hints_is_icon_mask_hint(wm_hints_t *hints)
+xcb_wm_hints_is_icon_mask_hint(xcb_wm_hints_t *hints)
{
- return (hints->flags & xcb_wm_icon_mask_hint_t);
+ return (hints->flags & XCB_WM_ICON_MASK_HINT);
}
uint8_t
-wm_hints_is_window_group_hint(wm_hints_t *hints)
+xcb_wm_hints_is_window_group_hint(xcb_wm_hints_t *hints)
{
- return (hints->flags & xcb_wm_window_group_hint_t);
+ return (hints->flags & XCB_WM_WINDOW_GROUP_HINT);
}
uint8_t
-wm_hints_is_xu_hint(wm_hints_t *hints)
+xcb_wm_hints_is_x_urgency_hint(xcb_wm_hints_t *hints)
{
- return (hints->flags & xcb_wmx_urgency_hint_t);
+ return (hints->flags & XCB_WM_X_URGENCY_HINT);
}
uint8_t
-wm_hints_state_is_withdrawn(wm_hints_t *hints)
+xcb_wm_hints_state_is_withdrawn(xcb_wm_hints_t *hints)
{
- return (hints->initial_state == xcb_wm_withdrawn_state_t);
+ return (hints->initial_state == XCB_WM_WITHDRAWN_STATE);
}
uint8_t
-wm_hints_state_is_normal(wm_hints_t *hints)
+xcb_wm_hints_state_is_normal(xcb_wm_hints_t *hints)
{
- return (hints->initial_state == xcb_wm_normal_state_t);
+ return (hints->initial_state == XCB_WM_NORMAL_STATE);
}
uint8_t
-wm_hints_state_is_iconic(wm_hints_t *hints)
+xcb_wm_hints_state_is_iconic(xcb_wm_hints_t *hints)
{
- return (hints->initial_state == xcb_wm_iconic_state_t);
+ return (hints->initial_state == XCB_WM_ICONIC_STATE);
}
void
-wm_hints_set_input(wm_hints_t *hints, uint8_t input)
+xcb_wm_hints_set_input(xcb_wm_hints_t *hints, uint8_t input)
{
hints->input = input;
- hints->flags |= xcb_wm_input_hint_t;
+ hints->flags |= XCB_WM_INPUT_HINT;
}
void
-wm_hints_set_iconic(wm_hints_t *hints)
+xcb_wm_hints_set_iconic(xcb_wm_hints_t *hints)
{
- hints->initial_state = xcb_wm_iconic_state_t;
- hints->flags |= xcb_wm_state_hint_t;
+ hints->initial_state = XCB_WM_ICONIC_STATE;
+ hints->flags |= XCB_WM_STATE_HINT;
}
void
-wm_hints_set_normal(wm_hints_t *hints)
+xcb_wm_hints_set_normal(xcb_wm_hints_t *hints)
{
- hints->initial_state = xcb_wm_normal_state_t;
- hints->flags |= xcb_wm_state_hint_t;
+ hints->initial_state = XCB_WM_NORMAL_STATE;
+ hints->flags |= XCB_WM_STATE_HINT;
}
void
-wm_hints_set_withdrawn(wm_hints_t *hints)
+xcb_wm_hints_set_withdrawn(xcb_wm_hints_t *hints)
{
- hints->initial_state = xcb_wm_withdrawn_state_t;
- hints->flags |= xcb_wm_state_hint_t;
+ hints->initial_state = XCB_WM_WITHDRAWN_STATE;
+ hints->flags |= XCB_WM_STATE_HINT;
}
void
-wm_hints_set_none(wm_hints_t *hints)
+xcb_wm_hints_set_none(xcb_wm_hints_t *hints)
{
- hints->flags &= ~xcb_wm_state_hint_t;
+ hints->flags &= ~XCB_WM_STATE_HINT;
}
void
-wm_hints_set_urgent(wm_hints_t *hints)
+xcb_wm_hints_set_urgent(xcb_wm_hints_t *hints)
{
- hints->flags |= xcb_wmx_urgency_hint_t;
+ hints->flags |= XCB_WM_X_URGENCY_HINT;
}
void
-wm_hints_set_icon_pixmap(wm_hints_t *hints, xcb_pixmap_t icon_pixmap)
+xcb_wm_hints_set_icon_pixmap(xcb_wm_hints_t *hints, xcb_pixmap_t icon_pixmap)
{
hints->icon_pixmap = icon_pixmap;
- hints->flags |= xcb_wm_icon_pixmap_hint_t;
+ hints->flags |= XCB_WM_ICON_PIXMAP_HINT;
}
void
-wm_hints_set_icon_mask(wm_hints_t *hints, xcb_pixmap_t icon_mask)
+xcb_wm_hints_set_icon_mask(xcb_wm_hints_t *hints, xcb_pixmap_t icon_mask)
{
hints->icon_mask = icon_mask;
- hints->flags |= xcb_wm_icon_mask_hint_t;
+ hints->flags |= XCB_WM_ICON_MASK_HINT;
}
void
-wm_hints_set_icon_window(wm_hints_t *hints, xcb_window_t icon_window)
+xcb_wm_hints_set_icon_window(xcb_wm_hints_t *hints, xcb_window_t icon_window)
{
hints->icon_window = icon_window;
- hints->flags |= xcb_wm_icon_window_hint_t;
+ hints->flags |= XCB_WM_ICON_WINDOW_HINT;
}
void
-wm_hints_set_window_group(wm_hints_t *hints, xcb_window_t window_group)
+xcb_wm_hints_set_window_group(xcb_wm_hints_t *hints, xcb_window_t window_group)
{
hints->window_group = window_group;
- hints->flags |= xcb_wm_window_group_hint_t;
+ hints->flags |= XCB_WM_WINDOW_GROUP_HINT;
}
void
-set_wm_hints (xcb_connection_t *c,
- xcb_window_t window,
- wm_hints_t *hints)
+xcb_set_wm_hints (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_wm_hints_t *hints)
{
xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, WM_HINTS, WM_HINTS, 32, sizeof(*hints) / 4, hints);
}
-wm_hints_t *
-get_wm_hints (xcb_connection_t *c,
- xcb_window_t window)
+xcb_wm_hints_t *
+xcb_get_wm_hints (xcb_connection_t *c,
+ xcb_window_t window)
{
xcb_get_property_cookie_t cookie;
- xcb_get_property_reply_t *rep;
- wm_hints_t *hints;
- char *prop;
- long length;
+ xcb_get_property_reply_t *rep;
+ xcb_wm_hints_t *hints;
+ char *prop;
+ long length;
cookie = xcb_get_property (c, 0, window,
WM_HINTS, WM_HINTS,
- 0L, NumWMHintsElements);
+ 0L, XCB_NUM_WM_HINTS_ELEMENTS);
rep = xcb_get_property_reply (c, cookie, 0);
if (!rep)
return NULL;
if ((rep->type != WM_HINTS) ||
- (rep->value_len < (NumWMHintsElements - 1)) ||
+ (rep->value_len < (XCB_NUM_WM_HINTS_ELEMENTS - 1)) ||
(rep->format != 32))
{
free (rep);
return NULL;
}
- hints = (wm_hints_t *)calloc (1, (unsigned)sizeof (wm_hints_t));
+ hints = (xcb_wm_hints_t *)calloc (1, (unsigned)sizeof (xcb_wm_hints_t));
if (!hints)
{
free (rep);
@@ -798,8 +798,8 @@ get_wm_hints (xcb_connection_t *c,
length = xcb_get_property_value_length (rep);
prop = (char *) xcb_get_property_value (rep);
prop[length] = '\0';
- hints = (wm_hints_t *)strdup (prop);
- if (rep->value_len < NumWMHintsElements)
+ hints = (xcb_wm_hints_t *)strdup (prop);
+ if (rep->value_len < XCB_NUM_WM_HINTS_ELEMENTS)
hints->window_group = XCB_NONE;
return hints;
@@ -808,10 +808,10 @@ get_wm_hints (xcb_connection_t *c,
/* WM_PROTOCOLS */
void
-set_wm_protocols (xcb_connection_t *c,
- xcb_window_t window,
- uint32_t list_len,
- xcb_atom_t *list)
+xcb_set_wm_protocols (xcb_connection_t *c,
+ xcb_window_t window,
+ uint32_t list_len,
+ xcb_atom_t *list)
{
intern_atom_fast_cookie_t proto;
xcb_atom_t WM_PROTOCOLS;
@@ -823,10 +823,10 @@ set_wm_protocols (xcb_connection_t *c,
}
int
-get_wm_protocols (xcb_connection_t *c,
- xcb_window_t window,
- uint32_t *list_len,
- xcb_atom_t **list)
+xcb_get_wm_protocols (xcb_connection_t *c,
+ xcb_window_t window,
+ uint32_t *list_len,
+ xcb_atom_t **list)
{
xcb_get_property_cookie_t cookie;
xcb_get_property_reply_t *rep;
diff --git a/icccm/xcb_icccm.h b/icccm/xcb_icccm.h
index 09e2e76..a8e7575 100644
--- a/icccm/xcb_icccm.h
+++ b/icccm/xcb_icccm.h
@@ -12,238 +12,238 @@ extern "C" {
/* WM_NAME */
-void set_wm_name (xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t encoding,
- uint32_t name_len,
- const char *name);
-
-int get_wm_name (xcb_connection_t *c,
- xcb_window_t window,
- uint8_t *format,
- xcb_atom_t *encoding,
- uint32_t *name_len,
- char **name);
-
-void watch_wm_name (property_handlers_t *prophs,
- uint32_t long_len,
- generic_property_handler handler,
- void *data);
+void xcb_set_wm_name (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_atom_t encoding,
+ uint32_t name_len,
+ const char *name);
+
+int xcb_get_wm_name (xcb_connection_t *c,
+ xcb_window_t window,
+ uint8_t *format,
+ xcb_atom_t *encoding,
+ uint32_t *name_len,
+ char **name);
+
+void xcb_watch_wm_name (xcb_property_handlers_t *prophs,
+ uint32_t long_len,
+ xcb_generic_property_handler_t handler,
+ void *data);
/* WM_ICON_NAME */
-void set_wm_icon_name (xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t encoding,
- uint32_t name_len,
- const char *name);
+void xcb_set_wm_icon_name (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_atom_t encoding,
+ uint32_t name_len,
+ const char *name);
-int get_wm_icon_name (xcb_connection_t *c,
- xcb_window_t window,
- uint8_t *format,
- xcb_atom_t *encoding,
- uint32_t *name_len,
- char **name);
+int xcb_get_wm_icon_name (xcb_connection_t *c,
+ xcb_window_t window,
+ uint8_t *format,
+ xcb_atom_t *encoding,
+ uint32_t *name_len,
+ char **name);
-void watch_wm_icon_name (property_handlers_t *prophs,
- uint32_t long_len,
- generic_property_handler handler,
- void *data);
+void xcb_watch_wm_icon_name (xcb_property_handlers_t *prophs,
+ uint32_t long_len,
+ xcb_generic_property_handler_t handler,
+ void *data);
/* WM_CLIENT_MACHINE */
-void set_wm_client_machine (xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t encoding,
- uint32_t name_len,
- const char *name);
+void xcb_set_wm_client_machine (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_atom_t encoding,
+ uint32_t name_len,
+ const char *name);
-int get_wm_client_machine (xcb_connection_t *c,
- xcb_window_t window,
- uint8_t *format,
- xcb_atom_t *encoding,
- uint32_t *name_len,
- char **name);
+int xcb_get_wm_client_machine (xcb_connection_t *c,
+ xcb_window_t window,
+ uint8_t *format,
+ xcb_atom_t *encoding,
+ uint32_t *name_len,
+ char **name);
-void watch_wm_client_machine (property_handlers_t *prophs,
- uint32_t long_len,
- generic_property_handler handler,
- void *data);
+void xcb_watch_wm_client_machine (xcb_property_handlers_t *prophs,
+ uint32_t long_len,
+ xcb_generic_property_handler_t handler,
+ void *data);
/* WM_SIZE_HINTS */
-typedef struct size_hints_t size_hints_t;
-
-size_hints_t *alloc_size_hints ();
-
-void free_size_hints (size_hints_t *hints);
-
-void size_hints_get_position (size_hints_t *hints,
- int32_t *x,
- int32_t *y);
-void size_hints_get_size (size_hints_t *hints,
- int32_t *width,
- int32_t *height);
-void size_hints_get_min_size (size_hints_t *hints,
- int32_t *min_width,
- int32_t *min_height);
-void size_hints_get_max_size (size_hints_t *hints,
- int32_t *max_width,
- int32_t *max_height);
-void size_hints_get_increase (size_hints_t *hints,
- int32_t *width_inc,
- int32_t *height_inc);
-void size_hints_get_min_aspect (size_hints_t *hints,
- int32_t *min_aspect_num,
- int32_t *min_aspect_den);
-void size_hints_get_max_aspect (size_hints_t *hints,
- int32_t *max_aspect_num,
- int32_t *max_aspect_den);
-void size_hints_get_base_size (size_hints_t *hints,
- int32_t *base_width,
- int32_t *base_height);
-uint32_t size_hints_get_win_gravity (size_hints_t *hints);
-
-uint8_t size_hints_is_us_position (size_hints_t *hints);
-uint8_t size_hints_is_us_size (size_hints_t *hints);
-uint8_t size_hints_is_p_position (size_hints_t *hints);
-uint8_t size_hints_is_p_size (size_hints_t *hints);
-uint8_t size_hints_is_p_min_size (size_hints_t *hints);
-uint8_t size_hints_is_p_max_size (size_hints_t *hints);
-uint8_t size_hints_is_p_resize_inc (size_hints_t *hints);
-uint8_t size_hints_is_p_aspect (size_hints_t *hints);
-uint8_t size_hints_is_p_base_size (size_hints_t *hints);
-uint8_t size_hints_is_p_win_gravity (size_hints_t *hints);
-
-void size_hints_set_flag_none (size_hints_t *hints);
-void size_hints_set_flag_us_position (size_hints_t *hints);
-void size_hints_set_flag_us_size (size_hints_t *hints);
-void size_hints_set_flag_p_position (size_hints_t *hints);
-void size_hints_set_flag_p_size (size_hints_t *hints);
-void size_hints_set_flag_p_min_size (size_hints_t *hints);
-void size_hints_set_flag_p_max_size (size_hints_t *hints);
-void size_hints_set_flag_p_resize_inc (size_hints_t *hints);
-void size_hints_set_flag_p_aspect (size_hints_t *hints);
-void size_hints_set_flag_p_base_size (size_hints_t *hints);
-void size_hints_set_flag_p_win_gravity (size_hints_t *hints);
-
-void size_hints_set_position (size_hints_t *hints,
- int user_specified,
- int32_t x,
- int32_t y);
-
-void size_hints_set_size (size_hints_t *hints,
- int user_specified,
- int32_t width,
- int32_t height);
-
-void size_hints_set_min_size (size_hints_t *hints,
- int32_t min_width,
- int32_t min_height);
-
-void size_hints_set_max_size (size_hints_t *hints,
- int32_t max_width,
- int32_t max_height);
-
-void size_hints_set_resize_inc (size_hints_t *hints,
- int32_t width_inc,
- int32_t height_inc);
-
-void size_hints_set_aspect (size_hints_t *hints,
- int32_t min_aspect_num,
- int32_t min_aspect_den,
- int32_t max_aspect_num,
- int32_t max_aspect_den);
-
-void size_hints_set_base_size (size_hints_t *hints,
- int32_t base_width,
- int32_t base_height);
-
-void size_hints_set_win_gravity (size_hints_t *hints,
- uint8_t win_gravity);
-
-void set_wm_size_hints (xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t property,
- size_hints_t *hints);
-
-int get_wm_size_hints (xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t property,
- size_hints_t *hints,
- long *supplied);
+typedef struct xcb_size_hints_t xcb_size_hints_t;
+
+xcb_size_hints_t *xcb_alloc_size_hints ();
+
+void xcb_free_size_hints (xcb_size_hints_t *hints);
+
+void xcb_size_hints_get_position (xcb_size_hints_t *hints,
+ int32_t *x,
+ int32_t *y);
+void xcb_size_hints_get_size (xcb_size_hints_t *hints,
+ int32_t *width,
+ int32_t *height);
+void xcb_size_hints_get_min_size (xcb_size_hints_t *hints,
+ int32_t *min_width,
+ int32_t *min_height);
+void xcb_size_hints_get_max_size (xcb_size_hints_t *hints,
+ int32_t *max_width,
+ int32_t *max_height);
+void xcb_size_hints_get_increase (xcb_size_hints_t *hints,
+ int32_t *width_inc,
+ int32_t *height_inc);
+void xcb_size_hints_get_min_aspect (xcb_size_hints_t *hints,
+ int32_t *min_aspect_num,
+ int32_t *min_aspect_den);
+void xcb_size_hints_get_max_aspect (xcb_size_hints_t *hints,
+ int32_t *max_aspect_num,
+ int32_t *max_aspect_den);
+void xcb_size_hints_get_base_size (xcb_size_hints_t *hints,
+ int32_t *base_width,
+ int32_t *base_height);
+uint32_t xcb_size_hints_get_win_gravity (xcb_size_hints_t *hints);
+
+uint8_t xcb_size_hints_is_us_position (xcb_size_hints_t *hints);
+uint8_t xcb_size_hints_is_us_size (xcb_size_hints_t *hints);
+uint8_t xcb_size_hints_is_p_position (xcb_size_hints_t *hints);
+uint8_t xcb_size_hints_is_p_size (xcb_size_hints_t *hints);
+uint8_t xcb_size_hints_is_p_min_size (xcb_size_hints_t *hints);
+uint8_t xcb_size_hints_is_p_max_size (xcb_size_hints_t *hints);
+uint8_t xcb_size_hints_is_p_resize_inc (xcb_size_hints_t *hints);
+uint8_t xcb_size_hints_is_p_aspect (xcb_size_hints_t *hints);
+uint8_t xcb_size_hints_is_p_base_size (xcb_size_hints_t *hints);
+uint8_t xcb_size_hints_is_p_win_gravity (xcb_size_hints_t *hints);
+
+void xcb_size_hints_set_flag_none (xcb_size_hints_t *hints);
+void xcb_size_hints_set_flag_us_position (xcb_size_hints_t *hints);
+void xcb_size_hints_set_flag_us_size (xcb_size_hints_t *hints);
+void xcb_size_hints_set_flag_p_position (xcb_size_hints_t *hints);
+void xcb_size_hints_set_flag_p_size (xcb_size_hints_t *hints);
+void xcb_size_hints_set_flag_p_min_size (xcb_size_hints_t *hints);
+void xcb_size_hints_set_flag_p_max_size (xcb_size_hints_t *hints);
+void xcb_size_hints_set_flag_p_resize_inc (xcb_size_hints_t *hints);
+void xcb_size_hints_set_flag_p_aspect (xcb_size_hints_t *hints);
+void xcb_size_hints_set_flag_p_base_size (xcb_size_hints_t *hints);
+void xcb_size_hints_set_flag_p_win_gravity (xcb_size_hints_t *hints);
+
+void xcb_size_hints_set_position (xcb_size_hints_t *hints,
+ int user_specified,
+ int32_t x,
+ int32_t y);
+
+void xcb_size_hints_set_size (xcb_size_hints_t *hints,
+ int user_specified,
+ int32_t width,
+ int32_t height);
+
+void xcb_size_hints_set_min_size (xcb_size_hints_t *hints,
+ int32_t min_width,
+ int32_t min_height);
+
+void xcb_size_hints_set_max_size (xcb_size_hints_t *hints,
+ int32_t max_width,
+ int32_t max_height);
+
+void xcb_size_hints_set_resize_inc (xcb_size_hints_t *hints,
+ int32_t width_inc,
+ int32_t height_inc);
+
+void xcb_size_hints_set_aspect (xcb_size_hints_t *hints,
+ int32_t min_aspect_num,
+ int32_t min_aspect_den,
+ int32_t max_aspect_num,
+ int32_t max_aspect_den);
+
+void xcb_size_hints_set_base_size (xcb_size_hints_t *hints,
+ int32_t base_width,
+ int32_t base_height);
+
+void xcb_size_hints_set_win_gravity (xcb_size_hints_t *hints,
+ uint8_t win_gravity);
+
+void xcb_set_wm_size_hints (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_atom_t property,
+ xcb_size_hints_t *hints);
+
+int xcb_get_wm_size_hints (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_atom_t property,
+ xcb_size_hints_t *hints,
+ long *supplied);
/* WM_NORMAL_HINTS */
-void set_wm_normal_hints (xcb_connection_t *c,
- xcb_window_t window,
- size_hints_t *hints);
+void xcb_set_wm_normal_hints (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_size_hints_t *hints);
-int get_wm_normal_hints (xcb_connection_t *c,
- xcb_window_t window,
- size_hints_t *hints,
- long *supplied);
+int xcb_get_wm_normal_hints (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_size_hints_t *hints,
+ long *supplied);
/* WM_HINTS */
-typedef struct wm_hints_t wm_hints_t;
-#define NumWMHintsElements 9 /* number of elements in this structure */
+typedef struct xcb_wm_hints_t xcb_wm_hints_t;
+#define XCB_NUM_WM_HINTS_ELEMENTS 9 /* number of elements in this structure */
typedef enum {
- xcb_wm_withdrawn_state_t = 0,
- xcb_wm_normal_state_t = 1,
- xcb_wm_iconic_state_t = 3
+ XCB_WM_WITHDRAWN_STATE = 0,
+ XCB_WM_NORMAL_STATE = 1,
+ XCB_WM_ICONIC_STATE = 3
} xcb_wm_state_t;
-wm_hints_t *alloc_wm_hints();
-
-uint8_t wm_hints_get_input (wm_hints_t *hints);
-xcb_pixmap_t wm_hints_get_icon_pixmap (wm_hints_t *hints);
-xcb_pixmap_t wm_hints_get_icon_mask (wm_hints_t *hints);
-xcb_window_t wm_hints_get_icon_window (wm_hints_t *hints);
-xcb_window_t wm_hints_get_window_group (wm_hints_t *hints);
-
-uint8_t wm_hints_is_input_hint (wm_hints_t *hints);
-uint8_t wm_hints_is_state_hint (wm_hints_t *hints);
-uint8_t wm_hints_is_icon_pixmap_hint (wm_hints_t *hints);
-uint8_t wm_hints_is_icon_window_hint (wm_hints_t *hints);
-uint8_t wm_hints_is_icon_position_hint (wm_hints_t *hints);
-uint8_t wm_hints_is_icon_mask_hint (wm_hints_t *hints);
-uint8_t wm_hints_is_window_group_hint (wm_hints_t *hints);
-uint8_t wm_hints_is_xu_hint (wm_hints_t *hints);
-
-uint8_t wm_hints_state_is_withdrawn (wm_hints_t *hints);
-uint8_t wm_hints_state_is_normal (wm_hints_t *hints);
-uint8_t wm_hints_state_is_iconic (wm_hints_t *hints);
-
-void wm_hints_set_input (wm_hints_t *hints, uint8_t input);
-void wm_hints_set_iconic (wm_hints_t *hints);
-void wm_hints_set_normal (wm_hints_t *hints);
-void wm_hints_set_withdrawn (wm_hints_t *hints);
-void wm_hints_set_none (wm_hints_t *hints);
-void wm_hints_set_urgent (wm_hints_t *hints);
-void wm_hints_set_icon_pixmap (wm_hints_t *hints, xcb_pixmap_t icon_pixmap);
-void wm_hints_set_icon_mask (wm_hints_t *hints, xcb_pixmap_t icon_mask);
-void wm_hints_set_icon_window (wm_hints_t *hints, xcb_window_t icon_window);
-void wm_hints_set_window_group (wm_hints_t *hints, xcb_window_t window_group);
-
-void set_wm_hints (xcb_connection_t *c,
- xcb_window_t window,
- wm_hints_t *hints);
-
-wm_hints_t *get_wm_hints (xcb_connection_t *c,
- xcb_window_t window);
+xcb_wm_hints_t *alloc_wm_hints();
+
+uint8_t xcb_wm_hints_get_input (xcb_wm_hints_t *hints);
+xcb_pixmap_t xcb_wm_hints_get_icon_pixmap (xcb_wm_hints_t *hints);
+xcb_pixmap_t xcb_wm_hints_get_icon_mask (xcb_wm_hints_t *hints);
+xcb_window_t xcb_wm_hints_get_icon_window (xcb_wm_hints_t *hints);
+xcb_window_t xcb_wm_hints_get_window_group (xcb_wm_hints_t *hints);
+
+uint8_t xcb_wm_hints_is_input_hint (xcb_wm_hints_t *hints);
+uint8_t xcb_wm_hints_is_state_hint (xcb_wm_hints_t *hints);
+uint8_t xcb_wm_hints_is_icon_pixmap_hint (xcb_wm_hints_t *hints);
+uint8_t xcb_wm_hints_is_icon_window_hint (xcb_wm_hints_t *hints);
+uint8_t xcb_wm_hints_is_icon_position_hint (xcb_wm_hints_t *hints);
+uint8_t xcb_wm_hints_is_icon_mask_hint (xcb_wm_hints_t *hints);
+uint8_t xcb_wm_hints_is_window_group_hint (xcb_wm_hints_t *hints);
+uint8_t xcb_wm_hints_is_x_urgency_hint (xcb_wm_hints_t *hints);
+
+uint8_t xcb_wm_hints_state_is_withdrawn (xcb_wm_hints_t *hints);
+uint8_t xcb_wm_hints_state_is_normal (xcb_wm_hints_t *hints);
+uint8_t xcb_wm_hints_state_is_iconic (xcb_wm_hints_t *hints);
+
+void xcb_wm_hints_set_input (xcb_wm_hints_t *hints, uint8_t input);
+void xcb_wm_hints_set_iconic (xcb_wm_hints_t *hints);
+void xcb_wm_hints_set_normal (xcb_wm_hints_t *hints);
+void xcb_wm_hints_set_withdrawn (xcb_wm_hints_t *hints);
+void xcb_wm_hints_set_none (xcb_wm_hints_t *hints);
+void xcb_wm_hints_set_urgent (xcb_wm_hints_t *hints);
+void xcb_wm_hints_set_icon_pixmap (xcb_wm_hints_t *hints, xcb_pixmap_t icon_pixmap);
+void xcb_wm_hints_set_icon_mask (xcb_wm_hints_t *hints, xcb_pixmap_t icon_mask);
+void xcb_wm_hints_set_icon_window (xcb_wm_hints_t *hints, xcb_window_t icon_window);
+void xcb_wm_hints_set_window_group (xcb_wm_hints_t *hints, xcb_window_t window_group);
+
+void xcb_set_wm_hints (xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_wm_hints_t *hints);
+
+xcb_wm_hints_t *xcb_get_wm_hints (xcb_connection_t *c,
+ xcb_window_t window);
/* WM_PROTOCOLS */
-void set_wm_protocols (xcb_connection_t *c,
- xcb_window_t window,
- uint32_t list_len,
- xcb_atom_t *list);
-int get_wm_protocols (xcb_connection_t *c,
- xcb_window_t window,
- uint32_t *list_len,
- xcb_atom_t **list);
+void xcb_set_wm_protocols (xcb_connection_t *c,
+ xcb_window_t window,
+ uint32_t list_len,
+ xcb_atom_t *list);
+int xcb_get_wm_protocols (xcb_connection_t *c,
+ xcb_window_t window,
+ uint32_t *list_len,
+ xcb_atom_t **list);
#define HAS_DISCRIMINATED_NAME 0
#if HAS_DISCRIMINATED_NAME