summaryrefslogtreecommitdiff
path: root/apps/plugins/text_viewer/tv_action.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/text_viewer/tv_action.h')
-rw-r--r--apps/plugins/text_viewer/tv_action.h119
1 files changed, 119 insertions, 0 deletions
diff --git a/apps/plugins/text_viewer/tv_action.h b/apps/plugins/text_viewer/tv_action.h
new file mode 100644
index 0000000000..c5f7bd0e2f
--- /dev/null
+++ b/apps/plugins/text_viewer/tv_action.h
@@ -0,0 +1,119 @@
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_ACTION_H
24#define PLUGIN_TEXT_VIEWER_ACTION_H
25
26#include "tv_menu.h"
27
28/* horizontal scroll mode */
29enum tv_horizontal_scroll_mode
30{
31 TV_HORIZONTAL_SCROLL_COLUMN, /* left/right one column */
32 TV_HORIZONTAL_SCROLL_WINDOW, /* left/right one window */
33 TV_HORIZONTAL_SCROLL_PREFS, /* left/right follows the settings */
34};
35
36/*vertical scroll mode */
37enum tv_vertical_scroll_mode
38{
39 TV_VERTICAL_SCROLL_LINE, /* up/down one line */
40 TV_VERTICAL_SCROLL_PAGE, /* up/down one page */
41 TV_VERTICAL_SCROLL_PREFS, /* up/down follows the settings */
42};
43
44/*
45 * initialize modules
46 *
47 * [In] file
48 * read file name
49 *
50 * return
51 * true initialize success
52 * false initialize failure
53 */
54bool tv_init(const unsigned char *file);
55
56/*
57 * finalize modules
58 *
59 * [In] parameter
60 * this argument does not use
61 */
62void tv_exit(void *parameter);
63
64/* draw the current page */
65void tv_draw(void);
66
67/*
68 * scroll up
69 *
70 * [In] mode
71 * scroll mode
72 */
73void tv_scroll_up(enum tv_vertical_scroll_mode mode);
74
75/*
76 * scroll down
77 *
78 * [In] mode
79 * scroll mode
80 */
81void tv_scroll_down(enum tv_vertical_scroll_mode mode);
82
83/*
84 * scroll left
85 *
86 * [In] mode
87 * scroll mode
88 */
89void tv_scroll_left(enum tv_horizontal_scroll_mode mode);
90
91/*
92 * scroll right
93 *
94 * [In] mode
95 * scroll mode
96 */
97void tv_scroll_right(enum tv_horizontal_scroll_mode mode);
98
99/* jump to the top */
100void tv_top(void);
101
102/* jump to the bottom */
103void tv_bottom(void);
104
105/*
106 * display menu
107 *
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
113 */
114enum tv_menu_result tv_menu(void);
115
116/* add or remove the bookmark to the current position */
117void tv_add_or_remove_bookmark(void);
118
119#endif