2003-03-12 20:21:30 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
2008-05-05 10:32:46 +00:00
|
|
|
* Copyright (C) 2002 Björn Stenberg
|
2003-03-12 20:21:30 +00:00
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2003-03-12 20:21:30 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef _ONPLAY_H_
|
|
|
|
#define _ONPLAY_H_
|
|
|
|
|
2022-12-15 08:07:18 +00:00
|
|
|
#ifdef HAVE_HOTKEY
|
|
|
|
#include "menu.h"
|
|
|
|
#endif
|
|
|
|
|
2010-04-01 03:14:44 +00:00
|
|
|
int onplay(char* file, int attr, int from_screen, bool hotkey);
|
2022-04-12 17:31:24 +00:00
|
|
|
int get_onplay_context(void);
|
2003-03-12 20:21:30 +00:00
|
|
|
|
2003-07-01 21:05:43 +00:00
|
|
|
enum {
|
2007-03-01 11:14:46 +00:00
|
|
|
ONPLAY_MAINMENU = -1,
|
|
|
|
ONPLAY_OK = 0,
|
2003-07-01 21:05:43 +00:00
|
|
|
ONPLAY_RELOAD_DIR,
|
2010-02-20 19:06:39 +00:00
|
|
|
ONPLAY_START_PLAY,
|
|
|
|
ONPLAY_PLAYLIST,
|
2020-08-01 02:45:10 +00:00
|
|
|
ONPLAY_PLUGIN,
|
2022-11-22 07:12:17 +00:00
|
|
|
#ifdef HAVE_HOTKEY
|
|
|
|
ONPLAY_FUNC_RETURN, /* for use in hotkey_assignment only */
|
|
|
|
#endif
|
2003-07-01 21:05:43 +00:00
|
|
|
};
|
|
|
|
|
2010-04-08 01:43:50 +00:00
|
|
|
#ifdef HAVE_HOTKEY
|
2010-05-09 02:02:51 +00:00
|
|
|
|
|
|
|
enum hotkey_action {
|
|
|
|
HOTKEY_OFF = 0,
|
|
|
|
HOTKEY_VIEW_PLAYLIST,
|
2022-04-18 09:34:28 +00:00
|
|
|
HOTKEY_PROPERTIES,
|
|
|
|
HOTKEY_PICTUREFLOW,
|
2010-05-09 02:02:51 +00:00
|
|
|
HOTKEY_SHOW_TRACK_INFO,
|
|
|
|
HOTKEY_PITCHSCREEN,
|
|
|
|
HOTKEY_OPEN_WITH,
|
|
|
|
HOTKEY_DELETE,
|
2022-04-18 09:34:28 +00:00
|
|
|
HOTKEY_BOOKMARK,
|
|
|
|
HOTKEY_PLUGIN,
|
2010-05-09 02:02:51 +00:00
|
|
|
HOTKEY_INSERT,
|
2010-05-11 13:40:25 +00:00
|
|
|
HOTKEY_INSERT_SHUFFLED,
|
2010-05-09 02:02:51 +00:00
|
|
|
};
|
2022-12-15 08:07:18 +00:00
|
|
|
enum hotkey_flags {
|
|
|
|
HOTKEY_FLAG_NONE = 0x0,
|
|
|
|
HOTKEY_FLAG_WPS = 0x1,
|
|
|
|
HOTKEY_FLAG_TREE = 0x2,
|
|
|
|
HOTKEY_FLAG_NOSBS = 0x4,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct hotkey_assignment {
|
|
|
|
int action; /* hotkey_action */
|
|
|
|
int lang_id; /* Language ID */
|
2022-12-17 07:43:41 +00:00
|
|
|
struct menu_func_param func; /* Function to run if this entry is selected */
|
2022-12-15 08:07:18 +00:00
|
|
|
int16_t return_code; /* What to return after the function is run. */
|
|
|
|
uint16_t flags; /* Flags what context, display options */
|
|
|
|
}; /* (Pick ONPLAY_FUNC_RETURN to use function's return value) */
|
|
|
|
|
|
|
|
const struct hotkey_assignment *get_hotkey(int action);
|
2010-04-08 01:43:50 +00:00
|
|
|
#endif
|
|
|
|
|
2011-07-20 14:11:15 +00:00
|
|
|
/* needed for the playlist viewer.. eventually clean this up */
|
2022-08-16 11:10:13 +00:00
|
|
|
void onplay_show_playlist_cat_menu(const char* track_name, int attr,
|
|
|
|
void (*add_to_pl_cb));
|
2021-12-29 19:24:51 +00:00
|
|
|
void onplay_show_playlist_menu(const char* path, void (*playlist_insert_cb));
|
2011-07-20 14:11:15 +00:00
|
|
|
|
2003-03-12 20:21:30 +00:00
|
|
|
#endif
|