blob: 657ca41006342a0bb125d889442f975058d4726c (
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
|
#ifndef COMET_LAYOUT_H
#define COMET_LAYOUT_H
#include <cairo.h>
#include <pango/pangocairo.h>
#include <pango/pango-types.h>
typedef struct block block_t;
typedef struct {
PangoFontDescription *fontdesc;
PangoContext *context;
int x_offset;
int height;
} layout_info_t;
typedef struct layout {
block_t *block;
int x, y;
int x_padding, y_padding;
int width, height;
int text_width, text_height;
PangoLayout *pl;
size_t n_children;
struct layout *children;
} layout_t;
void layout_init(layout_t *layout, block_t *block, layout_info_t info);
void layout_render(layout_t *layout, cairo_t *cr);
void layout_free(layout_t *layout);
#endif
|