[tepl] ProgressInfoBar: write API docs
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tepl] ProgressInfoBar: write API docs
- Date: Thu, 12 Nov 2020 14:26:08 +0000 (UTC)
commit 025ece63d8b9ab488f2d72e68b25d013e4e8d083
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Nov 12 15:22:10 2020 +0100
ProgressInfoBar: write API docs
tepl/tepl-progress-info-bar.c | 69 ++++++++++++++++++++++++++++++++++++++++---
1 file changed, 65 insertions(+), 4 deletions(-)
---
diff --git a/tepl/tepl-progress-info-bar.c b/tepl/tepl-progress-info-bar.c
index 23fcc8e..b85a1c7 100644
--- a/tepl/tepl-progress-info-bar.c
+++ b/tepl/tepl-progress-info-bar.c
@@ -9,6 +9,19 @@
#include "tepl-progress-info-bar.h"
#include <glib/gi18n-lib.h>
+/**
+ * SECTION:progress-info-bar
+ * @Title: TeplProgressInfoBar
+ * @Short_description: A #TeplInfoBar containing a #GtkProgressBar
+ *
+ * #TeplProgressInfoBar is a #TeplInfoBar containing a #GtkProgressBar and a
+ * #GtkLabel. As every #TeplInfoBar it can also contain an icon, and other
+ * widgets can be added by the application as well.
+ *
+ * The #GtkLabel content can be modified after the #TeplProgressInfoBar has been
+ * created.
+ */
+
struct _TeplProgressInfoBarPrivate
{
GtkLabel *label;
@@ -101,6 +114,14 @@ tepl_progress_info_bar_class_init (TeplProgressInfoBarClass *klass)
object_class->set_property = tepl_progress_info_bar_set_property;
object_class->dispose = tepl_progress_info_bar_dispose;
+ /**
+ * TeplProgressInfoBar:has-cancel-button:
+ *
+ * Whether to add a Cancel button in the action area of the #GtkInfoBar,
+ * with the %GTK_RESPONSE_CANCEL response.
+ *
+ * Since: 6.0
+ */
properties[PROP_HAS_CANCEL_BUTTON] =
g_param_spec_boolean ("has-cancel-button",
"has-cancel-button",
@@ -134,11 +155,14 @@ tepl_progress_info_bar_init (TeplProgressInfoBar *info_bar)
/**
* tepl_progress_info_bar_new:
- * @icon_name: (nullable):
- * @markup: (nullable):
- * @has_cancel_button:
+ * @icon_name: (nullable): a value for the #TeplInfoBar:icon-name property, or
+ * %NULL.
+ * @markup: (nullable): if not %NULL, tepl_progress_info_bar_set_markup() is
+ * called.
+ * @has_cancel_button: a value for the #TeplProgressInfoBar:has-cancel-button
+ * property.
*
- * Returns: a new #TeplProgressInfoBar.
+ * Returns: a new #TeplProgressInfoBar widget.
* Since: 6.0
*/
TeplProgressInfoBar *
@@ -161,6 +185,15 @@ tepl_progress_info_bar_new (const gchar *icon_name,
return info_bar;
}
+/**
+ * tepl_progress_info_bar_set_markup:
+ * @info_bar: a #TeplProgressInfoBar.
+ * @markup: markup text.
+ *
+ * Calls gtk_label_set_markup() on the #GtkLabel contained within the @info_bar.
+ *
+ * Since: 6.0
+ */
void
tepl_progress_info_bar_set_markup (TeplProgressInfoBar *info_bar,
const gchar *markup)
@@ -171,6 +204,15 @@ tepl_progress_info_bar_set_markup (TeplProgressInfoBar *info_bar,
gtk_label_set_markup (info_bar->priv->label, markup);
}
+/**
+ * tepl_progress_info_bar_set_text:
+ * @info_bar: a #TeplProgressInfoBar.
+ * @text: text.
+ *
+ * Calls gtk_label_set_text() on the #GtkLabel contained within the @info_bar.
+ *
+ * Since: 6.0
+ */
void
tepl_progress_info_bar_set_text (TeplProgressInfoBar *info_bar,
const gchar *text)
@@ -181,6 +223,16 @@ tepl_progress_info_bar_set_text (TeplProgressInfoBar *info_bar,
gtk_label_set_text (info_bar->priv->label, text);
}
+/**
+ * tepl_progress_info_bar_set_fraction:
+ * @info_bar: a #TeplProgressInfoBar.
+ * @fraction: fraction of the task that's been completed.
+ *
+ * Calls gtk_progress_bar_set_fraction() on the #GtkProgressBar contained within
+ * the @info_bar.
+ *
+ * Since: 6.0
+ */
void
tepl_progress_info_bar_set_fraction (TeplProgressInfoBar *info_bar,
gdouble fraction)
@@ -190,6 +242,15 @@ tepl_progress_info_bar_set_fraction (TeplProgressInfoBar *info_bar,
gtk_progress_bar_set_fraction (info_bar->priv->progress_bar, fraction);
}
+/**
+ * tepl_progress_info_bar_pulse:
+ * @info_bar: a #TeplProgressInfoBar.
+ *
+ * Calls gtk_progress_bar_pulse() on the #GtkProgressBar contained within the
+ * @info_bar.
+ *
+ * Since: 6.0
+ */
void
tepl_progress_info_bar_pulse (TeplProgressInfoBar *info_bar)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]