blob: 35a9f68b6c53c765cb246a7a7dce86ebe7c43b50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#ifndef COMET_DRAW_H
#define COMET_DRAW_H
#include <glib.h>
#include <pango/pango-font.h>
#include <pango/pangocairo.h>
#include "window.h"
#include "button.h"
typedef struct Drawable Drawable;
struct Drawable {
int height;
int left_pad;
int right_pad;
int top_pad;
double alpha;
int line_w;
GList *layouts;
PangoFontDescription *desc;
};
typedef struct {
Button *btn;
int x, y;
int width, height;
int text_w, text_h;
PangoLayout *pl;
} Layout;
Drawable *draw_create(const char *font, int height, int left_pad, int right_pad, int top_pad, double alpha, int line_w);
void draw_compute_layout(Drawable *draw, Window *win, GList *btns);
void draw_paint(Drawable *draw, Window *win);
void draw_destroy(Drawable *draw);
#endif
// vim: ts=4 sw=4 et
|