/usr/share/gtk-doc/html/clutter-cookbook/events.html is in libclutter-1.0-doc 1.24.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Chapter 3. Events</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The Clutter Cookbook"><link rel="up" href="index.html" title="The Clutter Cookbook"><link rel="prev" href="actors-non-rectangular.html" title="6. Creating an actor with a non-rectangular shape"><link rel="next" href="events-handling-key-events.html" title="2. Handling key events"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. Events</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="actors-non-rectangular.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="events-handling-key-events.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="events"></a>Chapter 3. Events</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="events.html#events-introduction">1. Introduction</a></span></dt><dt><span class="section"><a href="events-handling-key-events.html">2. Handling key events</a></span></dt><dd><dl><dt><span class="section"><a href="events-handling-key-events.html#idp60459344">2.1. Problem</a></span></dt><dt><span class="section"><a href="events-handling-key-events.html#idp60460656">2.2. Solutions</a></span></dt><dt><span class="section"><a href="events-handling-key-events.html#events-handling-key-events-discussion">2.3. Discussion</a></span></dt></dl></dd><dt><span class="section"><a href="events-mouse-scroll.html">3. Detecting mouse scrolling on an actor</a></span></dt><dd><dl><dt><span class="section"><a href="events-mouse-scroll.html#idp60502640">3.1. Problem</a></span></dt><dt><span class="section"><a href="events-mouse-scroll.html#idp60504112">3.2. Solution</a></span></dt><dt><span class="section"><a href="events-mouse-scroll.html#idp60511984">3.3. Discussion</a></span></dt><dt><span class="section"><a href="events-mouse-scroll.html#idp60552192">3.4. Full example</a></span></dt></dl></dd><dt><span class="section"><a href="events-pointer-motion.html">4. Detecting pointer movements on an actor</a></span></dt><dd><dl><dt><span class="section"><a href="events-pointer-motion.html#events-pointer-motion-problem">4.1. Problem</a></span></dt><dt><span class="section"><a href="events-pointer-motion.html#events-pointer-motion-solution">4.2. Solution</a></span></dt><dt><span class="section"><a href="events-pointer-motion.html#events-pointer-motion-discussion">4.3. Discussion</a></span></dt><dt><span class="section"><a href="events-pointer-motion.html#idp60612544">4.4. Full examples</a></span></dt></dl></dd><dt><span class="section"><a href="events-buttons.html">5. Making an actor respond to button events</a></span></dt><dd><dl><dt><span class="section"><a href="events-buttons.html#idp60640816">5.1. Problem</a></span></dt><dt><span class="section"><a href="events-buttons.html#idp60646096">5.2. Solution</a></span></dt><dt><span class="section"><a href="events-buttons.html#idp60663184">5.3. Discussion</a></span></dt><dt><span class="section"><a href="events-buttons.html#idp61178592">5.4. Full examples</a></span></dt></dl></dd></dl></div><div class="epigraph"><p>Crossing into established events is strictly forbidden. Except for
cheap tricks.</p><div class="attribution"><span>—<span class="attribution">The Tenth Doctor (David Tennant)</span></span></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="events-introduction"></a>1. Introduction</h2></div></div></div><p>Once you have set up a scene on the stage, in order to respond
to user interaction you will have to handle events coming from the
underlying platform.</p><p>Events are relayed to actors by Clutter in form of
<span class="emphasis"><em>signals</em></span>; signals are a facility provided by the
GObject framework to call functions depending on a unique name. A signal
can be thought as a message that an object instance broadcasts to various
listener functions.</p><p>There are various events that Clutter will handle: mostly, they
deal with input devices, like a mouse pointer or a keyboard; but they can
also come from the windowing system, like the
<span class="emphasis"><em>delete-event</em></span> signal that is emitted when the user
closes the window of the stage.</p><p>Each event has a particular <span class="emphasis"><em>source</em></span>, that is
the actor that received the event. The event handling sequence is divided
in two phases:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>the <span class="emphasis"><em>capture</em></span> phase, which consists
in an emission of the <span class="emphasis"><em>captured-event</em></span> signal
starting from the stage to, following the parent-child relationship,
the source of the event;</p></li><li class="listitem"><p>the <span class="emphasis"><em>bubble</em></span> phase, which consists
in an emission of the <span class="emphasis"><em>event</em></span> signal starting from
the source of the event to, following the parent-child
relationship, the stage.</p></li></ol></div><p>At any point during the event emission sequence a handler of either
the captured-event or the event signals can stop it, by returning a boolean
value of <span class="emphasis"><em>true</em></span>, which means that the event has been
handled. If an event hasn't been handled, a boolean value of
<span class="emphasis"><em>false</em></span> should be returned instead.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Clutter provides two useful macros to avoid remembering which
boolean value should be used in an event signal handler:
CLUTTER_EVENT_PROPAGATE, equivalent to FALSE; and CLUTTER_EVENT_STOP,
equivalent to TRUE.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="actors-non-rectangular.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="events-handling-key-events.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6. Creating an actor with a non-rectangular shape </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2. Handling key events</td></tr></table></div></body></html>
|