6663b6c9
adorian
projet complet av...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
/*
** Nofrendo (c) 1998-2000 Matthew Conte (matt@conte.com)
**
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of version 2 of the GNU Library General
** Public License as published by the Free Software Foundation.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Library General Public License for more details. To obtain a
** copy of the GNU Library General Public License, write to the Free
** Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
** Any permitted reproduction of these routines, in whole or in part,
** must bear this legend.
**
**
** gui_elem.c
**
** GUI elements (font, mouse pointer, etc.)
** $Id: gui_elem.c,v 1.2 2001/04/27 14:37:11 neil Exp $
*/
#include <stdlib.h>
#include <noftypes.h>
#include <gui.h>
#include <gui_elem.h>
#define SMALL_FONT_KERN 6
#define SMALL_FONT_HEIGHT 6
static fontchar_t small_data[] =
{
{ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, SMALL_FONT_KERN }, /* space */
{ { 0x20, 0x20, 0x20, 0x00, 0x20, 0x00 }, SMALL_FONT_KERN },
{ { 0x50, 0x50, 0x00, 0x00, 0x00, 0x00 }, SMALL_FONT_KERN },
{ { 0x50, 0xF8, 0x50, 0xF8, 0x50, 0x00 }, SMALL_FONT_KERN },
{ { 0x20, 0x78, 0x20, 0xF0, 0x20, 0x00 }, SMALL_FONT_KERN },
{ { 0xC8, 0xD0, 0x20, 0x58, 0x98, 0x00 }, SMALL_FONT_KERN },
{ { 0x40, 0xA0, 0x58, 0x90, 0xF0, 0x00 }, SMALL_FONT_KERN },
{ { 0x20, 0x40, 0x00, 0x00, 0x00, 0x00 }, SMALL_FONT_KERN },
{ { 0x20, 0x40, 0x40, 0x40, 0x20, 0x00 }, SMALL_FONT_KERN },
{ { 0x20, 0x10, 0x10, 0x10, 0x20, 0x00 }, SMALL_FONT_KERN },
{ { 0x00, 0x50, 0x20, 0x50, 0x00, 0x00 }, SMALL_FONT_KERN },
{ { 0x00, 0x20, 0x70, 0x20, 0x00, 0x00 }, SMALL_FONT_KERN },
{ { 0x00, 0x00, 0x00, 0x20, 0x40, 0x00 }, SMALL_FONT_KERN },
{ { 0x00, 0x00, 0x70, 0x00, 0x00, 0x00 }, SMALL_FONT_KERN },
{ { 0x00, 0x00, 0x00, 0x00, 0x20, 0x00 }, SMALL_FONT_KERN },
{ { 0x08, 0x10, 0x20, 0x40, 0x80, 0x00 }, SMALL_FONT_KERN },
/* 0-9 */
{ { 0x70, 0x98, 0xA8, 0xC8, 0x70, 0x00 }, SMALL_FONT_KERN },
{ { 0x60, 0x20, 0x20, 0x20, 0xF8, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0x08, 0x70, 0x80, 0xF8, 0x00 }, SMALL_FONT_KERN },
{ { 0x70, 0x88, 0x30, 0x88, 0x70, 0x00 }, SMALL_FONT_KERN },
{ { 0x30, 0x50, 0x90, 0xF8, 0x10, 0x00 }, SMALL_FONT_KERN },
{ { 0xF8, 0x80, 0x70, 0x08, 0xF0, 0x00 }, SMALL_FONT_KERN },
{ { 0x70, 0x80, 0xF0, 0x88, 0x70, 0x00 }, SMALL_FONT_KERN },
{ { 0xF8, 0x08, 0x10, 0x20, 0x20, 0x00 }, SMALL_FONT_KERN },
{ { 0x70, 0x88, 0x70, 0x88, 0x70, 0x00 }, SMALL_FONT_KERN },
{ { 0x70, 0x88, 0x78, 0x08, 0x70, 0x00 }, SMALL_FONT_KERN },
{ { 0x00, 0x20, 0x00, 0x20, 0x00, 0x00 }, SMALL_FONT_KERN },
{ { 0x00, 0x20, 0x00, 0x20, 0x40, 0x00 }, SMALL_FONT_KERN },
{ { 0x10, 0x20, 0x40, 0x20, 0x10, 0x00 }, SMALL_FONT_KERN },
{ { 0x00, 0x70, 0x00, 0x70, 0x00, 0x00 }, SMALL_FONT_KERN },
{ { 0x40, 0x20, 0x10, 0x20, 0x40, 0x00 }, SMALL_FONT_KERN },
{ { 0x70, 0x88, 0x30, 0x00, 0x20, 0x00 }, SMALL_FONT_KERN },
{ { 0x70, 0x88, 0xA8, 0xB0, 0x78, 0x00 }, SMALL_FONT_KERN },
/* A-Z */
{ { 0x70, 0x88, 0xF8, 0x88, 0x88, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0x88, 0xF0, 0x88, 0xF0, 0x00 }, SMALL_FONT_KERN },
{ { 0x78, 0x80, 0x80, 0x80, 0x78, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0x88, 0x88, 0x88, 0xF0, 0x00 }, SMALL_FONT_KERN },
{ { 0xF8, 0x80, 0xF8, 0x80, 0x78, 0x00 }, SMALL_FONT_KERN },
{ { 0x78, 0x80, 0xF8, 0x80, 0x80, 0x00 }, SMALL_FONT_KERN },
{ { 0x78, 0x80, 0xB8, 0x88, 0xF0, 0x00 }, SMALL_FONT_KERN },
{ { 0x88, 0x88, 0xF8, 0x88, 0x88, 0x00 }, SMALL_FONT_KERN },
{ { 0xF8, 0x20, 0x20, 0x20, 0xF8, 0x00 }, SMALL_FONT_KERN },
{ { 0x08, 0x08, 0x08, 0x88, 0x70, 0x00 }, SMALL_FONT_KERN },
{ { 0x88, 0x90, 0xE0, 0x90, 0x88, 0x00 }, SMALL_FONT_KERN },
{ { 0x80, 0x80, 0x80, 0x80, 0x78, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0xA8, 0xA8, 0xA8, 0xA8, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0x88, 0x88, 0x88, 0x88, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0x88, 0x88, 0x88, 0x78, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0x88, 0xF0, 0x80, 0x80, 0x00 }, SMALL_FONT_KERN },
{ { 0x70, 0x88, 0x88, 0x90, 0x68, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0x88, 0xF0, 0x88, 0x88, 0x00 }, SMALL_FONT_KERN },
{ { 0x78, 0x80, 0x70, 0x08, 0xF0, 0x00 }, SMALL_FONT_KERN },
{ { 0xF8, 0x20, 0x20, 0x20, 0x20, 0x00 }, SMALL_FONT_KERN },
{ { 0x88, 0x88, 0x88, 0x88, 0x78, 0x00 }, SMALL_FONT_KERN },
{ { 0x88, 0x88, 0x88, 0x50, 0x20, 0x00 }, SMALL_FONT_KERN },
{ { 0xA8, 0xA8, 0xA8, 0xA8, 0x78, 0x00 }, SMALL_FONT_KERN },
{ { 0x88, 0x50, 0x20, 0x50, 0x88, 0x00 }, SMALL_FONT_KERN },
{ { 0x88, 0x88, 0x70, 0x20, 0x20, 0x00 }, SMALL_FONT_KERN },
{ { 0xF8, 0x08, 0x70, 0x80, 0xF8, 0x00 }, SMALL_FONT_KERN },
{ { 0x70, 0x40, 0x40, 0x40, 0x70, 0x00 }, SMALL_FONT_KERN },
{ { 0x80, 0x40, 0x20, 0x10, 0x08, 0x00 }, SMALL_FONT_KERN },
{ { 0x70, 0x10, 0x10, 0x10, 0x70, 0x00 }, SMALL_FONT_KERN },
{ { 0x20, 0x50, 0x00, 0x00, 0x00, 0x00 }, SMALL_FONT_KERN },
{ { 0x00, 0x00, 0x00, 0x00, 0x70, 0x00 }, SMALL_FONT_KERN },
{ { 0x20, 0x10, 0x00, 0x00, 0x00, 0x00 }, SMALL_FONT_KERN },
/* A-Z */
{ { 0x70, 0x88, 0xF8, 0x88, 0x88, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0x88, 0xF0, 0x88, 0xF0, 0x00 }, SMALL_FONT_KERN },
{ { 0x78, 0x80, 0x80, 0x80, 0x78, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0x88, 0x88, 0x88, 0xF0, 0x00 }, SMALL_FONT_KERN },
{ { 0xF8, 0x80, 0xF8, 0x80, 0x78, 0x00 }, SMALL_FONT_KERN },
{ { 0x78, 0x80, 0xF8, 0x80, 0x80, 0x00 }, SMALL_FONT_KERN },
{ { 0x78, 0x80, 0xB8, 0x88, 0xF0, 0x00 }, SMALL_FONT_KERN },
{ { 0x88, 0x88, 0xF8, 0x88, 0x88, 0x00 }, SMALL_FONT_KERN },
{ { 0xF8, 0x20, 0x20, 0x20, 0xF8, 0x00 }, SMALL_FONT_KERN },
{ { 0x08, 0x08, 0x08, 0x88, 0x70, 0x00 }, SMALL_FONT_KERN },
{ { 0x88, 0x90, 0xE0, 0x90, 0x88, 0x00 }, SMALL_FONT_KERN },
{ { 0x80, 0x80, 0x80, 0x80, 0x78, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0xA8, 0xA8, 0xA8, 0xA8, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0x88, 0x88, 0x88, 0x88, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0x88, 0x88, 0x88, 0x78, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0x88, 0xF0, 0x80, 0x80, 0x00 }, SMALL_FONT_KERN },
{ { 0x70, 0x88, 0x88, 0x90, 0x68, 0x00 }, SMALL_FONT_KERN },
{ { 0xF0, 0x88, 0xF0, 0x88, 0x88, 0x00 }, SMALL_FONT_KERN },
{ { 0x78, 0x80, 0x70, 0x08, 0xF0, 0x00 }, SMALL_FONT_KERN },
{ { 0xF8, 0x20, 0x20, 0x20, 0x20, 0x00 }, SMALL_FONT_KERN },
{ { 0x88, 0x88, 0x88, 0x88, 0x78, 0x00 }, SMALL_FONT_KERN },
{ { 0x88, 0x88, 0x88, 0x50, 0x20, 0x00 }, SMALL_FONT_KERN },
{ { 0xA8, 0xA8, 0xA8, 0xA8, 0x78, 0x00 }, SMALL_FONT_KERN },
{ { 0x88, 0x50, 0x20, 0x50, 0x88, 0x00 }, SMALL_FONT_KERN },
{ { 0x88, 0x88, 0x70, 0x20, 0x20, 0x00 }, SMALL_FONT_KERN },
{ { 0xF8, 0x08, 0x70, 0x80, 0xF8, 0x00 }, SMALL_FONT_KERN },
{ { 0x10, 0x20, 0x20, 0x20, 0x10, 0x00 }, SMALL_FONT_KERN },
{ { 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0x00 }, SMALL_FONT_KERN },
{ { 0x40, 0x20, 0x20, 0x20, 0x40, 0x00 }, SMALL_FONT_KERN },
{ { 0x50, 0xA0, 0x00, 0x00, 0x00, 0x00 }, SMALL_FONT_KERN },
{ { 0xF8, 0x88, 0x88, 0x88, 0xF8, 0x00 }, SMALL_FONT_KERN },
};
font_t small = { small_data, SMALL_FONT_HEIGHT };
const uint8 cursor_color[] =
{
0,
GUI_BLACK,
GUI_WHITE,
GUI_LTGRAY,
GUI_GRAY
};
const uint8 cursor[] =
{
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0,
4, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0,
4, 2, 3, 3, 1, 0, 0, 0, 0, 0, 0,
4, 2, 3, 3, 3, 1, 0, 0, 0, 0, 0,
4, 2, 2, 3, 3, 3, 1, 0, 0, 0, 0,
4, 2, 2, 3, 3, 3, 3, 1, 0, 0, 0,
4, 2, 2, 2, 3, 3, 3, 3, 1, 0, 0,
4, 2, 2, 2, 3, 3, 3, 3, 3, 1, 0,
4, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1,
4, 2, 3, 1, 2, 2, 1, 0, 0, 0, 0,
4, 3, 1, 0, 4, 2, 3, 1, 0, 0, 0,
4, 1, 0, 0, 4, 2, 3, 1, 0, 0, 0,
1, 0, 0, 0, 0, 4, 2, 3, 1, 0, 0,
0, 0, 0, 0, 0, 4, 2, 3, 1, 0, 0,
0, 0, 0, 0, 0, 0, 4, 2, 3, 1, 0,
0, 0, 0, 0, 0, 0, 4, 3, 3, 1, 0,
0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,
};
/*
** $Log: gui_elem.c,v $
** Revision 1.2 2001/04/27 14:37:11 neil
** wheeee
**
** Revision 1.1.1.1 2001/04/27 07:03:54 neil
** initial
**
** Revision 1.8 2000/10/10 13:03:54 matt
** Mr. Clean makes a guest appearance
**
** Revision 1.7 2000/07/31 04:28:46 matt
** one million cleanups
**
** Revision 1.6 2000/07/17 04:21:18 neil
** warning: initialization makes integer from pointer without a cast
**
** Revision 1.5 2000/07/17 01:52:27 matt
** made sure last line of all source files is a newline
**
** Revision 1.4 2000/06/09 15:12:25 matt
** initial revision
**
*/
|