diff options
author | Bill Haneman <billh@src.gnome.org> | 2006-09-20 15:18:27 +0000 |
---|---|---|
committer | Bill Haneman <billh@src.gnome.org> | 2006-09-20 15:18:27 +0000 |
commit | d373cfac926db0903aa0bfd7f789f13ccc4e2449 (patch) | |
tree | d4210fa5ca2fb0476a0730703854c1188298acbd /atk/atkdocument.c | |
parent | 6316f4631222036c1604f2924fbd1cc1231f1c73 (diff) | |
download | atk-d373cfac926db0903aa0bfd7f789f13ccc4e2449.tar.gz |
Add "load-stopped", "load_complete", "loading" signals to AtkDocument
interface. Based on patch from Neo Liu <nian.liu@sun.com>.
Diffstat (limited to 'atk/atkdocument.c')
-rwxr-xr-x | atk/atkdocument.c | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/atk/atkdocument.c b/atk/atkdocument.c index 17d55bd..4364c8b 100755 --- a/atk/atkdocument.c +++ b/atk/atkdocument.c @@ -19,6 +19,17 @@ #include "atkdocument.h" +enum { + LOAD_COMPLETE, + RELOAD, + LOAD_STOPPED, + LAST_SIGNAL +}; + +static void atk_document_base_init (AtkDocumentIface *class); + +static guint atk_document_signals[LAST_SIGNAL] = {0}; + GType atk_document_get_type (void) { @@ -28,7 +39,7 @@ atk_document_get_type (void) static const GTypeInfo tinfo = { sizeof (AtkDocumentIface), - (GBaseInitFunc) NULL, + (GBaseInitFunc) atk_document_base_init, (GBaseFinalizeFunc) NULL, }; @@ -39,6 +50,41 @@ atk_document_get_type (void) return type; } +static void +atk_document_base_init (AtkDocumentIface *class) +{ + static gboolean initialized = FALSE; + if (!initialized) + { + atk_document_signals[LOAD_COMPLETE] = + g_signal_new ("load_complete", + ATK_TYPE_DOCUMENT, + G_SIGNAL_RUN_LAST, + 0, + (GSignalAccumulator) NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); + atk_document_signals[RELOAD] = + g_signal_new ("reload", + ATK_TYPE_DOCUMENT, + G_SIGNAL_RUN_LAST, + 0, + (GSignalAccumulator) NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); + atk_document_signals[LOAD_STOPPED] = + g_signal_new ("load_stopped", + ATK_TYPE_DOCUMENT, + G_SIGNAL_RUN_LAST, + 0, + (GSignalAccumulator) NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + initialized = TRUE; + } +} + /** * atk_document_get_document_type: * @document: a #GObject instance that implements AtkDocumentIface |