Update to lasso handling. Adjust scroll amount based on difference between mouse...
[AROS.git] / rom / intuition / intuition_intern.h
blob8725cbd5f0f12581543a66c80e7172fc5d6fc0c3
1 #ifndef INTUITION_INTERN_H
2 #define INTUITION_INTERN_H
4 /*
5 Copyright 1995-2009, The AROS Development Team. All rights reserved.
6 Copyright 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 $Id$
8 */
10 #ifndef AROS_LIBCALL_H
11 # include <aros/libcall.h>
12 #endif
13 #ifndef AROS_ATOMIC_H
14 # include <aros/atomic.h>
15 #endif
16 #ifndef EXEC_EXECBASE_H
17 # include <exec/execbase.h>
18 #endif
19 #ifndef EXEC_SEMAPHORES_H
20 # include <exec/semaphores.h>
21 #endif
22 #ifndef EXEC_TASKS_H
23 # include <exec/tasks.h>
24 #endif
25 #ifndef EXEC_PORTS_H
26 # include <exec/ports.h>
27 #endif
28 #ifndef EXEC_IO_H
29 # include <exec/io.h>
30 #endif
31 #ifndef EXEC_TYPES_H
32 # include <exec/types.h>
33 #endif
34 #ifndef EXEC_LISTS_H
35 # include <exec/lists.h>
36 #endif
37 #ifndef GRAPHICS_GFXBASE_H
38 # include <graphics/gfxbase.h>
39 #endif
40 #ifndef GRAPHICS_RASTPORT_H
41 # include <graphics/rastport.h>
42 #endif
43 #ifndef GRAPHICS_REGIONS_H
44 # include <graphics/regions.h>
45 #endif
46 #ifndef GRAPHICS_CLIP_H
47 # include <graphics/clip.h>
48 #endif
49 #ifndef GRAPHICS_TEXT_H
50 # include <graphics/text.h>
51 #endif
52 #ifndef INTUITION_INTUITION_H
53 # include <intuition/intuition.h>
54 #endif
55 #ifndef INTUITION_INTUITIONBASE_H
56 # include <intuition/intuitionbase.h>
57 #endif
58 #ifndef INTUITION_CLASSES_H
59 # include <intuition/classes.h>
60 #endif
61 #ifndef INTUITION_CGHOOKS_H
62 # include <intuition/cghooks.h>
63 #endif
64 #ifndef INTUITION_SGHOOKS_H
65 # include <intuition/sghooks.h>
66 #endif
67 #ifndef INTUITION_SCREENS_H
68 # include <intuition/screens.h>
69 #endif
70 #ifndef PREFS_ICONTROL_H
71 # include <prefs/icontrol.h>
72 #endif
73 #ifndef PREFS_INPUT_H
74 #include <prefs/input.h>
75 #endif
76 #ifndef CLIB_ALIB_PROTOS_H
77 # include <clib/alib_protos.h>
78 #endif
79 #ifdef INTUITION_NOTIFY_SUPPORT
80 # include <libraries/screennotify.h>
81 # include <libraries/notifyintuition.h>
82 #endif
84 #include "intuition_debug.h"
86 #ifdef SKINS
87 #include "intuition_customize.h"
88 #include "intuition_internmos.h"
89 #include "intuition_extend.h"
90 #endif
92 #include "requesters.h"
94 /* Needed for aros_print_not_implemented macro */
95 #include <aros/debug.h>
97 #include <aros/asmcall.h>
99 #if DEBUG_ASSERTS
100 #define ASSERT_VALID_PTR_ROMOK(ptr) \
101 if (((ULONG) ptr & 1) || !TypeOfMem(ptr)) \
102 bug("[intuition] Invalid pointer value %p at %s, line %u\n", ptr, __FILE__, __LINE__);
103 #else
104 #define ASSERT_VALID_PTR_ROMOK(ptr)
105 #endif
107 // FIXME: seems only used for RefreshWindowTitles() ? -> better names
108 // FIXME: what are the correct values?
109 #define NO_DOUBLEBUFFER (0)
110 #define DOUBLEBUFFER (1)
112 /* features */
113 #ifdef __MORPHOS__
114 # define USE_OPAQUESIZE 1
115 #else
116 # define USE_OPAQUESIZE 0
117 #endif
120 #ifdef __MORPHOS__
121 void dprintf(char *, ...) __attribute__ ((format (printf, 1, 2)));
122 void * memclr(APTR, ULONG);
123 #endif
125 #ifdef __MORPHOS__
126 void * memclr(APTR, ULONG);
127 #define bzero(a,b) memclr(a,b)
128 #else /* __MORPHOS__ */
129 #define memclr(a,b) bzero(a,b)
130 #endif /* __MORPHOS__ */
133 * min()/max() without macro side effects.
135 #define max(a,b) \
136 ({typeof(a) _a = (a); \
137 typeof(b) _b = (b); \
138 _a > _b ? _a : _b;})
140 #define min(a,b) \
141 ({typeof(a) _a = (a); \
142 typeof(b) _b = (b); \
143 _a > _b ? _b : _a;})
145 #define EXTENDWORD(x) x = (LONG)((WORD)x);
146 #define EXTENDUWORD(x) x = (ULONG)((UWORD)x);
148 /* SANITY CHECK MACRO */
149 //#define DEBUG_SANITYCHECK
151 #ifdef DEBUG_SANITYCHECK
152 #define SANITY_CHECK(x) if (!((IPTR)x)) {dprintf("Losing sanity in %s line %d\n",__FILE__,__LINE__); return;};
153 #define SANITY_CHECKR(x,v) if (!((IPTR)x)) {dprintf("Losing sanity in %s line %d\n",__FILE__,__LINE__); return v;};
154 #else
155 #define SANITY_CHECK(x) if (!((IPTR)x)) return;
156 #define SANITY_CHECKR(x,v) if (!((IPTR)x)) return v;
157 #endif
159 /* Options */
161 #define MENUS_BACKFILL TRUE
163 #define MENUS_AMIGALOOK ((GetPrivIBase(IntuitionBase)->IControlPrefs.ic_Flags & ICF_3DMENUS) == 0)
164 /* --- Values --- */
165 #define MENULOOK_3D 0
166 #define MENULOOK_CLASSIC 1
168 #define MENUS_UNDERMOUSE (GetPrivIBase(IntuitionBase)->IControlPrefs.ic_Flags & ICF_POPUPMENUS)
170 #define AVOID_WINBORDERERASE (GetPrivIBase(IntuitionBase)->IControlPrefs.ic_Flags & ICF_AVOIDWINBORDERERASE)
172 /* --- Values --- */
173 /* TRUE, FALSE */
175 #define FRAME_SIZE (GetPrivIBase(IntuitionBase)->FrameSize)
176 /* --- Values --- */
177 #define FRAMESIZE_THIN 0 /* 1:1 thin */
178 #define FRAMESIZE_MEDRES 1 /* 2:1 medres like AmigaOS */
179 #define FRAMESIZE_THICK 2 /* 1:1 thick */
181 #define SQUARE_WIN_GADGETS 1
183 #ifdef __AROS__
184 /* FIXME: possibly enable this, once gadtools has been updated */
185 #else
186 #define GADTOOLSCOMPATIBLE
187 //enables some gadtools-weirdo-code, MUST be set in both gadtools & intui to work!!!
188 #endif
190 #ifdef SKINS
191 //#define USEGETIPREFS
192 #endif
194 /* simpleref layers have gadgets redrawn when app calls beginrefresh() */
195 //#define BEGINUPDATEGADGETREFRESH
196 //#define DAMAGECACHE
198 //#define USEWINDOWLOCK
199 #ifdef USEWINDOWLOCK
200 #define LOCKWINDOW ObtainSemaphore(&GetPrivIBase(IntuitionBase)->WindowLock);
201 #define UNLOCKWINDOW ReleaseSemaphore(&GetPrivIBase(IntuitionBase)->WindowLock);
202 #else
203 #define LOCKWINDOW
204 #define UNLOCKWINDOW
205 #endif
206 /* jDc: do NOT disable this! */
208 #define USEGADGETLOCK
209 #ifdef USEGADGETLOCK
210 #define LOCKGADGET ObtainSemaphore(&GetPrivIBase(IntuitionBase)->GadgetLock);
211 #define UNLOCKGADGET ReleaseSemaphore(&GetPrivIBase(IntuitionBase)->GadgetLock);
212 #define LOCKWINDOWLAYERS(w) ;
213 #define UNLOCKWINDOWLAYERS(w) ;
214 #else
215 #define LOCKGADGET
216 #define UNLOCKGADGET
217 #define LOCKWINDOWLAYERS(w) LockLayerInfo(&w->WScreen->LayerInfo); \
218 if (((struct IntWindow *)(w))->borderlayer) {LockLayer(0,((struct IntWindow *)(w))->borderlayer);}; \
219 if (((struct IntWindow *)(w))->wlayer) {LockLayer(0,((struct IntWindow *)(w))->wlayer);};
220 #define UNLOCKWINDOWLAYERS(w) if (((struct IntWindow *)(w))->wlayer) {UnlockLayer(((struct IntWindow *)(w))->wlayer);}; \
221 if (((struct IntWindow *)(w))->borderlayer) {UnlockLayer(((struct IntWindow *)(w))->borderlayer);} \
222 UnlockLayerInfo(&w->WScreen->LayerInfo);
223 #endif
225 #define WLAYER(w) (((struct IntWindow *)(w))->wlayer)
226 #define BLAYER(w) (((struct IntWindow *)(w))->borderlayer)
228 //#define TIMEVALWINDOWACTIVATION
230 /* If PROP_RENDER_OPTIMIZATION is set to 1, propgadget code tries to optimize rendering
231 during prop gadget knob movement. Only area of the propgadget that is affected by
232 prop gadget knob movement is re-rendered.
234 Unfortunately this can fail with some programs, like DOpus 4.x text viewer */
236 #define PROP_RENDER_OPTIMIZATION 0
238 #define SINGLE_SETPOINTERPOS_PER_EVENTLOOP 1
240 #ifndef LIFLG_SUPPORTS_OFFSCREEN_LAYERS
241 /* Defined in <graphics/layers.h>, but apparently not on MorphOS. */
242 # define LIFLG_SUPPORTS_OFFSCREEN_LAYERS 2
243 #endif
245 #define INTUITIONNAME "intuition.library"
246 #define MENUBARLABELCLASS "menubarlabelclass"
248 #define DEFPUBSCREEN TRUE
250 #define USE_NEWDISPLAYBEEP 1
252 #define TITLEBUFFERLEN 255
254 #define USE_IDCMPUPDATE_MESSAGECACHE 0
256 #ifdef __MORPHOS__
257 #if INCLUDE_VERSION < 50
259 /********************************************************************************/
260 /* imageclass.h AROS extensions */
262 #define SYSIA_WithBorder IA_FGPen /* default: TRUE */
263 #define SYSIA_Style IA_BGPen /* default: SYSISTYLE_NORMAL */
265 #define SYSISTYLE_NORMAL 0
266 #define SYSISTYLE_GADTOOLS 1 /* to get arrow images in gadtools look */
268 /********************************************************************************/
269 /* gadgetclass.h AROS extenstions */
271 /* This method is invoked to learn about the sizing requirements of your class,
272 before an object is created. This is AROS specific. */
273 #define GM_DOMAIN 7
274 struct gpDomain
276 STACKED ULONG MethodID; /* GM_DOMAIN */
277 STACKED struct GadgetInfo *gpd_GInfo; /* see <intuition/cghooks.h> */
278 STACKED struct RastPort *gpd_RPort; /* RastPort to calculate dimensions for. */
279 STACKED LONG gpd_Which; /* see below */
280 STACKED struct IBox gpd_Domain; /* Resulting domain. */
281 STACKED struct TagItem *gpd_Attrs; /* Additional attributes. None defined,
282 yet. */
285 /********************************************************************************/
287 /* gpd_Which */
288 #define GDOMAIN_MINIMUM 0 /* Calculate minimum size. */
289 #define GDOMAIN_NOMINAL 1 /* Calculate nominal size. */
290 #define GDOMAIN_MAXIMUM 2 /* Calculate maximum size. */
292 #endif /* INCLUDE_VERSION < 50 */
293 #endif /* ifdef __MORPHOS__ */
295 /********************************************************************************/
296 #define GM_MOVETEST 8
297 /* this method is used by our draggad to tell if it's OK to move the mouse when window
298 is near screen boundaries and offscreen is disabled. msg = gpInput*/
299 //retvals are:
300 #define MOVETEST_MOVE 0
301 #define MOVETEST_ADJUSTPOS 1
303 /* ObtainGIRPort must install a 0 clipregion and
304 set scrollx/scrolly of layer to 0. Since this
305 will be restored only when ReleaseGIRPort is
306 called, we must backup the orig values somewhere */
308 struct LayerContext
310 struct Region *clipregion;
311 WORD scroll_x;
312 WORD scroll_y;
313 WORD nestcount;
317 /* Preferences */
319 #define IP_OLDFONT 2
320 #define IP_OLDOVERSCAN 3
321 #define IP_OLDICONTROL 4
322 #define IP_OLDPOINTER 7
323 #define IP_OLDPALETTE 8
324 #define IP_OLDPENS 9
326 #define IP_SCREENMODE 1
327 #define IP_FONT 101//2
328 #define IP_ICONTROL 102//4
329 #define IP_POINTER 103//7
330 #define IP_PTRCOLOR 104//8
331 #define IP_PALETTE 105
332 #define IP_IACTIONS 20
333 #define IP_IEXTENSIONS 21
334 #define IP_INPUTEXT 22
336 #ifdef __MORPHOS__
338 struct IScreenModePrefs
340 ULONG smp_DisplayID;
341 UWORD smp_Width;
342 UWORD smp_Height;
343 UWORD smp_Depth;
344 UWORD smp_Control;
347 struct IIControlPrefs
349 UWORD ic_TimeOut;
350 WORD ic_MetaDrag;
351 ULONG ic_Flags;
352 UBYTE ic_WBtoFront;
353 UBYTE ic_FrontToBack;
354 UBYTE ic_ReqTrue;
355 UBYTE ic_ReqFalse;
358 #else
360 #include <intuition/iprefs.h>
362 #endif
364 struct Color32
366 ULONG red;
367 ULONG green;
368 ULONG blue;
371 #define COLORTABLEENTRIES 8
373 struct IntScreen;
375 #define RESOURCELIST_HASHSIZE 256
377 #define RESOURCE_WINDOW 1
378 #define RESOURCE_SCREEN 2
380 struct HashNode
382 struct MinNode node;
383 UWORD type;
384 APTR resource;
387 /* Internal Screen Notification Data */
388 struct IntScreenNotify
390 struct Node node;
391 struct MsgPort *port;
392 struct Task *sigtask;
393 struct Hook *hook;
394 ULONG flags;
395 IPTR userdata;
396 char *pubname;
397 BYTE sigbit;
400 /* IntuitionBase */
401 struct IntIntuitionBase
403 struct IntuitionBase IBase;
404 #ifdef __MORPHOS__
405 WORD _MinXMouse,_MaxXMouse; /* Old 1.3 Base entries*/
406 WORD _MinYMouse,_MaxYMouse; /* Old 1.3 Base entries*/
407 ULONG _StartSecs,_StartMicros; /* Old 1.3 Base entries*/
408 char *SystemRequestTitle; /* written by locale as it seems..what a crappy interface*/
409 char *WorkbenchTitle; /* written by locale as it seems..what a crappy interface*/
412 * savety pad for intuitionbase accesses
413 * probably needs to be smarter
415 UBYTE Pad[0x800];
416 #endif
418 /* Put local shit here, invisible for the user */
419 #ifdef __MORPHOS__
420 struct Library *CyberGfxBase;
421 struct Library *MUIMasterBase;
422 #endif
424 struct Library *InputBase;
425 struct Library *TimerBase;
426 struct MsgPort *TimerMP;
427 struct timerequest *TimerIO;
429 struct MsgPort *WorkBenchMP;
430 struct Screen *WorkBench;
431 struct SignalSemaphore *IBaseLock;
433 /* Intuition input handlers replyport. This one is set
434 int rom/inputhandler.c/InitIIH()
436 struct MsgPort *IntuiReplyPort;
437 struct MinList *IntuiActionQueue;
438 struct IOStdReq *InputIO;
439 struct MsgPort *InputMP;
441 /* Intuition Screennotify Replyport if SNOTIFY_WAIT_REPLY is specified */
443 struct MsgPort *ScreenNotifyReplyPort;
445 BOOL InputDeviceOpen;
446 struct Interrupt *InputHandler;
448 struct Hook *GlobalEditHook;
449 /* The default global edit hook */
450 struct Hook DefaultEditHook;
453 APTR DriverData; /* Pointer which the driver may use */
455 struct Screen *DefaultPubScreen;
456 struct SignalSemaphore PubScrListLock;
457 struct MinList PubScreenList;
458 UWORD pubScrGlobalMode;
460 struct SignalSemaphore ScreenNotificationListLock;
461 struct List ScreenNotificationList;
463 struct SignalSemaphore GadgetLock;
464 struct SignalSemaphore MenuLock;
465 struct SignalSemaphore WindowLock;
466 struct SignalSemaphore IntuiActionLock;
467 struct SignalSemaphore InputHandlerLock;
468 struct LayerContext BackupLayerContext;
470 struct IClass *dragbarclass;
471 struct IClass *sizebuttonclass;
473 APTR *mosmenuclass;
475 struct Preferences *DefaultPreferences;
476 struct Preferences *ActivePreferences;
478 struct MsgPort *MenuHandlerPort;
479 BOOL MenusActive;
481 struct TextFont *ScreenFont;
482 struct TextFont *TopazFont;
484 /* Dos function DisplayError() before intuition.library patched it */
485 APTR OldDisplayErrorFunc;
487 struct SignalSemaphore ClassListLock;
488 struct MinList ClassList;
489 struct IClass RootClass;
491 #ifdef __MORPHOS__
492 struct ViewExtra *ViewLordExtra;
493 LONG SpriteNum;
494 #endif
496 #ifdef SKINS
497 ULONG *SmallMenuPool;
498 #endif
499 ULONG *IDCMPPool;
501 struct IScreenModePrefs ScreenModePrefs;
502 struct IIControlPrefs IControlPrefs;
503 #ifdef SKINS
504 struct IAction *IControlActions;
505 struct IControlExtensions IControlExtensions;
506 ULONG NumIControlActions;
507 struct InputPrefsExt InputPrefsExt;
508 #endif
509 struct IClass *pointerclass;
510 Object *DefaultPointer;
511 Object *BusyPointer;
512 UWORD DriPens2[NUMDRIPENS];
513 UWORD DriPens4[NUMDRIPENS];
514 UWORD DriPens8[NUMDRIPENS];
515 struct Color32 Colors[COLORTABLEENTRIES];
516 ULONG DMStartSecs;
517 ULONG DMStartMicro;
518 struct IntScreen *MenuVerifyScreen;
519 ULONG PointerDelay;
521 #ifdef SKINS
522 struct SignalSemaphore DataTypesSem;
523 struct Library *DataTypesBase; /* should be opened ONLY by int_InitCustomChanges!*/
524 #endif
526 ULONG LastClickSecs;
527 ULONG LastClickMicro; /* for doubleclick to front */
528 ULONG DoubleClickCounter;
529 ULONG DoubleClickButton;
531 #ifdef SKINS
532 struct Hook transphook; /* hook for windows with intui transp */
533 struct Hook notransphook; /* hook for windows with no additional transp (borderless,etc) */
534 #endif
535 //#ifdef INTUITION_NOTIFY_SUPPORT // commented to avoid offset fuckup! - Piru
536 struct Library *ScreenNotifyBase;
537 struct Library *NotifyIntuitionBase;
538 //#endif
540 struct RastPort DoGadgetMethodRP;
541 struct GadgetInfo DoGadgetMethodGI;
543 struct SignalSemaphore WinDecorSem;
544 Object *WinDecorObj;
545 struct SignalSemaphore ScrDecorSem;
546 Object *ScrDecorObj;
547 struct SignalSemaphore MenuDecorSem;
548 Object *MenuDecorObj;
550 Object *DefWinDecorObj;
551 Object *DefScrDecorObj;
552 Object *DefMenuDecorObj;
554 struct List Decorations;
555 struct NewDecorator *Decorator;
557 #ifdef USEGETIPREFS
558 BOOL IPrefsLoaded;
559 #endif
561 #if USE_NEWDISPLAYBEEP
562 LONG BeepingScreens;
563 #endif
565 WORD prop_clickoffset_x, prop_clickoffset_y;
567 struct MinList ResourceList[RESOURCELIST_HASHSIZE];
569 /* Menu Look Settings */
570 int FrameSize;
573 struct SharedPointer
575 struct ExtSprite *sprite;
576 WORD xoffset, yoffset;
577 int ref_count;
580 struct SharedPointer *CreateSharedPointer(struct ExtSprite *, int, int, struct IntuitionBase *);
581 void ObtainSharedPointer(struct SharedPointer *, struct IntuitionBase *);
582 void ReleaseSharedPointer(struct SharedPointer *, struct IntuitionBase *);
584 #ifdef INTUITION_NOTIFY_SUPPORT
585 void sn_DoNotify(ULONG type, APTR value, struct Library *_ScreenNotifyBase);
586 #endif
588 struct IntDrawInfo
590 struct DrawInfo dri;
591 struct Screen *dri_Screen;
592 struct SignalSemaphore dri_WinDecorSem;
593 Object *dri_WinDecorObj;
594 struct SignalSemaphore dri_ScrDecorSem;
595 Object *dri_ScrDecorObj;
598 #define LOCK_WINDECOR(IntuitionBase) ObtainSemaphore(&((struct IntIntuitionBase *)(IntuitionBase))->WinDecorSem);
599 #define LOCKSHARED_WINDECOR(IntuitionBase) ObtainSemaphoreShared(&((struct IntIntuitionBase *)(IntuitionBase))->WinDecorSem);
600 #define UNLOCK_WINDECOR(IntuitionBase) ReleaseSemaphore(&((struct IntIntuitionBase *)(IntuitionBase))->WinDecorSem);
602 #define LOCK_SCRDECOR(IntuitionBase) ObtainSemaphore(&((struct IntIntuitionBase *)(IntuitionBase))->ScrDecorSem);
603 #define LOCKSHARED_SCRDECOR(IntuitionBase) ObtainSemaphoreShared(&((struct IntIntuitionBase *)(IntuitionBase))->ScrDecorSem);
604 #define UNLOCK_SCRDECOR(IntuitionBase) ReleaseSemaphore(&((struct IntIntuitionBase *)(IntuitionBase))->ScrDecorSem);
606 #define LOCK_MENUDECOR(IntuitionBase) ObtainSemaphore(&((struct IntIntuitionBase *)(IntuitionBase))->MenuDecorSem);
607 #define LOCKSHARED_MENUDECOR(IntuitionBase) ObtainSemaphoreShared(&((struct IntIntuitionBase *)(IntuitionBase))->MenuDecorSem);
608 #define UNLOCK_MENUDECOR(IntuitionBase) ReleaseSemaphore(&((struct IntIntuitionBase *)(IntuitionBase))->MenuDecorSem);
610 struct IntScreen
612 struct Screen Screen;
614 /* Private fields */
615 struct HashNode hashnode;
616 struct IntDrawInfo DInfo;
617 struct TTextAttr textattr;
618 ULONG textattrtags[3];
619 UWORD Pens[NUMDRIPENS];
620 struct PubScreenNode *pubScrNode;
621 Object *depthgadget;
622 UWORD SpecialFlags;
623 struct Layer *rootLayer;
624 ULONG DisplayBeepColor0[3];
625 struct Window *DisplayBeepWindow;
626 ULONG ModeID;
627 struct MonitorSpec *Monitor;
628 struct SharedPointer *Pointer;
629 struct Window *MenuVerifyActiveWindow;
630 int MenuVerifyTimeOut;
631 int MenuVerifyMsgCount;
632 ULONG MenuVerifySeconds;
633 ULONG MenuVerifyMicros;
634 ULONG DecorUserBufferSize;
635 IPTR DecorUserBuffer;
636 Object *WinDecorObj;
637 Object *ScrDecorObj;
638 Object *MenuDecorObj;
639 struct NewDecorator *Decorator;
641 struct BitMap *AllocatedBitmap;
643 STRPTR ID;
644 #ifdef SKINS
645 WORD LastClockPos;
646 WORD LastClockWidth;
647 #else
648 ULONG Reserved;
649 #endif
650 #ifdef SKINS
651 struct SkinInfo SkinInfo;
652 struct RastPort *TitlebarBufferRP;
653 struct Window *TitlebarBufferWin;
654 ULONG TitlebarWinWidth;
655 ULONG TitlebarWinActive;
656 #endif
657 #if USE_NEWDISPLAYBEEP
658 UBYTE BeepingCounter;
659 #endif
662 #define GetPrivScreen(s) ((struct IntScreen *)s)
664 /* SpecialFlags */
665 #define SF_IsParent (0x0001)
666 #define SF_IsChild (0x0002)
667 #define SF_InvisibleBar (0x0004)
668 #define SF_AppearingBar (0x0008)
669 #define SF_SysFont (0x0010)
671 struct IntIntuiMessage
673 struct ExtIntuiMessage eimsg;
676 ** The following field is needed, because in case of IDCMP_RAWKEY
677 ** IntuiMessage->IAddress is a pointer to this data, not the data
678 ** itself (which is the case for IDCMP_VANILLAKEY)
681 APTR prevCodeQuals;
684 #define INT_INTUIMESSAGE(x) ((struct IntIntuiMessage *)(x))
688 /*extern struct IntuitionBase * IntuitionBase;*/
690 #define IW(window) ((struct IntWindow *) (window))
692 #define GetPubIBase(ib) ((struct IntuitionBase *)ib)
693 #define GetPrivIBase(ib) ((struct IntIntuitionBase *)ib)
695 #ifdef __MORPHOS__
696 #ifdef CyberGfxBase
697 #undef CyberGfxBase
698 #endif
699 #define CyberGfxBase (GetPrivIBase(IntuitionBase)->CyberGfxBase)
700 #ifdef MUIMasterBase
701 #undef MUIMasterBase
702 #define MUIMasterBase (GetPrivIBase(IntuitionBase)->MUIMasterBase)
703 #endif
704 #endif
706 #ifdef InputBase
707 #undef InputBase
708 #endif
709 #define InputBase (GetPrivIBase(IntuitionBase)->InputBase)
711 #ifdef TimerBase
712 #undef TimerBase
713 #endif
714 #define TimerBase (GetPrivIBase(IntuitionBase)->TimerBase)
716 #ifdef TimerMP
717 #undef TimerMP
718 #endif
719 #define TimerMP (GetPrivIBase(IntuitionBase)->TimerMP)
721 #ifdef TimerIO
722 #undef TimerIO
723 #endif
724 #define TimerIO (GetPrivIBase(IntuitionBase)->TimerIO)
726 #define PublicClassList ((struct List *)&(GetPrivIBase(IntuitionBase)->ClassList))
729 /* stegerg: one can have sysgadgets outside of window border! All sysgadgets in window
730 border must have set GACT_???BORDER and, if they are in a gzz window, also
731 GTYP_GZZGADGET */
733 #define IS_GZZ_GADGET(gad) (((gad)->GadgetType) & GTYP_GZZGADGET)
735 #define IS_BORDER_GADGET(gad) (IS_GZZ_GADGET(gad) || \
736 ((gad)->Activation & (GACT_RIGHTBORDER|GACT_LEFTBORDER|GACT_TOPBORDER|GACT_BOTTOMBORDER)))
738 #define IS_SYS_GADGET(gad) (((gad)->GadgetType) & GTYP_SYSTYPEMASK)
740 #define IS_BOOPSI_GADGET(gad) (((gad)->GadgetType & GTYP_GTYPEMASK) == GTYP_CUSTOMGADGET)
742 /*#define IS_BORDER_GADGET(gad) \
743 (((gad->GadgetType) & GTYP_SYSGADGET) \
744 || ((gad)->Activation & (GACT_RIGHTBORDER|GACT_LEFTBORDER|GACT_TOPBORDER|GACT_BOTTOMBORDER))) */
746 #define IS_REQ_GADGET(gad) ((gad)->GadgetType & GTYP_REQGADGET)
748 #define IS_SCREEN_GADGET(gad) ((gad)->GadgetType & GTYP_SCRGADGET)
750 #define SET_GI_RPORT(gi, w, req, gad) \
751 (gi)->gi_RastPort = (IS_SCREEN_GADGET(gad) ? \
752 ((gi)->gi_Screen->BarLayer ? (gi)->gi_Screen->BarLayer->rp : NULL) : \
753 (IS_BORDER_GADGET(gad) ? (w)->BorderRPort : \
754 ((req) ? ((req)->ReqLayer->rp) : (w)->RPort)) \
758 #define REFRESHGAD_BOOPSI 1 /* boopsi gadgets */
759 #define REFRESHGAD_BORDER 2 /* gadgets in window border */
760 #define REFRESHGAD_REL 4 /* gadgets with GFLG_RELRIGHT, GFLG_RELBOTTOM,GFLG_RELWIDTH, GFLG_RELHEIGHT */
761 #define REFRESHGAD_RELS 8 /* GFLG_RELSPECIAL gadgets */
762 #define REFRESHGAD_TOPBORDER 16 /* used by setwindowtitle */
763 #define REFRESHGAD_NOGADTOOLS 32 /* used in some cases for _mustbe_ */
765 #define SYSGADGET_ACTIVE (iihdata->ActiveSysGadget != NULL)
767 VOID int_refreshglist(struct Gadget *gadgets, struct Window *window,
768 struct Requester *requester, LONG numGad, LONG mustbe, LONG mustnotbe,
769 struct IntuitionBase *IntuitionBase);
771 VOID int_RefreshWindowFrame(struct Window *window, LONG mustbe, LONG mustnotbe,
772 LONG mode,
773 struct IntuitionBase *IntuitionBase);
775 #define int_refreshwindowframe(a,b,c,d) int_RefreshWindowFrame(a,b,c,0,d);
777 /* Keep the system gadgets in the same order than the original intuition,
778 * some programs make bad asumptions about that...
780 enum
782 DEPTHGAD,
783 ZOOMGAD,
784 SIZEGAD,
785 CLOSEGAD,
786 ICONIFYGAD,
787 LOCKGAD,
788 MUIGAD,
789 POPUPGAD,
790 SNAPSHOTGAD,
791 JUMPGAD,
792 DRAGBAR,
793 NUM_SYSGADS
796 #define SYSGAD(w, idx) (((struct IntWindow *)(w))->sysgads[idx])
798 struct IntWindow
800 struct Window window;
802 Object *sysgads[NUM_SYSGADS];
803 struct Image *AmigaKey;
804 struct Image *Checkmark;
805 struct Image *SubMenuImage;
806 struct Window *menulendwindow;
808 struct HashNode hashnode;
810 /* When the Zoom gadget is pressed the window will have the
811 dimensions stored here. The old dimensions are backed up here
812 again. */
813 WORD ZipLeftEdge;
814 WORD ZipTopEdge;
815 WORD ZipWidth;
816 WORD ZipHeight;
818 /* max. number of mousemove events to send to this window */
819 WORD mousequeue;
821 /* act. number of mousemove events sent to this window */
822 WORD num_mouseevents;
824 /* max. number of repeated IDCMP_RAWKEY, IDCMP_VANILLAKEY and IDCMP_IDCMPUPDATE
825 messages to send to this window */
826 WORD repeatqueue;
828 /* act. number of repeated IDCMP_RAWKEY, IDCMP_VANILLAKEY and IDCMP_IDCMPUPDATE
829 messages sent to this window */
830 WORD num_repeatevents;
832 #if USE_IDCMPUPDATE_MESSAGECACHE
833 /* number of unreplied IDCMP_IDCMPUPDATE messages sent to window
834 used in few hacks :) */
835 WORD num_idcmpupdate;
836 #endif
838 WORD sizeimage_width;
839 WORD sizeimage_height;
841 ULONG helpflags;
842 ULONG helpgroup;
844 Object *pointer;
845 BOOL busy;
846 BOOL free_pointer;
847 UWORD pointer_delay;
848 ULONG extrabuttons;
849 ULONG extrabuttonsid; /* replaces ETI_Dummy if apps wishes it */
850 #ifdef SKINS
851 ULONG titlepos; /* used by titlebar pattern fill stuff */
852 #else
853 ULONG reserved1;
854 #endif
855 ULONG specialflags;
857 #ifdef SKINS
858 struct Region *transpregion;
859 struct Hook *usertransphook;
860 struct Region *usertranspregion;
861 #endif
863 #ifdef DAMAGECACHE
864 struct Region *trashregion;
865 #endif
866 char titlebuffer[TITLEBUFFERLEN+1];
868 #if USE_IDCMPUPDATE_MESSAGECACHE
869 struct IntuiMessage *messagecache; //for idcmpupdate cache
870 #endif
872 struct Layer *wlayer;
873 struct Layer *borderlayer;
875 struct timeval lastmsgsent;
876 struct timeval lastmsgreplied;
878 #ifdef TIMEVALWINDOWACTIVATION
879 struct timeval activationtime;
880 #endif
882 #ifdef SKINS
883 struct Hook custombackfill;
884 struct HookData hd;
885 #endif
886 struct Hook DefaultWindowShapeHook;
887 BOOL CustomShape;
888 struct Region *OutlineShape;
889 ULONG DecorUserBufferSize;
890 IPTR DecorUserBuffer;
893 #define SPFLAG_ICONIFIED 1
894 #define SPFLAG_NOICONIFY 2
895 #define SPFLAG_SKININFO 4
896 #define SPFLAG_LAYERREFRESH 8
897 #define SPFLAG_TRANSPHOOK 16
898 #define SPFLAG_LAYERRESIZED 32
899 #define SPFLAG_USERPORT 64
900 #define SPFLAG_IAMDEAD 128
901 #define SPFLAG_CLOSING 256 //used with iamdead
902 #define SPFLAG_WANTBUFFER 512
904 #define HELPF_ISHELPGROUP 1
905 #define HELPF_GADGETHELP 2
907 #define IS_NOCAREREFRESH(win) (((win)->Flags & WFLG_NOCAREREFRESH) ? TRUE : FALSE)
908 #define IS_DOCAREREFRESH(win) (((win)->Flags & WFLG_NOCAREREFRESH) ? FALSE : TRUE )
909 #define IS_SIMPLEREFRESH(win) (((win)->Flags & WFLG_SIMPLE_REFRESH) ? TRUE : FALSE)
910 #define IS_GZZWINDOW(win) (((win)->Flags & WFLG_GIMMEZEROZERO) ? TRUE : FALSE)
913 /* Flag definitions for MoreFlags */
915 #define WMFLG_NOTIFYDEPTH (1 << 0) /* Window wants notification when
916 it's depth arranged */
918 #define WMFLG_DO_UNLOCKPUBSCREEN (1 << 1)
919 #define WMFLG_MENUHELP (1 << 2)
920 #define WMFLG_POINTERDELAY (1 << 3)
921 #define WMFLG_TABLETMESSAGES (1 << 4)
923 // FIXME: ehm... this one should die a horrible death!
924 #define WMFLG_IAMMUI (1 << 5)
926 struct IntScreenBuffer
928 struct ScreenBuffer sb;
929 BOOL free_bitmap;
933 /* Driver prototypes */
935 extern int intui_init (struct IntuitionBase *);
936 extern int intui_open (struct IntuitionBase *);
937 extern void intui_close (struct IntuitionBase *);
938 extern void intui_expunge (struct IntuitionBase *);
939 extern int intui_GetWindowSize (void);
940 extern void intui_WindowLimits (struct Window * window, WORD MinWidth, WORD MinHeight, UWORD MaxWidth, UWORD MaxHeight);
941 extern void intui_ActivateWindow (struct Window *);
942 extern BOOL intui_ChangeWindowBox (struct Window * window, WORD x, WORD y,
943 WORD width, WORD height);
944 extern void intui_CloseWindow (struct Window *, struct IntuitionBase *);
945 extern void intui_MoveWindow (struct Window * window, WORD dx, WORD dy);
946 extern int intui_OpenWindow (struct Window *, struct IntuitionBase *,
947 struct BitMap * SuperBitMap, struct Hook *backfillhook,
948 struct Region * shape, struct Hook * shapehook,
949 struct Layer * parent, ULONG visible);
950 extern void intui_SetWindowTitles (struct Window *, CONST_STRPTR, CONST_STRPTR);
951 extern void intui_RefreshWindowFrame(struct Window *win);
952 extern struct Window *intui_FindActiveWindow(struct InputEvent *ie, struct IntuitionBase *IntuitionBase);
953 extern void intui_ScrollWindowRaster(struct Window * win, WORD dx, WORD dy, WORD xmin,
954 WORD ymin, WORD xmax, WORD ymax,
955 struct IntuitionBase * IntuitionBase);
957 /* wbtasktalk protos */
959 ULONG TellWBTaskToCloseWindows(struct IntuitionBase *IntuitionBase);
960 ULONG TellWBTaskToOpenWindows(struct IntuitionBase *IntuitionBase);
962 /* intuition_misc protos */
963 extern void LoadDefaultPreferences(struct IntuitionBase * IntuitionBase);
964 Object* CreateStdSysImage(WORD which, WORD preferred_height, struct Screen *scr, APTR buffer,
965 struct DrawInfo *dri, struct IntuitionBase *IntuitionBase);
966 extern void CheckRectFill(struct RastPort *rp, WORD x1, WORD y1, WORD x2, WORD y2, struct IntuitionBase * IntuitionBase);
967 extern BOOL CreateWinSysGadgets(struct Window *w, struct IntuitionBase *IntuitionBase);
968 extern VOID KillWinSysGadgets(struct Window *w, struct IntuitionBase *IntuitionBase);
969 extern void CreateScreenBar(struct Screen *scr, struct IntuitionBase *IntuitionBase);
970 extern void KillScreenBar(struct Screen *scr, struct IntuitionBase *IntuitionBase);
971 extern void RenderScreenBar(struct Screen *scr, BOOL refresh, struct IntuitionBase *IntuitionBase);
972 extern void UpdateMouseCoords(struct Window *win);
973 extern WORD SubtractRectFromRect(struct Rectangle *a, struct Rectangle *b, struct Rectangle *destrectarray);
974 extern struct Region *DefaultWindowShapeFunc(struct Hook *hook, struct Layer *lay, struct ShapeHookMsg *msg);
976 extern LONG CalcResourceHash(APTR resource);
977 extern void AddResourceToList(APTR resource, UWORD resourcetype, struct IntuitionBase *IntuitionBase);
978 extern void RemoveResourceFromList(APTR resource, UWORD resourcetype, struct IntuitionBase *IntuitionBase);
979 extern BOOL ResourceExisting(APTR resource, UWORD resourcetype, struct IntuitionBase *IntuitionBase);
980 void FireScreenNotifyMessage(IPTR data, ULONG flag, struct IntuitionBase *IntuitionBase);
981 void FireScreenNotifyMessageCode(IPTR data, ULONG flag, ULONG code, struct IntuitionBase *IntuitionBase);
983 /* misc.c */
984 extern struct RastPort *MyCreateRastPort(struct IntuitionBase *);
985 extern struct RastPort *MyCloneRastPort(struct IntuitionBase *, struct RastPort *);
986 extern void MyFreeRastPort(struct IntuitionBase *, struct RastPort *);
987 extern void MySetPointerPos(struct IntuitionBase *, int, int);
988 struct TextFont *SafeReopenFont(struct IntuitionBase *, struct TextFont **);
989 extern Object *MakePointerFromPrefs(struct IntuitionBase *, struct Preferences *);
990 extern Object *MakePointerFromData(struct IntuitionBase *, UWORD *, int, int, int, int);
991 void InstallPointer(struct IntuitionBase *, Object **, Object *);
992 void SetPointerColors(struct IntuitionBase *IntuitionBase);
993 struct IClass *InitITextIClass (struct IntuitionBase * IntuitionBase);
994 struct Gadget *DoActivateGadget(struct Window *win, struct Requester *req, struct Gadget *gad,
995 struct IntuitionBase *IntuitionBase);
996 VOID DoGMLayout(struct Gadget *glist, struct Window *win, struct Requester *req,
997 UWORD numgad, BOOL initial, struct IntuitionBase *IntuitionBase);
998 BOOL ih_fire_intuimessage(struct Window * w, ULONG Class, UWORD Code, APTR IAddress,
999 struct IntuitionBase *IntuitionBase);
1000 void NotifyDepthArrangement(struct Window *w, struct IntuitionBase *IntuitionBase);
1002 /* printitext.c */
1004 void int_PrintIText(struct RastPort * rp, struct IntuiText * iText,
1005 LONG leftOffset, LONG topOffset, BOOL ignore_attributes,
1006 struct IntuitionBase *IntuitionBase);
1008 #ifdef __MORPHOS__
1009 BOOL IsLayerHiddenBySibling(struct Layer *layer, BOOL xx);
1010 LONG IsLayerVisible(struct Layer *layer);
1011 #endif
1013 void SetupGInfo(struct GadgetInfo *gi, struct Window *win, struct Requester *req,
1014 struct Gadget *gad, struct IntuitionBase *IntuitionBase);
1016 IPTR Custom_DoMethodA(struct IntuitionBase *, struct Gadget *, Msg);
1018 #ifdef __MORPHOS__
1019 #ifdef DoMethodA
1020 #undef DoMethodA
1021 #endif
1022 #define DoMethodA(x, ...) (REG_A6=(LONG)IntuitionBase, DoMethodA(x, __VA_ARGS__))
1023 #endif
1025 #define Custom_DoMethodA(x, ...) Custom_DoMethodA(IntuitionBase, x, __VA_ARGS__)
1027 #define HAS_CHILDREN(w) (NULL != w->firstchild)
1029 #ifdef __MORPHOS__
1030 #define DeinitRastPort(rp) ((void)0)
1031 #define CreateRastPort() MyCreateRastPort(IntuitionBase)
1032 #define CloneRastPort(rp) MyCloneRastPort(IntuitionBase, rp)
1033 #define FreeRastPort(rp) MyFreeRastPort(IntuitionBase, rp)
1034 #define SetPointerPos(x, y) MySetPointerPos(IntuitionBase, x, y)
1035 #define MouseCoordsRelative() 1
1036 #endif
1038 /* Replacement for dos.library/DisplayError() */
1039 AROS_UFP3(LONG, Intuition_DisplayError,
1040 AROS_UFPA(STRPTR, formatStr , A0),
1041 AROS_UFPA(ULONG , IDCMPFlags, D0),
1042 AROS_UFPA(APTR , args , A1));
1044 #define POINTERA_SharedPointer 0x80039010
1046 #ifndef __MORPHOS__
1047 #define dprintf kprintf
1048 #endif
1050 #define DEBUG_ACTIVATEGADGET(x) ;
1051 #define DEBUG_ACTIVATEWINDOW(x) ;
1052 #define DEBUG_ADDCLASS(x) ;
1053 #define DEBUG_ADDGADGET(x) ;
1054 #define DEBUG_ADDGLIST(x) ;
1055 #define DEBUG_ALLOCINTUIMESSAGE(x) ;
1056 #define DEBUG_ALLOCSCREENBUFFER(x) ;
1057 #define DEBUG_ALOHAWORKBENCH(x) ;
1058 #define DEBUG_CHANGEWINDOWBOX(x) ;
1059 #define DEBUG_CLOSESCREEN(x) ;
1060 #define DEBUG_CLOSEWINDOW(x) ;
1061 #define DEBUG_CLOSEWORKBENCH(x) ;
1062 #define DEBUG_DISPOSEOBJECT(x) ;
1063 #define DEBUG_DOGADGETMETHOD(x) ;
1064 #define DEBUG_DRAWBORDER(x) ;
1065 #define DEBUG_FINDCLASS(x) ;
1066 #define DEBUG_FREEICDATA(x) ;
1067 #define DEBUG_FREEINTUIMESSAGE(x) ;
1068 #define DEBUG_FREESCREENBUFFER(x) ;
1069 #define DEBUG_FREESCREENDRAWINFO(x) ;
1070 #define DEBUG_GADGETMOUSE(x) ;
1071 #define DEBUG_GETATTR(x) ;
1072 #define DEBUG_GETDEFAULTPUBSCREEN(x) ;
1073 #define DEBUG_GETDEFPREFS(x) ;
1074 #define DEBUG_GETGADGETIBOX(x) ;
1075 #define DEBUG_GETPREFS(x) ;
1076 #define DEBUG_GETSCREENDATA(x) ;
1077 #define DEBUG_GETSCREENDRAWINFO(x) ;
1078 #define DEBUG_HIDEWINDOW(x) ;
1079 #ifdef __MORPHOS__
1080 #define DEBUG_INIT(x) if (SysBase->ex_DebugFlags & EXECDEBUGF_INIT) x;
1081 #else
1082 #define DEBUG_INIT(x) ;
1083 #endif
1084 #define DEBUG_OPEN(x) ;
1085 #define DEBUG_CLOSE(x) ;
1086 #define DEBUG_INPUTEVENT(x) ;
1087 #define DEBUG_INTREFRESHGLIST(x) ;
1088 #define DEBUG_INTUITEXTLENGTH(x) ;
1089 #define DEBUG_LENDMENUS(x) ;
1090 #define DEBUG_LOCKPUBSCREEN(x) ;
1091 #define DEBUG_MAKECLASS(x) ;
1092 #define DEBUG_MODIFYIDCMP(x) ;
1093 #define DEBUG_NEWOBJECT(x) ;
1094 #define DEBUG_NEXTOBJECT(x) ;
1095 #define DEBUG_OBTAINGIRPORT(x) ;
1096 #define DEBUG_OFFGADGET(x) ;
1097 #define DEBUG_OFFMENU(x) ;
1098 #define DEBUG_ONGADGET(x) ;
1099 #define DEBUG_ONMENU(x) ;
1100 #define DEBUG_OPENSCREEN(x) ;
1101 #define DEBUG_OPENSCREENTAGLIST(x) ;
1102 #define DEBUG_OPENWINDOW(x) ;
1103 #define DEBUG_OPENWINDOWTAGLIST(x) ;
1104 #define DEBUG_OPENWORKBENCH(x) ;
1105 #define DEBUG_POINTER(x) ;
1106 #define DEBUG_PRINTITEXT(x) ;
1107 #define DEBUG_QUERYOVERSCAN(x) ;
1108 #define DEBUG_REFRESH(x) ;
1109 #define DEBUG_RELEASEGIRPORT(x) ;
1110 #define DEBUG_REMEMBER(x) ;
1111 #define DEBUG_REMOVEGLIST(x) ;
1112 #define DEBUG_REPORTMOUSE(x) ;
1113 #define DEBUG_REQUEST(x) ;
1114 #define DEBUG_SCROLLWINDOWRASTER(x) ;
1115 #define DEBUG_SENDINTUIMESSAGE(x) ;
1116 #define DEBUG_SETATTRS(x) ;
1117 #define DEBUG_SETGADGETATTRS(x) ;
1118 #define DEBUG_SETPOINTER(x) ;
1119 #ifdef __MORPHOS__
1120 #define DEBUG_SETIPREFS(x) if (SysBase->ex_DebugFlags & EXECDEBUGF_INIT) x;
1121 #else
1122 #define DEBUG_SETIPREFS(x) ;
1123 #endif
1124 #ifdef __MORPHOS__
1125 #define DEBUG_SETPREFS(x) if (SysBase->ex_DebugFlags & EXECDEBUGF_INIT) x;
1126 #else
1127 #define DEBUG_SETPREFS(x) ;
1128 #endif
1129 #define DEBUG_SHOWWINDOW(x) ;
1130 #define DEBUG_UNLOCKPUBSCREEN(x) ;
1131 #define DEBUG_WINDOWLIMITS(x) ;
1132 #define DEBUG_WINDOWTOBACK(x) ;
1133 #define DEBUG_WINDOWTOFRONT(x) ;
1134 #define DEBUG_ZIPWINDOW(x) ;
1135 #define DEBUG_VISITOR(x) ;
1136 #define DEBUG_WORKBENCH(x) ;
1137 #define DEBUG_LOCKPUBSCREENLIST(x) ;
1138 #define DEBUG_UNLOCKPUBSCREENLIST(x) ;
1139 #define DEBUG_RETHINKDISPLAY(x) ;
1142 * Private data structures of the classes defined by intuition.library
1145 /* ICClass */
1146 struct ICData
1148 Object *ic_Target;
1149 struct TagItem *ic_Mapping;
1150 struct TagItem *ic_CloneTags;
1151 ULONG ic_LoopCounter;
1154 /* ModelClass */
1155 struct ModelData
1157 struct MinList memberlist;
1160 /* FrameIClass */
1161 struct FrameIData
1163 /* render bevel only with no fill? */
1164 BOOL fid_EdgesOnly;
1166 /* inverted bevel pens? */
1167 BOOL fid_Recessed;
1169 /* frame style? */
1170 WORD fid_FrameType;
1172 WORD fid_HOffset;
1173 WORD fid_VOffset;
1176 /* SysIClass */
1177 struct SysIData
1179 struct DrawInfo *dri;
1180 struct Image *frame;
1181 APTR userbuffer;
1182 ULONG type;
1183 UWORD flags;
1186 /* FillRectClass */
1187 struct FillRectData
1189 WORD apatsize;
1190 WORD mode;
1193 /* GadgetClass */
1194 struct GadgetData
1196 struct ExtGadget EG;
1197 struct ICData IC;
1200 /* PropGClass */
1201 struct PropGData
1203 /* We use a propinfo structure, because we use the same routines
1204 for intuition propgadtets and in propgclass */
1206 struct PropInfo propinfo;
1208 /* A little kludge: since the HandleMouseMove function
1209 wants dx/dy and not absolute mouse coords, we
1210 have to remember the last ones */
1212 UWORD last_x;
1213 UWORD last_y;
1215 /* One only have to store total or visble, and use some other
1216 formulas than those in the RKRM:L, but for
1217 code simplicity I store them all. */
1218 UWORD top, visible, total;
1220 UWORD flags;
1221 struct BBox *old_knobbox;
1222 struct Hook *DisplayHook;
1225 /* StrGClass */
1226 struct StrGData
1228 struct StringInfo StrInfo;
1229 struct StringExtend StrExtend;
1230 UBYTE Flags;
1233 /* GroupGClass */
1234 struct GroupGData
1236 struct MinList memberlist;
1237 struct Gadget *activegad;
1240 /* DragBarClass */
1241 struct dragbar_data
1243 /* Current left- and topedge of moving window. Ie when the user releases
1244 the LMB after a windowdrag, the window's new coords will be (curleft, curtop)
1247 LONG curleft;
1248 LONG curtop;
1250 /* The current x and y coordinates relative to curleft/curtop */
1251 LONG mousex;
1252 LONG mousey;
1254 /* Whether the dragframe is currently drawn or erased */
1255 BOOL isrendered;
1257 /* Used to tell GM_GOINACTIVE whether the drag was canceled or not */
1258 BOOL drag_canceled;
1260 /* Used to tell GM_GOINACTIVE whether UnlockLayer() or not */
1261 BOOL drag_layerlock;
1262 #ifdef USEGADGETLOCK
1263 BOOL drag_gadgetlock;
1264 #endif
1265 BOOL drag_refreshed;
1267 /* Rastport to use during update */
1268 struct RastPort *rp;
1270 UQUAD lasteventtime;
1272 LONG startleft;
1273 LONG starttop;
1275 #ifdef USEWINDOWLOCK
1276 /* used to prevent windows from opening/closing while user drags a window */
1277 BOOL drag_windowlock;
1278 #endif
1280 struct Task *movetask;
1284 /* SizeButtonClass */
1285 struct sizebutton_data
1288 /* The current width and height of the rubber band frame */
1289 ULONG width;
1290 ULONG height;
1291 ULONG top;
1292 ULONG left;
1294 /* holds original sizes */
1295 ULONG Width;
1296 ULONG Height;
1297 ULONG TopEdge;
1298 ULONG LeftEdge;
1300 /* the offset of the mouse pointer to the rubber band frame*/
1301 LONG mouseoffsetx;
1302 LONG mouseoffsety;
1304 /* Whether the dragframe is currently drawn or erased */
1305 BOOL isrendered;
1307 /* Used to tell GM_GOINACTIVE whether the drag was canceled or not */
1308 BOOL drag_canceled;
1310 /* Used to tell GM_GOINACTIVE whether UnlockLayer() or not */
1311 BOOL drag_layerlock;
1312 #ifdef USEGADGETLOCK
1313 BOOL drag_gadgetlock;
1314 #endif
1316 BOOL drag_refreshed;
1318 /* Rastport to use during update */
1319 struct RastPort *rp;
1321 UQUAD lasteventtime;
1323 #ifdef USEWINDOWLOCK
1324 /* used to prevent windows from opening/closing while user drags a window */
1325 BOOL drag_windowlock;
1326 #endif
1328 #ifdef SKINS
1329 ULONG drag_type;
1330 #endif
1332 ULONG drag_ticks;
1336 /* MenuBarLabelClass */
1337 struct MenuBarLabelData
1339 struct DrawInfo *dri;
1342 /* PointerClass */
1343 struct PointerData
1345 struct SharedPointer *shared_pointer;
1348 /* WinDecorClass */
1349 struct windecor_data
1351 ULONG userbuffersize;
1354 /* ScrDecorClass */
1355 struct scrdecor_data
1357 ULONG userbuffersize;
1360 /* MenuDecorClass */
1361 struct menudecor_data
1363 ULONG userbuffersize;
1366 #endif /* INTUITION_INTERN_H */