rename the directory
[AROS.git] / arch / all-linux / hidd / linuxfb / linuxfb_intern.h
blobca364fa6fe1922c62b282ec325f185b801f67d66
1 #ifndef LINUX_INTERN_H
2 #define LINUX_INTERN_H
4 /*
5 Copyright © 1995-2015, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Linux framebuffer hidd for AROS
9 Lang: English.
12 #include <exec/interrupts.h>
13 #include <exec/libraries.h>
14 #include <exec/semaphores.h>
15 #include <oop/oop.h>
16 #include <hidd/graphics.h>
18 /* hack: prevent linux include header <bits/time.h> to re-define timeval struct */
19 # define _STRUCT_TIMEVAL 1
21 #include <linux/fb.h>
22 #include <linux/kd.h>
24 /* Private Attrs and methods for the LinuxFB Hidd */
26 #define CLID_Hidd_LinuxFB "hidd.gfx.linuxfb"
27 #define IID_Hidd_LinuxFB "hidd.gfx.linuxfb"
29 #define HiddLinuxFBAttrBase __abHidd_LinuxFB
30 extern OOP_AttrBase HiddLinuxFBAttrBase;
32 enum
34 aoHidd_LinuxFB_File,
35 num_Hidd_LinuxFB_Attrs
38 #define aHidd_LinuxFB_File HiddLinuxFBAttrBase + aoHidd_LinuxFB_File
40 #define IID_Hidd_LinuxFBBitmap "hidd.bitmap.linuxfb"
42 #define HiddLinuxFBBitmapAttrBase __abHidd_LinuxFBBitmap
43 extern OOP_AttrBase HiddLinuxFBBitmapAttrBase;
45 enum
47 aoHidd_LinuxFBBitmap_FBDevInfo,
48 num_Hidd_LinuxFBBitmap_Attrs
51 #define aHidd_LinuxFBBitmap_FBDevInfo HiddLinuxFBBitmapAttrBase + aoHidd_LinuxFBBitmap_FBDevInfo
53 struct FBDevInfo
55 int fbdev;
56 UBYTE fbtype;
57 BYTE *baseaddr;
58 LONG pitch;
59 LONG bpp;
60 LONG xres;
61 LONG yres;
64 struct LinuxFB_data
66 unsigned long mem_len;
68 OOP_Object *visible;
69 OOP_Object *unixio;
70 int confd;
71 long kbmode;
72 BOOL gamma;
73 UWORD scale_size;
74 UBYTE r_step;
75 UBYTE g_step;
76 UBYTE b_step;
78 /* FBDev info */
79 struct FBDevInfo fbdevinfo;
80 struct Interrupt resetHandler;
82 /* baseclass for CreateObject */
83 OOP_Class *basebm;
86 /*** Shared data ***/
87 struct LinuxFB_staticdata
89 struct SignalSemaphore sema;
91 OOP_Class *gfxclass;
92 OOP_Class *bmclass;
93 OOP_Object *unixio;
95 OOP_AttrBase gfxAttrBase;
96 OOP_AttrBase bmAttrBase;
97 OOP_AttrBase syncAttrBase;
98 OOP_AttrBase pfAttrBase;
99 OOP_AttrBase cmAttrBase;
100 OOP_AttrBase chunkyAttrBase;
101 OOP_AttrBase linuxFBAttrBase;
102 OOP_AttrBase linuxBMAttrBase;
105 struct LinuxFB_base
107 struct Library library;
108 struct LinuxFB_staticdata lsd;
111 struct BitmapData;
113 #define LSD(cl) (&((struct LinuxFB_base *)cl->UserData)->lsd)
115 #undef HiddGfxAttrBase
116 #undef HiddBitMapAttrBase
117 #undef HiddSyncAttrBase
118 #undef HiddPixFmtAttrBase
119 #undef HiddColorMapAttrBase
120 #undef HiddChunkyBMAttrBase
121 #undef HiddLinuxFBAttrBase
122 #undef HiddLinuxFBBitmapAttrBase
123 #define HiddGfxAttrBase LSD(cl)->gfxAttrBase
124 #define HiddBitMapAttrBase LSD(cl)->bmAttrBase
125 #define HiddSyncAttrBase LSD(cl)->syncAttrBase
126 #define HiddPixFmtAttrBase LSD(cl)->pfAttrBase
127 #define HiddColorMapAttrBase LSD(cl)->cmAttrBase
128 #define HiddChunkyBMAttrBase LSD(cl)->chunkyAttrBase
129 #define HiddLinuxFBAttrBase LSD(cl)->linuxFBAttrBase
130 #define HiddLinuxFBBitmapAttrBase LSD(cl)->linuxBMAttrBase
131 #define METHOD(base, id, name) \
132 base ## __ ## id ## __ ## name (OOP_Class *cl, OOP_Object *o, struct p ## id ## _ ## name *msg)
134 #endif /* LINUX_INTERN_H */