StEntry

StEntry — Widget for displaying text

Synopsis

struct              StEntry;
struct              StEntryClass;
StWidget *          st_entry_new                        (const gchar *text);
const gchar *       st_entry_get_text                   (StEntry *entry);
void                st_entry_set_text                   (StEntry *entry,
                                                         const gchar *text);
ClutterActor *      st_entry_get_clutter_text           (StEntry *entry);
void                st_entry_set_hint_text              (StEntry *entry,
                                                         const gchar *text);
const gchar *       st_entry_get_hint_text              (StEntry *entry);
void                st_entry_set_input_purpose          (StEntry *entry,
                                                         GtkInputPurpose purpose);
GtkInputPurpose     st_entry_get_input_purpose          (StEntry *entry);
void                st_entry_set_input_hints            (StEntry *entry,
                                                         GtkInputHints hints);
GtkInputHints       st_entry_get_input_hints            (StEntry *entry);
void                st_entry_set_primary_icon           (StEntry *entry,
                                                         ClutterActor *icon);
void                st_entry_set_secondary_icon         (StEntry *entry,
                                                         ClutterActor *icon);
void                (*StEntryCursorFunc)                (StEntry *entry,
                                                         gboolean use_ibeam,
                                                         gpointer data);
void                st_entry_set_cursor_func            (StEntryCursorFunc func,
                                                         gpointer user_data);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----StWidget
                     +----StEntry

Implemented Interfaces

StEntry implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

Properties

  "clutter-text"             ClutterText*          : Read
  "hint-text"                gchar*                : Read / Write
  "input-hints"              GtkInputHints         : Read / Write
  "input-purpose"            GtkInputPurpose       : Read / Write
  "text"                     gchar*                : Read / Write

Signals

  "primary-icon-clicked"                           : Run Last
  "secondary-icon-clicked"                         : Run Last

Description

StEntry is a simple widget for displaying text. It derives from StWidget to add extra style and placement functionality over ClutterText. The internal ClutterText is publicly accessibly to allow applications to set further properties.

StEntry supports the following pseudo style states:

  • focus: the widget has focus

  • indeterminate: the widget is showing the hint text

Details

struct StEntry

struct StEntry;

The contents of this structure is private and should only be accessed using the provided API.


struct StEntryClass

struct StEntryClass {
  StWidgetClass parent_class;

  /* signals */
  void (*primary_icon_clicked)   (StEntry *entry);
  void (*secondary_icon_clicked) (StEntry *entry);
};

st_entry_new ()

StWidget *          st_entry_new                        (const gchar *text);

Create a new StEntry with the specified entry

text :

text to set the entry to

Returns :

a new StEntry

st_entry_get_text ()

const gchar *       st_entry_get_text                   (StEntry *entry);

Get the text displayed on the entry

entry :

a StEntry

Returns :

the text for the entry. This must not be freed by the application

st_entry_set_text ()

void                st_entry_set_text                   (StEntry *entry,
                                                         const gchar *text);

Sets the text displayed on the entry

entry :

a StEntry

text :

text to set the entry to. [allow-none]

st_entry_get_clutter_text ()

ClutterActor *      st_entry_get_clutter_text           (StEntry *entry);

Retrieve the internal ClutterText so that extra parameters can be set

entry :

a StEntry

Returns :

the ClutterText used by StEntry. The entry is owned by the StEntry and should not be unref'ed by the application. [transfer none]

st_entry_set_hint_text ()

void                st_entry_set_hint_text              (StEntry *entry,
                                                         const gchar *text);

Sets the text to display when the entry is empty and unfocused. When the entry is displaying the hint, it has a pseudo class of "indeterminate". A value of NULL unsets the hint.

entry :

a StEntry

text :

text to set as the entry hint. [allow-none]

st_entry_get_hint_text ()

const gchar *       st_entry_get_hint_text              (StEntry *entry);

Gets the text that is displayed when the entry is empty and unfocused

entry :

a StEntry

Returns :

the current value of the hint property. This string is owned by the StEntry and should not be freed or modified.

st_entry_set_input_purpose ()

void                st_entry_set_input_purpose          (StEntry *entry,
                                                         GtkInputPurpose purpose);

Sets the "input-purpose" property which can be used by on-screen keyboards and other input methods to adjust their behaviour.

entry :

a StEntry

purpose :

the purpose

st_entry_get_input_purpose ()

GtkInputPurpose     st_entry_get_input_purpose          (StEntry *entry);

Gets the value of the "input-purpose" property.

entry :

a StEntry

st_entry_set_input_hints ()

void                st_entry_set_input_hints            (StEntry *entry,
                                                         GtkInputHints hints);

Sets the "input-hints" property, which allows input methods to fine-tune their behaviour.

entry :

a StEntry

hints :

the hints

st_entry_get_input_hints ()

GtkInputHints       st_entry_get_input_hints            (StEntry *entry);

Gets the value of the "input-hints" property.

entry :

a StEntry

st_entry_set_primary_icon ()

void                st_entry_set_primary_icon           (StEntry *entry,
                                                         ClutterActor *icon);

Set the primary icon of the entry to icon

entry :

a StEntry

icon :

a ClutterActor. [allow-none]

st_entry_set_secondary_icon ()

void                st_entry_set_secondary_icon         (StEntry *entry,
                                                         ClutterActor *icon);

Set the secondary icon of the entry to icon

entry :

a StEntry

icon :

an ClutterActor. [allow-none]

StEntryCursorFunc ()

void                (*StEntryCursorFunc)                (StEntry *entry,
                                                         gboolean use_ibeam,
                                                         gpointer data);

st_entry_set_cursor_func ()

void                st_entry_set_cursor_func            (StEntryCursorFunc func,
                                                         gpointer user_data);

This function is for private use by libgnome-shell. Do not ever use.

Property Details

The "clutter-text" property

  "clutter-text"             ClutterText*          : Read

Internal ClutterText actor.


The "hint-text" property

  "hint-text"                gchar*                : Read / Write

Text to display when the entry is not focused and the text property is empty.

Default value: NULL


The "input-hints" property

  "input-hints"              GtkInputHints         : Read / Write

Hints for the text field behaviour.


The "input-purpose" property

  "input-purpose"            GtkInputPurpose       : Read / Write

Purpose of the text field.

Default value: GTK_INPUT_PURPOSE_FREE_FORM


The "text" property

  "text"                     gchar*                : Read / Write

Text of the entry.

Default value: NULL

Signal Details

The "primary-icon-clicked" signal

void                user_function                      (StEntry *self,
                                                        gpointer user_data)      : Run Last

Emitted when the primary icon is clicked

self :

the StEntry

user_data :

user data set when the signal handler was connected.

The "secondary-icon-clicked" signal

void                user_function                      (StEntry *self,
                                                        gpointer user_data)      : Run Last

Emitted when the secondary icon is clicked

self :

the StEntry

user_data :

user data set when the signal handler was connected.