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 #define STACKNODE_ALPHA (1 << 0)
28 #define STACKNODE_VISIBLE (1 << 1)
30 struct HIDDCompositorData
32 struct GfxBase *GraphicsBase;
33 /* Bitmap to which all screen bitmaps are composited. Height/Width always
34 matches visible mode */
35 OOP_Object *compositedbitmap;
37 /* Pointer to actuall screen bitmap, result of last HIDD_Gfx_Show().
38 Needed for graphics.library only. */
39 OOP_Object *screenbitmap;
41 /* Pointer to top bitmap on stack */
42 OOP_Object *topbitmap;
44 HIDDT_ModeID screenmodeid; /* ModeID of currently visible mode */
45 struct Rectangle screenrect; /* Dimensions of currently visible mode */
47 struct MinList bitmapstack;
48 struct SignalSemaphore semaphore;
50 struct Region *alpharegion;
52 struct Hook defaultbackfill;
53 struct Hook *backfillhook;
55 OOP_Object *gfx; /* GFX driver object */
56 OOP_Object *fb; /* Framebuffer bitmap (if present) */
57 OOP_Object *gc; /* GC object used for drawing operations */
59 BOOL modeschanged; /* TRUE if new top bitmap has different mode than current screenmodeid */
62 #define METHOD(base, id, name) \
63 base ## __ ## id ## __ ## name (OOP_Class *cl, OOP_Object *o, struct p ## id ## _ ## name *msg)
65 #define LOCK_COMPOSITOR_READ { ObtainSemaphoreShared(&compdata->semaphore); }
66 #define LOCK_COMPOSITOR_WRITE { ObtainSemaphore(&compdata->semaphore); }
67 #define UNLOCK_COMPOSITOR { ReleaseSemaphore(&compdata->semaphore); }
69 extern OOP_AttrBase HiddCompositorAttrBase;
70 extern const struct OOP_InterfaceDescr Compositor_ifdescr[];
72 #define IS_COMPOSITOR_ATTR(attr, idx) \
73 ( ( ( idx ) = (attr) - HiddCompositorAttrBase) < num_Hidd_Compositor_Attrs)
75 #endif /* _COMPOSITOR_INTERN_H */