rename the directory
[AROS.git] / rom / hidds / vesa / vesagfxclass.h
blob116089abda8588564d27b30b3f0dd420a30802a0
1 #ifndef HIDD_VESAGFXCLASS_H
2 #define HIDD_VESAGFXCLASS_H
4 /*
5 Copyright © 1995-2015, 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_Gfx_Vesa "hidd.gfx.vesa"
22 #define CLID_Hidd_Gfx_Vesa "hidd.gfx.vesa"
24 #define CLID_Hidd_BitMap_Vesa "hidd.bitmap.vesa"
25 #define IID_Hidd_BitMap_Vesa "hidd.bitmap.vesa"
27 struct VesaGfx_data
29 struct Interrupt ResetInterrupt;
32 #define ATTRBASES_NUM 6
34 struct VesaGfx_staticdata
36 OOP_Class *basebm; /* baseclass for CreateObject */
38 OOP_Class *vesagfxclass;
39 OOP_Class *bmclass;
40 OOP_Object *vesagfxhidd;
41 OOP_Object *visible; /* Currently visible bitmap */
42 struct HWData data;
43 struct SignalSemaphore framebufferlock;
44 struct SignalSemaphore HW_acc;
45 OOP_AttrBase attrBases[ATTRBASES_NUM];
48 struct VesaGfxBase
50 struct Library library;
51 struct VesaGfx_staticdata vsd;
54 #define LOCK_FRAMEBUFFER(xsd) ObtainSemaphore(&xsd->framebufferlock)
55 #define UNLOCK_FRAMEBUFFER(xsd) ReleaseSemaphore(&xsd->framebufferlock)
57 #define XSD(cl) (&((struct VesaGfxBase *)cl->UserData)->vsd)
59 #undef HiddChunkyBMAttrBase
60 #undef HiddBitMapAttrBase
61 #undef HiddGfxAttrBase
62 #undef HiddPixFmtAttrBase
63 #undef HiddSyncAttrBase
64 #undef HiddAttrBase
66 /* These must stay in the same order as interfaces[] array in vesagfx_init.c */
67 #define HiddChunkyBMAttrBase XSD(cl)->attrBases[0]
68 #define HiddBitMapAttrBase XSD(cl)->attrBases[1]
69 #define HiddGfxAttrBase XSD(cl)->attrBases[2]
70 #define HiddPixFmtAttrBase XSD(cl)->attrBases[3]
71 #define HiddSyncAttrBase XSD(cl)->attrBases[4]
72 #define HiddAttrBase XSD(cl)->attrBases[5]
74 #endif /* HIDD_VESAGFXCLASS_H */