comparison libmlk-core/core/font.h @ 292:08ab73b32832

misc: add extern "C" {} blocks for C++ friends
author David Demelier <markand@malikania.fr>
date Fri, 05 Mar 2021 10:08:09 +0100
parents c4da052c0def
children 196264679079
comparison
equal deleted inserted replaced
291:5d8700074dd7 292:08ab73b32832
20 #define MOLKO_CORE_FONT_H 20 #define MOLKO_CORE_FONT_H
21 21
22 #include <stdbool.h> 22 #include <stdbool.h>
23 #include <stddef.h> 23 #include <stddef.h>
24 24
25 #include "core.h"
26
25 struct texture; 27 struct texture;
26 28
27 enum font_style { 29 enum font_style {
28 FONT_STYLE_ANTIALIASED, 30 FONT_STYLE_ANTIALIASED,
29 FONT_STYLE_NONE 31 FONT_STYLE_NONE
31 33
32 struct font { 34 struct font {
33 enum font_style style; 35 enum font_style style;
34 void *handle; 36 void *handle;
35 }; 37 };
38
39 CORE_BEGIN_DECLS
36 40
37 bool 41 bool
38 font_open(struct font *font, const char *path, unsigned int size); 42 font_open(struct font *font, const char *path, unsigned int size);
39 43
40 bool 44 bool
53 font_query(const struct font *font, const char *text, unsigned int *w, unsigned int *h); 57 font_query(const struct font *font, const char *text, unsigned int *w, unsigned int *h);
54 58
55 void 59 void
56 font_finish(struct font *font); 60 font_finish(struct font *font);
57 61
62 CORE_END_DECLS
63
58 #endif /* !MOLKO_CORE_FONT_H */ 64 #endif /* !MOLKO_CORE_FONT_H */