summaryrefslogtreecommitdiff
path: root/libyelp/yelp-uri-builder.h
diff options
context:
space:
mode:
authorMarcos Chavarría Teijeiro <chavarria1991@gmail.com>2014-09-12 10:00:50 +0200
committerDavid King <amigadave@amigadave.com>2015-06-22 13:32:34 +0100
commit04683e89cef14f56e4c3d1595424e109f12f5d06 (patch)
tree1da0c7f6e2562018a8be707006bbb6e69e5d90f9 /libyelp/yelp-uri-builder.h
parent3598be880e631b1cd43164f3dd2e48bb8fa53976 (diff)
downloadyelp-04683e89cef14f56e4c3d1595424e109f12f5d06.tar.gz
yelp-view: Implement pages load in WebKit2
Substitute webkit_web_view_load_string call for webkit_web_view_load_html for showing error pages. Implement custom uri schemes for loading the normal pages. We should deal with the uris that Yelp undestand and the uris that Webkit undestand so we have created functions to convert from one to the others. In addition, we should add a hack to be able to load absolute uris. When we have a help:gnome-help/... uri on our document and the current page has the same scheme (help) WebKit interprets this uri as relative and it builds a different uri. To fix this instead of use a help scheme we use a bogus-help schme so WebKit interprets the uri as absolute.
Diffstat (limited to 'libyelp/yelp-uri-builder.h')
-rw-r--r--libyelp/yelp-uri-builder.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/libyelp/yelp-uri-builder.h b/libyelp/yelp-uri-builder.h
new file mode 100644
index 00000000..d6ca5d28
--- /dev/null
+++ b/libyelp/yelp-uri-builder.h
@@ -0,0 +1,30 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Copyright (C) 2014 Igalia S.L.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <string.h>
+#include <libsoup/soup.h>
+
+#include "yelp-document.h"
+#include "yelp-docbook-document.h"
+#include "yelp-uri.h"
+
+gchar * build_network_uri (YelpUri *uri, YelpDocument *document);
+gchar * build_yelp_uri (const gchar *uri);
+gchar * build_network_scheme (const gchar *scheme); \ No newline at end of file