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
20 * vim: ts=4 sw=4 noet ai cindent syntax=c
27 #include "timed_thread.h"
29 enum _audacious_items {
33 AUDACIOUS_LENGTH_SECONDS,
35 AUDACIOUS_POSITION_SECONDS,
40 AUDACIOUS_PLAYLIST_LENGTH,
41 AUDACIOUS_PLAYLIST_POSITION,
42 AUDACIOUS_MAIN_VOLUME,
45 /* 12 slots for the audacious values */
46 typedef char audacious_t[13][128];
48 /* type for data exchange with main thread */
49 typedef struct audacious_s {
50 audacious_t items; /* e.g. items[AUDACIOUS_STATUS] */
51 int max_title_len; /* e.g. ${audacious_title 50} */
52 timed_thread *p_timed_thread;
55 /* create a worker thread for audacious media player status */
56 int create_audacious_thread(void);
58 /* destroy audacious media player worker thread */
59 int destroy_audacious_thread(void);
61 /* Service routine for the conky main thread */
62 void update_audacious(void);
64 /* Thread functions */
65 void *audacious_thread_func(void *);