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.
24 #include <gmpc-version.h>
26 #ifndef __G_I18N_LIB_H__
27 #include <glib/gi18n.h>
31 #include "config-defaults.h"
32 #include <libmpd/libmpd.h>
33 #include <libmpd/libmpdclient.h>
36 #include "plugin-internal.h"
37 #include "gmpc-extras.h"
38 #include "mpdinteraction.h"
40 #include "playlist3-messages.h"
46 #include "gmpc-profiles.h"
47 #include "smclient/eggsmclient.h"
49 extern int gmpc_connected
;
50 extern GtkTreeModel
*playlist
;
53 extern gmpcPluginParent
**plugins
;
55 extern int num_plugins
;
57 char * edit_song_markup(char *format
);
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
);
74 void meta_data_add_plugin(gmpcPluginParent
*plug
);
78 void url_start_real(const gchar
*url
);
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
),
87 * functions to get patch to different files.
88 * This is needed to make the windows port work.
91 char *gmpc_get_full_image_path(void);
96 #define q_free(a) {g_free(a);a=NULL;}
99 gboolean
tray_icon2_get_available(void);
100 void tray_icon2_create_tooltip(void);
104 void mpd_interaction_update_supported_tags(void);
109 /* Check if the playlist is fullscreen, this queries the _actual_ state */
110 gboolean
pl3_window_is_fullscreen(void);
112 void gmpc_easy_async_quit(void);
114 /**Hack Handle status changed */
115 void GmpcStatusChangedCallback(MpdObj
*mi
, ChangedStatusType what
, void *userdata
);
118 gboolean
set_log_filter(const gchar
* option_name
, const gchar
* value
, gpointer data
, GError
** error
);
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) {\
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);\
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)