diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-01-07 21:27:20 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-01-07 21:27:20 +0100 |
commit | fa51aeb484374cf22493d0da81e298a9052f1451 (patch) | |
tree | 245055e789ece34b0b6945cc0e949ea4a599e2fc /include/mode-private.h | |
parent | e8daff0f6ad49cd17b225622fa1875ee2960a70f (diff) |
More splitting and abstracting.
Diffstat (limited to 'include/mode-private.h')
-rw-r--r-- | include/mode-private.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/include/mode-private.h b/include/mode-private.h index f8bf9879..9c02d847 100644 --- a/include/mode-private.h +++ b/include/mode-private.h @@ -1,11 +1,11 @@ #ifndef ROFI_MODE_PRIVATE_H #define ROFI_MODE_PRIVATE_H -typedef void ( *switcher_free )( Mode *data ); +typedef void ( *_mode_free )( Mode *data ); -typedef char * ( *switcher_get_display_value )( const Mode *sw, unsigned int selected_line, int *state, int get_entry ); +typedef char * ( *_mode_get_display_value )( const Mode *sw, unsigned int selected_line, int *state, int get_entry ); -typedef char * ( *switcher_get_completion )( const Mode *sw, unsigned int selected_line ); +typedef char * ( *_mode_get_completion )( const Mode *sw, unsigned int selected_line ); /** * @param tokens List of (input) tokens to match. * @param input The entry to match against. @@ -17,7 +17,7 @@ typedef char * ( *switcher_get_completion )( const Mode *sw, unsigned int select * * @returns 1 when it matches, 0 if not. */ -typedef int ( *switcher_token_match )( const Mode *data, char **tokens, int not_ascii, int case_sensitive, unsigned int index ); +typedef int ( *_mode_token_match )( const Mode *data, char **tokens, int not_ascii, int case_sensitive, unsigned int index ); typedef void ( *__mode_init )( Mode *sw ); @@ -25,9 +25,9 @@ typedef unsigned int ( *__mode_get_num_entries )( const Mode *sw ); typedef void ( *__mode_destroy )( Mode *sw ); -typedef ModeMode ( *switcher_result )( Mode *sw, int menu_retv, char **input, unsigned int selected_line ); +typedef ModeMode ( *_mode_result )( Mode *sw, int menu_retv, char **input, unsigned int selected_line ); -typedef int ( *switcher_is_not_ascii )( const Mode *sw, unsigned int index ); +typedef int ( *_mode_is_not_ascii )( const Mode *sw, unsigned int index ); /** * Structure defining a switcher. @@ -48,32 +48,32 @@ struct _Mode * A switcher normally consists of the following parts: */ /** Initialize the Mode */ - __mode_init _init; + __mode_init _init; /** Destroy the switcher, e.g. free all its memory. */ - __mode_destroy _destroy; + __mode_destroy _destroy; /** Get number of entries to display. (unfiltered). */ - __mode_get_num_entries _get_num_entries; + __mode_get_num_entries _get_num_entries; /** Check if the element is ascii. */ - switcher_is_not_ascii is_not_ascii; + _mode_is_not_ascii _is_not_ascii; /** Process the result of the user selection. */ - switcher_result result; + _mode_result _result; /** Token match. */ - switcher_token_match token_match; + _mode_token_match _token_match; /** Get the string to display for the entry. */ - switcher_get_display_value mgrv; + _mode_get_display_value _get_display_value; /** Get the 'completed' entry. */ - switcher_get_completion get_completion; + _mode_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; + _mode_free free; /** Extra fields for script */ - void *ed; + void *ed; }; #endif // ROFI_MODE_PRIVATE_H |