StEntry: St Reference Manual

## StEntry StEntry — Widget for displaying text |

## Functions

StWidget * | st_entry_new ()
const gchar * | st_entry_get_text ()
void | st_entry_set_text ()
ClutterActor * | st_entry_get_clutter_text ()
void | st_entry_set_hint_text ()
const gchar * | st_entry_get_hint_text ()
void | st_entry_set_input_purpose ()
void | st_entry_set_input_hints ()
ClutterInputContentPurpose | st_entry_get_input_purpose ()
ClutterInputContentHintFlags | st_entry_get_input_hints ()
void | st_entry_set_primary_icon ()
ClutterActor * | st_entry_get_primary_icon ()
void | st_entry_set_secondary_icon ()
ClutterActor * | st_entry_get_secondary_icon ()
void | st_entry_set_hint_actor ()
ClutterActor * | st_entry_get_hint_actor ()
void | (*StEntryCursorFunc) ()
void | st_entry_set_cursor_func ()

## Types and Values

#define | ST_TYPE_ENTRY
struct | StEntryClass
| StEntry

## 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 or actor

## Functions

### st_entry_new ()

    StWidget *
    st_entry_new (const gchar *text);

Create a new StEntry with the specified text.

#### Parameters

text | text to set the entry to. | [nullable]

#### Returns

a new StEntry

### st_entry_get_text ()

    const gchar *
    st_entry_get_text (StEntry *entry);

Get the text displayed on the entry. If `entry` is empty, an empty string will be returned instead of `NULL`.

#### Parameters

entry | a StEntry |

#### Returns

the text for the entry.

[transfer none]

### st_entry_set_text ()

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

Sets the text displayed on the entry. If `text` is `NULL`, the ClutterText will instead be set to an empty string.

#### Parameters

entry | a StEntry |
text | text to set the entry to. | [nullable]

### st_entry_get_clutter_text ()

    ClutterActor *
    st_entry_get_clutter_text (StEntry *entry);

Retrieve the internal ClutterText so that extra parameters can be set.

#### Parameters

entry | a StEntry |

#### Returns

the ClutterText used by `entry` .

[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.

#### Parameters

entry | a StEntry |
text | text to set as the entry hint. | [nullable]

### 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 or `NULL` if the “hint-actor” was set to an actor that is not a StLabel.

Unlike `st_entry_get_text()` this function may return `NULL` if “hint-actor” is not a StLabel.

#### Parameters

entry | a StEntry |

#### Returns

the current value of the hint property.

[nullable][transfer none]

### st_entry_set_input_purpose ()

    void
    st_entry_set_input_purpose (StEntry *entry,
                                ClutterInputContentPurpose purpose);

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

#### Parameters

entry | a StEntry |
purpose | the purpose |

### st_entry_set_input_hints ()

    void
    st_entry_set_input_hints (StEntry *entry,
                              ClutterInputContentHintFlags hints);

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

#### Parameters

entry | a StEntry |
hints | the hints |

### st_entry_get_input_purpose ()

    ClutterInputContentPurpose
    st_entry_get_input_purpose (StEntry *entry);

Gets the value of the “input-purpose” property.

#### Parameters

entry | a StEntry |

#### Returns

the input purpose of the entry

### st_entry_get_input_hints ()

    ClutterInputContentHintFlags
    st_entry_get_input_hints (StEntry *entry);

Gets the value of the “input-hints” property.

#### Parameters

entry | a StEntry |

#### Returns

the input hints for the entry

### st_entry_set_primary_icon ()

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

Set the primary icon of the entry to `icon` .

#### Parameters

entry | a StEntry |
icon | a ClutterActor. | [nullable]

### st_entry_get_primary_icon ()

    ClutterActor *
    st_entry_get_primary_icon (StEntry *entry);

Get the value of the “primary-icon” property.

#### Parameters

entry | a StEntry |

#### Returns

a ClutterActor.

[nullable][transfer 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` .

#### Parameters

entry | a StEntry |
icon | an ClutterActor. | [nullable]

### st_entry_get_secondary_icon ()

    ClutterActor *
    st_entry_get_secondary_icon (StEntry *entry);

Get the value of the “secondary-icon” property.

#### Parameters

entry | a StEntry |

#### Returns

a ClutterActor.

[nullable][transfer none]

### st_entry_set_hint_actor ()

    void
    st_entry_set_hint_actor (StEntry *entry,
                             ClutterActor *hint_actor);

Set the hint actor of the entry to `hint_actor` .

#### Parameters

entry | a StEntry |
hint_actor | a ClutterActor. | [nullable]

### st_entry_get_hint_actor ()

    ClutterActor *
    st_entry_get_hint_actor (StEntry *entry);

Get the value of the “hint-actor” property.

#### Parameters

entry | a StEntry |

#### Returns

a ClutterActor.

[nullable][transfer 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.

[skip]

## Types and Values

### ST_TYPE_ENTRY

    #define ST_TYPE_ENTRY (st_entry_get_type ())

### struct StEntryClass

    struct StEntryClass {
      StWidgetClass parent_class;

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

### StEntry

    typedef struct _StEntry StEntry;