Class

PurplePerson

unstable since: 3.0

Description [src]

final class Purple.Person : GObject.Object
  implements Gio.ListModel {
  /* No available fields */
}

A collection of PurpleContactInfo that contains a user selectable custom avatar and alias.

Available since: 3.0

Ancestors

Implements

Constructors

purple_person_new

Creates a new PurplePerson.

unstable since: 3.0

Instance methods

purple_person_add_contact_info

Adds info to person.

unstable since: 3.0

purple_person_get_alias

Gets the alias of person that was set by the libpurple user.

unstable since: 3.0

purple_person_get_avatar

Gets the avatar of person or NULL if no avatar is set.

unstable since: 3.0

purple_person_get_avatar_for_display

Gets the avatar that should be displayed for person. If person has an avatar set, it will be returned, otherwise this will fallback to the value of PurpleContactInfo:avatar for PurplePerson:priority-contact-info.

unstable since: 3.0

purple_person_get_color

Gets the custom color that has been set for this person.

unstable since: 3.0

purple_person_get_color_for_display

Gets the color that should be used for person. If PurplePerson:color is set that will be returned, otherwise the result of purple_contact_info_get_color() on the priority contact will be returned.

unstable since: 3.0

purple_person_get_id

Gets the id of person. This is created internally and is read-only.

unstable since: 3.0

purple_person_get_name_for_display

Gets the name that should be displayed for person. See PurplePerson:name-for-display for more information.

unstable since: 3.0

purple_person_get_priority_contact_info

Gets the contact info for the most available contact info in person.

unstable since: 3.0

purple_person_get_tags

Gets the PurpleTags instance for person.

unstable since: 3.0

purple_person_has_contacts

Gets whether or not person has any contacts.

unstable since: 3.0

purple_person_matches

Checks if the alias matches needle. This also checks needle against purple_contact_info_matches() for each PurpleContactInfo that person is tracking.

unstable since: 3.0

purple_person_remove_contact_info

Removes info from person.

unstable since: 3.0

purple_person_set_alias

Sets the alias of person to alias.

unstable since: 3.0

purple_person_set_avatar

Sets the avatar of person to avatar. If avatar is NULL then the previous avatar is cleared.

unstable since: 3.0

purple_person_set_color

Sets the custom color of person to color. If color is NULL the custom color is removed.

unstable since: 3.0

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Methods inherited from GListModel (5)
g_list_model_get_item

Get the item at position.

g_list_model_get_item_type

Gets the type of the items in list.

g_list_model_get_n_items

Gets the number of items in list.

g_list_model_get_object

Get the item at position.

g_list_model_items_changed

Emits the GListModel::items-changed signal on list.

Properties

Purple.Person:alias

The alias for this person. This is controlled by the libpurple user.

unstable since: 3.0

Purple.Person:avatar

The avatar for this person. This is controlled by the libpurple user, which they can use to set a custom avatar.

unstable since: 3.0

Purple.Person:avatar-for-display

The avatar to show for the person. If PurplePerson:avatar is set, it will be returned. Otherwise the value of PurpleContactInfo:avatar for PurplePerson:priority-contact-info will be returned.

unstable since: 3.0

Purple.Person:color

A custom color to use for this person which will override any colors for the contacts that belong to this person.

unstable since: 3.0

Purple.Person:color-for-display

The color to use for this person.

unstable since: 3.0

Purple.Person:id

The protocol specific id for the contact.

unstable since: 3.0

Purple.Person:item-type

The type of items. See Gio.ListModelInterface.get_item_type.

unstable since: 3.0

Purple.Person:n-items

The number of items. See Gio.ListModelInterface.get_n_items.

unstable since: 3.0

Purple.Person:name-for-display

The name that should be displayed for this person.

unstable since: 3.0

Purple.Person:priority-contact-info

The PurpleContactInfo that currently has the highest priority.

unstable since: 3.0

Purple.Person:tags

The PurpleTags for this person.

unstable since: 3.0

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Signals inherited from GListModel (1)
GListModel::items-changed

This signal is emitted whenever items were added to or removed from list. At position, removed items were removed and added items were added in their place.

Class structure

struct PurplePersonClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.