]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform_type.h
4f5c3cea4c2cc0346731b5fa1b2c678a8c76c1d6
[karo-tx-linux.git] / drivers / mxc / gpu-viv / hal / kernel / inc / gc_hal_eglplatform_type.h
1 /****************************************************************************
2 *
3 *    Copyright (C) 2005 - 2013 by Vivante Corp.
4 *
5 *    This program is free software; you can redistribute it and/or modify
6 *    it under the terms of the GNU General Public License as published by
7 *    the Free Software Foundation; either version 2 of the license, or
8 *    (at your option) any later version.
9 *
10 *    This program is distributed in the hope that it will be useful,
11 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 *    GNU General Public License for more details.
14 *
15 *    You should have received a copy of the GNU General Public License
16 *    along with this program; if not write to the Free Software
17 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 *
19 *****************************************************************************/
20
21
22 #ifndef __gc_hal_eglplatform_type_h_
23 #define __gc_hal_eglplatform_type_h_
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /*******************************************************************************
30 ** Events. *********************************************************************
31 */
32
33 typedef enum _halEventType
34 {
35         /* Keyboard event. */
36     HAL_KEYBOARD,
37
38         /* Mouse move event. */
39     HAL_POINTER,
40
41         /* Mouse button event. */
42     HAL_BUTTON,
43
44         /* Application close event. */
45         HAL_CLOSE,
46
47         /* Application window has been updated. */
48         HAL_WINDOW_UPDATE
49 }
50 halEventType;
51
52 /* Scancodes for keyboard. */
53 typedef enum _halKeys
54 {
55     HAL_UNKNOWN = -1,
56
57     HAL_BACKSPACE = 0x08,
58     HAL_TAB,
59     HAL_ENTER = 0x0D,
60     HAL_ESCAPE = 0x1B,
61
62     HAL_SPACE = 0x20,
63     HAL_SINGLEQUOTE = 0x27,
64     HAL_PAD_ASTERISK = 0x2A,
65     HAL_COMMA = 0x2C,
66     HAL_HYPHEN,
67     HAL_PERIOD,
68     HAL_SLASH,
69     HAL_0,
70     HAL_1,
71     HAL_2,
72     HAL_3,
73     HAL_4,
74     HAL_5,
75     HAL_6,
76     HAL_7,
77     HAL_8,
78     HAL_9,
79     HAL_SEMICOLON = 0x3B,
80     HAL_EQUAL = 0x3D,
81     HAL_A = 0x41,
82     HAL_B,
83     HAL_C,
84     HAL_D,
85     HAL_E,
86     HAL_F,
87     HAL_G,
88     HAL_H,
89     HAL_I,
90     HAL_J,
91     HAL_K,
92     HAL_L,
93     HAL_M,
94     HAL_N,
95     HAL_O,
96     HAL_P,
97     HAL_Q,
98     HAL_R,
99     HAL_S,
100     HAL_T,
101     HAL_U,
102     HAL_V,
103     HAL_W,
104     HAL_X,
105     HAL_Y,
106     HAL_Z,
107     HAL_LBRACKET,
108     HAL_BACKSLASH,
109     HAL_RBRACKET,
110     HAL_BACKQUOTE = 0x60,
111
112     HAL_F1 = 0x80,
113     HAL_F2,
114     HAL_F3,
115     HAL_F4,
116     HAL_F5,
117     HAL_F6,
118     HAL_F7,
119     HAL_F8,
120     HAL_F9,
121     HAL_F10,
122     HAL_F11,
123     HAL_F12,
124
125     HAL_LCTRL,
126     HAL_RCTRL,
127     HAL_LSHIFT,
128     HAL_RSHIFT,
129     HAL_LALT,
130     HAL_RALT,
131     HAL_CAPSLOCK,
132     HAL_NUMLOCK,
133     HAL_SCROLLLOCK,
134     HAL_PAD_0,
135     HAL_PAD_1,
136     HAL_PAD_2,
137     HAL_PAD_3,
138     HAL_PAD_4,
139     HAL_PAD_5,
140     HAL_PAD_6,
141     HAL_PAD_7,
142     HAL_PAD_8,
143     HAL_PAD_9,
144     HAL_PAD_HYPHEN,
145     HAL_PAD_PLUS,
146     HAL_PAD_SLASH,
147     HAL_PAD_PERIOD,
148     HAL_PAD_ENTER,
149     HAL_SYSRQ,
150     HAL_PRNTSCRN,
151     HAL_BREAK,
152     HAL_UP,
153     HAL_LEFT,
154     HAL_RIGHT,
155     HAL_DOWN,
156     HAL_HOME,
157     HAL_END,
158     HAL_PGUP,
159     HAL_PGDN,
160     HAL_INSERT,
161     HAL_DELETE,
162     HAL_LWINDOW,
163     HAL_RWINDOW,
164     HAL_MENU,
165     HAL_POWER,
166     HAL_SLEEP,
167     HAL_WAKE
168 }
169 halKeys;
170
171 /* Structure that defined keyboard mapping. */
172 typedef struct _halKeyMap
173 {
174         /* Normal key. */
175     halKeys normal;
176
177         /* Extended key. */
178     halKeys extended;
179 }
180 halKeyMap;
181
182 /* Event structure. */
183 typedef struct _halEvent
184 {
185         /* Event type. */
186     halEventType type;
187
188         /* Event data union. */
189     union _halEventData
190     {
191                 /* Event data for keyboard. */
192         struct _halKeyboard
193         {
194                         /* Scancode. */
195             halKeys     scancode;
196
197                         /* ASCII characte of the key pressed. */
198             char        key;
199
200                         /* Flag whether the key was pressed (1) or released (0). */
201             char        pressed;
202         }
203         keyboard;
204
205                 /* Event data for pointer. */
206         struct _halPointer
207         {
208                         /* Current pointer coordinate. */
209             int         x;
210             int         y;
211         }
212         pointer;
213
214                 /* Event data for mouse buttons. */
215         struct _halButton
216         {
217                         /* Left button state. */
218             int         left;
219
220                         /* Middle button state. */
221             int         middle;
222
223                         /* Right button state. */
224             int         right;
225
226                         /* Current pointer coordinate. */
227                         int             x;
228                         int             y;
229         }
230         button;
231     }
232     data;
233 }
234 halEvent;
235
236 /* VFK_DISPLAY_INFO structure defining information returned by
237    vdkGetDisplayInfoEx. */
238 typedef struct _halDISPLAY_INFO
239 {
240     /* The size of the display in pixels. */
241     int                         width;
242     int                         height;
243
244     /* The stride of the dispay. -1 is returned if the stride is not known
245     ** for the specified display.*/
246     int                         stride;
247
248     /* The color depth of the display in bits per pixel. */
249     int                         bitsPerPixel;
250
251     /* The logical pointer to the display memory buffer. NULL is returned
252     ** if the pointer is not known for the specified display. */
253     void *                      logical;
254
255     /* The physical address of the display memory buffer. ~0 is returned
256     ** if the address is not known for the specified display. */
257     unsigned long               physical;
258
259     int                wrapFB;   /* true if compositor, false otherwise. */
260
261 #ifndef __QNXNTO__
262     /* 355_FB_MULTI_BUFFER */
263     int                      multiBuffer;
264     int                      backBufferY;
265 #endif
266
267     /* The color info of the display. */
268     unsigned int                alphaLength;
269     unsigned int                alphaOffset;
270     unsigned int                redLength;
271     unsigned int                redOffset;
272     unsigned int                greenLength;
273     unsigned int                greenOffset;
274     unsigned int                blueLength;
275     unsigned int                blueOffset;
276
277     /* Display flip support. */
278     int                         flip;
279 }
280 halDISPLAY_INFO;
281
282 #ifdef __cplusplus
283 }
284 #endif
285
286 #endif /* __gc_hal_eglplatform_type_h_ */