Improvements to comments.
[AROS.git] / compiler / include / intuition / intuition.h
blobade7c8e1dbad686ecd5070c126c274f6061fdff3
1 #ifndef INTUITION_INTUITION_H
2 #define INTUITION_INTUITION_H
4 /*
5 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Important defines and structures for intuition.library
9 Lang: english
12 #ifndef EXEC_PORTS_H
13 # include <exec/ports.h>
14 #endif
15 #ifndef EXEC_TYPES_H
16 # include <exec/types.h>
17 #endif
18 #ifndef GRAPHICS_CLIP_H
19 # include <graphics/clip.h>
20 #endif
21 #ifndef GRAPHICS_GFX_H
22 # include <graphics/gfx.h>
23 #endif
24 #ifndef GRAPHICS_LAYERS_H
25 # include <graphics/layers.h>
26 #endif
27 #ifndef GRAPHICS_RASTPORT_H
28 # include <graphics/rastport.h>
29 #endif
30 #ifndef GRAPHICS_TEXT_H
31 # include <graphics/text.h>
32 #endif
33 #ifndef GRAPHICS_VIEW_H
34 # include <graphics/view.h>
35 #endif
36 #ifndef UTILITY_TAGITEM_H
37 # include <utility/tagitem.h>
38 #endif
39 #ifndef DEVICES_INPUTEVENT_H
40 # include <devices/inputevent.h>
41 #endif
42 #ifndef INTUITION_PREFERENCES_H
43 # include <intuition/preferences.h>
44 #endif
45 #ifndef INTUITION_SCREENS_H
46 # include <intuition/screens.h>
47 #endif
48 #ifndef INTUITION_CLASSUSR_H
49 # include <intuition/classusr.h>
50 #endif
52 #define INTUITIONNAME "intuition.library"
54 /***** Intuition Message *****/
56 struct IntuiMessage
58 struct Message ExecMessage;
60 ULONG Class;
61 UWORD Code;
62 UWORD Qualifier;
63 APTR IAddress;
65 WORD MouseX;
66 WORD MouseY;
67 ULONG Seconds;
68 ULONG Micros;
70 struct Window * IDCMPWindow;
71 struct IntuiMessage * SpecialLink;
74 struct ExtIntuiMessage
76 struct IntuiMessage eim_IntuiMessage;
77 struct TabletData * eim_TabletData;
80 /***** IDCMP *****/
82 #define IDCMP_SIZEVERIFY (1L<<0)
83 #define IDCMP_NEWSIZE (1L<<1)
84 #define IDCMP_REFRESHWINDOW (1L<<2)
85 #define IDCMP_MOUSEBUTTONS (1L<<3)
86 #define IDCMP_MOUSEMOVE (1L<<4)
87 #define IDCMP_GADGETDOWN (1L<<5)
88 #define IDCMP_GADGETUP (1L<<6)
89 #define IDCMP_REQSET (1L<<7)
90 #define IDCMP_MENUPICK (1L<<8)
91 #define IDCMP_CLOSEWINDOW (1L<<9)
92 #define IDCMP_RAWKEY (1L<<10)
93 #define IDCMP_REQVERIFY (1L<<11)
94 #define IDCMP_REQCLEAR (1L<<12)
95 #define IDCMP_MENUVERIFY (1L<<13)
96 #define IDCMP_NEWPREFS (1L<<14)
97 #define IDCMP_DISKINSERTED (1L<<15)
98 #define IDCMP_DISKREMOVED (1L<<16)
99 #define IDCMP_WBENCHMESSAGE (1L<<17)
100 #define IDCMP_ACTIVEWINDOW (1L<<18)
101 #define IDCMP_INACTIVEWINDOW (1L<<19)
102 #define IDCMP_DELTAMOVE (1L<<20)
103 #define IDCMP_VANILLAKEY (1L<<21)
104 #define IDCMP_INTUITICKS (1L<<22)
105 #define IDCMP_IDCMPUPDATE (1L<<23)
106 #define IDCMP_MENUHELP (1L<<24)
107 #define IDCMP_CHANGEWINDOW (1L<<25)
108 #define IDCMP_GADGETHELP (1L<<26)
109 #define IDCMP_LONELYMESSAGE (1L<<31)
111 #define CWCODE_MOVESIZE 0
112 #define CWCODE_DEPTH 1
113 #define MENUHOT 1
114 #define MENUCANCEL 2
115 #define MENUWAITING 3
116 #define OKOK 1
117 #define OKCANCEL 2
118 #define OKABORT 4
119 #define WBENCHOPEN 1
120 #define WBENCHCLOSE 2
122 /***** IntuiText *****/
124 struct IntuiText
126 UBYTE FrontPen;
127 UBYTE BackPen;
128 UBYTE DrawMode;
129 WORD LeftEdge;
130 WORD TopEdge;
132 struct TextAttr * ITextFont;
133 UBYTE * IText;
134 struct IntuiText * NextText;
137 /***** Menu *****/
139 struct Menu
141 struct Menu * NextMenu;
143 WORD LeftEdge;
144 WORD TopEdge;
145 WORD Width;
146 WORD Height;
147 UWORD Flags; /* see below */
148 BYTE * MenuName;
150 struct MenuItem * FirstItem;
152 /* PRIVATE */
153 WORD JazzX;
154 WORD JazzY;
155 WORD BeatX;
156 WORD BeatY;
159 /* Flags */
160 #define MENUENABLED (1<<0)
161 /* The following flag is READ-ONLY */
162 #define MIDRAWN (1<<8)
164 struct MenuItem
166 struct MenuItem * NextItem;
168 WORD LeftEdge;
169 WORD TopEdge;
170 WORD Width;
171 WORD Height;
172 UWORD Flags; /* see below */
173 LONG MutualExclude;
174 APTR ItemFill;
175 APTR SelectFill;
176 BYTE Command;
178 struct MenuItem * SubItem;
179 UWORD NextSelect;
182 /* Flags */
183 #define CHECKIT (1<<0)
184 #define ITEMTEXT (1<<1)
185 #define COMMSEQ (1<<2)
186 #define MENUTOGGLE (1<<3)
187 #define ITEMENABLED (1<<4)
188 #define HIGHIMAGE 0x0000
189 #define HIGHCOMP (1<<6)
190 #define HIGHBOX (1<<7)
191 #define HIGHNONE 0x00C0
192 #define HIGHFLAGS 0x00C0
193 #define CHECKED (1<<8)
194 /* The following flags are READ-ONLY */
195 #define ISDRAWN (1<<12)
196 #define HIGHITEM (1<<13)
197 #define MENUTOGGLED (1<<14)
199 #define NOMENU 0x001F
200 #define NOITEM 0x003F
201 #define NOSUB 0x001F
202 #define MENUNULL 0xFFFF
204 /* Macros */
205 #define MENUNUM(x) ((x) & 0x1F)
206 #define ITEMNUM(x) (((x)>>5) & 0x003F)
207 #define SUBNUM(x) (((x)>>11) & 0x001F)
209 #define SHIFTMENU(x) ((x) & 0x1F)
210 #define SHIFTITEM(x) (((x) & 0x3F)<<5)
211 #define SHIFTSUB(x) (((x) & 0x1F)<<11)
212 #define FULLMENUNUM(m,i,s) (SHIFTMENU(m) | SHIFTITEM(i) | SHIFTSUB(s))
214 #define SRBNUM(x) (0x08 - ((x)>>4))
215 #define SWBNUM(x) (0x08 - ((x) & 0x0F))
216 #define SSBNUM(x) (0x01 + ((x)>>4))
217 #define SPARNUM(x) ((x)>>4)
218 #define SHAKNUM(x) ((x) & 0x0F)
220 #define CHECKWIDTH 19
221 #define LOWCHECKWIDTH 13
222 #define COMMWIDTH 27
223 #define LOWCOMMWIDTH 16
225 /***** Gadgets *****/
227 struct Gadget
229 struct Gadget * NextGadget;
231 WORD LeftEdge;
232 WORD TopEdge;
233 WORD Width;
234 WORD Height;
236 UWORD Flags; /* see below */
237 UWORD Activation; /* see below */
238 UWORD GadgetType; /* see below */
240 APTR GadgetRender;
241 APTR SelectRender;
242 struct IntuiText * GadgetText;
244 IPTR MutualExclude; /* OBSOLETE */
246 APTR SpecialInfo;
247 UWORD GadgetID;
248 APTR UserData;
251 struct ExtGadget
253 struct ExtGadget * NextGadget;
255 WORD LeftEdge;
256 WORD TopEdge;
257 WORD Width;
258 WORD Height;
260 UWORD Flags; /* see below */
261 UWORD Activation; /* see below */
262 UWORD GadgetType; /* see below */
264 APTR GadgetRender;
265 APTR SelectRender;
266 struct IntuiText * GadgetText;
268 IPTR MutualExclude; /* OBSOLETE */
270 APTR SpecialInfo;
271 UWORD GadgetID;
272 APTR UserData;
274 /* ExtGadget specific fields */
275 ULONG MoreFlags; /* see below */
276 WORD BoundsLeftEdge;
277 WORD BoundsTopEdge;
278 WORD BoundsWidth;
279 WORD BoundsHeight;
282 /* Flags */
283 #define GFLG_GADGHCOMP 0x0000
284 #define GFLG_GADGHBOX (1<<0)
285 #define GFLG_GADGHIMAGE (1<<1)
286 #define GFLG_GADGHNONE 0x0003
287 #define GFLG_GADGHIGHBITS 0x0003
288 #define GFLG_GADGIMAGE (1<<2)
289 #define GFLG_RELBOTTOM (1<<3)
290 #define GFLG_RELRIGHT (1<<4)
291 #define GFLG_RELWIDTH (1<<5)
292 #define GFLG_RELHEIGHT (1<<6)
293 #define GFLG_SELECTED (1<<7)
294 #define GFLG_DISABLED (1<<8)
295 #define GFLG_TABCYCLE (1<<9)
296 #define GFLG_STRINGEXTEND (1<<10)
297 #define GFLG_IMAGEDISABLE (1<<11)
298 #define GFLG_LABELITEXT 0x0000
299 #define GFLG_LABELSTRING (1<<12)
300 #define GFLG_LABELIMAGE (1<<13)
301 #define GFLG_LABELMASK 0x3000
302 #define GFLG_RELSPECIAL (1<<14)
303 #define GFLG_EXTENDED (1<<15)
305 /* Activation */
306 #define GACT_RELVERIFY (1<<0)
307 #define GACT_IMMEDIATE (1<<1)
308 #define GACT_ENDGADGET (1<<2)
309 #define GACT_FOLLOWMOUSE (1<<3)
310 #define GACT_RIGHTBORDER (1<<4)
311 #define GACT_LEFTBORDER (1<<5)
312 #define GACT_TOPBORDER (1<<6)
313 #define GACT_BOTTOMBORDER (1<<7)
314 #define GACT_TOGGLESELECT (1<<8)
315 #define GACT_STRINGLEFT 0
316 #define GACT_STRINGCENTER (1<<9)
317 #define GACT_STRINGRIGHT (1<<10)
318 #define GACT_LONGINT (1<<11)
319 #define GACT_ALTKEYMAP (1<<12)
320 #define GACT_STRINGEXTEND (1<<13)
321 #define GACT_BOOLEXTEND (1<<13)
322 #define GACT_ACTIVEGADGET (1<<14)
323 #define GACT_BORDERSNIFF (1<<15)
325 /* GadgetType */
326 #define GTYP_GADGETTYPE 0xFC00
327 #define GTYP_SYSTYPEMASK 0x00F0
328 #define GTYP_SIZING 0x0010
329 #define GTYP_WDRAGGING 0x0020
330 #define GTYP_SDRAGGING 0x0030
331 #define GTYP_WDEPTH 0x0040
332 #define GTYP_SDEPTH 0x0050
333 #define GTYP_WZOOM 0x0060
334 #define GTYP_SUNUSED 0x0070
335 #define GTYP_CLOSE 0x0080
336 #define GTYP_REQGADGET (1<<12)
337 #define GTYP_GZZGADGET (1<<13)
338 #define GTYP_SCRGADGET (1<<14)
339 #define GTYP_SYSGADGET (1<<15)
340 #define GTYP_BOOLGADGET 0x0001
341 #define GTYP_GADGET0002 0x0002
342 #define GTYP_PROPGADGET 0x0003
343 #define GTYP_STRGADGET 0x0004
344 #define GTYP_CUSTOMGADGET 0x0005
345 #define GTYP_GTYPEMASK 0x0007
347 /* MoreFlags */
348 #define GMORE_BOUNDS (1L<<0)
349 #define GMORE_GADGETHELP (1L<<1)
350 #define GMORE_SCROLLRASTER (1L<<2)
351 #define GMORE_BOOPSIGADGET (1L<<3) /* some internal boopsi classes changes the gadget type during execution (ie propgclass), so GTYP_CUSTOMGADGET doesn´t work (dariusb) */
353 /***** Bool Gadget *****/
354 struct BoolInfo
356 UWORD Flags; /* see below */
357 UWORD * Mask;
358 ULONG Reserved; /* must be NULL */
361 /* Flags */
362 #define BOOLMASK (1<<0)
364 /***** Proportional gadget *****/
365 struct PropInfo
367 UWORD Flags; /* see below */
368 UWORD HorizPot;
369 UWORD VertPot;
370 UWORD HorizBody;
371 UWORD VertBody;
372 UWORD CWidth;
373 UWORD CHeight;
374 UWORD HPotRes;
375 UWORD VPotRes;
376 UWORD LeftBorder;
377 UWORD TopBorder;
380 #define AUTOKNOB (1<<0)
381 #define FREEHORIZ (1<<1)
382 #define FREEVERT (1<<2)
383 #define PROPBORDERLESS (1<<3)
384 #define PROPNEWLOOK (1<<4)
385 #define KNOBHIT (1<<8)
387 #define KNOBHMIN 6
388 #define KNOBVMIN 4
389 #define MAXBODY 0xFFFF
390 #define MAXPOT 0xFFFF
392 /***** StringInfo *****/
394 struct StringInfo
396 UBYTE * Buffer;
397 UBYTE * UndoBuffer;
398 WORD BufferPos;
399 WORD MaxChars;
400 WORD DispPos;
402 WORD UndoPos;
403 WORD NumChars;
404 WORD DispCount;
405 WORD CLeft;
406 WORD CTop;
408 struct StringExtend * Extension;
409 LONG LongInt;
410 struct KeyMap * AltKeyMap;
413 /**********************************************************************
414 ** Requesters **
415 **********************************************************************/
417 /* The following struct is used for standard intuition requesters
418 (not to be mixed up with asl or easy requesters).
419 See intuition.library/Request() for more information. */
420 struct Requester
422 struct Requester * OlderRequest;
424 /* The dimensions of the requester */
425 WORD LeftEdge;
426 WORD TopEdge;
427 WORD Width;
428 WORD Height;
429 WORD RelLeft;
430 WORD RelTop;
432 struct Gadget * ReqGadget; /* First gadget of the requester */
433 struct Border * ReqBorder; /* First border of the requester */
434 struct IntuiText * ReqText; /* First intuitext of the requester */
436 UWORD Flags; /* see below */
437 UBYTE BackFill; /* a pen to fill the background of the requester */
439 struct Layer * ReqLayer; /* The layer on which the requester is based */
441 UBYTE ReqPad1[32]; /* PRIVATE */
443 struct BitMap * ImageBMap; /* you may use this to fill the requester
444 with your own image */
445 struct Window * RWindow; /* window, which the requester belongs to */
446 struct Image * ReqImage; /* corresponds to USEREQIMAGE (see below) */
448 UBYTE ReqPad2[32]; /* PRIVATE */
451 /* Flags */
452 #define POINTREL (1<<0) /* If set, LeftEdge and TopEdge are relative
453 to the coordinates of either the pointer
454 or the window */
455 #define PREDRAWN (1<<1) /* If set, ImageBMap points to a custom bitmap */
456 #define NOISYREQ (1<<2) /* Requester doesn't filter input */
457 #define SIMPLEREQ (1<<4) /* If set, a SIMPLEREFRESH layer is used */
458 #define USEREQIMAGE (1<<5) /* ReqImage points to an image, which is used
459 as background */
460 #define NOREQBACKFILL (1<<6) /* Ignore BackFill pen */
461 /* The following flags are READ-ONLY */
462 #define REQOFFWINDOW (1<<12)
463 #define REQACTIVE (1<<13) /* Requester is active */
464 #define SYSREQUEST (1<<14) /* unused */
465 #define DEFERREFRESH (1<<15)
467 /* This struct is passes as second parameter to EasyRequestArgs() and
468 BuildEasyRequest(). It describes the general look of the requester. */
469 struct EasyStruct
471 ULONG es_StructSize; /* Should be sizeof(struct EasyStruct). Note
472 that this size may change, if you update the
473 includes! Do not use absolute values as
474 the size of pointers may vary on different
475 platforms! */
476 ULONG es_Flags; /* None defined, yet */
477 CONST_STRPTR es_Title; /* Text in the titlebar of the requester */
478 CONST_STRPTR es_TextFormat; /* Text in requester (printf-style). The
479 arguments needed for that string are the
480 fourth paramter to EasyRequestArgs() */
481 CONST_STRPTR es_GadgetFormat; /* Text of the gadgets, separated by |'s */
484 /***** Window *****/
486 struct Window
488 struct Window * NextWindow;
490 WORD LeftEdge;
491 WORD TopEdge;
492 WORD Width;
493 WORD Height;
495 #if (AROS_FLAVOUR & AROS_FLAVOUR_BINCOMPAT)
496 WORD MouseY;
497 WORD MouseX;
498 #else
499 WORD MouseX;
500 WORD MouseY;
501 #endif
503 WORD MinWidth;
504 WORD MinHeight;
505 UWORD MaxWidth;
506 UWORD MaxHeight;
508 ULONG Flags;
510 struct Menu * MenuStrip;
511 UBYTE * Title;
512 struct Requester * FirstRequest;
513 struct Requester * DMRequest;
515 WORD ReqCount;
517 struct Screen * WScreen;
518 struct RastPort * RPort;
520 BYTE BorderLeft;
521 BYTE BorderTop;
522 BYTE BorderRight;
523 BYTE BorderBottom;
524 struct RastPort * BorderRPort;
526 struct Gadget * FirstGadget;
527 struct Window * Parent;
528 struct Window * Descendant;
530 UWORD * Pointer;
531 BYTE PtrHeight;
532 BYTE PtrWidth;
533 BYTE XOffset;
534 BYTE YOffset;
536 ULONG IDCMPFlags;
537 struct MsgPort * UserPort;
538 struct MsgPort * WindowPort;
539 struct IntuiMessage * MessageKey;
541 UBYTE DetailPen;
542 UBYTE BlockPen;
543 struct Image * CheckMark;
544 UBYTE * ScreenTitle;
546 WORD GZZMouseX;
547 WORD GZZMouseY;
548 WORD GZZWidth;
549 WORD GZZHeight;
551 UBYTE * ExtData;
552 BYTE * UserData;
554 struct Layer * WLayer;
555 struct TextFont * IFont;
557 ULONG MoreFlags;
559 WORD RelLeftEdge; // relative coordinates of the window
560 WORD RelTopEdge; // to its parent window. If it is
561 // a window on the screen then these
562 // are the same as LeftEdge and TopEdge.
564 struct Window * firstchild; // pointer to first child
565 struct Window * prevchild; // if window is a child of a window
566 struct Window * nextchild; // then they are concatenated here.
567 struct Window * parent; // parent of this window
570 #define HAS_CHILDREN(w) (NULL != w->firstchild)
571 #define IS_CHILD(w) (NULL != w->parent)
573 struct NewWindow
575 WORD LeftEdge;
576 WORD TopEdge;
577 WORD Width;
578 WORD Height;
580 UBYTE DetailPen;
581 UBYTE BlockPen;
583 ULONG IDCMPFlags;
584 ULONG Flags;
586 struct Gadget * FirstGadget;
587 struct Image * CheckMark;
588 UBYTE * Title;
589 struct Screen * Screen; /* ignored if Type != CUSTOMSCREEN */
590 struct BitMap * BitMap;
592 WORD MinWidth;
593 WORD MinHeight;
594 UWORD MaxWidth;
595 UWORD MaxHeight;
597 UWORD Type;
600 struct ExtNewWindow
602 WORD LeftEdge;
603 WORD TopEdge;
604 WORD Width;
605 WORD Height;
607 UBYTE DetailPen;
608 UBYTE BlockPen;
610 ULONG IDCMPFlags;
611 ULONG Flags;
613 struct Gadget * FirstGadget;
614 struct Image * CheckMark;
615 UBYTE * Title;
616 struct Screen * Screen;
617 struct BitMap * BitMap;
619 WORD MinWidth;
620 WORD MinHeight;
621 UWORD MaxWidth;
622 UWORD MaxHeight;
624 UWORD Type;
626 /* ExtNewWindow specific fields */
627 struct TagItem *Extension;
630 /* Tags */
631 #define WA_Dummy (TAG_USER + 99)
632 #define WA_Left (WA_Dummy + 1)
633 #define WA_Top (WA_Dummy + 2)
634 #define WA_Width (WA_Dummy + 3)
635 #define WA_Height (WA_Dummy + 4)
636 #define WA_DetailPen (WA_Dummy + 5)
637 #define WA_BlockPen (WA_Dummy + 6)
638 #define WA_IDCMP (WA_Dummy + 7)
639 #define WA_Flags (WA_Dummy + 8)
640 #define WA_Gadgets (WA_Dummy + 9)
641 #define WA_Checkmark (WA_Dummy + 10)
642 #define WA_Title (WA_Dummy + 11)
643 #define WA_ScreenTitle (WA_Dummy + 12)
644 #define WA_CustomScreen (WA_Dummy + 13)
645 #define WA_SuperBitMap (WA_Dummy + 14)
646 #define WA_MinWidth (WA_Dummy + 15)
647 #define WA_MinHeight (WA_Dummy + 16)
648 #define WA_MaxWidth (WA_Dummy + 17)
649 #define WA_MaxHeight (WA_Dummy + 18)
650 #define WA_InnerWidth (WA_Dummy + 19)
651 #define WA_InnerHeight (WA_Dummy + 20)
652 #define WA_PubScreenName (WA_Dummy + 21)
653 #define WA_PubScreen (WA_Dummy + 22)
654 #define WA_PubScreenFallBack (WA_Dummy + 23)
655 #define WA_WindowName (WA_Dummy + 24)
656 #define WA_Colors (WA_Dummy + 25)
657 #define WA_Zoom (WA_Dummy + 26)
658 #define WA_MouseQueue (WA_Dummy + 27)
659 #define WA_BackFill (WA_Dummy + 28)
660 #define WA_RptQueue (WA_Dummy + 29)
661 #define WA_SizeGadget (WA_Dummy + 30)
662 #define WA_DragBar (WA_Dummy + 31)
663 #define WA_DepthGadget (WA_Dummy + 32)
664 #define WA_CloseGadget (WA_Dummy + 33)
665 #define WA_Backdrop (WA_Dummy + 34)
666 #define WA_ReportMouse (WA_Dummy + 35)
667 #define WA_NoCareRefresh (WA_Dummy + 36)
668 #define WA_Borderless (WA_Dummy + 37)
669 #define WA_Activate (WA_Dummy + 38)
670 #define WA_RMBTrap (WA_Dummy + 39)
671 #define WA_WBenchWindow (WA_Dummy + 40)
672 #define WA_SimpleRefresh (WA_Dummy + 41)
673 #define WA_SmartRefresh (WA_Dummy + 42)
674 #define WA_SizeBRight (WA_Dummy + 43)
675 #define WA_SizeBBottom (WA_Dummy + 44)
676 #define WA_AutoAdjust (WA_Dummy + 45)
677 #define WA_GimmeZeroZero (WA_Dummy + 46)
678 #define WA_MenuHelp (WA_Dummy + 47)
679 #define WA_NewLookMenus (WA_Dummy + 48)
680 #define WA_AmigaKey (WA_Dummy + 49)
681 #define WA_NotifyDepth (WA_Dummy + 50)
682 #define WA_Pointer (WA_Dummy + 52)
683 #define WA_BusyPointer (WA_Dummy + 53)
684 #define WA_PointerDelay (WA_Dummy + 54)
685 #define WA_TabletMessages (WA_Dummy + 55)
686 #define WA_HelpGroup (WA_Dummy + 56)
687 #define WA_HelpGroupWindow (WA_Dummy + 57)
688 #define WA_ToolBox (WA_Dummy + 58)
690 /* AROS specific tags */
692 #define WA_Priority (WA_Dummy + 100)
693 #define WA_Parent (WA_Dummy + 101)
694 #define WA_InFrontOf (WA_Dummy + 102)
695 #define WA_Behind (WA_Dummy + 103)
696 #define WA_Visible (WA_Dummy + 104)
697 #define WA_Shape (WA_Dummy + 105)
698 #define WA_ShapeHook (WA_Dummy + 106)
700 /* Flags */
701 #define WFLG_SIZEGADGET (1L<<0)
702 #define WFLG_DRAGBAR (1L<<1)
703 #define WFLG_DEPTHGADGET (1L<<2)
704 #define WFLG_CLOSEGADGET (1L<<3)
705 #define WFLG_SIZEBRIGHT (1L<<4)
706 #define WFLG_SIZEBBOTTOM (1L<<5)
708 #define WFLG_SMART_REFRESH 0
709 #define WFLG_SIMPLE_REFRESH (1L<<6)
710 #define WFLG_SUPER_BITMAP (1L<<7)
711 #define WFLG_OTHER_REFRESH ((1L<<6) | (1L<<7))
712 #define WFLG_REFRESHBITS WFLG_OTHER_REFRESH
714 #define WFLG_BACKDROP (1L<<8)
715 #define WFLG_REPORTMOUSE (1L<<9)
716 #define WFLG_GIMMEZEROZERO (1L<<10)
717 #define WFLG_BORDERLESS (1L<<11)
718 #define WFLG_ACTIVATE (1L<<12)
720 /* PRIVATE */
721 #define WFLG_WINDOWACTIVE (1L<<13)
722 #define WFLG_INREQUEST (1L<<14)
723 #define WFLG_MENUSTATE (1L<<15)
725 #define WFLG_RMBTRAP (1L<<16)
726 #define WFLG_NOCAREREFRESH (1L<<17)
727 #define WFLG_NW_EXTENDED (1L<<18)
729 #define WFLG_NEWLOOKMENUS (1L<<21)
731 /* PRIVATE */
732 #define WFLG_WINDOWREFRESH (1L<<24)
733 #define WFLG_WBENCHWINDOW (1L<<25)
734 #define WFLG_WINDOWTICKED (1L<<26)
735 #define WFLG_VISITOR (1L<<27)
736 #define WFLG_ZOOMED (1L<<28)
737 #define WFLG_HASZOOM (1L<<29)
738 #define WFLG_TOOLBOX (1L<<30)
740 #define DEFAULTMOUSEQUEUE 5
742 #define HC_GADGETHELP 1
744 /***** Images *****/
746 struct Image
748 WORD LeftEdge;
749 WORD TopEdge;
750 WORD Width;
751 WORD Height;
753 WORD Depth;
754 UWORD * ImageData;
755 UBYTE PlanePick;
756 UBYTE PlaneOnOff;
758 struct Image * NextImage;
761 /***** Border *****/
763 struct Border
765 WORD LeftEdge;
766 WORD TopEdge;
767 UBYTE FrontPen;
768 UBYTE BackPen;
769 UBYTE DrawMode;
770 BYTE Count;
771 WORD * XY;
773 struct Border * NextBorder;
776 /***** Tablets *****/
778 struct TabletData
780 UWORD td_XFraction;
781 UWORD td_YFraction;
782 ULONG td_TabletX;
783 ULONG td_TabletY;
784 ULONG td_RangeX;
785 ULONG td_RangeY;
787 struct TagItem * td_TagList; /* see below */
790 /* Tags */
791 #define TABLETA_Dummy (TAG_USER + 0x3A000)
792 #define TABLETA_TabletZ (TABLETA_Dummy + 0x01)
793 #define TABLETA_RangeZ (TABLETA_Dummy + 0x02)
794 #define TABLETA_AngleX (TABLETA_Dummy + 0x03)
795 #define TABLETA_AngleY (TABLETA_Dummy + 0x04)
796 #define TABLETA_AngleZ (TABLETA_Dummy + 0x05)
797 #define TABLETA_Pressure (TABLETA_Dummy + 0x06)
798 #define TABLETA_ButtonBits (TABLETA_Dummy + 0x07)
799 #define TABLETA_InProximity (TABLETA_Dummy + 0x08)
800 #define TABLETA_ResolutionX (TABLETA_Dummy + 0x09)
801 #define TABLETA_ResolutionY (TABLETA_Dummy + 0x0a)
803 struct TabletHookData
805 struct Screen * thd_Screen;
806 ULONG thd_Width;
807 ULONG thd_Height;
808 LONG thd_ScreenChanged;
811 /***** Keys *****/
813 #define SELECTDOWN (IECODE_LBUTTON)
814 #define SELECTUP (IECODE_LBUTTON | IECODE_UP_PREFIX)
815 #define MENUDOWN (IECODE_RBUTTON)
816 #define MENUUP (IECODE_RBUTTON | IECODE_UP_PREFIX)
817 #define MIDDLEDOWN (IECODE_MBUTTON)
818 #define MIDDLEUP (IECODE_MBUTTON | IECODE_UP_PREFIX)
819 #define ALTLEFT (IEQUALIFIER_LALT)
820 #define ALTRIGHT (IEQUALIFIER_RALT)
821 #define AMIGALEFT (IEQUALIFIER_LCOMMAND)
822 #define AMIGARIGHT (IEQUALIFIER_RCOMMAND)
823 #define AMIGAKEYS (AMIGALEFT | AMIGARIGHT)
825 #define CURSORUP 0x4C
826 #define CURSORDOWN 0x4D
827 #define CURSORRIGHT 0x4E
828 #define CURSORLEFT 0x4F
830 #define KEYCODE_Q 0x10
831 #define KEYCODE_Z 0x31
832 #define KEYCODE_X 0x32
833 #define KEYCODE_V 0x34
834 #define KEYCODE_B 0x35
835 #define KEYCODE_N 0x36
836 #define KEYCODE_M 0x37
837 #define KEYCODE_LESS 0x38
838 #define KEYCODE_GREATER 0x39
840 /* Miscellaneous */
842 struct IBox
844 WORD Left;
845 WORD Top;
846 WORD Width;
847 WORD Height;
850 struct Remember
852 struct Remember * NextRemember;
853 ULONG RememberSize;
854 UBYTE * Memory;
857 struct ColorSpec
859 WORD ColorIndex;
860 UWORD Red;
861 UWORD Green;
862 UWORD Blue;
865 #define FOREVER for(;;)
866 #define SIGN(x) (((x)>0) - ((x)<0))
867 #define NOT !
869 #define ALERT_TYPE 0x80000000
870 #define RECOVERY_ALERT 0x00000000
871 #define DEADEND_ALERT 0x80000000
873 #define AUTOFRONTPEN 0
874 #define AUTOBACKPEN 1
875 #define AUTODRAWMODE JAM2
876 #define AUTOLEFTEDGE 6
877 #define AUTORIGHTEDGE 3
878 #define AUTOITEXTFONT NULL
879 #define AUTONEXTTEXT NULL
881 /* NewDecorator structure used by ChangeDecoration
882 the three Objects (nd_Window, nd_Screen and nd_Menu
883 must be installed and point to decorator objects
884 the port is used for different issues and will be filled
885 up with DecoratorMessages */
887 struct NewDecorator
888 { struct Node nd_Node;
889 struct MsgPort *nd_Port;
890 UWORD nd_cnt;
891 STRPTR nd_Pattern;
892 STRPTR nd_IntPattern; /* Private, transformated Pattern be dos/ParsePattern() */
893 Object *nd_Window;
894 Object *nd_Screen;
895 Object *nd_Menu;
898 struct DecoratorMessage
900 struct MagicMessage dm_Message;
901 ULONG dm_Class;
902 ULONG dm_Code;
903 ULONG dm_Flags;
904 IPTR dm_Object;
907 #define DECORATOR_VERSION 0
909 /* there is only one Message in the initial decoration system
910 it will be sent to the decorator port to signal that it´ll not be used any longer
911 and may be destroyed, in that case the dm_Object contains the NewDecorator struct
912 Intuition does not touch anything, the decorator have to destroy all objects as well as the
913 NewDecorator struct. */
915 #define DM_CLASS_DESTROYDECORATOR 0x8001
917 struct ScreenNotifyMessage
919 struct MagicMessage snm_Message;
920 ULONG snm_Class; /* Notification Class ID same as SNA_Notify */
921 ULONG snm_Code; /* Code only supported for ScreenDepth() and will put the Flags in */
922 IPTR snm_Object; /* Pointer to the Object that caused this message */
923 IPTR snm_UserData; /* will be filled with SNA_UserData */
926 #define SCREENNOTIFY_VERSION 0
928 #define SNA_PubName (TAG_USER + 0x01) /* public screen name of NULL for all screens */
929 #define SNA_Notify (TAG_USER + 0x02) /* Flags to look for see below */
930 #define SNA_UserData (TAG_USER + 0x03) /* this tag will be passed to the screennotify message */
931 #define SNA_SigTask (TAG_USER + 0x04) /* if port == NULL, a sigbit will be set for this task */
932 #define SNA_SigBit (TAG_USER + 0x05) /* signal bit to set if port == NULL*/
933 #define SNA_MsgPort (TAG_USER + 0x06) /* if != NULL post mesage to this port */
934 #define SNA_Priority (TAG_USER + 0x07) /* */
935 #define SNA_Hook (TAG_USER + 0x08)
937 /* SNA_Notify (all unassigned bits are reserved for system use) */
938 #define SNOTIFY_AFTER_OPENSCREEN (1<<0) /* screen has been opened */
939 #define SNOTIFY_BEFORE_CLOSESCREEN (1<<1) /* going to close screen */
940 #define SNOTIFY_AFTER_OPENWB (1<<2) /* Workbench is open */
941 #define SNOTIFY_BEFORE_CLOSEWB (1<<3) /* Workbench is going to be closed */
942 #define SNOTIFY_AFTER_OPENWINDOW (1<<4) /* new window */
943 #define SNOTIFY_BEFORE_CLOSEWINDOW (1<<5) /* window is going to be closed */
944 #define SNOTIFY_PUBSCREENSTATE (1<<6) /* PubScreenState() */
945 #define SNOTIFY_LOCKPUBSCREEN (1<<7) /* LockPubScreen() */
946 #define SNOTIFY_SCREENDEPTH (1<<8) /* ScreenDepth() */
947 #define SNOTIFY_AFTER_CLOSESCREEN (1<<9) /* notify after CloseScreen() */
948 #define SNOTIFY_AFTER_CLOSEWINDOW (1<<10) /* dto. CloseWindow() */
949 #define SNOTIFY_BEFORE_OPENSCREEN (1<<11) /* notify before OpenScreen() */
950 #define SNOTIFY_BEFORE_OPENWINDOW (1<<12) /* dto. OpenWindow() */
951 #define SNOTIFY_BEFORE_OPENWB (1<<13) /* like OPENSCREEN */
952 #define SNOTIFY_AFTER_CLOSEWB (1<<14) /* like CLOSESCREEN */
953 #define SNOTIFY_WAIT_REPLY (1<<15) /* wait for reply before taking action */
954 #define SNOTIFY_UNLOCKPUBSCREEN (1<<16) /* UnlockPubScreen() */
955 #define SNOTIFY_BEFORE_UPDATEINTUITION (1<<17) /* Intuition is going to be updated */
956 #define SNOTIFY_AFTER_UPDATEINTUITION (1<<18) /* Intuition is updated */
957 #endif /* INTUITION_INTUITION_H */