![]() |
![]() |
![]() |
libinfgtk-0.5 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
InfGtkChatInfGtkChat — Gtk interface to InfChatSession |
#include <libinfgtk/inf-gtk-chat.h> InfGtkChat; GtkWidget * inf_gtk_chat_new (void
); void inf_gtk_chat_set_session (InfGtkChat *chat
,InfChatSession *session
); void inf_gtk_chat_set_active_user (InfGtkChat *chat
,InfUser *user
); GtkWidget * inf_gtk_chat_get_entry (InfGtkChat *chat
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkVBox +----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.
typedef struct _InfGtkChat InfGtkChat;
InfGtkChat is an opaque data type. You should only access it via the public API functions.
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()
.
Returns : |
A new InfGtkChat. |
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.
|
A InfGtkChat. |
|
The InfChatSession to set. |
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 infc_session_proxy_join_user()
or infd_session_proxy_add_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.
|
A InfGtkChat. |
|
A local InfUser which joined chat's session. |
GtkWidget * inf_gtk_chat_get_entry (InfGtkChat *chat
);
Returns the chat's text input entry.
|
A InfGtkChat. |
Returns : |
The chat's GtkEntry. This is owned by the chat, so you don't need to free it. |
"active-user"
property"active-user" InfUser* : Read / Write
The user outgoing messages come from.
"session"
property"session" InfChatSession* : Read / Write
The chat session this widget is displaying.