Commit 062f3d4e authored by Alberto Garcia's avatar Alberto Garcia
Browse files

New upstream version 2.18.1

parent d2825bb4
# -----------------------------------------------------------------------------
# Determine CMake version and build type.
# -----------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.3)
if (NOT CMAKE_BUILD_TYPE)
message(WARNING "No CMAKE_BUILD_TYPE value specified, defaulting to RelWithDebInfo.")
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build." FORCE)
else ()
message(STATUS "The CMake build type is: ${CMAKE_BUILD_TYPE}")
endif ()
project(WebKit)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/Source/cmake")
......@@ -69,6 +80,8 @@ if (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
set(WTF_CPU_ARM 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
set(WTF_CPU_ARM64 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "alpha*")
set(WTF_CPU_ALPHA 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
set(WTF_CPU_MIPS 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sh4")
......
......@@ -90,6 +90,14 @@
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="WebKitHitTestResult.html#webkit-hit-test-result-context-is-scrollbar" title="webkit_hit_test_result_context_is_scrollbar ()">webkit_hit_test_result_context_is_scrollbar</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
......@@ -124,14 +132,6 @@
<a class="link" href="WebKitHitTestResult.html#webkit-hit-test-result-get-media-uri" title="webkit_hit_test_result_get_media_uri ()">webkit_hit_test_result_get_media_uri</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="WebKitHitTestResult.html#webkit-hit-test-result-context-is-scrollbar" title="webkit_hit_test_result_context_is_scrollbar ()">webkit_hit_test_result_context_is_scrollbar</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
......@@ -404,6 +404,36 @@ or <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">
</div>
<hr>
<div class="refsect2">
<a name="webkit-hit-test-result-context-is-scrollbar"></a><h3>webkit_hit_test_result_context_is_scrollbar ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
webkit_hit_test_result_context_is_scrollbar
(<em class="parameter"><code><a class="link" href="WebKitHitTestResult.html" title="WebKitHitTestResult"><span class="type">WebKitHitTestResult</span></a> *hit_test_result</code></em>);</pre>
<p>Gets whether <a class="link" href="WebKitHitTestResult.html#WEBKIT-HIT-TEST-RESULT-CONTEXT-SCROLLBAR:CAPS"><code class="literal">WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR</code></a> flag is present in
<a class="link" href="WebKitHitTestResult.html#WebKitHitTestResult--context" title="The “context” property"><span class="type">“context”</span></a>.</p>
<div class="refsect3">
<a name="webkit-hit-test-result-context-is-scrollbar.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>hit_test_result</p></td>
<td class="parameter_description"><p>a <a class="link" href="WebKitHitTestResult.html" title="WebKitHitTestResult"><span class="type">WebKitHitTestResult</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="webkit-hit-test-result-context-is-scrollbar.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if there's a scrollbar element at the coordinates of the <em class="parameter"><code>hit_test_result</code></em>
,
or <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="webkit-hit-test-result-get-link-uri"></a><h3>webkit_hit_test_result_get_link_uri ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
webkit_hit_test_result_get_link_uri (<em class="parameter"><code><a class="link" href="WebKitHitTestResult.html" title="WebKitHitTestResult"><span class="type">WebKitHitTestResult</span></a> *hit_test_result</code></em>);</pre>
......@@ -544,36 +574,6 @@ or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">N
context</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="webkit-hit-test-result-context-is-scrollbar"></a><h3>webkit_hit_test_result_context_is_scrollbar ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
webkit_hit_test_result_context_is_scrollbar
(<em class="parameter"><code><a class="link" href="WebKitHitTestResult.html" title="WebKitHitTestResult"><span class="type">WebKitHitTestResult</span></a> *hit_test_result</code></em>);</pre>
<p>Gets whether <a class="link" href="WebKitHitTestResult.html#WEBKIT-HIT-TEST-RESULT-CONTEXT-SCROLLBAR:CAPS"><code class="literal">WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR</code></a> flag is present in
<a class="link" href="WebKitHitTestResult.html#WebKitHitTestResult--context" title="The “context” property"><span class="type">“context”</span></a>.</p>
<div class="refsect3">
<a name="webkit-hit-test-result-context-is-scrollbar.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>hit_test_result</p></td>
<td class="parameter_description"><p>a <a class="link" href="WebKitHitTestResult.html" title="WebKitHitTestResult"><span class="type">WebKitHitTestResult</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="webkit-hit-test-result-context-is-scrollbar.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if there's a scrollbar element at the coordinates of the <em class="parameter"><code>hit_test_result</code></em>
,
or <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="WebKitHitTestResult.other_details"></a><h2>Types and Values</h2>
......
......@@ -1188,70 +1188,10 @@ contains default settings.</p>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33</pre></td>
<td class="listing_code"><pre class="programlisting"><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>/tmp/tmpI3lyCL.h.xhtml</title>
<meta name="Generator" content="Vim/8.0" />
<meta name="plugin-version" content="vim7.4_v2" />
<meta name="syntax" content="c" />
<meta name="settings" content="use_xhtml,use_css,pre_wrap,no_foldcolumn,prevent_copy=" />
<meta name="colorscheme" content="none" />
<style type="text/css">
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
body { font-family: monospace; color: #000000; background-color: #ffffff; }
* { font-size: 1em; }
.Comment { color: #c00000; font-weight: bold; }
</style>
<script type='text/javascript'>
//<![CDATA[
//]]>
</script>
</head>
<body>
<span class="comment">/*</span><span class="comment"> Disable JavaScript. </span><span class="comment">*/</span>
WebKitSettings *settings = webkit_web_view_group_get_settings (my_view_group);
webkit_settings_set_enable_javascript (settings, FALSE);
</body>
</html>
<!-- vim: set foldmethod=manual : --></pre></td>
3</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="comment">/* Disable JavaScript. */</span>
<span class="usertype">WebKitSettings</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">settings </span><span class="symbol">=</span><span class="normal"> </span><span class="function">webkit_web_view_group_get_settings</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">my_view_group</span><span class="symbol">);</span>
<span class="function"><a href="WebKitSettings.html#webkit-settings-set-enable-javascript">webkit_settings_set_enable_javascript</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">settings</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">);</span></pre></td>
</tr>
</tbody>
</table>
......
......@@ -298,72 +298,12 @@ receive the signals, it is recommended to connect to the signal
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35</pre></td>
<td class="listing_code"><pre class="programlisting"><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>/tmp/tmpJsZ5ql.h.xhtml</title>
<meta name="Generator" content="Vim/8.0" />
<meta name="plugin-version" content="vim7.4_v2" />
<meta name="syntax" content="c" />
<meta name="settings" content="use_xhtml,use_css,pre_wrap,no_foldcolumn,prevent_copy=" />
<meta name="colorscheme" content="none" />
<style type="text/css">
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
body { font-family: monospace; color: #000000; background-color: #ffffff; }
* { font-size: 1em; }
.Constant { color: #0000c0; text-decoration: underline; }
</style>
<script type='text/javascript'>
//<![CDATA[
//]]>
</script>
</head>
<body>
WebKitWebView *view = webkit_web_view_new ();
WebKitUserContentManager *manager = webkit_web_view_get_user_content_manager ();
g_signal_connect (manager, <span class="number">&quot;script-message-received::foobar&quot;</span>,
G_CALLBACK (handle_script_message), <span class="number">NULL</span>);
webkit_user_content_manager_register_script_message_handler (manager, <span class="number">&quot;foobar&quot;</span>);
</body>
</html>
<!-- vim: set foldmethod=manual : --></pre></td>
5</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="usertype">WebKitWebView</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">view </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="WebKitWebView.html#webkit-web-view-new">webkit_web_view_new</a></span><span class="normal"> </span><span class="symbol">();</span>
<span class="usertype">WebKitUserContentManager</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">manager </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="WebKitWebView.html#webkit-web-view-get-user-content-manager">webkit_web_view_get_user_content_manager</a></span><span class="normal"> </span><span class="symbol">();</span>
<span class="function"><a href="../gobject/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">manager</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"script-message-received::foobar"</span><span class="symbol">,</span>
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">handle_script_message</span><span class="symbol">),</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
<span class="function"><a href="WebKitUserContentManager.html#webkit-user-content-manager-register-script-message-handler">webkit_user_content_manager_register_script_message_handler</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">manager</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"foobar"</span><span class="symbol">);</span></pre></td>
</tr>
</tbody>
</table>
......
......@@ -1843,107 +1843,39 @@ when the data of the request is available or
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66</pre></td>
<td class="listing_code"><pre class="programlisting"><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>/tmp/tmpBQtokQ.h.xhtml</title>
<meta name="Generator" content="Vim/8.0" />
<meta name="plugin-version" content="vim7.4_v2" />
<meta name="syntax" content="c" />
<meta name="settings" content="use_xhtml,use_css,pre_wrap,no_foldcolumn,prevent_copy=" />
<meta name="colorscheme" content="none" />
<style type="text/css">
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
body { font-family: monospace; color: #000000; background-color: #ffffff; }
* { font-size: 1em; }
.Constant { color: #0000c0; text-decoration: underline; }
.Statement { color: #008080; font-weight: bold; }
.Comment { color: #c00000; font-weight: bold; }
.Type { color: #008000; text-decoration: underline; }
.Special { color: #c000c0; font-weight: bold; }
</style>
<script type='text/javascript'>
//<![CDATA[
32</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
<span class="function">about_uri_scheme_request_cb</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">WebKitURISchemeRequest</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">request</span><span class="symbol">,</span>
<span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
<span class="cbracket">{</span>
<span class="normal"> </span><span class="usertype">GInputStream</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">stream</span><span class="symbol">;</span>
<span class="normal"> </span><span class="usertype">gsize</span><span class="normal"> stream_length</span><span class="symbol">;</span>
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">path</span><span class="symbol">;</span>
//]]>
</script>
</head>
<body>
<span class="type">static</span> <span class="type">void</span>
about_uri_scheme_request_cb (WebKitURISchemeRequest *request,
gpointer user_data)
{
GInputStream *stream;
gsize stream_length;
<span class="type">const</span> gchar *path;
path = webkit_uri_scheme_request_get_path (request);
<span class="keyword">if</span> (!g_strcmp0 (path, <span class="number">&quot;plugins&quot;</span>)) {
<span class="comment">/*</span><span class="comment"> Create a GInputStream with the contents of plugins about page, and set its length to stream_length </span><span class="comment">*/</span>
} <span class="keyword">else</span> <span class="keyword">if</span> (!g_strcmp0 (path, <span class="number">&quot;memory&quot;</span>)) {
<span class="comment">/*</span><span class="comment"> Create a GInputStream with the contents of memory about page, and set its length to stream_length </span><span class="comment">*/</span>
} <span class="keyword">else</span> <span class="keyword">if</span> (!g_strcmp0 (path, <span class="number">&quot;applications&quot;</span>)) {
<span class="comment">/*</span><span class="comment"> Create a GInputStream with the contents of applications about page, and set its length to stream_length </span><span class="comment">*/</span>
} <span class="keyword">else</span> <span class="keyword">if</span> (!g_strcmp0 (path, <span class="number">&quot;example&quot;</span>)) {
gchar *contents;
<span class="normal"> path </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="WebKitURISchemeRequest.html#webkit-uri-scheme-request-get-path">webkit_uri_scheme_request_get_path</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">request</span><span class="symbol">);</span>
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(!</span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"plugins"</span><span class="symbol">))</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="normal"> </span><span class="comment">/* Create a GInputStream with the contents of plugins about page, and set its length to stream_length */</span>
<span class="normal"> </span><span class="cbracket">}</span><span class="normal"> </span><span class="keyword">else</span><span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(!</span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"memory"</span><span class="symbol">))</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="normal"> </span><span class="comment">/* Create a GInputStream with the contents of memory about page, and set its length to stream_length */</span>
<span class="normal"> </span><span class="cbracket">}</span><span class="normal"> </span><span class="keyword">else</span><span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(!</span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"applications"</span><span class="symbol">))</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="normal"> </span><span class="comment">/* Create a GInputStream with the contents of applications about page, and set its length to stream_length */</span>
<span class="normal"> </span><span class="cbracket">}</span><span class="normal"> </span><span class="keyword">else</span><span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(!</span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"example"</span><span class="symbol">))</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">contents</span><span class="symbol">;</span>
contents = g_strdup_printf (<span class="number">&quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;Example about page&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;</span>);
stream_length = strlen (contents);
stream = g_memory_input_stream_new_from_data (contents, stream_length, g_free);
} <span class="keyword">else</span> {
GError *error;
<span class="normal"> contents </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"&lt;html&gt;&lt;body&gt;&lt;p&gt;Example about page&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span><span class="symbol">);</span>
<span class="normal"> stream_length </span><span class="symbol">=</span><span class="normal"> </span><span class="function">strlen</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">contents</span><span class="symbol">);</span>
<span class="normal"> stream </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../gio/GMemoryInputStream.html#g-memory-input-stream-new-from-data">g_memory_input_stream_new_from_data</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">contents</span><span class="symbol">,</span><span class="normal"> stream_length</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span><span class="symbol">);</span>
<span class="normal"> </span><span class="cbracket">}</span><span class="normal"> </span><span class="keyword">else</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="normal"> </span><span class="usertype">GError</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">error</span><span class="symbol">;</span>
error = g_error_new (ABOUT_HANDLER_ERROR, ABOUT_HANDLER_ERROR_INVALID, <span class="number">&quot;Invalid about:</span><span class="symbol">%s</span><span class="number"> page.&quot;</span>, path);
webkit_uri_scheme_request_finish_error (request, error);
g_error_free (error);
<span class="keyword">return</span>;
}
webkit_uri_scheme_request_finish (request, stream, stream_length, <span class="number">&quot;text/html&quot;</span>);
g_object_unref (stream);
}
</body>
</html>
<!-- vim: set foldmethod=manual : --></pre></td>
<span class="normal"> error </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-Error-Reporting.html#g-error-new">g_error_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">ABOUT_HANDLER_ERROR</span><span class="symbol">,</span><span class="normal"> ABOUT_HANDLER_ERROR_INVALID</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Invalid about:%s page."</span><span class="symbol">,</span><span class="normal"> path</span><span class="symbol">);</span>
<span class="normal"> </span><span class="function"><a href="WebKitURISchemeRequest.html#webkit-uri-scheme-request-finish-error">webkit_uri_scheme_request_finish_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">request</span><span class="symbol">,</span><span class="normal"> error</span><span class="symbol">);</span>
<span class="normal"> </span><span class="function"><a href="../glib/glib-Error-Reporting.html#g-error-free">g_error_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">);</span>
<span class="normal"> </span><span class="keyword">return</span><span class="symbol">;</span>
<span class="normal"> </span><span class="cbracket">}</span>
<span class="normal"> </span><span class="function"><a href="WebKitURISchemeRequest.html#webkit-uri-scheme-request-finish">webkit_uri_scheme_request_finish</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">request</span><span class="symbol">,</span><span class="normal"> stream</span><span class="symbol">,</span><span class="normal"> stream_length</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"text/html"</span><span class="symbol">);</span>
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stream</span><span class="symbol">);</span>
<span class="cbracket">}</span></pre></td>
</tr>
</tbody>
</table>
......
......@@ -132,88 +132,24 @@ web process is initialized.</p>
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49</pre></td>
<td class="listing_code"><pre class="programlisting"><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>/tmp/tmp2UTPfh.h.xhtml</title>
<meta name="Generator" content="Vim/8.0" />
<meta name="plugin-version" content="vim7.4_v2" />
<meta name="syntax" content="c" />
<meta name="settings" content="use_xhtml,use_css,pre_wrap,no_foldcolumn,prevent_copy=" />
<meta name="colorscheme" content="none" />
<style type="text/css">
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
body { font-family: monospace; color: #000000; background-color: #ffffff; }
* { font-size: 1em; }
.Constant { color: #0000c0; text-decoration: underline; }
.Type { color: #008000; text-decoration: underline; }
.Special { color: #c000c0; font-weight: bold; }
</style>
<script type='text/javascript'>
//<![CDATA[
17</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
<span class="function">web_page_created_callback</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">WebKitWebExtension</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">extension</span><span class="symbol">,</span>
<span class="normal"> </span><span class="usertype">WebKitWebPage</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">web_page</span><span class="symbol">,</span>
<span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
<span class="cbracket">{</span>
<span class="normal"> </span><span class="function"><a href="../glib/glib-Warnings-and-Assertions.html#g-print">g_print</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Page %d created for %s</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span>
<span class="normal"> </span><span class="function"><a href="WebKitWebPage.html#webkit-web-page-get-id">webkit_web_page_get_id</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">web_page</span><span class="symbol">),</span>
<span class="normal"> </span><span class="function"><a href="WebKitWebPage.html#webkit-web-page-get-uri">webkit_web_page_get_uri</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">web_page</span><span class="symbol">));</span>
<span class="cbracket">}</span>
//]]>
</script>
</head>
<body>
<span class="type">static</span> <span class="type">void</span>
web_page_created_callback (WebKitWebExtension *extension,
WebKitWebPage *web_page,
gpointer user_data)
{
g_print (<span class="number">&quot;Page </span><span class="symbol">%d</span><span class="number"> created for </span><span class="symbol">%s</span><span class="symbol">\n</span><span class="number">&quot;</span>,
webkit_web_page_get_id (web_page),
webkit_web_page_get_uri (web_page));
}
G_MODULE_EXPORT <span class="type">void</span>
webkit_web_extension_initialize (WebKitWebExtension *extension)
{
g_signal_connect (extension, <span class="number">&quot;page-created&quot;</span>,
G_CALLBACK (web_page_created_callback),
<span class="number">NULL</span>);
}
</body>
</html>
<!-- vim: set foldmethod=manual : --></pre></td>
<span class="normal"><a href="../glib/glib-Dynamic-Loading-of-Modules.html#G-MODULE-EXPORT:CAPS">G_MODULE_EXPORT</a> </span><span class="type">void</span>
<span class="function">webkit_web_extension_initialize</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">WebKitWebExtension</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">extension</span><span class="symbol">)</span>
<span class="cbracket">{</span>
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">extension</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"page-created"</span><span class="symbol">,</span>
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">web_page_created_callback</span><span class="symbol">),</span>
<span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
<span class="cbracket">}</span></pre></td>
</tr>
</tbody>
</table>
......@@ -256,99 +192,33 @@ the desired data as parameter. You can see an example of this in the following p
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49