<refentry id="GtkEntry">
<refmeta>
<refentrytitle>GtkEntry</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkEntry</refname><refpurpose>a single line text entry field.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gtk/gtk.h&gt;


struct      <link linkend="GtkEntry-struct">GtkEntry</link>;
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gtk-entry-new">gtk_entry_new</link>                   (void);
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gtk-entry-new-with-max-length">gtk_entry_new_with_max_length</link>   (<link linkend="gint">gint</link> max);
void        <link linkend="gtk-entry-set-text">gtk_entry_set_text</link>              (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             const <link linkend="gchar">gchar</link> *text);
void        <link linkend="gtk-entry-append-text">gtk_entry_append_text</link>           (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             const <link linkend="gchar">gchar</link> *text);
void        <link linkend="gtk-entry-prepend-text">gtk_entry_prepend_text</link>          (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             const <link linkend="gchar">gchar</link> *text);
void        <link linkend="gtk-entry-set-position">gtk_entry_set_position</link>          (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gint">gint</link> position);
G_CONST_RETURN <link linkend="gchar">gchar</link>* <link linkend="gtk-entry-get-text">gtk_entry_get_text</link>    (<link linkend="GtkEntry">GtkEntry</link> *entry);
void        <link linkend="gtk-entry-select-region">gtk_entry_select_region</link>         (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gint">gint</link> start,
                                             <link linkend="gint">gint</link> end);
void        <link linkend="gtk-entry-set-visibility">gtk_entry_set_visibility</link>        (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gboolean">gboolean</link> visible);
void        <link linkend="gtk-entry-set-invisible-char">gtk_entry_set_invisible_char</link>    (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gunichar">gunichar</link> ch);
void        <link linkend="gtk-entry-set-editable">gtk_entry_set_editable</link>          (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gboolean">gboolean</link> editable);
void        <link linkend="gtk-entry-set-max-length">gtk_entry_set_max_length</link>        (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gint">gint</link> max);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-entry-get-activates-default">gtk_entry_get_activates_default</link> (<link linkend="GtkEntry">GtkEntry</link> *entry);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-entry-get-has-frame">gtk_entry_get_has_frame</link>         (<link linkend="GtkEntry">GtkEntry</link> *entry);
<link linkend="gint">gint</link>        <link linkend="gtk-entry-get-width-chars">gtk_entry_get_width_chars</link>       (<link linkend="GtkEntry">GtkEntry</link> *entry);
void        <link linkend="gtk-entry-set-activates-default">gtk_entry_set_activates_default</link> (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gboolean">gboolean</link> setting);
void        <link linkend="gtk-entry-set-has-frame">gtk_entry_set_has_frame</link>         (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gboolean">gboolean</link> setting);
void        <link linkend="gtk-entry-set-width-chars">gtk_entry_set_width_chars</link>       (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gint">gint</link> n_chars);
<link linkend="gunichar">gunichar</link>    <link linkend="gtk-entry-get-invisible-char">gtk_entry_get_invisible_char</link>    (<link linkend="GtkEntry">GtkEntry</link> *entry);
<link linkend="PangoLayout">PangoLayout</link>* <link linkend="gtk-entry-get-layout">gtk_entry_get_layout</link>           (<link linkend="GtkEntry">GtkEntry</link> *entry);
void        <link linkend="gtk-entry-get-layout-offsets">gtk_entry_get_layout_offsets</link>    (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gint">gint</link> *x,
                                             <link linkend="gint">gint</link> *y);
<link linkend="gint">gint</link>        <link linkend="gtk-entry-get-max-length">gtk_entry_get_max_length</link>        (<link linkend="GtkEntry">GtkEntry</link> *entry);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-entry-get-visibility">gtk_entry_get_visibility</link>        (<link linkend="GtkEntry">GtkEntry</link> *entry);


</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GObject">GObject</link>
   +----<link linkend="GtkObject">GtkObject</link>
         +----<link linkend="GtkWidget">GtkWidget</link>
               +----GtkEntry
</synopsis>

</refsect1>

<refsect1>
<title>Properties</title>
<synopsis>

  &quot;<link linkend="GtkEntry--cursor-position">cursor-position</link>&quot;      <link linkend="gint">gint</link>                 : Read
  &quot;<link linkend="GtkEntry--selection-bound">selection-bound</link>&quot;      <link linkend="gint">gint</link>                 : Read
  &quot;<link linkend="GtkEntry--editable">editable</link>&quot;             <link linkend="gboolean">gboolean</link>             : Read / Write
  &quot;<link linkend="GtkEntry--max-length">max-length</link>&quot;           <link linkend="gint">gint</link>                 : Read / Write
  &quot;<link linkend="GtkEntry--visibility">visibility</link>&quot;           <link linkend="gboolean">gboolean</link>             : Read / Write
  &quot;<link linkend="GtkEntry--has-frame">has-frame</link>&quot;            <link linkend="gboolean">gboolean</link>             : Read / Write
  &quot;<link linkend="GtkEntry--invisible-char">invisible-char</link>&quot;       <link linkend="guint">guint</link>                : Read / Write
  &quot;<link linkend="GtkEntry--activates-default">activates-default</link>&quot;    <link linkend="gboolean">gboolean</link>             : Read / Write
  &quot;<link linkend="GtkEntry--width-chars">width-chars</link>&quot;          <link linkend="gint">gint</link>                 : Read / Write
  &quot;<link linkend="GtkEntry--scroll-offset">scroll-offset</link>&quot;        <link linkend="gint">gint</link>                 : Read
  &quot;<link linkend="GtkEntry--text">text</link>&quot;                 <link linkend="gchararray">gchararray</link>           : Read / Write
</synopsis>
</refsect1>

<refsect1>
<title>Signal Prototypes</title>
<synopsis>

&quot;<link linkend="GtkEntry-activate">activate</link>&quot;  void        user_function      (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkEntry-copy-clipboard">copy-clipboard</link>&quot;
            void        user_function      (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkEntry-cut-clipboard">cut-clipboard</link>&quot;
            void        user_function      (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkEntry-delete-from-cursor">delete-from-cursor</link>&quot;
            void        user_function      (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="GtkDeleteType">GtkDeleteType</link> arg1,
                                            <link linkend="gint">gint</link> arg2,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkEntry-insert-at-cursor">insert-at-cursor</link>&quot;
            void        user_function      (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="gchar">gchar</link> *arg1,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkEntry-move-cursor">move-cursor</link>&quot;
            void        user_function      (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="GtkMovementStep">GtkMovementStep</link> arg1,
                                            <link linkend="gint">gint</link> arg2,
                                            <link linkend="gboolean">gboolean</link> arg3,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkEntry-paste-clipboard">paste-clipboard</link>&quot;
            void        user_function      (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkEntry-populate-popup">populate-popup</link>&quot;
            void        user_function      (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="GtkMenu">GtkMenu</link> *arg1,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkEntry-toggle-overwrite">toggle-overwrite</link>&quot;
            void        user_function      (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="gpointer">gpointer</link> user_data);
</synopsis>
</refsect1>


<refsect1>
<title>Description</title>
<para>
The <link linkend="GtkEntry">GtkEntry</link> widget is a single line text entry
widget. A fairly large set of key bindings are supported
by default. If the entered text is longer than the allocation
of the widget, the widget will scroll so that the cursor
position is visible. 
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GtkEntry-struct">struct GtkEntry</title>
<programlisting>struct GtkEntry;</programlisting>
<para>
The <link linkend="GtkEntry-struct">GtkEntry</link> struct contains only private data.
</para></refsect2>
<refsect2>
<title><anchor id="gtk-entry-new">gtk_entry_new ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gtk_entry_new                   (void);</programlisting>
<para>
Creates a new <link linkend="GtkEntry">GtkEntry</link> widget.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>a new <link linkend="GtkEntry">GtkEntry</link>.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-new-with-max-length">gtk_entry_new_with_max_length ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gtk_entry_new_with_max_length   (<link linkend="gint">gint</link> max);</programlisting>
<warning>
<para>
<literal>gtk_entry_new_with_max_length</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Creates a new <link linkend="GtkEntry">GtkEntry</link> widget with the given maximum length.
</para>
<para>
Note: the existance of this function is inconsistent
with the rest of the GTK+ API. The normal setup would
be to just require the user to make an extra call
to <link linkend="gtk-entry-set-max-length">gtk_entry_set_max_length</link>() instead. It is not
expected that this function will be removed, but
it would be better practice not to use it.</para>
<para>
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>max</parameter>&nbsp;:</entry>
<entry> the maximum length of the entry, or 0 for no maximum.
  (other than the maximum length of entries.) The value passed in will
  be clamped to the range 0-65536.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a new <link linkend="GtkEntry">GtkEntry</link>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-set-text">gtk_entry_set_text ()</title>
<programlisting>void        gtk_entry_set_text              (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             const <link linkend="gchar">gchar</link> *text);</programlisting>
<para>
Sets the text in the widget to the given
value, replacing the current contents.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkEntry">GtkEntry</link>.
</entry></row>
<row><entry align="right"><parameter>text</parameter>&nbsp;:</entry>
<entry>the new text.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-append-text">gtk_entry_append_text ()</title>
<programlisting>void        gtk_entry_append_text           (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             const <link linkend="gchar">gchar</link> *text);</programlisting>
<warning>
<para>
<literal>gtk_entry_append_text</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Appends the given text to the contents of the widget.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkEntry">GtkEntry</link>.
</entry></row>
<row><entry align="right"><parameter>text</parameter>&nbsp;:</entry>
<entry>the text to append.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-prepend-text">gtk_entry_prepend_text ()</title>
<programlisting>void        gtk_entry_prepend_text          (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             const <link linkend="gchar">gchar</link> *text);</programlisting>
<warning>
<para>
<literal>gtk_entry_prepend_text</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Prepends the given text to the contents of th ewidget.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkEntry">GtkEntry</link>.
</entry></row>
<row><entry align="right"><parameter>text</parameter>&nbsp;:</entry>
<entry>the text to prepend.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-set-position">gtk_entry_set_position ()</title>
<programlisting>void        gtk_entry_set_position          (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gint">gint</link> position);</programlisting>
<warning>
<para>
<literal>gtk_entry_set_position</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Sets the cursor position in an entry to the given 
value. This function is obsolete. You should use
<link linkend="gtk-editable-set-position">gtk_editable_set_position</link>() instead.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkEntry">GtkEntry</link>.
</entry></row>
<row><entry align="right"><parameter>position</parameter>&nbsp;:</entry>
<entry>the position of the cursor. The cursor is displayed
           before the character with the given (base 0) index
           in the widget. The value must be less than or
           equal to the number of characters in the widget.
           A value of -1 indicates that the position should
           be set after the last character in the entry.
           Note that this position is in characters, not in
           bytes.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-get-text">gtk_entry_get_text ()</title>
<programlisting>G_CONST_RETURN <link linkend="gchar">gchar</link>* gtk_entry_get_text    (<link linkend="GtkEntry">GtkEntry</link> *entry);</programlisting>
<para>
Retrieve the contents of the entry widget. The returned
pointer points to internally allocated storage in the
widget and must not be freed, modified or stored.
See also <link linkend="gtk-editable-get-chars">gtk_editable_get_chars</link>().
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkEntry">GtkEntry</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the pointer the the contents of the text widget as a
          string.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-select-region">gtk_entry_select_region ()</title>
<programlisting>void        gtk_entry_select_region         (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gint">gint</link> start,
                                             <link linkend="gint">gint</link> end);</programlisting>
<warning>
<para>
<literal>gtk_entry_select_region</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Selects a region of text. The characters that
are selected are those characters at positions from
<parameter>start_pos</parameter> up to, but not including <parameter>end_pos</parameter>. If 
<parameter>end_pos</parameter> is negative, then the the characters selected
will be those characters from <parameter>start_pos</parameter> to the end
of the text. This function is obsolete. You should
use <link linkend="gtk-editable-select-region">gtk_editable_select_region</link>() instead.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkEntry">GtkEntry</link>.
</entry></row>
<row><entry align="right"><parameter>start</parameter>&nbsp;:</entry>
<entry>the starting position.
</entry></row>
<row><entry align="right"><parameter>end</parameter>&nbsp;:</entry>
<entry>the end position.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-set-visibility">gtk_entry_set_visibility ()</title>
<programlisting>void        gtk_entry_set_visibility        (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gboolean">gboolean</link> visible);</programlisting>
<para>
Sets whether the contents of the entry are visible or
not. When visibility is set to <literal>FALSE</literal>, characters
are displayed as the invisible char, and will also appear
that way when the text in the entry widget is copied
elsewhere.
</para>
<para>
The default invisible char is the asterisk '*', but it can
be changed with <link linkend="gtk-entry-set-invisible-char">gtk_entry_set_invisible_char</link>().
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkEntry">GtkEntry</link>.
</entry></row>
<row><entry align="right"><parameter>visible</parameter>&nbsp;:</entry>
<entry><literal>TRUE</literal> if the contents of the entry are displayed
          as plaintext.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-set-invisible-char">gtk_entry_set_invisible_char ()</title>
<programlisting>void        gtk_entry_set_invisible_char    (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gunichar">gunichar</link> ch);</programlisting>
<para>
Sets the character to use in place of the actual text when
<link linkend="gtk-entry-set-visibility">gtk_entry_set_visibility</link>() has been called to set text visibility
to <literal>FALSE</literal>. i.e. this is the character used in "password mode" to
show the user how many characters have been typed. The default
invisible char is an asterisk ('*').  If you set the invisible char
to 0, then the user will get no feedback at all; there will be
no text on the screen as they type.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkEntry">GtkEntry</link>
</entry></row>
<row><entry align="right"><parameter>ch</parameter>&nbsp;:</entry>
<entry> a Unicode character
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-set-editable">gtk_entry_set_editable ()</title>
<programlisting>void        gtk_entry_set_editable          (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gboolean">gboolean</link> editable);</programlisting>
<warning>
<para>
<literal>gtk_entry_set_editable</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Determines if the user can edit the text in the editable
widget or not. This function is obsolete. You should
use <link linkend="gtk-editable-set-editable">gtk_editable_set_editable</link>() instead.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkEntry">GtkEntry</link>.
</entry></row>
<row><entry align="right"><parameter>editable</parameter>&nbsp;:</entry>
<entry><literal>TRUE</literal> if the user is allowed to edit the text
  in the widget.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-set-max-length">gtk_entry_set_max_length ()</title>
<programlisting>void        gtk_entry_set_max_length        (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gint">gint</link> max);</programlisting>
<para>
Sets the maximum allowed length of the contents of the widget. If
the current contents are longer than the given length, then they
will be truncated to fit.</para>
<para>
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkEntry">GtkEntry</link>.
</entry></row>
<row><entry align="right"><parameter>max</parameter>&nbsp;:</entry>
<entry> the maximum length of the entry, or 0 for no maximum.
  (other than the maximum length of entries.) The value passed in will
  be clamped to the range 0-65536.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-get-activates-default">gtk_entry_get_activates_default ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_entry_get_activates_default (<link linkend="GtkEntry">GtkEntry</link> *entry);</programlisting>
<para>
Retrieves the value set by <link linkend="gtk-entry-set-activates-default">gtk_entry_set_activates_default</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkEntry">GtkEntry</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if the entry will activate the default widget
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-get-has-frame">gtk_entry_get_has_frame ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_entry_get_has_frame         (<link linkend="GtkEntry">GtkEntry</link> *entry);</programlisting>
<para>
Gets the value set by <link linkend="gtk-entry-set-has-frame">gtk_entry_set_has_frame</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkEntry">GtkEntry</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> whether the entry has a beveled frame
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-get-width-chars">gtk_entry_get_width_chars ()</title>
<programlisting><link linkend="gint">gint</link>        gtk_entry_get_width_chars       (<link linkend="GtkEntry">GtkEntry</link> *entry);</programlisting>
<para>
Gets the value set by <link linkend="gtk-entry-set-width-chars">gtk_entry_set_width_chars</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkEntry">GtkEntry</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> number of chars to request space for, or negative if unset
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-set-activates-default">gtk_entry_set_activates_default ()</title>
<programlisting>void        gtk_entry_set_activates_default (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gboolean">gboolean</link> setting);</programlisting>
<para>
If <parameter>setting</parameter> is <literal>TRUE</literal>, pressing Enter in the <parameter>entry</parameter> will activate the default
widget for the window containing the entry. This usually means that
the dialog box containing the entry will be closed, since the default
widget is usually one of the dialog buttons.
</para>
<para>
(For experts: if <parameter>setting</parameter> is <literal>TRUE</literal>, the entry calls
<link linkend="gtk-window-activate-default">gtk_window_activate_default</link>() on the window containing the entry, in
the default handler for the "activate" signal.)</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkEntry">GtkEntry</link>
</entry></row>
<row><entry align="right"><parameter>setting</parameter>&nbsp;:</entry>
<entry> <literal>TRUE</literal> to activate window's default widget on Enter keypress
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-set-has-frame">gtk_entry_set_has_frame ()</title>
<programlisting>void        gtk_entry_set_has_frame         (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gboolean">gboolean</link> setting);</programlisting>
<para>
Sets whether the entry has a beveled frame around it.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkEntry">GtkEntry</link>
</entry></row>
<row><entry align="right"><parameter>setting</parameter>&nbsp;:</entry>
<entry> new value
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-set-width-chars">gtk_entry_set_width_chars ()</title>
<programlisting>void        gtk_entry_set_width_chars       (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gint">gint</link> n_chars);</programlisting>
<para>
Changes the size request of the entry to be about the right size
for <parameter>n_chars</parameter> characters. Note that it changes the size
<emphasis>request</emphasis>, the size can still be affected by
how you pack the widget into containers. If <parameter>n_chars</parameter> is -1, the
size reverts to the default entry size.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkEntry">GtkEntry</link>
</entry></row>
<row><entry align="right"><parameter>n_chars</parameter>&nbsp;:</entry>
<entry> width in chars
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-get-invisible-char">gtk_entry_get_invisible_char ()</title>
<programlisting><link linkend="gunichar">gunichar</link>    gtk_entry_get_invisible_char    (<link linkend="GtkEntry">GtkEntry</link> *entry);</programlisting>
<para>
Retrieves the character displayed in place of the real characters
for entries with visisbility set to false. See <link linkend="gtk-entry-set-invisible-char">gtk_entry_set_invisible_char</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkEntry">GtkEntry</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the current invisible char, or 0, if the entry does not
              show invisible text at all. 
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-get-layout">gtk_entry_get_layout ()</title>
<programlisting><link linkend="PangoLayout">PangoLayout</link>* gtk_entry_get_layout           (<link linkend="GtkEntry">GtkEntry</link> *entry);</programlisting>
<para>
Gets the <link linkend="PangoLayout">PangoLayout</link> used to display the entry.
The layout is useful to e.g. convert text positions to
pixel positions, in combination with <link linkend="gtk-entry-get-layout-offsets">gtk_entry_get_layout_offsets</link>().
The returned layout is owned by the entry so need not be
freed by the caller.
</para>
<para>
Keep in mind that the layout text may contain a preedit string, so
<link linkend="gtk-entry-layout-index-to-text-index">gtk_entry_layout_index_to_text_index</link>() and
<link linkend="gtk-entry-text-index-to-layout-index">gtk_entry_text_index_to_layout_index</link>() are needed to convert byte
indices in the layout to byte indices in the entry contents.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkEntry">GtkEntry</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the <link linkend="PangoLayout">PangoLayout</link> for this entry
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-get-layout-offsets">gtk_entry_get_layout_offsets ()</title>
<programlisting>void        gtk_entry_get_layout_offsets    (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                             <link linkend="gint">gint</link> *x,
                                             <link linkend="gint">gint</link> *y);</programlisting>
<para>
Obtains the position of the <link linkend="PangoLayout">PangoLayout</link> used to render text
in the entry, in widget coordinates. Useful if you want to line
up the text in an entry with some other text, e.g. when using the
entry to implement editable cells in a sheet widget.
</para>
<para>
Also useful to convert mouse events into coordinates inside the
<link linkend="PangoLayout">PangoLayout</link>, e.g. to take some action if some part of the entry text
is clicked.
</para>
<para>
Note that as the user scrolls around in the entry the offsets will
change; you'll need to connect to the "notify::scroll_offset"
signal to track this. Remember when using the <link linkend="PangoLayout">PangoLayout</link>
functions you need to convert to and from pixels using
<link linkend="PANGO-PIXELS-CAPS">PANGO_PIXELS</link>() or <link linkend="PANGO-SCALE-CAPS">PANGO_SCALE</link>.
</para>
<para>
Keep in mind that the layout text may contain a preedit string, so
<link linkend="gtk-entry-layout-index-to-text-index">gtk_entry_layout_index_to_text_index</link>() and
<link linkend="gtk-entry-text-index-to-layout-index">gtk_entry_text_index_to_layout_index</link>() are needed to convert byte
indices in the layout to byte indices in the entry contents.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkEntry">GtkEntry</link>
</entry></row>
<row><entry align="right"><parameter>x</parameter>&nbsp;:</entry>
<entry> location to store X offset of layout, or <literal>NULL</literal>
</entry></row>
<row><entry align="right"><parameter>y</parameter>&nbsp;:</entry>
<entry> location to store Y offset of layout, or <literal>NULL</literal>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-get-max-length">gtk_entry_get_max_length ()</title>
<programlisting><link linkend="gint">gint</link>        gtk_entry_get_max_length        (<link linkend="GtkEntry">GtkEntry</link> *entry);</programlisting>
<para>
Retrieves the maximum allowed length of the text in
<parameter>entry</parameter>. See <link linkend="gtk-entry-set-max-length">gtk_entry_set_max_length</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkEntry">GtkEntry</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the maximum allowed number of characters
              in <link linkend="GtkEntry">GtkEntry</link>, or 0 if there is no maximum.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-entry-get-visibility">gtk_entry_get_visibility ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_entry_get_visibility        (<link linkend="GtkEntry">GtkEntry</link> *entry);</programlisting>
<para>
Retrieves whether the text in <parameter>entry</parameter> is visible. See
<link linkend="gtk-entry-set-visibility">gtk_entry_set_visibility</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkEntry">GtkEntry</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if the text is currently visible
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>
<refsect1>
<title>Properties</title>
<variablelist>
<varlistentry><term><anchor id="GtkEntry--cursor-position">&quot;<literal>cursor-position</literal>&quot; (<link linkend="gint">gint</link> : Read)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkEntry--selection-bound">&quot;<literal>selection-bound</literal>&quot; (<link linkend="gint">gint</link> : Read)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkEntry--editable">&quot;<literal>editable</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkEntry--max-length">&quot;<literal>max-length</literal>&quot; (<link linkend="gint">gint</link> : Read / Write)</term>
<listitem>
<para>
Determines the maximum allowed length of the contents
of the widget. See <link linkend="gtk-entry-set-max-length">gtk_entry_set_max_length</link>().
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkEntry--visibility">&quot;<literal>visibility</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para>
Determines whether the contents of the entry widget
are visible or not. See <link linkend="gtk-entry-set-visibility">gtk_entry_set_visibility</link>().
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkEntry--has-frame">&quot;<literal>has-frame</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkEntry--invisible-char">&quot;<literal>invisible-char</literal>&quot; (<link linkend="guint">guint</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkEntry--activates-default">&quot;<literal>activates-default</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkEntry--width-chars">&quot;<literal>width-chars</literal>&quot; (<link linkend="gint">gint</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkEntry--scroll-offset">&quot;<literal>scroll-offset</literal>&quot; (<link linkend="gint">gint</link> : Read)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkEntry--text">&quot;<literal>text</literal>&quot; (<link linkend="gchararray">gchararray</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>

</variablelist>
</refsect1>

<refsect1>
<title>Signals</title>
<refsect2><title><anchor id="GtkEntry-activate">The &quot;activate&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>the object which received the signal.

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkEntry-copy-clipboard">The &quot;copy-clipboard&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>the object which received the signal.

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkEntry-cut-clipboard">The &quot;cut-clipboard&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>the object which received the signal.

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkEntry-delete-from-cursor">The &quot;delete-from-cursor&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="GtkDeleteType">GtkDeleteType</link> arg1,
                                            <link linkend="gint">gint</link> arg2,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>the object which received the signal.
</entry></row>
<row><entry align="right"><parameter>arg1</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>arg2</parameter>&nbsp;:</entry>
<entry>

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkEntry-insert-at-cursor">The &quot;insert-at-cursor&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="gchar">gchar</link> *arg1,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>the object which received the signal.
</entry></row>
<row><entry align="right"><parameter>arg1</parameter>&nbsp;:</entry>
<entry>

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkEntry-move-cursor">The &quot;move-cursor&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="GtkMovementStep">GtkMovementStep</link> arg1,
                                            <link linkend="gint">gint</link> arg2,
                                            <link linkend="gboolean">gboolean</link> arg3,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>the object which received the signal.
</entry></row>
<row><entry align="right"><parameter>arg1</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>arg2</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>arg3</parameter>&nbsp;:</entry>
<entry>

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkEntry-paste-clipboard">The &quot;paste-clipboard&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>the object which received the signal.

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkEntry-populate-popup">The &quot;populate-popup&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="GtkMenu">GtkMenu</link> *arg1,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>the object which received the signal.
</entry></row>
<row><entry align="right"><parameter>arg1</parameter>&nbsp;:</entry>
<entry>

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkEntry-toggle-overwrite">The &quot;toggle-overwrite&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkEntry">GtkEntry</link> *entry,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>entry</parameter>&nbsp;:</entry>
<entry>the object which received the signal.

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2>
</refsect1>


<refsect1>
<title>See Also</title>
<para>
<variablelist>

<varlistentry>
<term><link linkend="GtkText">GtkText</link></term>
<listitem><para>a widget for handling multi-line text entry.</para></listitem>
</varlistentry>

</variablelist>
</para>
</refsect1>

</refentry>
