A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita
audio
rust
zig
deno
mpris
rockbox
mpd
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2008 by Jonathan Gordon
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef _APPEVENTS_H
23#define _APPEVENTS_H
24
25#include <stdbool.h>
26#include "events.h"
27
28/** Only app/ level events should be defined here.
29 * firmware/ level events and CLASS's are defined in firmware/export/events.h
30 */
31
32/** Playback events **/
33enum {
34 /* Playback is starting from a stopped state
35 data = NULL */
36 PLAYBACK_EVENT_START_PLAYBACK = (EVENT_CLASS_PLAYBACK|1),
37 /* Audio has begun buffering for decoding track (or is already completed)
38 data = &(struct track_event){} */
39 PLAYBACK_EVENT_TRACK_BUFFER,
40 /* Handles for current user track are ready (other than audio or codec)
41 data = &(struct track_event){} */
42 PLAYBACK_EVENT_CUR_TRACK_READY,
43 /* Current user track finished
44 data = &(struct track_event){} */
45 PLAYBACK_EVENT_TRACK_FINISH,
46 /* A new current user track has begun
47 data = &(struct track_event){} */
48 PLAYBACK_EVENT_TRACK_CHANGE,
49 /* A manual skip is about to be processed
50 data = NULL */
51 PLAYBACK_EVENT_TRACK_SKIP,
52 /* Next track medadata was just loaded
53 data = &(struct track_event){} */
54 PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE,
55};
56
57/** VOICE events **/
58enum {
59 /* Voice is playing
60 data = &(bool){true|false} */
61 VOICE_EVENT_IS_PLAYING = (EVENT_CLASS_VOICE|1),
62};
63
64/** Buffering events **/
65enum {
66 BUFFER_EVENT_BUFFER_LOW = (EVENT_CLASS_BUFFERING|1),
67 BUFFER_EVENT_REBUFFER,
68 BUFFER_EVENT_CLOSED,
69 BUFFER_EVENT_MOVED,
70 BUFFER_EVENT_FINISHED,
71 BUFFER_EVENT_BUFFER_RESET
72};
73
74/** Generic GUI class events **/
75enum {
76 GUI_EVENT_STATUSBAR_TOGGLE = (EVENT_CLASS_GUI|1),
77 GUI_EVENT_ACTIONUPDATE,
78 GUI_EVENT_THEME_CHANGED,
79 /* Called when the UI viewport is cleared in the skin engine to
80 * notify the current screen that it needs to do an update */
81 GUI_EVENT_NEED_UI_UPDATE,
82};
83
84/** Recording events **/
85enum {
86 RECORDING_EVENT_START = (EVENT_CLASS_RECORDING|1),
87 RECORDING_EVENT_STOP,
88};
89#endif
90
91