Update the go-menu when disabling browser in AE.
[gmpc.git] / src / main.h
blob66470e8e48d10ad8458046f45535a7b15bc6a571
1 /* Gnome Music Player Client (GMPC)
2 * Copyright (C) 2004-2011 Qball Cow <qball@sarine.nl>
3 * Project homepage: http://gmpc.wikia.com/
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #ifndef __MAIN_H__
22 #define __MAIN_H__
23 #include <config.h>
24 #include <gmpc-version.h>
25 #ifdef ENABLE_NLS
26 #ifndef __G_I18N_LIB_H__
27 #include <glib/gi18n.h>
28 #endif
29 #endif
31 #include "config-defaults.h"
32 #include <libmpd/libmpd.h>
33 #include <libmpd/libmpdclient.h>
34 #include "config1.h"
35 #include "plugin.h"
36 #include "plugin-internal.h"
37 #include "gmpc-extras.h"
38 #include "mpdinteraction.h"
40 #include "playlist3-messages.h"
43 /**
44 * Some gobjects
46 #include "gmpc-profiles.h"
47 #include "smclient/eggsmclient.h"
49 extern int gmpc_connected;
50 extern GtkTreeModel *playlist;
52 /* the plugin list */
53 extern gmpcPluginParent **plugins;
54 /* num of plugins */
55 extern int num_plugins;
57 char * edit_song_markup(char *format);
59 void main_quit(void);
61 /* plugin */
62 void plugin_load_dir(const gchar *path);
63 void plugin_add(gmpcPlugin *plug, int plugin, GError **error);
64 void plugin_add_new(GmpcPluginBase *plug, int plugin, GError **error);
65 int plugin_get_pos(int id);
67 void show_error_message(const gchar *string);
70 /**
71 * Metadata
74 void meta_data_add_plugin(gmpcPluginParent *plug);
75 /**
76 * TODO move this
78 void url_start_real(const gchar *url);
79 void url_start(void);
81 void url_start_custom(const gchar *url,
82 void (*error_callback)(const gchar *error_msg, gpointer user_data),
83 void (*result_callback)(GList *result,gpointer user_data),
84 void (*progress_callback)(gdouble progress, gpointer user_data),
85 gpointer user_data);
87 * functions to get patch to different files.
88 * This is needed to make the windows port work.
89 * (misc.c)
91 char *gmpc_get_full_image_path(void);
93 /**
94 * Help functions
96 #define q_free(a) {g_free(a);a=NULL;}
98 /* tray stuff */
99 gboolean tray_icon2_get_available(void);
100 void tray_icon2_create_tooltip(void);
102 /* tag stuff */
104 void mpd_interaction_update_supported_tags(void);
106 * Playlist functions
109 /* Check if the playlist is fullscreen, this queries the _actual_ state */
110 gboolean pl3_window_is_fullscreen(void);
111 /* easy download */
112 void gmpc_easy_async_quit(void);
114 /**Hack Handle status changed */
115 void GmpcStatusChangedCallback(MpdObj *mi, ChangedStatusType what, void *userdata);
117 /* */
118 gboolean set_log_filter(const gchar * option_name, const gchar * value, gpointer data, GError ** error);
120 #ifdef DEBUG_TIMING
121 /* Tic Tac system */
122 #define TIMER_SUB(start,stop,diff) diff.tv_usec = stop.tv_usec - start.tv_usec;\
123 diff.tv_sec = stop.tv_sec - start.tv_sec;\
124 if(diff.tv_usec < 0) {\
125 diff.tv_sec -= 1; \
126 diff.tv_usec += G_USEC_PER_SEC; \
129 #define INIT_TIC_TAC() GTimeVal start123, stop123,diff123;\
130 g_get_current_time(&start123);
132 #define TAC(a,ARGS...) g_get_current_time(&stop123);\
133 TIMER_SUB(start123, stop123, diff123);\
134 printf(a": %lu s, %lu us\n",##ARGS, (unsigned long)( diff123.tv_sec),(unsigned long)( diff123.tv_usec));
136 #define TOC(a,ARGS...) TAC(a,##ARGS);\
137 start123 = stop123;
139 #else // DEBUG_TIMING
142 #define INIT_TIC_TAC() ;
143 #define TAC(a, ARGS...) ;
144 #define TOC(a, ARGS...) ;
146 #endif // DEBUG_TIMING
147 #define TEC(a, ARGS...) TAC(a, ##ARGS)
149 #endif