248 lines
12 KiB
HTML
248 lines
12 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<title>GtkGestureSwipe: GTK+ 3 Reference Manual</title>
|
||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
|
||
<link rel="up" href="Gestures.html" title="Gestures and event handling">
|
||
<link rel="prev" href="GtkGesturePan.html" title="GtkGesturePan">
|
||
<link rel="next" href="GtkGestureRotate.html" title="GtkGestureRotate">
|
||
<meta name="generator" content="GTK-Doc V1.33.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="#GtkGestureSwipe.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
|
||
<a href="#GtkGestureSwipe.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_signals"> <span class="dim">|</span>
|
||
<a href="#GtkGestureSwipe.signals" class="shortcut">Signals</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="Gestures.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||
<td><a accesskey="p" href="GtkGesturePan.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||
<td><a accesskey="n" href="GtkGestureRotate.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||
</tr></table>
|
||
<div class="refentry">
|
||
<a name="GtkGestureSwipe"></a><div class="titlepage"></div>
|
||
<div class="refnamediv"><table width="100%"><tr>
|
||
<td valign="top">
|
||
<h2><span class="refentrytitle"><a name="GtkGestureSwipe.top_of_page"></a>GtkGestureSwipe</span></h2>
|
||
<p>GtkGestureSwipe — Swipe gesture</p>
|
||
</td>
|
||
<td class="gallery_image" valign="top" align="right"></td>
|
||
</tr></table></div>
|
||
<div class="refsect1">
|
||
<a name="GtkGestureSwipe.functions"></a><h2>Functions</h2>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="functions_proto_type">
|
||
<col class="functions_proto_name">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GtkGesture.html" title="GtkGesture"><span class="returnvalue">GtkGesture</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkGestureSwipe.html#gtk-gesture-swipe-new" title="gtk_gesture_swipe_new ()">gtk_gesture_swipe_new</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkGestureSwipe.html#gtk-gesture-swipe-get-velocity" title="gtk_gesture_swipe_get_velocity ()">gtk_gesture_swipe_get_velocity</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkGestureSwipe.signals"></a><h2>Signals</h2>
|
||
<div class="informaltable"><table class="informaltable" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="signal_proto_type">
|
||
<col width="300px" class="signal_proto_name">
|
||
<col width="200px" class="signal_proto_flags">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="signal_type"><span class="returnvalue">void</span></td>
|
||
<td class="signal_name"><a class="link" href="GtkGestureSwipe.html#GtkGestureSwipe-swipe" title="The “swipe” signal">swipe</a></td>
|
||
<td class="signal_flags">Run Last</td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkGestureSwipe.other"></a><h2>Types and Values</h2>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="other_proto_type">
|
||
<col class="other_proto_name">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="datatype_keyword"> </td>
|
||
<td class="function_name"><a class="link" href="GtkGestureSwipe.html#GtkGestureSwipe-struct" title="GtkGestureSwipe">GtkGestureSwipe</a></td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkGestureSwipe.object-hierarchy"></a><h2>Object Hierarchy</h2>
|
||
<pre class="screen"> GObject
|
||
<span class="lineart">╰──</span> <a class="link" href="GtkEventController.html" title="GtkEventController">GtkEventController</a>
|
||
<span class="lineart">╰──</span> <a class="link" href="GtkGesture.html" title="GtkGesture">GtkGesture</a>
|
||
<span class="lineart">╰──</span> <a class="link" href="GtkGestureSingle.html" title="GtkGestureSingle">GtkGestureSingle</a>
|
||
<span class="lineart">╰──</span> GtkGestureSwipe
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkGestureSwipe.includes"></a><h2>Includes</h2>
|
||
<pre class="synopsis">#include <gtk/gtk.h>
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkGestureSwipe.description"></a><h2>Description</h2>
|
||
<p><a class="link" href="GtkGestureSwipe.html" title="GtkGestureSwipe"><span class="type">GtkGestureSwipe</span></a> is a <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> implementation able to recognize
|
||
swipes, after a press/move/.../move/release sequence happens, the
|
||
<a class="link" href="GtkGestureSwipe.html#GtkGestureSwipe-swipe" title="The “swipe” signal"><span class="type">“swipe”</span></a> signal will be emitted, providing the velocity
|
||
and directionality of the sequence at the time it was lifted.</p>
|
||
<p>If the velocity is desired in intermediate points,
|
||
<a class="link" href="GtkGestureSwipe.html#gtk-gesture-swipe-get-velocity" title="gtk_gesture_swipe_get_velocity ()"><code class="function">gtk_gesture_swipe_get_velocity()</code></a> can be called on eg. a
|
||
<a class="link" href="GtkGesture.html#GtkGesture-update" title="The “update” signal"><span class="type">“update”</span></a> handler.</p>
|
||
<p>All velocities are reported in pixels/sec units.</p>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkGestureSwipe.functions_details"></a><h2>Functions</h2>
|
||
<div class="refsect2">
|
||
<a name="gtk-gesture-swipe-new"></a><h3>gtk_gesture_swipe_new ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkGesture.html" title="GtkGesture"><span class="returnvalue">GtkGesture</span></a> *
|
||
gtk_gesture_swipe_new (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
|
||
<p>Returns a newly created <a class="link" href="GtkGesture.html" title="GtkGesture"><span class="type">GtkGesture</span></a> that recognizes swipes.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-gesture-swipe-new.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>widget</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-gesture-swipe-new.returns"></a><h4>Returns</h4>
|
||
<p> a newly created <a class="link" href="GtkGestureSwipe.html" title="GtkGestureSwipe"><span class="type">GtkGestureSwipe</span></a></p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-gesture-swipe-get-velocity"></a><h3>gtk_gesture_swipe_get_velocity ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gtk_gesture_swipe_get_velocity (<em class="parameter"><code><a class="link" href="GtkGestureSwipe.html" title="GtkGestureSwipe"><span class="type">GtkGestureSwipe</span></a> *gesture</code></em>,
|
||
<em class="parameter"><code><span class="type">gdouble</span> *velocity_x</code></em>,
|
||
<em class="parameter"><code><span class="type">gdouble</span> *velocity_y</code></em>);</pre>
|
||
<p>If the gesture is recognized, this function returns <code class="literal">TRUE</code> and fill in
|
||
<em class="parameter"><code>velocity_x</code></em>
|
||
and <em class="parameter"><code>velocity_y</code></em>
|
||
with the recorded velocity, as per the
|
||
last event(s) processed.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-gesture-swipe-get-velocity.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>gesture</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkGestureSwipe.html" title="GtkGestureSwipe"><span class="type">GtkGestureSwipe</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>velocity_x</p></td>
|
||
<td class="parameter_description"><p>return value for the velocity in the X axis, in pixels/sec. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>velocity_y</p></td>
|
||
<td class="parameter_description"><p>return value for the velocity in the Y axis, in pixels/sec. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-gesture-swipe-get-velocity.returns"></a><h4>Returns</h4>
|
||
<p> whether velocity could be calculated</p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkGestureSwipe.other_details"></a><h2>Types and Values</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkGestureSwipe-struct"></a><h3>GtkGestureSwipe</h3>
|
||
<pre class="programlisting">typedef struct _GtkGestureSwipe GtkGestureSwipe;</pre>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkGestureSwipe.signal-details"></a><h2>Signal Details</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkGestureSwipe-swipe"></a><h3>The <code class="literal">“swipe”</code> signal</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
user_function (<a class="link" href="GtkGestureSwipe.html" title="GtkGestureSwipe"><span class="type">GtkGestureSwipe</span></a> *gesture,
|
||
<span class="type">double</span> velocity_x,
|
||
<span class="type">double</span> velocity_y,
|
||
<span class="type">gpointer</span> user_data)</pre>
|
||
<p>This signal is emitted when the recognized gesture is finished, velocity
|
||
and direction are a product of previously recorded events.</p>
|
||
<div class="refsect3">
|
||
<a name="GtkGestureSwipe-swipe.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>gesture</p></td>
|
||
<td class="parameter_description"><p>object which received the signal</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>velocity_x</p></td>
|
||
<td class="parameter_description"><p>velocity in the X axis, in pixels/sec</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>velocity_y</p></td>
|
||
<td class="parameter_description"><p>velocity in the Y axis, in pixels/sec</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>user_data</p></td>
|
||
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p>Flags: Run Last</p>
|
||
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="footer">
|
||
<hr>Generated by GTK-Doc V1.33.1</div>
|
||
</body>
|
||
</html> |