00001 /* Copyright 2009 (c) ENSI de Bourges 00002 * 88 boulevard Lahitolle, 18020 Bourges Cedex, France 00003 * 00004 * This program is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation, either version 3 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00024 #ifndef __APPLICATION_DATA_H 00025 #define __APPLICATION_DATA_H 00026 #ifdef __cplusplus 00027 extern "C" { 00028 #endif 00029 #include <dbus/dbus-glib-bindings.h> 00030 #include <gtk/gtk.h> 00031 #include <glib.h> 00032 00033 #include "data-types.h" 00034 #include "frame-common.h" 00035 #include "frame-table.h" 00036 #include "settings-manager.h" 00037 00038 00039 00048 typedef struct __synema_instance_t { 00049 GList *machines_list; 00050 GList *plugins_list; 00051 GtkBuilder *builder; 00052 GRand *rand; 00053 enum { 00054 PANEL_NONE, 00055 PANEL_PLAYER, 00056 PANEL_OPEN, 00057 PANEL_ACTIONS 00058 } current_panel; 00060 char *config_dir; 00061 char *data_dir; 00062 char *machines_dir; 00063 char *plugins_dir; 00064 char *tmp_dir; 00066 settings_t *settings; 00068 enum { 00069 PLAYER_STOPPED, 00070 PLAYER_PLAYING, 00071 PLAYER_PAUSED 00072 } player_status; 00073 guint64 player_curr_time; 00074 DBusGProxy *dbus_proxy; 00075 DBusGConnection *dbus_connection; 00077 GList *tables_list; 00078 frame_table_t *current_table; 00079 guint labelcount; 00080 } synema_instance_t; 00081 00082 00083 00092 void error_dialog (const gchar *, ...); 00093 00094 00095 00103 void toggle_panels (GtkToolButton *, gpointer); 00104 00105 00106 00114 gint post_init_restore_frames (); 00115 00116 00117 00126 void pre_quit_save_frames (GtkObject *, gpointer); 00127 00128 00129 00138 gint recursive_remove (const gchar *); 00139 00140 00141 00151 guint unique_frame_id_generator (GList *); 00152 00153 00154 00163 synema_instance_t* synema_instance (); 00164 00165 00166 00175 void synema_instance_free (); 00176 #ifdef __cplusplus 00177 } 00178 #endif 00179 #endif