Top | ![]() |
![]() |
![]() |
![]() |
InfGtkChatInfGtkChat — Gtk interface to InfChatSession |
GtkWidget * | inf_gtk_chat_new () |
void | inf_gtk_chat_set_session () |
InfUser * | inf_gtk_chat_get_active_user () |
void | inf_gtk_chat_set_active_user () |
GtkWidget * | inf_gtk_chat_get_entry () |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkGrid ╰── InfGtkChat
InfGtkChat is a widget showing a InfChatSession conversation. Use
inf_gtk_chat_set_session()
to set the session whose conversation to show
in the widget. If you have a local user in the session you can also call
inf_gtk_chat_set_active_user()
. In this case the input text entry is made
available and messages are sent via that user.
GtkWidget *
inf_gtk_chat_new (void
);
Creates a new InfGtkChat. To show a chat conversation set a session to
show via inf_gtk_chat_set_session()
.
[constructor]
void inf_gtk_chat_set_session (InfGtkChat *chat
,InfChatSession *session
);
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 NULL
this function just clears the chat view and unsets the
active user, if any.
InfUser *
inf_gtk_chat_get_active_user (InfGtkChat *chat
);
Returns the active user for chat
as set with
inf_gtk_chat_set_active_user()
.
void inf_gtk_chat_set_active_user (InfGtkChat *chat
,InfUser *user
);
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 INF_USER_LOCAL
flag set, i.e.
you need to have it joined before using inf_session_proxy_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 INF_USER_UNAVAILABLE
or the
INF_USER_LOCAL
flag is removed the active user will be unset
automatically.
This cannot be called when the chat has no session set yet.
Use inf_gtk_chat_set_session()
first.
GtkWidget *
inf_gtk_chat_get_entry (InfGtkChat *chat
);
Returns the chat's text input entry.
struct InfGtkChat;
InfGtkChat is an opaque data type. You should only access it via the public API functions.
“active-user”
property“active-user” InfUser *
The user outgoing messages come from.
Owner: InfGtkChat
Flags: Read / Write
“session”
property“session” InfChatSession *
The chat session this widget is displaying.
Owner: InfGtkChat
Flags: Read / Write