diff options
Diffstat (limited to 'src/gui/gtk')
-rw-r--r-- | src/gui/gtk/gui-gtk-bar-window.c | 15 | ||||
-rw-r--r-- | src/gui/gtk/gui-gtk-chat.c | 52 | ||||
-rw-r--r-- | src/gui/gtk/gui-gtk-color.c | 65 | ||||
-rw-r--r-- | src/gui/gtk/gui-gtk-key.c | 4 | ||||
-rw-r--r-- | src/gui/gtk/gui-gtk-main.c | 15 | ||||
-rw-r--r-- | src/gui/gtk/gui-gtk-mouse.c | 14 | ||||
-rw-r--r-- | src/gui/gtk/gui-gtk-term.c | 2 | ||||
-rw-r--r-- | src/gui/gtk/gui-gtk-window.c | 128 |
8 files changed, 157 insertions, 138 deletions
diff --git a/src/gui/gtk/gui-gtk-bar-window.c b/src/gui/gtk/gui-gtk-bar-window.c index 53e016f92..cabc562e0 100644 --- a/src/gui/gtk/gui-gtk-bar-window.c +++ b/src/gui/gtk/gui-gtk-bar-window.c @@ -38,7 +38,7 @@ /* - * gui_bar_window_objects_init: init Gtk windows for bar window + * Initializes Gtk windows for bar window. */ int @@ -57,7 +57,7 @@ gui_bar_window_objects_init (struct t_gui_bar_window *bar_window) } /* - * gui_window_objects_free: free Gtk windows for a bar window + * Frees Gtk windows for a bar window. */ void @@ -68,7 +68,7 @@ gui_bar_window_objects_free (struct t_gui_bar_window *bar_window) } /* - * gui_bar_window_create_win: create curses window for bar + * Creates curses window for bar. */ void @@ -80,8 +80,9 @@ gui_bar_window_create_win (struct t_gui_bar_window *bar_window) } /* - * gui_bar_window_print_string: print a string text on a bar window - * return number of chars displayed on screen + * Prints a string text on a bar window. + * + * Returns number of chars displayed on screen. */ int @@ -97,7 +98,7 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_draw: draw a bar for a window + * Draws a bar for a window. */ void @@ -111,7 +112,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window, } /* - * gui_bar_window_objects_print_log: print bar window infos in log (usually for crash dump) + * Prints bar window infos in WeeChat log file (usually for crash dump). */ void diff --git a/src/gui/gtk/gui-gtk-chat.c b/src/gui/gtk/gui-gtk-chat.c index 47c48c281..19dd9afd0 100644 --- a/src/gui/gtk/gui-gtk-chat.c +++ b/src/gui/gtk/gui-gtk-chat.c @@ -42,8 +42,7 @@ /* - * gui_chat_set_style: set style (bold, underline, ..) - * for a chat window + * Sets style (bold, underline, ..) for a chat window. */ void @@ -56,8 +55,7 @@ gui_chat_set_style (struct t_gui_window *window, int style) } /* - * gui_chat_remove_style: remove style (bold, underline, ..) - * for a chat window + * Removes style (bold, underline, ..) for a chat window. */ void @@ -70,8 +68,7 @@ gui_chat_remove_style (struct t_gui_window *window, int style) } /* - * gui_chat_toggle_style: toggle a style (bold, underline, ..) - * for a chat window + * Toggles a style (bold, underline, ..) for a chat window. */ void @@ -85,8 +82,7 @@ gui_chat_toggle_style (struct t_gui_window *window, int style) } /* - * gui_chat_reset_style: reset style (color and attr) - * for a chat window + * Resets style (color and attr) for a chat window. */ void @@ -104,7 +100,7 @@ gui_chat_reset_style (struct t_gui_window *window) } /* - * gui_chat_set_color_style: set style for color + * Sets style for color. */ void @@ -116,7 +112,7 @@ gui_chat_set_color_style (struct t_gui_window *window, int style) } /* - * gui_chat_remove_color_style: remove style for color + * Removes style for color. */ void @@ -128,7 +124,7 @@ gui_chat_remove_color_style (struct t_gui_window *window, int style) } /* - * gui_chat_reset_color_style: reset style for color + * Resets style for color. */ void @@ -140,7 +136,7 @@ gui_chat_reset_color_style (struct t_gui_window *window) } /* - * gui_chat_set_color: set color for a chat window + * Sets color for a chat window. */ void @@ -153,7 +149,7 @@ gui_chat_set_color (struct t_gui_window *window, int fg, int bg) } /* - * gui_chat_set_weechat_color: set a WeeChat color for a chat window + * Sets a WeeChat color for a chat window. */ void @@ -168,9 +164,8 @@ gui_chat_set_weechat_color (struct t_gui_window *window, int weechat_color) } /* - * gui_chat_string_next_char: returns next char of a word (for display) - * special chars like colors, bold, .. are skipped - * and optionaly applied + * Returns next char of a word (for display), special chars like + * colors/attributes are skipped and optionally applied. */ char * @@ -190,8 +185,8 @@ gui_chat_string_next_char (struct t_gui_window *window, struct t_gui_line *line, } /* - * gui_chat_display_word_raw: display word on chat buffer, letter by letter - * special chars like color, bold, .. are interpreted + * Display word on chat buffer, letter by letter, special chars like + * colors/attributes are interpreted. */ void @@ -205,7 +200,7 @@ gui_chat_display_word_raw (struct t_gui_window *window, const char *string) } /* - * gui_chat_display_word: display a word on chat buffer + * Displays a word on chat buffer. */ void @@ -230,12 +225,14 @@ gui_chat_display_word (struct t_gui_window *window, } /* - * gui_chat_display_line: display a line in the chat window - * if count == 0, display whole line - * if count > 0, display 'count' lines (beginning from the end) - * if simulate == 1, nothing is displayed (for counting how - * many lines would have been lines displayed) - * returns: number of lines displayed (or simulated) + * Displays a line in the chat window. + * + * If count == 0, display whole line. + * If count > 0, display 'count' lines (beginning from the end). + * If simulate == 1, nothing is displayed (for counting how many lines would + * have been lines displayed). + * + * Returns number of lines displayed (or simulated). */ int @@ -251,8 +248,7 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line, int } /* - * gui_chat_calculate_line_diff: returns pointer to line & offset for a difference - * with given line + * Returns pointer to line & offset for a difference with given line. */ void @@ -350,7 +346,7 @@ gui_chat_calculate_line_diff (struct t_gui_window *window, struct t_gui_line **l } /* - * gui_chat_draw: draw chat window for a buffer + * Draws chat window for a buffer. */ void diff --git a/src/gui/gtk/gui-gtk-color.c b/src/gui/gtk/gui-gtk-color.c index 05d050374..ff72c51b6 100644 --- a/src/gui/gtk/gui-gtk-color.c +++ b/src/gui/gtk/gui-gtk-color.c @@ -57,8 +57,9 @@ struct t_gui_color gui_weechat_colors[] = /* - * gui_color_search: search a color by name - * Return: number of color in WeeChat colors table + * Searches for a color by name. + * + * Returns index of color in WeeChat colors table. */ int @@ -77,7 +78,7 @@ gui_color_search (const char *color_name) } /* - * gui_color_assign: assign a WeeChat color (read from config) + * Assigns a WeeChat color (read from configuration). */ int @@ -102,12 +103,14 @@ gui_color_assign (int *color, const char *color_name) } /* - * gui_color_assign_by_diff: assign color by difference - * It is called when a color option is - * set with value ++X or --X, to search - * another color (for example ++1 is - * next color/alias in list) - * return 1 if ok, 0 if error + * Assigns color by difference. + * + * It is called when a color option is set with value ++X or --X, to search + * another color (for example ++1 is next color/alias in list). + * + * Returns: + * 1: OK + * 0: error */ int @@ -122,7 +125,7 @@ gui_color_assign_by_diff (int *color, const char *color_name, int diff) } /* - * gui_color_get_weechat_colors_number: get number of available colors + * Gets number of available colors. */ int @@ -132,7 +135,7 @@ gui_color_get_weechat_colors_number () } /* - * gui_color_get_term_colors: get number of colors supported by terminal + * Gets number of colors supported by terminal. */ int @@ -142,7 +145,7 @@ gui_color_get_term_colors () } /* - * gui_color_get_pair: get a pair with given foreground/background colors + * Gets a pair with given foreground/background colors. */ int @@ -155,7 +158,7 @@ gui_color_get_pair (int fg, int bg) } /* - * gui_color_weechat_get_pair: get color pair with a WeeChat color number + * Gets color pair with a WeeChat color number. */ int @@ -167,7 +170,7 @@ gui_color_weechat_get_pair (int weechat_color) } /* - * gui_color_get_name: get color name + * Gets color name. */ const char * @@ -177,7 +180,7 @@ gui_color_get_name (int num_color) } /* - * gui_color_init_weechat: init WeeChat colors + * Initializes WeeChat colors. */ void @@ -187,7 +190,7 @@ gui_color_init_weechat () } /* - * gui_color_rebuild_weechat: rebuild WeeChat colors + * Rebuilds WeeChat colors. */ void @@ -209,9 +212,9 @@ gui_color_rebuild_weechat () } /* - * gui_color_display_terminal_colors: display terminal colors - * This is called by command line option - * "-c" / "--colors" + * Displays terminal colors. + * + * This is called by command line option "-c" / "--colors". */ void @@ -221,7 +224,7 @@ gui_color_display_terminal_colors () } /* - * gui_color_buffer_display: display content of color buffer + * Displays content of color buffer. */ void @@ -231,7 +234,7 @@ gui_color_buffer_display () } /* - * gui_color_switch_colrs: switch between WeeChat and terminal colors + * Switches between WeeChat and terminal colors. */ void @@ -241,7 +244,7 @@ gui_color_switch_colors () } /* - * gui_color_reset_pairs: reset all color pairs + * Resets all color pairs. */ void @@ -251,7 +254,7 @@ gui_color_reset_pairs () } /* - * gui_color_buffer_assign: assign color buffer to pointer if it is not yet set + * Assigns color buffer to pointer if it is not yet set. */ void @@ -261,7 +264,7 @@ gui_color_buffer_assign () } /* - * gui_color_buffer_open: open a buffer to display colors + * Opens a buffer to display colors. */ void @@ -271,7 +274,7 @@ gui_color_buffer_open () } /* - * gui_color_palette_build_aliases: build aliases for palette + * Builds aliases for palette. */ void @@ -281,7 +284,7 @@ gui_color_palette_build_aliases () } /* - * gui_color_palette_new: create a new color in palette + * Creates a new color in palette. */ struct t_gui_color_palette * @@ -295,7 +298,7 @@ gui_color_palette_new (int number, const char *value) } /* - * gui_color_palette_free: free a color in palette + * Frees a color in palette. */ void @@ -306,7 +309,7 @@ gui_color_palette_free (struct t_gui_color_palette *color_palette) } /* - * gui_color_pre_init: pre-init colors + * Pre-initializes colors. */ void @@ -321,7 +324,7 @@ gui_color_pre_init () } /* - * gui_color_init: init GUI colors + * Initializes GUI colors. */ void @@ -331,7 +334,7 @@ gui_color_init () } /* - * gui_color_dump: dump colors + * Dumps colors. */ void @@ -341,7 +344,7 @@ gui_color_dump () } /* - * gui_color_end: end GUI colors + * Ends GUI colors. */ void diff --git a/src/gui/gtk/gui-gtk-key.c b/src/gui/gtk/gui-gtk-key.c index 960d7c95d..4cd1ab866 100644 --- a/src/gui/gtk/gui-gtk-key.c +++ b/src/gui/gtk/gui-gtk-key.c @@ -37,7 +37,7 @@ /* - * gui_key_default_bindings: create default key bindings + * Creates default key bindings. */ void @@ -48,7 +48,7 @@ gui_key_default_bindings (int context) } /* - * gui_key_read: read keyboard chars + * Reads keyboard chars. */ void diff --git a/src/gui/gtk/gui-gtk-main.c b/src/gui/gtk/gui-gtk-main.c index 57ee22efb..b8b2577c7 100644 --- a/src/gui/gtk/gui-gtk-main.c +++ b/src/gui/gtk/gui-gtk-main.c @@ -63,7 +63,7 @@ GtkWidget *gui_gtk_label1; /* - * gui_main_pre_init: pre-initialize GUI (called before gui_init) + * Pre-initializes GUI (called before gui_init). */ void @@ -80,7 +80,7 @@ gui_main_pre_init (int *argc, char **argv[]) } /* - * gui_main_init: init GUI + * Initializes GUI. */ void @@ -93,7 +93,7 @@ gui_main_init () gui_color_init (); - /* build prefixes according to config */ + /* build prefixes according to configuration */ gui_chat_prefix_build (); /* init clipboard buffer */ @@ -217,7 +217,7 @@ gui_main_init () } /* - * gui_main_loop: main loop for WeeChat with Gtk GUI + * Main loop for WeeChat with Gtk GUI. */ void @@ -228,9 +228,10 @@ gui_main_loop () } /* - * gui_main_end: GUI end - * clean_exit is 0 when WeeChat is crashing (we don't clean - * objects because WeeChat can crash again during this cleanup...) + * Ends GUI. + * + * Argument "clean_exit" is 0 when WeeChat is crashing (we don't clean objects + * because WeeChat can crash again during this cleanup...). */ void diff --git a/src/gui/gtk/gui-gtk-mouse.c b/src/gui/gtk/gui-gtk-mouse.c index 8accbbca7..a6feb26e7 100644 --- a/src/gui/gtk/gui-gtk-mouse.c +++ b/src/gui/gtk/gui-gtk-mouse.c @@ -30,7 +30,7 @@ /* - * gui_mouse_enable: enable mouse + * Enables mouse. */ void @@ -40,7 +40,7 @@ gui_mouse_enable () } /* - * gui_mouse_disable: disable mouse + * Disables mouse. */ void @@ -50,7 +50,7 @@ gui_mouse_disable () } /* - * gui_mouse_display_state: display state of mouse + * Displays state of mouse. */ void @@ -60,7 +60,7 @@ gui_mouse_display_state () } /* - * gui_mouse_grab_init: init "grab mode" + * Initializes "grab mode". */ void @@ -72,7 +72,7 @@ gui_mouse_grab_init (int area) } /* - * gui_mouse_event_init: init mouse event + * Initializes mouse event. */ void @@ -82,7 +82,7 @@ gui_mouse_event_init () } /* - * gui_mouse_event_code2key: get key name with a mouse code + * Gets key name with a mouse code. */ const char * @@ -96,7 +96,7 @@ gui_mouse_event_code2key (const char *code) } /* - * gui_mouse_event_end: end mouse event + * Ends mouse event. */ void diff --git a/src/gui/gtk/gui-gtk-term.c b/src/gui/gtk/gui-gtk-term.c index 8dd3ea6bf..618ca3faa 100644 --- a/src/gui/gtk/gui-gtk-term.c +++ b/src/gui/gtk/gui-gtk-term.c @@ -26,7 +26,7 @@ #endif /* - * gui_term_set_eat_newline_glitch: not used in Gtk GUI + * Not used in Gtk GUI. */ void diff --git a/src/gui/gtk/gui-gtk-window.c b/src/gui/gtk/gui-gtk-window.c index ad43e0036..ba912a866 100644 --- a/src/gui/gtk/gui-gtk-window.c +++ b/src/gui/gtk/gui-gtk-window.c @@ -45,7 +45,7 @@ /* - * gui_window_get_width: get screen width + * Gets screen width. */ int @@ -55,7 +55,7 @@ gui_window_get_width () } /* - * gui_window_get_height: get screen height + * Gets screen height. */ int @@ -65,7 +65,11 @@ gui_window_get_height () } /* - * gui_window_objects_init: init Gtk widgets + * Initializes Gtk widgets. + * + * Returns: + * 1: OK + * 0: error */ int @@ -85,7 +89,7 @@ gui_window_objects_init (struct t_gui_window *window) } /* - * gui_window_objects_free: free Gtk widgets for a window + * Frees Gtk widgets for a window. */ void @@ -97,7 +101,7 @@ gui_window_objects_free (struct t_gui_window *window, int free_separators) } /* - * gui_window_set_weechat_color: set WeeChat color for window + * Sets WeeChat color for window. */ /* TODO: write this function for Gtk */ @@ -113,7 +117,7 @@ gui_window_set_weechat_color (WINDOW *window, int num_color) }*/ /* - * gui_window_calculate_pos_size: calculate position and size for a window & sub-win + * Calculates position and size for a window & sub-win. */ void @@ -124,7 +128,7 @@ gui_window_calculate_pos_size (struct t_gui_window *window) } /* - * gui_window_draw_separators: draw window separation + * Draws window separation. */ void @@ -149,7 +153,7 @@ gui_window_draw_separators (struct t_gui_window *window) } /* - * gui_window_redraw_buffer: redraw a buffer + * Redraws a buffer. */ void @@ -160,7 +164,7 @@ gui_window_redraw_buffer (struct t_gui_buffer *buffer) } /* - * gui_window_redraw_all_buffers: redraw all buffers + * Redraws all buffers. */ void @@ -170,7 +174,7 @@ gui_window_redraw_all_buffers () } /* - * gui_window_switch: switch to another window + * Switches to another window. */ void @@ -193,7 +197,7 @@ gui_window_switch (struct t_gui_window *window) } /* - * gui_window_switch_to_buffer: switch to another buffer + * Switches to another buffer. */ void @@ -258,7 +262,7 @@ gui_window_switch_to_buffer (struct t_gui_window *window, } /* - * gui_window_page_up: display previous page on buffer + * Displays previous page on buffer. */ void @@ -279,7 +283,7 @@ gui_window_page_up (struct t_gui_window *window) } /* - * gui_window_page_down: display next page on buffer + * Displays next page on buffer. */ void @@ -314,7 +318,7 @@ gui_window_page_down (struct t_gui_window *window) } /* - * gui_window_scroll_up: display previous few lines in buffer + * Displays previous few lines in buffer. */ void @@ -336,7 +340,7 @@ gui_window_scroll_up (struct t_gui_window *window) } /* - * gui_window_scroll_down: display next few lines in buffer + * Displays next few lines in buffer. */ void @@ -372,7 +376,7 @@ gui_window_scroll_down (struct t_gui_window *window) } /* - * gui_window_scroll_top: scroll to top of buffer + * Scrolls to top of buffer. */ void @@ -390,7 +394,7 @@ gui_window_scroll_top (struct t_gui_window *window) } /* - * gui_window_scroll_bottom: scroll to bottom of buffer + * Scrolls to bottom of buffer. */ void @@ -408,10 +412,13 @@ gui_window_scroll_bottom (struct t_gui_window *window) } /* - * gui_window_auto_resize: auto-resize all windows, according to % of global size - * This function is called after a terminal resize. - * Returns 0 if ok, -1 if all window should be merged - * (not enough space according to windows %) + * Auto-resizes all windows, according to % of global size. + * + * This function is called after a terminal resize. + * + * Returns: + * 0: OK + * -1: all windows must be merged (not enough space) */ int @@ -463,7 +470,7 @@ gui_window_auto_resize (struct t_gui_window_tree *tree, } /* - * gui_window_refresh_windows: auto resize and refresh all windows + * Auto-resizes and refreshes all windows. */ void @@ -478,7 +485,9 @@ gui_window_refresh_windows () } /* - * gui_window_split_horizontal: split a window horizontally + * Horizontally splits a window. + * + * Returns pointer to new window, NULL if error. */ struct t_gui_window * @@ -523,7 +532,9 @@ gui_window_split_horizontal (struct t_gui_window *window, int percentage) } /* - * gui_window_split_vertical: split a window vertically + * Vertically splits a window. + * + * Returns pointer to new window, NULL if error. */ struct t_gui_window * @@ -570,7 +581,7 @@ gui_window_split_vertical (struct t_gui_window *window, int percentage) } /* - * gui_window_resize: resize window + * Resizes window. */ void @@ -582,7 +593,7 @@ gui_window_resize (struct t_gui_window *window, int percentage) } /* - * gui_window_resize_delta: resize window using delta percentage + * Resizes window using delta percentage. */ void @@ -594,7 +605,11 @@ gui_window_resize_delta (struct t_gui_window *window, int delta_percentage) } /* - * gui_window_merge: merge window with its sister + * Merges window with its sister. + * + * Returns: + * 1: OK + * 0: error */ int @@ -639,7 +654,7 @@ gui_window_merge (struct t_gui_window *window) } /* - * gui_window_merge_all: merge all windows into only one + * Merges all windows into only one. */ void @@ -650,12 +665,12 @@ gui_window_merge_all (struct t_gui_window *window) } /* - * gui_window_side_by_side: return a code about position of 2 windows: - * 0 = they're not side by side - * 1 = side by side (win2 is over the win1) - * 2 = side by side (win2 on the right) - * 3 = side by side (win2 below win1) - * 4 = side by side (win2 on the left) + * Returns a code about position of 2 windows: + * 0 = they're not side by side + * 1 = side by side: win2 is over the win1 + * 2 = side by side: win2 on the right + * 3 = side by side: win2 below win1 + * 4 = side by side: win2 on the left */ int @@ -705,7 +720,7 @@ gui_window_side_by_side (struct t_gui_window *win1, struct t_gui_window *win2) } /* - * gui_window_switch_up: search and switch to a window over current window + * Searches and switches to a window over current window. */ void @@ -728,7 +743,7 @@ gui_window_switch_up (struct t_gui_window *window) } /* - * gui_window_switch_down: search and switch to a window below current window + * Searches and switches to a window below current window. */ void @@ -751,7 +766,7 @@ gui_window_switch_down (struct t_gui_window *window) } /* - * gui_window_switch_left: search and switch to a window on the left of current window + * Searches and switches to a window on the left of current window. */ void @@ -774,7 +789,7 @@ gui_window_switch_left (struct t_gui_window *window) } /* - * gui_window_switch_right: search and switch to a window on the right of current window + * Searches and switches to a window on the right of current window. */ void @@ -797,9 +812,11 @@ gui_window_switch_right (struct t_gui_window *window) } /* - * gui_window_balance: balance windows (set all splits to 50%) - * return 1 if some windows have been balanced - * 0 if nothing was changed + * Balance windows (set all splits to 50%). + * + * Returns: + * 1: some windows have been balanced + * 0: nothing was changed */ int @@ -812,12 +829,14 @@ gui_window_balance (struct t_gui_window_tree *tree) } /* - * gui_window_swap: swap buffer of two windows - * direction can be: 0 = auto (swap with sister) - * 1 = window above - * 2 = window on the right - * 3 = window below - * 4 = window on the left + * Swaps buffer of two windows. + * + * Argument "direction" can be: + * 0 = auto (swap with sister) + * 1 = window above + * 2 = window on the right + * 3 = window below + * 4 = window on the left */ void @@ -830,7 +849,7 @@ gui_window_swap (struct t_gui_window *window, int direction) } /* - * gui_window_refresh_screen: called when term size is modified + * Called when terminal size is modified. */ void @@ -842,7 +861,7 @@ gui_window_refresh_screen (int full_refresh) } /* - * gui_window_set_title: set terminal title + * Sets terminal title. */ void @@ -854,7 +873,7 @@ gui_window_set_title (const char *title) } /* - * gui_window_send_clipboard: copy text to clipboard (sent to terminal) + * Copies text to clipboard (sent to terminal). */ void @@ -867,7 +886,7 @@ gui_window_send_clipboard (const char *storage_unit, const char *text) } /* - * gui_window_set_bracketed_paste_mode: enable/disable bracketed paste mode + * Enables/disables bracketed paste mode. */ void @@ -879,7 +898,7 @@ gui_window_set_bracketed_paste_mode (int enable) } /* - * gui_window_move_cursor: move cursor on screen (for cursor mode) + * Moves cursor on screen (for cursor mode). */ void @@ -889,7 +908,7 @@ gui_window_move_cursor () } /* - * gui_window_term_display_infos: display some infos about terminal and colors + * Displays some infos about terminal and colors. */ void @@ -899,8 +918,7 @@ gui_window_term_display_infos () } /* - * gui_window_objects_print_log: print Gtk objects infos in log - * (usually for crash dump) + * Prints Gtk objects infos in WeeChat log file (usually for crash dump). */ void |