1 /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
2 * vim: ts=4 sw=4 noet ai cindent syntax=c
4 * audacious.h: conky support for audacious music player
6 * Copyright (C) 2005-2007 Philip Kovacs pkovacs@users.sourceforge.net
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
28 #include "timed_thread.h"
30 enum _audacious_items {
34 AUDACIOUS_LENGTH_SECONDS,
36 AUDACIOUS_POSITION_SECONDS,
41 AUDACIOUS_PLAYLIST_LENGTH,
42 AUDACIOUS_PLAYLIST_POSITION,
43 AUDACIOUS_MAIN_VOLUME,
46 /* 12 slots for the audacious values */
47 typedef char audacious_t[13][128];
49 /* type for data exchange with main thread */
50 typedef struct audacious_s {
51 audacious_t items; /* e.g. items[AUDACIOUS_STATUS] */
52 int max_title_len; /* e.g. ${audacious_title 50} */
53 timed_thread *p_timed_thread;
56 /* create a worker thread for audacious media player status */
57 int create_audacious_thread(void);
59 /* destroy audacious media player worker thread */
60 int destroy_audacious_thread(void);
62 /* Service routine for the conky main thread */
63 int update_audacious(void);
65 /* Thread functions */
66 void *audacious_thread_func(void *);