InfGtk.Chat

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Grid Gtk.Grid Gtk.Container->Gtk.Grid InfGtk.Chat InfGtk.Chat Gtk.Grid->InfGtk.Chat Gtk.Orientable->Gtk.Grid Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.Grid (21), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new ()

get_active_user ()

get_entry ()

set_active_user (user)

set_session (session)

Virtual Methods

Inherited:

Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Grid (5), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)

Name

Type

Flags

Short Description

active-user

Infinity.User

r/w

The user outgoing messages come from

session

Infinity.ChatSession

r/w

The chat session this widget is displaying

Child Properties

Inherited:

Gtk.Grid (4)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

parent

Gtk.Grid

r

Class Details

class InfGtk.Chat(**kwargs)
Bases:

Gtk.Grid

Abstract:

No

Structure:

InfGtk.ChatClass

InfGtk.Chat is an opaque data type. You should only access it via the public API functions.

classmethod new()
Returns:

A new InfGtk.Chat.

Return type:

Gtk.Widget

Creates a new InfGtk.Chat. To show a chat conversation set a session to show via InfGtk.Chat.set_session().

get_active_user()
Returns:

The chat’s active user, or None if there is none.

Return type:

Infinity.User or None

Returns the active user for self as set with InfGtk.Chat.set_active_user().

get_entry()
Returns:

The chat’s Gtk.Entry. This is owned by the chat, so you don’t need to free it.

Return type:

Gtk.Widget

Returns the chat’s text input entry.

set_active_user(user)
Parameters:

user (Infinity.User) – A local Infinity.User which joined chat’s session.

Sets the active user for the chat. This must be a user in the chat’s session’s user table and it must have the Infinity.UserFlags.LOCAL flag set, i.e. you need to have it joined before using Infinity.SessionProxy.join_user().

If an active user is set the chat’s text entry is made sensitive and the user can type chat messages. They are sent to the session as originated by user. If user's status changes to Infinity.UserStatus.UNAVAILABLE or the Infinity.UserFlags.LOCAL flag is removed the active user will be unset automatically.

This cannot be called when the chat has no session set yet. Use InfGtk.Chat.set_session() first.

set_session(session)
Parameters:

session (Infinity.ChatSession) – The Infinity.ChatSession to set.

Sets the chat session to show in the chat widget. If there is a previous session set the chat view will be cleared before showing the new session. If the previous session had an active user set it will be unset. If session is None this function just clears the chat view and unsets the active user, if any.

Property Details

InfGtk.Chat.props.active_user
Name:

active-user

Type:

Infinity.User

Default Value:

None

Flags:

READABLE, WRITABLE

The user outgoing messages come from

InfGtk.Chat.props.session
Name:

session

Type:

Infinity.ChatSession

Default Value:

None

Flags:

READABLE, WRITABLE

The chat session this widget is displaying