Add license files and headers
[navit-package] / navit / event.c
1 /**
2  * Navit, a modular navigation system.
3  * Copyright (C) 2005-2008 Navit Team
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * version 2 as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA  02110-1301, USA.
18  */
19
20 #include <glib.h>
21 #include "event.h"
22
23 static GMainLoop *loop;
24
25 void event_main_loop_run(void)
26 {
27         loop = g_main_loop_new (NULL, TRUE);
28         if (g_main_loop_is_running (loop))
29         {
30                 g_main_loop_run (loop);
31         }
32 }
33
34 void event_main_loop_quit(void)
35 {
36         if (loop)
37                 g_main_loop_quit(loop);
38