Navit SVN

/work/compile/navit/src/navit/graphics/sdl/event_sdl.h

00001 
00002 #ifndef __EVENT_SDL_H
00003 #define __EVENT_SDL_H
00004 
00005 #include <SDL/SDL.h>
00006 #include "config.h"
00007 #include "callback.h"
00008 #include "event.h"
00009 #include "graphics_sdl.h"
00010 
00011 #ifdef USE_WEBOS
00012 # define SDL_USEREVENT_CODE_TIMER 0x1
00013 # define SDL_USEREVENT_CODE_CALL_CALLBACK 0x2
00014 # define SDL_USEREVENT_CODE_IDLE_EVENT 0x4
00015 # define SDL_USEREVENT_CODE_WATCH 0x8
00016 # ifdef USE_WEBOS_ACCELEROMETER
00017 #  define SDL_USEREVENT_CODE_ROTATE 0xA
00018 # endif
00019 #endif
00020 
00021 struct event_timeout {
00022     SDL_TimerID id;
00023     int multi;
00024     struct callback *cb;
00025 };
00026 
00027 struct idle_task {
00028     int priority;
00029     struct callback *cb;
00030 };
00031 
00032 struct event_watch {
00033     struct pollfd *pfd;
00034     struct callback *cb;
00035 };
00036 
00037 int quit_event_loop             = 0; // quit the main event loop
00038 static GPtrArray *idle_tasks    = NULL;
00039 
00040 void event_sdl_watch_thread (GPtrArray *);
00041 
00042 void event_sdl_register(void);
00043 
00044 #endif