2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: Internal information for layers.library.
8 #ifndef _LAYERS_INTERN_H_
9 #define _LAYERS_INTERN_H_
11 #include <exec/types.h>
12 #include <exec/lists.h>
13 #include <exec/libraries.h>
14 #include <graphics/gfx.h>
15 #include <graphics/gfxbase.h>
16 #include <graphics/rastport.h>
17 #include <graphics/clip.h>
18 #include <graphics/layers.h>
19 #include <utility/utility.h>
21 #include <dos/dos.h> /* BPTR below */
22 #include <proto/alib.h> /* We redefine NewRectRegion() */
24 #include LC_LIBDEFS_FILE
26 #include "intregions.h"
30 struct Library lb_LibNode
;
34 struct GfxBase
* lb_GfxBase
;
35 struct UtilityBase
* lb_UtilityBase
;
38 /* Store library bases in our base, not in .bss. Why not ? */
39 #define GfxBase (LIBBASE->lb_GfxBase)
40 #define UtilityBase (LIBBASE->lb_UtilityBase)
45 struct Hook
*shapehook
;
46 IPTR window
; /* This is passed to shape hook. Comes from Intuition. */
48 struct RastPort rp
; /* lay.rp */
51 #define IL(x) ((struct IntLayer *)(x))
53 /* Standard layer priorities */
54 #define ROOTPRIORITY 0
55 #define BACKDROPPRIORITY 10
56 #define UPFRONTPRIORITY 20
58 #define INTFLAG_AVOID_BACKFILL 1
60 struct LayerInfo_extra
63 ULONG lie_ReturnAddr
; // used by setjmp/longjmp, equals jmp_buf
64 ULONG lie_Regs
[12]; // D2-D7/A2-SP
68 struct MinList lie_ResourceList
;
73 * These are special types of ResData resources. If layers finds one of
74 * these values in ResData->Size, it performs some special handling to
75 * properly dispose of the allocated Region or BitMap, respectively
76 * (throught DisposeRegion or FreeBitMap). In all other cases,
77 * ResData->Size is an argument for a freemem operation.
91 struct ResData
*rn_FirstFree
;
93 struct ResData rn_Data
[48];
98 ** The smart refresh flag is set for super bitmap as well as smart refresh
101 #define IS_SIMPLEREFRESH(l) (0 != ((l)->Flags & LAYERSIMPLE))
102 #define IS_SMARTREFRESH(l) (LAYERSMART == ((l)->Flags & (LAYERSMART|LAYERSUPER)))
103 #define IS_SUPERREFRESH(l) (0 != ((l)->Flags & LAYERSUPER))
105 int _MoveLayerBehind(struct Layer
*l
,
106 struct Layer
*lfront
,
107 LIBBASETYPEPTR LayersBase
);
108 int _MoveLayerToFront(struct Layer
* l
,
109 struct Layer
* lbehind
,
110 LIBBASETYPEPTR LayersBase
);
112 #define NewRectRegion(MinX, MinY, MaxX, MaxY) _NewRectRegion(MinX, MinY, MaxX, MaxY, LIBBASE->lb_GfxBase)
114 #endif /* _LAYERS_INTERN_H */