36 C_TOP = C_TOP_LEFT | C_TOP_RIGHT,
37 C_BOT = C_BOT_LEFT | C_BOT_RIGHT,
38 C_LEFT = C_TOP_LEFT | C_BOT_LEFT,
39 C_RIGHT = C_TOP_RIGHT | C_BOT_RIGHT,
40 C_ALL = C_TOP | C_BOT,
55#define COLOR_UNINIT { -1, -1, -1, -1 }
56#define COLOR_VALID(c) ((c).r >= 0 && (c).g >= 0 && (c).b >= 0 && (c).a >= 0 && (c).r <= 1 && (c).g <= 1 && (c).b <= 1 && (c).a <= 1)
57#define COLOR_SAME(c1, c2) ((c1).r == (c2).r && (c1).g == (c2).g && (c1).b == (c2).b && (c1).a == (c2).a)
66 cairo_pattern_t *pattern;
68 struct color colors[];
71#define GRADIENT_VALID(g) ((g) != NULL && (g)->length != 0)
77void gradient_release(
struct gradient *grad);
79void gradient_pattern(
struct gradient *grad);
81char *gradient_to_string(
const struct gradient *grad);
88void draw_rounded_rect(cairo_t *c,
float x,
float y,
int width,
int height,
int corner_radius,
double scale,
enum corner_pos corners);
91double draw_get_scale(
void);
93void draw_deinit(
void);
char * color_to_string(struct color c, char buf[10])
Stringify a color struct to a RRGGBBAA string.
corner_pos
Specify which corner to draw in draw_rouned_rect.
void calc_window_pos(const struct screen_info *scr, int width, int height, int *ret_x, int *ret_y)
Calculates the position the window should be placed at given its width and height and stores them in ...
void draw_rounded_rect(cairo_t *c, float x, float y, int width, int height, int corner_radius, double scale, enum corner_pos corners)
Create a path on the given cairo context to draw the background of a notification.
Generic graphics backend wrapper.