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 * __________ __ ___.
4 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
5 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
6 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
7 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
8 * \/ \/ \/ \/ \/
9 * $Id$
10 *
11 * Copyright (C) 2021 William Wilgus
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 ****************************************************************************/
22]]
23-- Bilgus 4/2021
24local oldrb = rb
25local tmploader = require("temploader")
26
27local a_is_loaded = (package.loaded.actions ~= nil)
28local rbold = rb
29
30if not a_is_loaded then
31 --replace the rb table so we can keep the defines out of the namespace
32 rb = {}
33end
34
35--require("actions") -- Contains rb.actions & rb.contexts
36local actions, err = tmploader("actions")
37if err then
38 error(err)
39end
40
41-- Menu Button definitions --
42local button_t = {
43 CANCEL = rb.actions.PLA_CANCEL,
44 DOWN = rb.actions.PLA_DOWN,
45 DOWNR = rb.actions.PLA_DOWN_REPEAT,
46 EXIT = rb.actions.PLA_EXIT,
47 LEFT = rb.actions.PLA_LEFT,
48 LEFTR = rb.actions.PLA_LEFT_REPEAT,
49 RIGHT = rb.actions.PLA_RIGHT,
50 RIGHTR = rb.actions.PLA_RIGHT_REPEAT,
51 SEL = rb.actions.PLA_SELECT,
52 SELREL = rb.actions.PLA_SELECT_REL,
53 SELR = rb.actions.PLA_SELECT_REPEAT,
54 UP = rb.actions.PLA_UP,
55 UPR = rb.actions.PLA_UP_REPEAT,
56}
57
58rb = oldrb
59return button_t