minidialog.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 
00027 #ifndef __PIDGIN_MINI_DIALOG_H__
00028 #define __PIDGIN_MINI_DIALOG_H__
00029 
00030 #include <glib-object.h>
00031 #include <gtk/gtk.h>
00032 
00033 G_BEGIN_DECLS
00034 
00035 #define PIDGIN_TYPE_MINI_DIALOG pidgin_mini_dialog_get_type()
00036 
00037 #define PIDGIN_MINI_DIALOG(obj) \
00038   (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
00039   PIDGIN_TYPE_MINI_DIALOG, PidginMiniDialog))
00040 
00041 #define PIDGIN_MINI_DIALOG_CLASS(klass) \
00042   (G_TYPE_CHECK_CLASS_CAST ((klass), \
00043   PIDGIN_TYPE_MINI_DIALOG, PidginMiniDialogClass))
00044 
00045 #define PIDGIN_IS_MINI_DIALOG(obj) \
00046   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
00047   PIDGIN_TYPE_MINI_DIALOG))
00048 
00049 #define PIDGIN_IS_MINI_DIALOG_CLASS(klass) \
00050   (G_TYPE_CHECK_CLASS_TYPE ((klass), \
00051   PIDGIN_TYPE_MINI_DIALOG))
00052 
00053 #define PIDGIN_MINI_DIALOG_GET_CLASS(obj) \
00054   (G_TYPE_INSTANCE_GET_CLASS ((obj), \
00055   PIDGIN_TYPE_MINI_DIALOG, PidginMiniDialogClass))
00056 
00080 typedef struct {
00081     GtkVBox parent;
00082 
00085     GtkBox *contents;
00086 
00087     gpointer priv;
00088 } PidginMiniDialog;
00089 
00091 typedef struct {
00092     GtkBoxClass parent_class;
00093 
00094     void (*_purple_reserved1) (void);
00095     void (*_purple_reserved2) (void);
00096     void (*_purple_reserved3) (void);
00097     void (*_purple_reserved4) (void);
00098 } PidginMiniDialogClass;
00099 
00107 typedef void (*PidginMiniDialogCallback)(PidginMiniDialog *mini_dialog,
00108     GtkButton *button, gpointer user_data);
00109 
00111 GType pidgin_mini_dialog_get_type (void);
00112 
00117 PidginMiniDialog *pidgin_mini_dialog_new(const gchar *title,
00118     const gchar *description, const gchar *icon_name);
00119 
00124 PidginMiniDialog *pidgin_mini_dialog_new_with_custom_icon(const gchar *title,
00125     const gchar *description, GdkPixbuf *custom_icon);
00126 
00131 void pidgin_mini_dialog_set_title(PidginMiniDialog *mini_dialog,
00132     const char *title);
00133 
00139 void pidgin_mini_dialog_set_description(PidginMiniDialog *mini_dialog,
00140     const char *description);
00141 
00145 void pidgin_mini_dialog_enable_description_markup(PidginMiniDialog *mini_dialog);
00146 
00150 gboolean pidgin_mini_dialog_links_supported(void);
00151 
00157 void pidgin_mini_dialog_set_link_callback(PidginMiniDialog *mini_dialog, GCallback cb, gpointer user_data);
00158 
00163 void pidgin_mini_dialog_set_icon_name(PidginMiniDialog *mini_dialog,
00164     const char *icon_name);
00165 
00170 void pidgin_mini_dialog_set_custom_icon(PidginMiniDialog *mini_dialog,
00171     GdkPixbuf *custom_icon);
00172 
00182 void pidgin_mini_dialog_add_button(PidginMiniDialog *mini_dialog,
00183     const char *text, PidginMiniDialogCallback clicked_cb,
00184     gpointer user_data);
00185 
00189 void pidgin_mini_dialog_add_non_closing_button(PidginMiniDialog *mini_dialog,
00190     const char *text, PidginMiniDialogCallback clicked_cb,
00191     gpointer user_data);
00192 
00197 guint pidgin_mini_dialog_get_num_children(PidginMiniDialog *mini_dialog);
00198 
00199 G_END_DECLS
00200 
00201 #endif /* __PIDGIN_MINI_DIALOG_H__ */