diff options
Diffstat (limited to 'Documentation/webkitgtk/html/WebKitViewportAttributes.html')
| -rw-r--r-- | Documentation/webkitgtk/html/WebKitViewportAttributes.html | 413 |
1 files changed, 0 insertions, 413 deletions
diff --git a/Documentation/webkitgtk/html/WebKitViewportAttributes.html b/Documentation/webkitgtk/html/WebKitViewportAttributes.html deleted file mode 100644 index 1d0b02ec6..000000000 --- a/Documentation/webkitgtk/html/WebKitViewportAttributes.html +++ /dev/null @@ -1,413 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<title>WebKitViewportAttributes: WebKitGTK+ Reference Manual</title> -<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> -<link rel="home" href="index.html" title="WebKitGTK+ Reference Manual"> -<link rel="up" href="ch02.html" title="Class Overview"> -<link rel="prev" href="webkitgtk-webkitdownload.html" title="WebKitDownload"> -<link rel="next" href="WebKitHitTestResult.html" title="WebKitHitTestResult"> -<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)"> -<link rel="stylesheet" href="style.css" type="text/css"> -</head> -<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> -<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> -<td width="100%" align="left" class="shortcuts"> -<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> - <a href="#WebKitViewportAttributes.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> - <a href="#WebKitViewportAttributes.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> - <a href="#WebKitViewportAttributes.properties" class="shortcut">Properties</a></span> -</td> -<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> -<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> -<td><a accesskey="p" href="webkitgtk-webkitdownload.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> -<td><a accesskey="n" href="WebKitHitTestResult.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> -</tr></table> -<div class="refentry"> -<a name="WebKitViewportAttributes"></a><div class="titlepage"></div> -<div class="refnamediv"><table width="100%"><tr> -<td valign="top"> -<h2><span class="refentrytitle"><a name="WebKitViewportAttributes.top_of_page"></a>WebKitViewportAttributes</span></h2> -<p>WebKitViewportAttributes — Represents the viewport properties of a web page</p> -</td> -<td class="gallery_image" valign="top" align="right"></td> -</tr></table></div> -<div class="refsect1"> -<a name="WebKitViewportAttributes.functions"></a><h2>Functions</h2> -<div class="informaltable"><table class="informaltable" width="100%" border="0"> -<colgroup> -<col width="150px" class="functions_return"> -<col class="functions_name"> -</colgroup> -<tbody><tr> -<td class="function_type"> -<span class="returnvalue">void</span> -</td> -<td class="function_name"> -<a class="link" href="WebKitViewportAttributes.html#webkit-viewport-attributes-recompute" title="webkit_viewport_attributes_recompute ()">webkit_viewport_attributes_recompute</a> <span class="c_punctuation">()</span> -</td> -</tr></tbody> -</table></div> -</div> -<div class="refsect1"> -<a name="WebKitViewportAttributes.properties"></a><h2>Properties</h2> -<div class="informaltable"><table class="informaltable" border="0"> -<colgroup> -<col width="150px" class="properties_type"> -<col width="300px" class="properties_name"> -<col width="200px" class="properties_flags"> -</colgroup> -<tbody> -<tr> -<td class="property_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> -<td class="property_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes--available-height" title="The “available-height” property">available-height</a></td> -<td class="property_flags">Read / Write</td> -</tr> -<tr> -<td class="property_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> -<td class="property_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes--available-width" title="The “available-width” property">available-width</a></td> -<td class="property_flags">Read / Write</td> -</tr> -<tr> -<td class="property_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> -<td class="property_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes--desktop-width" title="The “desktop-width” property">desktop-width</a></td> -<td class="property_flags">Read / Write</td> -</tr> -<tr> -<td class="property_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> -<td class="property_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes--device-dpi" title="The “device-dpi” property">device-dpi</a></td> -<td class="property_flags">Read / Write</td> -</tr> -<tr> -<td class="property_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> -<td class="property_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes--device-height" title="The “device-height” property">device-height</a></td> -<td class="property_flags">Read / Write</td> -</tr> -<tr> -<td class="property_type"><a href="../glib/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></td> -<td class="property_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes--device-pixel-ratio" title="The “device-pixel-ratio” property">device-pixel-ratio</a></td> -<td class="property_flags">Read</td> -</tr> -<tr> -<td class="property_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> -<td class="property_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes--device-width" title="The “device-width” property">device-width</a></td> -<td class="property_flags">Read / Write</td> -</tr> -<tr> -<td class="property_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> -<td class="property_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes--height" title="The “height” property">height</a></td> -<td class="property_flags">Read</td> -</tr> -<tr> -<td class="property_type"><a href="../glib/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></td> -<td class="property_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes--initial-scale-factor" title="The “initial-scale-factor” property">initial-scale-factor</a></td> -<td class="property_flags">Read</td> -</tr> -<tr> -<td class="property_type"><a href="../glib/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></td> -<td class="property_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes--maximum-scale-factor" title="The “maximum-scale-factor” property">maximum-scale-factor</a></td> -<td class="property_flags">Read</td> -</tr> -<tr> -<td class="property_type"><a href="../glib/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></td> -<td class="property_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes--minimum-scale-factor" title="The “minimum-scale-factor” property">minimum-scale-factor</a></td> -<td class="property_flags">Read</td> -</tr> -<tr> -<td class="property_type"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> -<td class="property_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes--user-scalable" title="The “user-scalable” property">user-scalable</a></td> -<td class="property_flags">Read</td> -</tr> -<tr> -<td class="property_type"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> -<td class="property_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes--valid" title="The “valid” property">valid</a></td> -<td class="property_flags">Read</td> -</tr> -<tr> -<td class="property_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> -<td class="property_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes--width" title="The “width” property">width</a></td> -<td class="property_flags">Read</td> -</tr> -</tbody> -</table></div> -</div> -<div class="refsect1"> -<a name="WebKitViewportAttributes.other"></a><h2>Types and Values</h2> -<div class="informaltable"><table class="informaltable" width="100%" border="0"> -<colgroup> -<col width="150px" class="name"> -<col class="description"> -</colgroup> -<tbody><tr> -<td class="datatype_keyword"> </td> -<td class="function_name"><a class="link" href="WebKitViewportAttributes.html#WebKitViewportAttributes-struct" title="WebKitViewportAttributes">WebKitViewportAttributes</a></td> -</tr></tbody> -</table></div> -</div> -<div class="refsect1"> -<a name="WebKitViewportAttributes.object-hierarchy"></a><h2>Object Hierarchy</h2> -<pre class="screen"> <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> - <span class="lineart">╰──</span> WebKitViewportAttributes -</pre> -</div> -<div class="refsect1"> -<a name="WebKitViewportAttributes.description"></a><h2>Description</h2> -<p><a class="link" href="WebKitViewportAttributes.html" title="WebKitViewportAttributes"><span class="type">WebKitViewportAttributes</span></a> offers the viewport properties to user agents to -control the viewport layout. It contains the viewport size, initial scale with limits, -and information about whether a user is able to scale the contents in the viewport. -This makes a web page fit the device screen.</p> -<p>The <a class="link" href="webkitgtk-webkitwebview.html#WebKitWebView-viewport-attributes-changed" title="The “viewport-attributes-changed” signal"><span class="type">“viewport-attributes-changed”</span></a> signal will be emitted with <a class="link" href="WebKitViewportAttributes.html" title="WebKitViewportAttributes"><span class="type">WebKitViewportAttributes</span></a> -when the viewport attributes are updated in the case of loading web pages contain -the viewport properties and calling webkit_viewport_attributes_recompute.</p> -<p>If the device size, available size, desktop width, or device DPI needs to be changed due to -a consequence of an explicit browser request (caused by screen rotation, resizing, or similar reasons), -You should call <a class="link" href="WebKitViewportAttributes.html#webkit-viewport-attributes-recompute" title="webkit_viewport_attributes_recompute ()"><span class="type">webkit_viewport_attributes_recompute</span></a> to recompute the viewport properties and -override those values in the handler of <a class="link" href="webkitgtk-webkitwebview.html#WebKitWebView-viewport-attributes-recompute-requested" title="The “viewport-attributes-recompute-requested” signal"><span class="type">“viewport-attributes-recompute-requested”</span></a> signal.</p> -<p>For more information on the viewport properties, refer to the Safari reference library at -http://developer.apple.com/safari/library/documentation/appleapplications/reference/safarihtmlref/articles/metatags.html</p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <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</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="comment">/*</span><span class="comment"> Connect to the viewport-attributes-changes signal </span><span class="comment">*/</span> -WebKitViewportAttributes* attributes = webkit_web_view_get_viewport_attributes (web_view); -g_signal_connect (web_view, <span class="number">"viewport-attributes-recompute-requested"</span>, G_CALLBACK (viewport_recompute_cb), window); -g_signal_connect (web_view, <span class="number">"viewport-attributes-changed"</span>, G_CALLBACK (viewport_changed_cb), window); -g_signal_connect (attributes, <span class="number">"notify::valid"</span>, G_CALLBACK (viewport_valid_changed_cb), web_view); - -<span class="comment">/*</span><span class="comment"> Handle the viewport-attributes-recompute-requested signal to override the device width </span><span class="comment">*/</span> -<span class="type">static</span> <span class="type">void</span> -viewport_recompute_cb (WebKitWebView* web_view, WebKitViewportAttributes* attributes, GtkWidget* window) -{ - <span class="type">int</span> override_available_width = <span class="number">480</span>; - g_object_set (G_OBJECT(attributes), <span class="number">"available-width"</span>, override_available_width, <span class="number">NULL</span>); -} - -<span class="comment">/*</span><span class="comment"> Handle the viewport-attributes-changed signal to recompute the initial scale factor </span><span class="comment">*/</span> -<span class="type">static</span> <span class="type">void</span> -viewport_changed_cb (WebKitWebView* web_view, WebKitViewportAttributes* attributes, gpointer data) -{ - gfloat initialScale; - g_object_get (G_OBJECT (atributes), <span class="number">"initial-scale-factor"</span>, &initialScale, <span class="number">NULL</span>); - webkit_web_view_set_zoom_level (web_view, initialScale); -} - -<span class="comment">/*</span><span class="comment"> Handle the notify::valid signal to initialize the zoom level </span><span class="comment">*/</span> -<span class="type">static</span> <span class="type">void</span> -viewport_valid_changed_cb (WebKitViewportAttributes* attributes, GParamSpec* pspec, WebKitWebView* web_view) -{ - gboolean is_valid; - g_object_get (attributes, <span class="number">"valid"</span>, &is_valid, <span class="number">NULL</span>); - <span class="keyword">if</span> (!is_valid) - webkit_web_view_set_zoom_level (web_view, <span class="number">1.0</span>); -}</pre></td> - </tr> - </tbody> - </table> -</div> - -</div> -<div class="refsect1"> -<a name="WebKitViewportAttributes.functions_details"></a><h2>Functions</h2> -<div class="refsect2"> -<a name="webkit-viewport-attributes-recompute"></a><h3>webkit_viewport_attributes_recompute ()</h3> -<pre class="programlisting"><span class="returnvalue">void</span> -webkit_viewport_attributes_recompute (<em class="parameter"><code><a class="link" href="WebKitViewportAttributes.html" title="WebKitViewportAttributes"><span class="type">WebKitViewportAttributes</span></a> *viewportAttributes</code></em>);</pre> -<p>Recompute the optimal viewport attributes and emit the viewport-attribute-changed signal. -The viewport-attributes-recompute-requested signal also will be handled to override -the device size, available size, desktop width, or device DPI.</p> -<div class="refsect3"> -<a name="webkit-viewport-attributes-recompute.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>viewportAttributes</p></td> -<td class="parameter_description"><p>a <a class="link" href="WebKitViewportAttributes.html" title="WebKitViewportAttributes"><span class="type">WebKitViewportAttributes</span></a></p></td> -<td class="parameter_annotations"> </td> -</tr></tbody> -</table></div> -</div> -<p class="since">Since: 1.3.8</p> -</div> -</div> -<div class="refsect1"> -<a name="WebKitViewportAttributes.other_details"></a><h2>Types and Values</h2> -<div class="refsect2"> -<a name="WebKitViewportAttributes-struct"></a><h3>WebKitViewportAttributes</h3> -<pre class="programlisting">typedef struct _WebKitViewportAttributes WebKitViewportAttributes;</pre> -<p> -</p> -</div> -</div> -<div class="refsect1"> -<a name="WebKitViewportAttributes.property-details"></a><h2>Property Details</h2> -<div class="refsect2"> -<a name="WebKitViewportAttributes--available-height"></a><h3>The <code class="literal">“available-height”</code> property</h3> -<pre class="programlisting"> “available-height” <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> -<p>The height of the visible area.</p> -<p>Flags: Read / Write</p> -<p>Allowed values: >= 0</p> -<p>Default value: 0</p> -</div> -<hr> -<div class="refsect2"> -<a name="WebKitViewportAttributes--available-width"></a><h3>The <code class="literal">“available-width”</code> property</h3> -<pre class="programlisting"> “available-width” <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> -<p>The width of the visible area.</p> -<p>Flags: Read / Write</p> -<p>Allowed values: >= 0</p> -<p>Default value: 0</p> -</div> -<hr> -<div class="refsect2"> -<a name="WebKitViewportAttributes--desktop-width"></a><h3>The <code class="literal">“desktop-width”</code> property</h3> -<pre class="programlisting"> “desktop-width” <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> -<p>The width of viewport that works well for most web pages designed for desktop.</p> -<p>Flags: Read / Write</p> -<p>Allowed values: >= 0</p> -<p>Default value: 980</p> -</div> -<hr> -<div class="refsect2"> -<a name="WebKitViewportAttributes--device-dpi"></a><h3>The <code class="literal">“device-dpi”</code> property</h3> -<pre class="programlisting"> “device-dpi” <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> -<p>The number of dots per inch of the screen.</p> -<p>Flags: Read / Write</p> -<p>Allowed values: >= 0</p> -<p>Default value: 160</p> -</div> -<hr> -<div class="refsect2"> -<a name="WebKitViewportAttributes--device-height"></a><h3>The <code class="literal">“device-height”</code> property</h3> -<pre class="programlisting"> “device-height” <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> -<p>The height of the screen.</p> -<p>Flags: Read / Write</p> -<p>Allowed values: >= 0</p> -<p>Default value: 0</p> -</div> -<hr> -<div class="refsect2"> -<a name="WebKitViewportAttributes--device-pixel-ratio"></a><h3>The <code class="literal">“device-pixel-ratio”</code> property</h3> -<pre class="programlisting"> “device-pixel-ratio” <a href="../glib/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></pre> -<p>The device pixel ratio of the viewport.</p> -<p>Flags: Read</p> -<p>Allowed values: >= -1</p> -<p>Default value: -1</p> -</div> -<hr> -<div class="refsect2"> -<a name="WebKitViewportAttributes--device-width"></a><h3>The <code class="literal">“device-width”</code> property</h3> -<pre class="programlisting"> “device-width” <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> -<p>The width of the screen.</p> -<p>Flags: Read / Write</p> -<p>Allowed values: >= 0</p> -<p>Default value: 0</p> -</div> -<hr> -<div class="refsect2"> -<a name="WebKitViewportAttributes--height"></a><h3>The <code class="literal">“height”</code> property</h3> -<pre class="programlisting"> “height” <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> -<p>The height of the viewport.</p> -<p>Flags: Read</p> -<p>Allowed values: >= 0</p> -<p>Default value: 0</p> -</div> -<hr> -<div class="refsect2"> -<a name="WebKitViewportAttributes--initial-scale-factor"></a><h3>The <code class="literal">“initial-scale-factor”</code> property</h3> -<pre class="programlisting"> “initial-scale-factor” <a href="../glib/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></pre> -<p>The initial scale of the viewport.</p> -<p>Flags: Read</p> -<p>Allowed values: >= -1</p> -<p>Default value: -1</p> -</div> -<hr> -<div class="refsect2"> -<a name="WebKitViewportAttributes--maximum-scale-factor"></a><h3>The <code class="literal">“maximum-scale-factor”</code> property</h3> -<pre class="programlisting"> “maximum-scale-factor” <a href="../glib/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></pre> -<p>The maximum scale of the viewport.</p> -<p>Flags: Read</p> -<p>Allowed values: >= -1</p> -<p>Default value: -1</p> -</div> -<hr> -<div class="refsect2"> -<a name="WebKitViewportAttributes--minimum-scale-factor"></a><h3>The <code class="literal">“minimum-scale-factor”</code> property</h3> -<pre class="programlisting"> “minimum-scale-factor” <a href="../glib/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a></pre> -<p>The minimum scale of the viewport.</p> -<p>Flags: Read</p> -<p>Allowed values: >= -1</p> -<p>Default value: -1</p> -</div> -<hr> -<div class="refsect2"> -<a name="WebKitViewportAttributes--user-scalable"></a><h3>The <code class="literal">“user-scalable”</code> property</h3> -<pre class="programlisting"> “user-scalable” <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> -<p>Determines whether or not the user can zoom in and out.</p> -<p>Flags: Read</p> -<p>Default value: TRUE</p> -</div> -<hr> -<div class="refsect2"> -<a name="WebKitViewportAttributes--valid"></a><h3>The <code class="literal">“valid”</code> property</h3> -<pre class="programlisting"> “valid” <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> -<p>Determines whether or not the attributes are valid, and can be used.</p> -<p>Flags: Read</p> -<p>Default value: FALSE</p> -</div> -<hr> -<div class="refsect2"> -<a name="WebKitViewportAttributes--width"></a><h3>The <code class="literal">“width”</code> property</h3> -<pre class="programlisting"> “width” <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> -<p>The width of the viewport.</p> -<p>Flags: Read</p> -<p>Allowed values: >= 0</p> -<p>Default value: 0</p> -</div> -</div> -<div class="refsect1"> -<a name="WebKitViewportAttributes.see-also"></a><h2>See Also</h2> -<p><a class="link" href="webkitgtk-webkitwebview.html#WebKitWebView-viewport-attributes-recompute-requested" title="The “viewport-attributes-recompute-requested” signal"><span class="type">“viewport-attributes-recompute-requested”</span></a>, <a class="link" href="webkitgtk-webkitwebview.html#WebKitWebView-viewport-attributes-changed" title="The “viewport-attributes-changed” signal"><span class="type">“viewport-attributes-changed”</span></a></p> -</div> -</div> -<div class="footer"> -<hr>Generated by GTK-Doc V1.25.1</div> -</body> -</html>
\ No newline at end of file |
