fix red.
[kugel-rb.git] / apps / plugins / text_viewer / tv_bookmark.h
blobd61af416201076f0582eedaf9315d91490f28fd2
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_BOOKMARK_H
24 #define PLUGIN_TEXT_VIEWER_BOOKMARK_H
26 #include "tv_screen_pos.h"
28 /* stuff for the bookmarking */
30 /* Maximum amount of register possible bookmarks */
31 #define TV_MAX_BOOKMARKS 16
33 /* initialize the bookmark module */
34 void tv_init_bookmark(void);
37 * get the positions which registered bookmarks
39 * [Out] pos_array
40 * the array which store positions of all bookmarks
42 * return
43 * bookmark count
45 int tv_get_bookmark_positions(struct tv_screen_pos *pos_array);
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.
51 void tv_toggle_bookmark(void);
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.
57 void tv_select_bookmark(void);
59 /* creates system bookmark */
60 void tv_create_system_bookmark(void);
63 * serialize the bookmark array
65 * [In] fd
66 * the file descripter which is stored the result.
68 * Return
69 * the size of the result
71 int tv_serialize_bookmarks(int fd);
74 * deserialize the bookmark array
76 * [In] fd
77 * the file descripter which is stored the serialization of the bookmark array.
79 * Return
80 * true success
81 * false failure
83 bool tv_deserialize_bookmarks(int fd);
85 #endif