-
Notifications
You must be signed in to change notification settings - Fork 1
/
gcin-conf.h
156 lines (139 loc) · 6.83 KB
/
gcin-conf.h
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#define CHANGE_FONT_SIZE "change font size"
#define GB_OUTPUT_TOGGLE "gb output toggle"
#define KBM_TOGGLE "kbm toggle"
#define RELOAD_TSIN_DB "reload tsin db"
#define GCIN_EXIT_MESSAGE "gcin exit"
#define GCIN_FONT_SIZE "gcin-font-size"
#define GCIN_FONT_NAME "gcin-font-name"
#define GCIN_FONT_SIZE_TSIN_PRESEL "gcin-font-size-tsin-presel"
#define GCIN_FONT_SIZE_SYMBOL "gcin-font-size-symbol"
#define GCIN_FONT_SIZE_TSIN_PHO_IN "gcin-font-size-tsin-pho-in"
#define GCIN_FONT_SIZE_GTAB_IN "gcin-font-size-gtab-in"
#define GCIN_FONT_SIZE_PHO_NEAR "gcin-font-size-pho-near"
#define GCIN_FONT_SIZE_WIN_KBM "gcin-font-size-win-kbm"
#define GCIN_FONT_SIZE_WIN_KBM_EN "gcin-font-size-win-kbm-en"
#define GCIN_INPUT_STYLE "gcin-input-style"
#define GCIN_ROOT_X "gcin-root-x"
#define GCIN_ROOT_Y "gcin-root-y"
#define GCIN_POP_UP_WIN "gcin-pop-up-win"
#define GCIN_INNER_FRAME "gcin-inner-frame"
#define GCIN_INIT_IM_ENABLED "gcin-init-im-enabled"
#define GCIN_BELL_VOLUME "gcin-bell-volume"
#define GCIN_SOUND_PLAY_OVERLAP "gcin-sound-play-overlap"
#define GCIN_ENABLE_CTRL_ALT_SWITCH "gcin-enable-ctrl-alt-switch"
#define GCIN_EDIT_DISPLAY "gcin-edit-display"
#define GCIN_BELL_OFF "gcin-bell-off"
#define GCIN_ON_THE_SPOT_KEY "gcin-on-the-spot-key"
#define GCIN_TRAY_HF_WIN_KBM "gcin-tray-hf-win-kbm"
#define GCIN_SINGLE_STATE "gcin-single-state"
#define GCIN_PUNC_AUTO_SEND "gcin-punc-auto-send"
#define GCIN_IM_TOGGLE_KEYS "gcin-im-toggle-keys"
#define DEFAULT_INPUT_METHOD "default-input-method"
#define LEFT_RIGHT_BUTTON_TIPS "left-right-button-tips"
#define GCIN_STR_IM_CYCLE "gcin-str-im-cycle"
#define GCIN_REMOTE_CLIENT "gcin-remote-client"
#define GCIN_SHIFT_SPACE_ENG_FULL "gcin-shift-space-eng-full"
#define GCIN_STATUS_TRAY "gcin-status-tray"
#define GCIN_WIN_COLOR_FG "gcin-win-color-fg"
#define GCIN_WIN_COLOR_BG "gcin-win-color-bg"
#define GCIN_WIN_COLOR_USE "gcin-win-color-use"
#define GCIN_CAPSLOCK_LOWER "gcin-capslock-lower"
#define GCIN_ENG_PHRASE_ENABLED "gcin-eng-phrase-enabled"
#define GCIN_WIN_SYM_CLICK_CLOSE "gcin-win-sym-click-close"
#define GCIN_SEL_KEY_COLOR "gcin-sel-key-color"
#define GCIN_WIN32_ICON "gcin-win32-icon"
#define GTAB_DUP_SELECT_BELL "gtab-dup-select-bell"
#define GTAB_SPACE_AUTO_FIRST "gtab-space-auto-first"
#define GTAB_AUTO_SELECT_BY_PHRASE "gtab-auto-select-by_phrase"
#define GTAB_PRE_SELECT "gtab-pre-select"
#define GTAB_PHRASE_PRE_SELECT "gtab-phrase-pre-select"
#define GTAB_PRESS_FULL_AUTO_SEND "gtab-press-full-auto-send"
#define GTAB_DISP_PARTIAL_MATCH "gtab-disp-partial-match"
#define GTAB_DISP_KEY_CODES "gtab-disp-key-codes"
#define GTAB_DISP_IM_NAME "gtab-disp-im-name"
#define GTAB_INVALID_KEY_IN "gtab-invalid-key-in"
#define GTAB_SHIFT_PHRASE_KEY "gtab-shift-phrase-key"
#define GTAB_HIDE_ROW2 "gtab-hide-row2"
#define GTAB_IN_ROW1 "gtab-in-row1"
#define GTAB_CAPSLOCK_IN_ENG "gtab-capslock-in-eng"
#define GTAB_VERTICAL_SELECT "gtab-vertical-select"
#define GTAB_UNIQUE_AUTO_SEND "gtab-unique-auto-send"
#define GTAB_QUE_WILD_CARD "gtab-que-wild-card"
#define GTAB_PHRASE_PRE_SELECT "gtab-phrase-pre-select"
#define GTAB_IN_AREA_BUTTON "gtab-in-area-button"
#define TSIN_PHRASE_PRE_SELECT "tsin-phrase-pre-select"
#define TSIN_CHINESE_ENGLISH_TOGGLE_KEY "tsin-chinese-english-toggle_key"
#define TSIN_SPACE_OPT "tsin-space-opt"
#define TSIN_BUFFER_SIZE "tsin-buffer-size"
#define TSIN_PHRASE_LINE_COLOR "tsin-phrase-line-color"
#define TSIN_CURSOR_COLOR "tsin-cursor-color"
#define TSIN_TONE_CHAR_INPUT "tsin-tone-char-input"
#define TSIN_TAB_PHRASE_END "tsin-tab-phrase-end"
#define TSIN_TAIL_SELECT_KEY "tsin-tail-select-key"
#define TSIN_BUFFER_EDITING_MODE "tsin-buffer-editing-mode"
#define TSIN_USE_PHO_NEAR "tsin-use-pho-near"
#define PHO_HIDE_ROW2 "pho-hide-row2"
#define PHO_IN_ROW1 "pho-in-row1"
#define PHONETIC_KEYBOARD "phonetic-keyboard2"
#define PHONETIC_KEYBOARD_BAK "phonetic-keyboard-bak"
#define PHONETIC_CHAR_DYNAMIC_SEQUENCE "phonetic-char-dynamic-sequence"
#define PHONETIC_HUGE_TAB "phonetic-huge-tab"
#define PHONETIC_SPEAK "phonetic-speak"
#define PHONETIC_SPEAK_SEL "phonetic-speak-sel"
#define GCB_POSITION "gcb-position"
#define GCB_POSITION_X "gcb-position-x"
#define GCB_POSITION_Y "gcb-position-y"
#define GCB_ENABLED "gcb-enabled"
#define GCB_BUTTON_N "gcb-button-n"
#define GCB_HISTORY_N "gcb-history-n"
extern int gcin_font_size, gcin_font_size_tsin_presel, gcin_font_size_symbol,
gcin_font_size_tsin_pho_in, gcin_font_size_pho_near,
gcin_font_size_gtab_in, gcin_font_size_win_kbm, gcin_font_size_win_kbm_en,
gcin_inner_frame, gcin_single_state,
gcin_remote_client,
gtab_disp_key_codes, gtab_disp_im_name, gcin_shift_space_eng_full,
gtab_invalid_key_in, gtab_hide_row2, gtab_in_row1, gtab_capslock_in_eng,
gcin_capslock_lower, pho_hide_row2, pho_in_row1,
gcin_eng_phrase_enabled, gtab_que_wild_card, gcin_win_sym_click_close,
gcin_bell_volume, gcin_sound_play_overlap, gcin_enable_ctrl_alt_switch, gcin_on_the_spot_key;
extern int default_input_method;
extern int left_right_button_tips;
extern int gtab_dup_select_bell;
extern int gtab_space_auto_first;
extern int gtab_auto_select_by_phrase;
extern int gcin_im_toggle_keys;
extern int gtab_pre_select, gtab_phrase_pre_select;
extern int gtab_press_full_auto_send;
extern int gtab_disp_partial_match;
extern int gtab_shift_phrase_key, gtab_in_area_button;
extern int gtab_vertical_select, gtab_unique_auto_send;
extern int tsin_buffer_size;
extern int gcin_input_style, gcin_root_x, gcin_root_y, gcin_pop_up_win;
extern int gcin_status_tray, gcin_tray_hf_win_kbm;
extern int gcin_punc_auto_send;
extern int tsin_phrase_pre_select;
extern int tsin_chinese_english_toggle_key;
extern int tsin_tab_phrase_end, tsin_tail_select_key;
extern int tsin_buffer_editing_mode;
extern int tsin_use_pho_near;
extern int phonetic_char_dynamic_sequence;
extern int phonetic_huge_tab, phonetic_speak;
extern char *phonetic_speak_sel;
extern int tsin_space_opt, tsin_tone_char_input;
extern char *tsin_phrase_line_color, *tsin_cursor_color, *gcin_font_name, *gcin_sel_key_color;
extern unich_t eng_full_str[], cht_full_str[];
extern char *eng_color_full_str, *cht_color_full_str;
extern char *gcin_win_color_fg, *gcin_win_color_bg;
extern int gcin_win_color_use, gcin_bell_off;
extern int gcin_init_im_enabled, gcin_win32_icon;
extern int gcb_enabled, gcb_position, gcb_position_x, gcb_position_y, gcb_button_n, gcb_history_n;
extern int gcin_edit_display;
extern char *pho_kbm_name, *pho_selkey, *gcin_str_im_cycle;
extern int pho_candicate_col_N, pho_candicate_R2L;
gboolean get_gcin_user_fname(char *name, char fname[]);
void get_gcin_conf_str(char *name, char **rstr, char *default_str);
void get_gcin_conf_fstr(char *name, char rstr[], char *default_str);
void save_gcin_conf_str(char *name, char *str);
void save_gcin_conf_int(char *name, int val);
int get_gcin_conf_int(char *name, int default_value);
void load_setttings();