diff options
author | Dave Davenport <qball@gmpclient.org> | 2015-11-25 09:26:38 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2015-11-25 09:26:38 +0100 |
commit | 3c411433b467dcc979213f139f1b11dd01ed32b0 (patch) | |
tree | d9b4d432605268af0a00321dc0a8162db19c0637 /include | |
parent | b7ec4fa6fb70b35f08bb09ee1328730efb44d71a (diff) |
Big rename from Switcher to Mode internal, to match with user terminology
Diffstat (limited to 'include')
-rw-r--r-- | include/dialogs/combi.h | 2 | ||||
-rw-r--r-- | include/dialogs/drun.h | 2 | ||||
-rw-r--r-- | include/dialogs/run.h | 2 | ||||
-rw-r--r-- | include/dialogs/script.h | 2 | ||||
-rw-r--r-- | include/dialogs/ssh.h | 2 | ||||
-rw-r--r-- | include/dialogs/window.h | 4 | ||||
-rw-r--r-- | include/rofi.h | 58 |
7 files changed, 36 insertions, 36 deletions
diff --git a/include/dialogs/combi.h b/include/dialogs/combi.h index d36c5a13..fc3a64ae 100644 --- a/include/dialogs/combi.h +++ b/include/dialogs/combi.h @@ -1,5 +1,5 @@ #ifndef __COMBI_DIALOG_H__ #define __COMBI_DIALOG_H__ -extern Switcher combi_mode; +extern Mode combi_mode; #endif diff --git a/include/dialogs/drun.h b/include/dialogs/drun.h index 2c50211f..ac493a6d 100644 --- a/include/dialogs/drun.h +++ b/include/dialogs/drun.h @@ -1,5 +1,5 @@ #ifndef __DRUN_DIALOG_H__ #define __DRUN_DIALOG_H__ -extern Switcher drun_mode; +extern Mode drun_mode; #endif diff --git a/include/dialogs/run.h b/include/dialogs/run.h index c95944f4..9a78605c 100644 --- a/include/dialogs/run.h +++ b/include/dialogs/run.h @@ -1,5 +1,5 @@ #ifndef __RUN_DIALOG_H__ #define __RUN_DIALOG_H__ -extern Switcher run_mode; +extern Mode run_mode; #endif diff --git a/include/dialogs/script.h b/include/dialogs/script.h index 68d5248c..aa73cb09 100644 --- a/include/dialogs/script.h +++ b/include/dialogs/script.h @@ -9,5 +9,5 @@ * * @returns NULL when it fails, a newly allocated ScriptOptions when successful. */ -Switcher *script_switcher_parse_setup ( const char *str ); +Mode *script_switcher_parse_setup ( const char *str ); #endif diff --git a/include/dialogs/ssh.h b/include/dialogs/ssh.h index d6fbe572..c5ff29dc 100644 --- a/include/dialogs/ssh.h +++ b/include/dialogs/ssh.h @@ -1,5 +1,5 @@ #ifndef __SSH_DIALOG_H__ #define __SSH_DIALOG_H__ -extern Switcher ssh_mode; +extern Mode ssh_mode; #endif diff --git a/include/dialogs/window.h b/include/dialogs/window.h index 096d475e..909e4cad 100644 --- a/include/dialogs/window.h +++ b/include/dialogs/window.h @@ -4,7 +4,7 @@ #include <config.h> #ifdef WINDOW_MODE -extern Switcher window_mode; -extern Switcher window_mode_cd; +extern Mode window_mode; +extern Mode window_mode_cd; #endif // WINDOW_MODE #endif // __WINDOW_DIALOG_H__ diff --git a/include/rofi.h b/include/rofi.h index 60fdf6b6..b46f6ce1 100644 --- a/include/rofi.h +++ b/include/rofi.h @@ -15,7 +15,7 @@ */ extern const char *cache_dir; -typedef struct _Switcher Switcher; +typedef struct _Mode Mode; /** * Enum used to sum the possible states of ROFI. */ @@ -29,7 +29,7 @@ typedef enum RELOAD_DIALOG = 1002, /** Previous dialog */ PREVIOUS_DIALOG = 1003 -} SwitcherMode; +} ModeMode; /** * State returned by the rofi window. @@ -96,7 +96,7 @@ typedef enum _WindowLocation } WindowLocation; /** - * @param sw the Switcher to show. + * @param sw the Mode to show. * @param lines An array of strings to display. * @param num_lines Length of the array with strings to display. * @param input A pointer to a string where the inputted data is placed. @@ -111,7 +111,7 @@ typedef enum _WindowLocation * * @returns The command issued (see MenuReturn) */ -MenuReturn menu ( Switcher *sw, char **input, char *prompt, unsigned int *selected_line, unsigned int *next_pos, const char *message ) +MenuReturn menu ( Mode *sw, char **input, char *prompt, unsigned int *selected_line, unsigned int *next_pos, const char *message ) __attribute__ ( ( nonnull ( 1, 2, 3, 4 ) ) ); /** * Settings @@ -119,8 +119,8 @@ __attribute__ ( ( nonnull ( 1, 2, 3, 4 ) ) ); typedef struct _Settings { - /** List of enabled switchers */ - char *switchers; + /** List of enabled modi */ + char *modi; /** Window settings */ unsigned int window_opacity; /** Border width */ @@ -193,7 +193,7 @@ typedef struct _Settings char separator; /** Height of an element in #chars */ int element_height; - /** Sidebar mode, show the switchers */ + /** Sidebar mode, show the modi */ unsigned int sidebar_mode; /** Lazy filter limit. */ unsigned int lazy_filter_limit; @@ -203,7 +203,7 @@ typedef struct _Settings unsigned int parse_hosts; /** Knonw_hosts file parsing */ unsigned int parse_known_hosts; - /** Combi Switchers */ + /** Combi Modes */ char *combi_modi; /** Fuzzy match */ unsigned int fuzzy; @@ -243,11 +243,11 @@ extern Settings config; */ void error_dialog ( const char *msg, int markup ); -typedef void ( *switcher_free )( Switcher *data ); +typedef void ( *switcher_free )( Mode *data ); -typedef char * ( *switcher_get_display_value )( const Switcher *sw, unsigned int selected_line, int *state, int get_entry ); +typedef char * ( *switcher_get_display_value )( const Mode *sw, unsigned int selected_line, int *state, int get_entry ); -typedef char * ( *switcher_get_completion )( const Switcher *sw, unsigned int selected_line ); +typedef char * ( *switcher_get_completion )( const Mode *sw, unsigned int selected_line ); /** * @param tokens List of (input) tokens to match. * @param input The entry to match against. @@ -259,24 +259,24 @@ typedef char * ( *switcher_get_completion )( const Switcher *sw, unsigned int se * * @returns 1 when it matches, 0 if not. */ -typedef int ( *switcher_token_match )( const Switcher *data, char **tokens, int not_ascii, int case_sensitive, unsigned int index ); +typedef int ( *switcher_token_match )( const Mode *data, char **tokens, int not_ascii, int case_sensitive, unsigned int index ); -typedef void ( *switcher_init )( Switcher *sw ); +typedef void ( *switcher_init )( Mode *sw ); -typedef unsigned int ( *switcher_get_num_entries )( const Switcher *sw ); +typedef unsigned int ( *switcher_get_num_entries )( const Mode *sw ); -typedef void ( *switcher_destroy )( Switcher *sw ); +typedef void ( *switcher_destroy )( Mode *sw ); -typedef SwitcherMode ( *switcher_result )( Switcher *sw, int menu_retv, char **input, unsigned int selected_line ); +typedef ModeMode ( *switcher_result )( Mode *sw, int menu_retv, char **input, unsigned int selected_line ); -typedef int ( *switcher_is_not_ascii )( const Switcher *sw, unsigned int index ); +typedef int ( *switcher_is_not_ascii )( const Mode *sw, unsigned int index ); /** * Structure defining a switcher. * It consists of a name, callback and if enabled * a textbox for the sidebar-mode. */ -struct _Switcher +struct _Mode { // Name (max 31 char long) char name[32]; @@ -289,32 +289,32 @@ struct _Switcher /** * A switcher normally consists of the following parts: */ - // Initialize the Switcher - switcher_init init; + // Initialize the Mode + switcher_init init; // Destroy the switcher, e.g. free all its memory. - switcher_destroy destroy; + switcher_destroy destroy; // Get number of entries to display. (unfiltered). - switcher_get_num_entries get_num_entries; + switcher_get_num_entries get_num_entries; // Check if the element is ascii. - switcher_is_not_ascii is_not_ascii; + switcher_is_not_ascii is_not_ascii; // Process the result of the user selection. - switcher_result result; + switcher_result result; // Token match. - switcher_token_match token_match; + switcher_token_match token_match; // Get the string to display for the entry. switcher_get_display_value mgrv; // Get the 'completed' entry. - switcher_get_completion get_completion; + switcher_get_completion get_completion; // Pointer to private data. - void *private_data; + void *private_data; // Free SWitcher // Only to be used when the switcher object itself is dynamic. // And has data in `ed` - switcher_free free; + switcher_free free; // Extra fields for script - void *ed; + void *ed; }; #define color_reset "\033[0m" |