Update copyright message
[nautilus-actions.git] / src / nact / base-assistant.h
blob2beaaac4852090e2faab1a9ae35097bdf2ebb36e
1 /*
2 * Nautilus Actions
3 * A Nautilus extension which offers configurable context menu actions.
5 * Copyright (C) 2005 The GNOME Foundation
6 * Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
7 * Copyright (C) 2009, 2010, 2011 Pierre Wieser and others (see AUTHORS)
9 * This Program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * This Program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public
20 * License along with this Library; see the file COPYING. If not,
21 * write to the Free Software Foundation, Inc., 59 Temple Place,
22 * Suite 330, Boston, MA 02111-1307, USA.
24 * Authors:
25 * Frederic Ruaudel <grumz@grumz.net>
26 * Rodrigo Moya <rodrigo@gnome-db.org>
27 * Pierre Wieser <pwieser@trychlos.org>
28 * ... and many others (see AUTHORS)
31 #ifndef __BASE_ASSISTANT_H__
32 #define __BASE_ASSISTANT_H__
34 /**
35 * SECTION: base_assistant
36 * @short_description: #BaseAssistant class definition.
37 * @include: nact/base-assistant.h
39 * This class is derived from BaseWindow class, and serves as a base
40 * class for all Nautilus Actions assistants.
42 * Note: as a work-around to #589745 (Apply message in GtkAssistant),
43 * we may trigger "on_assistant_apply" function from the
44 * "on_prepare_message" handler.
45 * The provided patch has been applied on 2009-08-07, and released in
46 * Gtk+ 2.17.7. So, this work-around will can be safely removed when
47 * minimal Gtk+ version will be 2.18 or later.
50 #include "base-window.h"
52 G_BEGIN_DECLS
54 #define BASE_ASSISTANT_TYPE ( base_assistant_get_type())
55 #define BASE_ASSISTANT( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, BASE_ASSISTANT_TYPE, BaseAssistant ))
56 #define BASE_ASSISTANT_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, BASE_ASSISTANT_TYPE, BaseAssistantClass ))
57 #define BASE_IS_ASSISTANT( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, BASE_ASSISTANT_TYPE ))
58 #define BASE_IS_ASSISTANT_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), BASE_ASSISTANT_TYPE ))
59 #define BASE_ASSISTANT_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), BASE_ASSISTANT_TYPE, BaseAssistantClass ))
61 typedef struct BaseAssistantPrivate BaseAssistantPrivate;
63 typedef struct {
64 BaseWindow parent;
65 BaseAssistantPrivate *private;
67 BaseAssistant;
69 typedef struct BaseAssistantClassPrivate BaseAssistantClassPrivate;
71 typedef struct {
72 BaseWindowClass parent;
73 BaseAssistantClassPrivate *private;
75 /**
76 * apply:
77 * @window: this #BaseAssistance instance.
79 void ( *apply ) ( BaseAssistant *window, GtkAssistant *assistant );
81 /**
82 * cancel:
83 * @window: this #BaseAssistance instance.
85 void ( *cancel ) ( BaseAssistant *window, GtkAssistant *assistant );
87 /**
88 * close:
89 * @window: this #BaseAssistance instance.
91 void ( *close ) ( BaseAssistant *window, GtkAssistant *assistant );
93 /**
94 * prepare:
95 * @window: this #BaseAssistance instance.
97 void ( *prepare )( BaseAssistant *window, GtkAssistant *assistant, GtkWidget *page );
99 BaseAssistantClass;
102 * %BASE_ASSISTANT_PROP_CANCEL_ON_ESCAPE:
104 * Does the assistant cancel its execution when the user hits the
105 * 'Escape' key ?
107 * Defaults to %FALSE.
109 #define BASE_ASSISTANT_PROP_CANCEL_ON_ESCAPE "base-assistant-cancel-on-escape"
112 * %BASE_ASSISTANT_PROP_WARN_ON_ESCAPE:
114 * Does the user be warned when he/she quits the assistant by hitting
115 * the 'Escape' key ? This is only used when previous property
116 * %BASE_ASSISTANT_PROP_CANCEL_ON_ESCAPE is set to %TRUE.
118 * Defaults to %FALSE.
120 #define BASE_ASSISTANT_PROP_WARN_ON_ESCAPE "base-assistant-warn-on-escape"
123 * %BASE_ASSISTANT_PROP_WARN_ON_CANCEL:
125 * Does the user be warned when he/she cancels the assistant ?
127 * Defaults to %FALSE.
129 #define BASE_ASSISTANT_PROP_WARN_ON_CANCEL "base-assistant-warn-on-cancel"
131 GType base_assistant_get_type( void );
133 void base_assistant_set_cancel_on_esc( BaseAssistant *window, gboolean cancel );
134 void base_assistant_set_warn_on_esc( BaseAssistant *window, gboolean warn_esc );
135 void base_assistant_set_warn_on_cancel( BaseAssistant *window, gboolean warn_cancel );
137 G_END_DECLS
139 #endif /* __BASE_ASSISTANT_H__ */