mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Comment some header files.
This commit is contained in:
parent
ce25bf3f50
commit
baec02cf1b
5 changed files with 169 additions and 9 deletions
|
@ -1,9 +1,18 @@
|
|||
#ifndef __DMENU_DIALOG_H__
|
||||
#define __DMENU_DIALOG_H__
|
||||
|
||||
extern char *dmenu_prompt;
|
||||
/**
|
||||
* Returns TRUE when success, FALSE when canceled.
|
||||
* Prompt used in dmenu.
|
||||
*/
|
||||
extern char *dmenu_prompt;
|
||||
|
||||
|
||||
/**
|
||||
* @param input Pointer to the user-input string.
|
||||
*
|
||||
* dmenu dialog.
|
||||
*
|
||||
* @returns TRUE if script was successful.
|
||||
*/
|
||||
int dmenu_switcher_dialog ( char **input );
|
||||
|
||||
|
|
|
@ -1,23 +1,91 @@
|
|||
#ifndef __HELPER_H__
|
||||
#define __HELPER_H__
|
||||
|
||||
int helper_parse_setup ( char * string, char ***output, int *lenght, ... );
|
||||
/**
|
||||
* @param string The input string.
|
||||
* @param output Pointer to 2 dimensional array with parsed string.
|
||||
* @param length Length of 2 dimensional array.
|
||||
* @param ... Key, value parse. Replaces the string Key with value.
|
||||
*
|
||||
* Parses a string into arguments. While replacing keys with values.
|
||||
*
|
||||
* @returns TRUE when successful, FALSE when failed.
|
||||
*/
|
||||
int helper_parse_setup ( char * string, char ***output, int *length, ... );
|
||||
|
||||
/**
|
||||
* Implementation of fgets with custom separator.
|
||||
*/
|
||||
char* fgets_s ( char* s, int n, FILE *iop, char sep );
|
||||
|
||||
/**
|
||||
* @param input The input string.
|
||||
*
|
||||
* Tokenize the string on spaces.
|
||||
*
|
||||
* @returns a newly allocated 2 dimensional array of strings.
|
||||
*/
|
||||
char **tokenize ( const char *input );
|
||||
|
||||
|
||||
/**
|
||||
* @param argc Number of arguments.
|
||||
* @param argv 2 dimensional array of arguments.
|
||||
* @param key The key to search for
|
||||
* @param val Pointer to the string to set to the key value (if found)
|
||||
*
|
||||
* Parse command line argument 'key' to character.
|
||||
* This one supports character escaping.
|
||||
*
|
||||
* @returns TRUE if key was found and val was set.
|
||||
*/
|
||||
int find_arg_char ( const int argc, char * const argv[], const char * const key, char *val );
|
||||
|
||||
/**
|
||||
* @param argc Number of arguments.
|
||||
* @param argv 2 dimensional array of arguments.
|
||||
* @param key The key to search for
|
||||
* @param val Pointer to the string to set to the key value (if found)
|
||||
*
|
||||
* Parse command line argument 'key' to unsigned int.
|
||||
*
|
||||
* @returns TRUE if key was found and val was set.
|
||||
*/
|
||||
int find_arg_uint ( const int argc, char * const argv[], const char * const key, unsigned int *val );
|
||||
|
||||
|
||||
/**
|
||||
* @param argc Number of arguments.
|
||||
* @param argv 2 dimensional array of arguments.
|
||||
* @param key The key to search for
|
||||
* @param val Pointer to the string to set to the key value (if found)
|
||||
*
|
||||
* Parse command line argument 'key' to int.
|
||||
*
|
||||
* @returns TRUE if key was found and val was set.
|
||||
*/
|
||||
int find_arg_int ( const int argc, char * const argv[], const char * const key, int *val );
|
||||
|
||||
|
||||
/**
|
||||
* @param argc Number of arguments.
|
||||
* @param argv 2 dimensional array of arguments.
|
||||
* @param key The key to search for
|
||||
* @param val Pointer to the string to set to the key value (if found)
|
||||
*
|
||||
* Parse command line argument 'key' to string.
|
||||
*
|
||||
* @returns TRUE if key was found and val was set.
|
||||
*/
|
||||
int find_arg_str ( const int argc, char * const argv[], const char * const key, char** val );
|
||||
|
||||
/**
|
||||
* @param argc Number of arguments.
|
||||
* @param argv 2 dimensional array of arguments.
|
||||
* @param key The key to search for
|
||||
*
|
||||
* Check if key is passed as argument.
|
||||
*
|
||||
* @returns return position of string or -1 if not found.
|
||||
*/
|
||||
int find_arg ( const int argc, char * const argv[], const char * const key );
|
||||
|
||||
#endif // __HELPER_H__
|
||||
|
|
|
@ -2,7 +2,14 @@
|
|||
#define __RUN_DIALOG_H__
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param input Pointer to the user-input string.
|
||||
* @param data Custom data pointer for callback.
|
||||
*
|
||||
* Run the run dialog
|
||||
*
|
||||
* @returns SwitcherMode selected by user.
|
||||
*/
|
||||
SwitcherMode run_switcher_dialog ( char **input, void *data );
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
#ifndef __SSH_DIALOG_H__
|
||||
#define __SSH_DIALOG_H__
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param input Pointer to the user-input string.
|
||||
* @param data Custom data pointer for callback.
|
||||
*
|
||||
* Run the ssh dialog
|
||||
*
|
||||
* @returns SwitcherMode selected by user.
|
||||
*/
|
||||
SwitcherMode ssh_switcher_dialog ( char **input, void *data );
|
||||
|
||||
#endif
|
||||
|
|
|
@ -41,9 +41,19 @@ textbox* textbox_create ( Window parent,
|
|||
short x, short y, short w, short h,
|
||||
TextBoxFontType tbft,
|
||||
char *text );
|
||||
|
||||
/**
|
||||
* @param tb Handle to the textbox
|
||||
*
|
||||
* Free the textbox and all allocated memory.
|
||||
*/
|
||||
void textbox_free ( textbox *tb );
|
||||
|
||||
/**
|
||||
* @param tb Handle to the textbox
|
||||
* @param tbft The style of font to render.
|
||||
*
|
||||
* Set the font render style.
|
||||
*/
|
||||
void textbox_font ( textbox *tb, TextBoxFontType tbft );
|
||||
|
||||
void textbox_text ( textbox *tb, char *text );
|
||||
|
@ -57,6 +67,7 @@ void textbox_cursor ( textbox *tb, int pos );
|
|||
void textbox_move ( textbox *tb, int x, int y );
|
||||
|
||||
void textbox_insert ( textbox *tb, int pos, char *str );
|
||||
|
||||
/**
|
||||
* @param tb Handle to the textbox
|
||||
*
|
||||
|
@ -86,17 +97,76 @@ void textbox_setup (
|
|||
*/
|
||||
void textbox_cleanup ();
|
||||
|
||||
/**
|
||||
* @param tb Handle to the textbox
|
||||
*
|
||||
* Get the height of the textbox
|
||||
*
|
||||
* @returns the height of the textbox in pixels.
|
||||
*/
|
||||
int textbox_get_height ( textbox *tb );
|
||||
|
||||
/**
|
||||
* @param tb Handle to the textbox
|
||||
*
|
||||
* Get the width of the textbox
|
||||
*
|
||||
* @returns the width of the textbox in pixels.
|
||||
*/
|
||||
int textbox_get_width ( textbox *tb );
|
||||
|
||||
/**
|
||||
* @param tb Handle to the textbox
|
||||
*
|
||||
* Get the height of the rendered string.
|
||||
*
|
||||
* @returns the height of the string in pixels.
|
||||
*/
|
||||
int textbox_get_font_height ( textbox *tb );
|
||||
|
||||
/**
|
||||
* @param tb Handle to the textbox
|
||||
*
|
||||
* Get the width of the rendered string.
|
||||
*
|
||||
* @returns the width of the string in pixels.
|
||||
*/
|
||||
int textbox_get_font_width ( textbox *tb );
|
||||
|
||||
/**
|
||||
* Estimate the width of a character.
|
||||
*
|
||||
* @returns the width of a character in pixels.
|
||||
*/
|
||||
double textbox_get_estimated_char_width ( );
|
||||
|
||||
|
||||
/**
|
||||
* @param tb Handle to the textbox
|
||||
*
|
||||
* Delete character before cursor.
|
||||
*/
|
||||
void textbox_cursor_bkspc ( textbox *tb );
|
||||
|
||||
/**
|
||||
* @param tb Handle to the textbox
|
||||
*
|
||||
* Delete character after cursor.
|
||||
*/
|
||||
void textbox_cursor_del ( textbox *tb );
|
||||
|
||||
/**
|
||||
* @param tb Handle to the textbox
|
||||
*
|
||||
* Move cursor one position backward.
|
||||
*/
|
||||
void textbox_cursor_dec ( textbox *tb );
|
||||
|
||||
/**
|
||||
* @param tb Handle to the textbox
|
||||
*
|
||||
* Move cursor one position forward.
|
||||
*/
|
||||
void textbox_cursor_inc ( textbox *tb );
|
||||
|
||||
void textbox_delete ( textbox *tb, int pos, int dlen );
|
||||
|
|
Loading…
Reference in a new issue