navit  0.5.1-trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups
event_sdl.h
Go to the documentation of this file.
1 
2 #ifndef __EVENT_SDL_H
3 #define __EVENT_SDL_H
4 
5 #include <SDL/SDL.h>
6 #include "config.h"
7 #include "callback.h"
8 #include "event.h"
9 #include "graphics_sdl.h"
10 
11 #ifdef USE_WEBOS
12 # define SDL_USEREVENT_CODE_TIMER 0x1
13 # define SDL_USEREVENT_CODE_CALL_CALLBACK 0x2
14 # define SDL_USEREVENT_CODE_IDLE_EVENT 0x4
15 # define SDL_USEREVENT_CODE_WATCH 0x8
16 # ifdef USE_WEBOS_ACCELEROMETER
17 # define SDL_USEREVENT_CODE_ROTATE 0xA
18 # endif
19 #endif
20 
21 struct event_timeout {
22  SDL_TimerID id;
23  int multi;
24  struct callback *cb;
25 };
26 
27 struct idle_task {
28  int priority;
29  struct callback *cb;
30 };
31 
32 struct event_watch {
33  struct pollfd *pfd;
34  struct callback *cb;
35 };
36 
37 int quit_event_loop = 0; // quit the main event loop
38 static GPtrArray *idle_tasks = NULL;
39 
40 void event_sdl_watch_thread (GPtrArray *);
41 
42 void event_sdl_register(void);
43 
44 #endif
struct callback * cb
Definition: event_qt5.cpp:53
int quit_event_loop
Definition: event_sdl.h:37
struct pollfd * pfd
Definition: event.c:22
void event_sdl_register(void)
Definition: event_sdl.c:340
SDL_TimerID id
Definition: event.c:11
struct callback * cb
Definition: event_glib.c:93
Definition: event_glib.c:47
int multi
Definition: graphics_android.c:1008
Definition: event.c:16
void event_sdl_watch_thread(GPtrArray *)
Definition: event_sdl.c:91
static GPtrArray * idle_tasks
Definition: event_sdl.h:38
int priority
Definition: event.c:17
Definition: event_glib.c:91
Definition: callback.c:26
struct callback * cb
Definition: event.c:18