Add xterm-256color as a valid terminal.
[eco.git] / view.h
blobcb55fe7d166751469853034bbf72a3c78aa334f2
1 /*
2 * Copyright (C) 2008 Diego Hernan Borghetti.
3 * Eco
4 */
6 #ifndef _ECO_VIEW_H
7 #define _ECO_VIEW_H
9 typedef struct _E_View {
10 struct _E_View *next;
11 struct _E_View *prev;
13 /* The "View" is a region of the screen when we
14 * draw the buffer, it's like a canvas.
16 * The screen can be split in N number of view
17 * and every view have a buffer attached.
20 * The row and col have the start position of the
21 * view, in screen coordinates.
23 * The nrow and ncol is the size of the view, but
24 * _NOT_ in the screen.
26 * The rrow and rcol is the end position of the
27 * view, in screen coordinates (srow + row, scol + col)
30 /* start position. */
31 int row;
32 int col;
34 /* view size. */
35 int nrow;
36 int ncol;
38 /* real view size. */
39 int rrow;
40 int rcol;
42 /* buffer attached to this view. */
43 E_Buffer *b;
45 /* last search string. */
46 char search[80];
48 /* status line. */
49 int stfg;
50 int stbg;
52 /* minibuf for status line. */
53 char stbuf[80];
55 /* minibuf position. */
56 int stcol;
57 int strow;
58 int stused;
60 /* have a message to show ? */
61 int stmsg;
63 /* view flag. */
64 char flag;
65 } E_View;
67 /* view->flag */
68 #define VIEW_REDRAW (1<<0)
69 #define VIEW_SHOW (1<<1)
71 E_View *e_view_new(E_Screen *sc);
72 void e_view_free(E_View *v);
74 void e_view_move(E_View *v, int row, int col);
75 void e_view_resize(E_View *v, int nrow, int ncol);
77 void e_view_show(E_View *v);
78 void e_view_unshow(E_View *v);
79 void e_view_redraw(E_View *v);
81 #endif /* _ECO_VIEW_H */