Bump plugin API version. This should have been done in r24587. Also, because the...
[kugel-rb.git] / firmware / include / font_cache.h
blob23349610025acb19bfe63e0cfa6d9550e5293d21
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 ****************************************************************************/
21 #include "lru.h"
23 /*******************************************************************************
25 ******************************************************************************/
26 struct font_cache
28 struct lru _lru;
29 int _size;
30 int _capacity;
31 short *_index; /* index of lru handles in char_code order */
34 struct font_cache_entry
36 unsigned short _char_code;
37 unsigned char width;
38 unsigned char bitmap[1]; /* place holder */
41 /* void (*f) (void*, struct font_cache_entry*); */
42 /* Create an auto sized font cache from buf */
43 void font_cache_create(
44 struct font_cache* fcache, void* buf, int buf_size, int bitmap_bytes_size);
45 /* Get font cache entry */
46 struct font_cache_entry* font_cache_get(
47 struct font_cache* fcache,
48 unsigned short char_code,
49 void (*callback) (struct font_cache_entry* p, void *callback_data),
50 void *callback_data);