blob: 8677dbd52242e11776e05e2cbaedcc8027ad3e7d [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 Sevakis023f6b62013-07-12 12:06:38 -040055 /* Voice is playing
56 data = &(bool){true|false} */
Michael Sevakise62cb562013-05-31 18:45:51 -040057 PLAYBACK_EVENT_VOICE_PLAYING,
Jonathan Gordon71898e52008-10-16 10:38:03 +000058};
59
60/** Buffering events **/
61enum {
62 BUFFER_EVENT_BUFFER_LOW = (EVENT_CLASS_BUFFERING|1),
63 BUFFER_EVENT_REBUFFER,
64 BUFFER_EVENT_CLOSED,
65 BUFFER_EVENT_MOVED,
66 BUFFER_EVENT_FINISHED,
Michael Sevakis0ebfb932012-05-21 02:18:46 -040067 BUFFER_EVENT_BUFFER_RESET
Jonathan Gordon71898e52008-10-16 10:38:03 +000068};
69
70/** Generic GUI class events **/
71enum {
Thomas Martitz4c48b592009-08-16 22:20:11 +000072 GUI_EVENT_STATUSBAR_TOGGLE = (EVENT_CLASS_GUI|1),
Jonathan Gordon8b9fdb52009-01-05 09:59:11 +000073 GUI_EVENT_ACTIONUPDATE,
Thomas Martitz2eb1cb62009-09-07 17:37:06 +000074 GUI_EVENT_THEME_CHANGED,
Jonathan Gordon94139ac2012-03-20 21:27:33 +110075 /* Called when the UI viewport is cleared in the skin engine to
76 * notify the current screen that it needs to do an update */
77 GUI_EVENT_NEED_UI_UPDATE,
Jonathan Gordon71898e52008-10-16 10:38:03 +000078};
79
Jonathan Gordon7d5e0d72010-05-16 11:13:42 +000080/** Recording events **/
81enum {
82 RECORDING_EVENT_START = (EVENT_CLASS_RECORDING|1),
83 RECORDING_EVENT_STOP,
84};
Jonathan Gordon71898e52008-10-16 10:38:03 +000085#endif
86
87