]> www.fi.muni.cz Git - evince.git/blob - cut-n-paste/gedit-message-area/gedit-message-area.h
aaa97a534a36f61fd0d379cb4316482a020dffbc
[evince.git] / cut-n-paste / gedit-message-area / gedit-message-area.h
1 /*
2  * gedit-message-area.h
3  * This file is part of gedit
4  *
5  * Copyright (C) 2005 - Paolo Maggi 
6  *
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.
11  *
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.
16  *
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.
21  */
22  
23 /*
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. 
27  *
28  * $Id: gedit-message-area.h 5666 2007-06-29 19:52:25Z sfre $
29  */
30
31 #ifndef __GEDIT_MESSAGE_AREA_H__
32 #define __GEDIT_MESSAGE_AREA_H__
33
34 #include <gtk/gtk.h>
35
36 G_BEGIN_DECLS
37
38 /*
39  * Type checking and casting macros
40  */
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))
47
48 /* Private structure type */
49 typedef struct _GeditMessageAreaPrivate GeditMessageAreaPrivate;
50
51 /*
52  * Main object structure
53  */
54 typedef struct _GeditMessageArea GeditMessageArea;
55
56 struct _GeditMessageArea 
57 {
58         GtkHBox parent;
59
60         /*< private > */
61         GeditMessageAreaPrivate *priv;
62 };
63
64 /*
65  * Class definition
66  */
67 typedef struct _GeditMessageAreaClass GeditMessageAreaClass;
68
69 struct _GeditMessageAreaClass 
70 {
71         GtkHBoxClass parent_class;
72
73         /* Signals */
74         void (* response) (GeditMessageArea *message_area, gint response_id);
75
76         /* Keybinding signals */
77         void (* close)    (GeditMessageArea *message_area);
78
79         /* Padding for future expansion */
80         void (*_gedit_reserved1) (void);
81         void (*_gedit_reserved2) (void);        
82 };
83
84 /*
85  * Public methods
86  */
87 GType            gedit_message_area_get_type            (void) G_GNUC_CONST;
88
89 GtkWidget       *gedit_message_area_new                 (void);
90
91 GtkWidget       *gedit_message_area_new_with_buttons    (const gchar      *first_button_text,
92                                                          ...);
93
94 void             gedit_message_area_set_contents        (GeditMessageArea *message_area,
95                                                          GtkWidget        *contents);
96 GtkWidget       *gedit_message_area_get_contents        (GeditMessageArea *message_area);
97                                          
98 void             gedit_message_area_add_action_widget   (GeditMessageArea *message_area,
99                                                          GtkWidget        *child,
100                                                          gint              response_id);
101                                                          
102 GtkWidget       *gedit_message_area_add_button          (GeditMessageArea *message_area,
103                                                          const gchar      *button_text,
104                                                          gint              response_id);
105                          
106 GtkWidget       *gedit_message_area_add_stock_button_with_text 
107                                                         (GeditMessageArea *message_area, 
108                                                          const gchar      *text, 
109                                                          const gchar      *stock_id, 
110                                                          gint              response_id);
111
112 void             gedit_message_area_add_buttons         (GeditMessageArea *message_area,
113                                                          const gchar      *first_button_text,
114                                                          ...);
115 void             gedit_message_area_add_buttons_valist  (GeditMessageArea *message_area,
116                                                          const gchar      *first_button_text,
117                                                          va_list           args);
118
119 void             gedit_message_area_set_response_sensitive 
120                                                         (GeditMessageArea *message_area,
121                                                          gint              response_id,
122                                                          gboolean          setting);
123 void             gedit_message_area_set_default_response 
124                                                         (GeditMessageArea *message_area,
125                                                          gint              response_id);
126
127 /* Emit response signal */
128 void             gedit_message_area_response            (GeditMessageArea *message_area,
129                                                          gint              response_id);
130
131 G_END_DECLS
132
133 #endif  /* __GEDIT_MESSAGE_AREA_H__  */