1 /* Gnome Music Player Client (GMPC)
2 * Copyright (C) 2004-2012 Qball Cow <qball@gmpclient.org>
3 * Project homepage: http://gmpclient.org/
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"
47 extern GtkApplication
*gmpc_application
;
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
);
73 void url_start_real(const gchar
*url
);
74 void url_start_easy_command(void *data
,char *param
, void *d
);
77 void url_start_custom(const gchar
*url
,
78 void (*error_callback
)(const gchar
*error_msg
, gpointer user_data
),
79 void (*result_callback
)(GList
*result
,gpointer user_data
),
80 void (*progress_callback
)(gdouble progress
, gpointer user_data
),
83 * functions to get patch to different files.
84 * This is needed to make the windows port work.
87 char *gmpc_get_full_image_path(void);
92 #define q_free(a) {g_free(a);a=NULL;}
95 gboolean
tray_icon2_get_available(void);
96 void tray_icon2_create_tooltip(void);
97 void tray_icon2_update_menu(void);
101 void mpd_interaction_update_supported_tags(void);
106 /* Check if the playlist is fullscreen, this queries the _actual_ state */
107 gboolean
pl3_window_is_fullscreen(void);
109 void gmpc_easy_async_quit(void);
111 /**Hack Handle status changed */
112 void GmpcStatusChangedCallback(MpdObj
*mi
, ChangedStatusType what
, void *userdata
);
117 #define TIMER_SUB(start,stop,diff) diff.tv_usec = stop.tv_usec - start.tv_usec;\
118 diff.tv_sec = stop.tv_sec - start.tv_sec;\
119 if(diff.tv_usec < 0) {\
121 diff.tv_usec += G_USEC_PER_SEC; \
124 #define INIT_TIC_TAC() GTimeVal start123, stop123,diff123;\
125 g_get_current_time(&start123);
127 #define TAC(a,ARGS...) g_get_current_time(&stop123);\
128 TIMER_SUB(start123, stop123, diff123);\
129 printf("%lu.%06lu:%s: "a"\n", (unsigned long)( diff123.tv_sec),(unsigned long)( diff123.tv_usec),__FUNCTION__,##ARGS);
131 #define TOC(a,ARGS...) TAC(a,##ARGS);\
134 #else // DEBUG_TIMING
137 #define INIT_TIC_TAC() ;
138 #define TAC(a, ARGS...) ;
139 #define TOC(a, ARGS...) ;
141 #endif // DEBUG_TIMING
142 #define TEC(a, ARGS...) TAC(a, ##ARGS)