Rev 1063 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
471 | giacomo | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Giacomo Guidi <giacomo@gandalf.sssup.it> |
||
10 | * |
||
11 | * |
||
12 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
13 | * |
||
14 | * http://www.sssup.it |
||
15 | * http://retis.sssup.it |
||
16 | * http://shark.sssup.it |
||
17 | */ |
||
18 | |||
1063 | tullio | 19 | /* |
20 | * This program is free software; you can redistribute it and/or modify |
||
21 | * it under the terms of the GNU General Public License as published by |
||
22 | * the Free Software Foundation; either version 2 of the License, or |
||
23 | * (at your option) any later version. |
||
24 | * |
||
25 | * This program is distributed in the hope that it will be useful, |
||
26 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
27 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
28 | * GNU General Public License for more details. |
||
29 | * |
||
30 | * You should have received a copy of the GNU General Public License |
||
31 | * along with this program; if not, write to the Free Software |
||
32 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
33 | * |
||
34 | */ |
||
35 | |||
471 | giacomo | 36 | /* Glue Layer Header Linux Frame Buffer 2.6 Driver*/ |
37 | |||
38 | #ifndef __SHARK_FB26__ |
||
39 | #define __SHARK_FB26__ |
||
40 | |||
41 | /* Init the FB 2.6 Driver */ |
||
484 | giacomo | 42 | int FB26_init(); |
471 | giacomo | 43 | |
484 | giacomo | 44 | /* Open FB */ |
471 | giacomo | 45 | int FB26_open(int num); |
46 | |||
47 | /* Close the FB */ |
||
48 | int FB26_close(int num); |
||
49 | |||
484 | giacomo | 50 | /* Set mode */ |
51 | int FB26_setmode(int num, unsigned char *modeopt); |
||
52 | |||
529 | giacomo | 53 | /* Use old GRX library to draw */ |
54 | int FB26_use_grx(int num); |
||
55 | |||
56 | /* GRX emulation under FrameBuffer */ |
||
57 | |||
58 | void grx_plot(WORD x, WORD y, DWORD color); |
||
59 | DWORD grx_getpixel(WORD x, WORD y); |
||
743 | giacomo | 60 | void grx_getimage(WORD x1, WORD y1, WORD x2, WORD y2, WORD *buf); |
61 | void grx_putimage(WORD x1, WORD y1, WORD x2, WORD y2, WORD *buf); |
||
529 | giacomo | 62 | void grx_box(WORD x1, WORD y1, WORD x2, WORD y2, DWORD color); |
531 | giacomo | 63 | void grx_clear(DWORD color); |
529 | giacomo | 64 | void grx_rect(WORD x1, WORD y1, WORD x2, WORD y2, DWORD color); |
65 | void grx_line(WORD x1, WORD y1, WORD x2, WORD y2, DWORD color); |
||
66 | void grx_text(char *text, WORD x, WORD y, DWORD fg, DWORD bg); |
||
67 | void grx_circle(WORD x, WORD y, WORD r, DWORD col); |
||
68 | void grx_disc(WORD x, WORD y, WORD r, DWORD col); |
||
69 | |||
998 | mauro | 70 | int vga16color[16]; |
71 | |||
531 | giacomo | 72 | /* 15bpp, 16bpp, 24bpp and 32bpp colors... */ |
73 | #define color15(r, g, b) (((WORD)(r & 0x1F) << 10) | ((WORD)(g & 0x1F) << 5) | ((WORD)(b & 0x1F))) |
||
74 | #define color16(r, g, b) (((WORD)(r & 0x1F) << 11) | ((WORD)(g & 0x3F) << 5) | ((WORD)(b & 0x1F))) |
||
75 | #define color24(r, g, b) (((DWORD)(r & 0xFF) << 16) | ((DWORD)(g & 0xFF) << 8) | (DWORD)(b & 0xFF)) |
||
76 | #define color32(r, g, b) (((DWORD)(r & 0xFF) << 16) | ((DWORD)(g & 0xFF) << 8) | (DWORD)(b & 0xFF)) |
||
77 | |||
78 | #define rgb15(r, g, b) ((((WORD)(r & 0xF8)>>3) << 10) | (((WORD)(g & 0xF8)>>3) << 5) | ((WORD)(b & 0xF8)>>3)) |
||
79 | #define rgb16(r, g, b) ((((WORD)(r & 0xF8)>>3) << 11) | (((WORD)(g & 0xFC)>>2) << 5) | ((WORD)(b & 0xF8)>>3)) |
||
80 | #define rgb24(r, g, b) (((DWORD)(r & 0xFF) << 16) | ((DWORD)(g & 0xFF) << 8) | (DWORD)(b & 0xFF)) |
||
81 | #define rgb32(r, g, b) (((DWORD)(r & 0xFF) << 16) | ((DWORD)(g & 0xFF) << 8) | (DWORD)(b & 0xFF)) |
||
82 | |||
471 | giacomo | 83 | #endif |
84 |