GTK+ 3 Reference Manual: GtkSearchEntry

## GtkSearchEntry GtkSearchEntry — An entry which shows a search icon |

## Functions

GtkWidget * | gtk_search_entry_new ()

## Signals

void | search-changed | Run Last

## Types and Values

struct | GtkSearchEntry

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkEntry
                    ╰── GtkSearchEntry

## Implemented Interfaces

GtkSearchEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.

## Includes

    #include <gtk/gtk.h>

## Description

GtkSearchEntry is a subclass of GtkEntry that has been tailored for use as a search entry.

It will show an inactive symbolic "find" icon when the search entry is empty, and a symbolic "clear" icon when there is text. Clicking on the "clear" icon will empty the search entry.

Note that the search/clear icon is shown using a secondary icon, and thus does not work if you are using the secondary icon position for some other purpose.

To make filtering appear more reactive, it is a good idea to not react to every change in the entry text immediately, but only after a short delay. To support this, GtkSearchEntry emits the “search-changed” signal which can be used instead of the “changed” signal.

## Functions

### gtk_search_entry_new ()

    GtkWidget *
    gtk_search_entry_new (void);

Creates a GtkSearchEntry, with a find icon when the search field is empty, and a clear icon when it isn't.

#### Returns

a new GtkSearchEntry

Since 3.6

## Types and Values

### struct GtkSearchEntry

    struct GtkSearchEntry;

## Signal Details

### The `“search-changed”` signal

    void
    user_function (GtkSearchEntry *entry,
                   gpointer        user_data)

The “search-changed” signal is emitted with a short delay of 150 milliseconds after the last change to the entry text.

#### Parameters

entry | the entry on which the signal was emitted |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since 3.10