diff options
author | Qball Cow <qball@gmpclient.org> | 2014-02-01 14:03:23 +0100 |
---|---|---|
committer | Qball Cow <qball@gmpclient.org> | 2014-02-01 14:03:23 +0100 |
commit | 6177c90a87ce3ace794651a58a6e8fb536338d4d (patch) | |
tree | 89c4d3f789a261e0efbaa577a2dc4cb41bd139fc /include | |
parent | 8310a97219ff831e19116bbfc6a2e4735bff1350 (diff) |
Restructure for and add option to delete entry from history.
Diffstat (limited to 'include')
-rw-r--r-- | include/simpleswitcher.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/simpleswitcher.h b/include/simpleswitcher.h index d4653428..0c72a87b 100644 --- a/include/simpleswitcher.h +++ b/include/simpleswitcher.h @@ -30,11 +30,21 @@ typedef enum { NEXT_DIALOG } SwitcherMode; +typedef enum { + MENU_OK = 0, + MENU_CANCEL = -1, + MENU_NEXT = -2, + MENU_CUSTOM_INPUT = -3, + MENU_ENTRY_DELETE = -4 + +} MenuReturn; typedef int ( *menu_match_cb )( char **tokens, const char *input, int index, void *data ); -int menu( char **lines, char **input, char *prompt, - Time *time, int *shift, menu_match_cb mmc, void *mmc_data ); +MenuReturn menu( char **lines, char **input, char *prompt, + Time *time, int *shift, + menu_match_cb mmc, void *mmc_data, + int *selected_line ); /** |