From 4f4141d49c35db2106fc8b84f08a03a4e416dc20 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Tue, 11 Jan 2005 19:15:27 +0000 Subject: Add "check-content" signal. 2005-01-11 Christian Persch * embed/ephy-embed-single.c: (ephy_embed_single_iface_init): * embed/ephy-embed-single.h: Add "check-content" signal. * embed/mozilla/EphyContentPolicy.cpp: * embed/mozilla/EphyContentPolicy.h: Emit from here. * lib/ephy-marshal.list: New marshal. --- embed/ephy-embed-single.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'embed/ephy-embed-single.c') diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c index 012b11795..6f0d06321 100644 --- a/embed/ephy-embed-single.c +++ b/embed/ephy-embed-single.c @@ -21,6 +21,7 @@ #include "config.h" #include "ephy-embed-single.h" +#include "ephy-embed-type-builtins.h" #include "ephy-marshal.h" static void ephy_embed_single_iface_init (gpointer g_class); @@ -116,6 +117,34 @@ ephy_embed_single_iface_init (gpointer g_class) G_TYPE_STRING, G_TYPE_STRING); +/** + * EphyEmbedSingle::check_content: + * @single: + * @type: the type of content + * @address: the address of the content + * @requesting_address: the address of the requesting content (may be empty) + * @mime_type_guess: a guess of the mime type of the content (may be empty) + * @mime_type: the MIME type of the content + * + * The ::check-content signal is emitted when Epiphany loads any content from + * anywhere. + * + * If a connected callback returns %TRUE, the + * signal emission will stop, and the load be aborted. + **/ + g_signal_new ("check_content", + EPHY_TYPE_EMBED_SINGLE, + G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EphyEmbedSingleIface, check_content), + g_signal_accumulator_true_handled, NULL, + ephy_marshal_BOOLEAN__ENUM_STRING_STRING_STRING, + G_TYPE_BOOLEAN, + 4, + EPHY_TYPE_CONTENT_CHECK_TYPE, + G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE, + G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE, + G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE); + initialised = TRUE; } } -- cgit v1.2.3