README: add deprecation notice
[nautilus-actions.git] / src / api / fma-data-boxed.h
blob881771b59a7291af79ae9f1257d47bef2f014237
1 /*
2 * FileManager-Actions
3 * A file-manager extension which offers configurable context menu actions.
5 * Copyright (C) 2005 The GNOME Foundation
6 * Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
7 * Copyright (C) 2009-2015 Pierre Wieser and others (see AUTHORS)
9 * FileManager-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.
14 * FileManager-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.
19 * You should have received a copy of the GNU General Public License
20 * along with FileManager-Actions; see the file COPYING. If not, see
21 * <http://www.gnu.org/licenses/>.
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)
30 #ifndef __FILEMANAGER_ACTIONS_API_DATA_BOXED_H__
31 #define __FILEMANAGER_ACTIONS_API_DATA_BOXED_H__
33 /**
34 * SECTION: data-boxed
35 * @title: FMADataBoxed
36 * @short_description: The Data Factory Element Class Definition
37 * @include: filemanager-actions/fma-data-boxed.h
39 * The object which encapsulates an elementary data of #FMAIFactoryObject.
40 * A #FMADataBoxed object has a type and a value.
42 * #FMADataBoxed class is derived from #FMABoxed one, and implements the same
43 * types that those defined in fma-data-types.h.
45 * Additionally, #FMADataBoxed class holds the #FMADataDef data definition
46 * suitable for a FMAFactoryObject object. It such provides default value
47 * and validity status.
49 * Since: 2.30
52 #include <glib-object.h>
54 #include "fma-boxed.h"
55 #include "fma-data-def.h"
57 G_BEGIN_DECLS
59 #define FMA_TYPE_DATA_BOXED ( fma_data_boxed_get_type())
60 #define FMA_DATA_BOXED( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TYPE_DATA_BOXED, FMADataBoxed ))
61 #define FMA_DATA_BOXED_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, FMA_TYPE_DATA_BOXED, FMADataBoxedClass ))
62 #define FMA_IS_DATA_BOXED( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_DATA_BOXED ))
63 #define FMA_IS_DATA_BOXED_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), FMA_TYPE_DATA_BOXED ))
64 #define FMA_DATA_BOXED_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), FMA_TYPE_DATA_BOXED, FMADataBoxedClass ))
66 typedef struct _FMADataBoxedPrivate FMADataBoxedPrivate;
68 typedef struct {
69 /*< private >*/
70 FMABoxed parent;
71 FMADataBoxedPrivate *private;
73 FMADataBoxed;
75 typedef struct _FMADataBoxedClassPrivate FMADataBoxedClassPrivate;
77 typedef struct {
78 /*< private >*/
79 FMABoxedClass parent;
80 FMADataBoxedClassPrivate *private;
82 FMADataBoxedClass;
84 GType fma_data_boxed_get_type ( void );
86 FMADataBoxed *fma_data_boxed_new ( const FMADataDef *def );
88 const FMADataDef *fma_data_boxed_get_data_def ( const FMADataBoxed *boxed );
89 void fma_data_boxed_set_data_def ( FMADataBoxed *boxed, const FMADataDef *def );
91 GParamSpec *fma_data_boxed_get_param_spec ( const FMADataDef *def );
93 gboolean fma_data_boxed_is_default ( const FMADataBoxed *boxed );
94 gboolean fma_data_boxed_is_valid ( const FMADataBoxed *boxed );
96 /* These functions are deprecated starting with 3.1.0
98 #ifdef FMA_ENABLE_DEPRECATED
99 gboolean fma_data_boxed_are_equal ( const FMADataBoxed *a, const FMADataBoxed *b );
100 void fma_data_boxed_dump ( const FMADataBoxed *boxed );
101 gchar *fma_data_boxed_get_as_string ( const FMADataBoxed *boxed );
102 void fma_data_boxed_get_as_value ( const FMADataBoxed *boxed, GValue *value );
103 void *fma_data_boxed_get_as_void ( const FMADataBoxed *boxed );
104 void fma_data_boxed_set_from_boxed ( FMADataBoxed *boxed, const FMADataBoxed *value );
105 void fma_data_boxed_set_from_string( FMADataBoxed *boxed, const gchar *value );
106 void fma_data_boxed_set_from_value ( FMADataBoxed *boxed, const GValue *value );
107 void fma_data_boxed_set_from_void ( FMADataBoxed *boxed, const void *value );
108 #endif /* FMA_ENABLE_DEPRECATED */
110 G_END_DECLS
112 #endif /* __FILEMANAGER_ACTIONS_API_DATA_BOXED_H__ */