From 568af9a8d3dfa62be38bce6204d0d13bf4fa9e1e Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Sun, 21 Oct 2007 18:09:23 +0000 Subject: Move load-progress from EphyTab to EphyEmbed svn path=/trunk/; revision=7544 --- embed/ephy-embed.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'embed/ephy-embed.c') diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c index 97e46d6a3..2b3c99383 100644 --- a/embed/ephy-embed.c +++ b/embed/ephy-embed.c @@ -447,6 +447,15 @@ ephy_embed_base_init (gpointer g_class) 1.0, G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + g_object_interface_install_property (g_class, + g_param_spec_int ("load-progress", + "Load progress", + "The embed's load progress in percent", + 0, + 100, + 0, + G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + initialized = TRUE; } @@ -1055,3 +1064,32 @@ ephy_embed_get_document_type (EphyEmbed *embed) EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed); return iface->get_document_type (embed); } + +/** + * ephy_embed_get_load_percent: + * @embed: an #EphyEmbed + * + * Returns the page load percentage (displayed in the progressbar). + * + * Return value: a percentage from 0 to 100. + **/ +int +ephy_embed_get_load_percent (EphyEmbed *embed) +{ + EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed); + return iface->get_load_percent (embed); +} + +/** + * ephy_embed_set_load_percent: + * @embed: an #EphyEmbed + * @percent: a percentage, from 0 to 100. + * + * Sets the load percentage. + **/ +void +ephy_embed_set_load_percent (EphyEmbed *embed, int percent) +{ + EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed); + return iface->set_load_percent (embed, percent); +} -- cgit v1.2.3