1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 Gilles Roux
12 * 2010 Yoshihisa Uchida
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 * KIND, either express or implied.
22 ****************************************************************************/
23 #ifndef PLUGIN_TEXT_VIEWER_PREFERENCES_H
24 #define PLUGIN_TEXT_VIEWER_PREFERENCES_H
52 /* horizontal_scroll_mode */
58 /* vertical_scroll_mode */
70 struct tv_preferences
{
77 bool horizontal_scrollbar
;
78 bool vertical_scrollbar
;
80 bool overlap_page_mode
;
83 unsigned horizontal_scroll_mode
;
84 unsigned vertical_scroll_mode
;
92 unsigned indent_spaces
;
96 #ifdef HAVE_LCD_BITMAP
97 unsigned char font_name
[MAX_PATH
];
100 unsigned char file_name
[MAX_PATH
];
104 * global pointer to the preferences (read-only)
106 extern const struct tv_preferences
* const preferences
;
107 extern bool preferences_changed
;
110 * change the preferences
119 bool tv_set_preferences(const struct tv_preferences
*new_prefs
);
122 * copy the preferences
125 * the preferences in copy destination
127 void tv_copy_preferences(struct tv_preferences
*copy_prefs
);
130 * compare the preferences structs (binary)
136 bool tv_compare_preferences(struct tv_preferences
*copy_prefs
);
139 * set the default settings
142 * the preferences which store the default settings
144 void tv_set_default_preferences(struct tv_preferences
*p
);
147 * register the function to be executed when the current preferences is changed
150 * the function to be executed when the current preferences is changed
152 void tv_add_preferences_change_listner(int (*listner
)(const struct tv_preferences
*oldp
));