3535
3636#include "../color.h" /* video_color_t */
3737#include "../types.h"
38- #include "gfx-flags.h"
39-
40-
41- #if 0 /* TODO */
42- /* Possible values for `video_font_gfx_flag_t' */
43- #define VIDEO_FONT_GFX_F_NORMAL 0x0000 /* Normal font GFX flags */
44- #define VIDEO_FONT_GFX_F_FGONLY VIDEO_GFX_F_COLORKEY /* Only render foreground */
45- #define VIDEO_FONT_GFX_F_LINEAR VIDEO_GFX_F_LINEAR /* Use linear interpolation when stretching non-vector glyphs */
46- #endif
4738
4839#ifdef __CC__
4940__DECL_BEGIN
5041
51- #if 0 /* TODO */
52- /* Set of `VIDEO_FONT_GFX_F*' */
53- typedef video_gfx_flag_t video_font_gfx_flag_t ;
54- #endif
55-
5642struct video_gfx ;
5743struct video_font ;
5844
5945struct video_font_ops {
6046 /* All operators within this structure are [1..1] */
6147
62- #if 0 /* TODO */
63- __ATTR_NONNULL_T ((1 )) void
64- (LIBVIDEO_GFX_CC * vfo_getgfx )(struct video_font * __restrict __self );
65- #endif
66-
6748 /* Destroy the given video font object. */
6849 __ATTR_NONNULL_T ((1 )) void
6950 (LIBVIDEO_GFX_CC * vfo_destroy )(struct video_font * __restrict __self );
@@ -102,15 +83,9 @@ struct video_font_ops {
10283
10384
10485struct video_font {
105- #if 0 /* TODO */
106- struct video_font_ops vf_ops ; /* [1..1][const] Operators. */
107- struct video_domain const * vf_domain ; /* [1..1][const] Domain in which this font is opened. */
108- __uintptr_t vf_refcnt ; /* Reference counter. */
109- /* Remainder of this structure contains type-specific data. */
110- #else
111- __uintptr_t vf_refcnt ; /* Reference counter. */
112- struct video_font_ops * vf_ops ; /* [1..1] Operators. */
113- #endif
86+ struct video_font_ops const * vf_ops ; /* [1..1][const] Operators. */
87+ struct video_domain const * vf_domain ; /* [1..1][const] Domain for which this font was allocated. */
88+ __uintptr_t vf_refcnt ; /* Reference counter. */
11489};
11590
11691#define video_font_destroy (self ) (*(self)->vf_ops->vfo_destroy)(self)
@@ -123,37 +98,17 @@ __DEFINE_REFCNT_FUNCTIONS(struct video_font, vf_refcnt, video_font_destroy)
12398
12499
125100
126- #if 0 /* TODO */
127- struct video_font_gfx {
128- struct video_font const * vfx_font ; /* [1..1][const] The font used for printing. */
129- video_dim_t vfx_height ; /* Glyph height. */
130- video_color_t vfx_bg_fg [2 ]; /* Output colors for the next glyph. */
131- void * _vfx_drv1 [2 ]; /* ... (may be used internally) */
132- video_font_gfx_flag_t vfx_flags ; /* Set of `' */
133- void * _vfx_drv2 [2 ]; /* ... (may be used internally) */
134- };
135- #endif
136-
137-
138101/* Lookup and return a reference to a video font, given its name.
139102 * @param: name: The font's name (the name of a file in `/lib/fonts/',
140103 * or an absolute path if it contains a `/'). Else, you
141104 * may also pass one of `VIDEO_FONT_*'
142105 * @return: NULL: [errno=ENOENT] Unknown font `name' */
143- #if 0 /* TODO */
144106typedef __ATTR_WUNUSED_T __ATTR_NONNULL_T ((1 )) __REF struct video_font *
145107(LIBVIDEO_GFX_CC * PVIDEO_FONT_LOOKUP )(struct video_domain const * __restrict __domain , char const * __name );
146108#ifdef LIBVIDEO_GFX_WANT_PROTOTYPES
147109LIBVIDEO_GFX_DECL __ATTR_WUNUSED __ATTR_NONNULL ((1 )) __REF struct video_font * LIBVIDEO_GFX_CC
148110video_font_lookup (struct video_domain const * __restrict __domain , char const * __name );
149111#endif /* LIBVIDEO_GFX_WANT_PROTOTYPES */
150- #else
151- typedef __ATTR_WUNUSED_T __REF struct video_font *
152- (LIBVIDEO_GFX_CC * PVIDEO_FONT_LOOKUP )(char const * __name );
153- #ifdef LIBVIDEO_GFX_WANT_PROTOTYPES
154- LIBVIDEO_GFX_DECL __ATTR_WUNUSED __REF struct video_font * LIBVIDEO_GFX_CC video_font_lookup (char const * __name );
155- #endif /* LIBVIDEO_GFX_WANT_PROTOTYPES */
156- #endif
157112
158113/* Special font names. */
159114#define VIDEO_FONT_DEFAULT (__CCAST(char const *)-1) /* Default system font. */
0 commit comments