1 /* 2 * Nautilus-Actions 3 * A Nautilus extension which offers configurable context menu actions. 4 * 5 * Copyright (C) 2005 The GNOME Foundation 6 * Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS) 7 * Copyright (C) 2009-2014 Pierre Wieser and others (see AUTHORS) 8 * 9 * Nautilus-Actions 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. 13 * 14 * Nautilus-Actions 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 GNU 17 * General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with Nautilus-Actions; see the file COPYING. If not, see 21 * <http://www.gnu.org/licenses/>. 22 * 23 * Authors: 24 * Frederic Ruaudel <grumz@grumz.net> 25 * Rodrigo Moya <rodrigo@gnome-db.org> 26 * Pierre Wieser <pwieser@trychlos.org> 27 * ... and many others (see AUTHORS) 28 */ 29 30 #ifndef __BASE_DIALOG_H__ 31 #define __BASE_DIALOG_H__ 32 33 /** 34 * SECTION: base-dialog 35 * @title: BaseDialog 36 * @short_description: The BaseDialog dialog base class definition 37 * @include: base-dialog.h 38 * 39 * This class is derived from BaseWindow class, and serves as a base 40 * class for all Nautilus-Actions dialogs. 41 */ 42 43 #include "base-window.h" 44 45 G_BEGIN_DECLS 46 47 #define BASE_TYPE_DIALOG ( base_dialog_get_type()) 48 #define BASE_DIALOG( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, BASE_TYPE_DIALOG, BaseDialog )) 49 #define BASE_DIALOG_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, BASE_TYPE_DIALOG, BaseDialogClass )) 50 #define BASE_IS_DIALOG( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, BASE_TYPE_DIALOG )) 51 #define BASE_IS_DIALOG_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), BASE_TYPE_DIALOG )) 52 #define BASE_DIALOG_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), BASE_TYPE_DIALOG, BaseDialogClass )) 53 54 typedef struct _BaseDialogPrivate BaseDialogPrivate; 55 56 typedef struct { 57 /*< private >*/ 58 BaseWindow parent; 59 BaseDialogPrivate *private; 60 } 61 BaseDialog; 62 63 typedef struct _BaseDialogClassPrivate BaseDialogClassPrivate; 64 65 /** 66 * BaseDialogClass: 67 * @cancel: the dialog box is not validated. 68 * @ok: the dialog box is validated. 69 * 70 * This defines the virtual method a derived class may, should or must implement. 71 */ 72 typedef struct { 73 /*< private >*/ 74 BaseWindowClass parent; 75 BaseDialogClassPrivate *private; 76 77 /*< public >*/ 78 /** 79 * cancel: 80 * @dialog: this #BaseDialog instance. 81 * 82 * Invoked when the dialog box is closed without having been validated. 83 */ 84 void ( *cancel )( BaseDialog *dialog ); 85 86 /** 87 * ok: 88 * @dialog: this #BaseDialog instance. 89 * 90 * Invoked when the dialog box is validated. 91 */ 92 void ( *ok ) ( BaseDialog *dialog ); 93 } 94 BaseDialogClass; 95 96 GType base_dialog_get_type( void ); 97 98 G_END_DECLS 99 100 #endif /* __BASE_DIALOG_H__ */ 101