Method

GtkSearchEntryset_key_capture_widget

Declaration [src]

void
gtk_search_entry_set_key_capture_widget (
  GtkSearchEntry* entry,
  GtkWidget* widget
)

Description [src]

Sets widget as the widget that entry will capture key events from.

Key events are consumed by the search entry to start or continue a search.

If the entry is part of a GtkSearchBar, it is preferable to call gtk_search_bar_set_key_capture_widget() instead, which will reveal the entry in addition to triggering the search entry.

Note that despite the name of this function, the events are only ‘captured’ in the bubble phase, which means that editable child widgets of widget will receive text input before it gets captured. If that is not desired, you can capture and forward the events yourself with gtk_event_controller_key_forward().

Parameters

widget

Type: GtkWidget

A GtkWidget

The argument can be NULL.
The data is owned by the caller of the method.