TypingLabel

TypingLabel — A GtkLabel that displays who's typing

Functions

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkMisc
                ╰── GtkLabel
                    ╰── TalkatuTypingLabel

Implemented Interfaces

TalkatuTypingLabel implements AtkImplementorIface and GtkBuildable.

Description

This widget implements a simple interface for displaying who is currently typing. You can call talkatu_typing_label_start_typing() whenever you receive a typing notification and TalkatuTypingLabel will aggregate it for you.

If there are no new calls to talkatu_typing_label_start_typing() for a specific user, then they will be removed after a timeout of 30 seconds.

Usernames are passed in as strings and their default display can be overridden by connecting to the “changed” signal.

Functions

talkatu_typing_label_new ()

GtkWidget *
talkatu_typing_label_new (void);

Creates a new TalkatuTypingLabel that displays who is typing.

Returns

The new TalkatuTypingLabel instance.

[transfer full]

talkatu_typing_label_start_typing ()

void
talkatu_typing_label_start_typing (TalkatuTypingLabel *label,
                                   const gchar *who);

Adds who to the list of users in label that are currently typing.

Parameters

label

The TalkatuTypingLabel instance.

 

who

The caller defined user that started typing.

 

talkatu_typing_label_finish_typing ()

void
talkatu_typing_label_finish_typing (TalkatuTypingLabel *label,
                                    const gchar *who);

Removes who from the list of users in label that are currently typing.

Parameters

label

The TalkatuTypingLabel instance.

 

who

The caller defined user that has finished typing.

 

Types and Values

TALKATU_TYPE_TYPING_LABEL

#define TALKATU_TYPE_TYPING_LABEL (talkatu_typing_label_get_type())

The standard _get_type macro for TalkatuTypingLabel.

struct TalkatuTypingLabelClass

struct TalkatuTypingLabelClass {
	void (*changed)(TalkatuTypingLabel *label, GList *typers);
};

The backing class to a TalkatuTypingLabel.

Members

changed ()

The changed vfunc is called to update the text in the widget. The default handler can be overridden to customize the text.

 

TalkatuTypingLabel

typedef struct _TalkatuTypingLabel TalkatuTypingLabel;

A GtkLabel subclass that keeps track of who's typing.

Signal Details

The “changed” signal

void
user_function (TalkatuTypingLabel *talkatutypinglabel,
               gpointer            arg1,
               gpointer            user_data)

Emitted when the typing state of an individual has changed.

Parameters

talkatutypinglabel

The TalkatuTypingLabel instance.

 

arg1

A GList of who's typing.

 

user_data

User supplied data.

 

user_data

user data set when the signal handler was connected.

 

Flags: Action