This file is indexed.

/usr/share/doc/python-gtk2-tutorial/html/ch-AdvancedEventAndSignalHandling.html is in python-gtk2-tutorial 2.4-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
28
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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 20. Advanced Event and Signal Handling</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Tutorial"><link rel="up" href="index.html" title="PyGTK 2.0 Tutorial"><link rel="previous" href="sec-IdleFunctions.html" title="19.3. Idle Functions"><link rel="next" href="sec-SignalEmissionAndPropagation.html" title="20.2. Signal Emission and Propagation"></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 20. Advanced Event and Signal Handling</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sec-IdleFunctions.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="sec-SignalEmissionAndPropagation.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="ch-AdvancedEventAndSignalHandling"></a>Chapter 20. Advanced Event and Signal Handling</h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ch-AdvancedEventAndSignalHandling.html#sec-SignalMethods">20.1. Signal Methods</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch-AdvancedEventAndSignalHandling.html#id3053812">20.1.1. Connecting and Disconnecting Signal Handlers</a></span></dt><dt><span class="sect2"><a href="ch-AdvancedEventAndSignalHandling.html#id3158752">20.1.2. Blocking and Unblocking Signal Handlers</a></span></dt><dt><span class="sect2"><a href="ch-AdvancedEventAndSignalHandling.html#id3136768">20.1.3. Emitting and Stopping Signals</a></span></dt></dl></dd><dt><span class="sect1"><a href="sec-SignalEmissionAndPropagation.html">20.2. Signal Emission and Propagation</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec-SignalMethods"></a>20.1. Signal Methods</h2></div></div><div></div></div><p> The signal methods are <tt class="classname">gobject.GObject</tt>
methods that are inherited by the <tt class="classname">gtk.Object</tt>s
including all the GTK+ widgets.</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id3053812"></a>20.1.1. Connecting and Disconnecting Signal Handlers</h3></div></div><div></div></div><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  handler_id = object.connect(<i class="parameter"><tt>name</tt></i>, <i class="parameter"><tt>cb</tt></i>, <i class="parameter"><tt>cb_args</tt></i>)
  
  handler_id = object.connect_after(<i class="parameter"><tt>name</tt></i>, <i class="parameter"><tt>cb</tt></i>, <i class="parameter"><tt>cb_args</tt></i>)
  
  handler_id = object.connect_object(<i class="parameter"><tt>name</tt></i>, <i class="parameter"><tt>cb</tt></i>, <i class="parameter"><tt>slot_object</tt></i>, <i class="parameter"><tt>cb_args</tt></i>)
  
  handler_id = object.connect_object_after(<i class="parameter"><tt>name</tt></i>, <i class="parameter"><tt>cb</tt></i>, <i class="parameter"><tt>slot_object</tt></i>, <i class="parameter"><tt>cb_args</tt></i>)
  
  object.disconnect(<i class="parameter"><tt>handler_id</tt></i>)
</pre></td></tr></table><p>The first four methods connect a signal handler
(<i class="parameter"><tt>cb</tt></i>) to a <tt class="classname">gtk.Object</tt>
(<i class="parameter"><tt>object</tt></i>) for the given signal name. and return a
<i class="parameter"><tt>handler_id</tt></i> that identifies the connection.
<i class="parameter"><tt>cb_args</tt></i> is zero or more arguments that will be passed
last (in order) to <i class="parameter"><tt>cb</tt></i>. The
<tt class="methodname">connect_after</tt>() and
<tt class="methodname">connect_object_after</tt>() methods will have their
signal handlers called after other signal handlers (including the default
handlers) connected to the same object and signal name. Each object signal
handler has its own set of arguments that it expects. You have to refer to
the GTK+ documentation to figure out what arguments need to be handled by a
signal handler though information for the common widgets is available in
<a href="app-GtkSignals.html" title="Appendix A. GTK Signals">Appendix A, <i>GTK Signals</i></a>. The general signal handler is
similar to:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  def signal_handler(<i class="parameter"><tt>object</tt></i>, ...., <i class="parameter"><tt>cb_args</tt></i>):
</pre></td></tr></table><p>Signal handlers that are defined as part of a Python object
class (specified in the <tt class="methodname">connect</tt>() methods as
<i class="parameter"><tt>self.cb</tt></i>) will have an additional argument passed as
the first argument - the object instance <i class="parameter"><tt>self</tt></i>:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  signal_handler(self, <i class="parameter"><tt>object</tt></i>, ...., <i class="parameter"><tt>cb_args</tt></i>)
</pre></td></tr></table><p>The <tt class="methodname">connect_object</tt>() and
<tt class="methodname">connect_object_after</tt>() methods call the signal
handler with the <i class="parameter"><tt>slot_object</tt></i> substituted in place of
the <i class="parameter"><tt>object</tt></i> as the first argument:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  def signal_handler(<i class="parameter"><tt>slot_object</tt></i>, ...., <b class="parameter"><tt>func_args</tt></b>):

  def signal_handler(self, <i class="parameter"><tt>slot_object</tt></i>, ...., <i class="parameter"><tt>func_args</tt></i>):
</pre></td></tr></table><p>The <tt class="methodname">disconnect</tt>() method destroys the
connection between a signal handler and an object signal. The
<i class="parameter"><tt>handler_id</tt></i> specifies which connection to
destroy.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id3158752"></a>20.1.2. Blocking and Unblocking Signal Handlers</h3></div></div><div></div></div><p>The following methods:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  object.handler_block(<i class="parameter"><tt>handler_id</tt></i>)

  object.handler_unblock(<i class="parameter"><tt>handler_id</tt></i>)
</pre></td></tr></table><p>block and unblock the signal handler specified by
<i class="parameter"><tt>handler_id</tt></i>. When a signal handler is blocked it will
not be invoked when the signal occurs.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id3136768"></a>20.1.3. Emitting and Stopping Signals</h3></div></div><div></div></div><p>The following methods:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  object.emit(<i class="parameter"><tt>name</tt></i>, ...)

  object.emit_stop_by_name(<i class="parameter"><tt>name</tt></i>)
</pre></td></tr></table><p>emit and stop the signal <i class="parameter"><tt>name</tt></i>
respectively. Emitting the signal causes its default and user defined
handlers to be run. The <tt class="methodname">emit_stop_by_name</tt>() method
will abort the current signal name emission.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sec-IdleFunctions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sec-SignalEmissionAndPropagation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">19.3. Idle Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 20.2. Signal Emission and Propagation</td></tr></table></div></body></html>