1 #ifndef GRAPHICS_CLIP_H
2 #define GRAPHICS_CLIP_H
5 Copyright © 1995-2011, 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)
125 * Tags for scale layer
127 #define LA_SRCX 0x4000
128 #define LA_SRCY 0x4001
129 #define LA_DESTX 0x4002
130 #define LA_DESTY 0x4003
131 #define LA_SRCWIDTH 0x4004
132 #define LA_SRCHEIGHT 0x4005
133 #define LA_DESTWIDTH 0x4006
134 #define LA_DESTHEIGHT 0x4007
136 #define IS_VISIBLE(l) (TRUE == l->visible)
138 struct ChangeLayerShapeMsg
140 struct Region
* newshape
; // same as passed to ChangeLayerShape()
141 struct ClipRect
* cliprect
;
142 struct Region
* shape
;
145 struct CollectPixelsLayerMsg
154 struct Layer
* layer
;
159 AmigaOS4-style shape hook.
161 Msg sent through LA_ShapeHook. Hook function must look like this:
163 AROS_UFH3(BOOL, MyShapeFunc,
164 AROS_UFHA(struct Hook *, hook, A0),
165 AROS_UFHA(struct Layer *, layer, A2),
166 AROS_UFHA(struct ShapeHookMsg *, msg, A1))
170 #define SHAPEHOOKACTION_CREATELAYER 0
171 #define SHAPEHOOKACTION_MOVELAYER 1
172 #define SHAPEHOOKACTION_SIZELAYER 2
173 #define SHAPEHOOKACTION_MOVESIZELAYER 3
174 #define SHAPEHOOKACTION_CHANGELAYERSHAPE 4
179 struct Region
*NewShape
;
180 struct Region
*OldShape
;
181 struct Rectangle
*NewBounds
;
182 struct Rectangle
*OldBounds
;
185 #endif /* GRAPHICS_CLIP_H */