wlt: add --term, --login, --palette and --sb-size
[platform/upstream/kmscon.git] / src / wlt_main.h
1 /*
2  * wlt - Main Header
3  *
4  * Copyright (c) 2012 David Herrmann <dh.herrmann@googlemail.com>
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining
7  * a copy of this software and associated documentation files
8  * (the "Software"), to deal in the Software without restriction, including
9  * without limitation the rights to use, copy, modify, merge, publish,
10  * distribute, sublicense, and/or sell copies of the Software, and to
11  * permit persons to whom the Software is furnished to do so, subject to
12  * the following conditions:
13  *
14  * The above copyright notice and this permission notice shall be included
15  * in all copies or substantial portions of the Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24  */
25
26 /*
27  * Wayland Terminal global information and state
28  */
29
30 #ifndef WLT_MAIN_H
31 #define WLT_MAIN_H
32
33 #include <stdbool.h>
34 #include <stdlib.h>
35 #include "conf.h"
36
37 struct wlt_conf_t {
38         /* show help/usage information */
39         bool help;
40         /* exit application after parsing options */
41         bool exit;
42         /* enable debug messages */
43         bool debug;
44         /* enable verbose info messages */
45         bool verbose;
46         /* disable notices and warnings */
47         bool silent;
48
49         /* custom login process */
50         bool login;
51         /* argv for login process */
52         char **argv;
53         /* TERM value */
54         char *term;
55         /* color palette */
56         char *palette;
57         /* terminal scroll-back buffer size */
58         unsigned int sb_size;
59
60         /* scroll-up grab */
61         struct conf_grab *grab_scroll_up;
62         /* scroll-down grab */
63         struct conf_grab *grab_scroll_down;
64         /* page-up grab */
65         struct conf_grab *grab_page_up;
66         /* page-down grab */
67         struct conf_grab *grab_page_down;
68
69         /* font engine */
70         char *font_engine;
71         /* font size */
72         unsigned int font_size;
73         /* font name */
74         char *font_name;
75         /* font ppi (overrides per monitor PPI) */
76         unsigned int font_ppi;
77 };
78
79 extern struct wlt_conf_t wlt_conf;
80
81 #endif /* WLT_MAIN_H */