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 */
25 struct Hook *prealphacomphook;
28 // sbmflags bits 0 to 3 are reserved for the normal compositing flags.
29 #define STACKNODEB_VISIBLE 16
30 #define STACKNODEF_VISIBLE (1 << STACKNODEB_VISIBLE)
31 #define STACKNODEB_DISPLAYABLE 17
32 #define STACKNODEF_DISPLAYABLE (1 << STACKNODEB_DISPLAYABLE)
34 struct HIDDCompositorData
36 struct GfxBase *GraphicsBase;
37 struct IntuitionBase *IntuitionBase;
39 /* Bitmap to which all screen bitmaps are composited. Height/Width always
40 matches visible mode */
41 OOP_Object *displaybitmap;
42 OOP_Object *intermedbitmap;
44 /* Pointer to actuall screen bitmap, result of last HIDD_Gfx_Show().
45 Needed for graphics.library only. */
46 OOP_Object *screenbitmap;
48 /* Pointer to top bitmap on stack */
49 OOP_Object *topbitmap;
51 HIDDT_ModeID screenmodeid; /* ModeID of currently visible mode */
52 struct Rectangle displayrect; /* Dimensions of currently visible mode */
53 struct Region *alpharegion;
55 struct MinList bitmapstack;
56 struct SignalSemaphore semaphore;
58 struct Hook defaultbackfill;
59 struct Hook *backfillhook;
61 OOP_Object *gfx; /* GFX driver object */
62 OOP_Object *fb; /* Framebuffer bitmap (if present) */
63 OOP_Object *gc; /* GC object used for drawing operations */
66 BOOL modeschanged; /* TRUE if new top bitmap has different mode than current screenmodeid */
69 #define COMPSTATEB_HASALPHA 0
70 #define COMPSTATEF_HASALPHA (1 << COMPSTATEB_HASALPHA)
72 #define METHOD(base, id, name) \
73 base ## __ ## id ## __ ## name (OOP_Class *cl, OOP_Object *o, struct p ## id ## _ ## name *msg)
75 #define LOCK_COMPOSITOR_READ { ObtainSemaphoreShared(&compdata->semaphore); }
76 #define LOCK_COMPOSITOR_WRITE { ObtainSemaphore(&compdata->semaphore); }
77 #define UNLOCK_COMPOSITOR { ReleaseSemaphore(&compdata->semaphore); }
79 extern OOP_AttrBase HiddCompositorAttrBase;
80 extern const struct OOP_InterfaceDescr Compositor_ifdescr[];
82 #endif /* _COMPOSITOR_INTERN_H */