OssoABookTouchContactStarter

OssoABookTouchContactStarter — Core widget to initiate communication with a contact or view their basic information.

Synopsis

                    OssoABookTouchContactStarter;
GtkWidget*          osso_abook_touch_contact_starter_new_with_contact
                                                        (GtkWindow *parent,
                                                         OssoABookContact *contact);
GtkWidget*          osso_abook_touch_contact_starter_new_with_editor
                                                        (GtkWindow *parent,
                                                         OssoABookContact *contact);
GtkWidget*          osso_abook_touch_contact_starter_new_with_store
                                                        (OssoABookContactDetailStore *store,
                                                         const OssoABookContactAction *allowed_actions,
                                                         guint n_actions);
GtkWidget*          osso_abook_touch_contact_starter_new_not_interactive
                                                        (GtkWindow *parent,
                                                         OssoABookContact *contact);
GtkWidget*          osso_abook_touch_contact_starter_new_with_single_attribute
                                                        (OssoABookContact *contact,
                                                         EVCardAttribute *attribute,
                                                         const OssoABookContactAction *allowed_actions,
                                                         guint n_actions);
OssoABookContact*   osso_abook_touch_contact_starter_get_contact
                                                        (OssoABookTouchContactStarter *starter);
gboolean            osso_abook_touch_contact_starter_get_editable
                                                        (OssoABookTouchContactStarter *starter);
GtkWidget*          osso_abook_touch_contact_starter_dialog_new
                                                        (GtkWindow *parent,
                                                         OssoABookTouchContactStarter *starter);
OssoABookContactAction osso_abook_touch_contact_starter_get_started_action
                                                        (OssoABookTouchContactStarter *starter);
void                osso_abook_touch_contact_starter_start_editor
                                                        (OssoABookTouchContactStarter *starter);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----OssoABookTouchContactStarter

Implemented Interfaces

OssoABookTouchContactStarter implements AtkImplementorIface and GtkBuildable.

Properties

  "allowed-actions"          guint                 : Read / Write / Construct Only
  "contact"                  OssoABookContact*     : Read / Write / Construct Only
  "editable"                 gboolean              : Read / Write / Construct Only
  "interactive"              gboolean              : Read / Write / Construct Only
  "left-part"                gboolean              : Read / Write / Construct Only
  "single-attribute"         gpointer              : Read / Write / Construct Only
  "store"                    OssoABookContactDetailStore*  : Read / Write / Construct Only

Signals

  "action-started"                                 : Run Last
  "editor-started"                                 : Run Last
  "pre-action-start"                               : Run Last

Description

The OssoABookTouchContactStarter is a widget that allows the user to start chat, VoIP sessions, phone calls, emails, or SMSes to a contact. If this widget is added directly inside a GtkWindow (eg, HildonStackableWindow), it will also set the window's title appropriately based on the current contact.

This widget is derived from GtkBin.

Details

OssoABookTouchContactStarter

typedef struct _OssoABookTouchContactStarter OssoABookTouchContactStarter;

All the fields of this structure are private to the object's implementation and should never be accessed directly.


osso_abook_touch_contact_starter_new_with_contact ()

GtkWidget*          osso_abook_touch_contact_starter_new_with_contact
                                                        (GtkWindow *parent,
                                                         OssoABookContact *contact);

Creates a new OssoABookTouchContactStarter object and initializes some of its properties.

parent : the parent window, or NULL
contact : the contact, or NULL
Returns : A new OssoABookTouchContactStarter object.

osso_abook_touch_contact_starter_new_with_editor ()

GtkWidget*          osso_abook_touch_contact_starter_new_with_editor
                                                        (GtkWindow *parent,
                                                         OssoABookContact *contact);

Creates a new OssoABookTouchContactStarter object and initializes some of its properties. The contact will be editable.

parent : the parent window, or NULL
contact : the contact, or NULL
Returns : A new OssoABookTouchContactStarter object.

osso_abook_touch_contact_starter_new_with_store ()

GtkWidget*          osso_abook_touch_contact_starter_new_with_store
                                                        (OssoABookContactDetailStore *store,
                                                         const OssoABookContactAction *allowed_actions,
                                                         guint n_actions);

Creates a new OssoABookTouchContactStarter object and initializes some of its properties.

store : the OssoABookContactDetailStore to use
actions : array of OssoABookContactAction allowed
n_actions : size of the actions array
Returns : A new OssoABookTouchContactStarter object.

osso_abook_touch_contact_starter_new_not_interactive ()

GtkWidget*          osso_abook_touch_contact_starter_new_not_interactive
                                                        (GtkWindow *parent,
                                                         OssoABookContact *contact);

Creates a new OssoABookTouchContactStarter object and initializes some of its properties. Fields won't be clickable.

parent : the parent window, or NULL
contact : the contact, or NULL
Returns : A new OssoABookTouchContactStarter object.

osso_abook_touch_contact_starter_new_with_single_attribute ()

GtkWidget*          osso_abook_touch_contact_starter_new_with_single_attribute
                                                        (OssoABookContact *contact,
                                                         EVCardAttribute *attribute,
                                                         const OssoABookContactAction *allowed_actions,
                                                         guint n_actions);

Creates a new OssoABookTouchContactStarter object which only includes action buttons based on the supplied attribute. The avatar button will open a full contact starter.

contact : a master OssoABookContact to base the starter upon.
attribute : the EVCardAttribute of the contact to display.
actions : array of OssoABookContactActions allowed in this starter
n_actions : size of the actions array
Returns : A new OssoABookTouchContactStarter object.

osso_abook_touch_contact_starter_get_contact ()

OssoABookContact*   osso_abook_touch_contact_starter_get_contact
                                                        (OssoABookTouchContactStarter *starter);

Get the OssoABookContact this contact starter is acting on.

starter : An OssoABookTouchContactStarter
Returns : the OssoABookContact

osso_abook_touch_contact_starter_get_editable ()

gboolean            osso_abook_touch_contact_starter_get_editable
                                                        (OssoABookTouchContactStarter *starter);

Queries if this contact starter is editable. When the starter is editable pressing the avatar icon will open a OssoABookContactEditor dialog.

starter : An OssoABookTouchContactStarter
Returns : editable state of the widget

osso_abook_touch_contact_starter_dialog_new ()

GtkWidget*          osso_abook_touch_contact_starter_dialog_new
                                                        (GtkWindow *parent,
                                                         OssoABookTouchContactStarter *starter);

Creates a new dialog containing the given OssoABookTouchContactStarter widget. The dialog will automatically be destroyed once the action is started successfully.

parent : the parent, or NULL
starter : the OssoABookTouchContactStarter widget
Returns : A new GtkDialog widget.

osso_abook_touch_contact_starter_get_started_action ()

OssoABookContactAction osso_abook_touch_contact_starter_get_started_action
                                                        (OssoABookTouchContactStarter *starter);

Queries the action triggering the current ::action-started signal.

starter : An OssoABookTouchContactStarter
Returns : the current OssoABookContactAction

osso_abook_touch_contact_starter_start_editor ()

void                osso_abook_touch_contact_starter_start_editor
                                                        (OssoABookTouchContactStarter *starter);

Opens the contact editor for this specific contact starter, to ensure that the starter gets updated in rare corner case(s) that can't be handled automatically. In nearly all cases of opening an editor, calling this function won't be necessary (eg, OssoABookTouchContactStarter automatically handles this for the case that the user taps on the avatar icon).

starter : an editable OssoABookTouchContactStarter

Property Details

The "allowed-actions" property

  "allowed-actions"          guint                 : Read / Write / Construct Only

The allowed OssoABookContactAction flags.

Default value: 4294967295


The "contact" property

  "contact"                  OssoABookContact*     : Read / Write / Construct Only

The displayed OssoABookContact.


The "editable" property

  "editable"                 gboolean              : Read / Write / Construct Only

Whether the contact is editable.

Default value: FALSE


The "interactive" property

  "interactive"              gboolean              : Read / Write / Construct Only

Whether buttons are clickable.

Default value: TRUE


The "left-part" property

  "left-part"                gboolean              : Read / Write / Construct Only

Whether the left part should be shown.

Default value: TRUE


The "single-attribute" property

  "single-attribute"         gpointer              : Read / Write / Construct Only

An optional attribute to restrict the visible buttons to.


The "store" property

  "store"                    OssoABookContactDetailStore*  : Read / Write / Construct Only

The OssoABookContactDetailStore to use.

Signal Details

The "action-started" signal

void                user_function                      (OssoABookTouchContactStarter *starter,
                                                        gpointer                      user_data)      : Run Last

This signal is emitted when an action on the contact starter is initiated by the user.

starter : a OssoABookTouchContactStarter
user_data : user data set when the signal handler was connected.

The "editor-started" signal

void                user_function                      (OssoABookTouchContactStarter *starter,
                                                        OssoABookContactEditor       *arg1,
                                                        gpointer                      user_data)      : Run Last

This signal is emitted when the editor is started for the contact starter.

starter : a OssoABookTouchContactStarter
user_data : user data set when the signal handler was connected.

The "pre-action-start" signal

gboolean            user_function                      (OssoABookTouchContactStarter *starter,
                                                        gpointer                      action,
                                                        gpointer                      user_data)      : Run Last

This signal is emitted before an action on the contact starter is initiated. If TRUE is returned, the signal emition is stopped and the action won't be started. The first callback to return TRUE is responsible to handle the action itself.

starter : a OssoABookTouchContactStarter
action : a OssoABookContactFieldAction
user_data : user data set when the signal handler was connected.