Fix playlist catalog directory manual spelling
[maemo-rb.git] / firmware / include / font_cache.h
bloba4c959e3362e1e7ed5dc4771e4d805fbdd969bb2
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2003 Tat Tang
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
19 ****************************************************************************/
20 #ifndef _FONT_CACHE_H_
21 #define _FONT_CACHE_H_
22 #include "lru.h"
24 /*******************************************************************************
26 ******************************************************************************/
27 struct font_cache
29 struct lru _lru;
30 int _size;
31 int _capacity;
32 int _prev_char_code;
33 int _prev_result;
34 short *_index; /* index of lru handles in char_code order */
37 struct font_cache_entry
39 unsigned short _char_code;
40 unsigned char width;
41 unsigned char bitmap[1]; /* place holder */
44 /* void (*f) (void*, struct font_cache_entry*); */
45 /* Create an auto sized font cache from buf */
46 void font_cache_create(
47 struct font_cache* fcache, void* buf, int buf_size, int bitmap_bytes_size);
48 /* Get font cache entry */
49 struct font_cache_entry* font_cache_get(
50 struct font_cache* fcache,
51 unsigned short char_code,
52 void (*callback) (struct font_cache_entry* p, void *callback_data),
53 void *callback_data);
55 #endif