Repository navigation
Expand file tree
/
Copy pathconfig.h
More file actions
84 lines (55 loc) · 1.77 KB
/
Copy pathconfig.h
File metadata and controls
84 lines (55 loc) · 1.77 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#pragma once
#include <limits.h>
#include <stddef.h>
#include <SDL2/SDL.h>
#define MUTERM_VERSION "1.4.2"
#define MUTERM_DEFAULT_WIDTH 640
#define MUTERM_DEFAULT_HEIGHT 480
#define MUTERM_DEFAULT_FONT_PATH "/opt/muos/share/font/muterm.ttf"
#define MUTERM_DEFAULT_TERM_SIZE 15
#define MUTERM_DEFAULT_MENU_SIZE 17
#define MUTERM_DEFAULT_SCROLLBACK 512
#define MUTERM_DEFAULT_SB_PATH "/tmp/muterm.cache"
#define MUTERM_DEFAULT_KEY_DELAY 350
#define MUTERM_DEFAULT_KEY_RATE 70
#define MUTERM_DEFAULT_DPAD_DELAY 300
#define MUTERM_DEFAULT_DPAD_RATE 80
#define MUOS_DEVICE_CONFIG "/opt/muos/device/config"
#define MUOS_GLOBAL_CONFIG "/opt/muos/config"
#define MUTERM_SYS_CONF "/opt/muos/share/conf/muterm.conf"
#define MUTERM_USR_CONF ".config/muterm/muterm.conf"
typedef struct {
int width;
int height;
char term_font_path[512];
char term_font_path_bold[512];
char term_font_path_italic[512];
char term_font_path_bold_italic[512];
int term_font_size;
int menu_font_size;
int scrollback;
char scrollback_path[512];
int use_solid_bg;
SDL_Color solid_bg;
int use_solid_fg;
SDL_Color solid_fg;
char bg_image[512];
int readonly;
float zoom;
int rotate;
int underscan;
char shell[256];
char osk_layout_path[512];
int key_repeat_delay;
int key_repeat_rate;
int dpad_repeat_delay;
int dpad_repeat_rate;
int force_redraw;
int font_hinting;
int ignore_muos;
char custom_config_path[PATH_MAX];
} muTermConfig;
void config_load(muTermConfig *cfg, int ignore_muos, const char *custom_config_path);
void config_dump(const muTermConfig *cfg);
const char *config_save_path(const muTermConfig *cfg, char *buf, size_t buf_sz);
void config_ensure_save_dir(const muTermConfig *cfg);