W.I.P AROS port of SDI examples
[AROS.git] / rom / hidds / vesa / vesagfxclass.h
blobfe311250c8f9311d174f7dee67d76294df6d792f
1 #ifndef HIDD_VESAGFXCLASS_H
2 #define HIDD_VESAGFXCLASS_H
4 /*
5 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Some VesaGfx useful data.
9 Lang: English.
12 #include <exec/interrupts.h>
13 #include <exec/semaphores.h>
14 #include <exec/memory.h>
15 #include <exec/nodes.h>
16 #include <exec/types.h>
18 #include "bitmap.h"
19 #include "hardware.h"
21 #define IID_Hidd_VesaGfx "hidd.gfx.vesa"
22 #define CLID_Hidd_VesaGfx "hidd.gfx.vesa"
24 struct VesaGfx_data
26 struct Interrupt ResetInterrupt;
29 #define ATTRBASES_NUM 6
31 struct VesaGfx_staticdata
33 OOP_Class *vesagfxclass;
34 OOP_Class *bmclass;
35 OOP_Object *vesagfxhidd;
36 OOP_Object *visible; /* Currently visible bitmap */
37 struct HWData data;
38 struct SignalSemaphore framebufferlock;
39 struct SignalSemaphore HW_acc;
40 OOP_AttrBase attrBases[ATTRBASES_NUM];
43 struct VesaGfxBase
45 struct Library library;
46 struct VesaGfx_staticdata vsd;
49 #define LOCK_FRAMEBUFFER(xsd) ObtainSemaphore(&xsd->framebufferlock)
50 #define UNLOCK_FRAMEBUFFER(xsd) ReleaseSemaphore(&xsd->framebufferlock)
52 #define XSD(cl) (&((struct VesaGfxBase *)cl->UserData)->vsd)
54 #undef HiddChunkyBMAttrBase
55 #undef HiddBitMapAttrBase
56 #undef HiddGfxAttrBase
57 #undef HiddPixFmtAttrBase
58 #undef HiddSyncAttrBase
59 #undef HiddAttrBase
61 /* These must stay in the same order as interfaces[] array in vesagfx_init.c */
62 #define HiddChunkyBMAttrBase XSD(cl)->attrBases[0]
63 #define HiddBitMapAttrBase XSD(cl)->attrBases[1]
64 #define HiddGfxAttrBase XSD(cl)->attrBases[2]
65 #define HiddPixFmtAttrBase XSD(cl)->attrBases[3]
66 #define HiddSyncAttrBase XSD(cl)->attrBases[4]
67 #define HiddAttrBase XSD(cl)->attrBases[5]
69 #endif /* HIDD_VESAGFXCLASS_H */