1 /* audacious.h: conky support for audacious music player
3 * Copyright (C) 2005-2007 Philip Kovacs pkovacs@users.sourceforge.net
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library 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 GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23 #include "timed_thread.h"
25 enum _audacious_items {
29 AUDACIOUS_LENGTH_SECONDS,
31 AUDACIOUS_POSITION_SECONDS,
36 AUDACIOUS_PLAYLIST_LENGTH,
37 AUDACIOUS_PLAYLIST_POSITION,
38 AUDACIOUS_MAIN_VOLUME,
41 /* 12 slots for the audacious values */
42 typedef char audacious_t[13][128];
44 /* type for data exchange with main thread */
45 typedef struct audacious_s {
46 audacious_t items; /* e.g. items[AUDACIOUS_STATUS] */
47 int max_title_len; /* e.g. ${audacious_title 50} */
48 timed_thread *p_timed_thread;
51 /* create a worker thread for audacious media player status */
52 int create_audacious_thread(void);
54 /* destroy audacious media player worker thread */
55 int destroy_audacious_thread(void);
57 /* Service routine for the conky main thread */
58 void update_audacious(void);
60 /* Thread functions */
61 void *audacious_thread_func(void *);