home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / include / pidgin / gtkconvwin.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-05-04  |  4.6 KB  |  149 lines

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