]> Pileus Git - lackey/blob - src/view.h
Add compact mode and view config data
[lackey] / src / view.h
1 /*
2  * Copyright (C) 2012 Andy Spencer <andy753421@gmail.com>
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 /* Configuration */
19 #define COLOR_TITLE 1
20 #define COLOR_ERROR 2
21
22 #define COLOR_NEW   3
23 #define COLOR_WIP   4
24 #define COLOR_DONE  5
25
26 #define COLOR_CLASS 6
27 #define COLOR_EC    7
28 #define COLOR_WORK  8
29 #define COLOR_OTHER 9
30
31 /* Config data */
32 extern int COMPACT;
33 extern int ACTIVE;
34
35 /* Helper functions */
36 void event_box(WINDOW *win, event_t *event, int y, int x, int h, int w);
37 void event_line(WINDOW *win, event_t *event, int y, int x, int w, int full);
38 void todo_line(WINDOW *win, todo_t *todo, int y, int x, int w, int full);
39
40 /* View functions */
41 void view_init(void);
42 void view_resize(void);
43 void view_draw(void);
44 int  view_run(int key, mmask_t btn, int row, int col);
45
46 /* View init functions */
47 void day_init(WINDOW *win);
48 void week_init(WINDOW *win);
49 void month_init(WINDOW *win);
50 void year_init(WINDOW *win);
51 void events_init(WINDOW *win);
52 void todo_init(WINDOW *win);
53 void settings_init(WINDOW *win);
54 void help_init(WINDOW *win);
55
56 /* View size functions */
57 void day_size(int,int);
58 void week_size(int,int);
59 void month_size(int,int);
60 void year_size(int,int);
61 void events_size(int,int);
62 void todo_size(int,int);
63 void settings_size(int,int);
64 void help_size(int,int);
65
66 /* View draw functions */
67 void day_draw(void);
68 void week_draw(void);
69 void month_draw(void);
70 void year_draw(void);
71 void events_draw(void);
72 void todo_draw(void);
73 void settings_draw(void);
74 void help_draw(void);
75
76 /* View run functions */
77 int day_run(int,mmask_t,int,int);
78 int week_run(int,mmask_t,int,int);
79 int month_run(int,mmask_t,int,int);
80 int year_run(int,mmask_t,int,int);
81 int events_run(int,mmask_t,int,int);
82 int todo_run(int,mmask_t,int,int);
83 int settings_run(int,mmask_t,int,int);
84 int help_run(int,mmask_t,int,int);