summaryrefslogtreecommitdiff
path: root/apps/plugins/text_viewer/tv_bookmark.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/text_viewer/tv_bookmark.h')
-rw-r--r--apps/plugins/text_viewer/tv_bookmark.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/apps/plugins/text_viewer/tv_bookmark.h b/apps/plugins/text_viewer/tv_bookmark.h
new file mode 100644
index 0000000000..d61af41620
--- /dev/null
+++ b/apps/plugins/text_viewer/tv_bookmark.h
@@ -0,0 +1,85 @@
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_BOOKMARK_H
24#define PLUGIN_TEXT_VIEWER_BOOKMARK_H
25
26#include "tv_screen_pos.h"
27
28/* stuff for the bookmarking */
29
30/* Maximum amount of register possible bookmarks */
31#define TV_MAX_BOOKMARKS 16
32
33/* initialize the bookmark module */
34void tv_init_bookmark(void);
35
36/*
37 * get the positions which registered bookmarks
38 *
39 * [Out] pos_array
40 * the array which store positions of all bookmarks
41 *
42 * return
43 * bookmark count
44 */
45int tv_get_bookmark_positions(struct tv_screen_pos *pos_array);
46
47/*
48 * the function that a bookmark add when there is not a bookmark in the given position
49 * or the bookmark remove when there exist a bookmark in the given position.
50 */
51void tv_toggle_bookmark(void);
52
53/*
54 * The menu that can select registered bookmarks is displayed, one is selected from
55 * among them, and moves to the page which selected bookmarks.
56 */
57void tv_select_bookmark(void);
58
59/* creates system bookmark */
60void tv_create_system_bookmark(void);
61
62/*
63 * serialize the bookmark array
64 *
65 * [In] fd
66 * the file descripter which is stored the result.
67 *
68 * Return
69 * the size of the result
70 */
71int tv_serialize_bookmarks(int fd);
72
73/*
74 * deserialize the bookmark array
75 *
76 * [In] fd
77 * the file descripter which is stored the serialization of the bookmark array.
78 *
79 * Return
80 * true success
81 * false failure
82 */
83bool tv_deserialize_bookmarks(int fd);
84
85#endif