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 __NAUTILUS_ACTIONS_API_NA_OBJECT_ACTION_H__ 31 #define __NAUTILUS_ACTIONS_API_NA_OBJECT_ACTION_H__ 32 33 /** 34 * SECTION: object-action 35 * @title: NAObjectAction 36 * @short_description: The Action Class Definition 37 * @include: nautilus-actions/na-object-action.h 38 * 39 * This is the class which maintains data and properties of a &prodname; 40 * action. 41 * 42 * <note> 43 * <formalpara> 44 * <title>Edition status</title> 45 * <para> 46 * As a particular rule for a #NAObjectItem -derived class, 47 * a #NAObjectAction is considered modified as soon as any of 48 * its profiles has been modified itself 49 * (because they are saved as a whole). 50 * </para> 51 * </formalpara> 52 * </note> 53 */ 54 55 #include "na-object-item.h" 56 #include "na-object-profile.h" 57 58 G_BEGIN_DECLS 59 60 #define NA_TYPE_OBJECT_ACTION ( na_object_action_get_type()) 61 #define NA_OBJECT_ACTION( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, NA_TYPE_OBJECT_ACTION, NAObjectAction )) 62 #define NA_OBJECT_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, NA_TYPE_OBJECT_ACTION, NAObjectActionClass )) 63 #define NA_IS_OBJECT_ACTION( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, NA_TYPE_OBJECT_ACTION )) 64 #define NA_IS_OBJECT_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), NA_TYPE_OBJECT_ACTION )) 65 #define NA_OBJECT_ACTION_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), NA_TYPE_OBJECT_ACTION, NAObjectActionClass )) 66 67 typedef struct _NAObjectActionPrivate NAObjectActionPrivate; 68 69 typedef struct { 70 /*< private >*/ 71 NAObjectItem parent; 72 NAObjectActionPrivate *private; 73 } 74 NAObjectAction; 75 76 typedef struct _NAObjectActionClassPrivate NAObjectActionClassPrivate; 77 78 typedef struct { 79 /*< private >*/ 80 NAObjectItemClass parent; 81 NAObjectActionClassPrivate *private; 82 } 83 NAObjectActionClass; 84 85 GType na_object_action_get_type( void ); 86 87 NAObjectAction *na_object_action_new( void ); 88 NAObjectAction *na_object_action_new_with_profile( void ); 89 NAObjectAction *na_object_action_new_with_defaults( void ); 90 91 gchar *na_object_action_get_new_profile_name( const NAObjectAction *action ); 92 93 void na_object_action_attach_profile( NAObjectAction *action, NAObjectProfile *profile ); 94 void na_object_action_set_last_version( NAObjectAction *action ); 95 96 G_END_DECLS 97 98 #endif /* __NAUTILUS_ACTIONS_API_NA_OBJECT_ACTION_H__ */ 99