Hardware Design: SIE
Sign in or create your account | Project List | Help
Hardware Design: SIE Git Source Tree
Root/
| 1 | /* |
| 2 | * fbutils.h |
| 3 | * |
| 4 | * Headers for utility routines for framebuffer interaction |
| 5 | * |
| 6 | * Copyright 2002 Russell King and Doug Lowder |
| 7 | * |
| 8 | * This file is placed under the GPL. Please see the |
| 9 | * file COPYING for details. |
| 10 | * |
| 11 | */ |
| 12 | |
| 13 | #ifndef _FBUTILS_H |
| 14 | #define _FBUTILS_H |
| 15 | |
| 16 | #include <asm/types.h> |
| 17 | #include <linux/types.h> |
| 18 | |
| 19 | /* This constant, being ORed with the color index tells the library |
| 20 | * to draw in exclusive-or mode (that is, drawing the same second time |
| 21 | * in the same place will remove the element leaving the background intact). |
| 22 | */ |
| 23 | #define XORMODE 0x80000000 |
| 24 | |
| 25 | extern __u32 xres, yres; |
| 26 | |
| 27 | int open_framebuffer(void); |
| 28 | void close_framebuffer(void); |
| 29 | void setcolor(unsigned colidx, unsigned value); |
| 30 | void put_cross(int x, int y, unsigned colidx); |
| 31 | void put_string(int x, int y, char *s, unsigned colidx); |
| 32 | void put_string_center(int x, int y, char *s, unsigned colidx); |
| 33 | void pixel (int x, int y, unsigned colidx); |
| 34 | void line (int x1, int y1, int x2, int y2, unsigned colidx); |
| 35 | void rect (int x1, int y1, int x2, int y2, unsigned colidx); |
| 36 | void fillrect (int x1, int y1, int x2, int y2, unsigned colidx); |
| 37 | void setColorsFromDefaultPallet(); |
| 38 | void put_int(int x, int y, int c, int colidx); |
| 39 | |
| 40 | /* |
| 41 | *FONT |
| 42 | */ |
| 43 | |
| 44 | struct fbcon_font_desc { |
| 45 | int idx; |
| 46 | const char *name; |
| 47 | int width, height; |
| 48 | unsigned char *data; |
| 49 | int pref; |
| 50 | }; |
| 51 | |
| 52 | #define VGA8x8_IDX 0 |
| 53 | #define PEARL8x8_IDX 2 |
| 54 | #define VGA6x11_IDX 3 |
| 55 | #define SUN8x16_IDX 4 |
| 56 | #define SUN12x22_IDX 5 |
| 57 | #define ACORN8x8_IDX 6 |
| 58 | |
| 59 | /* Max. length for the name of a predefined font */ |
| 60 | #define MAX_FONT_NAME 32 |
| 61 | #define FONTDATAMAX 2048 |
| 62 | |
| 63 | #endif /* _FBUTILS_H */ |
| 64 |
Branches:
master
