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
75 /* horizontal_scroll_mode */
81 /* vertical_scroll_mode */
93 struct tv_preferences
{
100 unsigned horizontal_scrollbar
;
101 unsigned vertical_scrollbar
;
104 unsigned header_mode
;
105 unsigned footer_mode
;
106 unsigned horizontal_scroll_mode
;
107 unsigned vertical_scroll_mode
;
109 int autoscroll_speed
;
113 unsigned narrow_mode
;
115 unsigned indent_spaces
;
117 #ifdef HAVE_LCD_BITMAP
118 unsigned char font_name
[MAX_PATH
];
121 unsigned char file_name
[MAX_PATH
];
125 * global pointer to the preferences (read-only)
127 extern const struct tv_preferences
* const preferences
;
130 * change the preferences
135 void tv_set_preferences(const struct tv_preferences
*new_prefs
);
138 * copy the preferences
141 * the preferences in copy destination
143 void tv_copy_preferences(struct tv_preferences
*copy_prefs
);
146 * set the default settings
149 * the preferences which store the default settings
151 void tv_set_default_preferences(struct tv_preferences
*p
);
154 * register the function to be executed when the current preferences is changed
157 * the function to be executed when the current preferences is changed
159 void tv_add_preferences_change_listner(void (*listner
)(const struct tv_preferences
*oldp
));