1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

More doxygen cleanups. (1 warning left I don't understand)

This commit is contained in:
Dave Davenport 2021-05-05 22:39:03 +02:00
parent d212c5b2ed
commit fa96f32846
6 changed files with 45 additions and 62 deletions

View file

@ -47,7 +47,7 @@ Mode *create_new_file_browser ( void );
* @param sw Mode object.
* @param mretv return value passed in.
* @param input The user input string.
* @param selected_list The user selected line.
* @param selected_line The user selected line.
* @param path The full path as output.
*
* @returns the state the user selected.

View file

@ -240,7 +240,24 @@ gchar *rofi_escape_markup ( gchar *text );
* @param str The input to match against pattern.
* @param slen Length of str.
*
* FZF like fuzzy sorting algorithm.
* rofi_scorer_fuzzy_evaluate implements a global sequence alignment algorithm to find the maximum accumulated score by
* aligning `pattern` to `str`. It applies when `pattern` is a subsequence of `str`.
*
* Scoring criteria
* - Prefer matches at the start of a word, or the start of subwords in CamelCase/camelCase/camel123 words. See WORD_START_SCORE/CAMEL_SCORE.
* - Non-word characters matter. See NON_WORD_SCORE.
* - The first characters of words of `pattern` receive bonus because they usually have more significance than the rest.
* See PATTERN_START_MULTIPLIER/PATTERN_NON_START_MULTIPLIER.
* - Superfluous characters in `str` will reduce the score (gap penalty). See GAP_SCORE.
* - Prefer early occurrence of the first character. See LEADING_GAP_SCORE/GAP_SCORE.
*
* The recurrence of the dynamic programming:
* dp[i][j]: maximum accumulated score by aligning pattern[0..i] to str[0..j]
* dp[0][j] = leading_gap_penalty(0, j) + score[j]
* dp[i][j] = max(dp[i-1][j-1] + CONSECUTIVE_SCORE, max(dp[i-1][k] + gap_penalty(k+1, j) + score[j] : k < j))
*
* The first dimension can be suppressed since we do not need a matching scheme, which reduces the space complexity from
* O(N*M) to O(M)
*
* @returns the sorting weight.
*/
@ -330,12 +347,22 @@ cairo_surface_t *cairo_image_surface_create_from_svg ( const gchar* file, int he
void parse_ranges ( char *input, rofi_range_pair **list, unsigned int *length );
/**
* @param format The format string
* @param string The string
* @param selected_line selected line
* @param filter filter stringr
* @param format The format string used. See below for possible syntax.
* @param string The selected entry.
* @param selected_line The selected line index.
* @param filter The entered filter.
*
* Output formatted line
* Function that outputs the selected line in the user-specified format.
* Currently the following formats are supported:
* * i: Print the index (0-(N-1))
* * d: Print the index (1-N)
* * s: Print input string.
* * q: Print quoted input string.
* * f: Print the entered filter.
* * F: Print the entered filter, quoted
*
* This functions outputs the formatted string to stdout, appends a newline (\n) character and
* calls flush on the file descriptor.
*/
void rofi_output_formatted_line ( const char *format, const char *string, int selected_line, const char *filter );

View file

@ -33,7 +33,11 @@
* @defgroup View View
*
* The rofi Menu view.
*
* @{
* @}
*/
/**
* @defgroup ViewHandle ViewHandle
* @ingroup View
*
@ -304,9 +308,11 @@ void rofi_view_workers_initialize ( void );
void rofi_view_workers_finalize ( void );
/**
* @param width the width of the monitor.
* @param height the height of the monitor.
*
* Return the current monitor workarea.
*
* @returns the current monitor workarea
*/
void rofi_view_get_current_monitor ( int *width, int *height );

View file

@ -244,7 +244,7 @@ int widget_get_x_pos ( widget *widget );
* @param x A pointer to the absolute X coordinates
* @param y A pointer to the absolute Y coordinates
*
* Will modify @param x and @param y to make them relative to @param widget .
* Will modify param x and param y to make them relative to param widget .
*/
void widget_xy_to_relative ( widget *widget, gint *x, gint *y );
@ -288,7 +288,7 @@ widget *widget_find_mouse_target ( widget *wid, WidgetType type, gint x, gint y
* @param y A pointer to the y coordinate of the click
*
* Trigger an action on widget.
* @param x and @param y are relative to @param wid .
* param x and param y are relative to param wid .
*
* @returns Whether the action was handled or not
*/

View file

@ -902,33 +902,6 @@ static int rofi_scorer_get_score_for ( enum CharClass prev, enum CharClass curr
return 0;
}
/**
* @param pattern The user input to match against.
* @param plen Pattern length.
* @param str The input to match against pattern.
* @param slen Length of str.
*
* rofi_scorer_fuzzy_evaluate implements a global sequence alignment algorithm to find the maximum accumulated score by
* aligning `pattern` to `str`. It applies when `pattern` is a subsequence of `str`.
*
* Scoring criteria
* - Prefer matches at the start of a word, or the start of subwords in CamelCase/camelCase/camel123 words. See WORD_START_SCORE/CAMEL_SCORE.
* - Non-word characters matter. See NON_WORD_SCORE.
* - The first characters of words of `pattern` receive bonus because they usually have more significance than the rest.
* See PATTERN_START_MULTIPLIER/PATTERN_NON_START_MULTIPLIER.
* - Superfluous characters in `str` will reduce the score (gap penalty). See GAP_SCORE.
* - Prefer early occurrence of the first character. See LEADING_GAP_SCORE/GAP_SCORE.
*
* The recurrence of the dynamic programming:
* dp[i][j]: maximum accumulated score by aligning pattern[0..i] to str[0..j]
* dp[0][j] = leading_gap_penalty(0, j) + score[j]
* dp[i][j] = max(dp[i-1][j-1] + CONSECUTIVE_SCORE, max(dp[i-1][k] + gap_penalty(k+1, j) + score[j] : k < j))
*
* The first dimension can be suppressed since we do not need a matching scheme, which reduces the space complexity from
* O(N*M) to O(M)
*
* @returns the sorting weight.
*/
int rofi_scorer_fuzzy_evaluate ( const char *pattern, glong plen, const char *str, glong slen )
{
if ( slen > FUZZY_SCORER_MAX_LENGTH ) {
@ -1187,24 +1160,6 @@ void parse_ranges ( char *input, rofi_range_pair **list, unsigned int *length )
}
}
}
/**
* @param format The format string used. See below for possible syntax.
* @param string The selected entry.
* @param selected_line The selected line index.
* @param filter The entered filter.
*
* Function that outputs the selected line in the user-specified format.
* Currently the following formats are supported:
* * i: Print the index (0-(N-1))
* * d: Print the index (1-N)
* * s: Print input string.
* * q: Print quoted input string.
* * f: Print the entered filter.
* * F: Print the entered filter, quoted
*
* This functions outputs the formatted string to stdout, appends a newline (\n) character and
* calls flush on the file descriptor.
*/
void rofi_output_formatted_line ( const char *format, const char *string, int selected_line, const char *filter )
{
for ( int i = 0; format && format[i]; i++ ) {

View file

@ -477,11 +477,6 @@ static void cleanup ()
* Collected modi
*/
/**
* @param name Search for mode with this name.
*
* @return returns Mode * when found, NULL if not.
*/
Mode * rofi_collect_modi_search ( const char *name )
{
for ( unsigned int i = 0; i < num_available_modi; i++ ) {