blob: 1efd8035e363568069f2f96571254bfad5d9f8ed [file] [log] [blame]
Jonathan Gordon71898e52008-10-16 10:38:03 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
Bertrik Sikken6fef14b2010-01-03 14:28:09 +00008 * $Id$
Jonathan Gordon71898e52008-10-16 10:38:03 +00009 *
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 {
Michael Sevakis023f6b62013-07-12 12:06:38 -040034 /* Playback is starting from a stopped state
35 data = NULL */
Jonathan Gordon7d5e0d72010-05-16 11:13:42 +000036 PLAYBACK_EVENT_START_PLAYBACK = (EVENT_CLASS_PLAYBACK|1),
Michael Sevakis023f6b62013-07-12 12:06:38 -040037 /* Audio has begun buffering for decoding track (or is already completed)
38 data = &(struct track_event){} */
Jonathan Gordon7d5e0d72010-05-16 11:13:42 +000039 PLAYBACK_EVENT_TRACK_BUFFER,
Michael Sevakis023f6b62013-07-12 12:06:38 -040040 /* Handles for current user track are ready (other than audio or codec)
41 data = &(struct track_event){} */
Michael Sevakiscaf907e2011-05-25 08:35:31 +000042 PLAYBACK_EVENT_CUR_TRACK_READY,
Michael Sevakis023f6b62013-07-12 12:06:38 -040043 /* Current user track finished
44 data = &(struct track_event){} */
Jonathan Gordon71898e52008-10-16 10:38:03 +000045 PLAYBACK_EVENT_TRACK_FINISH,
Michael Sevakis023f6b62013-07-12 12:06:38 -040046 /* A new current user track has begun
47 data = &(struct track_event){} */
Jonathan Gordon71898e52008-10-16 10:38:03 +000048 PLAYBACK_EVENT_TRACK_CHANGE,
Michael Sevakis023f6b62013-07-12 12:06:38 -040049 /* A manual skip is about to be processed
50 data = NULL */
Michael Sevakisc537d592011-04-27 03:08:23 +000051 PLAYBACK_EVENT_TRACK_SKIP,
Michael Sevakis023f6b62013-07-12 12:06:38 -040052 /* Next track medadata was just loaded
53 data = &(struct track_event){} */
Jonathan Gordon843c7ef2009-04-06 00:39:43 +000054 PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE,
Michael Sevakisc8564f12017-12-12 20:14:34 -050055};
56
57/** VOICE events **/
58enum {
Michael Sevakis023f6b62013-07-12 12:06:38 -040059 /* Voice is playing
60 data = &(bool){true|false} */
Michael Sevakisc8564f12017-12-12 20:14:34 -050061 VOICE_EVENT_IS_PLAYING = (EVENT_CLASS_VOICE|1),
Jonathan Gordon71898e52008-10-16 10:38:03 +000062};
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,
Michael Sevakis0ebfb932012-05-21 02:18:46 -040071 BUFFER_EVENT_BUFFER_RESET
Jonathan Gordon71898e52008-10-16 10:38:03 +000072};
73
74/** Generic GUI class events **/
75enum {
Thomas Martitz4c48b592009-08-16 22:20:11 +000076 GUI_EVENT_STATUSBAR_TOGGLE = (EVENT_CLASS_GUI|1),
Jonathan Gordon8b9fdb52009-01-05 09:59:11 +000077 GUI_EVENT_ACTIONUPDATE,
Thomas Martitz2eb1cb62009-09-07 17:37:06 +000078 GUI_EVENT_THEME_CHANGED,
Jonathan Gordon94139ac2012-03-20 21:27:33 +110079 /* 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,
Jonathan Gordon71898e52008-10-16 10:38:03 +000082};
83
Jonathan Gordon7d5e0d72010-05-16 11:13:42 +000084/** Recording events **/
85enum {
86 RECORDING_EVENT_START = (EVENT_CLASS_RECORDING|1),
87 RECORDING_EVENT_STOP,
88};
Jonathan Gordon71898e52008-10-16 10:38:03 +000089#endif
90
91