diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-30 15:32:04 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-30 15:32:04 (EDT) |
commit | b4ef0797e5b7229edc82ed23285cf47197a2c237 (patch) | |
tree | fafe9db899eb08be00347c3658de6bb20a70b17d /src | |
parent | dc5dd489e478b474741285d8b753fd5c789e2c51 (diff) | |
download | marquee-b4ef0797e5b7229edc82ed23285cf47197a2c237.zip marquee-b4ef0797e5b7229edc82ed23285cf47197a2c237.tar.gz marquee-b4ef0797e5b7229edc82ed23285cf47197a2c237.tar.bz2 |
MqWebViewScheme: Add ready_cb member
And call it from mq_web_view_*_scheme_methods.initialize().
Diffstat (limited to 'src')
-rw-r--r-- | src/web-view-schemes/normal.c | 5 | ||||
-rw-r--r-- | src/web-view-schemes/schemes.h | 1 | ||||
-rw-r--r-- | src/web-view-schemes/view-source.c | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/web-view-schemes/normal.c b/src/web-view-schemes/normal.c index 5641a9c..7cecdab 100644 --- a/src/web-view-schemes/normal.c +++ b/src/web-view-schemes/normal.c @@ -41,9 +41,10 @@ match_uri(const gchar *uri) } static void -initialize(MqWebView G_GNUC_UNUSED *web_view, - MqWebViewScheme G_GNUC_UNUSED *scheme, const gchar G_GNUC_UNUSED *uri) +initialize(MqWebView *web_view, MqWebViewScheme *scheme, + const gchar G_GNUC_UNUSED *uri) { + scheme->ready_cb(scheme, web_view); } static void diff --git a/src/web-view-schemes/schemes.h b/src/web-view-schemes/schemes.h index 7ed7a0b..3c27769 100644 --- a/src/web-view-schemes/schemes.h +++ b/src/web-view-schemes/schemes.h @@ -48,6 +48,7 @@ struct _MqWebViewScheme { MqWebViewNormalScheme normal; MqWebViewViewSourceScheme view_source; }; + void (*ready_cb)(MqWebViewScheme *, MqWebView *); }; typedef struct { diff --git a/src/web-view-schemes/view-source.c b/src/web-view-schemes/view-source.c index a654e5d..ab36f49 100644 --- a/src/web-view-schemes/view-source.c +++ b/src/web-view-schemes/view-source.c @@ -59,6 +59,8 @@ initialize(MqWebView *web_view, MqWebViewScheme *scheme, const gchar *uri) scheme->view_source.uri = mq_web_view_get_uri( mq_tab_page_get_web_view(origin_tab)); /* TODO: Get data. */ + + scheme->ready_cb(scheme, web_view); } static void |