navit  0.5.3-trunk
event_sdl.c File Reference
#include <glib.h>
#include <poll.h>
#include "SDL.h"
#include <pthread.h>
#include <signal.h>
#include "config.h"
#include "event.h"
#include "event_sdl.h"
#include "graphics_sdl.h"
#include "debug.h"
#include "callback.h"
#include "plugin.h"

Functions

static void event_sdl_watch_startthread (GPtrArray *)
 
static void event_sdl_watch_stopthread (void)
 
static struct event_watchevent_sdl_add_watch (int, enum event_watch_cond, struct callback *)
 
static void event_sdl_remove_watch (struct event_watch *)
 
static struct event_timeoutevent_sdl_add_timeout (int, int, struct callback *)
 
static void event_sdl_remove_timeout (struct event_timeout *)
 
static struct event_idleevent_sdl_add_idle (int, struct callback *)
 
static void event_sdl_remove_idle (struct event_idle *)
 
static void event_sdl_call_callback (struct callback_list *)
 
static Uint32 sdl_timer_callback (Uint32 interval, void *param)
 
static void event_sdl_main_loop_run (void)
 
static void event_sdl_main_loop_quit (void)
 
void event_sdl_watch_thread (GPtrArray *watch_list)
 
static gint sdl_sort_idle_tasks (gconstpointer parama, gconstpointer paramb)
 
static struct event_privevent_sdl_new (struct event_methods *methods)
 
void event_sdl_register (void)
 

Variables

static pthread_t sdl_watch_thread = 0
 
static GPtrArray * sdl_watch_list = NULL
 
static struct event_methods event_sdl_methods
 

Function Documentation

◆ event_sdl_add_idle()

static struct event_idle * event_sdl_add_idle ( int  priority,
struct callback cb 
)
static

◆ event_sdl_add_timeout()

static struct event_timeout * event_sdl_add_timeout ( int  timeout,
int  multi,
struct callback cb 
)
static

◆ event_sdl_add_watch()

◆ event_sdl_call_callback()

static void event_sdl_call_callback ( struct callback_list cbl)
static

References cbl, dbg, and lvl_debug.

◆ event_sdl_main_loop_quit()

static void event_sdl_main_loop_quit ( void  )
static

References quit_event_loop.

◆ event_sdl_main_loop_run()

static void event_sdl_main_loop_run ( void  )
static

◆ event_sdl_new()

static struct event_priv* event_sdl_new ( struct event_methods methods)
static

References event_sdl_methods, idle_tasks, and methods.

Referenced by event_sdl_register().

◆ event_sdl_register()

void event_sdl_register ( void  )

References event_sdl_new().

◆ event_sdl_remove_idle()

static void event_sdl_remove_idle ( struct event_idle task)
static

References dbg, idle_tasks, and lvl_debug.

◆ event_sdl_remove_timeout()

static void event_sdl_remove_timeout ( struct event_timeout to)
static

◆ event_sdl_remove_watch()

static void event_sdl_remove_watch ( struct event_watch ew)
static

◆ event_sdl_watch_startthread()

static void event_sdl_watch_startthread ( GPtrArray *  watch_list)
static

◆ event_sdl_watch_stopthread()

static void event_sdl_watch_stopthread ( void  )
static

◆ event_sdl_watch_thread()

void event_sdl_watch_thread ( GPtrArray *  watch_list)

◆ sdl_sort_idle_tasks()

static gint sdl_sort_idle_tasks ( gconstpointer  parama,
gconstpointer  paramb 
)
static

References idle_task::priority.

Referenced by event_sdl_add_idle().

◆ sdl_timer_callback()

static Uint32 sdl_timer_callback ( Uint32  interval,
void *  param 
)
static

Variable Documentation

◆ event_sdl_methods

struct event_methods event_sdl_methods
static
Initial value:
= {
}
static void event_sdl_main_loop_quit(void)
Definition: event_sdl.c:78
static void event_sdl_remove_timeout(struct event_timeout *)
Definition: event_sdl.c:208
static void event_sdl_remove_watch(struct event_watch *)
Definition: event_sdl.c:179
static void event_sdl_main_loop_run(void)
Definition: event_sdl.c:73
static struct event_idle * event_sdl_add_idle(int, struct callback *)
Definition: event_sdl.c:235
static void event_sdl_call_callback(struct callback_list *)
Definition: event_sdl.c:272
static struct event_timeout * event_sdl_add_timeout(int, int, struct callback *)
Definition: event_sdl.c:194
static void event_sdl_remove_idle(struct event_idle *)
Definition: event_sdl.c:265
static struct event_watch * event_sdl_add_watch(int, enum event_watch_cond, struct callback *)
Definition: event_sdl.c:143

Referenced by event_sdl_new().

◆ sdl_watch_list

GPtrArray* sdl_watch_list = NULL
static

◆ sdl_watch_thread

pthread_t sdl_watch_thread = 0
static

Navit, a modular navigation system. Copyright (C) 2005-2008 Navit Team

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Referenced by event_sdl_watch_startthread(), event_sdl_watch_stopthread(), and graphics_sdl_new().