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);
GtkWidget*          osso_abook_touch_contact_starter_new_with_single_attribute_full
                                                        (OssoABookContact *contact,
                                                         EVCardAttribute *attribute,
                                                         McProfile *profile,
                                                         const OssoABookContactAction *allowed_actions,
                                                         guint n_actions);
GtkWidget*          osso_abook_touch_contact_starter_new_with_highlighted_attribute
                                                        (OssoABookContact *contact,
                                                         EVCardAttribute *attribute);
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);
void                osso_abook_touch_contact_starter_start_merge
                                                        (OssoABookTouchContactStarter *starter,
                                                         OssoABookContactModel *contact_model,
                                                         OssoABookMergeWithCb cb,
                                                         gpointer user_data);

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
  "highlighted-attribute"    gpointer              : Read / Write / Construct Only
  "interactive"              gboolean              : Read / Write / Construct Only
  "left-part"                gboolean              : Read / Write / Construct Only
  "single-attribute"         gpointer              : Read / Write / Construct Only
  "single-attribute-profile" McProfile*            : 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_new_with_single_attribute_full ()

GtkWidget*          osso_abook_touch_contact_starter_new_with_single_attribute_full
                                                        (OssoABookContact *contact,
                                                         EVCardAttribute *attribute,
                                                         McProfile *profile,
                                                         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.

If attribute is a TEL attribute then you can choose to show just the buttons for SIP or Skype by passing the corresponding McProfile as profile. Passing the "tel" profile is equivalent to passing NULL.

contact : a master OssoABookContact to base the starter upon.
attribute : the EVCardAttribute of the contact to display.
profile : a McProfile.
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_new_with_highlighted_attribute ()

GtkWidget*          osso_abook_touch_contact_starter_new_with_highlighted_attribute
                                                        (OssoABookContact *contact,
                                                         EVCardAttribute *attribute);

Creates a new OssoABookTouchContactStarter object which includes all the normal fields, but highlighting the button based on the supplied attribute.

contact : a master OssoABookContact to base the starter upon.
attribute : the EVCardAttribute of the contact to highlight.
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);

This function presents a contact chooser to the user from which they can select other contacts to merge with the contact currently shown in starter. If there are conflicts, a dialog will be shown so the user can resolve them.

When the merge is complete, cb will be called with the new uid for the merged contact.

This function is equivalent to osso_abook_merge_with_many_dialog(), but it takes care of updating the contact in starter if it's deleted as a consequence of a merge.

starter : an OssoABookTouchContactStarter
contact_model : an optional OssoABookContactModel from which to present a list of potential contacts to merge with
cb : A function to be called when the merge is complete
user_data : data to be passed to cb

osso_abook_touch_contact_starter_start_merge ()

void                osso_abook_touch_contact_starter_start_merge
                                                        (OssoABookTouchContactStarter *starter,
                                                         OssoABookContactModel *contact_model,
                                                         OssoABookMergeWithCb cb,
                                                         gpointer user_data);

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 "highlighted-attribute" property

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

An optional attribute to highlight.


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 "single-attribute-profile" property

  "single-attribute-profile" McProfile*            : Read / Write / Construct Only

An optional profile if single-attribute refers to a TEL field, but the call was made through a VOIP service.


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.