New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / intuition / intuition_intern.h
blob277ef0b99cb4adcbc3ea286a0fea15d8c6efb28d
1 #ifndef INTUITION_INTERN_H
2 #define INTUITION_INTERN_H
4 /*
5 Copyright 1995-2006, 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 // FIXME: implement macro for AROS ??
100 #ifndef __MORPHOS__
101 # define ASSERT_VALID_PTR_ROMOK(ptr)
102 #endif
104 // FIXME: seems only used for RefreshWindowTitles() ? -> better names
105 // FIXME: what are the correct values?
106 #define NO_DOUBLEBUFFER (0)
107 #define DOUBLEBUFFER (1)
109 /* features */
110 #ifdef __MORPHOS__
111 # define USE_OPAQUESIZE 1
112 #else
113 # define USE_OPAQUESIZE 0
114 #endif
117 #ifdef __MORPHOS__
118 void dprintf(char *, ...) __attribute__ ((format (printf, 1, 2)));
119 void * memclr(APTR, ULONG);
120 #endif
122 #ifdef __MORPHOS__
123 void * memclr(APTR, ULONG);
124 #define bzero(a,b) memclr(a,b)
125 #else /* __MORPHOS__ */
126 #define memclr(a,b) bzero(a,b)
127 #endif /* __MORPHOS__ */
130 * min()/max() without macro side effects.
132 #define max(a,b) \
133 ({typeof(a) _a = (a); \
134 typeof(b) _b = (b); \
135 _a > _b ? _a : _b;})
137 #define min(a,b) \
138 ({typeof(a) _a = (a); \
139 typeof(b) _b = (b); \
140 _a > _b ? _b : _a;})
142 #define EXTENDWORD(x) x = (LONG)((WORD)x);
143 #define EXTENDUWORD(x) x = (ULONG)((UWORD)x);
145 /* SANITY CHECK MACRO */
146 //#define DEBUG_SANITYCHECK
148 #ifdef DEBUG_SANITYCHECK
149 #define SANITY_CHECK(x) if (!((IPTR)x)) {dprintf("Losing sanity in %s line %d\n",__FILE__,__LINE__); return;};
150 #define SANITY_CHECKR(x,v) if (!((IPTR)x)) {dprintf("Losing sanity in %s line %d\n",__FILE__,__LINE__); return v;};
151 #else
152 #define SANITY_CHECK(x) if (!((IPTR)x)) return;
153 #define SANITY_CHECKR(x,v) if (!((IPTR)x)) return v;
154 #endif
156 /* Options */
158 #define MENUS_BACKFILL TRUE
160 #define MENUS_AMIGALOOK ((GetPrivIBase(IntuitionBase)->IControlPrefs.ic_Flags & ICF_3DMENUS) == 0)
161 /* --- Values --- */
162 #define MENULOOK_3D 0
163 #define MENULOOK_CLASSIC 1
165 #define MENUS_UNDERMOUSE (GetPrivIBase(IntuitionBase)->IControlPrefs.ic_Flags & ICF_POPUPMENUS)
167 #define AVOID_WINBORDERERASE (GetPrivIBase(IntuitionBase)->IControlPrefs.ic_Flags & ICF_AVOIDWINBORDERERASE)
169 /* --- Values --- */
170 /* TRUE, FALSE */
172 #define FRAME_SIZE (GetPrivIBase(IntuitionBase)->FrameSize)
173 /* --- Values --- */
174 #define FRAMESIZE_THIN 0 /* 1:1 thin */
175 #define FRAMESIZE_MEDRES 1 /* 2:1 medres like AmigaOS */
176 #define FRAMESIZE_THICK 2 /* 1:1 thick */
178 #define SQUARE_WIN_GADGETS 1
180 #ifdef __AROS__
181 /* FIXME: possibly enable this, once gadtools has been updated */
182 #else
183 #define GADTOOLSCOMPATIBLE
184 //enables some gadtools-weirdo-code, MUST be set in both gadtools & intui to work!!!
185 #endif
187 #ifdef SKINS
188 //#define USEGETIPREFS
189 #endif
191 /* simpleref layers have gadgets redrawn when app calls beginrefresh() */
192 //#define BEGINUPDATEGADGETREFRESH
193 //#define DAMAGECACHE
195 //#define USEWINDOWLOCK
196 #ifdef USEWINDOWLOCK
197 #define LOCKWINDOW ObtainSemaphore(&GetPrivIBase(IntuitionBase)->WindowLock);
198 #define UNLOCKWINDOW ReleaseSemaphore(&GetPrivIBase(IntuitionBase)->WindowLock);
199 #else
200 #define LOCKWINDOW
201 #define UNLOCKWINDOW
202 #endif
203 /* jDc: do NOT disable this! */
205 #define USEGADGETLOCK
206 #ifdef USEGADGETLOCK
207 #define LOCKGADGET ObtainSemaphore(&GetPrivIBase(IntuitionBase)->GadgetLock);
208 #define UNLOCKGADGET ReleaseSemaphore(&GetPrivIBase(IntuitionBase)->GadgetLock);
209 #define LOCKWINDOWLAYERS(w) ;
210 #define UNLOCKWINDOWLAYERS(w) ;
211 #else
212 #define LOCKGADGET
213 #define UNLOCKGADGET
214 #define LOCKWINDOWLAYERS(w) LockLayerInfo(&w->WScreen->LayerInfo); \
215 if (((struct IntWindow *)(w))->borderlayer) {LockLayer(0,((struct IntWindow *)(w))->borderlayer);}; \
216 if (((struct IntWindow *)(w))->wlayer) {LockLayer(0,((struct IntWindow *)(w))->wlayer);};
217 #define UNLOCKWINDOWLAYERS(w) if (((struct IntWindow *)(w))->wlayer) {UnlockLayer(((struct IntWindow *)(w))->wlayer);}; \
218 if (((struct IntWindow *)(w))->borderlayer) {UnlockLayer(((struct IntWindow *)(w))->borderlayer);} \
219 UnlockLayerInfo(&w->WScreen->LayerInfo);
220 #endif
222 #define WLAYER(w) (((struct IntWindow *)(w))->wlayer)
223 #define BLAYER(w) (((struct IntWindow *)(w))->borderlayer)
225 //#define TIMEVALWINDOWACTIVATION
227 /* If PROP_RENDER_OPTIMIZATION is set to 1, propgadget code tries to optimize rendering
228 during prop gadget knob movement. Only area of the propgadget that is affected by
229 prop gadget knob movement is re-rendered.
231 Unfortunately this can fail with some programs, like DOpus 4.x text viewer */
233 #define PROP_RENDER_OPTIMIZATION 0
235 #define SINGLE_SETPOINTERPOS_PER_EVENTLOOP 1
237 #ifndef LIFLG_SUPPORTS_OFFSCREEN_LAYERS
238 /* Defined in <graphics/layers.h>, but apparently not on MorphOS. */
239 # define LIFLG_SUPPORTS_OFFSCREEN_LAYERS 2
240 #endif
242 #define INTUITIONNAME "intuition.library"
243 #define MENUBARLABELCLASS "menubarlabelclass"
245 #define DEFPUBSCREEN TRUE
247 #define USE_NEWDISPLAYBEEP 1
249 #define TITLEBUFFERLEN 255
251 #define USE_IDCMPUPDATE_MESSAGECACHE 0
253 #ifdef __MORPHOS__
254 #if INCLUDE_VERSION < 50
256 /********************************************************************************/
257 /* imageclass.h AROS extensions */
259 #define SYSIA_WithBorder IA_FGPen /* default: TRUE */
260 #define SYSIA_Style IA_BGPen /* default: SYSISTYLE_NORMAL */
262 #define SYSISTYLE_NORMAL 0
263 #define SYSISTYLE_GADTOOLS 1 /* to get arrow images in gadtools look */
265 /********************************************************************************/
266 /* gadgetclass.h AROS extenstions */
268 /* This method is invoked to learn about the sizing requirements of your class,
269 before an object is created. This is AROS specific. */
270 #define GM_DOMAIN 7
271 struct gpDomain
273 STACKULONG MethodID; /* GM_DOMAIN */
274 struct GadgetInfo *gpd_GInfo; /* see <intuition/cghooks.h> */
275 struct RastPort *gpd_RPort; /* RastPort to calculate dimensions for. */
276 STACKLONG gpd_Which; /* see below */
277 struct IBox gpd_Domain; /* Resulting domain. */
278 struct TagItem *gpd_Attrs; /* Additional attributes. None defined,
279 yet. */
282 /********************************************************************************/
284 /* gpd_Which */
285 #define GDOMAIN_MINIMUM 0 /* Calculate minimum size. */
286 #define GDOMAIN_NOMINAL 1 /* Calculate nominal size. */
287 #define GDOMAIN_MAXIMUM 2 /* Calculate maximum size. */
289 #endif /* INCLUDE_VERSION < 50 */
290 #endif /* ifdef __MORPHOS__ */
292 /********************************************************************************/
293 #define GM_MOVETEST 8
294 /* this method is used by our draggad to tell if it's OK to move the mouse when window
295 is near screen boundaries and offscreen is disabled. msg = gpInput*/
296 //retvals are:
297 #define MOVETEST_MOVE 0
298 #define MOVETEST_ADJUSTPOS 1
300 /* ObtainGIRPort must install a 0 clipregion and
301 set scrollx/scrolly of layer to 0. Since this
302 will be restored only when ReleaseGIRPort is
303 called, we must backup the orig values somewhere */
305 struct LayerContext
307 struct Region *clipregion;
308 WORD scroll_x;
309 WORD scroll_y;
310 WORD nestcount;
314 /* Preferences */
316 #define IP_OLDFONT 2
317 #define IP_OLDOVERSCAN 3
318 #define IP_OLDICONTROL 4
319 #define IP_OLDPOINTER 7
320 #define IP_OLDPALETTE 8
321 #define IP_OLDPENS 9
323 #define IP_SCREENMODE 1
324 #define IP_FONT 101//2
325 #define IP_ICONTROL 102//4
326 #define IP_POINTER 103//7
327 #define IP_PTRCOLOR 104//8
328 #define IP_PALETTE 105
329 #define IP_IACTIONS 20
330 #define IP_IEXTENSIONS 21
331 #define IP_INPUTEXT 22
333 #ifdef __MORPHOS__
335 struct IScreenModePrefs
337 ULONG smp_DisplayID;
338 UWORD smp_Width;
339 UWORD smp_Height;
340 UWORD smp_Depth;
341 UWORD smp_Control;
344 struct IIControlPrefs
346 UWORD ic_TimeOut;
347 WORD ic_MetaDrag;
348 ULONG ic_Flags;
349 UBYTE ic_WBtoFront;
350 UBYTE ic_FrontToBack;
351 UBYTE ic_ReqTrue;
352 UBYTE ic_ReqFalse;
355 #else
357 #include <intuition/iprefs.h>
359 #endif
361 struct Color32
363 ULONG red;
364 ULONG green;
365 ULONG blue;
368 #define COLORTABLEENTRIES 32 //8
370 struct IntScreen;
372 #define RESOURCELIST_HASHSIZE 256
374 #define RESOURCE_WINDOW 1
375 #define RESOURCE_SCREEN 2
377 struct HashNode
379 struct MinNode node;
380 UWORD type;
381 APTR resource;
384 /* Internal Screen Notification Data */
385 struct IntScreenNotify
387 struct Node node;
388 struct MsgPort *port;
389 struct Task *sigtask;
390 struct Hook *hook;
391 ULONG flags;
392 IPTR userdata;
393 char *pubname;
394 BYTE sigbit;
397 /* IntuitionBase */
398 struct IntIntuitionBase
400 struct IntuitionBase IBase;
401 #ifdef __MORPHOS__
402 WORD _MinXMouse,_MaxXMouse; /* Old 1.3 Base entries*/
403 WORD _MinYMouse,_MaxYMouse; /* Old 1.3 Base entries*/
404 ULONG _StartSecs,_StartMicros; /* Old 1.3 Base entries*/
405 char *SystemRequestTitle; /* written by locale as it seems..what a crappy interface*/
406 char *WorkbenchTitle; /* written by locale as it seems..what a crappy interface*/
409 * savety pad for intuitionbase accesses
410 * probably needs to be smarter
412 UBYTE Pad[0x800];
413 #endif
415 /* Put local shit here, invisible for the user */
416 #ifdef __MORPHOS__
417 struct Library *CyberGfxBase;
418 struct Library *MUIMasterBase;
419 #endif
421 struct Library *InputBase;
422 struct Library *TimerBase;
423 struct MsgPort *TimerMP;
424 struct timerequest *TimerIO;
426 struct MsgPort *WorkBenchMP;
427 struct Screen *WorkBench;
428 struct SignalSemaphore *IBaseLock;
430 /* Intuition input handlers replyport. This one is set
431 int rom/inputhandler.c/InitIIH()
433 struct MsgPort *IntuiReplyPort;
434 struct MinList *IntuiActionQueue;
435 struct IOStdReq *InputIO;
436 struct MsgPort *InputMP;
438 /* Intuition Screennotify Replyport if SNOTIFY_WAIT_REPLY is specified */
440 struct MsgPort *ScreenNotifyReplyPort;
442 BOOL InputDeviceOpen;
443 struct Interrupt *InputHandler;
445 struct Hook *GlobalEditHook;
446 /* The default global edit hook */
447 struct Hook DefaultEditHook;
450 APTR DriverData; /* Pointer which the driver may use */
452 struct Screen *DefaultPubScreen;
453 struct SignalSemaphore PubScrListLock;
454 struct MinList PubScreenList;
455 UWORD pubScrGlobalMode;
457 struct SignalSemaphore ScreenNotificationListLock;
458 struct List ScreenNotificationList;
460 struct SignalSemaphore GadgetLock;
461 struct SignalSemaphore MenuLock;
462 struct SignalSemaphore WindowLock;
463 struct SignalSemaphore IntuiActionLock;
464 struct SignalSemaphore InputHandlerLock;
465 struct LayerContext BackupLayerContext;
467 struct IClass *dragbarclass;
468 struct IClass *sizebuttonclass;
470 APTR *mosmenuclass;
472 struct Preferences *DefaultPreferences;
473 struct Preferences *ActivePreferences;
475 struct MsgPort *MenuHandlerPort;
476 BOOL MenusActive;
478 struct TextFont *ScreenFont;
479 struct TextFont *TopazFont;
481 /* Dos function DisplayError() before intuition.library patched it */
482 APTR OldDisplayErrorFunc;
484 struct SignalSemaphore ClassListLock;
485 struct MinList ClassList;
486 struct IClass RootClass;
488 #ifdef __MORPHOS__
489 struct ViewExtra *ViewLordExtra;
490 LONG SpriteNum;
491 #endif
493 #ifdef SKINS
494 ULONG *SmallMenuPool;
495 #endif
496 ULONG *IDCMPPool;
498 struct IScreenModePrefs ScreenModePrefs;
499 struct IIControlPrefs IControlPrefs;
500 #ifdef SKINS
501 struct IAction *IControlActions;
502 struct IControlExtensions IControlExtensions;
503 ULONG NumIControlActions;
504 struct InputPrefsExt InputPrefsExt;
505 #endif
506 struct IClass *pointerclass;
507 Object *DefaultPointer;
508 Object *BusyPointer;
509 UWORD DriPens2[NUMDRIPENS];
510 UWORD DriPens4[NUMDRIPENS];
511 UWORD DriPens8[NUMDRIPENS];
512 struct Color32 Colors[COLORTABLEENTRIES];
513 ULONG DMStartSecs;
514 ULONG DMStartMicro;
515 struct IntScreen *MenuVerifyScreen;
516 ULONG PointerDelay;
518 #ifdef SKINS
519 struct SignalSemaphore DataTypesSem;
520 struct Library *DataTypesBase; /* should be opened ONLY by int_InitCustomChanges!*/
521 #endif
523 ULONG LastClickSecs;
524 ULONG LastClickMicro; /* for doubleclick to front */
525 ULONG DoubleClickCounter;
526 ULONG DoubleClickButton;
528 #ifdef SKINS
529 struct Hook transphook; /* hook for windows with intui transp */
530 struct Hook notransphook; /* hook for windows with no additional transp (borderless,etc) */
531 #endif
533 //#ifdef INTUITION_NOTIFY_SUPPORT // commented to avoid offset fuckup! - Piru
534 struct Library *ScreenNotifyBase;
535 struct Library *NotifyIntuitionBase;
536 //#endif
538 struct RastPort DoGadgetMethodRP;
539 struct GadgetInfo DoGadgetMethodGI;
541 #ifdef USEGETIPREFS
542 BOOL IPrefsLoaded;
543 #endif
545 #if USE_NEWDISPLAYBEEP
546 LONG BeepingScreens;
547 #endif
549 WORD prop_clickoffset_x, prop_clickoffset_y;
551 struct MinList ResourceList[RESOURCELIST_HASHSIZE];
553 /* Menu Look Settings */
554 int FrameSize;
557 struct SharedPointer
559 struct ExtSprite *sprite;
560 WORD xoffset, yoffset;
561 int ref_count;
564 struct SharedPointer *CreateSharedPointer(struct ExtSprite *, int, int, struct IntuitionBase *);
565 void ObtainSharedPointer(struct SharedPointer *, struct IntuitionBase *);
566 void ReleaseSharedPointer(struct SharedPointer *, struct IntuitionBase *);
568 #ifdef INTUITION_NOTIFY_SUPPORT
569 void sn_DoNotify(ULONG type, APTR value, struct Library *_ScreenNotifyBase);
570 #endif
572 struct IntDrawInfo
574 struct DrawInfo dri;
575 struct Screen *dri_Screen;
576 struct SignalSemaphore dri_WinDecorSem;
577 Object *dri_WinDecorObj;
578 struct SignalSemaphore dri_ScrDecorSem;
579 Object *dri_ScrDecorObj;
582 #define LOCK_WINDECOR(dri) ObtainSemaphore(&((struct IntDrawInfo *)(dri))->dri_WinDecorSem);
583 #define LOCKSHARED_WINDECOR(dri) ObtainSemaphoreShared(&((struct IntDrawInfo *)(dri))->dri_WinDecorSem);
584 #define UNLOCK_WINDECOR(dri) ReleaseSemaphore(&((struct IntDrawInfo *)(dri))->dri_WinDecorSem);
586 #define LOCK_SCRDECOR(dri) ObtainSemaphore(&((struct IntDrawInfo *)(dri))->dri_ScrDecorSem);
587 #define LOCKSHARED_SCRDECOR(dri) ObtainSemaphoreShared(&((struct IntDrawInfo *)(dri))->dri_ScrDecorSem);
588 #define UNLOCK_SCRDECOR(dri) ReleaseSemaphore(&((struct IntDrawInfo *)(dri))->dri_ScrDecorSem);
590 struct IntScreen
592 struct Screen Screen;
594 /* Private fields */
595 struct HashNode hashnode;
596 struct IntDrawInfo DInfo;
597 struct TTextAttr textattr;
598 ULONG textattrtags[3];
599 UWORD Pens[NUMDRIPENS];
600 struct PubScreenNode *pubScrNode;
601 Object *depthgadget;
602 UWORD SpecialFlags;
603 struct Layer *rootLayer;
604 ULONG DisplayBeepColor0[3];
605 struct Window *DisplayBeepWindow;
606 ULONG ModeID;
607 struct MonitorSpec *Monitor;
608 struct SharedPointer *Pointer;
609 struct Window *MenuVerifyActiveWindow;
610 int MenuVerifyTimeOut;
611 int MenuVerifyMsgCount;
612 ULONG MenuVerifySeconds;
613 ULONG MenuVerifyMicros;
614 struct BitMap *AllocatedBitmap;
616 #ifdef SKINS
617 WORD LastClockPos;
618 WORD LastClockWidth;
619 #else
620 ULONG Reserved;
621 #endif
622 #ifdef SKINS
623 struct SkinInfo SkinInfo;
624 struct RastPort *TitlebarBufferRP;
625 struct Window *TitlebarBufferWin;
626 ULONG TitlebarWinWidth;
627 ULONG TitlebarWinActive;
628 #endif
629 #if USE_NEWDISPLAYBEEP
630 UBYTE BeepingCounter;
631 #endif
634 #define GetPrivScreen(s) ((struct IntScreen *)s)
636 /* SpecialFlags */
637 #define SF_IsParent (0x0001)
638 #define SF_IsChild (0x0002)
639 #define SF_InvisibleBar (0x0004)
640 #define SF_AppearingBar (0x0008)
641 #define SF_SysFont (0x0010)
643 struct IntIntuiMessage
645 struct ExtIntuiMessage eimsg;
648 ** The following field is needed, because in case of IDCMP_RAWKEY
649 ** IntuiMessage->IAddress is a pointer to this data, not the data
650 ** itself (which is the case for IDCMP_VANILLAKEY)
653 APTR prevCodeQuals;
656 #define INT_INTUIMESSAGE(x) ((struct IntIntuiMessage *)(x))
660 /*extern struct IntuitionBase * IntuitionBase;*/
662 #define IW(window) ((struct IntWindow *) (window))
664 #define GetPubIBase(ib) ((struct IntuitionBase *)ib)
665 #define GetPrivIBase(ib) ((struct IntIntuitionBase *)ib)
667 #ifdef __MORPHOS__
668 #ifdef CyberGfxBase
669 #undef CyberGfxBase
670 #endif
671 #define CyberGfxBase (GetPrivIBase(IntuitionBase)->CyberGfxBase)
672 #ifdef MUIMasterBase
673 #undef MUIMasterBase
674 #define MUIMasterBase (GetPrivIBase(IntuitionBase)->MUIMasterBase)
675 #endif
676 #endif
678 #ifdef InputBase
679 #undef InputBase
680 #endif
681 #define InputBase (GetPrivIBase(IntuitionBase)->InputBase)
683 #ifdef TimerBase
684 #undef TimerBase
685 #endif
686 #define TimerBase (GetPrivIBase(IntuitionBase)->TimerBase)
688 #ifdef TimerMP
689 #undef TimerMP
690 #endif
691 #define TimerMP (GetPrivIBase(IntuitionBase)->TimerMP)
693 #ifdef TimerIO
694 #undef TimerIO
695 #endif
696 #define TimerIO (GetPrivIBase(IntuitionBase)->TimerIO)
698 #define PublicClassList ((struct List *)&(GetPrivIBase(IntuitionBase)->ClassList))
701 /* stegerg: one can have sysgadgets outside of window border! All sysgadgets in window
702 border must have set GACT_???BORDER and, if they are in a gzz window, also
703 GTYP_GZZGADGET */
705 #define IS_GZZ_GADGET(gad) (((gad)->GadgetType) & GTYP_GZZGADGET)
707 #define IS_BORDER_GADGET(gad) (IS_GZZ_GADGET(gad) || \
708 ((gad)->Activation & (GACT_RIGHTBORDER|GACT_LEFTBORDER|GACT_TOPBORDER|GACT_BOTTOMBORDER)))
710 #define IS_SYS_GADGET(gad) (((gad)->GadgetType) & GTYP_SYSTYPEMASK)
712 #define IS_BOOPSI_GADGET(gad) (((gad)->GadgetType & GTYP_GTYPEMASK) == GTYP_CUSTOMGADGET)
714 /*#define IS_BORDER_GADGET(gad) \
715 (((gad->GadgetType) & GTYP_SYSGADGET) \
716 || ((gad)->Activation & (GACT_RIGHTBORDER|GACT_LEFTBORDER|GACT_TOPBORDER|GACT_BOTTOMBORDER))) */
718 #define IS_REQ_GADGET(gad) ((gad)->GadgetType & GTYP_REQGADGET)
720 #define IS_SCREEN_GADGET(gad) ((gad)->GadgetType & GTYP_SCRGADGET)
722 #define SET_GI_RPORT(gi, w, req, gad) \
723 (gi)->gi_RastPort = (IS_SCREEN_GADGET(gad) ? \
724 ((gi)->gi_Screen->BarLayer ? (gi)->gi_Screen->BarLayer->rp : NULL) : \
725 (IS_BORDER_GADGET(gad) ? (w)->BorderRPort : \
726 ((req) ? ((req)->ReqLayer->rp) : (w)->RPort)) \
730 #define REFRESHGAD_BOOPSI 1 /* boopsi gadgets */
731 #define REFRESHGAD_BORDER 2 /* gadgets in window border */
732 #define REFRESHGAD_REL 4 /* gadgets with GFLG_RELRIGHT, GFLG_RELBOTTOM,GFLG_RELWIDTH, GFLG_RELHEIGHT */
733 #define REFRESHGAD_RELS 8 /* GFLG_RELSPECIAL gadgets */
734 #define REFRESHGAD_TOPBORDER 16 /* used by setwindowtitle */
735 #define REFRESHGAD_NOGADTOOLS 32 /* used in some cases for _mustbe_ */
737 #define SYSGADGET_ACTIVE (iihdata->ActiveSysGadget != NULL)
739 VOID int_refreshglist(struct Gadget *gadgets, struct Window *window,
740 struct Requester *requester, LONG numGad, LONG mustbe, LONG mustnotbe,
741 struct IntuitionBase *IntuitionBase);
743 VOID int_RefreshWindowFrame(struct Window *window, LONG mustbe, LONG mustnotbe,
744 LONG mode,
745 struct IntuitionBase *IntuitionBase);
747 #define int_refreshwindowframe(a,b,c,d) int_RefreshWindowFrame(a,b,c,0,d);
749 /* Keep the system gadgets in the same order than the original intuition,
750 * some programs make bad asumptions about that...
752 enum
754 DEPTHGAD,
755 ZOOMGAD,
756 SIZEGAD,
757 CLOSEGAD,
758 DRAGBAR,
759 ICONIFYGAD,
760 LOCKGAD,
761 MUIGAD,
762 POPUPGAD,
763 SNAPSHOTGAD,
764 JUMPGAD,
765 NUM_SYSGADS
768 #define SYSGAD(w, idx) (((struct IntWindow *)(w))->sysgads[idx])
770 struct IntWindow
772 struct Window window;
774 Object *sysgads[NUM_SYSGADS];
775 struct Image *AmigaKey;
776 struct Image *Checkmark;
777 struct Window *menulendwindow;
779 struct HashNode hashnode;
781 /* When the Zoom gadget is pressed the window will have the
782 dimensions stored here. The old dimensions are backed up here
783 again. */
784 WORD ZipLeftEdge;
785 WORD ZipTopEdge;
786 WORD ZipWidth;
787 WORD ZipHeight;
789 /* max. number of mousemove events to send to this window */
790 WORD mousequeue;
792 /* act. number of mousemove events sent to this window */
793 WORD num_mouseevents;
795 /* max. number of repeated IDCMP_RAWKEY, IDCMP_VANILLAKEY and IDCMP_IDCMPUPDATE
796 messages to send to this window */
797 WORD repeatqueue;
799 /* act. number of repeated IDCMP_RAWKEY, IDCMP_VANILLAKEY and IDCMP_IDCMPUPDATE
800 messages sent to this window */
801 WORD num_repeatevents;
803 #if USE_IDCMPUPDATE_MESSAGECACHE
804 /* number of unreplied IDCMP_IDCMPUPDATE messages sent to window
805 used in few hacks :) */
806 WORD num_idcmpupdate;
807 #endif
809 WORD sizeimage_width;
810 WORD sizeimage_height;
812 ULONG helpflags;
813 ULONG helpgroup;
815 Object *pointer;
816 BOOL busy;
817 BOOL free_pointer;
818 UWORD pointer_delay;
819 ULONG extrabuttons;
820 ULONG extrabuttonsid; /* replaces ETI_Dummy if apps wishes it */
821 #ifdef SKINS
822 ULONG titlepos; /* used by titlebar pattern fill stuff */
823 #else
824 ULONG reserved1;
825 #endif
826 ULONG specialflags;
828 #ifdef SKINS
829 struct Region *transpregion;
830 struct Hook *usertransphook;
831 struct Region *usertranspregion;
832 #endif
834 #ifdef DAMAGECACHE
835 struct Region *trashregion;
836 #endif
837 char titlebuffer[TITLEBUFFERLEN+1];
839 #if USE_IDCMPUPDATE_MESSAGECACHE
840 struct IntuiMessage *messagecache; //for idcmpupdate cache
841 #endif
843 struct Layer *wlayer;
844 struct Layer *borderlayer;
846 struct timeval lastmsgsent;
847 struct timeval lastmsgreplied;
849 #ifdef TIMEVALWINDOWACTIVATION
850 struct timeval activationtime;
851 #endif
853 #ifdef SKINS
854 struct Hook custombackfill;
855 struct HookData hd;
856 #endif
859 #define SPFLAG_ICONIFIED 1
860 #define SPFLAG_NOICONIFY 2
861 #define SPFLAG_SKININFO 4
862 #define SPFLAG_LAYERREFRESH 8
863 #define SPFLAG_TRANSPHOOK 16
864 #define SPFLAG_LAYERRESIZED 32
865 #define SPFLAG_USERPORT 64
866 #define SPFLAG_IAMDEAD 128
867 #define SPFLAG_CLOSING 256 //used with iamdead
868 #define SPFLAG_WANTBUFFER 512
870 #define HELPF_ISHELPGROUP 1
871 #define HELPF_GADGETHELP 2
873 #define IS_NOCAREREFRESH(win) (((win)->Flags & WFLG_NOCAREREFRESH) ? TRUE : FALSE)
874 #define IS_DOCAREREFRESH(win) (((win)->Flags & WFLG_NOCAREREFRESH) ? FALSE : TRUE )
875 #define IS_SIMPLEREFRESH(win) (((win)->Flags & WFLG_SIMPLE_REFRESH) ? TRUE : FALSE)
876 #define IS_GZZWINDOW(win) (((win)->Flags & WFLG_GIMMEZEROZERO) ? TRUE : FALSE)
879 /* Flag definitions for MoreFlags */
881 #define WMFLG_NOTIFYDEPTH (1 << 0) /* Window wants notification when
882 it's depth arranged */
884 #define WMFLG_DO_UNLOCKPUBSCREEN (1 << 1)
885 #define WMFLG_MENUHELP (1 << 2)
886 #define WMFLG_POINTERDELAY (1 << 3)
887 #define WMFLG_TABLETMESSAGES (1 << 4)
889 // FIXME: ehm... this one should die a horrible death!
890 #define WMFLG_IAMMUI (1 << 5)
892 struct IntScreenBuffer
894 struct ScreenBuffer sb;
895 BOOL free_bitmap;
899 /* Driver prototypes */
901 extern int intui_init (struct IntuitionBase *);
902 extern int intui_open (struct IntuitionBase *);
903 extern void intui_close (struct IntuitionBase *);
904 extern void intui_expunge (struct IntuitionBase *);
905 extern int intui_GetWindowSize (void);
906 extern void intui_WindowLimits (struct Window * window, WORD MinWidth, WORD MinHeight, UWORD MaxWidth, UWORD MaxHeight);
907 extern void intui_ActivateWindow (struct Window *);
908 extern BOOL intui_ChangeWindowBox (struct Window * window, WORD x, WORD y,
909 WORD width, WORD height);
910 extern void intui_CloseWindow (struct Window *, struct IntuitionBase *);
911 extern void intui_MoveWindow (struct Window * window, WORD dx, WORD dy);
912 extern int intui_OpenWindow (struct Window *, struct IntuitionBase *,
913 struct BitMap * SuperBitMap, struct Hook *backfillhook,
914 struct Region * shape, struct Hook * shapehook,
915 struct Layer * parent, ULONG visible);
916 extern void intui_SetWindowTitles (struct Window *, CONST_STRPTR, CONST_STRPTR);
917 extern void intui_RefreshWindowFrame(struct Window *win);
918 extern struct Window *intui_FindActiveWindow(struct InputEvent *ie, struct IntuitionBase *IntuitionBase);
919 extern void intui_ScrollWindowRaster(struct Window * win, WORD dx, WORD dy, WORD xmin,
920 WORD ymin, WORD xmax, WORD ymax,
921 struct IntuitionBase * IntuitionBase);
923 /* wbtasktalk protos */
925 ULONG TellWBTaskToCloseWindows(struct IntuitionBase *IntuitionBase);
926 ULONG TellWBTaskToOpenWindows(struct IntuitionBase *IntuitionBase);
928 /* intuition_misc protos */
929 extern void LoadDefaultPreferences(struct IntuitionBase * IntuitionBase);
930 Object* CreateStdSysImage(WORD which, WORD preferred_height, struct Screen *scr,
931 struct DrawInfo *dri, struct IntuitionBase *IntuitionBase);
932 extern void CheckRectFill(struct RastPort *rp, WORD x1, WORD y1, WORD x2, WORD y2, struct IntuitionBase * IntuitionBase);
933 extern BOOL CreateWinSysGadgets(struct Window *w, struct IntuitionBase *IntuitionBase);
934 extern VOID KillWinSysGadgets(struct Window *w, struct IntuitionBase *IntuitionBase);
935 extern void CreateScreenBar(struct Screen *scr, struct IntuitionBase *IntuitionBase);
936 extern void KillScreenBar(struct Screen *scr, struct IntuitionBase *IntuitionBase);
937 extern void RenderScreenBar(struct Screen *scr, BOOL refresh, struct IntuitionBase *IntuitionBase);
938 extern void UpdateMouseCoords(struct Window *win);
939 extern WORD SubtractRectFromRect(struct Rectangle *a, struct Rectangle *b, struct Rectangle *destrectarray);
941 extern LONG CalcResourceHash(APTR resource);
942 extern void AddResourceToList(APTR resource, UWORD resourcetype, struct IntuitionBase *IntuitionBase);
943 extern void RemoveResourceFromList(APTR resource, UWORD resourcetype, struct IntuitionBase *IntuitionBase);
944 extern BOOL ResourceExisting(APTR resource, UWORD resourcetype, struct IntuitionBase *IntuitionBase);
945 void FireScreenNotifyMessage(IPTR data, ULONG flag, struct IntuitionBase *IntuitionBase);
946 void FireScreenNotifyMessageCode(IPTR data, ULONG flag, ULONG code, struct IntuitionBase *IntuitionBase);
948 /* misc.c */
949 extern struct RastPort *MyCreateRastPort(struct IntuitionBase *);
950 extern struct RastPort *MyCloneRastPort(struct IntuitionBase *, struct RastPort *);
951 extern void MyFreeRastPort(struct IntuitionBase *, struct RastPort *);
952 extern void MySetPointerPos(struct IntuitionBase *, int, int);
953 struct TextFont *SafeReopenFont(struct IntuitionBase *, struct TextFont **);
954 extern Object *MakePointerFromPrefs(struct IntuitionBase *, struct Preferences *);
955 extern Object *MakePointerFromData(struct IntuitionBase *, UWORD *, int, int, int, int);
956 void InstallPointer(struct IntuitionBase *, Object **, Object *);
957 void SetPointerColors(struct IntuitionBase *IntuitionBase);
958 struct IClass *InitITextIClass (struct IntuitionBase * IntuitionBase);
959 struct Gadget *DoActivateGadget(struct Window *win, struct Requester *req, struct Gadget *gad,
960 struct IntuitionBase *IntuitionBase);
961 VOID DoGMLayout(struct Gadget *glist, struct Window *win, struct Requester *req,
962 UWORD numgad, BOOL initial, struct IntuitionBase *IntuitionBase);
963 BOOL ih_fire_intuimessage(struct Window * w, ULONG Class, UWORD Code, APTR IAddress,
964 struct IntuitionBase *IntuitionBase);
965 void NotifyDepthArrangement(struct Window *w, struct IntuitionBase *IntuitionBase);
967 /* printitext.c */
969 void int_PrintIText(struct RastPort * rp, struct IntuiText * iText,
970 LONG leftOffset, LONG topOffset, BOOL ignore_attributes,
971 struct IntuitionBase *IntuitionBase);
973 #ifdef __MORPHOS__
974 BOOL IsLayerHiddenBySibling(struct Layer *layer, BOOL xx);
975 LONG IsLayerVisible(struct Layer *layer);
976 #endif
978 void SetupGInfo(struct GadgetInfo *gi, struct Window *win, struct Requester *req,
979 struct Gadget *gad, struct IntuitionBase *IntuitionBase);
981 IPTR Custom_DoMethodA(struct IntuitionBase *, struct Gadget *, Msg);
983 #ifdef __MORPHOS__
984 #ifdef DoMethodA
985 #undef DoMethodA
986 #endif
987 #define DoMethodA(x, ...) (REG_A6=(LONG)IntuitionBase, DoMethodA(x, __VA_ARGS__))
988 #endif
990 #define Custom_DoMethodA(x, ...) Custom_DoMethodA(IntuitionBase, x, __VA_ARGS__)
992 #define HAS_CHILDREN(w) (NULL != w->firstchild)
994 #ifdef __MORPHOS__
995 #define DeinitRastPort(rp) ((void)0)
996 #define CreateRastPort() MyCreateRastPort(IntuitionBase)
997 #define CloneRastPort(rp) MyCloneRastPort(IntuitionBase, rp)
998 #define FreeRastPort(rp) MyFreeRastPort(IntuitionBase, rp)
999 #define SetPointerPos(x, y) MySetPointerPos(IntuitionBase, x, y)
1000 #define MouseCoordsRelative() 1
1001 #endif
1003 /* Replacement for dos.library/DisplayError() */
1004 AROS_UFP3(LONG, Intuition_DisplayError,
1005 AROS_UFPA(STRPTR, formatStr , A0),
1006 AROS_UFPA(ULONG , IDCMPFlags, D0),
1007 AROS_UFPA(APTR , args , A1));
1009 #define POINTERA_SharedPointer 0x80039010
1011 #ifndef __MORPHOS__
1012 #define dprintf kprintf
1013 #endif
1015 #define DEBUG_ACTIVATEGADGET(x) ;
1016 #define DEBUG_ACTIVATEWINDOW(x) ;
1017 #define DEBUG_ADDCLASS(x) ;
1018 #define DEBUG_ADDGADGET(x) ;
1019 #define DEBUG_ADDGLIST(x) ;
1020 #define DEBUG_ALLOCINTUIMESSAGE(x) ;
1021 #define DEBUG_ALLOCSCREENBUFFER(x) ;
1022 #define DEBUG_ALOHAWORKBENCH(x) ;
1023 #define DEBUG_CHANGEWINDOWBOX(x) ;
1024 #define DEBUG_CLOSESCREEN(x) ;
1025 #define DEBUG_CLOSEWINDOW(x) ;
1026 #define DEBUG_CLOSEWORKBENCH(x) ;
1027 #define DEBUG_DISPOSEOBJECT(x) ;
1028 #define DEBUG_DOGADGETMETHOD(x) ;
1029 #define DEBUG_DRAWBORDER(x) ;
1030 #define DEBUG_FINDCLASS(x) ;
1031 #define DEBUG_FREEICDATA(x) ;
1032 #define DEBUG_FREEINTUIMESSAGE(x) ;
1033 #define DEBUG_FREESCREENBUFFER(x) ;
1034 #define DEBUG_FREESCREENDRAWINFO(x) ;
1035 #define DEBUG_GADGETMOUSE(x) ;
1036 #define DEBUG_GETATTR(x) ;
1037 #define DEBUG_GETDEFAULTPUBSCREEN(x) ;
1038 #define DEBUG_GETDEFPREFS(x) ;
1039 #define DEBUG_GETGADGETIBOX(x) ;
1040 #define DEBUG_GETPREFS(x) ;
1041 #define DEBUG_GETSCREENDATA(x) ;
1042 #define DEBUG_GETSCREENDRAWINFO(x) ;
1043 #define DEBUG_HIDEWINDOW(x) ;
1044 #ifdef __MORPHOS__
1045 #define DEBUG_INIT(x) if (SysBase->ex_DebugFlags & EXECDEBUGF_INIT) x;
1046 #else
1047 #define DEBUG_INIT(x) ;
1048 #endif
1049 #define DEBUG_OPEN(x) ;
1050 #define DEBUG_CLOSE(x) ;
1051 #define DEBUG_INPUTEVENT(x) ;
1052 #define DEBUG_INTREFRESHGLIST(x) ;
1053 #define DEBUG_INTUITEXTLENGTH(x) ;
1054 #define DEBUG_LENDMENUS(x) ;
1055 #define DEBUG_LOCKPUBSCREEN(x) ;
1056 #define DEBUG_MAKECLASS(x) ;
1057 #define DEBUG_MODIFYIDCMP(x) ;
1058 #define DEBUG_NEWOBJECT(x) ;
1059 #define DEBUG_NEXTOBJECT(x) ;
1060 #define DEBUG_OBTAINGIRPORT(x) ;
1061 #define DEBUG_OFFGADGET(x) ;
1062 #define DEBUG_OFFMENU(x) ;
1063 #define DEBUG_ONGADGET(x) ;
1064 #define DEBUG_ONMENU(x) ;
1065 #define DEBUG_OPENSCREEN(x) ;
1066 #define DEBUG_OPENSCREENTAGLIST(x) ;
1067 #define DEBUG_OPENWINDOW(x) ;
1068 #define DEBUG_OPENWINDOWTAGLIST(x) ;
1069 #define DEBUG_OPENWORKBENCH(x) ;
1070 #define DEBUG_POINTER(x) ;
1071 #define DEBUG_PRINTITEXT(x) ;
1072 #define DEBUG_QUERYOVERSCAN(x) ;
1073 #define DEBUG_REFRESH(x) ;
1074 #define DEBUG_RELEASEGIRPORT(x) ;
1075 #define DEBUG_REMEMBER(x) ;
1076 #define DEBUG_REMOVEGLIST(x) ;
1077 #define DEBUG_REPORTMOUSE(x) ;
1078 #define DEBUG_REQUEST(x) ;
1079 #define DEBUG_SCROLLWINDOWRASTER(x) ;
1080 #define DEBUG_SENDINTUIMESSAGE(x) ;
1081 #define DEBUG_SETATTRS(x) ;
1082 #define DEBUG_SETGADGETATTRS(x) ;
1083 #define DEBUG_SETPOINTER(x) ;
1084 #ifdef __MORPHOS__
1085 #define DEBUG_SETIPREFS(x) if (SysBase->ex_DebugFlags & EXECDEBUGF_INIT) x;
1086 #else
1087 #define DEBUG_SETIPREFS(x) ;
1088 #endif
1089 #ifdef __MORPHOS__
1090 #define DEBUG_SETPREFS(x) if (SysBase->ex_DebugFlags & EXECDEBUGF_INIT) x;
1091 #else
1092 #define DEBUG_SETPREFS(x) ;
1093 #endif
1094 #define DEBUG_SHOWWINDOW(x) ;
1095 #define DEBUG_UNLOCKPUBSCREEN(x) ;
1096 #define DEBUG_WINDOWLIMITS(x) ;
1097 #define DEBUG_WINDOWTOBACK(x) ;
1098 #define DEBUG_WINDOWTOFRONT(x) ;
1099 #define DEBUG_ZIPWINDOW(x) ;
1100 #define DEBUG_VISITOR(x) ;
1101 #define DEBUG_WORKBENCH(x) ;
1102 #define DEBUG_LOCKPUBSCREENLIST(x) ;
1103 #define DEBUG_UNLOCKPUBSCREENLIST(x) ;
1104 #define DEBUG_RETHINKDISPLAY(x) ;
1107 * Private data structures of the classes defined by intuition.library
1110 /* ICClass */
1111 struct ICData
1113 Object *ic_Target;
1114 struct TagItem *ic_Mapping;
1115 struct TagItem *ic_CloneTags;
1116 ULONG ic_LoopCounter;
1119 /* ModelClass */
1120 struct ModelData
1122 struct MinList memberlist;
1125 /* FrameIClass */
1126 struct FrameIData
1128 /* render bevel only with no fill? */
1129 BOOL fid_EdgesOnly;
1131 /* inverted bevel pens? */
1132 BOOL fid_Recessed;
1134 /* frame style? */
1135 WORD fid_FrameType;
1137 WORD fid_HOffset;
1138 WORD fid_VOffset;
1141 /* SysIClass */
1142 struct SysIData
1144 struct DrawInfo *dri;
1145 struct Image *frame;
1146 ULONG type;
1147 UWORD flags;
1150 /* FillRectClass */
1151 struct FillRectData
1153 WORD apatsize;
1154 WORD mode;
1157 /* GadgetClass */
1158 struct GadgetData
1160 struct ExtGadget EG;
1161 struct ICData IC;
1164 /* PropGClass */
1165 struct PropGData
1167 /* We use a propinfo structure, because we use the same routines
1168 for intuition propgadtets and in propgclass */
1170 struct PropInfo propinfo;
1172 /* A little kludge: since the HandleMouseMove function
1173 wants dx/dy and not absolute mouse coords, we
1174 have to remember the last ones */
1176 UWORD last_x;
1177 UWORD last_y;
1179 /* One only have to store total or visble, and use some other
1180 formulas than those in the RKRM:L, but for
1181 code simplicity I store them all. */
1182 UWORD top, visible, total;
1184 UWORD flags;
1185 struct BBox *old_knobbox;
1188 /* StrGClass */
1189 struct StrGData
1191 struct StringInfo StrInfo;
1192 struct StringExtend StrExtend;
1193 UBYTE Flags;
1196 /* GroupGClass */
1197 struct GroupGData
1199 struct MinList memberlist;
1200 struct Gadget *activegad;
1203 /* DragBarClass */
1204 struct dragbar_data
1206 /* Current left- and topedge of moving window. Ie when the user releases
1207 the LMB after a windowdrag, the window's new coords will be (curleft, curtop)
1210 LONG curleft;
1211 LONG curtop;
1213 /* The current x and y coordinates relative to curleft/curtop */
1214 LONG mousex;
1215 LONG mousey;
1217 /* Whether the dragframe is currently drawn or erased */
1218 BOOL isrendered;
1220 /* Used to tell GM_GOINACTIVE whether the drag was canceled or not */
1221 BOOL drag_canceled;
1223 /* Used to tell GM_GOINACTIVE whether UnlockLayer() or not */
1224 BOOL drag_layerlock;
1225 #ifdef USEGADGETLOCK
1226 BOOL drag_gadgetlock;
1227 #endif
1228 BOOL drag_refreshed;
1230 /* Rastport to use during update */
1231 struct RastPort *rp;
1233 UQUAD lasteventtime;
1235 LONG startleft;
1236 LONG starttop;
1238 #ifdef USEWINDOWLOCK
1239 /* used to prevent windows from opening/closing while user drags a window */
1240 BOOL drag_windowlock;
1241 #endif
1243 struct Task *movetask;
1247 /* SizeButtonClass */
1248 struct sizebutton_data
1251 /* The current width and height of the rubber band frame */
1252 ULONG width;
1253 ULONG height;
1254 ULONG top;
1255 ULONG left;
1257 /* holds original sizes */
1258 ULONG Width;
1259 ULONG Height;
1260 ULONG TopEdge;
1261 ULONG LeftEdge;
1263 /* the offset of the mouse pointer to the rubber band frame*/
1264 LONG mouseoffsetx;
1265 LONG mouseoffsety;
1267 /* Whether the dragframe is currently drawn or erased */
1268 BOOL isrendered;
1270 /* Used to tell GM_GOINACTIVE whether the drag was canceled or not */
1271 BOOL drag_canceled;
1273 /* Used to tell GM_GOINACTIVE whether UnlockLayer() or not */
1274 BOOL drag_layerlock;
1275 #ifdef USEGADGETLOCK
1276 BOOL drag_gadgetlock;
1277 #endif
1279 BOOL drag_refreshed;
1281 /* Rastport to use during update */
1282 struct RastPort *rp;
1284 UQUAD lasteventtime;
1286 #ifdef USEWINDOWLOCK
1287 /* used to prevent windows from opening/closing while user drags a window */
1288 BOOL drag_windowlock;
1289 #endif
1291 #ifdef SKINS
1292 ULONG drag_type;
1293 #endif
1295 ULONG drag_ticks;
1299 /* MenuBarLabelClass */
1300 struct MenuBarLabelData
1302 struct DrawInfo *dri;
1305 /* PointerClass */
1306 struct PointerData
1308 struct SharedPointer *shared_pointer;
1311 /* WinDecorClass */
1312 struct windecor_data
1314 struct IntDrawInfo *dri;
1315 struct Screen *scr;
1318 /* ScrDecorClass */
1319 struct scrdecor_data
1321 struct IntDrawInfo *dri;
1322 struct Screen *scr;
1325 #endif /* INTUITION_INTERN_H */