text_viewer: rename preference values.
[kugel-rb.git] / apps / plugins / text_viewer / tv_preferences.h
blobee861ee6b60d9bceb9fe82cf59c056ee8a5452bb
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 Gilles Roux
11 * 2003 Garrett Derner
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
26 /* scrollbar_mode */
27 enum {
28 SB_OFF = 0,
29 SB_ON,
32 /* word_mode */
33 enum {
34 WM_WRAP = 0,
35 WM_CHOP,
38 /* line_mode */
39 enum {
40 LM_NORMAL = 0,
41 LM_JOIN,
42 LM_EXPAND,
43 LM_REFLOW,
46 /* alignment */
47 enum {
48 AL_LEFT = 0,
49 AL_RIGHT,
52 /* page_mode */
53 enum {
54 PM_NO_OVERLAP = 0,
55 PM_OVERLAP,
58 /* header_mode */
59 enum {
60 HD_NONE = 0,
61 HD_PATH,
62 HD_SBAR,
63 HD_BOTH,
66 /* footer_mode */
67 enum {
69 FT_NONE = 0,
70 FT_PAGE,
71 FT_SBAR,
72 FT_BOTH,
75 /* horizontal_scroll_mode */
76 enum {
77 HS_SCREEN = 0,
78 HS_COLUMN,
81 /* vertical_scroll_mode */
82 enum {
83 VS_PAGE = 0,
84 VS_LINE,
87 /* narrow_mode */
88 enum {
89 NM_PAGE = 0,
90 NM_TOP_BOTTOM,
93 struct tv_preferences {
94 unsigned word_mode;
95 unsigned line_mode;
96 unsigned alignment;
98 unsigned encoding;
100 unsigned horizontal_scrollbar;
101 unsigned vertical_scrollbar;
103 unsigned page_mode;
104 unsigned header_mode;
105 unsigned footer_mode;
106 unsigned horizontal_scroll_mode;
107 unsigned vertical_scroll_mode;
109 int autoscroll_speed;
111 int windows;
113 unsigned narrow_mode;
115 unsigned indent_spaces;
117 #ifdef HAVE_LCD_BITMAP
118 unsigned char font_name[MAX_PATH];
119 struct font *font;
120 #endif
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
132 * [In] new_prefs
133 * new preferences
135 void tv_set_preferences(const struct tv_preferences *new_prefs);
138 * copy the preferences
140 * [Out] copy_prefs
141 * the preferences in copy destination
143 void tv_copy_preferences(struct tv_preferences *copy_prefs);
146 * set the default settings
148 * [Out] p
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
156 * [In] listner
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));
161 #endif