summaryrefslogtreecommitdiff
path: root/firmware/include/font_cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/include/font_cache.h')
-rw-r--r--firmware/include/font_cache.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/firmware/include/font_cache.h b/firmware/include/font_cache.h
index a4c959e336..1809720ed5 100644
--- a/firmware/include/font_cache.h
+++ b/firmware/include/font_cache.h
@@ -17,8 +17,10 @@
17 * KIND, either express or implied. 17 * KIND, either express or implied.
18 * 18 *
19 ****************************************************************************/ 19 ****************************************************************************/
20
20#ifndef _FONT_CACHE_H_ 21#ifndef _FONT_CACHE_H_
21#define _FONT_CACHE_H_ 22#define _FONT_CACHE_H_
23#include <stdbool.h>
22#include "lru.h" 24#include "lru.h"
23 25
24/******************************************************************************* 26/*******************************************************************************
@@ -45,10 +47,16 @@ struct font_cache_entry
45/* Create an auto sized font cache from buf */ 47/* Create an auto sized font cache from buf */
46void font_cache_create( 48void font_cache_create(
47 struct font_cache* fcache, void* buf, int buf_size, int bitmap_bytes_size); 49 struct font_cache* fcache, void* buf, int buf_size, int bitmap_bytes_size);
48/* Get font cache entry */ 50
51/* Get font cache entry for the given char_code
52 *
53 * cache_only: true if only a cache lookup should be performed and loading on miss should be avoided
54 *
55 * Note: With cache_only this can return NULL, which otherwise never happens */
49struct font_cache_entry* font_cache_get( 56struct font_cache_entry* font_cache_get(
50 struct font_cache* fcache, 57 struct font_cache* fcache,
51 unsigned short char_code, 58 unsigned short char_code,
59 bool cache_only,
52 void (*callback) (struct font_cache_entry* p, void *callback_data), 60 void (*callback) (struct font_cache_entry* p, void *callback_data),
53 void *callback_data); 61 void *callback_data);
54 62