This file is indexed.

/usr/share/gtk-doc/html/pygtk/class-gtkimcontext.html is in python-gtk2-doc 2.24.0-5.1ubuntu2.

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
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.IMContext</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtkimagemenuitem.html" title="gtk.ImageMenuItem"><link rel="next" href="class-gtkimcontextsimple.html" title="gtk.IMContextSimple"></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">gtk.IMContext</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkimagemenuitem.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkimcontextsimple.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.IMContext"><a name="class-gtkimcontext"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">gtk.IMContext</span></h2><p>gtk.IMContext — an abstract base class defining a generic input method
interface</p></div><div class="refsect1" title="Synopsis"><a name="id3759620"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.IMContext</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a></span></span>):
<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkimcontext.html#method-gtkimcontext--set-client-window" title="gtk.IMContext.set_client_window">set_client_window</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>window</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkimcontext.html#method-gtkimcontext--get-preedit-string" title="gtk.IMContext.get_preedit_string">get_preedit_string</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkimcontext.html#method-gtkimcontext--filter-keypress" title="gtk.IMContext.filter_keypress">filter_keypress</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>key</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkimcontext.html#method-gtkimcontext--focus-in" title="gtk.IMContext.focus_in">focus_in</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkimcontext.html#method-gtkimcontext--focus-out" title="gtk.IMContext.focus_out">focus_out</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkimcontext.html#method-gtkimcontext--reset" title="gtk.IMContext.reset">reset</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkimcontext.html#method-gtkimcontext--set-cursor-location" title="gtk.IMContext.set_cursor_location">set_cursor_location</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>area</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkimcontext.html#method-gtkimcontext--set-use-preedit" title="gtk.IMContext.set_use_preedit">set_use_preedit</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_preedit</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkimcontext.html#method-gtkimcontext--set-surrounding" title="gtk.IMContext.set_surrounding">set_surrounding</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>text</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>len</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cursor_index</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkimcontext.html#method-gtkimcontext--get-surrounding" title="gtk.IMContext.get_surrounding">get_surrounding</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkimcontext.html#method-gtkimcontext--delete-surrounding" title="gtk.IMContext.delete_surrounding">delete_surrounding</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>n_chars</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3759959"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
  +-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
    +-- <a class="link" href="class-gtkimcontext.html" title="gtk.IMContext">gtk.IMContext</a>
</pre></div><div class="refsect1" title="gtk.IMContext Signal Prototypes"><a name="signal-prototypes-gtkimcontext"></a><h2>gtk.IMContext Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtkimcontext.html#signal-gtkimcontext--commit" title='The "commit" gtk.IMContext Signal'>commit</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>imcontext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>string</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkimcontext.html#signal-gtkimcontext--delete-surrounding" title='The "delete-surrounding" gtk.IMContext Signal'>delete-surrounding</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>imcontext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>offset</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>n_chars</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkimcontext.html#signal-gtkimcontext--preedit-changed" title='The "preedit-changed" gtk.IMContext Signal'>preedit-changed</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>imcontext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkimcontext.html#signal-gtkimcontext--preedit-end" title='The "preedit-end" gtk.IMContext Signal'>preedit-end</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>imcontext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkimcontext.html#signal-gtkimcontext--preedit-start" title='The "preedit-start" gtk.IMContext Signal'>preedit-start</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>imcontext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkimcontext.html#signal-gtkimcontext--retrieve-surrounding" title='The "retrieve-surrounding" gtk.IMContext Signal'>retrieve-surrounding</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>imcontext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id3760441"></a><h2>Description</h2><p>The <a class="link" href="class-gtkimcontext.html" title="gtk.IMContext"><code class="classname">gtk.IMContext</code></a> is
an abstract base class used to provide objects to manage the context for
input methods used to support text input in various natural languages. The
character input for some languages (e.g. Chinese, Japanese and Korean)
cannot be easily input using standard keyboards so multiple keystrokes are
used to input a single character. Input methods are used to help this
process by providing feedback of the characters input and managing the
context and valid combinations. The<a class="link" href="class-gtkimcontext.html" title="gtk.IMContext"><code class="classname">gtk.IMContext</code></a>
subclasses manage the required context information for applications and
widgets such as the <a class="link" href="class-gtkentry.html" title="gtk.Entry"><code class="classname">gtk.Entry</code></a> and <a class="link" href="class-gtktextview.html" title="gtk.TextView"><code class="classname">gtk.TextView</code></a>
widgets.</p><p>The <a class="link" href="class-gtkimcontext.html" title="gtk.IMContext"><code class="classname">gtk.IMContext</code></a>
manages the context of the text surrounding the cursor and the preedit text
that provides feedback about the in-process multiple character
composition.</p></div><div class="refsect1" title="Methods"><a name="id3760504"></a><h2>Methods</h2><div class="refsect2" title="gtk.IMContext.set_client_window"><a name="method-gtkimcontext--set-client-window"></a><h3>gtk.IMContext.set_client_window</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_client_window</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>window</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>window</code></strong> :</span></p></td><td>the client window. This may be
<code class="literal">None</code> to indicate that the previous client window no
longer exists.</td></tr></tbody></table><p>The <code class="methodname">set_client_window</code>() method set the
client window for the input context; this is the <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> in
which the input appears. This window is used in order to correctly position
status windows, and may also be used for purposes internal to the input
method.</p></div><div class="refsect2" title="gtk.IMContext.get_preedit_string"><a name="method-gtkimcontext--get-preedit-string"></a><h3>gtk.IMContext.get_preedit_string</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_preedit_string</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing the preedit string, the
attribute list and the position of cursor (in bytes) within the preedit
string.</td></tr></tbody></table><p>The <code class="methodname">get_preedit_string</code>() method returns
a tuple containing: the current preedit string for the input context, a list
of attributes to apply to the string and the cursor position within the
string. This string should be displayed inserted at the insertion
point.</p></div><div class="refsect2" title="gtk.IMContext.filter_keypress"><a name="method-gtkimcontext--filter-keypress"></a><h3>gtk.IMContext.filter_keypress</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">filter_keypress</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>event</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>key</code></strong> :</span></p></td><td>the key event</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the input method
handled the keystroke.</td></tr></tbody></table><p>The <code class="methodname">filter_keypress</code>() method allows an
input method to internally handle a key press event. If this function
returns <code class="literal">True</code>, then no further processing should be done
for this keystroke.</p></div><div class="refsect2" title="gtk.IMContext.focus_in"><a name="method-gtkimcontext--focus-in"></a><h3>gtk.IMContext.focus_in</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">focus_in</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">focus_in</code>() method notifies the
input method that the widget to which this input context corresponds has
gained focus. The input method may, for example, change the displayed
feedback to reflect this change.</p></div><div class="refsect2" title="gtk.IMContext.focus_out"><a name="method-gtkimcontext--focus-out"></a><h3>gtk.IMContext.focus_out</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">focus_out</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">focus_out</code>() method notifies the
input method that the widget to which this input context corresponds has
lost focus. The input method may, for example, change the displayed feedback
or reset the context state to reflect this change.</p></div><div class="refsect2" title="gtk.IMContext.reset"><a name="method-gtkimcontext--reset"></a><h3>gtk.IMContext.reset</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">reset</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">reset</code>() method notifies the input
method that a significant change in context (such as a change in cursor
position) has been made. This will typically cause the input method to clear
the preedit state.</p></div><div class="refsect2" title="gtk.IMContext.set_cursor_location"><a name="method-gtkimcontext--set-cursor-location"></a><h3>gtk.IMContext.set_cursor_location</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_cursor_location</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>area</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>area</code></strong> :</span></p></td><td>new location</td></tr></tbody></table><p>The <code class="methodname">set_cursor_location</code>() method
notifies the input method that a change in cursor position has been
made.</p></div><div class="refsect2" title="gtk.IMContext.set_use_preedit"><a name="method-gtkimcontext--set-use-preedit"></a><h3>gtk.IMContext.set_use_preedit</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_use_preedit</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_preedit</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>use_preedit</code></strong> :</span></p></td><td>if <code class="literal">True</code> the IM context
should use the preedit string.</td></tr></tbody></table><p>The <code class="methodname">set_use_preedit</code>() method sets the
use preedit setting to the value of use_preedit. If
<em class="parameter"><code>use_preedit</code></em> is <code class="literal">True</code> (the default)
the IM context should use the preedit string to display feedback. If
<em class="parameter"><code>use_preedit</code></em> is <code class="literal">False</code> the IM
context may use some other method to display feedback, such as displaying it
in a child of the root window.</p></div><div class="refsect2" title="gtk.IMContext.set_surrounding"><a name="method-gtkimcontext--set-surrounding"></a><h3>gtk.IMContext.set_surrounding</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_surrounding</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>text</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>len</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cursor_index</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>text</code></strong> :</span></p></td><td>the text surrounding the insertion point, as
UTF-8. the preedit string should not be included within
it.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>len</code></strong> :</span></p></td><td>the length of <em class="parameter"><code>text</code></em>, or
-1 to calculate the length of
<em class="parameter"><code>text</code></em>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cursor_index</code></strong> :</span></p></td><td>the byte index of the insertion cursor within
<em class="parameter"><code>text</code></em>.</td></tr></tbody></table><p>The <code class="methodname">set_surrounding</code>() method sets
surrounding context around the insertion point and preedit string. This
function is expected to be called in response to the "retrieve_surrounding"
signal, and will likely have no effect if called at other times.</p></div><div class="refsect2" title="gtk.IMContext.get_surrounding"><a name="method-gtkimcontext--get-surrounding"></a><h3>gtk.IMContext.get_surrounding</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_surrounding</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing the UTF-8 encoded string of
text holding context around the insertion point and the byte index of the
insertion cursor within the string, or None if no surrounding context was
retrieved.</td></tr></tbody></table><p>The <code class="methodname">get_surrounding</code>() method returns a
tuple containing the text surrounding the cursor and the byte index of the
cursor within the text. Input methods typically want context in order to
constrain input text based on existing text; this is important for languages
such as Thai where only some sequences of characters are allowed.</p><p>This function is implemented by emitting the
"retrieve_surrounding" signal on the input method; in response to this
signal, a widget should provide as much context as is available, up to an
entire paragraph, by calling <a class="link" href="class-gtkimcontext.html#method-gtkimcontext--set-surrounding" title="gtk.IMContext.set_surrounding"><code class="methodname">set_surrounding</code>()</a>. 
Note that there is no obligation for a widget to respond to the
"retrieve_surrounding" signal, so input methods must be prepared to function
without context.</p></div><div class="refsect2" title="gtk.IMContext.delete_surrounding"><a name="method-gtkimcontext--delete-surrounding"></a><h3>gtk.IMContext.delete_surrounding</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">delete_surrounding</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>n_chars</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>offset</code></strong> :</span></p></td><td>the offset from cursor position in chars; a
negative value means start before the cursor.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>n_chars</code></strong> :</span></p></td><td>the number of characters to
delete.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the signal was
handled.</td></tr></tbody></table><p>The delete_surrounding() method asks the widget that the input
context is attached to to delete characters around the cursor position by
emitting the "delete_surrounding" signal. Note that
<em class="parameter"><code>offset</code></em> and <em class="parameter"><code>n_chars</code></em> are in
characters not in bytes, which differs from the usage other places in the
<a class="link" href="class-gtkimcontext.html" title="gtk.IMContext"><code class="classname">gtk.IMContext</code></a>
class.</p><p>In order to use this function, you should first call <a class="link" href="class-gtkimcontext.html#method-gtkimcontext--get-surrounding" title="gtk.IMContext.get_surrounding"><code class="methodname">get_surrounding</code>()</a> 
to get the current context, and call this function immediately afterward to
make sure that you know what you are deleting. You should also account for
the fact that even if the signal was handled, the input context might not
have deleted all the characters that were requested to be deleted.</p><p>This function is used by an input method that wants to make
substitutions in the existing text in response to new input. It is not useful
for applications.</p></div></div><div class="refsect1" title="Signals"><a name="id3761482"></a><h2>Signals</h2><div class="refsect2" title='The "commit" gtk.IMContext Signal'><a name="signal-gtkimcontext--commit"></a><h3>The "commit" gtk.IMContext Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>imcontext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>string</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>imcontext</code></em> :</span></p></td><td>the imcontext that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td><td>the text to be committed</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "commit" signal is emitted when the text is ready to be
displayed.</p></div><div class="refsect2" title='The "delete-surrounding" gtk.IMContext Signal'><a name="signal-gtkimcontext--delete-surrounding"></a><h3>The "delete-surrounding" gtk.IMContext Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>imcontext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>imcontext</code></em> :</span></p></td><td>the imcontext that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td><td>the offset from the cursor position of the text
to be deleted</td></tr><tr><td><p><span class="term"><em class="parameter"><code>n_chars</code></em> :</span></p></td><td>the number of characters to be
deleted</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the signal was
handled.</td></tr></tbody></table><p>The "delete-surrounding" signal is emitted when the input method
needs to delete the context text.</p></div><div class="refsect2" title='The "preedit-changed" gtk.IMContext Signal'><a name="signal-gtkimcontext--preedit-changed"></a><h3>The "preedit-changed" gtk.IMContext Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>imcontext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>imcontext</code></em> :</span></p></td><td>the imcontext that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "preedit-changed" signal is emitted when the preedit text
has changed.</p></div><div class="refsect2" title='The "preedit-end" gtk.IMContext Signal'><a name="signal-gtkimcontext--preedit-end"></a><h3>The "preedit-end" gtk.IMContext Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>imcontext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>imcontext</code></em> :</span></p></td><td>the imcontext that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "preedit-end" signal is emitted when preediting is
completed.</p></div><div class="refsect2" title='The "preedit-start" gtk.IMContext Signal'><a name="signal-gtkimcontext--preedit-start"></a><h3>The "preedit-start" gtk.IMContext Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>imcontext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>imcontext</code></em> :</span></p></td><td>the imcontext that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "preedit-start" signal is emitted when preediting is
started.</p></div><div class="refsect2" title='The "retrieve-surrounding" gtk.IMContext Signal'><a name="signal-gtkimcontext--retrieve-surrounding"></a><h3>The "retrieve-surrounding" gtk.IMContext Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>imcontext</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>imcontext</code></em> :</span></p></td><td>the imcontext that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the signal was
handled.</td></tr></tbody></table><p>The "retrieve-surrounding" signal is emitted when the input
method requires the context surrounding the cursor. The callback should set
the input method surrounding context by calling the <a class="link" href="class-gtkimcontext.html#method-gtkimcontext--set-surrounding" title="gtk.IMContext.set_surrounding"><code class="methodname">set_surrounding</code>()</a> 
method. The method returns <code class="literal">True</code> if the signal was handled
by the callback.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkimagemenuitem.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtkimcontextsimple.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.ImageMenuItem </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.IMContextSimple</td></tr></table></div></body></html>