Files
mcde/include/Mcde/Sound.h
T
lotherkandClaude Sonnet 5.5 d53ea094e7 licence: CNCL for what Makronix wrote itself
LICENSE at the root; the 103 files new in ext/src/mcde (none was in the CDE
import) carry the CNCL line instead of the LGPL notice.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 11:48:02 +00:00

44 lines
1.5 KiB
C

/*
* Sound.h -- MCDE: desktop events and sound themes
*
* License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree.
*
* A program names an event ("Launch", "OpenFolder", ...) and the session's
* sound server plays it. The theme is an X-Resource file: *<Event>.soundfile
* names a file next to it (docs/MCDE-PROGRAMS.md A1-A4).
*/
#ifndef _Mcde_Sound_h
#define _Mcde_Sound_h
#include <X11/Xlib.h>
/* read the theme; returns 0 on success, -1 if none was found */
int McdeSoundInit(void);
/* the file of an event, or NULL; the name is the theme's (Launch, Beep) */
const char * McdeSoundFile(const char *event);
/* the theme directory (for the daemon's relative file names) */
const char * McdeSoundThemeDir(void);
/* load another theme directory (the server's side of a theme change) */
int McdeSoundLoadTheme(const char *dir);
/* ask the running server to load DIR; returns 0 when it took it */
int McdeSoundSetTheme(Display *dpy, const char *dir);
/* how many events the theme names, and their names (for a settings list) */
int McdeSoundCount(void);
const char * McdeSoundEventName(int i);
/*
* Send the event to the session's server. Returns 0 when the server took it,
* 1 when no server runs -- the caller may then play it itself.
*/
int McdeSoundEvent(Display *dpy, const char *event);
/* play one file; without a sound server the X bell answers (daemon side) */
int McdeSoundPlay(Display *dpy, const char *path);
#endif /* _Mcde_Sound_h */