summaryrefslogtreecommitdiffstats
path: root/src/web-view-schemes
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-30 05:21:41 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-30 05:21:41 (EDT)
commitd60a212d3206486b831d0fb7ec8959e3d9a5b0d8 (patch)
tree867ab94c5be313fc1dffc3aed6de3f28bdad417d /src/web-view-schemes
parentcbc51b45aae6e7342c5892ed63980292f1a0734b (diff)
downloadmarquee-d60a212d3206486b831d0fb7ec8959e3d9a5b0d8.zip
marquee-d60a212d3206486b831d0fb7ec8959e3d9a5b0d8.tar.gz
marquee-d60a212d3206486b831d0fb7ec8959e3d9a5b0d8.tar.bz2
MqWebViewSchemeMethods: Add (MqWebView *) param to *_uri() methods
Diffstat (limited to 'src/web-view-schemes')
-rw-r--r--src/web-view-schemes/normal.c6
-rw-r--r--src/web-view-schemes/schemes.h4
-rw-r--r--src/web-view-schemes/view-source.c5
3 files changed, 9 insertions, 6 deletions
diff --git a/src/web-view-schemes/normal.c b/src/web-view-schemes/normal.c
index ec3ad80..4b07100 100644
--- a/src/web-view-schemes/normal.c
+++ b/src/web-view-schemes/normal.c
@@ -33,7 +33,8 @@
#include "../web-view.h"
static gchar *
-rewrite_uri(MqWebViewScheme G_GNUC_UNUSED *scheme, const gchar *uri)
+rewrite_uri(MqWebView G_GNUC_UNUSED *web_view,
+ MqWebViewScheme G_GNUC_UNUSED *scheme, const gchar *uri)
{
if (g_str_has_prefix(uri, "about:")) {
return g_strconcat("mq-about:", uri + strlen("about:"), NULL);
@@ -43,7 +44,8 @@ rewrite_uri(MqWebViewScheme G_GNUC_UNUSED *scheme, const gchar *uri)
}
static gchar *
-display_uri(MqWebViewScheme G_GNUC_UNUSED *scheme, const gchar *uri)
+display_uri(MqWebView G_GNUC_UNUSED *web_view,
+ MqWebViewScheme G_GNUC_UNUSED *scheme, const gchar *uri)
{
if (g_str_has_prefix(uri, "mq-about:")) {
return g_strconcat("about:", uri + strlen("mq-about:"), NULL);
diff --git a/src/web-view-schemes/schemes.h b/src/web-view-schemes/schemes.h
index ee9139f..4412069 100644
--- a/src/web-view-schemes/schemes.h
+++ b/src/web-view-schemes/schemes.h
@@ -49,8 +49,8 @@ union _MqWebViewScheme {
};
typedef struct {
- gchar * (*rewrite_uri) (MqWebViewScheme *, const gchar *);
- gchar * (*display_uri) (MqWebViewScheme *, const gchar *);
+ gchar * (*rewrite_uri) (MqWebView *, MqWebViewScheme *, const gchar *);
+ gchar * (*display_uri) (MqWebView *, MqWebViewScheme *, const gchar *);
gboolean (*context_menu)(MqWebView *, MqWebViewScheme *,
WebKitContextMenu *, GdkEvent *,
WebKitHitTestResult *);
diff --git a/src/web-view-schemes/view-source.c b/src/web-view-schemes/view-source.c
index 435aa96..4a2f910 100644
--- a/src/web-view-schemes/view-source.c
+++ b/src/web-view-schemes/view-source.c
@@ -34,7 +34,7 @@
#include "../web-view.h"
static gchar *
-rewrite_uri(MqWebViewScheme *scheme, const gchar *uri)
+rewrite_uri(MqWebView *web_view, MqWebViewScheme *scheme, const gchar *uri)
{
MqTabPage *origin_tab;
@@ -60,7 +60,8 @@ rewrite_uri(MqWebViewScheme *scheme, const gchar *uri)
}
static gchar *
-display_uri(MqWebViewScheme *scheme, const gchar G_GNUC_UNUSED *uri)
+display_uri(MqWebView G_GNUC_UNUSED *web_view, MqWebViewScheme *scheme,
+ const gchar G_GNUC_UNUSED *uri)
{
return g_strdup_printf("view-source:%s", scheme->view_source.uri);
}