OSDN Git Service

Initial Import
[nethackexpress/trunk.git] / sys / amiga / clipwin.c
1 static USHORT Palette[] = {
2         0x0AAA, /* color #0 */
3         0x0000, /* color #1 */
4         0x0FFF, /* color #2 */
5         0x058B, /* color #3 */
6         0x000F, /* color #4 */
7         0x0F0F, /* color #5 */
8         0x00FF, /* color #6 */
9         0x0FFF  /* color #7 */
10 #define PaletteColorCount 8
11 };
12
13 #define PALETTE Palette
14
15 static SHORT ClipBorderVectors1[] = {
16         0,0,
17         76,0,
18         76,11,
19         0,11,
20         0,0
21 };
22 static struct Border ClipBorder1 = {
23         -1,-1,  /* XY origin relative to container TopLeft */
24         3,0,JAM1,       /* front pen, back pen and drawmode */
25         5,      /* number of XY vectors */
26         ClipBorderVectors1,     /* pointer to XY vectors */
27         NULL    /* next border in list */
28 };
29
30 static struct IntuiText ClipIText1 = {
31         4,0,JAM1,       /* front and back text pens, drawmode and fill byte */
32         15,1,   /* XY origin relative to container TopLeft */
33         NULL,   /* font pointer or NULL for default */
34         "Cancel",       /* pointer to text */
35         NULL    /* next IntuiText structure */
36 };
37
38 static struct Gadget ClipCancel = {
39         NULL,   /* next gadget */
40         240,59, /* origin XY of hit box relative to window TopLeft */
41         75,10,  /* hit box width and height */
42         NULL,   /* gadget flags */
43         RELVERIFY,      /* activation flags */
44         BOOLGADGET,     /* gadget type flags */
45         (APTR)&ClipBorder1,     /* gadget border or image to be rendered */
46         NULL,   /* alternate imagery for selection */
47         &ClipIText1,    /* first IntuiText structure */
48         NULL,   /* gadget mutual-exclude long word */
49         NULL,   /* SpecialInfo structure */
50         GADCANCEL,      /* user-definable data */
51         NULL    /* pointer to user-definable data */
52 };
53
54 static SHORT ClipBorderVectors2[] = {
55         0,0,
56         78,0,
57         78,11,
58         0,11,
59         0,0
60 };
61 static struct Border ClipBorder2 = {
62         -1,-1,  /* XY origin relative to container TopLeft */
63         3,0,JAM1,       /* front pen, back pen and drawmode */
64         5,      /* number of XY vectors */
65         ClipBorderVectors2,     /* pointer to XY vectors */
66         NULL    /* next border in list */
67 };
68
69 static struct IntuiText ClipIText2 = {
70         4,0,JAM1,       /* front and back text pens, drawmode and fill byte */
71         24,1,   /* XY origin relative to container TopLeft */
72         NULL,   /* font pointer or NULL for default */
73         "Okay", /* pointer to text */
74         NULL    /* next IntuiText structure */
75 };
76
77 static struct Gadget ClipOkay = {
78         &ClipCancel,    /* next gadget */
79         17,60,  /* origin XY of hit box relative to window TopLeft */
80         77,10,  /* hit box width and height */
81         NULL,   /* gadget flags */
82         RELVERIFY,      /* activation flags */
83         BOOLGADGET,     /* gadget type flags */
84         (APTR)&ClipBorder2,     /* gadget border or image to be rendered */
85         NULL,   /* alternate imagery for selection */
86         &ClipIText2,    /* first IntuiText structure */
87         NULL,   /* gadget mutual-exclude long word */
88         NULL,   /* SpecialInfo structure */
89         GADOKAY,        /* user-definable data */
90         NULL    /* pointer to user-definable data */
91 };
92
93 static struct PropInfo ClipClipXCLIPSInfo = {
94         AUTOKNOB+FREEHORIZ,     /* PropInfo flags */
95         24504,-1,       /* horizontal and vertical pot values */
96         10922,-1,       /* horizontal and vertical body values */
97 };
98
99 static struct Image ClipImage1 = {
100         43,0,   /* XY origin relative to container TopLeft */
101         24,3,   /* Image width and height in pixels */
102         0,      /* number of bitplanes in Image */
103         NULL,   /* pointer to ImageData */
104         0x0000,0x0000,  /* PlanePick and PlaneOnOff */
105         NULL    /* next Image structure */
106 };
107
108 static struct IntuiText ClipIText3 = {
109         3,0,JAM1,       /* front and back text pens, drawmode and fill byte */
110         -116,-1,        /* XY origin relative to container TopLeft */
111         NULL,   /* font pointer or NULL for default */
112         "X Clip Border:",       /* pointer to text */
113         NULL    /* next IntuiText structure */
114 };
115
116 static struct Gadget ClipXCLIP = {
117         &ClipOkay,      /* next gadget */
118         134,37, /* origin XY of hit box relative to window TopLeft */
119         -199,7, /* hit box width and height */
120         GRELWIDTH,      /* gadget flags */
121         RELVERIFY+GADGIMMEDIATE,        /* activation flags */
122         PROPGADGET,     /* gadget type flags */
123         (APTR)&ClipImage1,      /* gadget border or image to be rendered */
124         NULL,   /* alternate imagery for selection */
125         &ClipIText3,    /* first IntuiText structure */
126         NULL,   /* gadget mutual-exclude long word */
127         (APTR)&ClipClipXCLIPSInfo,      /* SpecialInfo structure */
128         XCLIP,  /* user-definable data */
129         NULL    /* pointer to user-definable data */
130 };
131
132 static struct PropInfo ClipClipYCLIPSInfo = {
133         AUTOKNOB+FREEHORIZ,     /* PropInfo flags */
134         13106,-1,       /* horizontal and vertical pot values */
135         10922,-1,       /* horizontal and vertical body values */
136 };
137
138 static struct Image ClipImage2 = {
139         22,0,   /* XY origin relative to container TopLeft */
140         24,3,   /* Image width and height in pixels */
141         0,      /* number of bitplanes in Image */
142         NULL,   /* pointer to ImageData */
143         0x0000,0x0000,  /* PlanePick and PlaneOnOff */
144         NULL    /* next Image structure */
145 };
146
147 static struct IntuiText ClipIText4 = {
148         3,0,JAM1,       /* front and back text pens, drawmode and fill byte */
149         -116,-1,        /* XY origin relative to container TopLeft */
150         NULL,   /* font pointer or NULL for default */
151         "Y Clip Border:",       /* pointer to text */
152         NULL    /* next IntuiText structure */
153 };
154
155 static struct Gadget ClipYCLIP = {
156         &ClipXCLIP,     /* next gadget */
157         134,46, /* origin XY of hit box relative to window TopLeft */
158         -199,7, /* hit box width and height */
159         GRELWIDTH,      /* gadget flags */
160         RELVERIFY+GADGIMMEDIATE,        /* activation flags */
161         PROPGADGET,     /* gadget type flags */
162         (APTR)&ClipImage2,      /* gadget border or image to be rendered */
163         NULL,   /* alternate imagery for selection */
164         &ClipIText4,    /* first IntuiText structure */
165         NULL,   /* gadget mutual-exclude long word */
166         (APTR)&ClipClipYCLIPSInfo,      /* SpecialInfo structure */
167         YCLIP,  /* user-definable data */
168         NULL    /* pointer to user-definable data */
169 };
170
171 static struct PropInfo ClipClipXSIZESInfo = {
172         AUTOKNOB+FREEHORIZ,     /* PropInfo flags */
173         26212,-1,       /* horizontal and vertical pot values */
174         10922,-1,       /* horizontal and vertical body values */
175 };
176
177 static struct Image ClipImage3 = {
178         45,0,   /* XY origin relative to container TopLeft */
179         24,3,   /* Image width and height in pixels */
180         0,      /* number of bitplanes in Image */
181         NULL,   /* pointer to ImageData */
182         0x0000,0x0000,  /* PlanePick and PlaneOnOff */
183         NULL    /* next Image structure */
184 };
185
186 static struct IntuiText ClipIText5 = {
187         3,0,JAM1,       /* front and back text pens, drawmode and fill byte */
188         -124,-1,        /* XY origin relative to container TopLeft */
189         NULL,   /* font pointer or NULL for default */
190         "X Scale Factor:",      /* pointer to text */
191         NULL    /* next IntuiText structure */
192 };
193
194 static struct Gadget ClipXSIZE = {
195         &ClipYCLIP,     /* next gadget */
196         134,15, /* origin XY of hit box relative to window TopLeft */
197         -199,7, /* hit box width and height */
198         GRELWIDTH,      /* gadget flags */
199         RELVERIFY+GADGIMMEDIATE,        /* activation flags */
200         PROPGADGET,     /* gadget type flags */
201         (APTR)&ClipImage3,      /* gadget border or image to be rendered */
202         NULL,   /* alternate imagery for selection */
203         &ClipIText5,    /* first IntuiText structure */
204         NULL,   /* gadget mutual-exclude long word */
205         (APTR)&ClipClipXSIZESInfo,      /* SpecialInfo structure */
206         XSIZE,  /* user-definable data */
207         NULL    /* pointer to user-definable data */
208 };
209
210 static struct PropInfo ClipClipYSIZESInfo = {
211         AUTOKNOB+FREEHORIZ,     /* PropInfo flags */
212         -25937,-1,      /* horizontal and vertical pot values */
213         10922,-1,       /* horizontal and vertical body values */
214 };
215
216 static struct Image ClipImage4 = {
217         69,0,   /* XY origin relative to container TopLeft */
218         24,3,   /* Image width and height in pixels */
219         0,      /* number of bitplanes in Image */
220         NULL,   /* pointer to ImageData */
221         0x0000,0x0000,  /* PlanePick and PlaneOnOff */
222         NULL    /* next Image structure */
223 };
224
225 static struct IntuiText ClipIText6 = {
226         3,0,JAM1,       /* front and back text pens, drawmode and fill byte */
227         -124,-1,        /* XY origin relative to container TopLeft */
228         NULL,   /* font pointer or NULL for default */
229         "Y Scale Factor:",      /* pointer to text */
230         NULL    /* next IntuiText structure */
231 };
232
233 static struct Gadget ClipYSIZE = {
234         &ClipXSIZE,     /* next gadget */
235         134,24, /* origin XY of hit box relative to window TopLeft */
236         -199,7, /* hit box width and height */
237         GRELWIDTH,      /* gadget flags */
238         RELVERIFY+GADGIMMEDIATE,        /* activation flags */
239         PROPGADGET,     /* gadget type flags */
240         (APTR)&ClipImage4,      /* gadget border or image to be rendered */
241         NULL,   /* alternate imagery for selection */
242         &ClipIText6,    /* first IntuiText structure */
243         NULL,   /* gadget mutual-exclude long word */
244         (APTR)&ClipClipYSIZESInfo,      /* SpecialInfo structure */
245         YSIZE,  /* user-definable data */
246         NULL    /* pointer to user-definable data */
247 };
248
249 #define ClipGadgetList1 ClipYSIZE
250
251 static struct NewWindow ClipNewWindowStructure1 = {
252         114,16, /* window XY origin relative to TopLeft of screen */
253         346,76, /* window width and height */
254         0,1,    /* detail and block pens */
255         NEWSIZE+MOUSEMOVE+GADGETDOWN+GADGETUP+CLOSEWINDOW+ACTIVEWINDOW+VANILLAKEY+INTUITICKS,   /* IDCMP flags */
256         WINDOWSIZING+WINDOWDRAG+WINDOWDEPTH+WINDOWCLOSE+ACTIVATE+NOCAREREFRESH, /* other window flags */
257         &ClipYSIZE,     /* first gadget in gadget list */
258         NULL,   /* custom CHECKMARK imagery */
259         "Edit Clipping Parameters",     /* window title */
260         NULL,   /* custom screen pointer */
261         NULL,   /* custom bitmap */
262         350,76, /* minimum width and height */
263         -1,-1,  /* maximum width and height */
264         CUSTOMSCREEN    /* destination screen type */
265 };
266
267
268 /* end of PowerWindows source generation */