~ubuntu-branches/ubuntu/trusty/gtk+2.0/trusty

« back to all changes in this revision

Viewing changes to docs/reference/gtk/html/GtkIMContext.html

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-03-25 19:44:15 UTC
  • mfrom: (1.14.18)
  • Revision ID: package-import@ubuntu.com-20130325194415-47ki11je5se76gim
Tags: 2.24.17-0ubuntu1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
struct              <a class="link" href="GtkIMContext.html#GtkIMContextClass" title="struct GtkIMContextClass">GtkIMContextClass</a>;
50
50
struct              <a class="link" href="GtkIMContext.html#GtkIMContextInfo" title="struct GtkIMContextInfo">GtkIMContextInfo</a>;
51
51
<span class="returnvalue">void</span>                <a class="link" href="GtkIMContext.html#gtk-im-context-set-client-window" title="gtk_im_context_set_client_window ()">gtk_im_context_set_client_window</a>    (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
52
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk3/gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>);
 
52
                                                         <em class="parameter"><code><a href="../gdk2/gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>);
53
53
<span class="returnvalue">void</span>                <a class="link" href="GtkIMContext.html#gtk-im-context-get-preedit-string" title="gtk_im_context_get_preedit_string ()">gtk_im_context_get_preedit_string</a>   (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
54
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **str</code></em>,
55
 
                                                         <em class="parameter"><code><span class="type">PangoAttrList</span> **attrs</code></em>,
56
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *cursor_pos</code></em>);
57
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GtkIMContext.html#gtk-im-context-filter-keypress" title="gtk_im_context_filter_keypress ()">gtk_im_context_filter_keypress</a>      (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
58
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk3/gdk2-Event-Structures.html#GdkEventKey"><span class="type">GdkEventKey</span></a> *event</code></em>);
 
54
                                                         <em class="parameter"><code><span class="type">gchar</span> **str</code></em>,
 
55
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a> **attrs</code></em>,
 
56
                                                         <em class="parameter"><code><span class="type">gint</span> *cursor_pos</code></em>);
 
57
<span class="returnvalue">gboolean</span>            <a class="link" href="GtkIMContext.html#gtk-im-context-filter-keypress" title="gtk_im_context_filter_keypress ()">gtk_im_context_filter_keypress</a>      (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
 
58
                                                         <em class="parameter"><code><a href="../gdk2/gdk2-Event-Structures.html#GdkEventKey"><span class="type">GdkEventKey</span></a> *event</code></em>);
59
59
<span class="returnvalue">void</span>                <a class="link" href="GtkIMContext.html#gtk-im-context-focus-in" title="gtk_im_context_focus_in ()">gtk_im_context_focus_in</a>             (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>);
60
60
<span class="returnvalue">void</span>                <a class="link" href="GtkIMContext.html#gtk-im-context-focus-out" title="gtk_im_context_focus_out ()">gtk_im_context_focus_out</a>            (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>);
61
61
<span class="returnvalue">void</span>                <a class="link" href="GtkIMContext.html#gtk-im-context-reset" title="gtk_im_context_reset ()">gtk_im_context_reset</a>                (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>);
62
62
<span class="returnvalue">void</span>                <a class="link" href="GtkIMContext.html#gtk-im-context-set-cursor-location" title="gtk_im_context_set_cursor_location ()">gtk_im_context_set_cursor_location</a>  (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
63
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gdk3/gdk2-Points-Rectangles-and-Regions.html#GdkRectangle"><span class="type">GdkRectangle</span></a> *area</code></em>);
 
63
                                                         <em class="parameter"><code>const <a href="../gdk2/gdk2-Points-Rectangles-and-Regions.html#GdkRectangle"><span class="type">GdkRectangle</span></a> *area</code></em>);
64
64
<span class="returnvalue">void</span>                <a class="link" href="GtkIMContext.html#gtk-im-context-set-use-preedit" title="gtk_im_context_set_use_preedit ()">gtk_im_context_set_use_preedit</a>      (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
65
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_preedit</code></em>);
 
65
                                                         <em class="parameter"><code><span class="type">gboolean</span> use_preedit</code></em>);
66
66
<span class="returnvalue">void</span>                <a class="link" href="GtkIMContext.html#gtk-im-context-set-surrounding" title="gtk_im_context_set_surrounding ()">gtk_im_context_set_surrounding</a>      (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
67
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>,
68
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> len</code></em>,
69
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> cursor_index</code></em>);
70
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GtkIMContext.html#gtk-im-context-get-surrounding" title="gtk_im_context_get_surrounding ()">gtk_im_context_get_surrounding</a>      (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
71
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **text</code></em>,
72
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *cursor_index</code></em>);
73
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GtkIMContext.html#gtk-im-context-delete-surrounding" title="gtk_im_context_delete_surrounding ()">gtk_im_context_delete_surrounding</a>   (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
74
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> offset</code></em>,
75
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_chars</code></em>);
 
67
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *text</code></em>,
 
68
                                                         <em class="parameter"><code><span class="type">gint</span> len</code></em>,
 
69
                                                         <em class="parameter"><code><span class="type">gint</span> cursor_index</code></em>);
 
70
<span class="returnvalue">gboolean</span>            <a class="link" href="GtkIMContext.html#gtk-im-context-get-surrounding" title="gtk_im_context_get_surrounding ()">gtk_im_context_get_surrounding</a>      (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
 
71
                                                         <em class="parameter"><code><span class="type">gchar</span> **text</code></em>,
 
72
                                                         <em class="parameter"><code><span class="type">gint</span> *cursor_index</code></em>);
 
73
<span class="returnvalue">gboolean</span>            <a class="link" href="GtkIMContext.html#gtk-im-context-delete-surrounding" title="gtk_im_context_delete_surrounding ()">gtk_im_context_delete_surrounding</a>   (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
 
74
                                                         <em class="parameter"><code><span class="type">gint</span> offset</code></em>,
 
75
                                                         <em class="parameter"><code><span class="type">gint</span> n_chars</code></em>);
76
76
</pre>
77
77
</div>
78
78
<div class="refsect1">
79
79
<a name="GtkIMContext.object-hierarchy"></a><h2>Object Hierarchy</h2>
80
80
<pre class="synopsis">
81
 
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
 
81
  GObject
82
82
   +----GtkIMContext
83
83
         +----<a class="link" href="GtkIMContextSimple.html" title="GtkIMContextSimple">GtkIMContextSimple</a>
84
84
         +----<a class="link" href="GtkIMMulticontext.html" title="GtkIMMulticontext">GtkIMMulticontext</a>
87
87
<div class="refsect1">
88
88
<a name="GtkIMContext.signals"></a><h2>Signals</h2>
89
89
<pre class="synopsis">
90
 
  "<a class="link" href="GtkIMContext.html#GtkIMContext-commit" title='The "commit" signal'>commit</a>"                                         : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
91
 
  "<a class="link" href="GtkIMContext.html#GtkIMContext-delete-surrounding" title='The "delete-surrounding" signal'>delete-surrounding</a>"                             : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
92
 
  "<a class="link" href="GtkIMContext.html#GtkIMContext-preedit-changed" title='The "preedit-changed" signal'>preedit-changed</a>"                                : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
93
 
  "<a class="link" href="GtkIMContext.html#GtkIMContext-preedit-end" title='The "preedit-end" signal'>preedit-end</a>"                                    : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
94
 
  "<a class="link" href="GtkIMContext.html#GtkIMContext-preedit-start" title='The "preedit-start" signal'>preedit-start</a>"                                  : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
95
 
  "<a class="link" href="GtkIMContext.html#GtkIMContext-retrieve-surrounding" title='The "retrieve-surrounding" signal'>retrieve-surrounding</a>"                           : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
 
90
  "<a class="link" href="GtkIMContext.html#GtkIMContext-commit" title='The "commit" signal'>commit</a>"                                         : <code class="literal">Run Last</code>
 
91
  "<a class="link" href="GtkIMContext.html#GtkIMContext-delete-surrounding" title='The "delete-surrounding" signal'>delete-surrounding</a>"                             : <code class="literal">Run Last</code>
 
92
  "<a class="link" href="GtkIMContext.html#GtkIMContext-preedit-changed" title='The "preedit-changed" signal'>preedit-changed</a>"                                : <code class="literal">Run Last</code>
 
93
  "<a class="link" href="GtkIMContext.html#GtkIMContext-preedit-end" title='The "preedit-end" signal'>preedit-end</a>"                                    : <code class="literal">Run Last</code>
 
94
  "<a class="link" href="GtkIMContext.html#GtkIMContext-preedit-start" title='The "preedit-start" signal'>preedit-start</a>"                                  : <code class="literal">Run Last</code>
 
95
  "<a class="link" href="GtkIMContext.html#GtkIMContext-retrieve-surrounding" title='The "retrieve-surrounding" signal'>retrieve-surrounding</a>"                           : <code class="literal">Run Last</code>
96
96
</pre>
97
97
</div>
98
98
<div class="refsect1">
147
147
</div>
148
148
 
149
149
<p>
150
 
This function should register the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the <a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> subclass which
151
 
implements the input method by means of <a href="http://library.gnome.org/devel/gobject/unstable/GTypeModule.html#g-type-module-register-type"><code class="function">g_type_module_register_type()</code></a>. Note
152
 
that <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#g-type-register-static"><code class="function">g_type_register_static()</code></a> cannot be used as the type needs to be
 
150
This function should register the <span class="type">GType</span> of the <a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> subclass which
 
151
implements the input method by means of <code class="function">g_type_module_register_type()</code>. Note
 
152
that <code class="function">g_type_register_static()</code> cannot be used as the type needs to be
153
153
registered dynamically.
154
154
</p>
155
155
<p>
182
182
        <td class="listing_code"><pre class="programlisting"><span class="type">void</span><span class="normal"> </span><span class="function">im_module_list</span><span class="symbol">(</span><span class="keyword">const</span><span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">a</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"link"</span><span class="normal"> href</span><span class="symbol">=</span><span class="string">"GtkIMContext.html#GtkIMContextInfo"</span><span class="normal"> title</span><span class="symbol">=</span><span class="string">"struct GtkIMContextInfo"</span><span class="symbol">&gt;</span><span class="usertype">GtkIMContextInfo&lt;/a&gt;</span><span class="normal"> </span><span class="symbol">***</span><span class="normal">contexts</span><span class="symbol">,</span><span class="normal"> </span><span class="type">int</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">n_contexts</span><span class="symbol">)</span>
183
183
<span class="cbracket">{</span>
184
184
<span class="normal">  </span><span class="symbol">*</span><span class="normal">contexts </span><span class="symbol">=</span><span class="normal"> info_list</span><span class="symbol">;</span>
185
 
<span class="normal">  </span><span class="symbol">*</span><span class="normal">n_contexts </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#G-N-ELEMENTS:CAPS">G_N_ELEMENTS</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">info_list</span><span class="symbol">);</span>
 
185
<span class="normal">  </span><span class="symbol">*</span><span class="normal">n_contexts </span><span class="symbol">=</span><span class="normal"> </span><span class="function">G_N_ELEMENTS</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">info_list</span><span class="symbol">);</span>
186
186
<span class="cbracket">}</span></pre></td>
187
187
      </tr>
188
188
    </tbody>
320
320
<td>Called via <a class="link" href="GtkIMContext.html#gtk-im-context-filter-keypress" title="gtk_im_context_filter_keypress ()"><code class="function">gtk_im_context_filter_keypress()</code></a> on every
321
321
key press or release event. Every non-trivial input method needs to
322
322
override this in order to implement the mapping from key events to text.
323
 
A return value of <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> indicates to the caller that the event was
 
323
A return value of <code class="literal">TRUE</code> indicates to the caller that the event was
324
324
consumed by the input method. In that case, the <a class="link" href="GtkIMContext.html#GtkIMContext-commit" title='The "commit" signal'><span class="type">"commit"</span></a>
325
325
signal should be emitted upon completion of a key sequence to pass the
326
 
resulting text back to the input widget. Alternatively, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> may be
 
326
resulting text back to the input widget. Alternatively, <code class="literal">FALSE</code> may be
327
327
returned to indicate that the event wasn't handled by the input method.
328
328
If a builtin mapping exists for the key, it is used to produce a
329
329
character.</td>
399
399
</colgroup>
400
400
<tbody>
401
401
<tr>
402
 
<td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkIMContextInfo.context-id"></a>context_id</code></em>;</span></p></td>
 
402
<td><p><span class="term">const <span class="type">gchar</span> *<em class="structfield"><code><a name="GtkIMContextInfo.context-id"></a>context_id</code></em>;</span></p></td>
403
403
<td>The unique identification string of the input method.</td>
404
404
</tr>
405
405
<tr>
406
 
<td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkIMContextInfo.context-name"></a>context_name</code></em>;</span></p></td>
 
406
<td><p><span class="term">const <span class="type">gchar</span> *<em class="structfield"><code><a name="GtkIMContextInfo.context-name"></a>context_name</code></em>;</span></p></td>
407
407
<td>The human-readable name of the input method.</td>
408
408
</tr>
409
409
<tr>
410
 
<td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkIMContextInfo.domain"></a>domain</code></em>;</span></p></td>
 
410
<td><p><span class="term">const <span class="type">gchar</span> *<em class="structfield"><code><a name="GtkIMContextInfo.domain"></a>domain</code></em>;</span></p></td>
411
411
<td>Translation domain to be used with <code class="function">dgettext()</code>
412
412
</td>
413
413
</tr>
414
414
<tr>
415
 
<td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkIMContextInfo.domain-dirname"></a>domain_dirname</code></em>;</span></p></td>
 
415
<td><p><span class="term">const <span class="type">gchar</span> *<em class="structfield"><code><a name="GtkIMContextInfo.domain-dirname"></a>domain_dirname</code></em>;</span></p></td>
416
416
<td>Name of locale directory for use with <code class="function">bindtextdomain()</code>
417
417
</td>
418
418
</tr>
419
419
<tr>
420
 
<td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkIMContextInfo.default-locales"></a>default_locales</code></em>;</span></p></td>
 
420
<td><p><span class="term">const <span class="type">gchar</span> *<em class="structfield"><code><a name="GtkIMContextInfo.default-locales"></a>default_locales</code></em>;</span></p></td>
421
421
<td>A colon-separated list of locales where this input method
422
422
should be the default. The asterisk "*" sets the default for all locales.</td>
423
423
</tr>
428
428
<div class="refsect2">
429
429
<a name="gtk-im-context-set-client-window"></a><h3>gtk_im_context_set_client_window ()</h3>
430
430
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_im_context_set_client_window    (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
431
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk3/gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>);</pre>
 
431
                                                         <em class="parameter"><code><a href="../gdk2/gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>);</pre>
432
432
<p>
433
433
Set the client window for the input context; this is the
434
 
<a href="http://library.gnome.org/devel/gdk3/gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> in which the input appears. This window is
 
434
<a href="../gdk2/gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> in which the input appears. This window is
435
435
used in order to correctly position status windows, and may
436
436
also be used for purposes internal to the input method.
437
437
</p>
448
448
</tr>
449
449
<tr>
450
450
<td><p><span class="term"><em class="parameter"><code>window</code></em> :</span></p></td>
451
 
<td>the client window. This may be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to indicate
 
451
<td>the client window. This may be <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to indicate
452
452
that the previous client window no longer exists. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
453
453
</td>
454
454
</tr>
459
459
<div class="refsect2">
460
460
<a name="gtk-im-context-get-preedit-string"></a><h3>gtk_im_context_get_preedit_string ()</h3>
461
461
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_im_context_get_preedit_string   (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
462
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **str</code></em>,
463
 
                                                         <em class="parameter"><code><span class="type">PangoAttrList</span> **attrs</code></em>,
464
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *cursor_pos</code></em>);</pre>
 
462
                                                         <em class="parameter"><code><span class="type">gchar</span> **str</code></em>,
 
463
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttrList"><span class="type">PangoAttrList</span></a> **attrs</code></em>,
 
464
                                                         <em class="parameter"><code><span class="type">gint</span> *cursor_pos</code></em>);</pre>
465
465
<p>
466
466
Retrieve the current preedit string for the input context,
467
467
and a list of attributes to apply to the string.
482
482
<tr>
483
483
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
484
484
<td>location to store the retrieved
485
 
string. The string retrieved must be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
 
485
string. The string retrieved must be freed with <code class="function">g_free()</code>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
486
486
</td>
487
487
</tr>
488
488
<tr>
489
489
<td><p><span class="term"><em class="parameter"><code>attrs</code></em> :</span></p></td>
490
490
<td>location to store the retrieved
491
491
attribute list.  When you are done with this list, you
492
 
must unreference it with <code class="function">pango_attr_list_unref()</code>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
 
492
must unreference it with <a href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#pango-attr-list-unref"><code class="function">pango_attr_list_unref()</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
493
493
</td>
494
494
</tr>
495
495
<tr>
504
504
<hr>
505
505
<div class="refsect2">
506
506
<a name="gtk-im-context-filter-keypress"></a><h3>gtk_im_context_filter_keypress ()</h3>
507
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_im_context_filter_keypress      (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
508
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk3/gdk2-Event-Structures.html#GdkEventKey"><span class="type">GdkEventKey</span></a> *event</code></em>);</pre>
 
507
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gtk_im_context_filter_keypress      (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
 
508
                                                         <em class="parameter"><code><a href="../gdk2/gdk2-Event-Structures.html#GdkEventKey"><span class="type">GdkEventKey</span></a> *event</code></em>);</pre>
509
509
<p>
510
510
Allow an input method to internally handle key press and release 
511
 
events. If this function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, then no further processing
 
511
events. If this function returns <code class="literal">TRUE</code>, then no further processing
512
512
should be done for this key event.
513
513
</p>
514
514
<div class="variablelist"><table border="0" class="variablelist">
529
529
<tr>
530
530
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
531
531
<td>
532
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the input method handled the key event.</td>
 
532
<code class="literal">TRUE</code> if the input method handled the key event.</td>
533
533
</tr>
534
534
</tbody>
535
535
</table></div>
603
603
<div class="refsect2">
604
604
<a name="gtk-im-context-set-cursor-location"></a><h3>gtk_im_context_set_cursor_location ()</h3>
605
605
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_im_context_set_cursor_location  (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
606
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gdk3/gdk2-Points-Rectangles-and-Regions.html#GdkRectangle"><span class="type">GdkRectangle</span></a> *area</code></em>);</pre>
 
606
                                                         <em class="parameter"><code>const <a href="../gdk2/gdk2-Points-Rectangles-and-Regions.html#GdkRectangle"><span class="type">GdkRectangle</span></a> *area</code></em>);</pre>
607
607
<p>
608
608
Notify the input method that a change in cursor 
609
609
position has been made. The location is relative to the client
631
631
<div class="refsect2">
632
632
<a name="gtk-im-context-set-use-preedit"></a><h3>gtk_im_context_set_use_preedit ()</h3>
633
633
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_im_context_set_use_preedit      (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
634
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_preedit</code></em>);</pre>
 
634
                                                         <em class="parameter"><code><span class="type">gboolean</span> use_preedit</code></em>);</pre>
635
635
<p>
636
636
Sets whether the IM context should use the preedit string
637
637
to display feedback. If <em class="parameter"><code>use_preedit</code></em> is FALSE (default
660
660
<div class="refsect2">
661
661
<a name="gtk-im-context-set-surrounding"></a><h3>gtk_im_context_set_surrounding ()</h3>
662
662
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_im_context_set_surrounding      (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
663
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>,
664
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> len</code></em>,
665
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> cursor_index</code></em>);</pre>
 
663
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *text</code></em>,
 
664
                                                         <em class="parameter"><code><span class="type">gint</span> len</code></em>,
 
665
                                                         <em class="parameter"><code><span class="type">gint</span> cursor_index</code></em>);</pre>
666
666
<p>
667
667
Sets surrounding context around the insertion point and preedit
668
668
string. This function is expected to be called in response to the
700
700
<hr>
701
701
<div class="refsect2">
702
702
<a name="gtk-im-context-get-surrounding"></a><h3>gtk_im_context_get_surrounding ()</h3>
703
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_im_context_get_surrounding      (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
704
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **text</code></em>,
705
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *cursor_index</code></em>);</pre>
 
703
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gtk_im_context_get_surrounding      (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
 
704
                                                         <em class="parameter"><code><span class="type">gchar</span> **text</code></em>,
 
705
                                                         <em class="parameter"><code><span class="type">gint</span> *cursor_index</code></em>);</pre>
706
706
<p>
707
707
Retrieves context around the insertion point. Input methods
708
708
typically want context in order to constrain input text based on
733
733
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
734
734
<td>location to store a UTF-8 encoded
735
735
string of text holding context around the insertion point.
736
 
If the function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, then you must free the result
737
 
stored in this location with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
 
736
If the function returns <code class="literal">TRUE</code>, then you must free the result
 
737
stored in this location with <code class="function">g_free()</code>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
738
738
</td>
739
739
</tr>
740
740
<tr>
745
745
<tr>
746
746
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
747
747
<td>
748
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if surrounding text was provided; in this case
 
748
<code class="literal">TRUE</code> if surrounding text was provided; in this case
749
749
you must free the result stored in *text.</td>
750
750
</tr>
751
751
</tbody>
754
754
<hr>
755
755
<div class="refsect2">
756
756
<a name="gtk-im-context-delete-surrounding"></a><h3>gtk_im_context_delete_surrounding ()</h3>
757
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_im_context_delete_surrounding   (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
758
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> offset</code></em>,
759
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_chars</code></em>);</pre>
 
757
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gtk_im_context_delete_surrounding   (<em class="parameter"><code><a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context</code></em>,
 
758
                                                         <em class="parameter"><code><span class="type">gint</span> offset</code></em>,
 
759
                                                         <em class="parameter"><code><span class="type">gint</span> n_chars</code></em>);</pre>
760
760
<p>
761
761
Asks the widget that the input context is attached to to delete
762
762
characters around the cursor position by emitting the
800
800
<tr>
801
801
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
802
802
<td>
803
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the signal was handled.</td>
 
803
<code class="literal">TRUE</code> if the signal was handled.</td>
804
804
</tr>
805
805
</tbody>
806
806
</table></div>
811
811
<div class="refsect2">
812
812
<a name="GtkIMContext-commit"></a><h3>The <code class="literal">"commit"</code> signal</h3>
813
813
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context,
814
 
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>        *str,
815
 
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
 
814
                                                        <span class="type">gchar</span>        *str,
 
815
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">Run Last</code></pre>
816
816
<p>
817
817
The ::commit signal is emitted when a complete input sequence
818
818
has been entered by the user. This can be a single character
842
842
<hr>
843
843
<div class="refsect2">
844
844
<a name="GtkIMContext-delete-surrounding"></a><h3>The <code class="literal">"delete-surrounding"</code> signal</h3>
845
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            user_function                      (<a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context,
846
 
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>          offset,
847
 
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>          n_chars,
848
 
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
 
845
<pre class="programlisting"><span class="returnvalue">gboolean</span>            user_function                      (<a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context,
 
846
                                                        <span class="type">gint</span>          offset,
 
847
                                                        <span class="type">gint</span>          n_chars,
 
848
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">Run Last</code></pre>
849
849
<p>
850
850
The ::delete-surrounding signal is emitted when the input method
851
851
needs to delete all or part of the context surrounding the cursor.
877
877
<tr>
878
878
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
879
879
<td>
880
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the signal was handled.</td>
 
880
<code class="literal">TRUE</code> if the signal was handled.</td>
881
881
</tr>
882
882
</tbody>
883
883
</table></div>
886
886
<div class="refsect2">
887
887
<a name="GtkIMContext-preedit-changed"></a><h3>The <code class="literal">"preedit-changed"</code> signal</h3>
888
888
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context,
889
 
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
 
889
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">Run Last</code></pre>
890
890
<p>
891
891
The ::preedit-changed signal is emitted whenever the preedit sequence
892
892
currently being entered has changed.  It is also emitted at the end of
914
914
<div class="refsect2">
915
915
<a name="GtkIMContext-preedit-end"></a><h3>The <code class="literal">"preedit-end"</code> signal</h3>
916
916
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context,
917
 
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
 
917
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">Run Last</code></pre>
918
918
<p>
919
919
The ::preedit-end signal is emitted when a preediting sequence
920
920
has been completed or canceled.
940
940
<div class="refsect2">
941
941
<a name="GtkIMContext-preedit-start"></a><h3>The <code class="literal">"preedit-start"</code> signal</h3>
942
942
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context,
943
 
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
 
943
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">Run Last</code></pre>
944
944
<p>
945
945
The ::preedit-start signal is emitted when a new preediting sequence
946
946
starts.
965
965
<hr>
966
966
<div class="refsect2">
967
967
<a name="GtkIMContext-retrieve-surrounding"></a><h3>The <code class="literal">"retrieve-surrounding"</code> signal</h3>
968
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            user_function                      (<a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context,
969
 
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
 
968
<pre class="programlisting"><span class="returnvalue">gboolean</span>            user_function                      (<a class="link" href="GtkIMContext.html" title="GtkIMContext"><span class="type">GtkIMContext</span></a> *context,
 
969
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">Run Last</code></pre>
970
970
<p>
971
971
The ::retrieve-surrounding signal is emitted when the input method
972
972
requires the context surrounding the cursor.  The callback should set
990
990
<tr>
991
991
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
992
992
<td>
993
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the signal was handled.</td>
 
993
<code class="literal">TRUE</code> if the signal was handled.</td>
994
994
</tr>
995
995
</tbody>
996
996
</table></div>