fix red.
[kugel-rb.git] / apps / plugins / text_viewer / tv_action.h
blobf774f07422c198761893d25828a56bc2c8de1dc8
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_ACTION_H
24 #define PLUGIN_TEXT_VIEWER_ACTION_H
26 #include "tv_menu.h"
28 /* horizontal scroll mode */
29 enum
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 */
37 enum
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 modules
47 * [In] file
48 * read file name
50 * return
51 * true initialize success
52 * false initialize failure
54 bool tv_init(const unsigned char *file);
57 * finalize modules
59 * [In] parameter
60 * this argument does not use
62 void tv_exit(void *parameter);
64 /* draw the current page */
65 void tv_draw(void);
68 * scroll up
70 * [In] mode
71 * scroll mode
73 void tv_scroll_up(unsigned mode);
76 * scroll down
78 * [In] mode
79 * scroll mode
81 void tv_scroll_down(unsigned mode);
84 * scroll left
86 * [In] mode
87 * scroll mode
89 void tv_scroll_left(unsigned mode);
92 * scroll right
94 * [In] mode
95 * scroll mode
97 void tv_scroll_right(unsigned mode);
99 /* jump to the top */
100 void tv_top(void);
102 /* jump to the bottom */
103 void tv_bottom(void);
106 * display menu
108 * return
109 * the following value returns
110 * TV_MENU_RESULT_EXIT_MENU menu exit and continue this plugin
111 * TV_MENU_RESULT_EXIT_PLUGIN request to exit this plugin
112 * TV_MENU_RESULT_ATTACHED_USB connect USB cable
114 unsigned tv_menu(void);
116 /* add or remove the bookmark to the current position */
117 void tv_add_or_remove_bookmark(void);
119 #endif