| Nautilus-Actions™ Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
#include <nautilus-actions/na-data-boxed.h> #define NA_DATA_BOXED_TYPE #define NA_DATA_BOXED (object) #define NA_IS_DATA_BOXED (object) NADataBoxed; NADataBoxed * na_data_boxed_new (const NADataDef *def); NADataDef * na_data_boxed_get_data_def (const NADataBoxed *boxed); GParamSpec * na_data_boxed_get_param_spec (const NADataDef *def); gboolean na_data_boxed_are_equal (const NADataBoxed *a,const NADataBoxed *b); gboolean na_data_boxed_is_default (const NADataBoxed *boxed); gboolean na_data_boxed_is_valid (const NADataBoxed *boxed); void na_data_boxed_dump (const NADataBoxed *boxed); void na_data_boxed_set_data_def (NADataBoxed *boxed,const NADataDef *def); gchar * na_data_boxed_get_as_string (const NADataBoxed *boxed); void * na_data_boxed_get_as_void (const NADataBoxed *boxed); void na_data_boxed_get_as_value (const NADataBoxed *boxed,GValue *value); void na_data_boxed_set_from_boxed (NADataBoxed *boxed,const NADataBoxed *value); void na_data_boxed_set_from_string (NADataBoxed *boxed,const gchar *value); void na_data_boxed_set_from_value (NADataBoxed *boxed,const GValue *value); void na_data_boxed_set_from_void (NADataBoxed *boxed,const void *value);
The object which encapsulates an elementary data of NAIFactoryObject. A NADataBoxed object has a type and a value.
Starting with version 3.1.0, NAFactoryDataType is deprecated in favour of NABoxed structure. New code should only use NABoxed structure and accessors.
#define NA_DATA_BOXED( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, NA_DATA_BOXED_TYPE, NADataBoxed ))
#define NA_IS_DATA_BOXED( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, NA_DATA_BOXED_TYPE ))
NADataBoxed * na_data_boxed_new (const NADataDef *def);
na_data_boxed_new is deprecated and should not be used in newly-written code. 3.1.0
|
the NADataDef definition structure for this boxed. |
Returns : |
a newly allocated NADataBoxed. |
Since 2.30
NADataDef * na_data_boxed_get_data_def (const NADataBoxed *boxed);
na_data_boxed_get_data_def is deprecated and should not be used in newly-written code. 3.1.0
|
this NADataBoxed object. |
Returns : |
a pointer to the NADataDef structure attached to the object.
Should never be NULL.
|
Since 2.30
GParamSpec * na_data_boxed_get_param_spec (const NADataDef *def);
na_data_boxed_get_param_spec is deprecated and should not be used in newly-written code. 3.1.0
|
a NADataDef definition structure. |
Returns : |
a GParamSpec structure. |
Since 2.30
gboolean na_data_boxed_are_equal (const NADataBoxed *a,const NADataBoxed *b);
na_data_boxed_are_equal is deprecated and should not be used in newly-written code. 3.1.0
|
the first NADataBoxed object. |
|
the second NADataBoxed object. |
Returns : |
TRUE if the two boxeds are equal, FALSE else.
|
Since 2.30
gboolean na_data_boxed_is_default (const NADataBoxed *boxed);
na_data_boxed_is_default is deprecated and should not be used in newly-written code. 3.1.0
|
this NADataBoxed object. |
Returns : |
TRUE if the NADataBoxed holds its default value,
FALSE else.
|
Since 2.30
gboolean na_data_boxed_is_valid (const NADataBoxed *boxed);
na_data_boxed_is_valid is deprecated and should not be used in newly-written code. 3.1.0
|
the NADataBoxed object whose validity is to be checked. |
Returns : |
TRUE if the boxed is valid, FALSE else.
|
Since 2.30
void na_data_boxed_dump (const NADataBoxed *boxed);
na_data_boxed_dump is deprecated and should not be used in newly-written code. 3.1.0
Dump the content of boxed.
|
this NADataBoxed object. |
Since 2.30
void na_data_boxed_set_data_def (NADataBoxed *boxed,const NADataDef *def);
na_data_boxed_set_data_def is deprecated and should not be used in newly-written code. 3.1.0
Changes the NADataDef a boxed points to:
-> the new type must be the same that the previous one.
-> value is unchanged.
|
this NADataBoxed object. |
|
the new NADataDef to be set. |
Since 2.30
gchar * na_data_boxed_get_as_string (const NADataBoxed *boxed);
na_data_boxed_get_as_string is deprecated and should not be used in newly-written code. 3.1.0
|
the NADataBoxed whose value is to be set. |
Returns : |
the value of the boxed, as a newly allocated string which
should be g_free() by the caller.
|
Since 2.30
void * na_data_boxed_get_as_void (const NADataBoxed *boxed);
na_data_boxed_get_as_void is deprecated and should not be used in newly-written code. 3.1.0
|
the NADataBoxed whose value is to be set. |
Returns : |
the content of the boxed.
If of type NAFD_TYPE_STRING, NAFD_TYPE_LOCALE_STRING OR
NAFD_TYPE_STRING_LIST, then the content is returned in a newly
allocated value, which should be released by the caller.
|
Since 2.30
void na_data_boxed_get_as_value (const NADataBoxed *boxed,GValue *value);
na_data_boxed_get_as_value is deprecated and should not be used in newly-written code. 3.1.0
Setup value with the content of the boxed.
|
the NADataBoxed whose value is to be set. |
|
the string to be set. |
Since 2.30
void na_data_boxed_set_from_boxed (NADataBoxed *boxed,const NADataBoxed *value);
na_data_boxed_set_from_boxed is deprecated and should not be used in newly-written code. 3.1.0
Copy value from value to boxed.
|
the NADataBoxed whose value is to be set. |
|
the source NADataBoxed. |
Since 2.30
void na_data_boxed_set_from_string (NADataBoxed *boxed,const gchar *value);
na_data_boxed_set_from_string is deprecated and should not be used in newly-written code. 3.1.0
Evaluates the value and set it to the boxed.
|
the NADataBoxed whose value is to be set. |
|
the string to be set. |
Since 2.30
void na_data_boxed_set_from_value (NADataBoxed *boxed,const GValue *value);
na_data_boxed_set_from_value is deprecated and should not be used in newly-written code. 3.1.0
Evaluates the value and set it to the boxed.
|
the NADataBoxed whose value is to be set. |
|
the value whose content is to be got. |
Since 2.30
void na_data_boxed_set_from_void (NADataBoxed *boxed,const void *value);
na_data_boxed_set_from_void is deprecated and should not be used in newly-written code. 3.1.0
Evaluates the value and set it to the boxed.
|
the NADataBoxed whose value is to be set. |
|
the value whose content is to be got. |
Since 2.30