1 /* 2 * Xiphos Bible Study Tool 3 * settings.h - structure definitions 4 * 5 * Copyright (C) 2000-2020 Xiphos Developer Team 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU Library General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 20 */ 21 22 #ifndef _SETTINGS_H_ 23 #define _SETTINGS_H_ 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 typedef struct _settings SETTINGS; 30 struct _settings 31 { 32 char *gs_version, /* Xiphos version */ 33 *path_to_mods, /* one-time retrieval */ 34 *MainWindowModule, /* module to open at program startup */ 35 *CommWindowModule, /* module to open at program startup */ 36 *DictWindowModule, /* module to open at program startup */ 37 **parallel_list, /* strsplit result from xml parallels */ 38 *personalcommentsmod, /* module to open at program startup */ 39 sb_search_mod[80], /* module for sidebar search */ 40 *devotionalmod, /* module for devotional */ 41 *DefaultDict, /* module for default dict */ 42 *lex_greek, /* module for greek lexicon - strongs or thayers */ 43 *lex_hebrew, /* module for hebrew lexicon - strongs or BDB */ 44 *currentverse, /* where we are right now */ 45 *cvparallel, /* current verse for detached parallel */ 46 *dictkey, /* dictionary key to use at program startup */ 47 *studypadfilename, /* name of file in studypad when we closed */ 48 *studypaddir, /* directory for studypad files */ 49 searchText[256], /* search string used by sidebar search */ 50 findText[256], /* string used by find dialog */ 51 *spell_language, 52 /* fonts names/colors/sizes */ 53 *bible_text_color, /* color for text */ 54 *bible_bg_color, /* color for background */ 55 *currentverse_color, /* color for current verse */ 56 *link_color, /* color for strongs, morph tags */ 57 *bible_verse_num_color, /* verse number color */ 58 *found_color, /* color for search word in results display */ 59 *font_color, /* */ 60 *highlight_fg, /* special fg color for highlight */ 61 *highlight_bg, /* special bg color for highlight */ 62 *verse_num_font_size_str, *base_font_size_str, *special_locale; /* prefs dialog: pick abnormal locale */ 63 /* --requires restart-- */ 64 65 int 66 verse_num_font_size, 67 verse_num_bold, /* verse number customizations */ 68 verse_num_bracket, verse_num_superscript, base_font_size, sidebar_width, verselist_toppane_height, /* height of the top pane in the search results window */ 69 biblepane_width, biblepane_height, commpane_height, sidebar_notebook_height, gs_width, gs_height, parallel_height, parallel_width, modmgr_height, modmgr_width, advsearch_height, advsearch_width, prefs_height, prefs_width, searchType, whichwindow, /* which of the main form html windows is active */ 70 intCurVerse, /* detached parallel current verse */ 71 parallel_page, /* parallel workbook page number */ 72 tab_page, /* studypad workbook page number */ 73 percomm_page; /* percomm editor workbook page number */ 74 75 int 76 strongs, /* toogle button and check menu state */ 77 parallel_strongs, /* check menu state parallel mods */ 78 parallel_headings, /* check menu state parallel mods */ 79 parallel_crossref, /* check menu state parallel mods */ 80 parallel_lemmas, /* check menu state parallel mods */ 81 parallel_morphs, /* check menu state parallel mods */ 82 parallel_segmentation, /* check menu state parallel mods */ 83 parallel_red_words, /* check menu state parallel mods */ 84 parallel_transliteration, /* check menu state parallel mods */ 85 parallel_variants_primary, /* check menu state parallel mods */ 86 parallel_variants_secondary, /* check menu state parallel mods */ 87 parallel_variants_all, /* check menu state parallel mods */ 88 parallel_hebrewpoints, /* check menu state parallel mods */ 89 parallel_cantillationmarks, /* check menu state parallel mods */ 90 parallel_footnotes, /* check menu state parallel mods */ 91 parallel_greekaccents, /* check menu state parallel mods */ 92 parallel_xlit, /* check menu state parallel mods */ 93 parallel_enumerated, /* check menu state parallel mods */ 94 parallel_glosses, /* check menu state parallel mods */ 95 parallel_morphseg, /* check menu state parallel mods */ 96 versestyle, /* verse if true, paragraph if not */ 97 linkedtabs, /* tabs linked together, move in concert */ 98 showversenum, /* display verse numbers in text (default on) */ 99 readaloud, /* pass text through "festival -server" */ 100 versehighlight, /* do special fg/bg for current verse */ 101 annotate_highlight, /* do special bg/fg for user annotations */ 102 /* saved startup displays */ 103 display_parallel, /* detached parallel */ 104 display_modmgr, /* mod.mgr */ 105 display_advsearch, /* advanced search */ 106 display_prefs, /* preferences */ 107 formatpercom, /* use html to format personal notes */ 108 showshortcutbar, /* display shortcut bar if true */ 109 showsplash, /* show splash on program start if true */ 110 showdevotional, /* show devotional on program start if true */ 111 showtexts, /* show bible texts if true */ 112 showpreview, /* show preview pane if true */ 113 showcomms, /* show commentaries if true */ 114 showdicts, /* show dictionaries/lexicons if true */ 115 showparatab, /* show parallel view in a tab if true */ 116 show_previewer_in_sidebar, /* show previewer in sidebar if true */ 117 xrefs_in_verse_list, /* as opposed to old use of previewer */ 118 displaySearchResults, /* are we displaying search results in chap display */ 119 useDefaultDict, 120 browsing, /* true for tabbed browsing */ 121 /** if items are docked **/ 122 docked, /* true when sidebar is docked */ 123 dockedInt, /* true when parallel page is docked */ 124 /** do we have these modules **/ 125 havebible, 126 havecomm, 127 havedict, havebook, havepercomm, haveprayerlist, 128 /* do we need to add item to history */ 129 addhistoryitem; 130 131 int 132 bs_mode, // [0..3] for radio button select 133 // 0=disable; 1=personal; 2=speaker; 3=audience. 134 bs_privacy, // in personal mode, whether private (ttl 0) 135 bs_navdirect, // or via verse list (false). 136 bs_debug, // show pkt traces. 137 bs_presence, // show presence announcements. 138 bs_mismatch, // show mismatch packets. 139 bs_receiving, // lock: don't re-xmit what we recv. 140 bs_listen_set, // 0 = some, 1 = all, 2 = none. 141 bs_group_tab, 142 bs_warned_bad_mod,// user told once about others' bad modnames. 143 bs_keyboard; // do not xmit every nav; xmit only via keyboard shortcut 144 char *bs_passphrase; // session exclusion/isolation. 145 146 /* gbs */ 147 char *book_mod; /* module to open at program startup */ 148 char *book_key; /* */ 149 unsigned long book_offset; 150 151 int comm_showing; /* whether comm or book is visible */ 152 153 /* store program title */ 154 char program_title[256]; 155 156 /* store $home directory */ 157 char *homedir; 158 159 /* store .xiphos directory */ 160 char *gSwordDir; 161 162 /* bookmarks directory */ 163 char *swbmDir; 164 165 /* store filename for configure file - options */ 166 char *fnconfigure; 167 168 /* apply changes to what? the text navigation bar */ 169 int apply_change; 170 171 /* load xml bookmarks */ 172 int load_xml_bookmarks; 173 174 /* cell height of dictionary treeview */ 175 int cell_height; 176 177 /* window location at close */ 178 int app_x, app_y; 179 int maximized; /* gboolean */ 180 int parallel_x, parallel_y; 181 int modmgr_x, modmgr_y; 182 int advsearch_x, advsearch_y; 183 int prefs_x, prefs_y; 184 185 /* there is no settings.xml file */ 186 int first_run; 187 188 /* widget shadow type */ 189 int shadow_type; 190 191 /* chapter scroll */ 192 int chapter_scroll; 193 194 /* auto image resize in com/book/dict */ 195 int imageresize; 196 197 /* mod mgr local or remote */ 198 int mod_mgr_source; /* 0 = local, 1 = remote */ 199 /* mod mgr local sorce */ 200 int mod_mgr_local_source_index; 201 /* mod mgr remote source */ 202 int mod_mgr_remote_source_index; 203 /* mod mgr destination */ 204 int mod_mgr_destination; /* if = 0 destination is .sword 205 else sword directory */ 206 207 /* if true use prayerlist */ 208 int prayerlist; 209 210 /* statusbar setting */ 211 int statusbar; 212 213 /* parallel color alternation */ 214 int alternation; 215 216 /* if true parallel tab is showing */ 217 int paratab_showing; 218 219 /* if set, this is used for an anchor jump if possible */ 220 char *special_anchor; 221 }; 222 223 extern SETTINGS settings; 224 225 int settings_init(int argc, char **argv, int new_configs, 226 int new_bookmarks); 227 void load_settings_structure(void); 228 229 #ifdef __cplusplus 230 } 231 #endif 232 #endif 233