summaryrefslogtreecommitdiffstats
path: root/include/mode.h
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-11-15 08:24:06 +0100
committerDave Davenport <qball@gmpclient.org>2016-11-15 08:24:06 +0100
commitc86a28ca70f26afde9f9170fbd189afd9c96f8c0 (patch)
treecc681b31b8342f0ef942fc45c11ba08f2d7411e5 /include/mode.h
parent0a11dd80ec703aeae3f83e3b194316ecd3195db0 (diff)
Small code restructure
Diffstat (limited to 'include/mode.h')
-rw-r--r--include/mode.h27
1 files changed, 27 insertions, 0 deletions
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