Osso Addressbook Reference Manual | ||||
---|---|---|---|---|
OssoABookContactFieldSelectorOssoABookContactFieldSelector — A Widget for selecting a contact field |
OssoABookContactFieldSelector; GtkWidget* osso_abook_contact_field_selector_new (void); void osso_abook_contact_field_selector_load (OssoABookContactFieldSelector *selector, OssoABookContact *contact, OssoABookContactFieldPredicate accept_field, gpointer user_data); void osso_abook_contact_field_selector_append (OssoABookContactFieldSelector *selector, OssoABookContactField *field); OssoABookContactField* osso_abook_contact_field_selector_get_selected (OssoABookContactFieldSelector *selector); int osso_abook_contact_field_selector_find_custom (OssoABookContactFieldSelector *selector, OssoABookContactFieldPredicate accept_field, gpointer user_data); GList* osso_abook_contact_field_selector_get_selected_fields (OssoABookContactFieldSelector *selector); void osso_abook_contact_field_selector_set_show_values (OssoABookContactFieldSelector *selector, gboolean value); gboolean osso_abook_contact_field_selector_get_show_values (OssoABookContactFieldSelector *selector);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkVBox +----HildonTouchSelector +----OssoABookContactFieldSelector
OssoABookContactFieldSelector implements AtkImplementorIface and GtkBuildable.
This module provides the OssoABookContactFieldSelector class, which is a widget that allows the user to select a contact field from a list of available fields
typedef struct _OssoABookContactFieldSelector OssoABookContactFieldSelector;
GtkWidget* osso_abook_contact_field_selector_new (void);
Creates a new OssoABookContactFieldSelector
void osso_abook_contact_field_selector_load (OssoABookContactFieldSelector *selector, OssoABookContact *contact, OssoABookContactFieldPredicate accept_field, gpointer user_data);
Loads the list of possible fields, filtered according to accept_field
, and
adds them to the selector
selector : |
a OssoABookContactFieldSelector |
contact : |
an optional OssoABookContact to be associated with the contact fields |
accept_field : |
a predicate function to filter the list of possible fields |
user_data : |
optional data to pass to accept_field
|
void osso_abook_contact_field_selector_append (OssoABookContactFieldSelector *selector, OssoABookContactField *field);
Appends the specified field
to the list of fields that can be selected
selector : |
a OssoABookContactFieldSelector |
field : |
a OssoABookContactField to append |
OssoABookContactField* osso_abook_contact_field_selector_get_selected (OssoABookContactFieldSelector *selector);
Gets the field that is currently selected.
selector : |
a OssoABookContactFieldSelector |
Returns : | the currently-selected field or NULL . The caller owns a reference
to the returned field.
|
int osso_abook_contact_field_selector_find_custom (OssoABookContactFieldSelector *selector, OssoABookContactFieldPredicate accept_field, gpointer user_data);
Gets the row index of the first field that returns true from accept_field
selector : |
a OssoABookContactFieldSelector |
accept_field : |
predicate function for accepting or rejecting potential fields |
user_data : |
optional data to pass to accept_field
|
Returns : | the row index of the found row, or -1 if no fields are found.
|
GList* osso_abook_contact_field_selector_get_selected_fields (OssoABookContactFieldSelector *selector);
Gets a list of selected fields for selector
selector : |
a OssoABookContactFieldSelector |
Returns : | a list of OssoABookContactFields. The list and its contents are owned by the caller |
void osso_abook_contact_field_selector_set_show_values (OssoABookContactFieldSelector *selector, gboolean value);
Sets the property that controls whether the values of the fields are shown in
the selector widget. If value
is FALSE
, only the names of the fields will
be displayed. If value
is TRUE
, then the values will also be displayed.
selector : |
a OssoABookContactFieldSelector |
value : |
whether the selector should show values |
gboolean osso_abook_contact_field_selector_get_show_values (OssoABookContactFieldSelector *selector);
Gets the value of the property that controls whether the values of the fields are displayed in the selector.
selector : |
a OssoABookContactFieldSelector |