diff options
-rw-r--r-- | navit/event.c | 6 | ||||
-rw-r--r-- | navit/event.h | 2 | ||||
-rw-r--r-- | navit/event_glib.c | 13 | ||||
-rw-r--r-- | navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp | 7 | ||||
-rw-r--r-- | navit/graphics/win32/graphics_win32.c | 7 |
5 files changed, 35 insertions, 0 deletions
diff --git a/navit/event.c b/navit/event.c index 87e1798b0..42929d5c5 100644 --- a/navit/event.c +++ b/navit/event.c @@ -78,6 +78,12 @@ event_remove_idle(struct event_idle *ev) event_methods.remove_idle(ev); } +void +event_call_callback(struct callback *cb) +{ + event_methods.call_callback(cb); +} + int event_request_system(char *system, char *requestor) { diff --git a/navit/event.h b/navit/event.h index 0f02278fd..fb0c37d47 100644 --- a/navit/event.h +++ b/navit/event.h @@ -42,6 +42,7 @@ struct event_methods { void (*remove_timeout)(struct event_timeout *ev); struct event_idle *(*add_idle)(struct callback *cb); void (*remove_idle)(struct event_idle *ev); + void (*call_callback)(struct callback *cb); }; @@ -55,6 +56,7 @@ void event_remove_timeout(struct event_timeout *ev); struct event_idle *event_add_idle(struct callback *cb); void event_remove_idle(struct event_idle *ev); int event_request_system(char *system, char *requestor); +void event_call_callback(struct callback *cb); /* end of prototypes */ #ifdef __cplusplus } diff --git a/navit/event_glib.c b/navit/event_glib.c index 730d9082a..7fc0bbbf0 100644 --- a/navit/event_glib.c +++ b/navit/event_glib.c @@ -136,6 +136,18 @@ event_glib_remove_idle(struct event_idle *ev) { } +static void +event_glib_call_callback(struct callback *cb) +{ +/* + Idea for implementation: + Create a pipe then use add_watch + add callback to a queue + from here write to the pipe to wakeup the pool + then from the gui thread process the callback queue +*/ +} + static struct event_methods event_glib_methods = { event_glib_main_loop_run, event_glib_main_loop_quit, @@ -145,6 +157,7 @@ static struct event_methods event_glib_methods = { event_glib_remove_timeout, event_glib_add_idle, event_glib_remove_idle, + event_glib_call_callback, }; static void diff --git a/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp b/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp index fc4d50631..374279f26 100644 --- a/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp +++ b/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp @@ -759,6 +759,12 @@ event_qt_remove_idle(struct event_idle *ev) dbg(0,"enter\n"); } +static void +event_qt_call_callback(struct callback *cb) +{ + dbg(0,"enter\n"); +} + static struct event_methods event_qt_methods = { event_qt_main_loop_run, event_qt_main_loop_quit, @@ -768,6 +774,7 @@ static struct event_methods event_qt_methods = { event_qt_remove_timeout, event_qt_add_idle, event_qt_remove_idle, + event_qt_call_callback, }; struct event_priv { diff --git a/navit/graphics/win32/graphics_win32.c b/navit/graphics/win32/graphics_win32.c index 063b3ef0c..7295809c3 100644 --- a/navit/graphics/win32/graphics_win32.c +++ b/navit/graphics/win32/graphics_win32.c @@ -923,6 +923,12 @@ event_win32_remove_idle(struct event_idle *ev) dbg(0,"enter\n"); } +static void +event_win32_call_callback(struct callback *cb) +{ + dbg(0,"enter\n"); +} + static struct event_methods event_win32_methods = { event_win32_main_loop_run, event_win32_main_loop_quit, @@ -932,6 +938,7 @@ static struct event_methods event_win32_methods = { event_win32_remove_timeout, event_win32_add_idle, event_win32_remove_idle, + event_win32_call_callback, }; static struct event_priv * |