A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita
audio
rust
zig
deno
mpris
rockbox
mpd
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_TEXT_READER_H
24#define PLUGIN_TEXT_VIEWER_TEXT_READER_H
25
26/*
27 * initialize the text reader module
28 *
29 * [In/Out] buf
30 * the start pointer of the buffer
31 *
32 * [In/Out] size
33 * enabled buffer size
34 *
35 * return
36 * true initialize success
37 * false initialize failure
38 */
39bool tv_init_text_reader(unsigned char **buf, size_t *bufsize);
40
41/* finalize the text reader module */
42void tv_finalize_text_reader(void);
43
44/*
45 * set the read conditions
46 *
47 * [In] blocks
48 * block count
49 *
50 * [In] width
51 * block width
52 */
53void tv_set_read_conditions(int blocks, int width);
54
55/*
56 * return the total text size
57 *
58 * return
59 * the total text size
60 */
61off_t tv_get_total_text_size(void);
62
63/*
64 * get the text of the next line
65 *
66 * [Out] buf
67 * the pointer of the pointer which store the text
68 *
69 * return
70 * true next line exists
71 * false next line does not exist
72 */
73bool tv_get_next_line(const unsigned char **buf);
74
75/*
76 * start to read lines
77 *
78 * [In] block
79 * the index of block to read text
80 *
81 * [In] is_multi
82 * true read 2 blocks
83 * false read 1 block
84 */
85void tv_read_start(int block, bool is_multi);
86
87/*
88 * end to read lines
89 *
90 * return
91 * read text size
92 */
93int tv_read_end(void);
94
95/* seek to the head of the file */
96void tv_seek_top(void);
97
98#endif