3 * This file is part of gedit
5 * Copyright (C) 2005 - Paolo Maggi
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330,
20 * Boston, MA 02111-1307, USA.
24 * Modified by the gedit Team, 2005. See the AUTHORS file for a
25 * list of people on the gedit Team.
26 * See the ChangeLog files for a list of changes.
28 * $Id: gedit-message-area.h 5666 2007-06-29 19:52:25Z sfre $
31 #ifndef __GEDIT_MESSAGE_AREA_H__
32 #define __GEDIT_MESSAGE_AREA_H__
34 #include <gtk/gtkdialog.h>
39 * Type checking and casting macros
41 #define GEDIT_TYPE_MESSAGE_AREA (gedit_message_area_get_type())
42 #define GEDIT_MESSAGE_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GEDIT_TYPE_MESSAGE_AREA, GeditMessageArea))
43 #define GEDIT_MESSAGE_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GEDIT_TYPE_MESSAGE_AREA, GeditMessageAreaClass))
44 #define GEDIT_IS_MESSAGE_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GEDIT_TYPE_MESSAGE_AREA))
45 #define GEDIT_IS_MESSAGE_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEDIT_TYPE_MESSAGE_AREA))
46 #define GEDIT_MESSAGE_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GEDIT_TYPE_MESSAGE_AREA, GeditMessageAreaClass))
48 /* Private structure type */
49 typedef struct _GeditMessageAreaPrivate GeditMessageAreaPrivate;
52 * Main object structure
54 typedef struct _GeditMessageArea GeditMessageArea;
56 struct _GeditMessageArea
61 GeditMessageAreaPrivate *priv;
67 typedef struct _GeditMessageAreaClass GeditMessageAreaClass;
69 struct _GeditMessageAreaClass
71 GtkHBoxClass parent_class;
74 void (* response) (GeditMessageArea *message_area, gint response_id);
76 /* Keybinding signals */
77 void (* close) (GeditMessageArea *message_area);
79 /* Padding for future expansion */
80 void (*_gedit_reserved1) (void);
81 void (*_gedit_reserved2) (void);
87 GType gedit_message_area_get_type (void) G_GNUC_CONST;
89 GtkWidget *gedit_message_area_new (void);
91 GtkWidget *gedit_message_area_new_with_buttons (const gchar *first_button_text,
94 void gedit_message_area_set_contents (GeditMessageArea *message_area,
97 void gedit_message_area_add_action_widget (GeditMessageArea *message_area,
101 GtkWidget *gedit_message_area_add_button (GeditMessageArea *message_area,
102 const gchar *button_text,
105 GtkWidget *gedit_message_area_add_stock_button_with_text
106 (GeditMessageArea *message_area,
108 const gchar *stock_id,
111 void gedit_message_area_add_buttons (GeditMessageArea *message_area,
112 const gchar *first_button_text,
114 void gedit_message_area_add_buttons_valist (GeditMessageArea *message_area,
115 const gchar *first_button_text,
118 void gedit_message_area_set_response_sensitive
119 (GeditMessageArea *message_area,
122 void gedit_message_area_set_default_response
123 (GeditMessageArea *message_area,
126 /* Emit response signal */
127 void gedit_message_area_response (GeditMessageArea *message_area,
132 #endif /* __GEDIT_MESSAGE_AREA_H__ */