InfGtk.Chat¶
- 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 |
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Gtk.Grid (5), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The user outgoing messages come from |
||
r/w |
The chat session this widget is displaying |
Child Properties¶
- Inherited:
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class InfGtk.Chat(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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:
Creates a new
InfGtk.Chat
. To show a chat conversation set a session to show viaInfGtk.Chat.set_session
().
- get_active_user()¶
- Returns:
The chat’s active user, or
None
if there is none.- Return type:
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:
Returns the chat’s text input entry.
- set_active_user(user)¶
- Parameters:
user (
Infinity.User
) – A localInfinity.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 usingInfinity.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 theInfinity.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
) – TheInfinity.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:
- Default Value:
- Flags:
The user outgoing messages come from
- InfGtk.Chat.props.session¶
- Name:
session
- Type:
- Default Value:
- Flags:
The chat session this widget is displaying