
@c %start of fragment

@deftp Class <clutter-entry>
Derives from @code{<clutter-actor>}.

This class defines the following slots:

@table @code
@item font-name
Pango font description

@item text
Text to render

@item color
Font Colour

@item alignment
The preferred alignment for the string,

@item position
The cursor position

@item cursor-visible
Whether the input cursor is visible

@item text-visible
Whether the text is visible in plain form

@item max-length
The maximum length of the entry text

@item entry-padding
The padding space between the text and the left and right borders

@item x-align
The horizontal alignment to be used for the text

@end table

@end deftp

@defop Signal <clutter-entry> activate 
The ::activate signal is emitted each time the entry is 'activated' by the user,
normally by pressing the 'Enter' key.

Since 0.4

@end defop

@defop Signal <clutter-entry> text-changed 
The ::text-changed signal is emitted after @var{entry}'s text changes

@end defop

@defop Signal <clutter-entry> cursor-event  (arg0@tie{}@code{<clutter-geometry>})
The ::cursor-event signal is emitted each time the input cursor's geometry
changes, this could be a positional or size change. If you would like to
implement your own input cursor, set the cursor-visible property to
@samp{@code{#f}}, and connect to this signal to position and size your own
cursor.

Since 0.4

@end defop

@deffn Function clutter-entry-new  @result{}@tie{} (ret@tie{}@code{<clutter-actor>})
Creates a new, empty @code{<clutter-entry>}.

@table @var
@item ret
the newly created @code{<clutter-entry>}

@end table

@end deffn

@deffn Function clutter-entry-new-with-text  (font_name@tie{}@code{mchars}) (text@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{<clutter-actor>})
Creates a new @code{<clutter-entry>} displaying @var{text} using
@var{font-name}.

@table @var
@item font-name
the name (and size) of the font to be used

@item text
the text to be displayed

@item ret
the newly created @code{<clutter-entry>}

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-new-full  (font_name@tie{}@code{mchars}) (text@tie{}@code{mchars}) (color@tie{}@code{<clutter-color>}) @result{}@tie{} (ret@tie{}@code{<clutter-actor>})
Creates a new @code{<clutter-entry>} displaying @var{text} with @var{color}
using @var{font-name}.

@table @var
@item font-name
the name (and size) of the font to be used

@item text
the text to be displayed

@item color
@code{<clutter-color>} for text

@item ret
the newly created @code{<clutter-entry>}

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-set-text  (self@tie{}@code{<clutter-entry>}) (text@tie{}@code{mchars})
@deffnx Method set-text
Sets @var{text} as the text to be displayed by @var{entry}. The
ClutterEntry::text-changed signal is emitted.

@table @var
@item entry
a @code{<clutter-entry>}

@item text
the text to be displayed

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-get-text  (self@tie{}@code{<clutter-entry>}) @result{}@tie{} (ret@tie{}@code{mchars})
@deffnx Method get-text
Retrieves the text displayed by @var{entry}.

@table @var
@item entry
a @code{<clutter-entry>}

@item ret
the text of the entry. The returned string is owned by @code{<clutter-entry>}
and should not be modified or freed.

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-set-font-name  (self@tie{}@code{<clutter-entry>}) (font_name@tie{}@code{mchars})
@deffnx Method set-font-name
Sets @var{font-name} as the font used by @var{entry}.

@var{font-name} must be a string containing the font name and its size,
similarly to what you would feed to the
@code{pango-font-description-from-string} function.

@table @var
@item entry
a @code{<clutter-entry>}

@item font-name
a font name and size, or @samp{@code{#f}} for the default font

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-get-font-name  (self@tie{}@code{<clutter-entry>}) @result{}@tie{} (ret@tie{}@code{mchars})
@deffnx Method get-font-name
Retrieves the font used by @var{entry}.

@table @var
@item entry
a @code{<clutter-entry>}

@item ret
a string containing the font name, in a format understandable by
@code{pango-font-description-from-string}. The string is owned by
@code{<clutter-entry>} and should not be modified or freed.

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-set-color  (self@tie{}@code{<clutter-entry>}) (color@tie{}@code{<clutter-color>})
@deffnx Method set-color
Sets the color of @var{entry}.

@table @var
@item entry
a @code{<clutter-entry>}

@item color
a @code{<clutter-color>}

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-get-color  (self@tie{}@code{<clutter-entry>}) (color@tie{}@code{<clutter-color>})
@deffnx Method get-color
Retrieves the color of @var{entry}.

@table @var
@item entry
a @code{<clutter-entry>}

@item color
return location for a @code{<clutter-color>}

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-get-layout  (self@tie{}@code{<clutter-entry>}) @result{}@tie{} (ret@tie{}@code{<pango-layout>})
@deffnx Method get-layout
Gets the @code{<pango-layout>} used to display the entry. The layout is useful
to e.g. convert text positions to pixel positions. The returned layout is owned
by the entry so need not be freed by the caller.

@table @var
@item entry
a @code{<clutter-entry>}

@item ret
the @code{<pango-layout>} for this entry

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-set-alignment  (self@tie{}@code{<clutter-entry>}) (alignment@tie{}@code{<pango-alignment>})
@deffnx Method set-alignment
Sets text alignment of the entry.

@table @var
@item entry
a @code{<clutter-entry>}

@item alignment
A @code{<pango-alignment>}

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-get-alignment  (self@tie{}@code{<clutter-entry>}) @result{}@tie{} (ret@tie{}@code{<pango-alignment>})
@deffnx Method get-alignment
Returns the entry's text alignment

@table @var
@item entry
a @code{<clutter-entry>}

@item ret
The entry's @code{<pango-alignment>} Since 0.4

@end table

@end deffn

@deffn Function clutter-entry-set-cursor-position  (self@tie{}@code{<clutter-entry>}) (position@tie{}@code{int})
@deffnx Method set-cursor-position
Sets the position of the cursor. The @var{position} must be less than or equal
to the number of characters in the entry. 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.

@table @var
@item entry
a @code{<clutter-entry>}

@item position
the position of the cursor.

@end table

Since 0.6

@end deffn

@deffn Function clutter-entry-get-cursor-position  (self@tie{}@code{<clutter-entry>}) @result{}@tie{} (ret@tie{}@code{int})
@deffnx Method get-cursor-position
Gets the position, in characters, of the cursor in @var{entry}.

@table @var
@item entry
a @code{<clutter-entry>}

@item ret
the position of the cursor.

@end table

Since 0.6

@end deffn

@deffn Function clutter-entry-handle-key-event  (self@tie{}@code{<clutter-entry>}) (kev@tie{}@code{<clutter-key-event>})
@deffnx Method handle-key-event
@samp{clutter_entry_handle_key_event} has been deprecated since version 0.8 and
should not be used in newly-written code. The key events will automatically be
handled when giving the key focus to an entry using
@code{clutter-stage-set-key-focus}.

This function will handle a @code{<clutter-key-event>}, like those returned in a
key-press/release-event, and will translate it for the @var{entry}. This
includes non-alphanumeric keys, such as the arrows keys, which will move the
input cursor. You should use this function inside a handler for the
ClutterStage::key-press-event or ClutterStage::key-release-event.

@table @var
@item entry
a @code{<clutter-entry>}

@item kev
a @code{<clutter-key-event>}

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-insert-unichar  (self@tie{}@code{<clutter-entry>}) (wc@tie{}@code{unsigned-int32})
@deffnx Method insert-unichar
Insert a character to the right of the current position of the cursor, and
updates the position of the cursor.

@table @var
@item entry
a @code{<clutter-entry>}

@item wc
a Unicode character

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-delete-chars  (self@tie{}@code{<clutter-entry>}) (len@tie{}@code{unsigned-int})
@deffnx Method delete-chars
Characters are removed from before the current postion of the cursor.

@table @var
@item entry
a @code{<clutter-entry>}

@item len
the number of characters to remove.

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-insert-text  (self@tie{}@code{<clutter-entry>}) (text@tie{}@code{mchars}) (position@tie{}@code{ssize_t})
@deffnx Method insert-text
Insert text at a specifc position.

A value of 0 indicates that the text will be inserted before the first character
in the entry's text, and a value of -1 indicates that the text will be inserted
after the last character in the entry's text.

@table @var
@item entry
a @code{<clutter-entry>}

@item text
the text to insert

@item position
the position at which to insert the text.

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-delete-text  (self@tie{}@code{<clutter-entry>}) (start_pos@tie{}@code{ssize_t}) (end_pos@tie{}@code{ssize_t})
@deffnx Method delete-text
Deletes a sequence of characters. The characters that are deleted are those
characters at positions from @var{start-pos} up to, but not including,
@var{end-pos}. If @var{end-pos} is negative, then the characters deleted will be
those characters from @var{start-pos} to the end of the text.

@table @var
@item entry
a @code{<clutter-entry>}

@item start-pos
the starting position.

@item end-pos
the end position.

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-set-visible-cursor  (self@tie{}@code{<clutter-entry>}) (visible@tie{}@code{bool})
@deffnx Method set-visible-cursor
Sets the visibility of the input cursor.

@table @var
@item entry
a @code{<clutter-entry>}

@item visible
whether the input cursor should be visible

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-get-visible-cursor  (self@tie{}@code{<clutter-entry>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method get-visible-cursor
Returns the input cursor's visibility

@table @var
@item entry
a @code{<clutter-entry>}

@item ret
whether the input cursor is visible

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-set-visibility  (self@tie{}@code{<clutter-entry>}) (visible@tie{}@code{bool})
@deffnx Method set-visibility
Sets whether the contents of the entry are visible or not. When visibility is
set to @samp{@code{#f}}, characters are displayed as the invisible char, and
will also appear that way when the text in the entry widget is copied elsewhere.

The default invisible char is the asterisk '*', but it can be changed with
@code{clutter-entry-set-invisible-char}.

@table @var
@item entry
a @code{<clutter-entry>}

@item visible
@samp{@code{#t}} if the contents of the entry are displayed as plaintext.

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-get-visibility  (self@tie{}@code{<clutter-entry>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method get-visibility
Returns the entry text visibility.

@table @var
@item entry
a @code{<clutter-entry>}

@item ret
@samp{@code{#t}} if the contents of the entry are displayed as plaintext.

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-set-invisible-char  (self@tie{}@code{<clutter-entry>}) (wc@tie{}@code{unsigned-int32})
@deffnx Method set-invisible-char
Sets the character to use in place of the actual text when
@code{clutter-entry-set-visibility} has been called to set text visibility to
@samp{@code{#f}}. 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.

@table @var
@item entry
a @code{<clutter-entry>}

@item wc
a Unicode character

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-get-invisible-char  (self@tie{}@code{<clutter-entry>}) @result{}@tie{} (ret@tie{}@code{unsigned-int32})
@deffnx Method get-invisible-char
Returns the character to use in place of the actual text when text-visibility is
set to @samp{@code{#f}}

@table @var
@item entry
a @code{<clutter-entry>}

@item ret
a Unicode character

@end table

@end deffn

@deffn Function clutter-entry-set-max-length  (self@tie{}@code{<clutter-entry>}) (max@tie{}@code{int})
@deffnx Method set-max-length
Sets the maximum allowed length of the contents of the actor. If the current
contents are longer than the given length, then they will be truncated to fit.

@table @var
@item entry
a @code{<clutter-entry>}

@item max
the maximum number of characters allowed in the entry; 0 to disable or -1 to set
the length of the current string

@end table

Since 0.4

@end deffn

@deffn Function clutter-entry-get-max-length  (self@tie{}@code{<clutter-entry>}) @result{}@tie{} (ret@tie{}@code{int})
@deffnx Method get-max-length
Gets the maximum length of text that can be set into @var{entry}. See
@code{clutter-entry-set-max-length}.

@table @var
@item entry
a @code{<clutter-entry>}

@item ret
the maximum number of characters.

@end table

Since 0.4

@end deffn


@c %end of fragment
