tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / rom / hyperlayers / layers_intern.h
blobdc119a766be191c343801bb79ea0d13b31bf6ca3
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Internal information for layers.library.
6 Lang:
7 */
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>
20 #include <setjmp.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"
28 LIBBASETYPE
30 struct Library lb_LibNode;
32 APTR lb_ClipRectPool;
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)
42 struct IntLayer
44 struct Layer lay;
45 struct Hook *shapehook;
46 IPTR window; /* This is passed to shape hook. Comes from Intuition. */
47 ULONG intflags;
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
62 #if 0
63 ULONG lie_ReturnAddr; // used by setjmp/longjmp, equals jmp_buf
64 ULONG lie_Regs[12]; // D2-D7/A2-SP
65 #else
66 jmp_buf lie_JumpBuf;
67 #endif
68 struct MinList lie_ResourceList;
69 UBYTE lie_pad[4];
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.
79 #define RD_REGION -1
80 #define RD_BITMAP -2
82 struct ResData
84 void *ptr;
85 ULONG Size;
88 struct ResourceNode
90 struct Node rn_Link;
91 struct ResData *rn_FirstFree;
92 LONG rn_FreeCnt;
93 struct ResData rn_Data[48];
98 ** The smart refresh flag is set for super bitmap as well as smart refresh
99 ** layers
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 */