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 
00078 typedef struct {
00079     GtkVBox parent;
00080 
00083     GtkBox *contents;
00084 
00085     gpointer priv;
00086 } PidginMiniDialog;
00087 
00089 typedef struct {
00090     GtkBoxClass parent_class;
00091 
00092     void (*_purple_reserved1) (void);
00093     void (*_purple_reserved2) (void);
00094     void (*_purple_reserved3) (void);
00095     void (*_purple_reserved4) (void);
00096 } PidginMiniDialogClass;
00097 
00105 typedef void (*PidginMiniDialogCallback)(PidginMiniDialog *mini_dialog,
00106     GtkButton *button, gpointer user_data);
00107 
00109 GType pidgin_mini_dialog_get_type (void);
00110 
00115 PidginMiniDialog *pidgin_mini_dialog_new(const gchar *title,
00116     const gchar *description, const gchar *icon_name);
00117 
00122 void pidgin_mini_dialog_set_title(PidginMiniDialog *mini_dialog,
00123     const char *title);
00124 
00130 void pidgin_mini_dialog_set_description(PidginMiniDialog *mini_dialog,
00131     const char *description);
00132 
00137 void pidgin_mini_dialog_set_icon_name(PidginMiniDialog *mini_dialog,
00138     const char *icon_name);
00139 
00149 void pidgin_mini_dialog_add_button(PidginMiniDialog *mini_dialog,
00150     const char *text, PidginMiniDialogCallback clicked_cb,
00151     gpointer user_data);
00152 
00157 guint pidgin_mini_dialog_get_num_children(PidginMiniDialog *mini_dialog);
00158 
00159 G_END_DECLS
00160 
00161 #endif /* __PIDGIN_MINI_DIALOG_H__ */