diff options
author | Yoshihisa Uchida <uchida@rockbox.org> | 2010-06-05 10:30:08 +0000 |
---|---|---|
committer | Yoshihisa Uchida <uchida@rockbox.org> | 2010-06-05 10:30:08 +0000 |
commit | fdba8404503af0448586615330a7b27f2ced531c (patch) | |
tree | bb15677a7a720675ac2666f11e62042f3b2639ad /apps/plugins/text_viewer/tv_preferences.h | |
parent | 991e92fd3dc15f1e365761264c26305559ddb0a4 (diff) | |
download | rockbox-fdba8404503af0448586615330a7b27f2ced531c.tar.gz rockbox-fdba8404503af0448586615330a7b27f2ced531c.zip |
reworks text viewer plugin. (FS#11209)
new text viewer plugin: text_viewer.rock.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26571 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/text_viewer/tv_preferences.h')
-rw-r--r-- | apps/plugins/text_viewer/tv_preferences.h | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/apps/plugins/text_viewer/tv_preferences.h b/apps/plugins/text_viewer/tv_preferences.h new file mode 100644 index 0000000000..64ab0d102f --- /dev/null +++ b/apps/plugins/text_viewer/tv_preferences.h | |||
@@ -0,0 +1,129 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 Gilles Roux | ||
11 | * 2003 Garrett Derner | ||
12 | * 2010 Yoshihisa Uchida | ||
13 | * | ||
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. | ||
18 | * | ||
19 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
20 | * KIND, either express or implied. | ||
21 | * | ||
22 | ****************************************************************************/ | ||
23 | #ifndef PLUGIN_TEXT_VIEWER_PREFERENCES_H | ||
24 | #define PLUGIN_TEXT_VIEWER_PREFERENCES_H | ||
25 | |||
26 | struct tv_preferences { | ||
27 | enum { | ||
28 | WRAP = 0, | ||
29 | CHOP, | ||
30 | } word_mode; | ||
31 | |||
32 | enum { | ||
33 | NORMAL = 0, | ||
34 | JOIN, | ||
35 | EXPAND, | ||
36 | REFLOW, | ||
37 | } line_mode; | ||
38 | |||
39 | enum { | ||
40 | NARROW = 0, | ||
41 | WIDE, | ||
42 | } view_mode; | ||
43 | |||
44 | enum { | ||
45 | LEFT = 0, | ||
46 | RIGHT, | ||
47 | } alignment; | ||
48 | |||
49 | enum codepages encoding; | ||
50 | |||
51 | enum { | ||
52 | SB_OFF = 0, | ||
53 | SB_ON, | ||
54 | } scrollbar_mode; | ||
55 | |||
56 | enum { | ||
57 | NO_OVERLAP = 0, | ||
58 | OVERLAP, | ||
59 | } page_mode; | ||
60 | |||
61 | enum { | ||
62 | HD_NONE = 0, | ||
63 | HD_PATH, | ||
64 | HD_SBAR, | ||
65 | HD_BOTH, | ||
66 | } header_mode; | ||
67 | |||
68 | enum { | ||
69 | FT_NONE = 0, | ||
70 | FT_PAGE, | ||
71 | FT_SBAR, | ||
72 | FT_BOTH, | ||
73 | } footer_mode; | ||
74 | |||
75 | enum { | ||
76 | PAGE=0, | ||
77 | LINE, | ||
78 | } scroll_mode; | ||
79 | |||
80 | int autoscroll_speed; | ||
81 | |||
82 | unsigned char font_name[MAX_PATH]; | ||
83 | #ifdef HAVE_LCD_BITMAP | ||
84 | struct font *font; | ||
85 | #endif | ||
86 | unsigned char file_name[MAX_PATH]; | ||
87 | }; | ||
88 | |||
89 | /* | ||
90 | * return the preferences | ||
91 | * | ||
92 | * return | ||
93 | * the pointer the preferences | ||
94 | */ | ||
95 | const struct tv_preferences *tv_get_preferences(void); | ||
96 | |||
97 | /* | ||
98 | * change the preferences | ||
99 | * | ||
100 | * [In] new_prefs | ||
101 | * new preferences | ||
102 | */ | ||
103 | void tv_set_preferences(const struct tv_preferences *new_prefs); | ||
104 | |||
105 | /* | ||
106 | * copy the preferences | ||
107 | * | ||
108 | * [Out] copy_prefs | ||
109 | * the preferences in copy destination | ||
110 | */ | ||
111 | void tv_copy_preferences(struct tv_preferences *copy_prefs); | ||
112 | |||
113 | /* | ||
114 | * set the default settings | ||
115 | * | ||
116 | * [Out] p | ||
117 | * the preferences which store the default settings | ||
118 | */ | ||
119 | void tv_set_default_preferences(struct tv_preferences *p); | ||
120 | |||
121 | /* | ||
122 | * register the function to be executed when the current preferences is changed | ||
123 | * | ||
124 | * [In] listner | ||
125 | * the function to be executed when the current preferences is changed | ||
126 | */ | ||
127 | void tv_add_preferences_change_listner(void (*listner)(const struct tv_preferences *oldp)); | ||
128 | |||
129 | #endif | ||