mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Comments?
This commit is contained in:
parent
0d228cc265
commit
477b10fb2f
1 changed files with 38 additions and 1 deletions
|
@ -19,32 +19,69 @@
|
|||
|
||||
extern const char *cache_dir;
|
||||
|
||||
/**
|
||||
* Enum used to sum the possible states of ROFI.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
/** Show the window switcher */
|
||||
WINDOW_SWITCHER,
|
||||
/** Show the run dialog */
|
||||
RUN_DIALOG,
|
||||
/** Show the ssh dialog */
|
||||
SSH_DIALOG,
|
||||
/** Number of cycle-able dialogs */
|
||||
NUM_DIALOGS,
|
||||
/** Dmenu mode */
|
||||
DMENU_DIALOG,
|
||||
/** Exit. */
|
||||
MODE_EXIT,
|
||||
/** Skip to the next cycle-able dialog. */
|
||||
NEXT_DIALOG
|
||||
} SwitcherMode;
|
||||
|
||||
|
||||
/**
|
||||
* State returned by the rofi window.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
/** Entry is selected. */
|
||||
MENU_OK = 0,
|
||||
/** User canceled the operation. (e.g. pressed escape) */
|
||||
MENU_CANCEL = -1,
|
||||
/** User requested a mode switch */
|
||||
MENU_NEXT = -2,
|
||||
/** Custom (non-matched) input was entered. */
|
||||
MENU_CUSTOM_INPUT = -3,
|
||||
/** User wanted to delete entry from history. */
|
||||
MENU_ENTRY_DELETE = -4
|
||||
} MenuReturn;
|
||||
|
||||
|
||||
/**
|
||||
* Function prototype for the matching algorithm.
|
||||
*/
|
||||
typedef int ( *menu_match_cb )( char **tokens, const char *input, int index, void *data );
|
||||
|
||||
/**
|
||||
* @param lines An array of strings to display.
|
||||
* @param input A pointer to a string where the inputted data is placed.
|
||||
* @param prompt The prompt to show.
|
||||
* @param time The current time (used for window interaction.)
|
||||
* @param shift pointer to integer that is set to the state of the shift key.
|
||||
* @param mmc Menu menu match callback, used for matching user input.
|
||||
* @param mmc_data data to pass to mmc.
|
||||
* @param selected_line pointer to integer holding the selected line.
|
||||
*
|
||||
* Main menu callback.
|
||||
*
|
||||
* @returns The command issued (see MenuReturn)
|
||||
*/
|
||||
MenuReturn menu ( char **lines, char **input, char *prompt,
|
||||
Time *time, int *shift,
|
||||
menu_match_cb mmc, void *mmc_data,
|
||||
int *selected_line );
|
||||
int *selected_line ) __attribute__ ((nonnull(1,2,3,8)));
|
||||
|
||||
void catch_exit ( __attribute__( ( unused ) ) int sig );
|
||||
|
||||
|
|
Loading…
Reference in a new issue