1 #ifndef _COMPOSITOR_INTERN_H
2 #define _COMPOSITOR_INTERN_H
5 Copyright © 2010-2013, The AROS Development Team. All rights reserved.
9 #include "compositor.h"
11 #include <exec/nodes.h>
12 #include <exec/lists.h>
13 #include <exec/semaphores.h>
14 #include <graphics/gfx.h>
16 struct StackBitMapNode
20 struct Region *screenregion;
21 struct Rectangle screenvisiblerect; /* Visible part */
22 SIPTR leftedge; /* Offset */
27 // sbmflags bits 0 to 3 are reserved for the normal compositing flags.
28 #define STACKNODEB_HASALPHA 4
29 #define STACKNODEF_HASALPHA (1 << STACKNODEB_HASALPHA)
30 #define STACKNODEB_VISIBLE 5
31 #define STACKNODEF_VISIBLE (1 << STACKNODEB_VISIBLE)
32 #define STACKNODEB_DISPLAYABLE 6
33 #define STACKNODEF_DISPLAYABLE (1 << STACKNODEB_DISPLAYABLE)
35 struct HIDDCompositorData
37 struct GfxBase *GraphicsBase;
38 struct IntuitionBase *IntuitionBase;
40 /* Bitmap to which all screen bitmaps are composited. Height/Width always
41 matches visible mode */
42 OOP_Object *displaybitmap;
43 OOP_Object *intermedbitmap;
45 /* Pointer to actuall screen bitmap, result of last HIDD_Gfx_Show().
46 Needed for graphics.library only. */
47 OOP_Object *screenbitmap;
49 /* Pointer to top bitmap on stack */
50 OOP_Object *topbitmap;
52 HIDDT_ModeID screenmodeid; /* ModeID of currently visible mode */
53 struct Rectangle displayrect; /* Dimensions of currently visible mode */
54 struct Region *alpharegion;
56 struct MinList bitmapstack;
57 struct SignalSemaphore semaphore;
59 struct Hook defaultbackfill;
60 struct Hook *backfillhook;
62 OOP_Object *gfx; /* GFX driver object */
63 OOP_Object *fb; /* Framebuffer bitmap (if present) */
64 OOP_Object *gc; /* GC object used for drawing operations */
67 BOOL modeschanged; /* TRUE if new top bitmap has different mode than current screenmodeid */
70 #define COMPSTATEB_HASALPHA 0
71 #define COMPSTATEF_HASALPHA (1 << COMPSTATEB_HASALPHA)
73 #define METHOD(base, id, name) \
74 base ## __ ## id ## __ ## name (OOP_Class *cl, OOP_Object *o, struct p ## id ## _ ## name *msg)
76 #define LOCK_COMPOSITOR_READ { ObtainSemaphoreShared(&compdata->semaphore); }
77 #define LOCK_COMPOSITOR_WRITE { ObtainSemaphore(&compdata->semaphore); }
78 #define UNLOCK_COMPOSITOR { ReleaseSemaphore(&compdata->semaphore); }
80 extern OOP_AttrBase HiddCompositorAttrBase;
81 extern const struct OOP_InterfaceDescr Compositor_ifdescr[];
83 #endif /* _COMPOSITOR_INTERN_H */