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/gtkvbox.h>
00032 #include <gtk/gtklabel.h>
00033 
00034 G_BEGIN_DECLS
00035 
00036 #define PIDGIN_TYPE_MINI_DIALOG pidgin_mini_dialog_get_type()
00037 
00038 #define PIDGIN_MINI_DIALOG(obj) \
00039   (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
00040   PIDGIN_TYPE_MINI_DIALOG, PidginMiniDialog))
00041 
00042 #define PIDGIN_MINI_DIALOG_CLASS(klass) \
00043   (G_TYPE_CHECK_CLASS_CAST ((klass), \
00044   PIDGIN_TYPE_MINI_DIALOG, PidginMiniDialogClass))
00045 
00046 #define PIDGIN_IS_MINI_DIALOG(obj) \
00047   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
00048   PIDGIN_TYPE_MINI_DIALOG))
00049 
00050 #define PIDGIN_IS_MINI_DIALOG_CLASS(klass) \
00051   (G_TYPE_CHECK_CLASS_TYPE ((klass), \
00052   PIDGIN_TYPE_MINI_DIALOG))
00053 
00054 #define PIDGIN_MINI_DIALOG_GET_CLASS(obj) \
00055   (G_TYPE_INSTANCE_GET_CLASS ((obj), \
00056   PIDGIN_TYPE_MINI_DIALOG, PidginMiniDialogClass))
00057 
00079 typedef struct {
00080     GtkVBox parent;
00081 
00084     GtkBox *contents;
00085 
00086     gpointer priv;
00087 } PidginMiniDialog;
00088 
00090 typedef struct {
00091     GtkBoxClass parent_class;
00092 
00093     void (*_purple_reserved1) (void);
00094     void (*_purple_reserved2) (void);
00095     void (*_purple_reserved3) (void);
00096     void (*_purple_reserved4) (void);
00097 } PidginMiniDialogClass;
00098 
00106 typedef void (*PidginMiniDialogCallback)(PidginMiniDialog *mini_dialog,
00107     GtkButton *button, gpointer user_data);
00108 
00110 GType pidgin_mini_dialog_get_type (void);
00111 
00116 PidginMiniDialog *pidgin_mini_dialog_new(const gchar *title,
00117     const gchar *description, const gchar *icon_name);
00118 
00123 void pidgin_mini_dialog_set_title(PidginMiniDialog *mini_dialog,
00124     const char *title);
00125 
00131 void pidgin_mini_dialog_set_description(PidginMiniDialog *mini_dialog,
00132     const char *description);
00133 
00138 void pidgin_mini_dialog_set_icon_name(PidginMiniDialog *mini_dialog,
00139     const char *icon_name);
00140 
00150 void pidgin_mini_dialog_add_button(PidginMiniDialog *mini_dialog,
00151     const char *text, PidginMiniDialogCallback clicked_cb,
00152     gpointer user_data);
00153 
00158 guint pidgin_mini_dialog_get_num_children(PidginMiniDialog *mini_dialog);
00159 
00160 G_END_DECLS
00161 
00162 #endif /* __PIDGIN_MINI_DIALOG_H__ */