1 /* xfce4-mpc-plugin.h
2  *
3  * Copyright (c) 2006-2012 Landry Breuil <landry at xfce.org>
4  * This code is licenced under a BSD-style licence.
5  * (OpenBSD variant modeled after the ISC licence)
6  * All rights reserved.
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #include <gtk/gtk.h>
21 #include <libxfce4panel/libxfce4panel.h>
22 
23 #if HAVE_LIBMPD
24 #include <libmpd/libmpd.h>
25 #if DEBUG
26 #include <libmpd/debug_printf.h>
27 #endif
28 #else
29 #include "simple-libmpd.h"
30 #endif /* !HAVE_LIBMPD */
31 
32 typedef struct {
33    GtkWidget* menuitem;
34    gchar* name;
35    gint id;
36    gint enabled;
37 } t_mpd_output;
38 
39 typedef struct {
40    XfcePanelPlugin *plugin;
41    GtkWidget *frame,*box,*prev,*stop,*toggle,*next,*random,*repeat,*appl,*about;
42    GtkWidget *playlist;
43    gboolean show_frame;
44    /* mpd handle */
45    MpdObj *mo;
46    gchar* client_appl;
47    gchar* mpd_host;
48    gint mpd_port;
49    gchar * mpd_password;
50    gchar * tooltip_format;
51    gchar * playlist_format;
52    gboolean mpd_repeat;
53    gboolean mpd_random;
54    gint nb_outputs;
55    t_mpd_output ** mpd_outputs;
56 } t_mpc;
57 
58 typedef struct {
59    t_mpc *mpc;
60    GtkWidget *textbox_host;
61    GtkWidget *textbox_port;
62    GtkWidget *textbox_password;
63    GtkWidget *textbox_client_appl;
64    GtkWidget *textbox_tooltip_format;
65    GtkWidget *textbox_playlist_format;
66    GtkWidget *checkbox_frame;
67 } t_mpc_dialog;
68 
69