diff options
author | Bart Massey <bart@cs.pdx.edu> | 2007-12-07 00:27:52 -0800 |
---|---|---|
committer | Arnaud Fontaine <arnau@debian.org> | 2010-11-14 19:49:48 +0900 |
commit | 78accd46db65b88e1e2c0e3d714038e7ba679533 (patch) | |
tree | 2332e0efb58020a03a582c9edfc65a1af7489b9c /aux | |
parent | 3bf56c9d1d1e8b2af7869e02a4a0d3804fca8212 (diff) |
added aux_set_line_attributes_checked
Diffstat (limited to 'aux')
-rw-r--r-- | aux/xcb_aux.c | 21 | ||||
-rw-r--r-- | aux/xcb_aux.h | 9 |
2 files changed, 30 insertions, 0 deletions
diff --git a/aux/xcb_aux.c b/aux/xcb_aux.c index 011d9d1..f152669 100644 --- a/aux/xcb_aux.c +++ b/aux/xcb_aux.c @@ -302,3 +302,24 @@ xcb_aux_parse_color(char *color_name, *blue = b << n; return 1; } + +/* Drawing related functions */ + +/* Adapted from Xlib */ +xcb_void_cookie_t +xcb_aux_set_line_attributes_checked (xcb_connection_t *dpy, + xcb_gcontext_t gc, + uint16_t linewidth, + int32_t linestyle, + int32_t capstyle, + int32_t joinstyle) +{ + uint32_t mask = 0; + xcb_params_gc_t gv; + + XCB_AUX_ADD_PARAM(&mask, &gv, line_width, linewidth); + XCB_AUX_ADD_PARAM(&mask, &gv, line_style, linestyle); + XCB_AUX_ADD_PARAM(&mask, &gv, cap_style, capstyle); + XCB_AUX_ADD_PARAM(&mask, &gv, join_style, joinstyle); + return xcb_aux_change_gc_checked(dpy, gc, mask, &gv); +} diff --git a/aux/xcb_aux.h b/aux/xcb_aux.h index 6144971..c376b77 100644 --- a/aux/xcb_aux.h +++ b/aux/xcb_aux.h @@ -180,6 +180,15 @@ int xcb_aux_parse_color(char *color_name, uint16_t *red, uint16_t *green, uint16_t *blue); +xcb_void_cookie_t +xcb_aux_set_line_attributes_checked (xcb_connection_t *dpy, + xcb_gcontext_t gc, + uint16_t linewidth, + int32_t linestyle, + int32_t capstyle, + int32_t joinstyle); + + #ifdef __cplusplus } #endif |