From c86a28ca70f26afde9f9170fbd189afd9c96f8c0 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 15 Nov 2016 08:24:06 +0100 Subject: Small code restructure --- include/mode.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'include/mode.h') diff --git a/include/mode.h b/include/mode.h index b140ebce..e3914e29 100644 --- a/include/mode.h +++ b/include/mode.h @@ -7,6 +7,11 @@ * The 'object' that makes a mode in rofi. * @{ */ + +/** + * Type of a mode. + * Access should be done via mode_* functions. + */ typedef struct rofi_mode Mode; /** @@ -152,9 +157,31 @@ void *mode_get_private_data ( const Mode *mode ); */ void mode_set_private_data ( Mode *mode, void *pd ); +/** + * @param mode The mode to query + * + * Get the name of the mode as it should be presented to the user. + * + * @return the user visible name of the mode + */ const char *mode_get_display_name ( const Mode *mode ); +/** + * @param mode The mode to query + * + * Should be called once for each mode. This adds the display-name configuration option for the mode. + */ void mode_set_config ( Mode *mode ); + +/** + * @param mode The mode to query + * @param intput The input to process + * + * This processes the input so it can be used for matching and sorting. + * This includes removing pango markup. + * + * @returns a newly allocated string + */ char * mode_preprocess_input ( Mode *mode, const char *input ); /*@}*/ #endif -- cgit v1.2.3