summaryrefslogtreecommitdiff
path: root/rufl.h
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-11-20 20:08:55 +0000
committerJames Bursa <james@netsurf-browser.org>2005-11-20 20:08:55 +0000
commit731b0520fd4584d0dc47e77b231ee55887820b5e (patch)
tree9c7162cf2af0590a90a5af0a9c1346d54ab58e75 /rufl.h
parent0ce184db11c3a566832f49eea010aa1424a37f43 (diff)
downloadlibrufl-731b0520fd4584d0dc47e77b231ee55887820b5e.tar.gz
librufl-731b0520fd4584d0dc47e77b231ee55887820b5e.tar.bz2
[project @ 2005-11-20 20:08:55 by bursa]
Implement rufl_paint_callback(). svn path=/import/rufl/; revision=2465
Diffstat (limited to 'rufl.h')
-rw-r--r--rufl.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/rufl.h b/rufl.h
index 4e2181e..68cddf3 100644
--- a/rufl.h
+++ b/rufl.h
@@ -113,6 +113,24 @@ rufl_code rufl_split(const char *font_family, rufl_style font_style,
size_t *char_offset, int *actual_x);
+/** Type of callback function for rufl_paint_callback(). */
+typedef void (*rufl_callback_t)(void *context,
+ const char *font_name, unsigned int font_size,
+ const char *s8, unsigned short *s16, unsigned int n,
+ int x, int y);
+
+
+/**
+ * Render text, but call a callback instead of each call to Font_Paint.
+ */
+
+rufl_code rufl_paint_callback(const char *font_family, rufl_style font_style,
+ unsigned int font_size,
+ const char *string, size_t length,
+ int x, int y,
+ rufl_callback_t callback, void *context);
+
+
/**
* Dump the internal library state to stdout.
*/