summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-01-20 18:57:41 +0100
committerDave Davenport <qball@gmpclient.org>2016-01-20 18:57:41 +0100
commitd9ac267960daee42bd815e91d3ed79b8a37b2dc5 (patch)
tree6d800d48b1b7538e3f06e958bd0a92291a6af084 /include
parent70c1012e91270d1294c58a232767f8eb2b60b6a7 (diff)
parenteadf455c8c4d74a9b66a47ad97de274fb3d16241 (diff)
Merge remote-tracking branch 'origin/master' into glib-loop
Diffstat (limited to 'include')
-rw-r--r--include/rofi.h19
-rw-r--r--include/textbox.h18
2 files changed, 23 insertions, 14 deletions
diff --git a/include/rofi.h b/include/rofi.h
index a43a29eb..95fd06c6 100644
--- a/include/rofi.h
+++ b/include/rofi.h
@@ -17,6 +17,7 @@
* Pointer to xdg cache directory.
*/
extern const char *cache_dir;
+typedef struct MenuState MenuState;
/**
* @param msg The error message to show.
@@ -49,12 +50,10 @@ typedef enum
*
* @returns The command issued (see MenuReturn)
*/
-MenuReturn menu ( Mode *sw,
- char **input, char *prompt,
- unsigned int *selected_line,
- unsigned int *next_pos,
+MenuState *menu ( Mode *sw,
+ char *input, char *prompt,
const char *message, MenuFlags flags )
-__attribute__ ( ( nonnull ( 1, 2, 3, 4 ) ) );
+__attribute__ ( ( nonnull ( 1, 2, 3 ) ) );
/** Reset terminal */
#define color_reset "\033[0m"
@@ -84,5 +83,15 @@ int show_error_message ( const char *msg, int markup );
" * The version of rofi you are running\n\n" \
" <i>https://github.com/DaveDavenport/rofi/</i>"
#define ERROR_MSG_MARKUP TRUE
+
+MenuReturn menu_state_get_return_value ( const MenuState *state );
+unsigned int menu_state_get_selected_line ( const MenuState *state );
+unsigned int menu_state_get_next_position ( const MenuState *state );
+void menu_state_itterrate ( MenuState *state, XEvent *event );
+unsigned int menu_state_get_completed ( const MenuState *state );
+const char * menu_state_get_user_input ( const MenuState *state );
+void menu_state_free ( MenuState *state );
+void menu_state_restart ( MenuState *state );
+void menu_state_set_selected_line ( MenuState *state, unsigned int selected_line );
/*@}*/
#endif
diff --git a/include/textbox.h b/include/textbox.h
index fe59b02a..ecc52784 100644
--- a/include/textbox.h
+++ b/include/textbox.h
@@ -40,15 +40,15 @@ typedef struct
typedef enum
{
- TB_AUTOHEIGHT = 1 << 0,
- TB_AUTOWIDTH = 1 << 1,
- TB_LEFT = 1 << 16,
- TB_RIGHT = 1 << 17,
- TB_CENTER = 1 << 18,
- TB_EDITABLE = 1 << 19,
- TB_MARKUP = 1 << 20,
- TB_WRAP = 1 << 21,
- TB_PASSWORD = 1 << 22,
+ TB_AUTOHEIGHT = 1 << 0,
+ TB_AUTOWIDTH = 1 << 1,
+ TB_LEFT = 1 << 16,
+ TB_RIGHT = 1 << 17,
+ TB_CENTER = 1 << 18,
+ TB_EDITABLE = 1 << 19,
+ TB_MARKUP = 1 << 20,
+ TB_WRAP = 1 << 21,
+ TB_PASSWORD = 1 << 22,
} TextboxFlags;
typedef enum