Use TARGET_STRIP instead of STRIP. Needed on OS X.
[AROS.git] / compiler / include / graphics / clip.h
bloba1ae9530dc76231fe91b05323b499f1db32f39f9
1 #ifndef GRAPHICS_CLIP_H
2 #define GRAPHICS_CLIP_H
4 /*
5 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Clip descriptions.
9 Lang: english
12 #ifndef EXEC_SEMAPHORES_H
13 # include <exec/semaphores.h>
14 #endif
15 #ifndef EXEC_TYPES_H
16 # include <exec/types.h>
17 #endif
18 #ifndef GRAPHICS_GFX_H
19 # include <graphics/gfx.h>
20 #endif
21 #ifndef INTUITION_INTUITION_H
22 # include <intuition/intuition.h>
23 #endif
25 #ifndef UTILITY_HOOKS_H
26 # include <utility/hooks.h>
27 #endif
29 #define NEWLOCKS
32 struct Layer
34 struct Layer * front;
35 struct Layer * back;
36 struct ClipRect * ClipRect;
37 struct RastPort * rp;
38 struct Rectangle bounds;
40 #if 1
41 struct Layer * parent; /* PRIVATE !!! */
42 #else
43 UBYTE reserved[4];
44 #endif
45 UWORD priority;
46 UWORD Flags;
48 struct BitMap * SuperBitMap;
49 struct ClipRect * SuperClipRect;
51 APTR Window;
52 WORD Scroll_X;
53 WORD Scroll_Y;
55 struct ClipRect * cr;
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;
65 #if 1
66 struct Region * VisibleRegion; /* PRIVATE !!! */
67 #else
68 ULONG reserved1;
69 #endif
71 struct Region * ClipRegion;
72 struct Region * saveClipRects;
74 WORD Width;
75 WORD Height;
77 #if 1
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 !!! */
86 UBYTE reserved2[2];
87 #else
88 UBYTE reserved2[18];
89 #endif
91 struct Region * DamageList;
94 #define MAXSUPERSAVECLIPRECTS 20 /* Max. number of cliprects that are kept preallocated in the list */
96 struct ClipRect
98 struct ClipRect * Next;
99 struct ClipRect * prev;
100 struct Layer * lobs;
101 struct BitMap * BitMap;
102 struct Rectangle bounds;
104 void * _p1;
105 void * _p2;
106 LONG reserved;
107 LONG Flags;
110 /* PRIVATE */
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
120 cliprects */
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
147 LONG xSrc;
148 LONG ySrc;
149 LONG width;
150 LONG height;
151 LONG xDest;
152 LONG yDest;
153 struct BitMap * bm;
154 struct Layer * layer;
155 ULONG minterm;
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
176 struct ShapeHookMsg
178 LONG Action;
179 struct Region *NewShape;
180 struct Region *OldShape;
181 struct Rectangle *NewBounds;
182 struct Rectangle *OldBounds;
185 #endif /* GRAPHICS_CLIP_H */