aboutsummaryrefslogtreecommitdiffstats
path: root/src/term.h
blob: 71e0bccd3ec82dfdb48c80d36d8175737a55fe36 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef _RUNES_TERM_H
#define _RUNES_TERM_H

struct runes_term {
    RunesWindowBackend w;
    RunesPtyBackend pty;

    cairo_t *cr;
    cairo_t *backend_cr;
    cairo_t *alternate_cr;
    uv_loop_t *loop;

    cairo_pattern_t *mousecursorcolor;
    cairo_pattern_t *cursorcolor;

    cairo_pattern_t *fgdefault;
    cairo_pattern_t *bgdefault;
    cairo_pattern_t *colors[256];
    cairo_pattern_t *fgcustom;
    cairo_pattern_t *bgcustom;

    int fgcolor;
    int bgcolor;

    int row;
    int col;
    int saved_row;
    int saved_col;
    int scroll_top;
    int scroll_bottom;

    int rows;
    int cols;
    int xpixel;
    int ypixel;
    int fontx;
    int fonty;
    int default_rows;
    int default_cols;

    char *cmd;

    char *font_name;
    PangoLayout *layout;

    char readbuf[RUNES_READ_BUFFER_LENGTH];
    int readlen;
    int remaininglen;

    char bell_is_urgent;
    char bold_is_bright;
    char bold_is_bold;
    char bold;
    char inverse;
    char hide_cursor;
    char unfocused;
    char audible_bell;
    char visual_bell_is_ringing;

    char application_keypad;
    char application_cursor;
    char mouse_reporting_press;
    char mouse_reporting_press_release;
};

void runes_term_init(RunesTerm *t, int argc, char *argv[]);
void runes_term_cleanup(RunesTerm *t);

#endif