blob: 613f6afb624c3f29dff4b7c75458aa352214c3e9 (
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
|
#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;
unsigned int x_padding, y_padding;
unsigned int width, height;
unsigned int line_width;
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
|