Commit 363e06a4 by Bruce Cowan

A few minor fixes, mainly documentation

parent 102490b2
Pipeline #1405 passed with stage
in 5 minutes 23 seconds
......@@ -165,7 +165,7 @@ glob_app_window_init (GlobAppWindow *self)
*
* Gets an application window with all its widgets setup for use.
*
* Returns: (transfer full) an application window
* Returns: an application window
*/
GtkWidget *
glob_app_window_new (GtkApplication *app)
......
......@@ -171,7 +171,7 @@ get_matches_async_thread (GTask *task,
/**
* glob_search_get_matches:
* @search: a #GlobSearch
* @self: a #GlobSearch
* @glob: the pattern to match against
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
* @callback: (scope async): the callback to run when finished
......@@ -182,24 +182,24 @@ get_matches_async_thread (GTask *task,
* glob_search_get_matches_finish() to get the result.
*/
void
glob_search_get_matches (GlobSearch *search,
glob_search_get_matches (GlobSearch *self,
const gchar *glob,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
g_return_if_fail (GLOB_IS_SEARCH (search));
g_return_if_fail (GLOB_IS_SEARCH (self));
g_return_if_fail (glob != NULL);
gchar *pattern = g_strdup (glob);
g_autoptr(GTask) task = g_task_new (search, cancellable, callback, user_data);
g_autoptr(GTask) task = g_task_new (self, cancellable, callback, user_data);
g_task_set_task_data (task, pattern, g_free);
g_task_run_in_thread (task, get_matches_async_thread);
}
/**
* glob_search_get_matches_finish:
* @search: a #GlobSearch.
* @self: a #GlobSearch.
* @result: a #GAsyncResult
* @error: a #GError, %NULL to ignore
*
......@@ -209,13 +209,14 @@ glob_search_get_matches (GlobSearch *search,
* finished
*/
GListModel *
glob_search_get_matches_finish (GlobSearch *search,
glob_search_get_matches_finish (GlobSearch *self,
GAsyncResult *res,
GError **error)
{
g_return_val_if_fail (GLOB_IS_SEARCH (search), NULL);
g_return_val_if_fail (GLOB_IS_SEARCH (self), NULL);
g_return_val_if_fail (G_IS_ASYNC_RESULT (res), NULL);
g_return_val_if_fail (g_task_is_valid (res, search), NULL);
g_return_val_if_fail (g_task_is_valid (res, self), NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
return g_task_propagate_pointer (G_TASK (res), error);
}
......@@ -107,6 +107,13 @@ glob_word_init (GlobWord *self)
}
/**
* glob_word_new:
*
* Create a new #GlobWord, which is an object wrapper around a single word.
*
* Returns: a new #GlobWord
*/
GlobWord *
glob_word_new (const gchar *word)
{
......@@ -115,6 +122,14 @@ glob_word_new (const gchar *word)
NULL);
}
/**
* glob_word_get_word:
* @self: a #GlobWord
*
* Gets the word represented by @self.
*
* Returns: the word
*/
const gchar *
glob_word_get_word (GlobWord *self)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment