Add @nullable
annotations everywhere
This commit is contained in:
parent
1be0bc7c74
commit
f90da20359
@ -553,7 +553,7 @@ GeanyBuildCommand *build_get_menu_item(GeanyBuildSource src, GeanyBuildGroup grp
|
||||
* @param cmd the index of the command within the group.
|
||||
* @param fld the field to return
|
||||
*
|
||||
* @return a pointer to the constant string or @c NULL if it doesn't exist.
|
||||
* @return @nullable a pointer to the constant string or @c NULL if it doesn't exist.
|
||||
* This is a pointer to an internal structure and must not be freed.
|
||||
*
|
||||
**/
|
||||
|
@ -1058,11 +1058,11 @@ static void on_dialog_input(const gchar *str, gpointer data)
|
||||
|
||||
/** Asks the user for text input.
|
||||
* @param title Dialog title.
|
||||
* @param parent The currently focused window, usually @c geany->main_widgets->window.
|
||||
* @param parent @nullable The currently focused window, usually @c geany->main_widgets->window.
|
||||
* @c NULL can be used but is discouraged due to window manager effects.
|
||||
* @param label_text Label text, or @c NULL.
|
||||
* @param default_text Text to display in the input field, or @c NULL.
|
||||
* @return New copy of user input or @c NULL if cancelled.
|
||||
* @param label_text @nullable Label text, or @c NULL.
|
||||
* @param default_text @nullable Text to display in the input field, or @c NULL.
|
||||
* @return @nullable New copy of user input or @c NULL if cancelled.
|
||||
* @since 0.20. */
|
||||
GEANY_API_SYMBOL
|
||||
gchar *dialogs_show_input(const gchar *title, GtkWindow *parent, const gchar *label_text,
|
||||
|
@ -146,7 +146,7 @@ static GtkWidget* document_show_message(GeanyDocument *doc, GtkMessageType msgty
|
||||
* @param realname The filename to search, which should be identical to the
|
||||
* string returned by @c tm_get_real_path().
|
||||
*
|
||||
* @return @transfer{none} The matching document, or @c NULL.
|
||||
* @return @transfer{none} @nullable The matching document, or @c NULL.
|
||||
* @note This is only really useful when passing a @c TMSourceFile::file_name.
|
||||
* @see GeanyDocument::real_path.
|
||||
* @see document_find_by_filename().
|
||||
@ -196,7 +196,7 @@ static gchar *get_real_path_from_utf8(const gchar *utf8_filename)
|
||||
*
|
||||
* @param utf8_filename The filename to search (in UTF-8 encoding).
|
||||
*
|
||||
* @return @transfer{none} The matching document, or @c NULL.
|
||||
* @return @transfer{none} @nullable The matching document, or @c NULL.
|
||||
* @see document_find_by_real_path().
|
||||
**/
|
||||
GEANY_API_SYMBOL
|
||||
@ -366,7 +366,7 @@ GeanyDocument *document_get_from_notebook_child(GtkWidget *page)
|
||||
*
|
||||
* @param page_num The notebook page number to search.
|
||||
*
|
||||
* @return @transfer{none} The corresponding document for the given notebook page, or @c NULL.
|
||||
* @return @transfer{none} @nullable The corresponding document for the given notebook page, or @c NULL.
|
||||
**/
|
||||
GEANY_API_SYMBOL
|
||||
GeanyDocument *document_get_from_page(guint page_num)
|
||||
@ -385,7 +385,7 @@ GeanyDocument *document_get_from_page(guint page_num)
|
||||
/**
|
||||
* Finds the current document.
|
||||
*
|
||||
* @return @transfer{none} A pointer to the current document or @c NULL if there are no opened documents.
|
||||
* @return @transfer{none} @nullable A pointer to the current document or @c NULL if there are no opened documents.
|
||||
**/
|
||||
GEANY_API_SYMBOL
|
||||
GeanyDocument *document_get_current(void)
|
||||
@ -826,9 +826,9 @@ GeanyDocument *document_new_file_if_non_open(void)
|
||||
* Line endings in @a text will be converted to the default setting.
|
||||
* Afterwards, the @c "document-new" signal is emitted for plugins.
|
||||
*
|
||||
* @param utf8_filename The file name in UTF-8 encoding, or @c NULL to open a file as "untitled".
|
||||
* @param ft The filetype to set or @c NULL to detect it from @a filename if not @c NULL.
|
||||
* @param text The initial content of the file (in UTF-8 encoding), or @c NULL.
|
||||
* @param utf8_filename @nullable The file name in UTF-8 encoding, or @c NULL to open a file as "untitled".
|
||||
* @param ft @nullable The filetype to set or @c NULL to detect it from @a filename if not @c NULL.
|
||||
* @param text @nullable The initial content of the file (in UTF-8 encoding), or @c NULL.
|
||||
*
|
||||
* @return @transfer{none} The new document.
|
||||
**/
|
||||
@ -911,10 +911,10 @@ GeanyDocument *document_new_file(const gchar *utf8_filename, GeanyFiletype *ft,
|
||||
*
|
||||
* @param locale_filename The filename of the document to load, in locale encoding.
|
||||
* @param readonly Whether to open the document in read-only mode.
|
||||
* @param ft The filetype for the document or @c NULL to auto-detect the filetype.
|
||||
* @param forced_enc The file encoding to use or @c NULL to auto-detect the file encoding.
|
||||
* @param ft @nullable The filetype for the document or @c NULL to auto-detect the filetype.
|
||||
* @param forced_enc @nullable The file encoding to use or @c NULL to auto-detect the file encoding.
|
||||
*
|
||||
* @return @transfer{none} The document opened or @c NULL.
|
||||
* @return @transfer{none} @nullable The document opened or @c NULL.
|
||||
**/
|
||||
GEANY_API_SYMBOL
|
||||
GeanyDocument *document_open_file(const gchar *locale_filename, gboolean readonly,
|
||||
@ -1560,8 +1560,8 @@ void document_open_file_list(const gchar *data, gsize length)
|
||||
*
|
||||
* @param filenames @elementtype{filename} A list of filenames to load, in locale encoding.
|
||||
* @param readonly Whether to open the document in read-only mode.
|
||||
* @param ft The filetype for the document or @c NULL to auto-detect the filetype.
|
||||
* @param forced_enc The file encoding to use or @c NULL to auto-detect the file encoding.
|
||||
* @param ft @nullable The filetype for the document or @c NULL to auto-detect the filetype.
|
||||
* @param forced_enc @nullable The file encoding to use or @c NULL to auto-detect the file encoding.
|
||||
**/
|
||||
GEANY_API_SYMBOL
|
||||
void document_open_files(const GSList *filenames, gboolean readonly, GeanyFiletype *ft,
|
||||
@ -1599,7 +1599,7 @@ static void on_keep_edit_history_on_reload_response(GtkWidget *bar, gint respons
|
||||
* @a forced_enc or @c NULL to auto-detect the file encoding.
|
||||
*
|
||||
* @param doc The document to reload.
|
||||
* @param forced_enc The file encoding to use or @c NULL to auto-detect the file encoding.
|
||||
* @param forced_enc @nullable The file encoding to use or @c NULL to auto-detect the file encoding.
|
||||
*
|
||||
* @return @c TRUE if the document was actually reloaded or @c FALSE otherwise.
|
||||
**/
|
||||
@ -1812,7 +1812,7 @@ gboolean document_need_save_as(GeanyDocument *doc)
|
||||
* Saves the document, detecting the filetype.
|
||||
*
|
||||
* @param doc The document for the file to save.
|
||||
* @param utf8_fname The new name for the document, in UTF-8, or NULL.
|
||||
* @param utf8_fname @nullable The new name for the document, in UTF-8, or @c NULL.
|
||||
* @return @c TRUE if the file was saved or @c FALSE if the file could not be saved.
|
||||
*
|
||||
* @see document_save_file().
|
||||
@ -3237,8 +3237,8 @@ const gchar *document_get_status_widget_class(GeanyDocument *doc)
|
||||
*
|
||||
* @param doc The document to use.
|
||||
*
|
||||
* @return The color for the document or @c NULL if the default color should be used. The color
|
||||
* object is owned by Geany and should not be modified or freed.
|
||||
* @return @nullable The color for the document or @c NULL if the default color should be used.
|
||||
* The color object is owned by Geany and should not be modified or freed.
|
||||
*
|
||||
* @since 0.16
|
||||
*/
|
||||
@ -3290,7 +3290,7 @@ const GdkColor *document_get_status_color(GeanyDocument *doc)
|
||||
/** Accessor function for @ref documents_array items.
|
||||
* @warning Always check the returned document is valid (@c doc->is_valid).
|
||||
* @param idx @c documents_array index.
|
||||
* @return @transfer{none} The document, or @c NULL if @a idx is out of range.
|
||||
* @return @transfer{none} @nullable The document, or @c NULL if @a idx is out of range.
|
||||
*
|
||||
* @since 0.16
|
||||
*/
|
||||
|
16
src/editor.c
16
src/editor.c
@ -1198,7 +1198,7 @@ get_default_indent_prefs(void)
|
||||
* Prefs can be different according to project or document.
|
||||
* @warning Always get a fresh result instead of keeping a pointer to it if the editor/project
|
||||
* settings may have changed, or if this function has been called for a different editor.
|
||||
* @param editor The editor, or @c NULL to get the default indent prefs.
|
||||
* @param editor @nullable The editor, or @c NULL to get the default indent prefs.
|
||||
* @return The indent prefs. */
|
||||
GEANY_API_SYMBOL
|
||||
const GeanyIndentPrefs *
|
||||
@ -1720,7 +1720,7 @@ void editor_find_current_word_sciwc(GeanyEditor *editor, gint pos, gchar *word,
|
||||
* as part of a word. May be @c NULL to use the default wordchars,
|
||||
* see @ref GEANY_WORDCHARS.
|
||||
*
|
||||
* @return A newly-allocated string containing the word at the given @a pos or @c NULL.
|
||||
* @return @nullable A newly-allocated string containing the word at the given @a pos or @c NULL.
|
||||
* Should be freed when no longer needed.
|
||||
*
|
||||
* @since 0.16
|
||||
@ -4191,7 +4191,7 @@ void editor_insert_color(GeanyEditor *editor, const gchar *colour)
|
||||
* Retrieves the end of line characters mode (LF, CR/LF, CR) in the given editor.
|
||||
* If @a editor is @c NULL, the default end of line characters are used.
|
||||
*
|
||||
* @param editor The editor to operate on, or @c NULL to query the default value.
|
||||
* @param editor @nullable The editor to operate on, or @c NULL to query the default value.
|
||||
* @return The used end of line characters mode.
|
||||
*
|
||||
* @since 0.20
|
||||
@ -4213,7 +4213,7 @@ gint editor_get_eol_char_mode(GeanyEditor *editor)
|
||||
* (LF, CR/LF, CR) in the given editor.
|
||||
* If @a editor is @c NULL, the default end of line characters are used.
|
||||
*
|
||||
* @param editor The editor to operate on, or @c NULL to query the default value.
|
||||
* @param editor @nullable The editor to operate on, or @c NULL to query the default value.
|
||||
* @return The name of the end of line characters.
|
||||
*
|
||||
* @since 0.19
|
||||
@ -4235,7 +4235,7 @@ const gchar *editor_get_eol_char_name(GeanyEditor *editor)
|
||||
* If @a editor is @c NULL, the default end of line characters are used.
|
||||
* The returned value is 1 for CR and LF and 2 for CR/LF.
|
||||
*
|
||||
* @param editor The editor to operate on, or @c NULL to query the default value.
|
||||
* @param editor @nullable The editor to operate on, or @c NULL to query the default value.
|
||||
* @return The length of the end of line characters.
|
||||
*
|
||||
* @since 0.19
|
||||
@ -4261,7 +4261,7 @@ gint editor_get_eol_char_len(GeanyEditor *editor)
|
||||
* If @a editor is @c NULL, the default end of line characters are used.
|
||||
* The returned value is either "\n", "\r\n" or "\r".
|
||||
*
|
||||
* @param editor The editor to operate on, or @c NULL to query the default value.
|
||||
* @param editor @nullable The editor to operate on, or @c NULL to query the default value.
|
||||
* @return The end of line characters.
|
||||
*
|
||||
* @since 0.19
|
||||
@ -5202,9 +5202,9 @@ void editor_indent(GeanyEditor *editor, gboolean increase)
|
||||
* If @a editor is passed, returns a snippet specific to the document filetype.
|
||||
* If @a editor is @c NULL, returns a snippet from the default set.
|
||||
*
|
||||
* @param editor Editor or @c NULL.
|
||||
* @param editor @nullable Editor or @c NULL.
|
||||
* @param snippet_name Snippet name.
|
||||
* @return snippet or @c NULL if it was not found. Must not be freed.
|
||||
* @return @nullable snippet or @c NULL if it was not found. Must not be freed.
|
||||
*/
|
||||
GEANY_API_SYMBOL
|
||||
const gchar *editor_find_snippet(GeanyEditor *editor, const gchar *snippet_name)
|
||||
|
@ -260,7 +260,7 @@ const GeanyEncoding *encodings_get_from_index(gint idx)
|
||||
* @param idx @ref GeanyEncodingIndex to retrieve the corresponding character set.
|
||||
*
|
||||
*
|
||||
* @return The charset according to idx, or @c NULL if the index is invalid.
|
||||
* @return @nullable The charset according to idx, or @c NULL if the index is invalid.
|
||||
*
|
||||
* @since 0.13
|
||||
**/
|
||||
@ -777,7 +777,7 @@ static gchar *encodings_convert_to_utf8_with_suggestion(const gchar *buffer, gss
|
||||
* @param size the length of the string, or -1 if the string is nul-terminated.
|
||||
* @param used_encoding @out @optional return location of the detected encoding of the input string, or @c NULL.
|
||||
*
|
||||
* @return If the conversion was successful, a newly allocated nul-terminated string,
|
||||
* @return @nullable If the conversion was successful, a newly allocated nul-terminated string,
|
||||
* which must be freed with @c g_free(). Otherwise @c NULL.
|
||||
**/
|
||||
GEANY_API_SYMBOL
|
||||
|
@ -1253,7 +1253,7 @@ gboolean filetype_has_tags(GeanyFiletype *ft)
|
||||
|
||||
/** Finds a filetype pointer from its @a name field.
|
||||
* @param name Filetype name.
|
||||
* @return @transfer{none} The filetype found, or @c NULL.
|
||||
* @return @transfer{none} @nullable The filetype found, or @c NULL.
|
||||
*
|
||||
* @since 0.15
|
||||
**/
|
||||
@ -1499,7 +1499,7 @@ void filetypes_reload_extensions(void)
|
||||
/** Accessor function for @ref GeanyData::filetypes_array items.
|
||||
* Example: @code ft = filetypes_index(GEANY_FILETYPES_C); @endcode
|
||||
* @param idx @c filetypes_array index.
|
||||
* @return @transfer{none} The filetype, or @c NULL if @a idx is out of range.
|
||||
* @return @transfer{none} @nullable The filetype, or @c NULL if @a idx is out of range.
|
||||
*
|
||||
* @since 0.16
|
||||
*/
|
||||
|
@ -157,14 +157,14 @@ GeanyKeyBinding *keybindings_get_item(GeanyKeyGroup *group, gsize key_id)
|
||||
* future default keybindings.
|
||||
* @param group Group.
|
||||
* @param key_id Keybinding index for the group.
|
||||
* @param callback Function to call when activated, or @c NULL to use the group callback.
|
||||
* @param callback @nullable Function to call when activated, or @c NULL to use the group callback.
|
||||
* Usually it's better to use the group callback instead - see plugin_set_key_group().
|
||||
* @param key Default key, e.g. @c GDK_j (must be lower case), but usually 0 for unset.
|
||||
* @param mod Default modifier, e.g. @c GDK_CONTROL_MASK, but usually 0 for unset.
|
||||
* @param kf_name Key name for the configuration file, such as @c "menu_new".
|
||||
* @param label Label used in the preferences dialog keybindings tab. May contain
|
||||
* underscores - these won't be displayed.
|
||||
* @param menu_item Optional widget to set an accelerator for, or @c NULL.
|
||||
* @param menu_item @nullable Optional widget to set an accelerator for, or @c NULL.
|
||||
* @return The keybinding - normally this is ignored. */
|
||||
GEANY_API_SYMBOL
|
||||
GeanyKeyBinding *keybindings_set_item(GeanyKeyGroup *group, gsize key_id,
|
||||
|
@ -105,7 +105,7 @@ void plugin_module_make_resident(GeanyPlugin *plugin)
|
||||
/** @girskip
|
||||
* Connects a signal which will be disconnected on unloading the plugin, to prevent a possible segfault.
|
||||
* @param plugin Must be @ref geany_plugin.
|
||||
* @param object Object to connect to, or @c NULL when using @link pluginsignals.c Geany signals @endlink.
|
||||
* @param object @nullable Object to connect to, or @c NULL when using @link pluginsignals.c Geany signals @endlink.
|
||||
* @param signal_name The name of the signal. For a list of available
|
||||
* signals, please see the @link pluginsignals.c Signal documentation @endlink.
|
||||
* @param after Set to @c TRUE to call your handler after the main signal handlers have been called
|
||||
@ -300,7 +300,7 @@ guint plugin_idle_add(GeanyPlugin *plugin, GSourceFunc function, gpointer data)
|
||||
* @param plugin Must be @ref geany_plugin.
|
||||
* @param section_name Name used in the configuration file, such as @c "html_chars".
|
||||
* @param count Number of keybindings for the group.
|
||||
* @param callback Group callback, or @c NULL if you only want individual keybinding callbacks.
|
||||
* @param callback @nullable Group callback, or @c NULL if you only want individual keybinding callbacks.
|
||||
* @return The plugin's keybinding group.
|
||||
* @since 0.19.
|
||||
**/
|
||||
|
38
src/spawn.c
38
src/spawn.c
@ -705,10 +705,10 @@ static gboolean spawn_async_with_pipes(const gchar *working_directory, const gch
|
||||
*
|
||||
* If a @a child_pid is passed, it's your responsibility to invoke @c g_spawn_close_pid().
|
||||
*
|
||||
* @param working_directory child's current working directory, or @c NULL.
|
||||
* @param command_line child program and arguments, or @c NULL.
|
||||
* @param argv child's argument vector, or @c NULL.
|
||||
* @param envp child's environment, or @c NULL.
|
||||
* @param working_directory @nullable child's current working directory, or @c NULL.
|
||||
* @param command_line @nullable child program and arguments, or @c NULL.
|
||||
* @param argv @nullable child's argument vector, or @c NULL.
|
||||
* @param envp @nullable child's environment, or @c NULL.
|
||||
* @param child_pid @out @optional return location for child process ID, or @c NULL.
|
||||
* @param error return location for error.
|
||||
*
|
||||
@ -978,20 +978,20 @@ static void spawn_watch_cb(GPid pid, gint status, gpointer data)
|
||||
*
|
||||
* The @a child_pid will be closed automatically, after @a exit_cb is invoked.
|
||||
*
|
||||
* @param working_directory child's current working directory, or @c NULL.
|
||||
* @param command_line child program and arguments, or @c NULL.
|
||||
* @param argv child's argument vector, or @c NULL.
|
||||
* @param envp child's environment, or @c NULL.
|
||||
* @param working_directory @nullable child's current working directory, or @c NULL.
|
||||
* @param command_line @nullable child program and arguments, or @c NULL.
|
||||
* @param argv @nullable child's argument vector, or @c NULL.
|
||||
* @param envp @nullable child's environment, or @c NULL.
|
||||
* @param spawn_flags flags from SpawnFlags.
|
||||
* @param stdin_cb callback to send data to childs's stdin, or @c NULL.
|
||||
* @param stdin_cb @nullable callback to send data to childs's stdin, or @c NULL.
|
||||
* @param stdin_data data to pass to @a stdin_cb.
|
||||
* @param stdout_cb callback to receive child's stdout, or @c NULL.
|
||||
* @param stdout_cb @nullable callback to receive child's stdout, or @c NULL.
|
||||
* @param stdout_data data to pass to @a stdout_cb.
|
||||
* @param stdout_max_length maximum data length to pass to stdout_cb, @c 0 = default.
|
||||
* @param stderr_cb callback to receive child's stderr, or @c NULL.
|
||||
* @param stderr_cb @nullable callback to receive child's stderr, or @c NULL.
|
||||
* @param stderr_data data to pass to @a stderr_cb.
|
||||
* @param stderr_max_length maximum data length to pass to stderr_cb, @c 0 = default.
|
||||
* @param exit_cb callback to invoke when the child exits, or @c NULL.
|
||||
* @param exit_cb @nullable callback to invoke when the child exits, or @c NULL.
|
||||
* @param exit_data data to pass to @a exit_cb.
|
||||
* @param child_pid @out @optional return location for child process ID, or @c NULL.
|
||||
* @param error return location for error.
|
||||
@ -1183,13 +1183,13 @@ static void spawn_get_exit_status_cb(G_GNUC_UNUSED GPid pid, gint status, gpoint
|
||||
* All output from the child, including the nul characters, is stored in @a stdout_data and
|
||||
* @a stderr_data (if non-NULL). Any existing data in these strings will be erased.
|
||||
*
|
||||
* @param working_directory child's current working directory, or @c NULL.
|
||||
* @param command_line child program and arguments, or @c NULL.
|
||||
* @param argv child's argument vector, or @c NULL.
|
||||
* @param envp child's environment, or @c NULL.
|
||||
* @param stdin_data data to send to childs's stdin, or @c NULL.
|
||||
* @param stdout_data GString location to receive the child's stdout, or NULL.
|
||||
* @param stderr_data GString location to receive the child's stderr, or NULL.
|
||||
* @param working_directory @nullable child's current working directory, or @c NULL.
|
||||
* @param command_line @nullable child program and arguments, or @c NULL.
|
||||
* @param argv @nullable child's argument vector, or @c NULL.
|
||||
* @param envp @nullable child's environment, or @c NULL.
|
||||
* @param stdin_data @nullable data to send to childs's stdin, or @c NULL.
|
||||
* @param stdout_data @nullable GString location to receive the child's stdout, or @c NULL.
|
||||
* @param stderr_data @nullable GString location to receive the child's stderr, or @c NULL.
|
||||
* @param exit_status @out @optional return location for the child exit code, or @c NULL.
|
||||
* @param error return location for error.
|
||||
*
|
||||
|
@ -495,7 +495,7 @@ void stash_group_add_integer(StashGroup *group, gint *setting,
|
||||
* @param group .
|
||||
* @param setting Address of setting variable.
|
||||
* @param key_name Name for key in a @c GKeyFile.
|
||||
* @param default_value String to copy if the key doesn't exist when loading, or @c NULL. */
|
||||
* @param default_value @nullable String to copy if the key doesn't exist when loading, or @c NULL. */
|
||||
GEANY_API_SYMBOL
|
||||
void stash_group_add_string(StashGroup *group, gchar **setting,
|
||||
const gchar *key_name, const gchar *default_value)
|
||||
|
@ -1685,7 +1685,7 @@ static gboolean tree_model_find_text(GtkTreeModel *model,
|
||||
/** Prepends @a text to the drop down list, removing a duplicate element in
|
||||
* the list if found. Also ensures there are <= @a history_len elements.
|
||||
* @param combo_entry .
|
||||
* @param text Text to add, or @c NULL for current entry text.
|
||||
* @param text @nullable Text to add, or @c NULL for current entry text.
|
||||
* @param history_len Max number of items, or @c 0 for default. */
|
||||
GEANY_API_SYMBOL
|
||||
void ui_combo_box_add_to_history(GtkComboBoxText *combo_entry,
|
||||
@ -1899,7 +1899,7 @@ void ui_widget_modify_font_from_string(GtkWidget *widget, const gchar *str)
|
||||
* file chooser, replacing entry text (if successful) with the path returned from the
|
||||
* @c GtkFileChooser.
|
||||
* @note @a entry can be the child of an unparented widget, such as @c GtkComboBoxEntry.
|
||||
* @param title The file chooser dialog title, or @c NULL.
|
||||
* @param title @nullable The file chooser dialog title, or @c NULL.
|
||||
* @param action The mode of the file chooser.
|
||||
* @param entry Can be an unpacked @c GtkEntry, or the child of an unpacked widget,
|
||||
* such as @c GtkComboBoxEntry.
|
||||
@ -2738,7 +2738,7 @@ static gboolean progress_bar_pulse(gpointer data)
|
||||
* In this case, you need to show and hide the widget yourself. You can find some example code
|
||||
* in @c src/printing.c.
|
||||
*
|
||||
* @param text The text to be shown as the progress bar label or NULL to leave it empty.
|
||||
* @param text @nullable The text to be shown as the progress bar label or @c NULL to leave it empty.
|
||||
*
|
||||
* @since 0.16
|
||||
**/
|
||||
@ -2846,7 +2846,7 @@ GtkWidget *ui_label_new_bold(const gchar *text)
|
||||
/** @girskip
|
||||
* Adds a list of document items to @a menu.
|
||||
* @param menu Menu.
|
||||
* @param active Which document to highlight, or @c NULL.
|
||||
* @param active @nullable Which document to highlight, or @c NULL.
|
||||
* @param callback is used for each menu item's @c "activate" signal and will be
|
||||
* passed the corresponding document pointer as @c user_data.
|
||||
* @warning You should check @c doc->is_valid in the callback.
|
||||
@ -2868,7 +2868,7 @@ void ui_menu_add_document_items(GtkMenu *menu, GeanyDocument *active, GCallback
|
||||
* See document_compare_by_display_name() for an example sort function.
|
||||
*
|
||||
* @param menu Menu.
|
||||
* @param active Which document to highlight, or @c NULL.
|
||||
* @param active @nullable Which document to highlight, or @c NULL.
|
||||
* @param callback is used for each menu item's @c "activate" signal and will be passed
|
||||
* the corresponding document pointer as @c user_data.
|
||||
* @param compare_func is used to sort the list. Might be @c NULL to not sort the list.
|
||||
|
28
src/utils.c
28
src/utils.c
@ -263,7 +263,7 @@ gint utils_write_file(const gchar *filename, const gchar *text)
|
||||
/** Searches backward through @a size bytes looking for a '<'.
|
||||
* @param sel .
|
||||
* @param size .
|
||||
* @return The tag name (newly allocated) or @c NULL if no opening tag was found.
|
||||
* @return @nullable The tag name (newly allocated) or @c NULL if no opening tag was found.
|
||||
*/
|
||||
GEANY_API_SYMBOL
|
||||
gchar *utils_find_open_xml_tag(const gchar sel[], gint size)
|
||||
@ -288,7 +288,7 @@ gchar *utils_find_open_xml_tag(const gchar sel[], gint size)
|
||||
/** Searches backward through @a size bytes looking for a '<'.
|
||||
* @param sel .
|
||||
* @param size .
|
||||
* @return pointer to '<' of the found opening tag within @a sel, or @c NULL if no opening tag was found.
|
||||
* @return @nullable pointer to '<' of the found opening tag within @a sel, or @c NULL if no opening tag was found.
|
||||
*/
|
||||
GEANY_API_SYMBOL
|
||||
const gchar *utils_find_open_xml_tag_pos(const gchar sel[], gint size)
|
||||
@ -490,8 +490,8 @@ static gchar *utf8_strdown(const gchar *str)
|
||||
*
|
||||
* The input strings should be in UTF-8 or locale encoding.
|
||||
*
|
||||
* @param s1 Pointer to first string or @c NULL.
|
||||
* @param s2 Pointer to second string or @c NULL.
|
||||
* @param s1 @nullable Pointer to first string or @c NULL.
|
||||
* @param s2 @nullable Pointer to second string or @c NULL.
|
||||
*
|
||||
* @return an integer less than, equal to, or greater than zero if @a s1 is found, respectively,
|
||||
* to be less than, to match, or to be greater than @a s2.
|
||||
@ -586,8 +586,8 @@ gchar *utils_str_middle_truncate(const gchar *string, guint truncate_length)
|
||||
* @c NULL-safe string comparison. Returns @c TRUE if both @a a and @a b are @c NULL
|
||||
* or if @a a and @a b refer to valid strings which are equal.
|
||||
*
|
||||
* @param a Pointer to first string or @c NULL.
|
||||
* @param b Pointer to second string or @c NULL.
|
||||
* @param a @nullable Pointer to first string or @c NULL.
|
||||
* @param b @nullable Pointer to second string or @c NULL.
|
||||
*
|
||||
* @return @c TRUE if @a a equals @a b, else @c FALSE.
|
||||
**/
|
||||
@ -722,7 +722,7 @@ gint utils_strpos(const gchar *haystack, const gchar *needle)
|
||||
*
|
||||
* @param format The format string to pass to strftime(3). See the strftime(3)
|
||||
* documentation for details, in UTF-8 encoding.
|
||||
* @param time_to_use The date/time to use, in time_t format or NULL to use the current time.
|
||||
* @param time_to_use @nullable The date/time to use, in time_t format or @c NULL to use the current time.
|
||||
*
|
||||
* @return A newly-allocated string, should be freed when no longer needed.
|
||||
*
|
||||
@ -1405,7 +1405,7 @@ gint utils_mkdir(const gchar *path, gboolean create_parent_dirs)
|
||||
* @param sort Whether to sort alphabetically (UTF-8 safe).
|
||||
* @param error The location for storing a possible error, or @c NULL.
|
||||
*
|
||||
* @return @elementtype{filename} @transfer{full} A newly allocated list or @c NULL if
|
||||
* @return @elementtype{filename} @transfer{full} @nullable A newly allocated list or @c NULL if
|
||||
* no files were found. The list and its data should be freed when no longer needed.
|
||||
* @see utils_get_file_list().
|
||||
**/
|
||||
@ -1450,7 +1450,7 @@ GSList *utils_get_file_list_full(const gchar *path, gboolean full_path, gboolean
|
||||
* unless @c NULL.
|
||||
* @param error The location for storing a possible error, or @c NULL.
|
||||
*
|
||||
* @return @elementtype{filename} @transfer{full} A newly allocated list or @c NULL
|
||||
* @return @elementtype{filename} @transfer{full} @nullable A newly allocated list or @c NULL
|
||||
* if no files were found. The list and its data should be freed when no longer needed.
|
||||
* @see utils_get_file_list_full().
|
||||
**/
|
||||
@ -1647,9 +1647,9 @@ const gchar *utils_get_default_dir_utf8(void)
|
||||
/**
|
||||
* Wraps @c spawn_sync(), which see.
|
||||
*
|
||||
* @param dir The child's current working directory, or @c NULL to inherit parent's.
|
||||
* @param dir @nullable The child's current working directory, or @c NULL to inherit parent's.
|
||||
* @param argv The child's argument vector.
|
||||
* @param env The child's environment, or @c NULL to inherit parent's.
|
||||
* @param env @nullable The child's environment, or @c NULL to inherit parent's.
|
||||
* @param flags Ignored.
|
||||
* @param child_setup @girskip Ignored.
|
||||
* @param user_data @girskip Ignored.
|
||||
@ -1682,13 +1682,13 @@ gboolean utils_spawn_sync(const gchar *dir, gchar **argv, gchar **env, GSpawnFla
|
||||
/**
|
||||
* Wraps @c spawn_async(), which see.
|
||||
*
|
||||
* @param dir The child's current working directory, or @c NULL to inherit parent's.
|
||||
* @param dir @nullable The child's current working directory, or @c NULL to inherit parent's.
|
||||
* @param argv The child's argument vector.
|
||||
* @param env The child's environment, or @c NULL to inherit parent's.
|
||||
* @param env @nullable The child's environment, or @c NULL to inherit parent's.
|
||||
* @param flags Ignored.
|
||||
* @param child_setup @girskip Ignored.
|
||||
* @param user_data Ignored.
|
||||
* @param child_pid The return location for child process ID, or NULL.
|
||||
* @param child_pid @nullable The return location for child process ID, or @c NULL.
|
||||
* @param error The return location for error or @c NULL.
|
||||
*
|
||||
* @return @c TRUE on success, @c FALSE if an error was set.
|
||||
|
Loading…
x
Reference in New Issue
Block a user