grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / devs / monitors / Compositor / compositor_intern.h
blob87ff46f7019b8435f9153b0c0b037c9f3a48036d
1 #ifndef _COMPOSITOR_INTERN_H
2 #define _COMPOSITOR_INTERN_H
4 /*
5 Copyright © 2010-2013, The AROS Development Team. All rights reserved.
6 $Id$
7 */
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
18 struct MinNode n;
19 OOP_Object *bm;
20 struct Region *screenregion;
21 SIPTR leftedge; /* Offset */
22 SIPTR topedge;
23 IPTR sbmflags;
24 struct Hook *prealphacomphook;
27 // sbmflags bits 0 to 3 are reserved for the normal compositing flags.
28 #define STACKNODEB_VISIBLE 16
29 #define STACKNODEF_VISIBLE (1 << STACKNODEB_VISIBLE)
30 #define STACKNODEB_DISPLAYABLE 17
31 #define STACKNODEF_DISPLAYABLE (1 << STACKNODEB_DISPLAYABLE)
33 struct HIDDCompositorData
35 struct GfxBase *GraphicsBase;
36 struct IntuitionBase *IntuitionBase;
38 ULONG capabilities;
39 ULONG flags;
41 /* Bitmap to which all screen bitmaps are composited. Height/Width always
42 matches visible mode */
43 OOP_Object *displaybitmap;
44 OOP_Object *intermedbitmap;
46 /* Pointer to actuall screen bitmap, result of last HIDD_Gfx_Show().
47 Needed for graphics.library only. */
48 OOP_Object *screenbitmap;
50 /* Pointer to top bitmap on stack */
51 OOP_Object *topbitmap;
53 struct Rectangle displayrect; /* Dimensions of currently visible mode */
54 struct Region *alpharegion;
56 struct MinList bitmapstack;
57 struct SignalSemaphore semaphore;
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 */
65 ULONG displayid;
66 HIDDT_ModeID displaymode; /* ModeID of currently visible mode */
67 UBYTE displaydepth;
69 struct Hook defaultbackfill;
70 BOOL modeschanged; /* TRUE if new top bitmap has different mode than current displaymode */
73 #define COMPSTATEB_HASALPHA 0
74 #define COMPSTATEF_HASALPHA (1 << COMPSTATEB_HASALPHA)
75 #define COMPSTATEB_DEEPLUT 1
76 #define COMPSTATEF_DEEPLUT (1 << COMPSTATEB_DEEPLUT)
78 #define METHOD(base, id, name) \
79 base ## __ ## id ## __ ## name (OOP_Class *cl, OOP_Object *o, struct p ## id ## _ ## name *msg)
81 #define LOCK_COMPOSITOR_READ { ObtainSemaphoreShared(&compdata->semaphore); }
82 #define LOCK_COMPOSITOR_WRITE { ObtainSemaphore(&compdata->semaphore); }
83 #define UNLOCK_COMPOSITOR { ReleaseSemaphore(&compdata->semaphore); }
85 extern OOP_AttrBase HiddCompositorAttrBase;
86 extern const struct OOP_InterfaceDescr Compositor_ifdescr[];
88 void UpdateDisplayMode(struct HIDDCompositorData *compdata);
90 #endif /* _COMPOSITOR_INTERN_H */