/* * 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: *.soundfile * names a file next to it (docs/MCDE-PROGRAMS.md A1-A4). */ #ifndef _Mcde_Sound_h #define _Mcde_Sound_h #include /* 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 */