|
libxputty
0.1
A damn tiny abstraction Layer to create X11 window/widgets with cairo surfaces
|
|
Go to the documentation of this file.
26 cairo_text_extents_t extents;
27 cairo_set_font_size (w->
crb, 12);
28 cairo_text_extents(w->
crb,w->
label , &extents);
29 XResizeWindow (w->
app->
dpy, w->
widget,
max(1, (
int)extents.width+40), 25);
35 XWindowAttributes attrs;
36 XGetWindowAttributes(w->
app->
dpy, (Window)w->
widget, &attrs);
37 if (attrs.map_state != IsViewable)
return;
38 int width = attrs.width;
39 int height = attrs.height;
42 cairo_text_extents_t extents;
46 cairo_text_extents(w->
crb,w->
label , &extents);
48 cairo_move_to (w->
crb, (width-extents.width)/2., height+5 - extents.height );
void use_text_color_scheme(Widget_t *w, Color_state st)
use_text_color_scheme - use text Colors to paint on Widget_t
Color_state get_color_state(Widget_t *wid)
get_color_state - get the Color_state to use in relation to the Widget_t state
void use_bg_color_scheme(Widget_t *w, Color_state st)
use_bg_color_scheme - use background Colors to paint on Widget_t
#define max(x, y)
max - set a minimal value (x) as return value