some fixes to accented characters
[tangerine.git] / rom / intuition / intuition_intern.h
blobf470697593b7a0f05d7dae4b37c037ceb9cb8cf3
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 STACKED ULONG MethodID; /* GM_DOMAIN */
274 STACKED struct GadgetInfo *gpd_GInfo; /* see <intuition/cghooks.h> */
275 STACKED struct RastPort *gpd_RPort; /* RastPort to calculate dimensions for. */
276 STACKED LONG gpd_Which; /* see below */
277 STACKED struct IBox gpd_Domain; /* Resulting domain. */
278 STACKED 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 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
532 //#ifdef INTUITION_NOTIFY_SUPPORT // commented to avoid offset fuckup! - Piru
533 struct Library *ScreenNotifyBase;
534 struct Library *NotifyIntuitionBase;
535 //#endif
537 struct RastPort DoGadgetMethodRP;
538 struct GadgetInfo DoGadgetMethodGI;
540 struct SignalSemaphore WinDecorSem;
541 Object *WinDecorObj;
542 struct SignalSemaphore ScrDecorSem;
543 Object *ScrDecorObj;
544 struct SignalSemaphore MenuDecorSem;
545 Object *MenuDecorObj;
547 Object *DefWinDecorObj;
548 Object *DefScrDecorObj;
549 Object *DefMenuDecorObj;
551 struct List Decorations;
552 struct NewDecorator *Decorator;
554 #ifdef USEGETIPREFS
555 BOOL IPrefsLoaded;
556 #endif
558 #if USE_NEWDISPLAYBEEP
559 LONG BeepingScreens;
560 #endif
562 WORD prop_clickoffset_x, prop_clickoffset_y;
564 struct MinList ResourceList[RESOURCELIST_HASHSIZE];
566 /* Menu Look Settings */
567 int FrameSize;
570 struct SharedPointer
572 struct ExtSprite *sprite;
573 WORD xoffset, yoffset;
574 int ref_count;
577 struct SharedPointer *CreateSharedPointer(struct ExtSprite *, int, int, struct IntuitionBase *);
578 void ObtainSharedPointer(struct SharedPointer *, struct IntuitionBase *);
579 void ReleaseSharedPointer(struct SharedPointer *, struct IntuitionBase *);
581 #ifdef INTUITION_NOTIFY_SUPPORT
582 void sn_DoNotify(ULONG type, APTR value, struct Library *_ScreenNotifyBase);
583 #endif
585 struct IntDrawInfo
587 struct DrawInfo dri;
588 struct Screen *dri_Screen;
589 struct SignalSemaphore dri_WinDecorSem;
590 Object *dri_WinDecorObj;
591 struct SignalSemaphore dri_ScrDecorSem;
592 Object *dri_ScrDecorObj;
595 #define LOCK_WINDECOR(IntuitionBase) ObtainSemaphore(&((struct IntIntuitionBase *)(IntuitionBase))->WinDecorSem);
596 #define LOCKSHARED_WINDECOR(IntuitionBase) ObtainSemaphoreShared(&((struct IntIntuitionBase *)(IntuitionBase))->WinDecorSem);
597 #define UNLOCK_WINDECOR(IntuitionBase) ReleaseSemaphore(&((struct IntIntuitionBase *)(IntuitionBase))->WinDecorSem);
599 #define LOCK_SCRDECOR(IntuitionBase) ObtainSemaphore(&((struct IntIntuitionBase *)(IntuitionBase))->ScrDecorSem);
600 #define LOCKSHARED_SCRDECOR(IntuitionBase) ObtainSemaphoreShared(&((struct IntIntuitionBase *)(IntuitionBase))->ScrDecorSem);
601 #define UNLOCK_SCRDECOR(IntuitionBase) ReleaseSemaphore(&((struct IntIntuitionBase *)(IntuitionBase))->ScrDecorSem);
603 #define LOCK_MENUDECOR(IntuitionBase) ObtainSemaphore(&((struct IntIntuitionBase *)(IntuitionBase))->MenuDecorSem);
604 #define LOCKSHARED_MENUDECOR(IntuitionBase) ObtainSemaphoreShared(&((struct IntIntuitionBase *)(IntuitionBase))->MenuDecorSem);
605 #define UNLOCK_MENUDECOR(IntuitionBase) ReleaseSemaphore(&((struct IntIntuitionBase *)(IntuitionBase))->MenuDecorSem);
607 struct IntScreen
609 struct Screen Screen;
611 /* Private fields */
612 struct HashNode hashnode;
613 struct IntDrawInfo DInfo;
614 struct TTextAttr textattr;
615 ULONG textattrtags[3];
616 UWORD Pens[NUMDRIPENS];
617 struct PubScreenNode *pubScrNode;
618 Object *depthgadget;
619 UWORD SpecialFlags;
620 struct Layer *rootLayer;
621 ULONG DisplayBeepColor0[3];
622 struct Window *DisplayBeepWindow;
623 ULONG ModeID;
624 struct MonitorSpec *Monitor;
625 struct SharedPointer *Pointer;
626 struct Window *MenuVerifyActiveWindow;
627 int MenuVerifyTimeOut;
628 int MenuVerifyMsgCount;
629 ULONG MenuVerifySeconds;
630 ULONG MenuVerifyMicros;
631 ULONG DecorUserBufferSize;
632 IPTR DecorUserBuffer;
633 Object *WinDecorObj;
634 Object *ScrDecorObj;
635 Object *MenuDecorObj;
636 struct NewDecorator *Decorator;
638 struct BitMap *AllocatedBitmap;
640 STRPTR ID;
641 #ifdef SKINS
642 WORD LastClockPos;
643 WORD LastClockWidth;
644 #else
645 ULONG Reserved;
646 #endif
647 #ifdef SKINS
648 struct SkinInfo SkinInfo;
649 struct RastPort *TitlebarBufferRP;
650 struct Window *TitlebarBufferWin;
651 ULONG TitlebarWinWidth;
652 ULONG TitlebarWinActive;
653 #endif
654 #if USE_NEWDISPLAYBEEP
655 UBYTE BeepingCounter;
656 #endif
659 #define GetPrivScreen(s) ((struct IntScreen *)s)
661 /* SpecialFlags */
662 #define SF_IsParent (0x0001)
663 #define SF_IsChild (0x0002)
664 #define SF_InvisibleBar (0x0004)
665 #define SF_AppearingBar (0x0008)
666 #define SF_SysFont (0x0010)
668 struct IntIntuiMessage
670 struct ExtIntuiMessage eimsg;
673 ** The following field is needed, because in case of IDCMP_RAWKEY
674 ** IntuiMessage->IAddress is a pointer to this data, not the data
675 ** itself (which is the case for IDCMP_VANILLAKEY)
678 APTR prevCodeQuals;
681 #define INT_INTUIMESSAGE(x) ((struct IntIntuiMessage *)(x))
685 /*extern struct IntuitionBase * IntuitionBase;*/
687 #define IW(window) ((struct IntWindow *) (window))
689 #define GetPubIBase(ib) ((struct IntuitionBase *)ib)
690 #define GetPrivIBase(ib) ((struct IntIntuitionBase *)ib)
692 #ifdef __MORPHOS__
693 #ifdef CyberGfxBase
694 #undef CyberGfxBase
695 #endif
696 #define CyberGfxBase (GetPrivIBase(IntuitionBase)->CyberGfxBase)
697 #ifdef MUIMasterBase
698 #undef MUIMasterBase
699 #define MUIMasterBase (GetPrivIBase(IntuitionBase)->MUIMasterBase)
700 #endif
701 #endif
703 #ifdef InputBase
704 #undef InputBase
705 #endif
706 #define InputBase (GetPrivIBase(IntuitionBase)->InputBase)
708 #ifdef TimerBase
709 #undef TimerBase
710 #endif
711 #define TimerBase (GetPrivIBase(IntuitionBase)->TimerBase)
713 #ifdef TimerMP
714 #undef TimerMP
715 #endif
716 #define TimerMP (GetPrivIBase(IntuitionBase)->TimerMP)
718 #ifdef TimerIO
719 #undef TimerIO
720 #endif
721 #define TimerIO (GetPrivIBase(IntuitionBase)->TimerIO)
723 #define PublicClassList ((struct List *)&(GetPrivIBase(IntuitionBase)->ClassList))
726 /* stegerg: one can have sysgadgets outside of window border! All sysgadgets in window
727 border must have set GACT_???BORDER and, if they are in a gzz window, also
728 GTYP_GZZGADGET */
730 #define IS_GZZ_GADGET(gad) (((gad)->GadgetType) & GTYP_GZZGADGET)
732 #define IS_BORDER_GADGET(gad) (IS_GZZ_GADGET(gad) || \
733 ((gad)->Activation & (GACT_RIGHTBORDER|GACT_LEFTBORDER|GACT_TOPBORDER|GACT_BOTTOMBORDER)))
735 #define IS_SYS_GADGET(gad) (((gad)->GadgetType) & GTYP_SYSTYPEMASK)
737 #define IS_BOOPSI_GADGET(gad) (((gad)->GadgetType & GTYP_GTYPEMASK) == GTYP_CUSTOMGADGET)
739 /*#define IS_BORDER_GADGET(gad) \
740 (((gad->GadgetType) & GTYP_SYSGADGET) \
741 || ((gad)->Activation & (GACT_RIGHTBORDER|GACT_LEFTBORDER|GACT_TOPBORDER|GACT_BOTTOMBORDER))) */
743 #define IS_REQ_GADGET(gad) ((gad)->GadgetType & GTYP_REQGADGET)
745 #define IS_SCREEN_GADGET(gad) ((gad)->GadgetType & GTYP_SCRGADGET)
747 #define SET_GI_RPORT(gi, w, req, gad) \
748 (gi)->gi_RastPort = (IS_SCREEN_GADGET(gad) ? \
749 ((gi)->gi_Screen->BarLayer ? (gi)->gi_Screen->BarLayer->rp : NULL) : \
750 (IS_BORDER_GADGET(gad) ? (w)->BorderRPort : \
751 ((req) ? ((req)->ReqLayer->rp) : (w)->RPort)) \
755 #define REFRESHGAD_BOOPSI 1 /* boopsi gadgets */
756 #define REFRESHGAD_BORDER 2 /* gadgets in window border */
757 #define REFRESHGAD_REL 4 /* gadgets with GFLG_RELRIGHT, GFLG_RELBOTTOM,GFLG_RELWIDTH, GFLG_RELHEIGHT */
758 #define REFRESHGAD_RELS 8 /* GFLG_RELSPECIAL gadgets */
759 #define REFRESHGAD_TOPBORDER 16 /* used by setwindowtitle */
760 #define REFRESHGAD_NOGADTOOLS 32 /* used in some cases for _mustbe_ */
762 #define SYSGADGET_ACTIVE (iihdata->ActiveSysGadget != NULL)
764 VOID int_refreshglist(struct Gadget *gadgets, struct Window *window,
765 struct Requester *requester, LONG numGad, LONG mustbe, LONG mustnotbe,
766 struct IntuitionBase *IntuitionBase);
768 VOID int_RefreshWindowFrame(struct Window *window, LONG mustbe, LONG mustnotbe,
769 LONG mode,
770 struct IntuitionBase *IntuitionBase);
772 #define int_refreshwindowframe(a,b,c,d) int_RefreshWindowFrame(a,b,c,0,d);
774 /* Keep the system gadgets in the same order than the original intuition,
775 * some programs make bad asumptions about that...
777 enum
779 DEPTHGAD,
780 ZOOMGAD,
781 SIZEGAD,
782 CLOSEGAD,
783 ICONIFYGAD,
784 LOCKGAD,
785 MUIGAD,
786 POPUPGAD,
787 SNAPSHOTGAD,
788 JUMPGAD,
789 DRAGBAR,
790 NUM_SYSGADS
793 #define SYSGAD(w, idx) (((struct IntWindow *)(w))->sysgads[idx])
795 struct IntWindow
797 struct Window window;
799 Object *sysgads[NUM_SYSGADS];
800 struct Image *AmigaKey;
801 struct Image *Checkmark;
802 struct Image *SubMenuImage;
803 struct Window *menulendwindow;
805 struct HashNode hashnode;
807 /* When the Zoom gadget is pressed the window will have the
808 dimensions stored here. The old dimensions are backed up here
809 again. */
810 WORD ZipLeftEdge;
811 WORD ZipTopEdge;
812 WORD ZipWidth;
813 WORD ZipHeight;
815 /* max. number of mousemove events to send to this window */
816 WORD mousequeue;
818 /* act. number of mousemove events sent to this window */
819 WORD num_mouseevents;
821 /* max. number of repeated IDCMP_RAWKEY, IDCMP_VANILLAKEY and IDCMP_IDCMPUPDATE
822 messages to send to this window */
823 WORD repeatqueue;
825 /* act. number of repeated IDCMP_RAWKEY, IDCMP_VANILLAKEY and IDCMP_IDCMPUPDATE
826 messages sent to this window */
827 WORD num_repeatevents;
829 #if USE_IDCMPUPDATE_MESSAGECACHE
830 /* number of unreplied IDCMP_IDCMPUPDATE messages sent to window
831 used in few hacks :) */
832 WORD num_idcmpupdate;
833 #endif
835 WORD sizeimage_width;
836 WORD sizeimage_height;
838 ULONG helpflags;
839 ULONG helpgroup;
841 Object *pointer;
842 BOOL busy;
843 BOOL free_pointer;
844 UWORD pointer_delay;
845 ULONG extrabuttons;
846 ULONG extrabuttonsid; /* replaces ETI_Dummy if apps wishes it */
847 #ifdef SKINS
848 ULONG titlepos; /* used by titlebar pattern fill stuff */
849 #else
850 ULONG reserved1;
851 #endif
852 ULONG specialflags;
854 #ifdef SKINS
855 struct Region *transpregion;
856 struct Hook *usertransphook;
857 struct Region *usertranspregion;
858 #endif
860 #ifdef DAMAGECACHE
861 struct Region *trashregion;
862 #endif
863 char titlebuffer[TITLEBUFFERLEN+1];
865 #if USE_IDCMPUPDATE_MESSAGECACHE
866 struct IntuiMessage *messagecache; //for idcmpupdate cache
867 #endif
869 struct Layer *wlayer;
870 struct Layer *borderlayer;
872 struct timeval lastmsgsent;
873 struct timeval lastmsgreplied;
875 #ifdef TIMEVALWINDOWACTIVATION
876 struct timeval activationtime;
877 #endif
879 #ifdef SKINS
880 struct Hook custombackfill;
881 struct HookData hd;
882 #endif
883 struct Hook DefaultWindowShapeHook;
884 BOOL CustomShape;
885 struct Region *OutlineShape;
886 ULONG DecorUserBufferSize;
887 IPTR DecorUserBuffer;
890 #define SPFLAG_ICONIFIED 1
891 #define SPFLAG_NOICONIFY 2
892 #define SPFLAG_SKININFO 4
893 #define SPFLAG_LAYERREFRESH 8
894 #define SPFLAG_TRANSPHOOK 16
895 #define SPFLAG_LAYERRESIZED 32
896 #define SPFLAG_USERPORT 64
897 #define SPFLAG_IAMDEAD 128
898 #define SPFLAG_CLOSING 256 //used with iamdead
899 #define SPFLAG_WANTBUFFER 512
901 #define HELPF_ISHELPGROUP 1
902 #define HELPF_GADGETHELP 2
904 #define IS_NOCAREREFRESH(win) (((win)->Flags & WFLG_NOCAREREFRESH) ? TRUE : FALSE)
905 #define IS_DOCAREREFRESH(win) (((win)->Flags & WFLG_NOCAREREFRESH) ? FALSE : TRUE )
906 #define IS_SIMPLEREFRESH(win) (((win)->Flags & WFLG_SIMPLE_REFRESH) ? TRUE : FALSE)
907 #define IS_GZZWINDOW(win) (((win)->Flags & WFLG_GIMMEZEROZERO) ? TRUE : FALSE)
910 /* Flag definitions for MoreFlags */
912 #define WMFLG_NOTIFYDEPTH (1 << 0) /* Window wants notification when
913 it's depth arranged */
915 #define WMFLG_DO_UNLOCKPUBSCREEN (1 << 1)
916 #define WMFLG_MENUHELP (1 << 2)
917 #define WMFLG_POINTERDELAY (1 << 3)
918 #define WMFLG_TABLETMESSAGES (1 << 4)
920 // FIXME: ehm... this one should die a horrible death!
921 #define WMFLG_IAMMUI (1 << 5)
923 struct IntScreenBuffer
925 struct ScreenBuffer sb;
926 BOOL free_bitmap;
930 /* Driver prototypes */
932 extern int intui_init (struct IntuitionBase *);
933 extern int intui_open (struct IntuitionBase *);
934 extern void intui_close (struct IntuitionBase *);
935 extern void intui_expunge (struct IntuitionBase *);
936 extern int intui_GetWindowSize (void);
937 extern void intui_WindowLimits (struct Window * window, WORD MinWidth, WORD MinHeight, UWORD MaxWidth, UWORD MaxHeight);
938 extern void intui_ActivateWindow (struct Window *);
939 extern BOOL intui_ChangeWindowBox (struct Window * window, WORD x, WORD y,
940 WORD width, WORD height);
941 extern void intui_CloseWindow (struct Window *, struct IntuitionBase *);
942 extern void intui_MoveWindow (struct Window * window, WORD dx, WORD dy);
943 extern int intui_OpenWindow (struct Window *, struct IntuitionBase *,
944 struct BitMap * SuperBitMap, struct Hook *backfillhook,
945 struct Region * shape, struct Hook * shapehook,
946 struct Layer * parent, ULONG visible);
947 extern void intui_SetWindowTitles (struct Window *, CONST_STRPTR, CONST_STRPTR);
948 extern void intui_RefreshWindowFrame(struct Window *win);
949 extern struct Window *intui_FindActiveWindow(struct InputEvent *ie, struct IntuitionBase *IntuitionBase);
950 extern void intui_ScrollWindowRaster(struct Window * win, WORD dx, WORD dy, WORD xmin,
951 WORD ymin, WORD xmax, WORD ymax,
952 struct IntuitionBase * IntuitionBase);
954 /* wbtasktalk protos */
956 ULONG TellWBTaskToCloseWindows(struct IntuitionBase *IntuitionBase);
957 ULONG TellWBTaskToOpenWindows(struct IntuitionBase *IntuitionBase);
959 /* intuition_misc protos */
960 extern void LoadDefaultPreferences(struct IntuitionBase * IntuitionBase);
961 Object* CreateStdSysImage(WORD which, WORD preferred_height, struct Screen *scr, APTR buffer,
962 struct DrawInfo *dri, struct IntuitionBase *IntuitionBase);
963 extern void CheckRectFill(struct RastPort *rp, WORD x1, WORD y1, WORD x2, WORD y2, struct IntuitionBase * IntuitionBase);
964 extern BOOL CreateWinSysGadgets(struct Window *w, struct IntuitionBase *IntuitionBase);
965 extern VOID KillWinSysGadgets(struct Window *w, struct IntuitionBase *IntuitionBase);
966 extern void CreateScreenBar(struct Screen *scr, struct IntuitionBase *IntuitionBase);
967 extern void KillScreenBar(struct Screen *scr, struct IntuitionBase *IntuitionBase);
968 extern void RenderScreenBar(struct Screen *scr, BOOL refresh, struct IntuitionBase *IntuitionBase);
969 extern void UpdateMouseCoords(struct Window *win);
970 extern WORD SubtractRectFromRect(struct Rectangle *a, struct Rectangle *b, struct Rectangle *destrectarray);
971 extern struct Region *DefaultWindowShapeFunc(struct Hook *hook, struct Layer *lay, struct ShapeHookMsg *msg);
973 extern LONG CalcResourceHash(APTR resource);
974 extern void AddResourceToList(APTR resource, UWORD resourcetype, struct IntuitionBase *IntuitionBase);
975 extern void RemoveResourceFromList(APTR resource, UWORD resourcetype, struct IntuitionBase *IntuitionBase);
976 extern BOOL ResourceExisting(APTR resource, UWORD resourcetype, struct IntuitionBase *IntuitionBase);
977 void FireScreenNotifyMessage(IPTR data, ULONG flag, struct IntuitionBase *IntuitionBase);
978 void FireScreenNotifyMessageCode(IPTR data, ULONG flag, ULONG code, struct IntuitionBase *IntuitionBase);
980 /* misc.c */
981 extern struct RastPort *MyCreateRastPort(struct IntuitionBase *);
982 extern struct RastPort *MyCloneRastPort(struct IntuitionBase *, struct RastPort *);
983 extern void MyFreeRastPort(struct IntuitionBase *, struct RastPort *);
984 extern void MySetPointerPos(struct IntuitionBase *, int, int);
985 struct TextFont *SafeReopenFont(struct IntuitionBase *, struct TextFont **);
986 extern Object *MakePointerFromPrefs(struct IntuitionBase *, struct Preferences *);
987 extern Object *MakePointerFromData(struct IntuitionBase *, UWORD *, int, int, int, int);
988 void InstallPointer(struct IntuitionBase *, Object **, Object *);
989 void SetPointerColors(struct IntuitionBase *IntuitionBase);
990 struct IClass *InitITextIClass (struct IntuitionBase * IntuitionBase);
991 struct Gadget *DoActivateGadget(struct Window *win, struct Requester *req, struct Gadget *gad,
992 struct IntuitionBase *IntuitionBase);
993 VOID DoGMLayout(struct Gadget *glist, struct Window *win, struct Requester *req,
994 UWORD numgad, BOOL initial, struct IntuitionBase *IntuitionBase);
995 BOOL ih_fire_intuimessage(struct Window * w, ULONG Class, UWORD Code, APTR IAddress,
996 struct IntuitionBase *IntuitionBase);
997 void NotifyDepthArrangement(struct Window *w, struct IntuitionBase *IntuitionBase);
999 /* printitext.c */
1001 void int_PrintIText(struct RastPort * rp, struct IntuiText * iText,
1002 LONG leftOffset, LONG topOffset, BOOL ignore_attributes,
1003 struct IntuitionBase *IntuitionBase);
1005 #ifdef __MORPHOS__
1006 BOOL IsLayerHiddenBySibling(struct Layer *layer, BOOL xx);
1007 LONG IsLayerVisible(struct Layer *layer);
1008 #endif
1010 void SetupGInfo(struct GadgetInfo *gi, struct Window *win, struct Requester *req,
1011 struct Gadget *gad, struct IntuitionBase *IntuitionBase);
1013 IPTR Custom_DoMethodA(struct IntuitionBase *, struct Gadget *, Msg);
1015 #ifdef __MORPHOS__
1016 #ifdef DoMethodA
1017 #undef DoMethodA
1018 #endif
1019 #define DoMethodA(x, ...) (REG_A6=(LONG)IntuitionBase, DoMethodA(x, __VA_ARGS__))
1020 #endif
1022 #define Custom_DoMethodA(x, ...) Custom_DoMethodA(IntuitionBase, x, __VA_ARGS__)
1024 #define HAS_CHILDREN(w) (NULL != w->firstchild)
1026 #ifdef __MORPHOS__
1027 #define DeinitRastPort(rp) ((void)0)
1028 #define CreateRastPort() MyCreateRastPort(IntuitionBase)
1029 #define CloneRastPort(rp) MyCloneRastPort(IntuitionBase, rp)
1030 #define FreeRastPort(rp) MyFreeRastPort(IntuitionBase, rp)
1031 #define SetPointerPos(x, y) MySetPointerPos(IntuitionBase, x, y)
1032 #define MouseCoordsRelative() 1
1033 #endif
1035 /* Replacement for dos.library/DisplayError() */
1036 AROS_UFP3(LONG, Intuition_DisplayError,
1037 AROS_UFPA(STRPTR, formatStr , A0),
1038 AROS_UFPA(ULONG , IDCMPFlags, D0),
1039 AROS_UFPA(APTR , args , A1));
1041 #define POINTERA_SharedPointer 0x80039010
1043 #ifndef __MORPHOS__
1044 #define dprintf kprintf
1045 #endif
1047 #define DEBUG_ACTIVATEGADGET(x) ;
1048 #define DEBUG_ACTIVATEWINDOW(x) ;
1049 #define DEBUG_ADDCLASS(x) ;
1050 #define DEBUG_ADDGADGET(x) ;
1051 #define DEBUG_ADDGLIST(x) ;
1052 #define DEBUG_ALLOCINTUIMESSAGE(x) ;
1053 #define DEBUG_ALLOCSCREENBUFFER(x) ;
1054 #define DEBUG_ALOHAWORKBENCH(x) ;
1055 #define DEBUG_CHANGEWINDOWBOX(x) ;
1056 #define DEBUG_CLOSESCREEN(x) ;
1057 #define DEBUG_CLOSEWINDOW(x) ;
1058 #define DEBUG_CLOSEWORKBENCH(x) ;
1059 #define DEBUG_DISPOSEOBJECT(x) ;
1060 #define DEBUG_DOGADGETMETHOD(x) ;
1061 #define DEBUG_DRAWBORDER(x) ;
1062 #define DEBUG_FINDCLASS(x) ;
1063 #define DEBUG_FREEICDATA(x) ;
1064 #define DEBUG_FREEINTUIMESSAGE(x) ;
1065 #define DEBUG_FREESCREENBUFFER(x) ;
1066 #define DEBUG_FREESCREENDRAWINFO(x) ;
1067 #define DEBUG_GADGETMOUSE(x) ;
1068 #define DEBUG_GETATTR(x) ;
1069 #define DEBUG_GETDEFAULTPUBSCREEN(x) ;
1070 #define DEBUG_GETDEFPREFS(x) ;
1071 #define DEBUG_GETGADGETIBOX(x) ;
1072 #define DEBUG_GETPREFS(x) ;
1073 #define DEBUG_GETSCREENDATA(x) ;
1074 #define DEBUG_GETSCREENDRAWINFO(x) ;
1075 #define DEBUG_HIDEWINDOW(x) ;
1076 #ifdef __MORPHOS__
1077 #define DEBUG_INIT(x) if (SysBase->ex_DebugFlags & EXECDEBUGF_INIT) x;
1078 #else
1079 #define DEBUG_INIT(x) ;
1080 #endif
1081 #define DEBUG_OPEN(x) ;
1082 #define DEBUG_CLOSE(x) ;
1083 #define DEBUG_INPUTEVENT(x) ;
1084 #define DEBUG_INTREFRESHGLIST(x) ;
1085 #define DEBUG_INTUITEXTLENGTH(x) ;
1086 #define DEBUG_LENDMENUS(x) ;
1087 #define DEBUG_LOCKPUBSCREEN(x) ;
1088 #define DEBUG_MAKECLASS(x) ;
1089 #define DEBUG_MODIFYIDCMP(x) ;
1090 #define DEBUG_NEWOBJECT(x) ;
1091 #define DEBUG_NEXTOBJECT(x) ;
1092 #define DEBUG_OBTAINGIRPORT(x) ;
1093 #define DEBUG_OFFGADGET(x) ;
1094 #define DEBUG_OFFMENU(x) ;
1095 #define DEBUG_ONGADGET(x) ;
1096 #define DEBUG_ONMENU(x) ;
1097 #define DEBUG_OPENSCREEN(x) ;
1098 #define DEBUG_OPENSCREENTAGLIST(x) ;
1099 #define DEBUG_OPENWINDOW(x) ;
1100 #define DEBUG_OPENWINDOWTAGLIST(x) ;
1101 #define DEBUG_OPENWORKBENCH(x) ;
1102 #define DEBUG_POINTER(x) ;
1103 #define DEBUG_PRINTITEXT(x) ;
1104 #define DEBUG_QUERYOVERSCAN(x) ;
1105 #define DEBUG_REFRESH(x) ;
1106 #define DEBUG_RELEASEGIRPORT(x) ;
1107 #define DEBUG_REMEMBER(x) ;
1108 #define DEBUG_REMOVEGLIST(x) ;
1109 #define DEBUG_REPORTMOUSE(x) ;
1110 #define DEBUG_REQUEST(x) ;
1111 #define DEBUG_SCROLLWINDOWRASTER(x) ;
1112 #define DEBUG_SENDINTUIMESSAGE(x) ;
1113 #define DEBUG_SETATTRS(x) ;
1114 #define DEBUG_SETGADGETATTRS(x) ;
1115 #define DEBUG_SETPOINTER(x) ;
1116 #ifdef __MORPHOS__
1117 #define DEBUG_SETIPREFS(x) if (SysBase->ex_DebugFlags & EXECDEBUGF_INIT) x;
1118 #else
1119 #define DEBUG_SETIPREFS(x) ;
1120 #endif
1121 #ifdef __MORPHOS__
1122 #define DEBUG_SETPREFS(x) if (SysBase->ex_DebugFlags & EXECDEBUGF_INIT) x;
1123 #else
1124 #define DEBUG_SETPREFS(x) ;
1125 #endif
1126 #define DEBUG_SHOWWINDOW(x) ;
1127 #define DEBUG_UNLOCKPUBSCREEN(x) ;
1128 #define DEBUG_WINDOWLIMITS(x) ;
1129 #define DEBUG_WINDOWTOBACK(x) ;
1130 #define DEBUG_WINDOWTOFRONT(x) ;
1131 #define DEBUG_ZIPWINDOW(x) ;
1132 #define DEBUG_VISITOR(x) ;
1133 #define DEBUG_WORKBENCH(x) ;
1134 #define DEBUG_LOCKPUBSCREENLIST(x) ;
1135 #define DEBUG_UNLOCKPUBSCREENLIST(x) ;
1136 #define DEBUG_RETHINKDISPLAY(x) ;
1139 * Private data structures of the classes defined by intuition.library
1142 /* ICClass */
1143 struct ICData
1145 Object *ic_Target;
1146 struct TagItem *ic_Mapping;
1147 struct TagItem *ic_CloneTags;
1148 ULONG ic_LoopCounter;
1151 /* ModelClass */
1152 struct ModelData
1154 struct MinList memberlist;
1157 /* FrameIClass */
1158 struct FrameIData
1160 /* render bevel only with no fill? */
1161 BOOL fid_EdgesOnly;
1163 /* inverted bevel pens? */
1164 BOOL fid_Recessed;
1166 /* frame style? */
1167 WORD fid_FrameType;
1169 WORD fid_HOffset;
1170 WORD fid_VOffset;
1173 /* SysIClass */
1174 struct SysIData
1176 struct DrawInfo *dri;
1177 struct Image *frame;
1178 APTR userbuffer;
1179 ULONG type;
1180 UWORD flags;
1183 /* FillRectClass */
1184 struct FillRectData
1186 WORD apatsize;
1187 WORD mode;
1190 /* GadgetClass */
1191 struct GadgetData
1193 struct ExtGadget EG;
1194 struct ICData IC;
1197 /* PropGClass */
1198 struct PropGData
1200 /* We use a propinfo structure, because we use the same routines
1201 for intuition propgadtets and in propgclass */
1203 struct PropInfo propinfo;
1205 /* A little kludge: since the HandleMouseMove function
1206 wants dx/dy and not absolute mouse coords, we
1207 have to remember the last ones */
1209 UWORD last_x;
1210 UWORD last_y;
1212 /* One only have to store total or visble, and use some other
1213 formulas than those in the RKRM:L, but for
1214 code simplicity I store them all. */
1215 UWORD top, visible, total;
1217 UWORD flags;
1218 struct BBox *old_knobbox;
1219 struct Hook *DisplayHook;
1222 /* StrGClass */
1223 struct StrGData
1225 struct StringInfo StrInfo;
1226 struct StringExtend StrExtend;
1227 UBYTE Flags;
1230 /* GroupGClass */
1231 struct GroupGData
1233 struct MinList memberlist;
1234 struct Gadget *activegad;
1237 /* DragBarClass */
1238 struct dragbar_data
1240 /* Current left- and topedge of moving window. Ie when the user releases
1241 the LMB after a windowdrag, the window's new coords will be (curleft, curtop)
1244 LONG curleft;
1245 LONG curtop;
1247 /* The current x and y coordinates relative to curleft/curtop */
1248 LONG mousex;
1249 LONG mousey;
1251 /* Whether the dragframe is currently drawn or erased */
1252 BOOL isrendered;
1254 /* Used to tell GM_GOINACTIVE whether the drag was canceled or not */
1255 BOOL drag_canceled;
1257 /* Used to tell GM_GOINACTIVE whether UnlockLayer() or not */
1258 BOOL drag_layerlock;
1259 #ifdef USEGADGETLOCK
1260 BOOL drag_gadgetlock;
1261 #endif
1262 BOOL drag_refreshed;
1264 /* Rastport to use during update */
1265 struct RastPort *rp;
1267 UQUAD lasteventtime;
1269 LONG startleft;
1270 LONG starttop;
1272 #ifdef USEWINDOWLOCK
1273 /* used to prevent windows from opening/closing while user drags a window */
1274 BOOL drag_windowlock;
1275 #endif
1277 struct Task *movetask;
1281 /* SizeButtonClass */
1282 struct sizebutton_data
1285 /* The current width and height of the rubber band frame */
1286 ULONG width;
1287 ULONG height;
1288 ULONG top;
1289 ULONG left;
1291 /* holds original sizes */
1292 ULONG Width;
1293 ULONG Height;
1294 ULONG TopEdge;
1295 ULONG LeftEdge;
1297 /* the offset of the mouse pointer to the rubber band frame*/
1298 LONG mouseoffsetx;
1299 LONG mouseoffsety;
1301 /* Whether the dragframe is currently drawn or erased */
1302 BOOL isrendered;
1304 /* Used to tell GM_GOINACTIVE whether the drag was canceled or not */
1305 BOOL drag_canceled;
1307 /* Used to tell GM_GOINACTIVE whether UnlockLayer() or not */
1308 BOOL drag_layerlock;
1309 #ifdef USEGADGETLOCK
1310 BOOL drag_gadgetlock;
1311 #endif
1313 BOOL drag_refreshed;
1315 /* Rastport to use during update */
1316 struct RastPort *rp;
1318 UQUAD lasteventtime;
1320 #ifdef USEWINDOWLOCK
1321 /* used to prevent windows from opening/closing while user drags a window */
1322 BOOL drag_windowlock;
1323 #endif
1325 #ifdef SKINS
1326 ULONG drag_type;
1327 #endif
1329 ULONG drag_ticks;
1333 /* MenuBarLabelClass */
1334 struct MenuBarLabelData
1336 struct DrawInfo *dri;
1339 /* PointerClass */
1340 struct PointerData
1342 struct SharedPointer *shared_pointer;
1345 /* WinDecorClass */
1346 struct windecor_data
1348 ULONG userbuffersize;
1351 /* ScrDecorClass */
1352 struct scrdecor_data
1354 ULONG userbuffersize;
1357 /* MenuDecorClass */
1358 struct menudecor_data
1360 ULONG userbuffersize;
1363 #endif /* INTUITION_INTERN_H */