text_viewer: cleanup & bugfix
[kugel-rb.git] / apps / plugins / text_viewer / tv_text_processor.h
blob8a9de9075b3284f845bd1fe371c1a7a24a2e0ab0
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_TEXT_PROCESSOR_H
24 #define PLUGIN_TEXT_VIEWER_TEXT_PROCESSOR_H
27 * initialize the text processor module
30 void tv_init_text_processor(void);
33 * set the processing conditions
35 * [In] blocks
36 * total block count
38 * [In] width
39 * the block width
41 void tv_set_creation_conditions(int blocks, int width);
44 * create the displayed text
46 * [In] src
47 * the start pointer of the buffer
49 * [In] bufsize
50 * buffer size
52 * [In] block
53 * the index of block to read text
55 * [In] is_multi
56 * true read 2 blocks
57 * false read 1 block
59 * [Out] dst
60 * the pointer of the pointer which store the text
62 * return
63 * the size of the text
65 int tv_create_formed_text(const unsigned char *src, ssize_t bufsize,
66 int block, bool is_multi, const unsigned char **dst);
68 #endif