<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkIMContextSimple">
<refmeta>
<refentrytitle role="top_of_page" id="GtkIMContextSimple.top_of_page">GtkIMContextSimple</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkIMContextSimple</refname>
<refpurpose>An input method context supporting table-based input methods</refpurpose>
</refnamediv>

<refsect1 id="GtkIMContextSimple.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkIMContext"><returnvalue>GtkIMContext</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-im-context-simple-new">gtk_im_context_simple_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-im-context-simple-add-table">gtk_im_context_simple_add_table</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-im-context-simple-add-compose-file">gtk_im_context_simple_add_compose_file</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkIMContextSimple.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkIMContextSimple-struct">GtkIMContextSimple</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="GTK-MAX-COMPOSE-LEN:CAPS">GTK_MAX_COMPOSE_LEN</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkIMContextSimple.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkIMContext">GtkIMContext</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkIMContextSimple
</screen>
</refsect1>

<refsect1 id="GtkIMContextSimple.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkIMContextSimple.description" role="desc">
<title role="desc.title">Description</title>
<para>GtkIMContextSimple is a simple input method context supporting table-based
input methods. It has a built-in table of compose sequences that is derived
from the X11 Compose files.</para>
<para>GtkIMContextSimple reads additional compose sequences from the first of the
following files that is found: ~/.config/gtk-4.0/Compose, ~/.XCompose,
/usr/share/X11/locale/$locale/Compose (for locales that have a nontrivial
Compose file). The syntax of these files is described in the Compose(5)
manual page.</para>
<refsect3><title>Unicode characters</title><para>GtkIMContextSimple also supports numeric entry of Unicode characters
by typing Ctrl-Shift-u, followed by a hexadecimal Unicode codepoint.
For example, Ctrl-Shift-u 1 2 3 Enter yields U+0123 LATIN SMALL LETTER
G WITH CEDILLA, i.e. ģ.</para>
</refsect3>

</refsect1>
<refsect1 id="GtkIMContextSimple.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-im-context-simple-new" role="function">
<title>gtk_im_context_simple_new&#160;()</title>
<indexterm zone="gtk-im-context-simple-new"><primary>gtk_im_context_simple_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkIMContext"><returnvalue>GtkIMContext</returnvalue></link>&#160;*
gtk_im_context_simple_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="GtkIMContextSimple"><type>GtkIMContextSimple</type></link>.</para>
<refsect3 id="gtk-im-context-simple-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkIMContextSimple"><type>GtkIMContextSimple</type></link>.</para>
</refsect3></refsect2>
<refsect2 id="gtk-im-context-simple-add-table" role="function">
<title>gtk_im_context_simple_add_table&#160;()</title>
<indexterm zone="gtk-im-context-simple-add-table"><primary>gtk_im_context_simple_add_table</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_im_context_simple_add_table (<parameter><link linkend="GtkIMContextSimple"><type>GtkIMContextSimple</type></link> *context_simple</parameter>,
                                 <parameter><link linkend="guint16"><type>guint16</type></link> *data</parameter>,
                                 <parameter><link linkend="gint"><type>gint</type></link> max_seq_len</parameter>,
                                 <parameter><link linkend="gint"><type>gint</type></link> n_seqs</parameter>);</programlisting>
<para>Adds an additional table to search to the input context.
Each row of the table consists of <parameter>max_seq_len</parameter>
 key symbols
followed by two <link linkend="guint16"><type>guint16</type></link> interpreted as the high and low
words of a <link linkend="gunicode"><type>gunicode</type></link> value. Tables are searched starting
from the last added.</para>
<para>The table must be sorted in dictionary order on the
numeric value of the key symbol fields. (Values beyond
the length of the sequence should be zero.)</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gtk-im-context-simple-add-table.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context_simple</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkIMContextSimple"><type>GtkIMContextSimple</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the table. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>max_seq_len</para></entry>
<entry role="parameter_description"><para>Maximum length of a sequence in the table
(cannot be greater than <link linkend="GTK-MAX-COMPOSE-LEN:CAPS"><type>GTK_MAX_COMPOSE_LEN</type></link>)</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>n_seqs</para></entry>
<entry role="parameter_description"><para>number of sequences in the table</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-im-context-simple-add-compose-file" role="function">
<title>gtk_im_context_simple_add_compose_file&#160;()</title>
<indexterm zone="gtk-im-context-simple-add-compose-file"><primary>gtk_im_context_simple_add_compose_file</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_im_context_simple_add_compose_file
                               (<parameter><link linkend="GtkIMContextSimple"><type>GtkIMContextSimple</type></link> *context_simple</parameter>,
                                <parameter>const <link linkend="gchar"><type>gchar</type></link> *compose_file</parameter>);</programlisting>
<para>Adds an additional table from the X11 compose file.</para>
<refsect3 id="gtk-im-context-simple-add-compose-file.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context_simple</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkIMContextSimple"><type>GtkIMContextSimple</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>compose_file</para></entry>
<entry role="parameter_description"><para>The path of compose file</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkIMContextSimple.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkIMContextSimple-struct" role="struct">
<title>struct GtkIMContextSimple</title>
<indexterm zone="GtkIMContextSimple-struct"><primary>GtkIMContextSimple</primary></indexterm>
<programlisting language="C">struct GtkIMContextSimple;</programlisting>
</refsect2>
<refsect2 id="GTK-MAX-COMPOSE-LEN:CAPS" role="macro">
<title>GTK_MAX_COMPOSE_LEN</title>
<indexterm zone="GTK-MAX-COMPOSE-LEN:CAPS"><primary>GTK_MAX_COMPOSE_LEN</primary></indexterm>
<programlisting language="C">#define GTK_MAX_COMPOSE_LEN 7
</programlisting>
<para>The maximum length of sequences in compose tables.</para>
</refsect2>

</refsect1>

</refentry>
