blob: ba2bb138bac99efbb7c35d471a05cce0ca81b251 (
plain) (
blame)
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
|
#ifndef _RUNES_DISPLAY_H
#define _RUNES_DISPLAY_H
#include <cairo.h>
#include <pango/pangocairo.h>
#include <vt100.h>
struct runes_display {
cairo_t *cr;
PangoLayout *layout;
int row_visible_offset;
int xpixel;
int ypixel;
int fontx;
int fonty;
struct vt100_loc selection_start;
struct vt100_loc selection_end;
char unfocused: 1;
char has_selection: 1;
char dirty: 1;
};
void runes_display_init(RunesDisplay *display, char *font_name);
void runes_display_set_window_size(RunesTerm *t, int width, int height);
void runes_display_draw_screen(RunesTerm *t);
void runes_display_draw_cursor(RunesTerm *t, cairo_t *cr);
int runes_display_loc_is_selected(RunesTerm *t, struct vt100_loc loc);
int runes_display_loc_is_between(
RunesTerm *t, struct vt100_loc loc,
struct vt100_loc start, struct vt100_loc end);
void runes_display_cleanup(RunesDisplay *display);
#endif
|