gtkconvwin.h

Go to the documentation of this file.
00001 
00006 /* pidgin
00007  *
00008  * Pidgin is the legal property of its developers, whose names are too numerous
00009  * to list here.  Please refer to the COPYRIGHT file distributed with this
00010  * source distribution.
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
00025  */
00026 #ifndef _PIDGIN_CONVERSATION_WINDOW_H_
00027 #define _PIDGIN_CONVERSATION_WINDOW_H_
00028 
00029 typedef struct _PidginWindow       PidginWindow;
00030 
00031 
00032 /**************************************************************************
00033  * @name Structures
00034  **************************************************************************/
00041 struct _PidginWindow
00042 {
00043     GtkWidget *window;           
00044     GtkWidget *notebook;         
00045     GList *gtkconvs;
00046 
00047     struct
00048     {
00049         GtkWidget *menubar;
00050 
00051         GtkWidget *view_log;
00052 
00053         GtkWidget *send_file;
00054         GtkWidget *add_pounce;
00055         GtkWidget *get_info;
00056         GtkWidget *invite;
00057 
00058         GtkWidget *alias;
00059         GtkWidget *block;
00060         GtkWidget *unblock;
00061         GtkWidget *add;
00062         GtkWidget *remove;
00063 
00064         GtkWidget *insert_link;
00065         GtkWidget *insert_image;
00066 
00067         GtkWidget *logging;
00068         GtkWidget *sounds;
00069         GtkWidget *show_formatting_toolbar;
00070         GtkWidget *show_timestamps;
00071         GtkWidget *show_icon;
00072 
00073         GtkWidget *send_to;
00074 
00075         GtkWidget *tray;
00076 
00077         GtkWidget *typing_icon;
00078 
00079         GtkItemFactory *item_factory;
00080 
00081     } menu;
00082 
00083     struct
00084     {
00085         GtkWidget *search;
00086 
00087     } dialogs;
00088 
00089     /* Tab dragging stuff. */
00090     gboolean in_drag;
00091     gboolean in_predrag;
00092 
00093     gint drag_tab;
00094 
00095     gint drag_min_x, drag_max_x, drag_min_y, drag_max_y;
00096 
00097     gint drag_motion_signal;
00098     gint drag_leave_signal;
00099 };
00100 
00103 /**************************************************************************
00104  * @name GTK+ Conversation Window API
00105  **************************************************************************/
00108 PidginWindow * pidgin_conv_window_new(void);
00109 void pidgin_conv_window_destroy(PidginWindow *win);
00110 GList *pidgin_conv_windows_get_list(void);
00111 void pidgin_conv_window_show(PidginWindow *win);
00112 void pidgin_conv_window_hide(PidginWindow *win);
00113 void pidgin_conv_window_raise(PidginWindow *win);
00114 void pidgin_conv_window_switch_gtkconv(PidginWindow *win, PidginConversation *gtkconv);
00115 void pidgin_conv_window_add_gtkconv(PidginWindow *win, PidginConversation *gtkconv);
00116 void pidgin_conv_window_remove_gtkconv(PidginWindow *win, PidginConversation *gtkconv);
00117 PidginConversation *pidgin_conv_window_get_gtkconv_at_index(const PidginWindow *win, int index);
00118 PidginConversation *pidgin_conv_window_get_active_gtkconv(const PidginWindow *win);
00119 PurpleConversation *pidgin_conv_window_get_active_conversation(const PidginWindow *win);
00120 gboolean pidgin_conv_window_is_active_conversation(const PurpleConversation *conv);
00121 gboolean pidgin_conv_window_has_focus(PidginWindow *win);
00122 PidginWindow *pidgin_conv_window_get_at_xy(int x, int y);
00123 GList *pidgin_conv_window_get_gtkconvs(PidginWindow *win);
00124 guint pidgin_conv_window_get_gtkconv_count(PidginWindow *win);
00125 
00126 PidginWindow *pidgin_conv_window_first_with_type(PurpleConversationType type);
00127 PidginWindow *pidgin_conv_window_last_with_type(PurpleConversationType type);
00128 
00131 /**************************************************************************
00132  * @name GTK+ Conversation Placement API
00133  **************************************************************************/
00136 typedef void (*PidginConvPlacementFunc)(PidginConversation *);
00137 
00138 GList *pidgin_conv_placement_get_options(void);
00139 void pidgin_conv_placement_add_fnc(const char *id, const char *name, PidginConvPlacementFunc fnc);
00140 void pidgin_conv_placement_remove_fnc(const char *id);
00141 const char *pidgin_conv_placement_get_name(const char *id);
00142 PidginConvPlacementFunc pidgin_conv_placement_get_fnc(const char *id);
00143 void pidgin_conv_placement_set_current_func(PidginConvPlacementFunc func);
00144 PidginConvPlacementFunc pidgin_conv_placement_get_current_func(void);
00145 void pidgin_conv_placement_place(PidginConversation *gtkconv);
00146 
00149 #endif /* _PIDGIN_CONVERSATION_WINDOW_H_ */