1 #ifndef GRAPHICS_CLIP_H
2 #define GRAPHICS_CLIP_H
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 Desc: Clip descriptions.
12 #ifndef EXEC_SEMAPHORES_H
13 # include <exec/semaphores.h>
16 # include <exec/types.h>
18 #ifndef GRAPHICS_GFX_H
19 # include <graphics/gfx.h>
21 #ifndef INTUITION_INTUITION_H
22 # include <intuition/intuition.h>
25 #ifndef UTILITY_HOOKS_H
26 # include <utility/hooks.h>
36 struct ClipRect
* ClipRect
;
38 struct Rectangle bounds
;
41 struct Layer
* parent
; /* PRIVATE !!! */
48 struct BitMap
* SuperBitMap
;
49 struct ClipRect
* SuperClipRect
;
56 struct ClipRect
* cr2
;
57 struct ClipRect
* crnew
;
58 struct ClipRect
* SuperSaveClipRects
;
59 struct ClipRect
* _cliprects
;
61 struct Layer_Info
* LayerInfo
;
62 struct SignalSemaphore Lock
;
63 struct Hook
* BackFill
;
66 struct Region
* VisibleRegion
; /* PRIVATE !!! */
71 struct Region
* ClipRegion
;
72 struct Region
* saveClipRects
;
78 struct Region
* shape
; /* PRIVATE !!! */
79 struct Region
* shaperegion
; /* PRIVATE !!! */
80 struct Region
* visibleshape
; /* PRIVATE !!! */
82 UWORD nesting
; /* PRIVATE !!! */
83 UBYTE SuperSaveClipRectCounter
; /* PRIVATE !!! */
84 UBYTE visible
; /* PRIVATE !!! */
91 struct Region
* DamageList
;
94 #define MAXSUPERSAVECLIPRECTS 20 /* Max. number of cliprects that are kept preallocated in the list */
98 struct ClipRect
* Next
;
99 struct ClipRect
* prev
;
101 struct BitMap
* BitMap
;
102 struct Rectangle bounds
;
111 #define CR_NEEDS_NO_CONCEALED_RASTERS 1
112 #define CR_NEEDS_NO_LAYERBLIT_DAMAGE 2
114 #define ISLESSX (1<<0)
115 #define ISLESSY (1<<1)
116 #define ISGRTRX (1<<2)
117 #define ISGRTRY (1<<3)
119 /* This one is used for determining optimal offset for blitting into
121 #define ALIGN_OFFSET(x) ((x) & 0x0F)
124 #define LA_Priority WA_Priority
125 #define LA_Hook WA_BackFill
126 #define LA_SuperBitMap WA_SuperBitMap
127 #define LA_ChildOf WA_Parent
128 #define LA_InFrontOf WA_InFrontOf
129 #define LA_Behind WA_Behind
130 #define LA_Visible WA_Visible
131 #define LA_Shape WA_Shape
132 #define LA_ShapeHook WA_ShapeHook
136 * Tags for scale layer
138 #define LA_SRCX 0x4000
139 #define LA_SRCY 0x4001
140 #define LA_DESTX 0x4002
141 #define LA_DESTY 0x4003
142 #define LA_SRCWIDTH 0x4004
143 #define LA_SRCHEIGHT 0x4005
144 #define LA_DESTWIDTH 0x4006
145 #define LA_DESTHEIGHT 0x4007
148 #define ROOTPRIORITY 0
149 #define BACKDROPPRIORITY 10
150 #define UPFRONTPRIORITY 20
152 #define IS_VISIBLE(l) (TRUE == l->visible)
154 struct ChangeLayerShapeMsg
156 struct Region
* newshape
; // same as passed to ChangeLayerShape()
157 struct ClipRect
* cliprect
;
158 struct Region
* shape
;
161 struct CollectPixelsLayerMsg
170 struct Layer
* layer
;
174 /* Msg sent through LA_ShapeHook. Hook function must look like this:
176 AROS_UFH3(struct Region *, MyShapeFunc,
177 AROS_UFHA(struct Hook *, hook, A0),
178 AROS_UFHA(struct Layer *, layer, A2),
179 AROS_UFHA(struct ShapeHookMsg *, msg, A1))
183 #define SHAPEHOOKACTION_CREATELAYER 0
184 #define SHAPEHOOKACTION_MOVELAYER 1
185 #define SHAPEHOOKACTION_SIZELAYER 2
186 #define SHAPEHOOKACTION_MOVESIZELAYER 3
192 struct Region
*ActualShape
;
193 struct Rectangle NewBounds
;
194 struct Rectangle OldBounds
;
197 #endif /* GRAPHICS_CLIP_H */