source: buchla-68k/orig/LATTICE/GEMLIB.H@ c79db87

Last change on this file since c79db87 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago

Imported original source code.

  • Property mode set to 100755
File size: 8.3 KB
Line 
1/**
2*
3* This file contains useful macros and structures for use with GEMLIB.
4*
5**/
6
7/* EVENT Manager definitions */
8
9/* multi flags */
10
11#define MU_KEYBD 0x0001
12#define MU_BUTTON 0x0002
13#define MU_M1 0x0004
14#define MU_M2 0x0008
15#define MU_MESAG 0x0010
16#define MU_TIMER 0x0020
17
18/* keyboard states */
19
20#define K_RSHIFT 0x0001
21#define K_LSHIFT 0x0002
22#define K_CTRL 0x0004
23#define K_ALT 0x0008
24
25/* message values */
26
27#define MN_SELECTED 10
28#define WM_REDRAW 20
29#define WM_TOPPED 21
30#define WM_CLOSED 22
31#define WM_FULLED 23
32#define WM_ARROWED 24
33#define WM_HSLID 25
34#define WM_VSLID 26
35#define WM_SIZED 27
36#define WM_MOVED 28
37#define WM_NEWTOP 29
38#define AC_OPEN 40
39#define AC_CLOSE 41
40
41/* FORM Manager Definitions */
42
43/* Form flags */
44
45#define FMD_START 0
46#define FMD_GROW 1
47#define FMD_SHRINK 2
48#define FMD_FINISH 3
49
50/* RESOURCE Manager Definitions */
51
52/* data structure types */
53
54#define R_TREE 0
55#define R_OBJECT 1
56#define R_TEDINFO 2
57#define R_ICONBLK 3
58#define R_BITBLK 4
59#define R_STRING 5 /* gets pointer to free strings */
60#define R_IMAGEDATA 6 /* gets pointer to free images */
61#define R_OBSPEC 7
62#define R_TEPTEXT 8 /* sub ptrs in TEDINFO */
63#define R_TEPTMPLT 9
64#define R_TEPVALID 10
65#define R_IBPMASK 11 /* sub ptrs in ICONBLK */
66#define R_IBPDATA 12
67#define R_IBPTEXT 13
68#define R_BIPDATA 14 /* sub ptrs in BITBLK */
69#define R_FRSTR 15 /* gets addr of ptr to free strings */
70#define R_FRIMG 16 /* gets addr of ptr to free images */
71
72/* WINDOW Manager Definitions */
73
74/* Window Attributes */
75
76#define NAME 0x0001
77#define CLOSER 0x0002
78#define FULLER 0x0004
79#define MOVER 0x0008
80#define INFO 0x0010
81#define SIZER 0x0020
82#define UPARROW 0x0040
83#define DNARROW 0x0080
84#define VSLIDE 0x0100
85#define LFARROW 0x0200
86#define RTARROW 0x0400
87#define HSLIDE 0x0800
88
89/* wind_create flags */
90
91#define WC_BORDER 0
92#define WC_WORK 1
93
94/* wind_get flags */
95
96#define WF_KIND 1
97#define WF_NAME 2
98#define WF_INFO 3
99#define WF_WORKXYWH 4
100#define WF_CURRXYWH 5
101#define WF_PREVXYWH 6
102#define WF_FULLXYWH 7
103#define WF_HSLIDE 8
104#define WF_VSLIDE 9
105#define WF_TOP 10
106#define WF_FIRSTXYWH 11
107#define WF_NEXTXYWH 12
108#define WF_RESVD 13
109#define WF_NEWDESK 14
110#define WF_HSLSIZE 15
111#define WF_VSLSIZE 16
112#define WF_SCREEN 17
113
114/* update flags */
115
116#define END_UPDATE 0
117#define BEG_UPDATE 1
118#define END_MCTRL 2
119#define BEG_MCTRL 3
120
121/* GRAPHICS Manager Definitions */
122
123/* Mouse Forms */
124
125#define ARROW 0
126#define TEXT_CRSR 1
127#define BUSYBEE 2
128#define POINT_HAND 3
129#define FLAT_HAND 4
130#define THIN_CROSS 5
131#define THICK_CROSS 6
132#define OUTLN_CROSS 7
133#define USER_DEF 255
134#define M_OFF 256
135#define M_ON 257
136
137/* polyline end styles */
138
139#define SQUARED 0
140#define ARROWED 1
141#define ROUNDED 2
142
143/* polyline line styles */
144
145#define SOLID 1
146#define LDASHED 2
147#define DOTTED 3
148#define DASHDOT 4
149#define DASHED 5
150#define DASHDOTDOT 6
151
152/* interior types for filled areas */
153
154#define HOLLOW 0
155/* #define SOLID 1 same as above */
156#define PATTERN 2
157#define HATCH 3
158#define UDFILLSTYLE 4
159
160/* a selection of fill patterns */
161
162#define DOTS 3
163#define GRID 6
164#define BRICKS 9
165#define WEAVE 16
166
167/* text special effects */
168
169#define THICKENED 0x0001
170#define SHADED 0x0002
171#define SKEWED 0x0004
172#define UNDERLINED 0x0008
173#define OUTLINE 0x0010
174#define SHADOW 0x0020
175
176/* gem writing modes */
177
178#define MD_REPLACE 1
179#define MD_TRANS 2
180#define MD_XOR 3
181#define MD_ERASE 4
182
183/* bit blt rules */
184
185#define ALL_WHITE 0
186#define S_AND_D 1
187#define S_AND_NOTD 2
188#define S_ONLY 3
189#define NOTS_AND_D 4
190#define D_ONLY 5
191#define S_XOR_D 6
192#define S_OR_D 7
193#define NOT_SORD 8
194#define NOT_SXORD 9
195#define D_INVERT 10
196#define NOT_D 11
197#define S_OR_NOTD 12
198#define NOTS_OR_D 13
199#define NOT_SANDD 14
200#define ALL_BLACK 15
201
202/* Graphic types of objects */
203
204#define G_BOX 20
205#define G_TEXT 21
206#define G_BOXTEXT 22
207#define G_IMAGE 23
208#define G_USERDEF 24
209#define G_IBOX 25
210#define G_BUTTON 26
211#define G_BOXCHAR 27
212#define G_STRING 28
213#define G_FTEXT 29
214#define G_FBOXTEXT 30
215#define G_ICON 31
216#define G_TITLE 32
217
218/* Object flags */
219
220#define NONE 0x0000
221#define SELECTABLE 0x0001
222#define DEFAULT 0x0002
223#define EXIT 0x0004
224#define EDITABLE 0x0008
225#define RBUTTON 0x0010
226#define LASTOB 0x0020
227#define TOUCHEXIT 0x0040
228#define HIDETREE 0x0080
229#define INDIRECT 0x0100
230
231/* Object states */
232
233#define NORMAL 0x0000
234#define SELECTED 0x0001
235#define CROSSED 0x0002
236#define CHECKED 0x0004
237#define DISABLED 0x0008
238#define OUTLINED 0x0010
239#define SHADOWED 0x0020
240
241/* Object colour numbers */
242
243#define WHITE 0
244#define BLACK 1
245#define RED 2
246#define GREEN 3
247#define BLUE 4
248#define CYAN 5
249#define YELLOW 6
250#define MAGENTA 7
251#define LWHITE 8
252#define LBLACK 9
253#define LRED 10
254#define LGREEN 11
255#define LBLUE 12
256#define LCYAN 13
257#define LYELLOW 14
258#define LMAGENTA 15
259
260/* editable text field definitions */
261
262#define EDSTART 0
263#define EDINIT 1
264#define EDCHAR 2
265#define EDEND 3
266
267/* editable text justification */
268
269#define TE_LEFT 0
270#define TE_RIGHT 1
271#define TE_CNTR 2
272
273/* Structure Definitions */
274
275typedef struct object
276{
277 short ob_next; /* -> object's next sibling */
278 short ob_head; /* -> head of object's children */
279 short ob_tail; /* -> tail of object's children */
280 unsigned short ob_type; /* type of object- BOX, CHAR,... */
281 unsigned short ob_flags; /* flags */
282 unsigned short ob_state; /* state- SELECTED, OPEN, ... */
283 long ob_spec; /* "out"- -> anything else */
284 short ob_x; /* upper left corner of object */
285 short ob_y; /* upper left corner of object */
286 short ob_width; /* width of object */
287 short ob_height; /* height of object */
288} OBJECT;
289
290typedef struct orect
291{
292 struct orect *o_link;
293 short o_x;
294 short o_y;
295 short o_w;
296 short o_h;
297} ORECT;
298
299typedef struct grect
300{
301 short g_x;
302 short g_y;
303 short g_w;
304 short g_h;
305} GRECT;
306
307typedef struct text_edinfo
308{
309 long te_ptext; /* ptr to text (must be 1st) */
310 long te_ptmplt; /* ptr to template */
311 long te_pvalid; /* ptr to validation chrs. */
312 short te_font; /* font */
313 short te_junk1; /* junk short */
314 short te_just; /* justification- left, right... */
315 short te_color; /* color information short */
316 short te_junk2; /* junk short */
317 short te_thickness; /* border thickness */
318 short te_txtlen; /* length of text string */
319 short te_tmplen; /* length of template string */
320} TEDINFO;
321
322typedef struct icon_block
323{
324 long ib_pmask;
325 long ib_pdata;
326 long ib_ptext;
327 short ib_char;
328 short ib_xchar;
329 short ib_ychar;
330 short ib_xicon;
331 short ib_yicon;
332 short ib_wicon;
333 short ib_hicon;
334 short ib_xtext;
335 short ib_ytext;
336 short ib_wtext;
337 short ib_htext;
338} ICONBLK;
339
340typedef struct bit_block
341{
342 long bi_pdata; /* ptr to bit forms data */
343 short bi_wb; /* width of form in bytes */
344 short bi_hl; /* height in lines */
345 short bi_x; /* source x in bit form */
346 short bi_y; /* source y in bit form */
347 short bi_colour; /* fg colour of blt */
348} BITBLK;
349
350typedef struct user_blk
351{
352 long ub_code;
353 long ub_parm;
354} USERBLK;
355
356typedef struct parm_blk
357{
358 long pb_tree;
359 short pb_obj;
360 short pb_prevstate;
361 short pb_currstate;
362 short pb_x;
363 short pb_y;
364 short pb_w;
365 short pb_h;
366 short pb_xc;
367 short pb_yc;
368 short pb_wc;
369 short pb_hc;
370 long pb_parm;
371} PARMBLK;
372
373typedef struct fdbstr
374{
375 long fd_addr;
376 short fd_w;
377 short fd_h;
378 short fd_wdwidth;
379 short fd_stand;
380 short fd_nplanes;
381 short fd_r1;
382 short fd_r2;
383 short fd_r3;
384} FDB;
385
386typedef struct mfstr
387{
388 short mf_xhot;
389 short mf_yhot;
390 short mf_nplanes;
391 short mf_fg;
392 short mf_bg;
393 short mf_mask[16];
394 short mf_data[16];
395} MFORM;
396
Note: See TracBrowser for help on using the repository browser.