diff options
Diffstat (limited to 'src/layout.h')
| -rw-r--r-- | src/layout.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/layout.h b/src/layout.h new file mode 100644 index 0000000..4b8cddd --- /dev/null +++ b/src/layout.h @@ -0,0 +1,34 @@ +#ifndef COMET_LAYOUT_H +#define COMET_LAYOUT_H + +#include <cairo.h> +#include <pango/pangocairo.h> +#include <pango/pango-types.h> + +#include "block.h" + +typedef struct { + PangoFontDescription *fontdesc; + PangoContext *context; + int x_offset; + int width, 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; + int n_children; + struct layout **children; +} layout_t; + +layout_t *layout_create(block_t *block, layout_info_t info); + +void layout_render(layout_t *layout, cairo_t *cr); + +void layout_free(layout_t *layout); + +#endif |
