2008-02-20 20:30:45 +00:00
|
|
|
/* audacious.h: conky support for audacious music player
|
|
|
|
*
|
2007-08-10 20:09:43 +00:00
|
|
|
* Copyright (C) 2005-2007 Philip Kovacs pkovacs@users.sourceforge.net
|
2006-01-07 07:01:22 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-12-13 16:54:59 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
2008-02-20 20:30:45 +00:00
|
|
|
* USA. */
|
2006-01-07 07:01:22 +00:00
|
|
|
|
2006-11-03 20:54:52 +00:00
|
|
|
#ifndef AUDACIOUS_H
|
|
|
|
#define AUDACIOUS_H
|
|
|
|
|
2008-06-16 19:40:28 +00:00
|
|
|
#include "timed_thread.h"
|
|
|
|
|
2006-11-03 20:54:52 +00:00
|
|
|
enum _audacious_items {
|
2008-02-20 20:30:45 +00:00
|
|
|
AUDACIOUS_STATUS = 0,
|
2006-11-03 20:54:52 +00:00
|
|
|
AUDACIOUS_TITLE,
|
|
|
|
AUDACIOUS_LENGTH,
|
|
|
|
AUDACIOUS_LENGTH_SECONDS,
|
|
|
|
AUDACIOUS_POSITION,
|
|
|
|
AUDACIOUS_POSITION_SECONDS,
|
|
|
|
AUDACIOUS_BITRATE,
|
|
|
|
AUDACIOUS_FREQUENCY,
|
|
|
|
AUDACIOUS_CHANNELS,
|
|
|
|
AUDACIOUS_FILENAME,
|
|
|
|
AUDACIOUS_PLAYLIST_LENGTH,
|
|
|
|
AUDACIOUS_PLAYLIST_POSITION,
|
2008-12-07 07:38:06 +00:00
|
|
|
AUDACIOUS_MAIN_VOLUME,
|
2006-01-11 17:03:45 +00:00
|
|
|
};
|
|
|
|
|
2006-11-03 20:54:52 +00:00
|
|
|
/* 12 slots for the audacious values */
|
2008-12-07 07:38:06 +00:00
|
|
|
typedef char audacious_t[13][128];
|
2006-01-07 07:01:22 +00:00
|
|
|
|
2008-06-16 19:40:28 +00:00
|
|
|
/* type for data exchange with main thread */
|
|
|
|
typedef struct audacious_s {
|
|
|
|
audacious_t items; /* e.g. items[AUDACIOUS_STATUS] */
|
|
|
|
int max_title_len; /* e.g. ${audacious_title 50} */
|
|
|
|
timed_thread *p_timed_thread;
|
|
|
|
} AUDACIOUS_S;
|
|
|
|
|
2006-11-03 20:54:52 +00:00
|
|
|
/* create a worker thread for audacious media player status */
|
|
|
|
int create_audacious_thread(void);
|
2006-01-11 17:03:45 +00:00
|
|
|
|
2006-11-03 20:54:52 +00:00
|
|
|
/* destroy audacious media player worker thread */
|
|
|
|
int destroy_audacious_thread(void);
|
2006-01-11 17:03:45 +00:00
|
|
|
|
2006-01-07 07:01:22 +00:00
|
|
|
/* Service routine for the conky main thread */
|
2006-11-03 20:54:52 +00:00
|
|
|
void update_audacious(void);
|
2006-01-07 07:01:22 +00:00
|
|
|
|
2006-01-11 17:03:45 +00:00
|
|
|
/* Thread functions */
|
2006-11-03 20:54:52 +00:00
|
|
|
void *audacious_thread_func(void *);
|
2006-01-07 07:01:22 +00:00
|
|
|
|
|
|
|
#endif
|