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_ACTION_H
24 #define PLUGIN_TEXT_VIEWER_ACTION_H
28 /* horizontal scroll mode */
31 TV_HORIZONTAL_SCROLL_COLUMN
= 0, /* left/right one column */
32 TV_HORIZONTAL_SCROLL_SCREEN
, /* left/right one screen */
33 TV_HORIZONTAL_SCROLL_PREFS
, /* left/right follows the settings */
36 /*vertical scroll mode */
39 TV_VERTICAL_SCROLL_LINE
= 0, /* up/down one line */
40 TV_VERTICAL_SCROLL_PAGE
, /* up/down one page */
41 TV_VERTICAL_SCROLL_PREFS
, /* up/down follows the settings */
45 * initialize the action module
48 * the start pointer of the buffer
54 * true initialize success
55 * false initialize failure
57 bool tv_init_action(unsigned char **buf
, size_t *bufsize
);
74 bool tv_load_file(const unsigned char *file
);
76 /* draw the current page */
85 void tv_scroll_up(unsigned mode
);
93 void tv_scroll_down(unsigned mode
);
101 void tv_scroll_left(unsigned mode
);
109 void tv_scroll_right(unsigned mode
);
111 /* jump to the top */
114 /* jump to the bottom */
115 void tv_bottom(void);
121 * the following value returns
122 * TV_MENU_RESULT_EXIT_MENU menu exit and continue this plugin
123 * TV_MENU_RESULT_EXIT_PLUGIN request to exit this plugin
124 * TV_MENU_RESULT_ATTACHED_USB connect USB cable
126 unsigned tv_menu(void);
128 /* add or remove the bookmark to the current position */
129 void tv_add_or_remove_bookmark(void);