diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-01-11 09:20:19 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-01-11 09:20:19 +0100 |
commit | 4452b08288c25fa833e22c97b57045ec5888b547 (patch) | |
tree | 6757fdbb677b585315beb9d6866573eff3f1a6f0 /include/helper.h | |
parent | 56c787690fdc8254ed1a6a0c205accfe490d8354 (diff) |
Move fzf matcher into helper
Diffstat (limited to 'include/helper.h')
-rw-r--r-- | include/helper.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/helper.h b/include/helper.h index 3398c0ef..d580c4df 100644 --- a/include/helper.h +++ b/include/helper.h @@ -206,5 +206,19 @@ char * rofi_latin_to_utf8_strdup ( const char *input, gssize length ); * @returns the updated retv list. */ PangoAttrList *token_match_get_pango_attr ( ThemeHighlight th, GRegex **tokens, const char *input, PangoAttrList *retv ); + + + +/** + * @param pattern The user input to match against. + * @param plen Pattern length. + * @param str The input to match against pattern. + * @param slen Lenght of str. + * + * FZF like fuzzy sorting algorithm. + * + * @returns the sorting weight. + */ +int rofi_scorer_fuzzy_evaluate ( const char *pattern, glong plen, const char *str, glong slen ); /*@}*/ #endif // ROFI_HELPER_H |