Use conventional style for empty string check
[pidgin-git.git] / pidgin / gtkconvwin.h
blob986b1ca28fe331538694021c9df3fb073a9047dd
1 /**
2 * @file gtkconvwin.h GTK+ Conversation Window API
3 * @ingroup pidgin
4 */
6 /* pidgin
8 * Pidgin is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
26 #ifndef _PIDGIN_CONVERSATION_WINDOW_H_
27 #define _PIDGIN_CONVERSATION_WINDOW_H_
29 typedef struct _PidginWindow PidginWindow;
32 /**************************************************************************
33 * @name Structures
34 **************************************************************************/
35 /*@{*/
37 /**
38 * A GTK+ representation of a graphical window containing one or more
39 * conversations.
41 struct _PidginWindow
43 GtkWidget *window; /**< The window. */
44 GtkWidget *notebook; /**< The notebook of conversations. */
45 GList *gtkconvs;
47 struct
49 GtkWidget *menubar;
51 GtkWidget *view_log;
53 GtkWidget *send_file;
54 GtkWidget *add_pounce;
55 GtkWidget *get_info;
56 GtkWidget *invite;
58 GtkWidget *alias;
59 GtkWidget *block;
60 GtkWidget *unblock;
61 GtkWidget *add;
62 GtkWidget *remove;
64 GtkWidget *insert_link;
65 GtkWidget *insert_image;
67 GtkWidget *logging;
68 GtkWidget *sounds;
69 GtkWidget *show_formatting_toolbar;
70 GtkWidget *show_timestamps;
71 GtkWidget *show_icon;
73 GtkWidget *send_to;
75 GtkWidget *tray;
77 GtkWidget *typing_icon;
79 GtkItemFactory *item_factory;
81 } menu;
83 struct
85 GtkWidget *search;
87 } dialogs;
89 /* Tab dragging stuff. */
90 gboolean in_drag;
91 gboolean in_predrag;
93 gint drag_tab;
95 gint drag_min_x, drag_max_x, drag_min_y, drag_max_y;
97 gint drag_motion_signal;
98 gint drag_leave_signal;
100 /* Media menu options. */
101 GtkWidget *audio_call;
102 GtkWidget *video_call;
103 GtkWidget *audio_video_call;
106 /*@}*/
108 /**************************************************************************
109 * @name GTK+ Conversation Window API
110 **************************************************************************/
111 /*@{*/
113 PidginWindow * pidgin_conv_window_new(void);
114 void pidgin_conv_window_destroy(PidginWindow *win);
115 GList *pidgin_conv_windows_get_list(void);
116 void pidgin_conv_window_show(PidginWindow *win);
117 void pidgin_conv_window_hide(PidginWindow *win);
118 void pidgin_conv_window_raise(PidginWindow *win);
119 void pidgin_conv_window_switch_gtkconv(PidginWindow *win, PidginConversation *gtkconv);
120 void pidgin_conv_window_add_gtkconv(PidginWindow *win, PidginConversation *gtkconv);
121 void pidgin_conv_window_remove_gtkconv(PidginWindow *win, PidginConversation *gtkconv);
122 PidginConversation *pidgin_conv_window_get_gtkconv_at_index(const PidginWindow *win, int index);
123 PidginConversation *pidgin_conv_window_get_active_gtkconv(const PidginWindow *win);
124 PurpleConversation *pidgin_conv_window_get_active_conversation(const PidginWindow *win);
125 gboolean pidgin_conv_window_is_active_conversation(const PurpleConversation *conv);
126 gboolean pidgin_conv_window_has_focus(PidginWindow *win);
127 PidginWindow *pidgin_conv_window_get_at_xy(int x, int y);
128 GList *pidgin_conv_window_get_gtkconvs(PidginWindow *win);
129 guint pidgin_conv_window_get_gtkconv_count(PidginWindow *win);
131 PidginWindow *pidgin_conv_window_first_with_type(PurpleConversationType type);
132 PidginWindow *pidgin_conv_window_last_with_type(PurpleConversationType type);
134 /*@}*/
136 /**************************************************************************
137 * @name GTK+ Conversation Placement API
138 **************************************************************************/
139 /*@{*/
141 typedef void (*PidginConvPlacementFunc)(PidginConversation *);
143 GList *pidgin_conv_placement_get_options(void);
144 void pidgin_conv_placement_add_fnc(const char *id, const char *name, PidginConvPlacementFunc fnc);
145 void pidgin_conv_placement_remove_fnc(const char *id);
146 const char *pidgin_conv_placement_get_name(const char *id);
147 PidginConvPlacementFunc pidgin_conv_placement_get_fnc(const char *id);
148 void pidgin_conv_placement_set_current_func(PidginConvPlacementFunc func);
149 PidginConvPlacementFunc pidgin_conv_placement_get_current_func(void);
150 void pidgin_conv_placement_place(PidginConversation *gtkconv);
152 /*@}*/
154 #endif /* _PIDGIN_CONVERSATION_WINDOW_H_ */