1 /*
2  * Copyright 2015 Chris Young <chris@unsatisfactorysoftware.co.uk>
3  *
4  * This file is part of NetSurf, http://www.netsurf-browser.org/
5  *
6  * NetSurf is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * NetSurf is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef AMIGA_FONT_CACHE_H
20 #define AMIGA_FONT_CACHE_H
21 
22 #include <proto/timer.h>
23 
24 struct ami_font_cache_node
25 {
26 #ifdef __amigaos4__
27 	struct SkipNode skip_node;
28 #endif
29 	struct OutlineFont *font;
30 	char *restrict bold;
31 	char *restrict italic;
32 	char *restrict bolditalic;
33 	struct TimeVal lastused;
34 };
35 
36 
37 /* locate an entry in the font cache, NULL if not found */
38 struct ami_font_cache_node *ami_font_cache_locate(const char *font);
39 
40 /* allocate a cache entry */
41 struct ami_font_cache_node *ami_font_cache_alloc_entry(const char *font);
42 
43 /* insert a cache entry into the list (OS3) */
44 void ami_font_cache_insert(struct ami_font_cache_node *nodedata, const char *font);
45 
46 /* initialise the cache */
47 void ami_font_cache_init(void);
48 
49 /* cache clean-up */
50 void ami_font_cache_fini(void);
51 
52 #endif
53 
54 
55