MokoSearchBar

MokoSearchBar — An implementation of the OpenMoko "Search Bar" user interface

Functions

Properties

GtkComboBox * combo Read / Write / Construct Only
GtkEntry * entry Read

Signals

void combo-changed Run Last
void text-changed Run Last
void toggled Run Last

Types and Values

struct MokoSearchBar

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkObject
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBox
                        ╰── GtkHBox
                            ╰── MokoSearchBar

Implemented Interfaces

MokoSearchBar implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Description

The MokoSearchBar is a composite widget that implements the "Search Bar" user interface from OpenMoko. It comprises of a GtkEntry, a GtkComboBox and a GtkToggleButton that toggles the visibility of the entry and combo box.

Functions

moko_search_bar_new ()

GtkWidget *
moko_search_bar_new ();

Create a new MokoSearBar widget

Returns

The newly created MokoSearchBar


moko_search_bar_new_with_combo ()

GtkWidget *
moko_search_bar_new_with_combo (GtkComboBox *combo);

Creates a MokoSearchBar with the specified combo box

Parameters

combo

a GtkComboBox to use as the combobox

 

Returns

the newly created MokoSearchBar


moko_search_bar_get_combo_box ()

GtkComboBox *
moko_search_bar_get_combo_box (MokoSearchBar *self);

Get a pointer to the GtkComboBox being used in the MokoSearchBar

Parameters

self

a MokoSearchBar

 

Returns

the GtkComboBox


moko_search_bar_get_entry ()

GtkEntry *
moko_search_bar_get_entry (MokoSearchBar *self);

Retrieve the GtkEntry widget being used in the MokoSearchBar

Parameters

self

a MokoSearchBar

 

Returns

the GtkEntry


moko_search_bar_search_visible ()

gboolean
moko_search_bar_search_visible (MokoSearchBar *self);

Determine the visibility of the search entry.

Parameters

self

a MokoSaerchBar

 

Returns

TRUE if the search entry is visible


moko_search_bar_toggle ()

void
moko_search_bar_toggle (MokoSearchBar *self);

Toggle the search button on the MokoSearchBar. This toggles the visibility of the combo box and entry widgets.

Parameters

self

a MokoSearchBar

 

Types and Values

struct MokoSearchBar

struct MokoSearchBar;

MokoSearchBar has no publicly accessible fields

Property Details

The “combo” property

  “combo”                    GtkComboBox *

The GtkComboBox to place inside the widget.

Flags: Read / Write / Construct Only


The “entry” property

  “entry”                    GtkEntry *

The GtkEntry created for this widget.

Flags: Read

Signal Details

The “combo-changed” signal

void
user_function (MokoSearchBar *searchbar,
               GtkComboBox   *combo,
               gpointer       user_data)

The ::combo-changed signal is emitted each time the underlying GtkComboBox receives its ::changed signal.

Parameters

searchbar

The MokoSearchBar that received the signal

 

combo

The underlying GtkComboBox that received the ::changed signal.

 

user_data

User data set when the signal handler was connected.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “text-changed” signal

void
user_function (MokoSearchBar *searchbar,
               gpointer       editable,
               gpointer       user_data)

The ::text-changed signal is emitted each time the underlying GtkEditable receives its ::changed signal.

Parameters

searchbar

The MokoSearchBar that received the signal

 

editable

The underlying GtkEditable that received the ::changed signal.

 

user_data

User data set when the signal handler was connected.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “toggled” signal

void
user_function (MokoSearchBar *searchbar,
               gboolean       search_visible,
               gpointer       user_data)

The ::toggled signal is emitted each time the search button is pressed.

Parameters

searchbar

The MokoSearchBar that received the signal

 

search_visible

TRUE if the search entry is visible, FALSE otherwise

 

user_data

User data set when the signal handler was connected.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

See Also

GtkEntry, GtkComboBox