aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed-container.c47
1 files changed, 40 insertions, 7 deletions
diff --git a/embed/ephy-embed-container.c b/embed/ephy-embed-container.c
index 083730185..704e61b51 100644
--- a/embed/ephy-embed-container.c
+++ b/embed/ephy-embed-container.c
@@ -87,7 +87,12 @@ ephy_embed_container_add_child (EphyEmbedContainer *container,
gint position,
gboolean jump_to)
{
- EphyEmbedContainerIface *iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
+ EphyEmbedContainerIface *iface;
+
+ g_return_val_if_fail (EPHY_IS_EMBED_CONTAINER (container), -1);
+ g_return_val_if_fail (EPHY_IS_EMBED (child), -1);
+
+ iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
return iface->add_child (container, child, position, jump_to);
}
@@ -102,7 +107,13 @@ void
ephy_embed_container_set_active_child (EphyEmbedContainer *container,
EphyEmbed *child)
{
- EphyEmbedContainerIface *iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
+ EphyEmbedContainerIface *iface;
+
+ g_return_if_fail (EPHY_IS_EMBED_CONTAINER (container));
+ g_return_if_fail (EPHY_IS_EMBED (child));
+
+ iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
+
iface->set_active_child (container, child);
}
@@ -117,7 +128,13 @@ void
ephy_embed_container_remove_child (EphyEmbedContainer *container,
EphyEmbed *child)
{
- EphyEmbedContainerIface *iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
+ EphyEmbedContainerIface *iface;
+
+ g_return_if_fail (EPHY_IS_EMBED_CONTAINER (container));
+ g_return_if_fail (EPHY_IS_EMBED (child));
+
+ iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
+
iface->remove_child (container, child);
}
@@ -132,7 +149,11 @@ ephy_embed_container_remove_child (EphyEmbedContainer *container,
EphyEmbed *
ephy_embed_container_get_active_child (EphyEmbedContainer *container)
{
- EphyEmbedContainerIface *iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
+ EphyEmbedContainerIface *iface;
+
+ g_return_val_if_fail (EPHY_IS_EMBED_CONTAINER (container), NULL);
+
+ iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
return iface->get_active_child (container);
}
@@ -147,7 +168,11 @@ ephy_embed_container_get_active_child (EphyEmbedContainer *container)
GList *
ephy_embed_container_get_children (EphyEmbedContainer *container)
{
- EphyEmbedContainerIface *iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
+ EphyEmbedContainerIface *iface;
+
+ g_return_val_if_fail (EPHY_IS_EMBED_CONTAINER (container), NULL);
+
+ iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
return iface->get_children (container);
}
@@ -162,7 +187,11 @@ ephy_embed_container_get_children (EphyEmbedContainer *container)
gboolean
ephy_embed_container_get_is_popup (EphyEmbedContainer *container)
{
- EphyEmbedContainerIface *iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
+ EphyEmbedContainerIface *iface;
+
+ g_return_val_if_fail (EPHY_IS_EMBED_CONTAINER (container), FALSE);
+
+ iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
return iface->get_is_popup (container);
}
@@ -178,7 +207,11 @@ ephy_embed_container_get_is_popup (EphyEmbedContainer *container)
EphyEmbedChrome
ephy_embed_container_get_chrome (EphyEmbedContainer *container)
{
- EphyEmbedContainerIface *iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
+ EphyEmbedContainerIface *iface;
+
+ g_return_val_if_fail (EPHY_IS_EMBED_CONTAINER (container), 0);
+
+ iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
return iface->get_chrome (container);
}