1 typedef unsigned int size_t;
2 typedef unsigned char __u_char;
3 typedef unsigned short int __u_short;
4 typedef unsigned int __u_int;
5 typedef unsigned long int __u_long;
6 typedef signed char __int8_t;
7 typedef unsigned char __uint8_t;
8 typedef signed short int __int16_t;
9 typedef unsigned short int __uint16_t;
10 typedef signed int __int32_t;
11 typedef unsigned int __uint32_t;
12 __extension__ typedef signed long long int __int64_t;
13 __extension__ typedef unsigned long long int __uint64_t;
14 __extension__ typedef long long int __quad_t;
15 __extension__ typedef unsigned long long int __u_quad_t;
16 __extension__ typedef __u_quad_t __dev_t;
17 __extension__ typedef unsigned int __uid_t;
18 __extension__ typedef unsigned int __gid_t;
19 __extension__ typedef unsigned long int __ino_t;
20 __extension__ typedef __u_quad_t __ino64_t;
21 __extension__ typedef unsigned int __mode_t;
22 __extension__ typedef unsigned int __nlink_t;
23 __extension__ typedef long int __off_t;
24 __extension__ typedef __quad_t __off64_t;
25 __extension__ typedef int __pid_t;
26 __extension__ typedef struct { int __val[2]; } __fsid_t;
27 __extension__ typedef long int __clock_t;
28 __extension__ typedef unsigned long int __rlim_t;
29 __extension__ typedef __u_quad_t __rlim64_t;
30 __extension__ typedef unsigned int __id_t;
31 __extension__ typedef long int __time_t;
32 __extension__ typedef unsigned int __useconds_t;
33 __extension__ typedef long int __suseconds_t;
34 __extension__ typedef int __daddr_t;
35 __extension__ typedef long int __swblk_t;
36 __extension__ typedef int __key_t;
37 __extension__ typedef int __clockid_t;
38 __extension__ typedef int __timer_t;
39 __extension__ typedef long int __blksize_t;
40 __extension__ typedef long int __blkcnt_t;
41 __extension__ typedef __quad_t __blkcnt64_t;
42 __extension__ typedef unsigned long int __fsblkcnt_t;
43 __extension__ typedef __u_quad_t __fsblkcnt64_t;
44 __extension__ typedef unsigned long int __fsfilcnt_t;
45 __extension__ typedef __u_quad_t __fsfilcnt64_t;
46 __extension__ typedef int __ssize_t;
47 typedef __off64_t __loff_t;
48 typedef __quad_t *__qaddr_t;
49 typedef char *__caddr_t;
50 __extension__ typedef int __intptr_t;
51 __extension__ typedef unsigned int __socklen_t;
52 typedef __u_char u_char;
53 typedef __u_short u_short;
54 typedef __u_int u_int;
55 typedef __u_long u_long;
56 typedef __quad_t quad_t;
57 typedef __u_quad_t u_quad_t;
58 typedef __fsid_t fsid_t;
59 typedef __loff_t loff_t;
60 typedef __ino_t ino_t;
61 typedef __dev_t dev_t;
62 typedef __gid_t gid_t;
63 typedef __mode_t mode_t;
64 typedef __nlink_t nlink_t;
65 typedef __uid_t uid_t;
66 typedef __off_t off_t;
67 typedef __pid_t pid_t;
68 typedef __id_t id_t;
69 typedef __ssize_t ssize_t;
70 typedef __daddr_t daddr_t;
71 typedef __caddr_t caddr_t;
72 typedef __key_t key_t;
73 typedef __time_t time_t;
74 typedef __clockid_t clockid_t;
75 typedef __timer_t timer_t;
76 typedef unsigned long int ulong;
77 typedef unsigned short int ushort;
78 typedef unsigned int uint;
79 typedef int int8_t __attribute__ ((__mode__ (__QI__)));
80 typedef int int16_t __attribute__ ((__mode__ (__HI__)));
81 typedef int int32_t __attribute__ ((__mode__ (__SI__)));
82 typedef int int64_t __attribute__ ((__mode__ (__DI__)));
83 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
84 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
85 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
86 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
87 typedef int register_t __attribute__ ((__mode__ (__word__)));
88 typedef int __sig_atomic_t;
89 typedef struct
90   {
91     unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
92   } __sigset_t;
93 typedef __sigset_t sigset_t;
94 struct timespec
95   {
96     __time_t tv_sec;
97     long int tv_nsec;
98   };
99 struct timeval
100   {
101     __time_t tv_sec;
102     __suseconds_t tv_usec;
103   };
104 typedef __suseconds_t suseconds_t;
105 typedef long int __fd_mask;
106 typedef struct
107   {
108     __fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))];
109   } fd_set;
110 typedef __fd_mask fd_mask;
111 extern int select (int __nfds, fd_set *__restrict __readfds,
112      fd_set *__restrict __writefds,
113      fd_set *__restrict __exceptfds,
114      struct timeval *__restrict __timeout);
115 __extension__
116 extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
117      __attribute__ ((__nothrow__));
118 __extension__
119 extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
120      __attribute__ ((__nothrow__));
121 __extension__
122 extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
123        unsigned int __minor)
124      __attribute__ ((__nothrow__));
125 __extension__ extern __inline unsigned int
gnu_dev_major(unsigned long long int __dev)126 __attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev)
127 {
128   return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
129 }
130 __extension__ extern __inline unsigned int
gnu_dev_minor(unsigned long long int __dev)131 __attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev)
132 {
133   return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
134 }
135 __extension__ extern __inline unsigned long long int
gnu_dev_makedev(unsigned int __major,unsigned int __minor)136 __attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor)
137 {
138   return ((__minor & 0xff) | ((__major & 0xfff) << 8)
139    | (((unsigned long long int) (__minor & ~0xff)) << 12)
140    | (((unsigned long long int) (__major & ~0xfff)) << 32));
141 }
142 typedef __blkcnt_t blkcnt_t;
143 typedef __fsblkcnt_t fsblkcnt_t;
144 typedef __fsfilcnt_t fsfilcnt_t;
145 struct __sched_param
146   {
147     int __sched_priority;
148   };
149 typedef int __atomic_lock_t;
150 struct _pthread_fastlock
151 {
152   long int __status;
153   __atomic_lock_t __spinlock;
154 };
155 typedef struct _pthread_descr_struct *_pthread_descr;
156 typedef struct __pthread_attr_s
157 {
158   int __detachstate;
159   int __schedpolicy;
160   struct __sched_param __schedparam;
161   int __inheritsched;
162   int __scope;
163   size_t __guardsize;
164   int __stackaddr_set;
165   void *__stackaddr;
166   size_t __stacksize;
167 } pthread_attr_t;
168 __extension__ typedef long long __pthread_cond_align_t;
169 typedef struct
170 {
171   struct _pthread_fastlock __c_lock;
172   _pthread_descr __c_waiting;
173   char __padding[48 - sizeof (struct _pthread_fastlock)
174    - sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)];
175   __pthread_cond_align_t __align;
176 } pthread_cond_t;
177 typedef struct
178 {
179   int __dummy;
180 } pthread_condattr_t;
181 typedef unsigned int pthread_key_t;
182 typedef struct
183 {
184   int __m_reserved;
185   int __m_count;
186   _pthread_descr __m_owner;
187   int __m_kind;
188   struct _pthread_fastlock __m_lock;
189 } pthread_mutex_t;
190 typedef struct
191 {
192   int __mutexkind;
193 } pthread_mutexattr_t;
194 typedef int pthread_once_t;
195 typedef unsigned long int pthread_t;
196 typedef struct {
197  unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))];
198 } __kernel_fd_set;
199 typedef void (*__kernel_sighandler_t)(int);
200 typedef int __kernel_key_t;
201 typedef int __kernel_mqd_t;
202 typedef unsigned long __kernel_ino_t;
203 typedef unsigned short __kernel_mode_t;
204 typedef unsigned short __kernel_nlink_t;
205 typedef long __kernel_off_t;
206 typedef int __kernel_pid_t;
207 typedef unsigned short __kernel_ipc_pid_t;
208 typedef unsigned short __kernel_uid_t;
209 typedef unsigned short __kernel_gid_t;
210 typedef unsigned int __kernel_size_t;
211 typedef int __kernel_ssize_t;
212 typedef int __kernel_ptrdiff_t;
213 typedef long __kernel_time_t;
214 typedef long __kernel_suseconds_t;
215 typedef long __kernel_clock_t;
216 typedef int __kernel_timer_t;
217 typedef int __kernel_clockid_t;
218 typedef int __kernel_daddr_t;
219 typedef char * __kernel_caddr_t;
220 typedef unsigned short __kernel_uid16_t;
221 typedef unsigned short __kernel_gid16_t;
222 typedef unsigned int __kernel_uid32_t;
223 typedef unsigned int __kernel_gid32_t;
224 typedef unsigned short __kernel_old_uid_t;
225 typedef unsigned short __kernel_old_gid_t;
226 typedef unsigned short __kernel_old_dev_t;
227 typedef long long __kernel_loff_t;
228 typedef struct {
229  int __val[2];
230 } __kernel_fsid_t;
231 typedef unsigned short umode_t;
232 typedef __signed__ char __s8;
233 typedef unsigned char __u8;
234 typedef __signed__ short __s16;
235 typedef unsigned short __u16;
236 typedef __signed__ int __s32;
237 typedef unsigned int __u32;
238 typedef __signed__ long long __s64;
239 typedef unsigned long long __u64;
240 typedef __u16 __le16;
241 typedef __u16 __be16;
242 typedef __u32 __le32;
243 typedef __u32 __be32;
244 typedef __u64 __le64;
245 typedef __u64 __be64;
246 struct timezone
247   {
248     int tz_minuteswest;
249     int tz_dsttime;
250   };
251 typedef struct timezone *__restrict __timezone_ptr_t;
252 extern int gettimeofday (struct timeval *__restrict __tv,
253     __timezone_ptr_t __tz) __attribute__ ((__nothrow__));
254 extern int settimeofday (__const struct timeval *__tv,
255     __const struct timezone *__tz) __attribute__ ((__nothrow__));
256 extern int adjtime (__const struct timeval *__delta,
257       struct timeval *__olddelta) __attribute__ ((__nothrow__));
258 enum __itimer_which
259   {
260     ITIMER_REAL = 0,
261     ITIMER_VIRTUAL = 1,
262     ITIMER_PROF = 2
263   };
264 struct itimerval
265   {
266     struct timeval it_interval;
267     struct timeval it_value;
268   };
269 typedef int __itimer_which_t;
270 extern int getitimer (__itimer_which_t __which,
271         struct itimerval *__value) __attribute__ ((__nothrow__));
272 extern int setitimer (__itimer_which_t __which,
273         __const struct itimerval *__restrict __new,
274         struct itimerval *__restrict __old) __attribute__ ((__nothrow__));
275 extern int utimes (__const char *__file, __const struct timeval __tvp[2])
276      __attribute__ ((__nothrow__));
277 extern int lutimes (__const char *__file, __const struct timeval __tvp[2])
278      __attribute__ ((__nothrow__));
279 extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__));
280 typedef enum {
281      DIKT_UNICODE = 0x0000,
282      DIKT_SPECIAL = 0xF000,
283      DIKT_FUNCTION = 0xF100,
284      DIKT_MODIFIER = 0xF200,
285      DIKT_LOCK = 0xF300,
286      DIKT_DEAD = 0xF400,
287      DIKT_CUSTOM = 0xF500,
288      DIKT_IDENTIFIER = 0xF600
289 } DFBInputDeviceKeyType;
290 typedef enum {
291      DIMKI_SHIFT,
292      DIMKI_CONTROL,
293      DIMKI_ALT,
294      DIMKI_ALTGR,
295      DIMKI_META,
296      DIMKI_SUPER,
297      DIMKI_HYPER,
298      DIMKI_FIRST = DIMKI_SHIFT,
299      DIMKI_LAST = DIMKI_HYPER
300 } DFBInputDeviceModifierKeyIdentifier;
301 typedef enum {
302      DIKI_UNKNOWN = ((DIKT_IDENTIFIER) | (0)),
303      DIKI_A,
304      DIKI_B,
305      DIKI_C,
306      DIKI_D,
307      DIKI_E,
308      DIKI_F,
309      DIKI_G,
310      DIKI_H,
311      DIKI_I,
312      DIKI_J,
313      DIKI_K,
314      DIKI_L,
315      DIKI_M,
316      DIKI_N,
317      DIKI_O,
318      DIKI_P,
319      DIKI_Q,
320      DIKI_R,
321      DIKI_S,
322      DIKI_T,
323      DIKI_U,
324      DIKI_V,
325      DIKI_W,
326      DIKI_X,
327      DIKI_Y,
328      DIKI_Z,
329      DIKI_0,
330      DIKI_1,
331      DIKI_2,
332      DIKI_3,
333      DIKI_4,
334      DIKI_5,
335      DIKI_6,
336      DIKI_7,
337      DIKI_8,
338      DIKI_9,
339      DIKI_F1,
340      DIKI_F2,
341      DIKI_F3,
342      DIKI_F4,
343      DIKI_F5,
344      DIKI_F6,
345      DIKI_F7,
346      DIKI_F8,
347      DIKI_F9,
348      DIKI_F10,
349      DIKI_F11,
350      DIKI_F12,
351      DIKI_SHIFT_L,
352      DIKI_SHIFT_R,
353      DIKI_CONTROL_L,
354      DIKI_CONTROL_R,
355      DIKI_ALT_L,
356      DIKI_ALT_R,
357      DIKI_ALTGR,
358      DIKI_META_L,
359      DIKI_META_R,
360      DIKI_SUPER_L,
361      DIKI_SUPER_R,
362      DIKI_HYPER_L,
363      DIKI_HYPER_R,
364      DIKI_CAPS_LOCK,
365      DIKI_NUM_LOCK,
366      DIKI_SCROLL_LOCK,
367      DIKI_ESCAPE,
368      DIKI_LEFT,
369      DIKI_RIGHT,
370      DIKI_UP,
371      DIKI_DOWN,
372      DIKI_TAB,
373      DIKI_ENTER,
374      DIKI_SPACE,
375      DIKI_BACKSPACE,
376      DIKI_INSERT,
377      DIKI_DELETE,
378      DIKI_HOME,
379      DIKI_END,
380      DIKI_PAGE_UP,
381      DIKI_PAGE_DOWN,
382      DIKI_PRINT,
383      DIKI_PAUSE,
384      DIKI_QUOTE_LEFT,
385      DIKI_MINUS_SIGN,
386      DIKI_EQUALS_SIGN,
387      DIKI_BRACKET_LEFT,
388      DIKI_BRACKET_RIGHT,
389      DIKI_BACKSLASH,
390      DIKI_SEMICOLON,
391      DIKI_QUOTE_RIGHT,
392      DIKI_COMMA,
393      DIKI_PERIOD,
394      DIKI_SLASH,
395      DIKI_LESS_SIGN,
396      DIKI_KP_DIV,
397      DIKI_KP_MULT,
398      DIKI_KP_MINUS,
399      DIKI_KP_PLUS,
400      DIKI_KP_ENTER,
401      DIKI_KP_SPACE,
402      DIKI_KP_TAB,
403      DIKI_KP_F1,
404      DIKI_KP_F2,
405      DIKI_KP_F3,
406      DIKI_KP_F4,
407      DIKI_KP_EQUAL,
408      DIKI_KP_SEPARATOR,
409      DIKI_KP_DECIMAL,
410      DIKI_KP_0,
411      DIKI_KP_1,
412      DIKI_KP_2,
413      DIKI_KP_3,
414      DIKI_KP_4,
415      DIKI_KP_5,
416      DIKI_KP_6,
417      DIKI_KP_7,
418      DIKI_KP_8,
419      DIKI_KP_9,
420      DIKI_KEYDEF_END,
421      DIKI_NUMBER_OF_KEYS = DIKI_KEYDEF_END - ((DIKT_IDENTIFIER) | (0))
422 } DFBInputDeviceKeyIdentifier;
423 typedef enum {
424      DIKS_NULL = ((DIKT_UNICODE) | (0x00)),
425      DIKS_BACKSPACE = ((DIKT_UNICODE) | (0x08)),
426      DIKS_TAB = ((DIKT_UNICODE) | (0x09)),
427      DIKS_RETURN = ((DIKT_UNICODE) | (0x0D)),
428      DIKS_CANCEL = ((DIKT_UNICODE) | (0x18)),
429      DIKS_ESCAPE = ((DIKT_UNICODE) | (0x1B)),
430      DIKS_SPACE = ((DIKT_UNICODE) | (0x20)),
431      DIKS_EXCLAMATION_MARK = ((DIKT_UNICODE) | (0x21)),
432      DIKS_QUOTATION = ((DIKT_UNICODE) | (0x22)),
433      DIKS_NUMBER_SIGN = ((DIKT_UNICODE) | (0x23)),
434      DIKS_DOLLAR_SIGN = ((DIKT_UNICODE) | (0x24)),
435      DIKS_PERCENT_SIGN = ((DIKT_UNICODE) | (0x25)),
436      DIKS_AMPERSAND = ((DIKT_UNICODE) | (0x26)),
437      DIKS_APOSTROPHE = ((DIKT_UNICODE) | (0x27)),
438      DIKS_PARENTHESIS_LEFT = ((DIKT_UNICODE) | (0x28)),
439      DIKS_PARENTHESIS_RIGHT = ((DIKT_UNICODE) | (0x29)),
440      DIKS_ASTERISK = ((DIKT_UNICODE) | (0x2A)),
441      DIKS_PLUS_SIGN = ((DIKT_UNICODE) | (0x2B)),
442      DIKS_COMMA = ((DIKT_UNICODE) | (0x2C)),
443      DIKS_MINUS_SIGN = ((DIKT_UNICODE) | (0x2D)),
444      DIKS_PERIOD = ((DIKT_UNICODE) | (0x2E)),
445      DIKS_SLASH = ((DIKT_UNICODE) | (0x2F)),
446      DIKS_0 = ((DIKT_UNICODE) | (0x30)),
447      DIKS_1 = ((DIKT_UNICODE) | (0x31)),
448      DIKS_2 = ((DIKT_UNICODE) | (0x32)),
449      DIKS_3 = ((DIKT_UNICODE) | (0x33)),
450      DIKS_4 = ((DIKT_UNICODE) | (0x34)),
451      DIKS_5 = ((DIKT_UNICODE) | (0x35)),
452      DIKS_6 = ((DIKT_UNICODE) | (0x36)),
453      DIKS_7 = ((DIKT_UNICODE) | (0x37)),
454      DIKS_8 = ((DIKT_UNICODE) | (0x38)),
455      DIKS_9 = ((DIKT_UNICODE) | (0x39)),
456      DIKS_COLON = ((DIKT_UNICODE) | (0x3A)),
457      DIKS_SEMICOLON = ((DIKT_UNICODE) | (0x3B)),
458      DIKS_LESS_THAN_SIGN = ((DIKT_UNICODE) | (0x3C)),
459      DIKS_EQUALS_SIGN = ((DIKT_UNICODE) | (0x3D)),
460      DIKS_GREATER_THAN_SIGN = ((DIKT_UNICODE) | (0x3E)),
461      DIKS_QUESTION_MARK = ((DIKT_UNICODE) | (0x3F)),
462      DIKS_AT = ((DIKT_UNICODE) | (0x40)),
463      DIKS_CAPITAL_A = ((DIKT_UNICODE) | (0x41)),
464      DIKS_CAPITAL_B = ((DIKT_UNICODE) | (0x42)),
465      DIKS_CAPITAL_C = ((DIKT_UNICODE) | (0x43)),
466      DIKS_CAPITAL_D = ((DIKT_UNICODE) | (0x44)),
467      DIKS_CAPITAL_E = ((DIKT_UNICODE) | (0x45)),
468      DIKS_CAPITAL_F = ((DIKT_UNICODE) | (0x46)),
469      DIKS_CAPITAL_G = ((DIKT_UNICODE) | (0x47)),
470      DIKS_CAPITAL_H = ((DIKT_UNICODE) | (0x48)),
471      DIKS_CAPITAL_I = ((DIKT_UNICODE) | (0x49)),
472      DIKS_CAPITAL_J = ((DIKT_UNICODE) | (0x4A)),
473      DIKS_CAPITAL_K = ((DIKT_UNICODE) | (0x4B)),
474      DIKS_CAPITAL_L = ((DIKT_UNICODE) | (0x4C)),
475      DIKS_CAPITAL_M = ((DIKT_UNICODE) | (0x4D)),
476      DIKS_CAPITAL_N = ((DIKT_UNICODE) | (0x4E)),
477      DIKS_CAPITAL_O = ((DIKT_UNICODE) | (0x4F)),
478      DIKS_CAPITAL_P = ((DIKT_UNICODE) | (0x50)),
479      DIKS_CAPITAL_Q = ((DIKT_UNICODE) | (0x51)),
480      DIKS_CAPITAL_R = ((DIKT_UNICODE) | (0x52)),
481      DIKS_CAPITAL_S = ((DIKT_UNICODE) | (0x53)),
482      DIKS_CAPITAL_T = ((DIKT_UNICODE) | (0x54)),
483      DIKS_CAPITAL_U = ((DIKT_UNICODE) | (0x55)),
484      DIKS_CAPITAL_V = ((DIKT_UNICODE) | (0x56)),
485      DIKS_CAPITAL_W = ((DIKT_UNICODE) | (0x57)),
486      DIKS_CAPITAL_X = ((DIKT_UNICODE) | (0x58)),
487      DIKS_CAPITAL_Y = ((DIKT_UNICODE) | (0x59)),
488      DIKS_CAPITAL_Z = ((DIKT_UNICODE) | (0x5A)),
489      DIKS_SQUARE_BRACKET_LEFT = ((DIKT_UNICODE) | (0x5B)),
490      DIKS_BACKSLASH = ((DIKT_UNICODE) | (0x5C)),
491      DIKS_SQUARE_BRACKET_RIGHT = ((DIKT_UNICODE) | (0x5D)),
492      DIKS_CIRCUMFLEX_ACCENT = ((DIKT_UNICODE) | (0x5E)),
493      DIKS_UNDERSCORE = ((DIKT_UNICODE) | (0x5F)),
494      DIKS_GRAVE_ACCENT = ((DIKT_UNICODE) | (0x60)),
495      DIKS_SMALL_A = ((DIKT_UNICODE) | (0x61)),
496      DIKS_SMALL_B = ((DIKT_UNICODE) | (0x62)),
497      DIKS_SMALL_C = ((DIKT_UNICODE) | (0x63)),
498      DIKS_SMALL_D = ((DIKT_UNICODE) | (0x64)),
499      DIKS_SMALL_E = ((DIKT_UNICODE) | (0x65)),
500      DIKS_SMALL_F = ((DIKT_UNICODE) | (0x66)),
501      DIKS_SMALL_G = ((DIKT_UNICODE) | (0x67)),
502      DIKS_SMALL_H = ((DIKT_UNICODE) | (0x68)),
503      DIKS_SMALL_I = ((DIKT_UNICODE) | (0x69)),
504      DIKS_SMALL_J = ((DIKT_UNICODE) | (0x6A)),
505      DIKS_SMALL_K = ((DIKT_UNICODE) | (0x6B)),
506      DIKS_SMALL_L = ((DIKT_UNICODE) | (0x6C)),
507      DIKS_SMALL_M = ((DIKT_UNICODE) | (0x6D)),
508      DIKS_SMALL_N = ((DIKT_UNICODE) | (0x6E)),
509      DIKS_SMALL_O = ((DIKT_UNICODE) | (0x6F)),
510      DIKS_SMALL_P = ((DIKT_UNICODE) | (0x70)),
511      DIKS_SMALL_Q = ((DIKT_UNICODE) | (0x71)),
512      DIKS_SMALL_R = ((DIKT_UNICODE) | (0x72)),
513      DIKS_SMALL_S = ((DIKT_UNICODE) | (0x73)),
514      DIKS_SMALL_T = ((DIKT_UNICODE) | (0x74)),
515      DIKS_SMALL_U = ((DIKT_UNICODE) | (0x75)),
516      DIKS_SMALL_V = ((DIKT_UNICODE) | (0x76)),
517      DIKS_SMALL_W = ((DIKT_UNICODE) | (0x77)),
518      DIKS_SMALL_X = ((DIKT_UNICODE) | (0x78)),
519      DIKS_SMALL_Y = ((DIKT_UNICODE) | (0x79)),
520      DIKS_SMALL_Z = ((DIKT_UNICODE) | (0x7A)),
521      DIKS_CURLY_BRACKET_LEFT = ((DIKT_UNICODE) | (0x7B)),
522      DIKS_VERTICAL_BAR = ((DIKT_UNICODE) | (0x7C)),
523      DIKS_CURLY_BRACKET_RIGHT = ((DIKT_UNICODE) | (0x7D)),
524      DIKS_TILDE = ((DIKT_UNICODE) | (0x7E)),
525      DIKS_DELETE = ((DIKT_UNICODE) | (0x7F)),
526      DIKS_ENTER = DIKS_RETURN,
527      DIKS_CURSOR_LEFT = ((DIKT_SPECIAL) | (0x00)),
528      DIKS_CURSOR_RIGHT = ((DIKT_SPECIAL) | (0x01)),
529      DIKS_CURSOR_UP = ((DIKT_SPECIAL) | (0x02)),
530      DIKS_CURSOR_DOWN = ((DIKT_SPECIAL) | (0x03)),
531      DIKS_INSERT = ((DIKT_SPECIAL) | (0x04)),
532      DIKS_HOME = ((DIKT_SPECIAL) | (0x05)),
533      DIKS_END = ((DIKT_SPECIAL) | (0x06)),
534      DIKS_PAGE_UP = ((DIKT_SPECIAL) | (0x07)),
535      DIKS_PAGE_DOWN = ((DIKT_SPECIAL) | (0x08)),
536      DIKS_PRINT = ((DIKT_SPECIAL) | (0x09)),
537      DIKS_PAUSE = ((DIKT_SPECIAL) | (0x0A)),
538      DIKS_OK = ((DIKT_SPECIAL) | (0x0B)),
539      DIKS_SELECT = ((DIKT_SPECIAL) | (0x0C)),
540      DIKS_GOTO = ((DIKT_SPECIAL) | (0x0D)),
541      DIKS_CLEAR = ((DIKT_SPECIAL) | (0x0E)),
542      DIKS_POWER = ((DIKT_SPECIAL) | (0x0F)),
543      DIKS_POWER2 = ((DIKT_SPECIAL) | (0x10)),
544      DIKS_OPTION = ((DIKT_SPECIAL) | (0x11)),
545      DIKS_MENU = ((DIKT_SPECIAL) | (0x12)),
546      DIKS_HELP = ((DIKT_SPECIAL) | (0x13)),
547      DIKS_INFO = ((DIKT_SPECIAL) | (0x14)),
548      DIKS_TIME = ((DIKT_SPECIAL) | (0x15)),
549      DIKS_VENDOR = ((DIKT_SPECIAL) | (0x16)),
550      DIKS_ARCHIVE = ((DIKT_SPECIAL) | (0x17)),
551      DIKS_PROGRAM = ((DIKT_SPECIAL) | (0x18)),
552      DIKS_CHANNEL = ((DIKT_SPECIAL) | (0x19)),
553      DIKS_FAVORITES = ((DIKT_SPECIAL) | (0x1A)),
554      DIKS_EPG = ((DIKT_SPECIAL) | (0x1B)),
555      DIKS_PVR = ((DIKT_SPECIAL) | (0x1C)),
556      DIKS_MHP = ((DIKT_SPECIAL) | (0x1D)),
557      DIKS_LANGUAGE = ((DIKT_SPECIAL) | (0x1E)),
558      DIKS_TITLE = ((DIKT_SPECIAL) | (0x1F)),
559      DIKS_SUBTITLE = ((DIKT_SPECIAL) | (0x20)),
560      DIKS_ANGLE = ((DIKT_SPECIAL) | (0x21)),
561      DIKS_ZOOM = ((DIKT_SPECIAL) | (0x22)),
562      DIKS_MODE = ((DIKT_SPECIAL) | (0x23)),
563      DIKS_KEYBOARD = ((DIKT_SPECIAL) | (0x24)),
564      DIKS_PC = ((DIKT_SPECIAL) | (0x25)),
565      DIKS_SCREEN = ((DIKT_SPECIAL) | (0x26)),
566      DIKS_TV = ((DIKT_SPECIAL) | (0x27)),
567      DIKS_TV2 = ((DIKT_SPECIAL) | (0x28)),
568      DIKS_VCR = ((DIKT_SPECIAL) | (0x29)),
569      DIKS_VCR2 = ((DIKT_SPECIAL) | (0x2A)),
570      DIKS_SAT = ((DIKT_SPECIAL) | (0x2B)),
571      DIKS_SAT2 = ((DIKT_SPECIAL) | (0x2C)),
572      DIKS_CD = ((DIKT_SPECIAL) | (0x2D)),
573      DIKS_TAPE = ((DIKT_SPECIAL) | (0x2E)),
574      DIKS_RADIO = ((DIKT_SPECIAL) | (0x2F)),
575      DIKS_TUNER = ((DIKT_SPECIAL) | (0x30)),
576      DIKS_PLAYER = ((DIKT_SPECIAL) | (0x31)),
577      DIKS_TEXT = ((DIKT_SPECIAL) | (0x32)),
578      DIKS_DVD = ((DIKT_SPECIAL) | (0x33)),
579      DIKS_AUX = ((DIKT_SPECIAL) | (0x34)),
580      DIKS_MP3 = ((DIKT_SPECIAL) | (0x35)),
581      DIKS_PHONE = ((DIKT_SPECIAL) | (0x36)),
582      DIKS_AUDIO = ((DIKT_SPECIAL) | (0x37)),
583      DIKS_VIDEO = ((DIKT_SPECIAL) | (0x38)),
584      DIKS_INTERNET = ((DIKT_SPECIAL) | (0x39)),
585      DIKS_MAIL = ((DIKT_SPECIAL) | (0x3A)),
586      DIKS_NEWS = ((DIKT_SPECIAL) | (0x3B)),
587      DIKS_DIRECTORY = ((DIKT_SPECIAL) | (0x3C)),
588      DIKS_LIST = ((DIKT_SPECIAL) | (0x3D)),
589      DIKS_CALCULATOR = ((DIKT_SPECIAL) | (0x3E)),
590      DIKS_MEMO = ((DIKT_SPECIAL) | (0x3F)),
591      DIKS_CALENDAR = ((DIKT_SPECIAL) | (0x40)),
592      DIKS_EDITOR = ((DIKT_SPECIAL) | (0x41)),
593      DIKS_RED = ((DIKT_SPECIAL) | (0x42)),
594      DIKS_GREEN = ((DIKT_SPECIAL) | (0x43)),
595      DIKS_YELLOW = ((DIKT_SPECIAL) | (0x44)),
596      DIKS_BLUE = ((DIKT_SPECIAL) | (0x45)),
597      DIKS_CHANNEL_UP = ((DIKT_SPECIAL) | (0x46)),
598      DIKS_CHANNEL_DOWN = ((DIKT_SPECIAL) | (0x47)),
599      DIKS_BACK = ((DIKT_SPECIAL) | (0x48)),
600      DIKS_FORWARD = ((DIKT_SPECIAL) | (0x49)),
601      DIKS_FIRST = ((DIKT_SPECIAL) | (0x4A)),
602      DIKS_LAST = ((DIKT_SPECIAL) | (0x4B)),
603      DIKS_VOLUME_UP = ((DIKT_SPECIAL) | (0x4C)),
604      DIKS_VOLUME_DOWN = ((DIKT_SPECIAL) | (0x4D)),
605      DIKS_MUTE = ((DIKT_SPECIAL) | (0x4E)),
606      DIKS_AB = ((DIKT_SPECIAL) | (0x4F)),
607      DIKS_PLAYPAUSE = ((DIKT_SPECIAL) | (0x50)),
608      DIKS_PLAY = ((DIKT_SPECIAL) | (0x51)),
609      DIKS_STOP = ((DIKT_SPECIAL) | (0x52)),
610      DIKS_RESTART = ((DIKT_SPECIAL) | (0x53)),
611      DIKS_SLOW = ((DIKT_SPECIAL) | (0x54)),
612      DIKS_FAST = ((DIKT_SPECIAL) | (0x55)),
613      DIKS_RECORD = ((DIKT_SPECIAL) | (0x56)),
614      DIKS_EJECT = ((DIKT_SPECIAL) | (0x57)),
615      DIKS_SHUFFLE = ((DIKT_SPECIAL) | (0x58)),
616      DIKS_REWIND = ((DIKT_SPECIAL) | (0x59)),
617      DIKS_FASTFORWARD = ((DIKT_SPECIAL) | (0x5A)),
618      DIKS_PREVIOUS = ((DIKT_SPECIAL) | (0x5B)),
619      DIKS_NEXT = ((DIKT_SPECIAL) | (0x5C)),
620      DIKS_BEGIN = ((DIKT_SPECIAL) | (0x5D)),
621      DIKS_DIGITS = ((DIKT_SPECIAL) | (0x5E)),
622      DIKS_TEEN = ((DIKT_SPECIAL) | (0x5F)),
623      DIKS_TWEN = ((DIKT_SPECIAL) | (0x60)),
624      DIKS_BREAK = ((DIKT_SPECIAL) | (0x61)),
625      DIKS_EXIT = ((DIKT_SPECIAL) | (0x62)),
626      DIKS_SETUP = ((DIKT_SPECIAL) | (0x63)),
627      DIKS_CURSOR_LEFT_UP = ((DIKT_SPECIAL) | (0x64)),
628      DIKS_CURSOR_LEFT_DOWN = ((DIKT_SPECIAL) | (0x65)),
629      DIKS_CURSOR_UP_RIGHT = ((DIKT_SPECIAL) | (0x66)),
630      DIKS_CURSOR_DOWN_RIGHT = ((DIKT_SPECIAL) | (0x67)),
631      DIKS_F1 = (((DIKT_FUNCTION) | (1))),
632      DIKS_F2 = (((DIKT_FUNCTION) | (2))),
633      DIKS_F3 = (((DIKT_FUNCTION) | (3))),
634      DIKS_F4 = (((DIKT_FUNCTION) | (4))),
635      DIKS_F5 = (((DIKT_FUNCTION) | (5))),
636      DIKS_F6 = (((DIKT_FUNCTION) | (6))),
637      DIKS_F7 = (((DIKT_FUNCTION) | (7))),
638      DIKS_F8 = (((DIKT_FUNCTION) | (8))),
639      DIKS_F9 = (((DIKT_FUNCTION) | (9))),
640      DIKS_F10 = (((DIKT_FUNCTION) | (10))),
641      DIKS_F11 = (((DIKT_FUNCTION) | (11))),
642      DIKS_F12 = (((DIKT_FUNCTION) | (12))),
643      DIKS_SHIFT = (((DIKT_MODIFIER) | ((1 << DIMKI_SHIFT)))),
644      DIKS_CONTROL = (((DIKT_MODIFIER) | ((1 << DIMKI_CONTROL)))),
645      DIKS_ALT = (((DIKT_MODIFIER) | ((1 << DIMKI_ALT)))),
646      DIKS_ALTGR = (((DIKT_MODIFIER) | ((1 << DIMKI_ALTGR)))),
647      DIKS_META = (((DIKT_MODIFIER) | ((1 << DIMKI_META)))),
648      DIKS_SUPER = (((DIKT_MODIFIER) | ((1 << DIMKI_SUPER)))),
649      DIKS_HYPER = (((DIKT_MODIFIER) | ((1 << DIMKI_HYPER)))),
650      DIKS_CAPS_LOCK = ((DIKT_LOCK) | (0x00)),
651      DIKS_NUM_LOCK = ((DIKT_LOCK) | (0x01)),
652      DIKS_SCROLL_LOCK = ((DIKT_LOCK) | (0x02)),
653      DIKS_DEAD_ABOVEDOT = ((DIKT_DEAD) | (0x00)),
654      DIKS_DEAD_ABOVERING = ((DIKT_DEAD) | (0x01)),
655      DIKS_DEAD_ACUTE = ((DIKT_DEAD) | (0x02)),
656      DIKS_DEAD_BREVE = ((DIKT_DEAD) | (0x03)),
657      DIKS_DEAD_CARON = ((DIKT_DEAD) | (0x04)),
658      DIKS_DEAD_CEDILLA = ((DIKT_DEAD) | (0x05)),
659      DIKS_DEAD_CIRCUMFLEX = ((DIKT_DEAD) | (0x06)),
660      DIKS_DEAD_DIAERESIS = ((DIKT_DEAD) | (0x07)),
661      DIKS_DEAD_DOUBLEACUTE = ((DIKT_DEAD) | (0x08)),
662      DIKS_DEAD_GRAVE = ((DIKT_DEAD) | (0x09)),
663      DIKS_DEAD_IOTA = ((DIKT_DEAD) | (0x0A)),
664      DIKS_DEAD_MACRON = ((DIKT_DEAD) | (0x0B)),
665      DIKS_DEAD_OGONEK = ((DIKT_DEAD) | (0x0C)),
666      DIKS_DEAD_SEMIVOICED_SOUND = ((DIKT_DEAD) | (0x0D)),
667      DIKS_DEAD_TILDE = ((DIKT_DEAD) | (0x0E)),
668      DIKS_DEAD_VOICED_SOUND = ((DIKT_DEAD) | (0x0F)),
669      DIKS_CUSTOM0 = (((DIKT_CUSTOM) | (0))),
670      DIKS_CUSTOM1 = (((DIKT_CUSTOM) | (1))),
671      DIKS_CUSTOM2 = (((DIKT_CUSTOM) | (2))),
672      DIKS_CUSTOM3 = (((DIKT_CUSTOM) | (3))),
673      DIKS_CUSTOM4 = (((DIKT_CUSTOM) | (4))),
674      DIKS_CUSTOM5 = (((DIKT_CUSTOM) | (5))),
675      DIKS_CUSTOM6 = (((DIKT_CUSTOM) | (6))),
676      DIKS_CUSTOM7 = (((DIKT_CUSTOM) | (7))),
677      DIKS_CUSTOM8 = (((DIKT_CUSTOM) | (8))),
678      DIKS_CUSTOM9 = (((DIKT_CUSTOM) | (9)))
679 } DFBInputDeviceKeySymbol;
680 typedef enum {
681      DILS_SCROLL = 0x00000001,
682      DILS_NUM = 0x00000002,
683      DILS_CAPS = 0x00000004
684 } DFBInputDeviceLockState;
685 typedef enum {
686      DIKSI_BASE = 0x00,
687      DIKSI_BASE_SHIFT = 0x01,
688      DIKSI_ALT = 0x02,
689      DIKSI_ALT_SHIFT = 0x03,
690      DIKSI_LAST = DIKSI_ALT_SHIFT
691 } DFBInputDeviceKeymapSymbolIndex;
692 typedef struct {
693      int code;
694      DFBInputDeviceLockState locks;
695      DFBInputDeviceKeyIdentifier identifier;
696      DFBInputDeviceKeySymbol symbols[DIKSI_LAST+1];
697 } DFBInputDeviceKeymapEntry;
698 extern const unsigned int directfb_major_version;
699 extern const unsigned int directfb_minor_version;
700 extern const unsigned int directfb_micro_version;
701 extern const unsigned int directfb_binary_age;
702 extern const unsigned int directfb_interface_age;
703 const char * DirectFBCheckVersion( unsigned int required_major,
704                                    unsigned int required_minor,
705                                    unsigned int required_micro );
706 typedef struct _IDirectFB IDirectFB;
707 typedef struct _IDirectFBScreen IDirectFBScreen;
708 typedef struct _IDirectFBDisplayLayer IDirectFBDisplayLayer;
709 typedef struct _IDirectFBSurface IDirectFBSurface;
710 typedef struct _IDirectFBPalette IDirectFBPalette;
711 typedef struct _IDirectFBWindow IDirectFBWindow;
712 typedef struct _IDirectFBInputDevice IDirectFBInputDevice;
713 typedef struct _IDirectFBEventBuffer IDirectFBEventBuffer;
714 typedef struct _IDirectFBFont IDirectFBFont;
715 typedef struct _IDirectFBImageProvider IDirectFBImageProvider;
716 typedef struct _IDirectFBVideoProvider IDirectFBVideoProvider;
717 typedef struct _IDirectFBDataBuffer IDirectFBDataBuffer;
718 typedef struct _IDirectFBGL IDirectFBGL;
719 typedef enum {
720      DFB_OK,
721      DFB_FAILURE,
722      DFB_INIT,
723      DFB_BUG,
724      DFB_DEAD,
725      DFB_UNSUPPORTED,
726      DFB_UNIMPLEMENTED,
727      DFB_ACCESSDENIED,
728      DFB_INVARG,
729      DFB_NOSYSTEMMEMORY,
730      DFB_NOVIDEOMEMORY,
731      DFB_LOCKED,
732      DFB_BUFFEREMPTY,
733      DFB_FILENOTFOUND,
734      DFB_IO,
735      DFB_BUSY,
736      DFB_NOIMPL,
737      DFB_MISSINGFONT,
738      DFB_TIMEOUT,
739      DFB_MISSINGIMAGE,
740      DFB_THIZNULL,
741      DFB_IDNOTFOUND,
742      DFB_INVAREA,
743      DFB_DESTROYED,
744      DFB_FUSION,
745      DFB_BUFFERTOOLARGE,
746      DFB_INTERRUPTED,
747      DFB_NOCONTEXT,
748      DFB_TEMPUNAVAIL,
749      DFB_LIMITEXCEEDED,
750      DFB_NOSUCHMETHOD,
751      DFB_NOSUCHINSTANCE,
752      DFB_ITEMNOTFOUND,
753      DFB_VERSIONMISMATCH,
754      DFB_NOSHAREDMEMORY
755 } DFBResult;
756 typedef enum {
757      DFB_FALSE = 0,
758      DFB_TRUE = !DFB_FALSE
759 } DFBBoolean;
760 typedef struct {
761      int x;
762      int y;
763 } DFBPoint;
764 typedef struct {
765      int x;
766      int w;
767 } DFBSpan;
768 typedef struct {
769      int w;
770      int h;
771 } DFBDimension;
772 typedef struct {
773      int x;
774      int y;
775      int w;
776      int h;
777 } DFBRectangle;
778 typedef struct {
779      float x;
780      float y;
781      float w;
782      float h;
783 } DFBLocation;
784 typedef struct {
785      int x1;
786      int y1;
787      int x2;
788      int y2;
789 } DFBRegion;
790 typedef struct {
791      int l;
792      int t;
793      int r;
794      int b;
795 } DFBInsets;
796 typedef struct {
797      int x1;
798      int y1;
799      int x2;
800      int y2;
801      int x3;
802      int y3;
803 } DFBTriangle;
804 typedef struct {
805      __u8 a;
806      __u8 r;
807      __u8 g;
808      __u8 b;
809 } DFBColor;
810 DFBResult DirectFBError(
811                              const char *msg,
812                              DFBResult result
813                        );
814 DFBResult DirectFBErrorFatal(
815                              const char *msg,
816                              DFBResult result
817                             );
818 const char *DirectFBErrorString(
819                          DFBResult result
820                       );
821 const char *DirectFBUsageString( void );
822 DFBResult DirectFBInit(
823                          int *argc,
824                          char **argv[]
825                       );
826 DFBResult DirectFBSetOption(
827                          const char *name,
828                          const char *value
829                       );
830 DFBResult DirectFBCreate(
831                           IDirectFB **interface
832                         );
833 typedef unsigned int DFBScreenID;
834 typedef unsigned int DFBDisplayLayerID;
835 typedef unsigned int DFBDisplayLayerSourceID;
836 typedef unsigned int DFBWindowID;
837 typedef unsigned int DFBInputDeviceID;
838 typedef __u32 DFBDisplayLayerIDs;
839 typedef enum {
840      DFSCL_NORMAL = 0x00000000,
841      DFSCL_FULLSCREEN,
842      DFSCL_EXCLUSIVE
843 } DFBCooperativeLevel;
844 typedef enum {
845      DLCAPS_NONE = 0x00000000,
846      DLCAPS_SURFACE = 0x00000001,
847      DLCAPS_OPACITY = 0x00000002,
848      DLCAPS_ALPHACHANNEL = 0x00000004,
849      DLCAPS_SCREEN_LOCATION = 0x00000008,
850      DLCAPS_FLICKER_FILTERING = 0x00000010,
851      DLCAPS_DEINTERLACING = 0x00000020,
852      DLCAPS_SRC_COLORKEY = 0x00000040,
853      DLCAPS_DST_COLORKEY = 0x00000080,
854      DLCAPS_BRIGHTNESS = 0x00000100,
855      DLCAPS_CONTRAST = 0x00000200,
856      DLCAPS_HUE = 0x00000400,
857      DLCAPS_SATURATION = 0x00000800,
858      DLCAPS_LEVELS = 0x00001000,
859      DLCAPS_FIELD_PARITY = 0x00002000,
860      DLCAPS_WINDOWS = 0x00004000,
861      DLCAPS_SOURCES = 0x00008000,
862      DLCAPS_ALPHA_RAMP = 0x00010000,
863      DLCAPS_PREMULTIPLIED = 0x00020000,
864      DLCAPS_SCREEN_POSITION = 0x00100000,
865      DLCAPS_SCREEN_SIZE = 0x00200000,
866      DLCAPS_ALL = 0x0033FFFF
867 } DFBDisplayLayerCapabilities;
868 typedef enum {
869      DSCCAPS_NONE = 0x00000000,
870      DSCCAPS_VSYNC = 0x00000001,
871      DSCCAPS_POWER_MANAGEMENT = 0x00000002,
872      DSCCAPS_MIXERS = 0x00000010,
873      DSCCAPS_ENCODERS = 0x00000020,
874      DSCCAPS_OUTPUTS = 0x00000040,
875      DSCCAPS_ALL = 0x00000073
876 } DFBScreenCapabilities;
877 typedef enum {
878      DLOP_NONE = 0x00000000,
879      DLOP_ALPHACHANNEL = 0x00000001,
880      DLOP_FLICKER_FILTERING = 0x00000002,
881      DLOP_DEINTERLACING = 0x00000004,
882      DLOP_SRC_COLORKEY = 0x00000008,
883      DLOP_DST_COLORKEY = 0x00000010,
884      DLOP_OPACITY = 0x00000020,
885      DLOP_FIELD_PARITY = 0x00000040
886 } DFBDisplayLayerOptions;
887 typedef enum {
888      DLBM_UNKNOWN = 0x00000000,
889      DLBM_FRONTONLY = 0x00000001,
890      DLBM_BACKVIDEO = 0x00000002,
891      DLBM_BACKSYSTEM = 0x00000004,
892      DLBM_TRIPLE = 0x00000008,
893      DLBM_WINDOWS = 0x00000010
894 } DFBDisplayLayerBufferMode;
895 typedef enum {
896      DSDESC_CAPS = 0x00000001,
897      DSDESC_WIDTH = 0x00000002,
898      DSDESC_HEIGHT = 0x00000004,
899      DSDESC_PIXELFORMAT = 0x00000008,
900      DSDESC_PREALLOCATED = 0x00000010,
901      DSDESC_PALETTE = 0x00000020
902 } DFBSurfaceDescriptionFlags;
903 typedef enum {
904      DPDESC_CAPS = 0x00000001,
905      DPDESC_SIZE = 0x00000002,
906      DPDESC_ENTRIES = 0x00000004
907 } DFBPaletteDescriptionFlags;
908 typedef enum {
909      DSCAPS_NONE = 0x00000000,
910      DSCAPS_PRIMARY = 0x00000001,
911      DSCAPS_SYSTEMONLY = 0x00000002,
912      DSCAPS_VIDEOONLY = 0x00000004,
913      DSCAPS_DOUBLE = 0x00000010,
914      DSCAPS_SUBSURFACE = 0x00000020,
915      DSCAPS_INTERLACED = 0x00000040,
916      DSCAPS_SEPARATED = 0x00000080,
917      DSCAPS_STATIC_ALLOC = 0x00000100,
918      DSCAPS_TRIPLE = 0x00000200,
919      DSCAPS_PREMULTIPLIED = 0x00001000,
920      DSCAPS_DEPTH = 0x00010000,
921      DSCAPS_ALL = 0x000113F7,
922      DSCAPS_FLIPPING = DSCAPS_DOUBLE | DSCAPS_TRIPLE
923 } DFBSurfaceCapabilities;
924 typedef enum {
925      DPCAPS_NONE = 0x00000000
926 } DFBPaletteCapabilities;
927 typedef enum {
928      DSDRAW_NOFX = 0x00000000,
929      DSDRAW_BLEND = 0x00000001,
930      DSDRAW_DST_COLORKEY = 0x00000002,
931      DSDRAW_SRC_PREMULTIPLY = 0x00000004,
932      DSDRAW_DST_PREMULTIPLY = 0x00000008,
933      DSDRAW_DEMULTIPLY = 0x00000010,
934      DSDRAW_XOR = 0x00000020
935 } DFBSurfaceDrawingFlags;
936 typedef enum {
937      DSBLIT_NOFX = 0x00000000,
938      DSBLIT_BLEND_ALPHACHANNEL = 0x00000001,
939      DSBLIT_BLEND_COLORALPHA = 0x00000002,
940      DSBLIT_COLORIZE = 0x00000004,
941      DSBLIT_SRC_COLORKEY = 0x00000008,
942      DSBLIT_DST_COLORKEY = 0x00000010,
943      DSBLIT_SRC_PREMULTIPLY = 0x00000020,
944      DSBLIT_DST_PREMULTIPLY = 0x00000040,
945      DSBLIT_DEMULTIPLY = 0x00000080,
946      DSBLIT_DEINTERLACE = 0x00000100
947 } DFBSurfaceBlittingFlags;
948 typedef enum {
949      DFXL_NONE = 0x00000000,
950      DFXL_FILLRECTANGLE = 0x00000001,
951      DFXL_DRAWRECTANGLE = 0x00000002,
952      DFXL_DRAWLINE = 0x00000004,
953      DFXL_FILLTRIANGLE = 0x00000008,
954      DFXL_BLIT = 0x00010000,
955      DFXL_STRETCHBLIT = 0x00020000,
956      DFXL_TEXTRIANGLES = 0x00040000,
957      DFXL_DRAWSTRING = 0x01000000,
958      DFXL_ALL = 0x0107000F
959 } DFBAccelerationMask;
960 typedef struct {
961      DFBAccelerationMask acceleration_mask;
962      DFBSurfaceDrawingFlags drawing_flags;
963      DFBSurfaceBlittingFlags blitting_flags;
964      unsigned int video_memory;
965 } DFBCardCapabilities;
966 typedef enum {
967      DLTF_NONE = 0x00000000,
968      DLTF_GRAPHICS = 0x00000001,
969      DLTF_VIDEO = 0x00000002,
970      DLTF_STILL_PICTURE = 0x00000004,
971      DLTF_BACKGROUND = 0x00000008,
972      DLTF_ALL = 0x0000000F
973 } DFBDisplayLayerTypeFlags;
974 typedef enum {
975      DIDTF_NONE = 0x00000000,
976      DIDTF_KEYBOARD = 0x00000001,
977      DIDTF_MOUSE = 0x00000002,
978      DIDTF_JOYSTICK = 0x00000004,
979      DIDTF_REMOTE = 0x00000008,
980      DIDTF_VIRTUAL = 0x00000010,
981      DIDTF_ALL = 0x0000001F
982 } DFBInputDeviceTypeFlags;
983 typedef enum {
984      DICAPS_KEYS = 0x00000001,
985      DICAPS_AXES = 0x00000002,
986      DICAPS_BUTTONS = 0x00000004,
987      DICAPS_ALL = 0x00000007
988 } DFBInputDeviceCapabilities;
989 typedef enum {
990      DIBI_LEFT = 0x00000000,
991      DIBI_RIGHT = 0x00000001,
992      DIBI_MIDDLE = 0x00000002,
993      DIBI_FIRST = DIBI_LEFT,
994      DIBI_LAST = 0x0000001F
995 } DFBInputDeviceButtonIdentifier;
996 typedef enum {
997      DIAI_X = 0x00000000,
998      DIAI_Y = 0x00000001,
999      DIAI_Z = 0x00000002,
1000      DIAI_FIRST = DIAI_X,
1001      DIAI_LAST = 0x0000001F
1002 } DFBInputDeviceAxisIdentifier;
1003 typedef enum {
1004      DWDESC_CAPS = 0x00000001,
1005      DWDESC_WIDTH = 0x00000002,
1006      DWDESC_HEIGHT = 0x00000004,
1007      DWDESC_PIXELFORMAT = 0x00000008,
1008      DWDESC_POSX = 0x00000010,
1009      DWDESC_POSY = 0x00000020,
1010      DWDESC_SURFACE_CAPS = 0x00000040
1011 } DFBWindowDescriptionFlags;
1012 typedef enum {
1013      DBDESC_FILE = 0x00000001,
1014      DBDESC_MEMORY = 0x00000002
1015 } DFBDataBufferDescriptionFlags;
1016 typedef enum {
1017      DWCAPS_NONE = 0x00000000,
1018      DWCAPS_ALPHACHANNEL = 0x00000001,
1019      DWCAPS_DOUBLEBUFFER = 0x00000002,
1020      DWCAPS_INPUTONLY = 0x00000004,
1021      DWCAPS_NODECORATION = 0x00000008,
1022      DWCAPS_ALL = 0x0000000F
1023 } DFBWindowCapabilities;
1024 typedef enum {
1025      DFFA_NONE = 0x00000000,
1026      DFFA_NOKERNING = 0x00000001,
1027      DFFA_NOHINTING = 0x00000002,
1028      DFFA_MONOCHROME = 0x00000004,
1029      DFFA_NOCHARMAP = 0x00000008
1030 } DFBFontAttributes;
1031 typedef enum {
1032      DFDESC_ATTRIBUTES = 0x00000001,
1033      DFDESC_HEIGHT = 0x00000002,
1034      DFDESC_WIDTH = 0x00000004,
1035      DFDESC_INDEX = 0x00000008,
1036      DFDESC_FIXEDADVANCE = 0x00000010
1037 } DFBFontDescriptionFlags;
1038 typedef struct {
1039      DFBFontDescriptionFlags flags;
1040      DFBFontAttributes attributes;
1041      int height;
1042      int width;
1043      unsigned int index;
1044      int fixed_advance;
1045 } DFBFontDescription;
1046 typedef enum {
1047      DSPF_UNKNOWN = 0x00000000,
1048      DSPF_ARGB1555 = ( (((0 ) & 0x7F) ) | (((15) & 0x1F) << 7) | (((1) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1049      DSPF_RGB16 = ( (((1 ) & 0x7F) ) | (((16) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1050      DSPF_RGB24 = ( (((2 ) & 0x7F) ) | (((24) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((3 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1051      DSPF_RGB32 = ( (((3 ) & 0x7F) ) | (((24) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((4 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1052      DSPF_ARGB = ( (((4 ) & 0x7F) ) | (((24) & 0x1F) << 7) | (((8) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((4 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1053      DSPF_A8 = ( (((5 ) & 0x7F) ) | (((0) & 0x1F) << 7) | (((8) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1054      DSPF_YUY2 = ( (((6 ) & 0x7F) ) | (((16) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1055      DSPF_RGB332 = ( (((7 ) & 0x7F) ) | (((8) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1056      DSPF_UYVY = ( (((8 ) & 0x7F) ) | (((16) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1057      DSPF_I420 = ( (((9 ) & 0x7F) ) | (((12) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((2 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1058      DSPF_YV12 = ( (((10 ) & 0x7F) ) | (((12) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((2 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1059      DSPF_LUT8 = ( (((11 ) & 0x7F) ) | (((8) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((1 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1060      DSPF_ALUT44 = ( (((12 ) & 0x7F) ) | (((4) & 0x1F) << 7) | (((4) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((1 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1061      DSPF_AiRGB = ( (((13 ) & 0x7F) ) | (((24) & 0x1F) << 7) | (((8) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((4 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((1 ) ? 1 :0) << 31) ),
1062      DSPF_A1 = ( (((14 ) & 0x7F) ) | (((0) & 0x1F) << 7) | (((1) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((1 ) & 0x07) << 17) | (((0 ) & 0x07) << 20) | (((7 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1063      DSPF_NV12 = ( (((15 ) & 0x7F) ) | (((12) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((2 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1064      DSPF_NV16 = ( (((16 ) & 0x7F) ) | (((24) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((2 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1065      DSPF_ARGB2554 = ( (((17 ) & 0x7F) ) | (((14) & 0x1F) << 7) | (((2) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1066      DSPF_ARGB4444 = ( (((18 ) & 0x7F) ) | (((12) & 0x1F) << 7) | (((4) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),
1067      DSPF_NV21 = ( (((19 ) & 0x7F) ) | (((12) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((2 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) )
1068 } DFBSurfacePixelFormat;
1069 typedef struct {
1070      DFBSurfaceDescriptionFlags flags;
1071      DFBSurfaceCapabilities caps;
1072      int width;
1073      int height;
1074      DFBSurfacePixelFormat pixelformat;
1075      struct {
1076           void *data;
1077           int pitch;
1078      } preallocated[2];
1079      struct {
1080           DFBColor *entries;
1081           unsigned int size;
1082      } palette;
1083 } DFBSurfaceDescription;
1084 typedef struct {
1085      DFBPaletteDescriptionFlags flags;
1086      DFBPaletteCapabilities caps;
1087      unsigned int size;
1088      DFBColor *entries;
1089 } DFBPaletteDescription;
1090 typedef struct {
1091      DFBDisplayLayerTypeFlags type;
1092      DFBDisplayLayerCapabilities caps;
1093      char name[32];
1094      int level;
1095      int regions;
1096      int sources;
1097 } DFBDisplayLayerDescription;
1098 typedef struct {
1099      DFBDisplayLayerSourceID source_id;
1100      char name[24];
1101 } DFBDisplayLayerSourceDescription;
1102 typedef struct {
1103      DFBScreenCapabilities caps;
1104      char name[32];
1105      int mixers;
1106      int encoders;
1107      int outputs;
1108 } DFBScreenDescription;
1109 typedef struct {
1110      DFBInputDeviceTypeFlags type;
1111      DFBInputDeviceCapabilities caps;
1112      int min_keycode;
1113      int max_keycode;
1114      DFBInputDeviceAxisIdentifier max_axis;
1115      DFBInputDeviceButtonIdentifier max_button;
1116      char name[32];
1117      char vendor[40];
1118 } DFBInputDeviceDescription;
1119 typedef struct {
1120      DFBWindowDescriptionFlags flags;
1121      DFBWindowCapabilities caps;
1122      int width;
1123      int height;
1124      DFBSurfacePixelFormat pixelformat;
1125      int posx;
1126      int posy;
1127      DFBSurfaceCapabilities surface_caps;
1128 } DFBWindowDescription;
1129 typedef struct {
1130      DFBDataBufferDescriptionFlags flags;
1131      const char *file;
1132      struct {
1133           const void *data;
1134           unsigned int length;
1135      } memory;
1136 } DFBDataBufferDescription;
1137 typedef enum {
1138      DFENUM_OK = 0x00000000,
1139      DFENUM_CANCEL = 0x00000001
1140 } DFBEnumerationResult;
1141 typedef DFBEnumerationResult (*DFBVideoModeCallback) (
1142      int width,
1143      int height,
1144      int bpp,
1145      void *callbackdata
1146 );
1147 typedef DFBEnumerationResult (*DFBScreenCallback) (
1148      DFBScreenID screen_id,
1149      DFBScreenDescription desc,
1150      void *callbackdata
1151 );
1152 typedef DFBEnumerationResult (*DFBDisplayLayerCallback) (
1153      DFBDisplayLayerID layer_id,
1154      DFBDisplayLayerDescription desc,
1155      void *callbackdata
1156 );
1157 typedef DFBEnumerationResult (*DFBInputDeviceCallback) (
1158      DFBInputDeviceID device_id,
1159      DFBInputDeviceDescription desc,
1160      void *callbackdata
1161 );
1162 typedef int (*DFBGetDataCallback) (
1163      void *buffer,
1164      unsigned int length,
1165      void *callbackdata
1166 );
1167 typedef enum {
1168      DVCAPS_BASIC = 0x00000000,
1169      DVCAPS_SEEK = 0x00000001,
1170      DVCAPS_SCALE = 0x00000002,
1171      DVCAPS_INTERLACED = 0x00000004,
1172      DVCAPS_BRIGHTNESS = 0x00000010,
1173      DVCAPS_CONTRAST = 0x00000020,
1174      DVCAPS_HUE = 0x00000040,
1175      DVCAPS_SATURATION = 0x00000080
1176 } DFBVideoProviderCapabilities;
1177 typedef enum {
1178      DCAF_NONE = 0x00000000,
1179      DCAF_BRIGHTNESS = 0x00000001,
1180      DCAF_CONTRAST = 0x00000002,
1181      DCAF_HUE = 0x00000004,
1182      DCAF_SATURATION = 0x00000008
1183 } DFBColorAdjustmentFlags;
1184 typedef struct {
1185      DFBColorAdjustmentFlags flags;
1186      __u16 brightness;
1187      __u16 contrast;
1188      __u16 hue;
1189      __u16 saturation;
1190 } DFBColorAdjustment;
1191 struct _IDirectFB { void *priv; int magic; DFBResult (*AddRef)( IDirectFB *thiz ); DFBResult (*Release)( IDirectFB *thiz ); DFBResult (*SetCooperativeLevel) ( IDirectFB *thiz, DFBCooperativeLevel level ); DFBResult (*SetVideoMode) ( IDirectFB *thiz, int width, int height, int bpp ); DFBResult (*GetCardCapabilities) ( IDirectFB *thiz, DFBCardCapabilities *ret_caps ); DFBResult (*EnumVideoModes) ( IDirectFB *thiz, DFBVideoModeCallback callback, void *callbackdata ); DFBResult (*CreateSurface) ( IDirectFB *thiz, const DFBSurfaceDescription *desc, IDirectFBSurface **ret_interface ); DFBResult (*CreatePalette) ( IDirectFB *thiz, const DFBPaletteDescription *desc, IDirectFBPalette **ret_interface ); DFBResult (*EnumScreens) ( IDirectFB *thiz, DFBScreenCallback callback, void *callbackdata ); DFBResult (*GetScreen) ( IDirectFB *thiz, DFBScreenID screen_id, IDirectFBScreen **ret_interface ); DFBResult (*EnumDisplayLayers) ( IDirectFB *thiz, DFBDisplayLayerCallback callback, void *callbackdata ); DFBResult (*GetDisplayLayer) ( IDirectFB *thiz, DFBDisplayLayerID layer_id, IDirectFBDisplayLayer **ret_interface ); DFBResult (*EnumInputDevices) ( IDirectFB *thiz, DFBInputDeviceCallback callback, void *callbackdata ); DFBResult (*GetInputDevice) ( IDirectFB *thiz, DFBInputDeviceID device_id, IDirectFBInputDevice **ret_interface ); DFBResult (*CreateEventBuffer) ( IDirectFB *thiz, IDirectFBEventBuffer **ret_buffer ); DFBResult (*CreateInputEventBuffer) ( IDirectFB *thiz, DFBInputDeviceCapabilities caps, DFBBoolean global, IDirectFBEventBuffer **ret_buffer ); DFBResult (*CreateImageProvider) ( IDirectFB *thiz, const char *filename, IDirectFBImageProvider **ret_interface ); DFBResult (*CreateVideoProvider) ( IDirectFB *thiz, const char *filename, IDirectFBVideoProvider **ret_interface ); DFBResult (*CreateFont) ( IDirectFB *thiz, const char *filename, const DFBFontDescription *desc, IDirectFBFont **ret_interface ); DFBResult (*CreateDataBuffer) ( IDirectFB *thiz, const DFBDataBufferDescription *desc, IDirectFBDataBuffer **ret_interface ); DFBResult (*SetClipboardData) ( IDirectFB *thiz, const char *mime_type, const void *data, unsigned int size, struct timeval *ret_timestamp ); DFBResult (*GetClipboardData) ( IDirectFB *thiz, char **ret_mimetype, void **ret_data, unsigned int *ret_size ); DFBResult (*GetClipboardTimeStamp) ( IDirectFB *thiz, struct timeval *ret_timestamp ); DFBResult (*Suspend) ( IDirectFB *thiz ); DFBResult (*Resume) ( IDirectFB *thiz ); DFBResult (*WaitIdle) ( IDirectFB *thiz ); DFBResult (*WaitForSync) ( IDirectFB *thiz ); DFBResult (*GetInterface) ( IDirectFB *thiz, const char *type, const char *implementation, void *arg, void **ret_interface ); };
1192 typedef enum {
1193      DLSCL_SHARED = 0,
1194      DLSCL_EXCLUSIVE,
1195      DLSCL_ADMINISTRATIVE
1196 } DFBDisplayLayerCooperativeLevel;
1197 typedef enum {
1198      DLBM_DONTCARE = 0,
1199      DLBM_COLOR,
1200      DLBM_IMAGE,
1201      DLBM_TILE
1202 } DFBDisplayLayerBackgroundMode;
1203 typedef enum {
1204      DLCONF_NONE = 0x00000000,
1205      DLCONF_WIDTH = 0x00000001,
1206      DLCONF_HEIGHT = 0x00000002,
1207      DLCONF_PIXELFORMAT = 0x00000004,
1208      DLCONF_BUFFERMODE = 0x00000008,
1209      DLCONF_OPTIONS = 0x00000010,
1210      DLCONF_SOURCE = 0x00000020,
1211      DLCONF_SURFACE_CAPS = 0x00000040,
1212      DLCONF_ALL = 0x0000007F
1213 } DFBDisplayLayerConfigFlags;
1214 typedef struct {
1215      DFBDisplayLayerConfigFlags flags;
1216      int width;
1217      int height;
1218      DFBSurfacePixelFormat pixelformat;
1219      DFBDisplayLayerBufferMode buffermode;
1220      DFBDisplayLayerOptions options;
1221      DFBDisplayLayerSourceID source;
1222      DFBSurfaceCapabilities surface_caps;
1223 } DFBDisplayLayerConfig;
1224 typedef enum {
1225      DSPM_ON = 0,
1226      DSPM_STANDBY,
1227      DSPM_SUSPEND,
1228      DSPM_OFF
1229 } DFBScreenPowerMode;
1230 typedef enum {
1231      DSMCAPS_NONE = 0x00000000,
1232      DSMCAPS_FULL = 0x00000001,
1233      DSMCAPS_SUB_LEVEL = 0x00000002,
1234      DSMCAPS_SUB_LAYERS = 0x00000004,
1235      DSMCAPS_BACKGROUND = 0x00000008
1236 } DFBScreenMixerCapabilities;
1237 typedef struct {
1238      DFBScreenMixerCapabilities caps;
1239      DFBDisplayLayerIDs layers;
1240      int sub_num;
1241      DFBDisplayLayerIDs sub_layers;
1242      char name[24];
1243 } DFBScreenMixerDescription;
1244 typedef enum {
1245      DSMCONF_NONE = 0x00000000,
1246      DSMCONF_TREE = 0x00000001,
1247      DSMCONF_LEVEL = 0x00000002,
1248      DSMCONF_LAYERS = 0x00000004,
1249      DSMCONF_BACKGROUND = 0x00000010,
1250      DSMCONF_ALL = 0x00000017
1251 } DFBScreenMixerConfigFlags;
1252 typedef enum {
1253      DSMT_UNKNOWN = 0x00000000,
1254      DSMT_FULL = 0x00000001,
1255      DSMT_SUB_LEVEL = 0x00000002,
1256      DSMT_SUB_LAYERS = 0x00000003
1257 } DFBScreenMixerTree;
1258 typedef struct {
1259      DFBScreenMixerConfigFlags flags;
1260      DFBScreenMixerTree tree;
1261      int level;
1262      DFBDisplayLayerIDs layers;
1263      DFBColor background;
1264 } DFBScreenMixerConfig;
1265 typedef enum {
1266      DSOCAPS_NONE = 0x00000000,
1267      DSOCAPS_CONNECTORS = 0x00000001,
1268      DSOCAPS_ENCODER_SEL = 0x00000010,
1269      DSOCAPS_SIGNAL_SEL = 0x00000020,
1270      DSOCAPS_CONNECTOR_SEL = 0x00000040,
1271      DSOCAPS_ALL = 0x00000071
1272 } DFBScreenOutputCapabilities;
1273 typedef enum {
1274      DSOC_UNKNOWN = 0x00000000,
1275      DSOC_VGA = 0x00000001,
1276      DSOC_SCART = 0x00000002,
1277      DSOC_YC = 0x00000004,
1278      DSOC_CVBS = 0x00000008
1279 } DFBScreenOutputConnectors;
1280 typedef enum {
1281      DSOS_NONE = 0x00000000,
1282      DSOS_VGA = 0x00000001,
1283      DSOS_YC = 0x00000002,
1284      DSOS_CVBS = 0x00000004,
1285      DSOS_RGB = 0x00000008,
1286      DSOS_YCBCR = 0x00000010
1287 } DFBScreenOutputSignals;
1288 typedef struct {
1289      DFBScreenOutputCapabilities caps;
1290      DFBScreenOutputConnectors all_connectors;
1291      DFBScreenOutputSignals all_signals;
1292      char name[24];
1293 } DFBScreenOutputDescription;
1294 typedef enum {
1295      DSOCONF_NONE = 0x00000000,
1296      DSOCONF_ENCODER = 0x00000001,
1297      DSOCONF_SIGNALS = 0x00000002,
1298      DSOCONF_CONNECTORS = 0x00000004,
1299      DSOCONF_ALL = 0x00000007
1300 } DFBScreenOutputConfigFlags;
1301 typedef struct {
1302      DFBScreenOutputConfigFlags flags;
1303      int encoder;
1304      DFBScreenOutputSignals out_signals;
1305      DFBScreenOutputConnectors out_connectors;
1306 } DFBScreenOutputConfig;
1307 typedef enum {
1308      DSECAPS_NONE = 0x00000000,
1309      DSECAPS_TV_STANDARDS = 0x00000001,
1310      DSECAPS_TEST_PICTURE = 0x00000002,
1311      DSECAPS_MIXER_SEL = 0x00000004,
1312      DSECAPS_OUT_SIGNALS = 0x00000008,
1313      DSECAPS_SCANMODE = 0x00000010,
1314      DSECAPS_BRIGHTNESS = 0x00000100,
1315      DSECAPS_CONTRAST = 0x00000200,
1316      DSECAPS_HUE = 0x00000400,
1317      DSECAPS_SATURATION = 0x00000800,
1318      DSECAPS_ALL = 0x00000f1f
1319 } DFBScreenEncoderCapabilities;
1320 typedef enum {
1321      DSET_UNKNOWN = 0x00000000,
1322      DSET_CRTC = 0x00000001,
1323      DSET_TV = 0x00000002
1324 } DFBScreenEncoderType;
1325 typedef enum {
1326      DSETV_UNKNOWN = 0x00000000,
1327      DSETV_PAL = 0x00000001,
1328      DSETV_NTSC = 0x00000002,
1329      DSETV_SECAM = 0x00000004
1330 } DFBScreenEncoderTVStandards;
1331 typedef enum {
1332      DSESM_UNKNOWN = 0x00000000,
1333      DSESM_INTERLACED = 0x00000001,
1334      DSESM_PROGRESSIVE = 0x00000002
1335 } DFBScreenEncoderScanMode;
1336 typedef struct {
1337      DFBScreenEncoderCapabilities caps;
1338      DFBScreenEncoderType type;
1339      DFBScreenEncoderTVStandards tv_standards;
1340      DFBScreenOutputSignals out_signals;
1341      char name[24];
1342 } DFBScreenEncoderDescription;
1343 typedef enum {
1344      DSECONF_NONE = 0x00000000,
1345      DSECONF_TV_STANDARD = 0x00000001,
1346      DSECONF_TEST_PICTURE = 0x00000002,
1347      DSECONF_MIXER = 0x00000004,
1348      DSECONF_OUT_SIGNALS = 0x00000008,
1349      DSECONF_SCANMODE = 0x00000010,
1350      DSECONF_TEST_COLOR = 0x00000020,
1351      DSECONF_ADJUSTMENT = 0x00000040,
1352      DSECONF_ALL = 0x0000007F
1353 } DFBScreenEncoderConfigFlags;
1354 typedef enum {
1355      DSETP_OFF = 0x00000000,
1356      DSETP_MULTI = 0x00000001,
1357      DSETP_SINGLE = 0x00000002,
1358      DSETP_WHITE = 0x00000010,
1359      DSETP_YELLOW = 0x00000020,
1360      DSETP_CYAN = 0x00000030,
1361      DSETP_GREEN = 0x00000040,
1362      DSETP_MAGENTA = 0x00000050,
1363      DSETP_RED = 0x00000060,
1364      DSETP_BLUE = 0x00000070,
1365      DSETP_BLACK = 0x00000080
1366 } DFBScreenEncoderTestPicture;
1367 typedef struct {
1368      DFBScreenEncoderConfigFlags flags;
1369      DFBScreenEncoderTVStandards tv_standard;
1370      DFBScreenEncoderTestPicture test_picture;
1371      int mixer;
1372      DFBScreenOutputSignals out_signals;
1373      DFBScreenEncoderScanMode scanmode;
1374      DFBColor test_color;
1375      DFBColorAdjustment adjustment;
1376 } DFBScreenEncoderConfig;
1377 struct _IDirectFBScreen { void *priv; int magic; DFBResult (*AddRef)( IDirectFBScreen *thiz ); DFBResult (*Release)( IDirectFBScreen *thiz ); DFBResult (*GetID) ( IDirectFBScreen *thiz, DFBScreenID *ret_screen_id ); DFBResult (*GetDescription) ( IDirectFBScreen *thiz, DFBScreenDescription *ret_desc ); DFBResult (*EnumDisplayLayers) ( IDirectFBScreen *thiz, DFBDisplayLayerCallback callback, void *callbackdata ); DFBResult (*SetPowerMode) ( IDirectFBScreen *thiz, DFBScreenPowerMode mode ); DFBResult (*WaitForSync) ( IDirectFBScreen *thiz ); DFBResult (*GetMixerDescriptions) ( IDirectFBScreen *thiz, DFBScreenMixerDescription *ret_descriptions ); DFBResult (*GetMixerConfiguration) ( IDirectFBScreen *thiz, int mixer, DFBScreenMixerConfig *ret_config ); DFBResult (*TestMixerConfiguration) ( IDirectFBScreen *thiz, int mixer, const DFBScreenMixerConfig *config, DFBScreenMixerConfigFlags *ret_failed ); DFBResult (*SetMixerConfiguration) ( IDirectFBScreen *thiz, int mixer, const DFBScreenMixerConfig *config ); DFBResult (*GetEncoderDescriptions) ( IDirectFBScreen *thiz, DFBScreenEncoderDescription *ret_descriptions ); DFBResult (*GetEncoderConfiguration) ( IDirectFBScreen *thiz, int encoder, DFBScreenEncoderConfig *ret_config ); DFBResult (*TestEncoderConfiguration) ( IDirectFBScreen *thiz, int encoder, const DFBScreenEncoderConfig *config, DFBScreenEncoderConfigFlags *ret_failed ); DFBResult (*SetEncoderConfiguration) ( IDirectFBScreen *thiz, int encoder, const DFBScreenEncoderConfig *config ); DFBResult (*GetOutputDescriptions) ( IDirectFBScreen *thiz, DFBScreenOutputDescription *ret_descriptions ); DFBResult (*GetOutputConfiguration) ( IDirectFBScreen *thiz, int output, DFBScreenOutputConfig *ret_config ); DFBResult (*TestOutputConfiguration) ( IDirectFBScreen *thiz, int output, const DFBScreenOutputConfig *config, DFBScreenOutputConfigFlags *ret_failed ); DFBResult (*SetOutputConfiguration) ( IDirectFBScreen *thiz, int output, const DFBScreenOutputConfig *config ); };
1378 struct _IDirectFBDisplayLayer { void *priv; int magic; DFBResult (*AddRef)( IDirectFBDisplayLayer *thiz ); DFBResult (*Release)( IDirectFBDisplayLayer *thiz ); DFBResult (*GetID) ( IDirectFBDisplayLayer *thiz, DFBDisplayLayerID *ret_layer_id ); DFBResult (*GetDescription) ( IDirectFBDisplayLayer *thiz, DFBDisplayLayerDescription *ret_desc ); DFBResult (*GetSourceDescriptions) ( IDirectFBDisplayLayer *thiz, DFBDisplayLayerSourceDescription *ret_descriptions ); DFBResult (*GetCurrentOutputField) ( IDirectFBDisplayLayer *thiz, int *ret_field ); DFBResult (*GetSurface) ( IDirectFBDisplayLayer *thiz, IDirectFBSurface **ret_interface ); DFBResult (*GetScreen) ( IDirectFBDisplayLayer *thiz, IDirectFBScreen **ret_interface ); DFBResult (*SetCooperativeLevel) ( IDirectFBDisplayLayer *thiz, DFBDisplayLayerCooperativeLevel level ); DFBResult (*GetConfiguration) ( IDirectFBDisplayLayer *thiz, DFBDisplayLayerConfig *ret_config ); DFBResult (*TestConfiguration) ( IDirectFBDisplayLayer *thiz, const DFBDisplayLayerConfig *config, DFBDisplayLayerConfigFlags *ret_failed ); DFBResult (*SetConfiguration) ( IDirectFBDisplayLayer *thiz, const DFBDisplayLayerConfig *config ); DFBResult (*SetScreenLocation) ( IDirectFBDisplayLayer *thiz, float x, float y, float width, float height ); DFBResult (*SetScreenPosition) ( IDirectFBDisplayLayer *thiz, int x, int y ); DFBResult (*SetScreenRectangle) ( IDirectFBDisplayLayer *thiz, int x, int y, int width, int height ); DFBResult (*SetOpacity) ( IDirectFBDisplayLayer *thiz, __u8 opacity ); DFBResult (*SetSourceRectangle) ( IDirectFBDisplayLayer *thiz, int x, int y, int width, int height ); DFBResult (*SetFieldParity) ( IDirectFBDisplayLayer *thiz, int field ); DFBResult (*SetSrcColorKey) ( IDirectFBDisplayLayer *thiz, __u8 r, __u8 g, __u8 b ); DFBResult (*SetDstColorKey) ( IDirectFBDisplayLayer *thiz, __u8 r, __u8 g, __u8 b ); DFBResult (*GetLevel) ( IDirectFBDisplayLayer *thiz, int *ret_level ); DFBResult (*SetLevel) ( IDirectFBDisplayLayer *thiz, int level ); DFBResult (*SetBackgroundMode) ( IDirectFBDisplayLayer *thiz, DFBDisplayLayerBackgroundMode mode ); DFBResult (*SetBackgroundImage) ( IDirectFBDisplayLayer *thiz, IDirectFBSurface *surface ); DFBResult (*SetBackgroundColor) ( IDirectFBDisplayLayer *thiz, __u8 r, __u8 g, __u8 b, __u8 a ); DFBResult (*GetColorAdjustment) ( IDirectFBDisplayLayer *thiz, DFBColorAdjustment *ret_adj ); DFBResult (*SetColorAdjustment) ( IDirectFBDisplayLayer *thiz, const DFBColorAdjustment *adj ); DFBResult (*CreateWindow) ( IDirectFBDisplayLayer *thiz, const DFBWindowDescription *desc, IDirectFBWindow **ret_interface ); DFBResult (*GetWindow) ( IDirectFBDisplayLayer *thiz, DFBWindowID window_id, IDirectFBWindow **ret_interface ); DFBResult (*EnableCursor) ( IDirectFBDisplayLayer *thiz, int enable ); DFBResult (*GetCursorPosition) ( IDirectFBDisplayLayer *thiz, int *ret_x, int *ret_y ); DFBResult (*WarpCursor) ( IDirectFBDisplayLayer *thiz, int x, int y ); DFBResult (*SetCursorAcceleration) ( IDirectFBDisplayLayer *thiz, int numerator, int denominator, int threshold ); DFBResult (*SetCursorShape) ( IDirectFBDisplayLayer *thiz, IDirectFBSurface *shape, int hot_x, int hot_y ); DFBResult (*SetCursorOpacity) ( IDirectFBDisplayLayer *thiz, __u8 opacity ); DFBResult (*WaitForSync) ( IDirectFBDisplayLayer *thiz ); };
1379 typedef enum {
1380      DSFLIP_NONE = 0x00000000,
1381      DSFLIP_WAIT = 0x00000001,
1382      DSFLIP_BLIT = 0x00000002,
1383      DSFLIP_ONSYNC = 0x00000004,
1384      DSFLIP_PIPELINE = 0x00000008,
1385      DSFLIP_WAITFORSYNC = DSFLIP_WAIT | DSFLIP_ONSYNC
1386 } DFBSurfaceFlipFlags;
1387 typedef enum {
1388      DSTF_LEFT = 0x00000000,
1389      DSTF_CENTER = 0x00000001,
1390      DSTF_RIGHT = 0x00000002,
1391      DSTF_TOP = 0x00000004,
1392      DSTF_BOTTOM = 0x00000008,
1393      DSTF_TOPLEFT = DSTF_TOP | DSTF_LEFT,
1394      DSTF_TOPCENTER = DSTF_TOP | DSTF_CENTER,
1395      DSTF_TOPRIGHT = DSTF_TOP | DSTF_RIGHT,
1396      DSTF_BOTTOMLEFT = DSTF_BOTTOM | DSTF_LEFT,
1397      DSTF_BOTTOMCENTER = DSTF_BOTTOM | DSTF_CENTER,
1398      DSTF_BOTTOMRIGHT = DSTF_BOTTOM | DSTF_RIGHT
1399 } DFBSurfaceTextFlags;
1400 typedef enum {
1401      DSLF_READ = 0x00000001,
1402      DSLF_WRITE = 0x00000002
1403 } DFBSurfaceLockFlags;
1404 typedef enum {
1405      DSPD_NONE = 0,
1406      DSPD_CLEAR = 1,
1407      DSPD_SRC = 2,
1408      DSPD_SRC_OVER = 3,
1409      DSPD_DST_OVER = 4,
1410      DSPD_SRC_IN = 5,
1411      DSPD_DST_IN = 6,
1412      DSPD_SRC_OUT = 7,
1413      DSPD_DST_OUT = 8
1414 } DFBSurfacePorterDuffRule;
1415 typedef enum {
1416      DSBF_ZERO = 1,
1417      DSBF_ONE = 2,
1418      DSBF_SRCCOLOR = 3,
1419      DSBF_INVSRCCOLOR = 4,
1420      DSBF_SRCALPHA = 5,
1421      DSBF_INVSRCALPHA = 6,
1422      DSBF_DESTALPHA = 7,
1423      DSBF_INVDESTALPHA = 8,
1424      DSBF_DESTCOLOR = 9,
1425      DSBF_INVDESTCOLOR = 10,
1426      DSBF_SRCALPHASAT = 11
1427 } DFBSurfaceBlendFunction;
1428 typedef struct {
1429      float x;
1430      float y;
1431      float z;
1432      float w;
1433      float s;
1434      float t;
1435 } DFBVertex;
1436 typedef enum {
1437      DTTF_LIST,
1438      DTTF_STRIP,
1439      DTTF_FAN
1440 } DFBTriangleFormation;
1441 struct _IDirectFBSurface { void *priv; int magic; DFBResult (*AddRef)( IDirectFBSurface *thiz ); DFBResult (*Release)( IDirectFBSurface *thiz ); DFBResult (*GetCapabilities) ( IDirectFBSurface *thiz, DFBSurfaceCapabilities *ret_caps ); DFBResult (*GetSize) ( IDirectFBSurface *thiz, int *ret_width, int *ret_height ); DFBResult (*GetVisibleRectangle) ( IDirectFBSurface *thiz, DFBRectangle *ret_rect ); DFBResult (*GetPixelFormat) ( IDirectFBSurface *thiz, DFBSurfacePixelFormat *ret_format ); DFBResult (*GetAccelerationMask) ( IDirectFBSurface *thiz, IDirectFBSurface *source, DFBAccelerationMask *ret_mask ); DFBResult (*GetPalette) ( IDirectFBSurface *thiz, IDirectFBPalette **ret_interface ); DFBResult (*SetPalette) ( IDirectFBSurface *thiz, IDirectFBPalette *palette ); DFBResult (*SetAlphaRamp) ( IDirectFBSurface *thiz, __u8 a0, __u8 a1, __u8 a2, __u8 a3 ); DFBResult (*Lock) ( IDirectFBSurface *thiz, DFBSurfaceLockFlags flags, void **ret_ptr, int *ret_pitch ); DFBResult (*Unlock) ( IDirectFBSurface *thiz ); DFBResult (*Flip) ( IDirectFBSurface *thiz, const DFBRegion *region, DFBSurfaceFlipFlags flags ); DFBResult (*SetField) ( IDirectFBSurface *thiz, int field ); DFBResult (*Clear) ( IDirectFBSurface *thiz, __u8 r, __u8 g, __u8 b, __u8 a ); DFBResult (*SetClip) ( IDirectFBSurface *thiz, const DFBRegion *clip ); DFBResult (*SetColor) ( IDirectFBSurface *thiz, __u8 r, __u8 g, __u8 b, __u8 a ); DFBResult (*SetColorIndex) ( IDirectFBSurface *thiz, unsigned int index ); DFBResult (*SetSrcBlendFunction) ( IDirectFBSurface *thiz, DFBSurfaceBlendFunction function ); DFBResult (*SetDstBlendFunction) ( IDirectFBSurface *thiz, DFBSurfaceBlendFunction function ); DFBResult (*SetPorterDuff) ( IDirectFBSurface *thiz, DFBSurfacePorterDuffRule rule ); DFBResult (*SetSrcColorKey) ( IDirectFBSurface *thiz, __u8 r, __u8 g, __u8 b ); DFBResult (*SetSrcColorKeyIndex) ( IDirectFBSurface *thiz, unsigned int index ); DFBResult (*SetDstColorKey) ( IDirectFBSurface *thiz, __u8 r, __u8 g, __u8 b ); DFBResult (*SetDstColorKeyIndex) ( IDirectFBSurface *thiz, unsigned int index ); DFBResult (*SetBlittingFlags) ( IDirectFBSurface *thiz, DFBSurfaceBlittingFlags flags ); DFBResult (*Blit) ( IDirectFBSurface *thiz, IDirectFBSurface *source, const DFBRectangle *source_rect, int x, int y ); DFBResult (*TileBlit) ( IDirectFBSurface *thiz, IDirectFBSurface *source, const DFBRectangle *source_rect, int x, int y ); DFBResult (*BatchBlit) ( IDirectFBSurface *thiz, IDirectFBSurface *source, const DFBRectangle *source_rects, const DFBPoint *dest_points, int num ); DFBResult (*StretchBlit) ( IDirectFBSurface *thiz, IDirectFBSurface *source, const DFBRectangle *source_rect, const DFBRectangle *destination_rect ); DFBResult (*TextureTriangles) ( IDirectFBSurface *thiz, IDirectFBSurface *texture, const DFBVertex *vertices, const int *indices, int num, DFBTriangleFormation formation ); DFBResult (*SetDrawingFlags) ( IDirectFBSurface *thiz, DFBSurfaceDrawingFlags flags ); DFBResult (*FillRectangle) ( IDirectFBSurface *thiz, int x, int y, int w, int h ); DFBResult (*DrawRectangle) ( IDirectFBSurface *thiz, int x, int y, int w, int h ); DFBResult (*DrawLine) ( IDirectFBSurface *thiz, int x1, int y1, int x2, int y2 ); DFBResult (*DrawLines) ( IDirectFBSurface *thiz, const DFBRegion *lines, unsigned int num_lines ); DFBResult (*FillTriangle) ( IDirectFBSurface *thiz, int x1, int y1, int x2, int y2, int x3, int y3 ); DFBResult (*FillRectangles) ( IDirectFBSurface *thiz, const DFBRectangle *rects, unsigned int num ); DFBResult (*FillSpans) ( IDirectFBSurface *thiz, int y, const DFBSpan *spans, unsigned int num ); DFBResult (*SetFont) ( IDirectFBSurface *thiz, IDirectFBFont *font ); DFBResult (*GetFont) ( IDirectFBSurface *thiz, IDirectFBFont **ret_font ); DFBResult (*DrawString) ( IDirectFBSurface *thiz, const char *text, int bytes, int x, int y, DFBSurfaceTextFlags flags ); DFBResult (*DrawGlyph) ( IDirectFBSurface *thiz, unsigned int index, int x, int y, DFBSurfaceTextFlags flags ); DFBResult (*GetSubSurface) ( IDirectFBSurface *thiz, const DFBRectangle *rect, IDirectFBSurface **ret_interface ); DFBResult (*GetGL) ( IDirectFBSurface *thiz, IDirectFBGL **ret_interface ); DFBResult (*Dump) ( IDirectFBSurface *thiz, const char *directory, const char *prefix ); };
1442 struct _IDirectFBPalette { void *priv; int magic; DFBResult (*AddRef)( IDirectFBPalette *thiz ); DFBResult (*Release)( IDirectFBPalette *thiz ); DFBResult (*GetCapabilities) ( IDirectFBPalette *thiz, DFBPaletteCapabilities *ret_caps ); DFBResult (*GetSize) ( IDirectFBPalette *thiz, unsigned int *ret_size ); DFBResult (*SetEntries) ( IDirectFBPalette *thiz, const DFBColor *entries, unsigned int num_entries, unsigned int offset ); DFBResult (*GetEntries) ( IDirectFBPalette *thiz, DFBColor *ret_entries, unsigned int num_entries, unsigned int offset ); DFBResult (*FindBestMatch) ( IDirectFBPalette *thiz, __u8 r, __u8 g, __u8 b, __u8 a, unsigned int *ret_index ); DFBResult (*CreateCopy) ( IDirectFBPalette *thiz, IDirectFBPalette **ret_interface ); };
1443 typedef enum {
1444      DIKS_UP = 0x00000000,
1445      DIKS_DOWN = 0x00000001
1446 } DFBInputDeviceKeyState;
1447 typedef enum {
1448      DIBS_UP = 0x00000000,
1449      DIBS_DOWN = 0x00000001
1450 } DFBInputDeviceButtonState;
1451 typedef enum {
1452      DIBM_LEFT = 0x00000001,
1453      DIBM_RIGHT = 0x00000002,
1454      DIBM_MIDDLE = 0x00000004
1455 } DFBInputDeviceButtonMask;
1456 typedef enum {
1457      DIMM_SHIFT = (1 << DIMKI_SHIFT),
1458      DIMM_CONTROL = (1 << DIMKI_CONTROL),
1459      DIMM_ALT = (1 << DIMKI_ALT),
1460      DIMM_ALTGR = (1 << DIMKI_ALTGR),
1461      DIMM_META = (1 << DIMKI_META),
1462      DIMM_SUPER = (1 << DIMKI_SUPER),
1463      DIMM_HYPER = (1 << DIMKI_HYPER)
1464 } DFBInputDeviceModifierMask;
1465 struct _IDirectFBInputDevice { void *priv; int magic; DFBResult (*AddRef)( IDirectFBInputDevice *thiz ); DFBResult (*Release)( IDirectFBInputDevice *thiz ); DFBResult (*GetID) ( IDirectFBInputDevice *thiz, DFBInputDeviceID *ret_device_id ); DFBResult (*GetDescription) ( IDirectFBInputDevice *thiz, DFBInputDeviceDescription *ret_desc ); DFBResult (*GetKeymapEntry) ( IDirectFBInputDevice *thiz, int keycode, DFBInputDeviceKeymapEntry *ret_entry ); DFBResult (*CreateEventBuffer) ( IDirectFBInputDevice *thiz, IDirectFBEventBuffer **ret_buffer ); DFBResult (*AttachEventBuffer) ( IDirectFBInputDevice *thiz, IDirectFBEventBuffer *buffer ); DFBResult (*GetKeyState) ( IDirectFBInputDevice *thiz, DFBInputDeviceKeyIdentifier key_id, DFBInputDeviceKeyState *ret_state ); DFBResult (*GetModifiers) ( IDirectFBInputDevice *thiz, DFBInputDeviceModifierMask *ret_modifiers ); DFBResult (*GetLockState) ( IDirectFBInputDevice *thiz, DFBInputDeviceLockState *ret_locks ); DFBResult (*GetButtons) ( IDirectFBInputDevice *thiz, DFBInputDeviceButtonMask *ret_buttons ); DFBResult (*GetButtonState) ( IDirectFBInputDevice *thiz, DFBInputDeviceButtonIdentifier button, DFBInputDeviceButtonState *ret_state ); DFBResult (*GetAxis) ( IDirectFBInputDevice *thiz, DFBInputDeviceAxisIdentifier axis, int *ret_pos ); DFBResult (*GetXY) ( IDirectFBInputDevice *thiz, int *ret_x, int *ret_y ); };
1466 typedef enum {
1467      DFEC_NONE = 0x00,
1468      DFEC_INPUT = 0x01,
1469      DFEC_WINDOW = 0x02,
1470      DFEC_USER = 0x03
1471 } DFBEventClass;
1472 typedef enum {
1473      DIET_UNKNOWN = 0,
1474      DIET_KEYPRESS,
1475      DIET_KEYRELEASE,
1476      DIET_BUTTONPRESS,
1477      DIET_BUTTONRELEASE,
1478      DIET_AXISMOTION
1479 } DFBInputEventType;
1480 typedef enum {
1481      DIEF_NONE = 0x000,
1482      DIEF_TIMESTAMP = 0x001,
1483      DIEF_AXISABS = 0x002,
1484      DIEF_AXISREL = 0x004,
1485      DIEF_KEYCODE = 0x008,
1486      DIEF_KEYID = 0x010,
1487      DIEF_KEYSYMBOL = 0x020,
1488      DIEF_MODIFIERS = 0x040,
1489      DIEF_LOCKS = 0x080,
1490      DIEF_BUTTONS = 0x100,
1491      DIEF_GLOBAL = 0x200
1492 } DFBInputEventFlags;
1493 typedef struct {
1494      DFBEventClass clazz;
1495      DFBInputEventType type;
1496      DFBInputDeviceID device_id;
1497      DFBInputEventFlags flags;
1498      struct timeval timestamp;
1499      int key_code;
1500      DFBInputDeviceKeyIdentifier key_id;
1501      DFBInputDeviceKeySymbol key_symbol;
1502      DFBInputDeviceModifierMask modifiers;
1503      DFBInputDeviceLockState locks;
1504      DFBInputDeviceButtonIdentifier button;
1505      DFBInputDeviceButtonMask buttons;
1506      DFBInputDeviceAxisIdentifier axis;
1507      int axisabs;
1508      int axisrel;
1509 } DFBInputEvent;
1510 typedef enum {
1511      DWET_NONE = 0x00000000,
1512      DWET_POSITION = 0x00000001,
1513      DWET_SIZE = 0x00000002,
1514      DWET_CLOSE = 0x00000004,
1515      DWET_DESTROYED = 0x00000008,
1516      DWET_GOTFOCUS = 0x00000010,
1517      DWET_LOSTFOCUS = 0x00000020,
1518      DWET_KEYDOWN = 0x00000100,
1519      DWET_KEYUP = 0x00000200,
1520      DWET_BUTTONDOWN = 0x00010000,
1521      DWET_BUTTONUP = 0x00020000,
1522      DWET_MOTION = 0x00040000,
1523      DWET_ENTER = 0x00080000,
1524      DWET_LEAVE = 0x00100000,
1525      DWET_WHEEL = 0x00200000,
1526      DWET_POSITION_SIZE = DWET_POSITION | DWET_SIZE,
1527      DWET_ALL = 0x003F033F
1528 } DFBWindowEventType;
1529 typedef struct {
1530      DFBEventClass clazz;
1531      DFBWindowEventType type;
1532      DFBWindowID window_id;
1533      int x;
1534      int y;
1535      int cx;
1536      int cy;
1537      int step;
1538      int w;
1539      int h;
1540      int key_code;
1541      DFBInputDeviceKeyIdentifier key_id;
1542      DFBInputDeviceKeySymbol key_symbol;
1543      DFBInputDeviceModifierMask modifiers;
1544      DFBInputDeviceLockState locks;
1545      DFBInputDeviceButtonIdentifier button;
1546      DFBInputDeviceButtonMask buttons;
1547      struct timeval timestamp;
1548 } DFBWindowEvent;
1549 typedef struct {
1550      DFBEventClass clazz;
1551      unsigned int type;
1552      void *data;
1553 } DFBUserEvent;
1554 typedef union {
1555      DFBEventClass clazz;
1556      DFBInputEvent input;
1557      DFBWindowEvent window;
1558      DFBUserEvent user;
1559 } DFBEvent;
1560 struct _IDirectFBEventBuffer { void *priv; int magic; DFBResult (*AddRef)( IDirectFBEventBuffer *thiz ); DFBResult (*Release)( IDirectFBEventBuffer *thiz ); DFBResult (*Reset) ( IDirectFBEventBuffer *thiz ); DFBResult (*WaitForEvent) ( IDirectFBEventBuffer *thiz ); DFBResult (*WaitForEventWithTimeout) ( IDirectFBEventBuffer *thiz, unsigned int seconds, unsigned int milli_seconds ); DFBResult (*GetEvent) ( IDirectFBEventBuffer *thiz, DFBEvent *ret_event ); DFBResult (*PeekEvent) ( IDirectFBEventBuffer *thiz, DFBEvent *ret_event ); DFBResult (*HasEvent) ( IDirectFBEventBuffer *thiz ); DFBResult (*PostEvent) ( IDirectFBEventBuffer *thiz, const DFBEvent *event ); DFBResult (*WakeUp) ( IDirectFBEventBuffer *thiz ); DFBResult (*CreateFileDescriptor) ( IDirectFBEventBuffer *thiz, int *ret_fd ); };
1561 typedef enum {
1562      DWOP_NONE = 0x00000000,
1563      DWOP_COLORKEYING = 0x00000001,
1564      DWOP_ALPHACHANNEL = 0x00000002,
1565      DWOP_OPAQUE_REGION = 0x00000004,
1566      DWOP_SHAPED = 0x00000008,
1567      DWOP_KEEP_POSITION = 0x00000010,
1568      DWOP_KEEP_SIZE = 0x00000020,
1569      DWOP_KEEP_STACKING = 0x00000040,
1570      DWOP_GHOST = 0x00001000,
1571      DWOP_INDESTRUCTIBLE = 0x00002000,
1572      DWOP_ALL = 0x0000307F
1573 } DFBWindowOptions;
1574 typedef enum {
1575      DWSC_MIDDLE = 0x00000000,
1576      DWSC_UPPER = 0x00000001,
1577      DWSC_LOWER = 0x00000002
1578 } DFBWindowStackingClass;
1579 struct _IDirectFBWindow { void *priv; int magic; DFBResult (*AddRef)( IDirectFBWindow *thiz ); DFBResult (*Release)( IDirectFBWindow *thiz ); DFBResult (*GetID) ( IDirectFBWindow *thiz, DFBWindowID *ret_window_id ); DFBResult (*GetPosition) ( IDirectFBWindow *thiz, int *ret_x, int *ret_y ); DFBResult (*GetSize) ( IDirectFBWindow *thiz, int *ret_width, int *ret_height ); DFBResult (*CreateEventBuffer) ( IDirectFBWindow *thiz, IDirectFBEventBuffer **ret_buffer ); DFBResult (*AttachEventBuffer) ( IDirectFBWindow *thiz, IDirectFBEventBuffer *buffer ); DFBResult (*EnableEvents) ( IDirectFBWindow *thiz, DFBWindowEventType mask ); DFBResult (*DisableEvents) ( IDirectFBWindow *thiz, DFBWindowEventType mask ); DFBResult (*GetSurface) ( IDirectFBWindow *thiz, IDirectFBSurface **ret_surface ); DFBResult (*SetOptions) ( IDirectFBWindow *thiz, DFBWindowOptions options ); DFBResult (*GetOptions) ( IDirectFBWindow *thiz, DFBWindowOptions *ret_options ); DFBResult (*SetColorKey) ( IDirectFBWindow *thiz, __u8 r, __u8 g, __u8 b ); DFBResult (*SetColorKeyIndex) ( IDirectFBWindow *thiz, unsigned int index ); DFBResult (*SetOpacity) ( IDirectFBWindow *thiz, __u8 opacity ); DFBResult (*SetOpaqueRegion) ( IDirectFBWindow *thiz, int x1, int y1, int x2, int y2 ); DFBResult (*GetOpacity) ( IDirectFBWindow *thiz, __u8 *ret_opacity ); DFBResult (*SetCursorShape) ( IDirectFBWindow *thiz, IDirectFBSurface *shape, int hot_x, int hot_y ); DFBResult (*RequestFocus) ( IDirectFBWindow *thiz ); DFBResult (*GrabKeyboard) ( IDirectFBWindow *thiz ); DFBResult (*UngrabKeyboard) ( IDirectFBWindow *thiz ); DFBResult (*GrabPointer) ( IDirectFBWindow *thiz ); DFBResult (*UngrabPointer) ( IDirectFBWindow *thiz ); DFBResult (*GrabKey) ( IDirectFBWindow *thiz, DFBInputDeviceKeySymbol symbol, DFBInputDeviceModifierMask modifiers ); DFBResult (*UngrabKey) ( IDirectFBWindow *thiz, DFBInputDeviceKeySymbol symbol, DFBInputDeviceModifierMask modifiers ); DFBResult (*Move) ( IDirectFBWindow *thiz, int dx, int dy ); DFBResult (*MoveTo) ( IDirectFBWindow *thiz, int x, int y ); DFBResult (*Resize) ( IDirectFBWindow *thiz, int width, int height ); DFBResult (*SetStackingClass) ( IDirectFBWindow *thiz, DFBWindowStackingClass stacking_class ); DFBResult (*Raise) ( IDirectFBWindow *thiz ); DFBResult (*Lower) ( IDirectFBWindow *thiz ); DFBResult (*RaiseToTop) ( IDirectFBWindow *thiz ); DFBResult (*LowerToBottom) ( IDirectFBWindow *thiz ); DFBResult (*PutAtop) ( IDirectFBWindow *thiz, IDirectFBWindow *lower ); DFBResult (*PutBelow) ( IDirectFBWindow *thiz, IDirectFBWindow *upper ); DFBResult (*Close) ( IDirectFBWindow *thiz ); DFBResult (*Destroy) ( IDirectFBWindow *thiz ); };
1580 struct _IDirectFBFont { void *priv; int magic; DFBResult (*AddRef)( IDirectFBFont *thiz ); DFBResult (*Release)( IDirectFBFont *thiz ); DFBResult (*GetAscender) ( IDirectFBFont *thiz, int *ret_ascender ); DFBResult (*GetDescender) ( IDirectFBFont *thiz, int *ret_descender ); DFBResult (*GetHeight) ( IDirectFBFont *thiz, int *ret_height ); DFBResult (*GetMaxAdvance) ( IDirectFBFont *thiz, int *ret_maxadvance ); DFBResult (*GetKerning) ( IDirectFBFont *thiz, unsigned int prev_index, unsigned int current_index, int *ret_kern_x, int *ret_kern_y ); DFBResult (*GetStringWidth) ( IDirectFBFont *thiz, const char *text, int bytes, int *ret_width ); DFBResult (*GetStringExtents) ( IDirectFBFont *thiz, const char *text, int bytes, DFBRectangle *ret_logical_rect, DFBRectangle *ret_ink_rect ); DFBResult (*GetGlyphExtents) ( IDirectFBFont *thiz, unsigned int index, DFBRectangle *ret_rect, int *ret_advance ); };
1581 typedef enum {
1582      DICAPS_NONE = 0x00000000,
1583      DICAPS_ALPHACHANNEL = 0x00000001,
1584      DICAPS_COLORKEY = 0x00000002
1585 } DFBImageCapabilities;
1586 typedef struct {
1587      DFBImageCapabilities caps;
1588      __u8 colorkey_r;
1589      __u8 colorkey_g;
1590      __u8 colorkey_b;
1591 } DFBImageDescription;
1592 typedef void (*DIRenderCallback)(DFBRectangle *rect, void *ctx);
1593 struct _IDirectFBImageProvider { void *priv; int magic; DFBResult (*AddRef)( IDirectFBImageProvider *thiz ); DFBResult (*Release)( IDirectFBImageProvider *thiz ); DFBResult (*GetSurfaceDescription) ( IDirectFBImageProvider *thiz, DFBSurfaceDescription *ret_dsc ); DFBResult (*GetImageDescription) ( IDirectFBImageProvider *thiz, DFBImageDescription *ret_dsc ); DFBResult (*RenderTo) ( IDirectFBImageProvider *thiz, IDirectFBSurface *destination, const DFBRectangle *destination_rect ); DFBResult (*SetRenderCallback) ( IDirectFBImageProvider *thiz, DIRenderCallback callback, void *callback_data ); };
1594 typedef int (*DVFrameCallback)(void *ctx);
1595 struct _IDirectFBVideoProvider { void *priv; int magic; DFBResult (*AddRef)( IDirectFBVideoProvider *thiz ); DFBResult (*Release)( IDirectFBVideoProvider *thiz ); DFBResult (*GetCapabilities) ( IDirectFBVideoProvider *thiz, DFBVideoProviderCapabilities *ret_caps ); DFBResult (*GetSurfaceDescription) ( IDirectFBVideoProvider *thiz, DFBSurfaceDescription *ret_dsc ); DFBResult (*PlayTo) ( IDirectFBVideoProvider *thiz, IDirectFBSurface *destination, const DFBRectangle *destination_rect, DVFrameCallback callback, void *ctx ); DFBResult (*Stop) ( IDirectFBVideoProvider *thiz ); DFBResult (*SeekTo) ( IDirectFBVideoProvider *thiz, double seconds ); DFBResult (*GetPos) ( IDirectFBVideoProvider *thiz, double *ret_seconds ); DFBResult (*GetLength) ( IDirectFBVideoProvider *thiz, double *ret_seconds ); DFBResult (*GetColorAdjustment) ( IDirectFBVideoProvider *thiz, DFBColorAdjustment *ret_adj ); DFBResult (*SetColorAdjustment) ( IDirectFBVideoProvider *thiz, const DFBColorAdjustment *adj ); };
1596 struct _IDirectFBDataBuffer { void *priv; int magic; DFBResult (*AddRef)( IDirectFBDataBuffer *thiz ); DFBResult (*Release)( IDirectFBDataBuffer *thiz ); DFBResult (*Flush) ( IDirectFBDataBuffer *thiz ); DFBResult (*SeekTo) ( IDirectFBDataBuffer *thiz, unsigned int offset ); DFBResult (*GetPosition) ( IDirectFBDataBuffer *thiz, unsigned int *ret_offset ); DFBResult (*GetLength) ( IDirectFBDataBuffer *thiz, unsigned int *ret_length ); DFBResult (*WaitForData) ( IDirectFBDataBuffer *thiz, unsigned int length ); DFBResult (*WaitForDataWithTimeout) ( IDirectFBDataBuffer *thiz, unsigned int length, unsigned int seconds, unsigned int milli_seconds ); DFBResult (*GetData) ( IDirectFBDataBuffer *thiz, unsigned int length, void *ret_data, unsigned int *ret_read ); DFBResult (*PeekData) ( IDirectFBDataBuffer *thiz, unsigned int length, int offset, void *ret_data, unsigned int *ret_read ); DFBResult (*HasData) ( IDirectFBDataBuffer *thiz ); DFBResult (*PutData) ( IDirectFBDataBuffer *thiz, const void *data, unsigned int length ); DFBResult (*CreateImageProvider) ( IDirectFBDataBuffer *thiz, IDirectFBImageProvider **interface ); };
1597