]> www.fi.muni.cz Git - evince.git/blob - cut-n-paste/gedit-message-area/gedit-message-area.h
c53a800a792d5b059e578ad0eb82daa1e902b5ea
[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/gtkdialog.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                                          
97 void             gedit_message_area_add_action_widget   (GeditMessageArea *message_area,
98                                                          GtkWidget        *child,
99                                                          gint              response_id);
100                                                          
101 GtkWidget       *gedit_message_area_add_button          (GeditMessageArea *message_area,
102                                                          const gchar      *button_text,
103                                                          gint              response_id);
104                          
105 GtkWidget       *gedit_message_area_add_stock_button_with_text 
106                                                         (GeditMessageArea *message_area, 
107                                                          const gchar      *text, 
108                                                          const gchar      *stock_id, 
109                                                          gint              response_id);
110
111 void             gedit_message_area_add_buttons         (GeditMessageArea *message_area,
112                                                          const gchar      *first_button_text,
113                                                          ...);
114 void             gedit_message_area_add_buttons_valist  (GeditMessageArea *message_area,
115                                                          const gchar      *first_button_text,
116                                                          va_list           args);
117
118 void             gedit_message_area_set_response_sensitive 
119                                                         (GeditMessageArea *message_area,
120                                                          gint              response_id,
121                                                          gboolean          setting);
122 void             gedit_message_area_set_default_response 
123                                                         (GeditMessageArea *message_area,
124                                                          gint              response_id);
125
126 /* Emit response signal */
127 void             gedit_message_area_response            (GeditMessageArea *message_area,
128                                                          gint              response_id);
129
130 G_END_DECLS
131
132 #endif  /* __GEDIT_MESSAGE_AREA_H__  */