Subversion Repositories freemyipod

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
881 theseven 1
#ifndef __INTERFACE_TEXTRENDERER_TEXTRENDERER_H__
2
#define __INTERFACE_TEXTRENDERER_TEXTRENDERER_H__
3
 
4
#include "global.h"
5
#include "interface/framebuffer/framebuffer.h"
6
 
7
 
8
struct __attribute__((packed,aligned(4))) textrenderer_instance;
9
 
10
 
11
struct __attribute__((packed,aligned(4))) textrenderer_driver
12
{
13
    void (*init)(const struct textrenderer_instance* instance);
14
    int (*get_line_height)(const struct textrenderer_instance* instance);
15
    int (*get_max_width)(const struct textrenderer_instance* instance);
16
    int (*render_char)(const struct textrenderer_instance* instance,
17
                       const struct framebuffer_instance* fb, int x, int y, uint32_t color, char c);
18
};
19
 
20
 
21
struct __attribute__((packed,aligned(4))) textrenderer_instance
22
{
23
    const struct textrenderer_driver* driver;
24
    const void* driver_config;
25
    void* driver_state;
26
};
27
 
28
 
29
extern void textrenderer_init(const struct textrenderer_instance* instance);
30
extern int textrenderer_get_line_height(const struct textrenderer_instance* instance);
31
extern int textrenderer_get_max_width(const struct textrenderer_instance* instance);
32
extern int textrenderer_render_char(const struct textrenderer_instance* instance,
33
                                    const struct framebuffer_instance* fb, int x, int y, uint32_t color, char c);
34
 
35
 
36
#endif