From 9e5ce4a882f45b9495c375e29b1041bbb2ccd778 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 1 Mar 2004 18:19:10 +0000 Subject: Add API docs. 2004-03-01 Christian Persch * src/ephy-statusbar.c: Add API docs. --- src/ephy-statusbar.c | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) (limited to 'src/ephy-statusbar.c') diff --git a/src/ephy-statusbar.c b/src/ephy-statusbar.c index 310244f80..860627e13 100755 --- a/src/ephy-statusbar.c +++ b/src/ephy-statusbar.c @@ -152,14 +152,29 @@ ephy_statusbar_finalize (GObject *object) G_OBJECT_CLASS (parent_class)->finalize (object); } +/** + * ephy_statusbar_new: + * + * Creates a new #EphyStatusbar. + * + * Return value: the new #EphyStatusbar object + **/ GtkWidget * ephy_statusbar_new (void) { return GTK_WIDGET (g_object_new (EPHY_TYPE_STATUSBAR, NULL)); } +/** + * ephy_statusbar_set_security_state: + * @statusbar: a #EphyStatusbar + * @secure: whether to set the icon to show secure or insecure + * @tooltip: a string detailing the security state + * + * Sets the statusbar's security icon and its tooltip. + **/ void -ephy_statusbar_set_security_state (EphyStatusbar *t, +ephy_statusbar_set_security_state (EphyStatusbar *statusbar, gboolean secure, const char *tooltip) { @@ -167,30 +182,47 @@ ephy_statusbar_set_security_state (EphyStatusbar *t, stock = secure ? EPHY_STOCK_SECURE : EPHY_STOCK_UNSECURE; - gtk_image_set_from_stock (GTK_IMAGE (t->priv->security_icon), stock, + gtk_image_set_from_stock (GTK_IMAGE (statusbar->priv->security_icon), stock, GTK_ICON_SIZE_MENU); - gtk_tooltips_set_tip (t->priv->tooltips, t->priv->security_evbox, + gtk_tooltips_set_tip (statusbar->priv->tooltips, statusbar->priv->security_evbox, tooltip, NULL); } +/** + * ephy_statusbar_set_progress: + * @statusbar: a #EphyStatusbar + * @progress: the progress as an integer between 0 and 100, or -1 to show + * interminate progress + * + * Sets the statusbar's progress. + **/ void -ephy_statusbar_set_progress (EphyStatusbar *t, +ephy_statusbar_set_progress (EphyStatusbar *statusbar, int progress) { if (progress == -1) { - gtk_progress_bar_pulse (GTK_PROGRESS_BAR(t->priv->progressbar)); + gtk_progress_bar_pulse (GTK_PROGRESS_BAR (statusbar->priv->progressbar)); } else { float fraction; fraction = (float)(progress) / 100; - gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR(t->priv->progressbar), + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (statusbar->priv->progressbar), fraction); } } +/** + * ephy_statusbar_add_widget: + * @statusbar: a #EphyStatusbar + * @widget: a #GtkWidget + * + * Adds the @widget to the statusbar. Use this function whenever you want to + * add a widget to the statusbar. You can remove the widget again with + * gtk_container_remove(). + **/ void ephy_statusbar_add_widget (EphyStatusbar *statusbar, GtkWidget *widget) -- cgit v1.2.3