summaryrefslogtreecommitdiff
path: root/apps/plugins/text_viewer/tv_action.h
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-06-20 21:53:47 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-06-20 21:53:47 +0000
commit298316d19297eea82869b63235b535e5904fc0dd (patch)
tree0426e9c8cecac7532a88888e78e5e54ea9bb6145 /apps/plugins/text_viewer/tv_action.h
parent17a2f9d8d2dfddd8d2d81ff638e21302efef1c8e (diff)
downloadrockbox-298316d19297eea82869b63235b535e5904fc0dd.tar.gz
rockbox-298316d19297eea82869b63235b535e5904fc0dd.zip
text_viewer: cleanup & bugfix
cleanup: - don't use enum in struct / return values - don't use a getter for preferences but a global pointer - explicitely make enums start at 0 - use static tables for header/footer settings - remove unneeded memset before strlcpy - use static buffer allocation, not dynamic - check header/footer preferences before using the callbacks - don't include font filename in archos player preferences (break file format) bugfix: - statically allocate old preferences in tv_set_preferences() Sometimes I can read a file on Clipv2, but it still aborts quite often refs: FS#11399 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26998 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/text_viewer/tv_action.h')
-rw-r--r--apps/plugins/text_viewer/tv_action.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/plugins/text_viewer/tv_action.h b/apps/plugins/text_viewer/tv_action.h
index b01079cbd1..f774f07422 100644
--- a/apps/plugins/text_viewer/tv_action.h
+++ b/apps/plugins/text_viewer/tv_action.h
@@ -26,17 +26,17 @@
26#include "tv_menu.h" 26#include "tv_menu.h"
27 27
28/* horizontal scroll mode */ 28/* horizontal scroll mode */
29enum tv_horizontal_scroll_mode 29enum
30{ 30{
31 TV_HORIZONTAL_SCROLL_COLUMN, /* left/right one column */ 31 TV_HORIZONTAL_SCROLL_COLUMN = 0, /* left/right one column */
32 TV_HORIZONTAL_SCROLL_SCREEN, /* left/right one screen */ 32 TV_HORIZONTAL_SCROLL_SCREEN, /* left/right one screen */
33 TV_HORIZONTAL_SCROLL_PREFS, /* left/right follows the settings */ 33 TV_HORIZONTAL_SCROLL_PREFS, /* left/right follows the settings */
34}; 34};
35 35
36/*vertical scroll mode */ 36/*vertical scroll mode */
37enum tv_vertical_scroll_mode 37enum
38{ 38{
39 TV_VERTICAL_SCROLL_LINE, /* up/down one line */ 39 TV_VERTICAL_SCROLL_LINE = 0, /* up/down one line */
40 TV_VERTICAL_SCROLL_PAGE, /* up/down one page */ 40 TV_VERTICAL_SCROLL_PAGE, /* up/down one page */
41 TV_VERTICAL_SCROLL_PREFS, /* up/down follows the settings */ 41 TV_VERTICAL_SCROLL_PREFS, /* up/down follows the settings */
42}; 42};
@@ -70,7 +70,7 @@ void tv_draw(void);
70 * [In] mode 70 * [In] mode
71 * scroll mode 71 * scroll mode
72 */ 72 */
73void tv_scroll_up(enum tv_vertical_scroll_mode mode); 73void tv_scroll_up(unsigned mode);
74 74
75/* 75/*
76 * scroll down 76 * scroll down
@@ -78,7 +78,7 @@ void tv_scroll_up(enum tv_vertical_scroll_mode mode);
78 * [In] mode 78 * [In] mode
79 * scroll mode 79 * scroll mode
80 */ 80 */
81void tv_scroll_down(enum tv_vertical_scroll_mode mode); 81void tv_scroll_down(unsigned mode);
82 82
83/* 83/*
84 * scroll left 84 * scroll left
@@ -86,7 +86,7 @@ void tv_scroll_down(enum tv_vertical_scroll_mode mode);
86 * [In] mode 86 * [In] mode
87 * scroll mode 87 * scroll mode
88 */ 88 */
89void tv_scroll_left(enum tv_horizontal_scroll_mode mode); 89void tv_scroll_left(unsigned mode);
90 90
91/* 91/*
92 * scroll right 92 * scroll right
@@ -94,7 +94,7 @@ void tv_scroll_left(enum tv_horizontal_scroll_mode mode);
94 * [In] mode 94 * [In] mode
95 * scroll mode 95 * scroll mode
96 */ 96 */
97void tv_scroll_right(enum tv_horizontal_scroll_mode mode); 97void tv_scroll_right(unsigned mode);
98 98
99/* jump to the top */ 99/* jump to the top */
100void tv_top(void); 100void tv_top(void);
@@ -111,7 +111,7 @@ void tv_bottom(void);
111 * TV_MENU_RESULT_EXIT_PLUGIN request to exit this plugin 111 * TV_MENU_RESULT_EXIT_PLUGIN request to exit this plugin
112 * TV_MENU_RESULT_ATTACHED_USB connect USB cable 112 * TV_MENU_RESULT_ATTACHED_USB connect USB cable
113 */ 113 */
114enum tv_menu_result tv_menu(void); 114unsigned tv_menu(void);
115 115
116/* add or remove the bookmark to the current position */ 116/* add or remove the bookmark to the current position */
117void tv_add_or_remove_bookmark(void); 117void tv_add_or_remove_bookmark(void);