1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-11 13:50:48 -05:00
rofi/include/script-dialog.h

43 lines
958 B
C
Raw Normal View History

#ifndef __SCRIPT_DIALOG_H__
#define __SCRIPT_DIALOG_H__
/**
* Structure holds the arguments for the script_switcher.
*/
typedef struct
{
2014-11-25 02:27:08 -05:00
/** Prompt to display. */
char *name;
2014-11-25 02:27:08 -05:00
/** The script */
char *script_path;
} ScriptOptions;
2014-11-25 02:27:08 -05:00
/**
* @param input Pointer to the user-input string.
* @param data Custom data pointer for callback.
*
* Run the script dialog
*
* @returns SwitcherMode selected by user.
*/
SwitcherMode script_switcher_dialog ( char **input, void *data );
/**
2014-11-25 02:27:08 -05:00
* @param str The input string to parse
*
* Parse an argument string into the right ScriptOptions data object.
* This is off format: <Name>:<Script>
2014-11-25 02:27:08 -05:00
*
* @returns NULL when it fails, a newly allocated ScriptOptions when successful.
*/
ScriptOptions *script_switcher_parse_setup ( const char *str );
/**
2014-11-25 02:27:08 -05:00
* @param sw Handle to the ScriptOption
*
* Free the ScriptOptions block.
*/
void script_switcher_free_options ( ScriptOptions *sw );
#endif