8d2c6b6df3c1bcab22a86946a7f9938515e2b4f1
[kernel/u-boot.git] / include / fbutils.h
1 /*
2  * Copyright(C) 2009 Samsung Electronics
3  * InKi Dae <inki.dae@samsung.com>
4  *
5  *  This file is subject to the terms and conditions of the GNU General Public
6  *  License.  See the file COPYING in the main directory of this archive
7  *  for more details.
8  */
9
10 #ifndef _FONT_H
11 #define _FONT_H
12
13 #include <linux/types.h>
14
15 struct fbcon_font_desc {
16     int idx;
17     char *name;
18     int width, height;
19     char *data;
20     int pref;
21 };
22
23 /* define 8 index color table */
24 enum {
25         FONT_BLACK      = 0,
26         FONT_RED,
27         FONT_GREEN,
28         FONT_BLUE,
29         FONT_YELLOW,
30         FONT_MAGENTA,
31         FONT_AQUA,
32         FONT_WHITE,
33         FONT_XOR,
34 };
35
36 #define VGA8x8_IDX      0
37 #define VGA8x16_IDX     1
38
39 /* Max. length for the name of a predefined font */
40 #define MAX_FONT_NAME   32
41
42 /* max index color count */
43 #define MAX_INDEX_TABLE         (8 + 1)
44
45 /* initialize font module and then create color table. */
46 void init_font(void);
47
48 /* exit font module. */
49 void exit_font(void);
50
51 /* set font color */
52 void set_font_color(unsigned char index);
53
54 /* set coordinates for x and y axis */
55 void set_font_xy(unsigned int x, unsigned int y);
56
57 /* get coordinates for x and y axis */
58 void get_font_xy(unsigned int *x, unsigned int *y);
59
60 /* draw string with user-requested color */
61 void fb_printf(char *s);
62
63 /* draw wheel */
64 void draw_wheel(int x, int y, unsigned char color);
65
66 /* draw progress */
67 void draw_progress(int y, int per, unsigned char color);
68
69 #endif /* _FONT_H */