Loading...
Searching...
No Matches
gtkconv.h
Go to the documentation of this file.
/* pidgin
*
* Pidgin is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#ifndef _PIDGIN_CONVERSATION_H_
#define _PIDGIN_CONVERSATION_H_
typedef struct _PidginImPane PidginImPane;
typedef struct _PidginChatPane PidginChatPane;
typedef struct _PidginConversation PidginConversation;
typedef enum
{
PIDGIN_UNSEEN_NONE,
PIDGIN_UNSEEN_EVENT,
PIDGIN_UNSEEN_NO_LOG,
PIDGIN_UNSEEN_TEXT,
PIDGIN_UNSEEN_NICK
} PidginUnseenState;
enum {
CHAT_USERS_ICON_COLUMN,
CHAT_USERS_ALIAS_COLUMN,
CHAT_USERS_ALIAS_KEY_COLUMN,
CHAT_USERS_NAME_COLUMN,
CHAT_USERS_FLAGS_COLUMN,
CHAT_USERS_COLOR_COLUMN,
CHAT_USERS_WEIGHT_COLUMN,
CHAT_USERS_ICON_STOCK_COLUMN,
CHAT_USERS_COLUMNS
};
#define PIDGIN_CONVERSATION(conv) \
((PidginConversation *)(conv)->ui_data)
#define PIDGIN_IS_PIDGIN_CONVERSATION(conv) \
(purple_conversation_get_ui_ops(conv) == \
pidgin_conversations_get_conv_ui_ops())
#include "pidgin.h"
#include "conversation.h"
#include "gtkconvwin.h"
/**************************************************************************
* @name Structures
**************************************************************************/
struct _PidginImPane
{
GtkWidget *block;
GtkWidget *send_file;
GtkWidget *sep1;
GtkWidget *sep2;
GtkWidget *check;
GtkWidget *progress;
guint32 typing_timer;
/* Buddy icon stuff */
GtkWidget *icon_container;
GtkWidget *icon;
gboolean show_icon;
gboolean animate;
GdkPixbufAnimation *anim;
GdkPixbufAnimationIter *iter;
guint32 icon_timer;
};
struct _PidginChatPane
{
GtkWidget *count;
GtkWidget *list;
GtkWidget *topic_text;
};
struct _PidginConversation
{
PurpleConversation *active_conv;
GList *convs;
GList *send_history;
PidginWindow *win;
gboolean make_sound;
GtkTooltips *tooltips;
GtkWidget *tab_cont;
GtkWidget *tabby;
GtkWidget *menu_tabby;
GtkWidget *imhtml;
GtkTextBuffer *entry_buffer;
GtkWidget *entry;
gboolean auto_resize; /* this is set to TRUE if the conversation
* is being resized by a non-user-initiated
* event, such as the buddy icon appearing
*/
gboolean entry_growing; /* True if the size of the entry was set
* automatically by typing too much to fit
* in one line */
GtkWidget *close; /* "x" on the tab */
GtkWidget *icon;
GtkWidget *tab_label;
GtkWidget *menu_icon;
GtkWidget *menu_label;
#if !(defined PIDGIN_DISABLE_DEPRECATED) || (defined _PIDGIN_GTKCONV_C_)
GtkSizeGroup *sg;
#else
gpointer depr1;
#endif
GtkWidget *lower_hbox;
GtkWidget *toolbar;
PidginUnseenState unseen_state;
guint unseen_count;
union
{
PidginImPane *im;
PidginChatPane *chat;
} u;
time_t newday;
GtkWidget *infopane_hbox;
GtkWidget *infopane;
GtkListStore *infopane_model;
GtkTreeIter infopane_iter;
/* Used when attaching a PidginConversation to a PurpleConversation
* with message history */
struct {
int timer;
GList *current;
} attach;
struct {
GtkWidget *entry;
GtkWidget *container;
} quickfind;
};
/**************************************************************************
* @name GTK+ Conversation API
**************************************************************************/
PurpleConversationUiOps *pidgin_conversations_get_conv_ui_ops(void);
void pidgin_conv_update_buddy_icon(PurpleConversation *conv);
void pidgin_conv_switch_active_conversation(PurpleConversation *conv);
void pidgin_conv_update_buttons_by_protocol(PurpleConversation *conv);
GList *
pidgin_conversations_find_unseen_list(PurpleConversationType type,
PidginUnseenState min_state,
gboolean hidden_only,
guint max_count);
guint
pidgin_conversations_fill_menu(GtkWidget *menu, GList *convs);
void pidgin_conv_present_conversation(PurpleConversation *conv);
gboolean pidgin_conv_attach_to_conversation(PurpleConversation *conv);
PidginWindow *pidgin_conv_get_window(PidginConversation *gtkconv);
GdkPixbuf *pidgin_conv_get_tab_icon(PurpleConversation *conv, gboolean small_icon);
void pidgin_conv_new(PurpleConversation *conv);
int pidgin_conv_get_tab_at_xy(PidginWindow *win, int x, int y, gboolean *to_right);
gboolean pidgin_conv_is_hidden(PidginConversation *gtkconv);
/**************************************************************************/
/**************************************************************************/
void *pidgin_conversations_get_handle(void);
void pidgin_conversations_init(void);
void pidgin_conversations_uninit(void);
#endif /* _PIDGIN_CONVERSATION_H_ */
conversation.h
Conversation API.
PurpleConversationType
PurpleConversationType
A type of conversation.
Definition conversation.h:52
PurpleConversationUiOps
struct _PurpleConversationUiOps PurpleConversationUiOps
Data Structures.
Definition conversation.h:36
PurpleConversation
struct _PurpleConversation PurpleConversation
A core representation of a conversation between two or more people.
Definition conversation.h:38
CHAT_USERS_COLUMNS
@ CHAT_USERS_COLUMNS
Definition gtkconv.h:55
pidgin_conversations_uninit
void pidgin_conversations_uninit(void)
Uninitialized the GTK+ conversation subsystem.
pidgin_conversations_init
void pidgin_conversations_init(void)
Initializes the GTK+ conversations subsystem.
pidgin_conv_present_conversation
void pidgin_conv_present_conversation(PurpleConversation *conv)
Presents a purple conversation to the user.
pidgin_conv_update_buttons_by_protocol
void pidgin_conv_update_buttons_by_protocol(PurpleConversation *conv)
Updates conversation buttons by protocol.
PidginUnseenState
PidginUnseenState
Unseen text states.
Definition gtkconv.h:38
PIDGIN_UNSEEN_NICK
@ PIDGIN_UNSEEN_NICK
Unseen text and the nick was said.
Definition gtkconv.h:43
PIDGIN_UNSEEN_TEXT
@ PIDGIN_UNSEEN_TEXT
Unseen text in the conversation.
Definition gtkconv.h:42
PIDGIN_UNSEEN_EVENT
@ PIDGIN_UNSEEN_EVENT
Unseen events in the conversation.
Definition gtkconv.h:40
PIDGIN_UNSEEN_NO_LOG
@ PIDGIN_UNSEEN_NO_LOG
Unseen text with NO_LOG flag.
Definition gtkconv.h:41
PIDGIN_UNSEEN_NONE
@ PIDGIN_UNSEEN_NONE
No unseen text in the conversation.
Definition gtkconv.h:39
pidgin_conv_switch_active_conversation
void pidgin_conv_switch_active_conversation(PurpleConversation *conv)
Sets the active conversation within a GTK-conversation.
pidgin_conversations_get_conv_ui_ops
PurpleConversationUiOps * pidgin_conversations_get_conv_ui_ops(void)
Returns the UI operations structure for GTK+ conversations.
pidgin_conv_attach_to_conversation
gboolean pidgin_conv_attach_to_conversation(PurpleConversation *conv)
Reattach Pidgin UI to a conversation.
pidgin_conversations_get_handle
void * pidgin_conversations_get_handle(void)
Returns the gtk conversations subsystem handle.
pidgin_conversations_fill_menu
guint pidgin_conversations_fill_menu(GtkWidget *menu, GList *convs)
Fill a menu with a list of conversations.
pidgin_conv_update_buddy_icon
void pidgin_conv_update_buddy_icon(PurpleConversation *conv)
Updates the buddy icon on a conversation.
pidgin_conversations_find_unseen_list
GList * pidgin_conversations_find_unseen_list(PurpleConversationType type, PidginUnseenState min_state, gboolean hidden_only, guint max_count)
Returns a list of conversations of the given type which have an unseen state greater than or equal to...
gtkconvwin.h
GTK+ Conversation Window API.
pidgin.h
UI definitions and includes.
_PidginChatPane
GTK+ Chat panes.
Definition gtkconv.h:106
_PidginConversation
A GTK+ conversation pane.
Definition gtkconv.h:116
_PidginConversation::sg
GtkSizeGroup * sg
Definition gtkconv.h:149
_PidginConversation::quickfind
struct _PidginConversation::@256006052350231134052271166156101270240172116002 quickfind
Quick Find.
_PidginImPane
A GTK+ representation of a graphical window containing one or more conversations.
Definition gtkconv.h:83