File: colorwin.c

package info (click to toggle)
glhack 1.2-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 26,744 kB
  • ctags: 21,239
  • sloc: ansic: 208,571; cpp: 13,139; yacc: 2,005; makefile: 1,155; lex: 377; sh: 121; awk: 89; sed: 11
file content (256 lines) | stat: -rw-r--r-- 8,386 bytes parent folder | download | duplicates (29)
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
SHORT Col_BorderVectors1[] = {
	0,0,
	59,0,
	59,12,
	0,12,
	0,0
};
struct Border Col_Border1 = {
	-1,-1,	/* XY origin relative to container TopLeft */
	3,0,JAM1,	/* front pen, back pen and drawmode */
	5,	/* number of XY vectors */
	Col_BorderVectors1,	/* pointer to XY vectors */
	NULL	/* next border in list */
};

struct IntuiText Col_IText1 = {
	7,0,JAM1,	/* front and back text pens, drawmode and fill byte */
	13,1,	/* XY origin relative to container TopLeft */
	NULL,	/* font pointer or NULL for default */
	"Save",	/* pointer to text */
	NULL	/* next IntuiText structure */
};

struct Gadget Col_Save = {
	NULL,	/* next gadget */
	9,77,	/* origin XY of hit box relative to window TopLeft */
	58,11,	/* hit box width and height */
	NULL,	/* gadget flags */
	RELVERIFY,	/* activation flags */
	BOOLGADGET,	/* gadget type flags */
	(APTR)&Col_Border1,	/* gadget border or image to be rendered */
	NULL,	/* alternate imagery for selection */
	&Col_IText1,	/* first IntuiText structure */
	NULL,	/* gadget mutual-exclude long word */
	NULL,	/* SpecialInfo structure */
	GADCOLSAVE,	/* user-definable data */
	NULL	/* pointer to user-definable data */
};

SHORT Col_BorderVectors2[] = {
	0,0,
	59,0,
	59,12,
	0,12,
	0,0
};
struct Border Col_Border2 = {
	-1,-1,	/* XY origin relative to container TopLeft */
	3,0,JAM1,	/* front pen, back pen and drawmode */
	5,	/* number of XY vectors */
	Col_BorderVectors2,	/* pointer to XY vectors */
	NULL	/* next border in list */
};

struct IntuiText Col_IText2 = {
	7,0,JAM1,	/* front and back text pens, drawmode and fill byte */
	17,1,	/* XY origin relative to container TopLeft */
	NULL,	/* font pointer or NULL for default */
	"Use",	/* pointer to text */
	NULL	/* next IntuiText structure */
};

struct Gadget Col_Okay = {
	&Col_Save,	/* next gadget */
	128,77,	/* origin XY of hit box relative to window TopLeft */
	58,11,	/* hit box width and height */
	NULL,	/* gadget flags */
	RELVERIFY,	/* activation flags */
	BOOLGADGET,	/* gadget type flags */
	(APTR)&Col_Border2,	/* gadget border or image to be rendered */
	NULL,	/* alternate imagery for selection */
	&Col_IText2,	/* first IntuiText structure */
	NULL,	/* gadget mutual-exclude long word */
	NULL,	/* SpecialInfo structure */
	GADCOLOKAY,	/* user-definable data */
	NULL	/* pointer to user-definable data */
};

SHORT Col_BorderVectors3[] = {
	0,0,
	59,0,
	59,12,
	0,12,
	0,0
};
struct Border Col_Border3 = {
	-1,-1,	/* XY origin relative to container TopLeft */
	3,0,JAM1,	/* front pen, back pen and drawmode */
	5,	/* number of XY vectors */
	Col_BorderVectors3,	/* pointer to XY vectors */
	NULL	/* next border in list */
};

struct IntuiText Col_IText3 = {
	7,0,JAM1,	/* front and back text pens, drawmode and fill byte */
	6,1,	/* XY origin relative to container TopLeft */
	NULL,	/* font pointer or NULL for default */
	"Cancel",	/* pointer to text */
	NULL	/* next IntuiText structure */
};

struct Gadget Col_Cancel = {
	&Col_Okay,	/* next gadget */
	244,77,	/* origin XY of hit box relative to window TopLeft */
	58,11,	/* hit box width and height */
	NULL,	/* gadget flags */
	RELVERIFY,	/* activation flags */
	BOOLGADGET,	/* gadget type flags */
	(APTR)&Col_Border3,	/* gadget border or image to be rendered */
	NULL,	/* alternate imagery for selection */
	&Col_IText3,	/* first IntuiText structure */
	NULL,	/* gadget mutual-exclude long word */
	NULL,	/* SpecialInfo structure */
	GADCOLCANCEL,	/* user-definable data */
	NULL	/* pointer to user-definable data */
};

struct PropInfo Col_Col_RedPenSInfo = {
	AUTOKNOB+FREEHORIZ,	/* PropInfo flags */
	0,0,	/* horizontal and vertical pot values */
	-1,-1,	/* horizontal and vertical body values */
};

struct Image Col_Image1 = {
	0,0,	/* XY origin relative to container TopLeft */
	263,7,	/* Image width and height in pixels */
	0,	/* number of bitplanes in Image */
	NULL,	/* pointer to ImageData */
	0x0000,0x0000,	/* PlanePick and PlaneOnOff */
	NULL	/* next Image structure */
};

struct Gadget Col_RedPen = {
	&Col_Cancel,	/* next gadget */
	32,12,	/* origin XY of hit box relative to window TopLeft */
	271,11,	/* hit box width and height */
	NULL,	/* gadget flags */
	RELVERIFY+GADGIMMEDIATE+FOLLOWMOUSE,	/* activation flags */
	PROPGADGET,	/* gadget type flags */
	(APTR)&Col_Image1,	/* gadget border or image to be rendered */
	NULL,	/* alternate imagery for selection */
	NULL,	/* first IntuiText structure */
	NULL,	/* gadget mutual-exclude long word */
	(APTR)&Col_Col_RedPenSInfo,	/* SpecialInfo structure */
	GADREDPEN,	/* user-definable data */
	NULL	/* pointer to user-definable data */
};

struct PropInfo Col_Col_GreenPenSInfo = {
	AUTOKNOB+FREEHORIZ,	/* PropInfo flags */
	0,0,	/* horizontal and vertical pot values */
	-1,-1,	/* horizontal and vertical body values */
};

struct Image Col_Image2 = {
	0,0,	/* XY origin relative to container TopLeft */
	263,7,	/* Image width and height in pixels */
	0,	/* number of bitplanes in Image */
	NULL,	/* pointer to ImageData */
	0x0000,0x0000,	/* PlanePick and PlaneOnOff */
	NULL	/* next Image structure */
};

struct Gadget Col_GreenPen = {
	&Col_RedPen,	/* next gadget */
	32,24,	/* origin XY of hit box relative to window TopLeft */
	271,11,	/* hit box width and height */
	NULL,	/* gadget flags */
	RELVERIFY+GADGIMMEDIATE+FOLLOWMOUSE,	/* activation flags */
	PROPGADGET,	/* gadget type flags */
	(APTR)&Col_Image2,	/* gadget border or image to be rendered */
	NULL,	/* alternate imagery for selection */
	NULL,	/* first IntuiText structure */
	NULL,	/* gadget mutual-exclude long word */
	(APTR)&Col_Col_GreenPenSInfo,	/* SpecialInfo structure */
	GADGREENPEN,	/* user-definable data */
	NULL	/* pointer to user-definable data */
};

struct PropInfo Col_Col_BluePenSInfo = {
	AUTOKNOB+FREEHORIZ,	/* PropInfo flags */
	0,0,	/* horizontal and vertical pot values */
	-1,-1,	/* horizontal and vertical body values */
};

struct Image Col_Image3 = {
	0,0,	/* XY origin relative to container TopLeft */
	263,7,	/* Image width and height in pixels */
	0,	/* number of bitplanes in Image */
	NULL,	/* pointer to ImageData */
	0x0000,0x0000,	/* PlanePick and PlaneOnOff */
	NULL	/* next Image structure */
};

struct Gadget Col_BluePen = {
	&Col_GreenPen,	/* next gadget */
	32,36,	/* origin XY of hit box relative to window TopLeft */
	271,11,	/* hit box width and height */
	NULL,	/* gadget flags */
	RELVERIFY+GADGIMMEDIATE+FOLLOWMOUSE,	/* activation flags */
	PROPGADGET,	/* gadget type flags */
	(APTR)&Col_Image3,	/* gadget border or image to be rendered */
	NULL,	/* alternate imagery for selection */
	NULL,	/* first IntuiText structure */
	NULL,	/* gadget mutual-exclude long word */
	(APTR)&Col_Col_BluePenSInfo,	/* SpecialInfo structure */
	GADBLUEPEN,	/* user-definable data */
	NULL	/* pointer to user-definable data */
};

#define Col_GadgetList1 Col_BluePen

struct IntuiText Col_IText6 = {
	3,0,JAM1,	/* front and back text pens, drawmode and fill byte */
	17,38,	/* XY origin relative to container TopLeft */
	NULL,	/* font pointer or NULL for default */
	"B",	/* pointer to text */
	NULL	/* next IntuiText structure */
};

struct IntuiText Col_IText5 = {
	4,0,JAM1,	/* front and back text pens, drawmode and fill byte */
	16,26,	/* XY origin relative to container TopLeft */
	NULL,	/* font pointer or NULL for default */
	"G",	/* pointer to text */
	&Col_IText6	/* next IntuiText structure */
};

struct IntuiText Col_IText4 = {
	7,0,JAM1,	/* front and back text pens, drawmode and fill byte */
	16,14,	/* XY origin relative to container TopLeft */
	NULL,	/* font pointer or NULL for default */
	"R",	/* pointer to text */
	&Col_IText5	/* next IntuiText structure */
};

#define Col_IntuiTextList1 Col_IText4

struct NewWindow Col_NewWindowStructure1 = {
	175,45,	/* window XY origin relative to TopLeft of screen */
	312,93,	/* window width and height */
	0,1,	/* detail and block pens */
	MOUSEBUTTONS+MOUSEMOVE+GADGETDOWN+GADGETUP+CLOSEWINDOW+VANILLAKEY+INTUITICKS,	/* IDCMP flags */
	WINDOWDRAG+WINDOWDEPTH+WINDOWCLOSE+ACTIVATE+NOCAREREFRESH,	/* other window flags */
	&Col_BluePen,	/* first gadget in gadget list */
	NULL,	/* custom CHECKMARK imagery */
	"Edit Screen Colors",	/* window title */
	NULL,	/* custom screen pointer */
	NULL,	/* custom bitmap */
	5,5,	/* minimum width and height */
	-1,-1,	/* maximum width and height */
	CUSTOMSCREEN	/* destination screen type */
};


/* end of PowerWindows source generation */