upload tizen1.0 source
[kernel/linux-2.6.36.git] / drivers / video / fbutil.h
1 /*
2  * Copyright(C) 2010 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 _FBUTILS_H
11 #define _FBUTILS_H
12
13 struct fbutil_font_desc {
14     int idx;
15     char *name;
16     int width, height;
17     char *data;
18     int pref;
19 };
20
21 /* define 8 index color table */
22 enum {
23         FONT_BLACK      = 0,
24         FONT_RED,
25         FONT_GREEN,
26         FONT_BLUE,
27         FONT_YELLOW,
28         FONT_MAGENTA,
29         FONT_AQUA,
30         FONT_WHITE,
31         FONT_XOR,
32 };
33
34 #define VGA8x8_IDX      0
35 #define VGA8x16_IDX     1
36
37 /* Max. length for the name of a predefined font */
38 #define MAX_FONT_NAME   32
39
40 /* max index color count */
41 #define MAX_INDEX_TABLE         (8 + 1)
42
43 /* set font color */
44 void set_font_color(unsigned char index);
45
46 /* set coordinates for x and y axis */
47 void set_font_xy(unsigned int x, unsigned int y);
48
49 /* get coordinates for x and y axis */
50 void get_font_xy(unsigned int *x, unsigned int *y);
51
52 /* draw string with user-requested color */
53 void fb_printk(const char *s, ...);
54
55 /* clear the framebuffer */
56 void fb_clear(int range);
57
58 /* get current string position. */
59 unsigned int get_chars(void);
60
61 /* exit font module. */
62 void exit_font(void);
63
64 /* initialize font module and then create color table. */
65 void init_font(void);
66
67 #endif /* _FBUTILS_H */