Change signature of some menu functions

This commit is contained in:
twinaphex 2015-09-27 23:03:12 +02:00
parent c982e1d6eb
commit 6d971631df
3 changed files with 21 additions and 21 deletions

View File

@ -60,6 +60,25 @@
extern "C" {
#endif
enum menu_action
{
MENU_ACTION_NOOP = 0,
MENU_ACTION_UP,
MENU_ACTION_DOWN,
MENU_ACTION_LEFT,
MENU_ACTION_RIGHT,
MENU_ACTION_OK,
MENU_ACTION_SEARCH,
MENU_ACTION_SCAN,
MENU_ACTION_CANCEL,
MENU_ACTION_INFO,
MENU_ACTION_SELECT,
MENU_ACTION_START,
MENU_ACTION_SCROLL_DOWN,
MENU_ACTION_SCROLL_UP,
MENU_ACTION_TOGGLE
};
typedef enum
{
MENU_FILE_NONE = 0,
@ -173,7 +192,7 @@ void *menu_init(const void *data);
*
* Returns: 0 on success, -1 if we need to quit out of the loop.
**/
int menu_iterate(bool render_this_frame, unsigned action);
int menu_iterate(bool render_this_frame, enum menu_action action);
int menu_iterate_render(void);

View File

@ -25,25 +25,6 @@
extern "C" {
#endif
enum menu_action
{
MENU_ACTION_UP,
MENU_ACTION_DOWN,
MENU_ACTION_LEFT,
MENU_ACTION_RIGHT,
MENU_ACTION_OK,
MENU_ACTION_SEARCH,
MENU_ACTION_SCAN,
MENU_ACTION_CANCEL,
MENU_ACTION_INFO,
MENU_ACTION_SELECT,
MENU_ACTION_START,
MENU_ACTION_SCROLL_DOWN,
MENU_ACTION_SCROLL_UP,
MENU_ACTION_TOGGLE,
MENU_ACTION_NOOP
};
enum menu_input_pointer_state
{
MENU_POINTER_X_AXIS = 0,

View File

@ -214,7 +214,7 @@ static enum action_iterate_type action_iterate_type(uint32_t hash)
*
* Returns: 0 on success, -1 if we need to quit out of the loop.
**/
int menu_iterate(bool render_this_frame, unsigned action)
int menu_iterate(bool render_this_frame, enum menu_action action)
{
size_t selection;
menu_entry_t entry;