![]() |
Data Structures | |
struct | oyOption_s |
Option for rendering. More... | |
union | oyValue_u |
a value More... | |
struct | oyOptions_s |
generic OptionsOptions can be any flag or rendering intent and other informations needed to configure a process. The object contains a list of oyOption_s objects. More... | |
Enumerations | |
enum | oyOPTIONATTRIBUTE_e { , oyOPTIONATTRIBUTE_EDIT = 32, oyOPTIONATTRIBUTE_AUTOMATIC = 64 , oyOPTIONATTRIBUTE_FRONT = 256, oyOPTIONATTRIBUTE_DOUBLE = 512 } |
usage type The types of Oyranos default settings to include into the options set. So proofing makes no sense for toolkit widgets, but for advanced graphics displaying. All other Oyranos behaviour settings should be taken over untouched. More... | |
Functions | |
void | oyValue_u::oyValueCopy (oyValue_u *to, oyValue_u *from, oyVALUETYPE_e type, oyAlloc_f allocateFunc, oyDeAlloc_f deallocateFunc) |
copy a oyValue_u union | |
void | oyValue_u::oyValueClear (oyValue_u *v, oyVALUETYPE_e type, oyDeAlloc_f deallocateFunc) |
clear a oyValue_u union | |
void | oyValue_u::oyValueRelease (oyValue_u **v, oyVALUETYPE_e type, oyDeAlloc_f deallocateFunc) |
release a oyValue_u union | |
const char * | oyValue_u::oyValueTypeText (oyVALUETYPE_e type) |
obtain a short string about union type | |
oyOption_s * | oyOption_s::oyOption_New (oyObject_s object) |
new option | |
oyOption_s * | oyOption_s::oyOption_Copy (oyOption_s *option, oyObject_s object) |
copy or reference a option | |
int | oyOption_s::oyOption_Release (oyOption_s **obj) |
release a option | |
int | oyOption_s::oyOption_Clear (oyOption_s *s) |
clear a option | |
int | oyOption_s::oyOption_GetId (oyOption_s *obj) |
get the identification number of a option | |
char * | oyOption_s::oyOption_GetValueText (oyOption_s *obj, oyAlloc_f allocateFunc) |
get value as a text dump | |
const char * | oyOption_s::oyOption_GetText (oyOption_s *obj, oyNAME_e type) |
get a text dump | |
int | oyOption_s::oyOption_SetFromText (oyOption_s *obj, const char *text) |
set a option value from a string | |
oyOptions_s * | oyOptions_s::oyOptions_New (oyObject_s object) |
new options | |
oyOptions_s * | oyOptions_s::oyOptions_FromBoolean (oyOptions_s *set_a, oyOptions_s *set_b, oyBOOLEAN_e type, oyObject_s object) |
boolean operations on two sets of option | |
oyOptions_s * | oyOptions_s::oyOptions_FromText (const char *text, uint32_t flags, oyObject_s object) |
deserialise a text file to oyOptions_s data | |
int | oyOptions_s::oyOptions_DoFilter (oyOptions_s *s, uint32_t flags, const char *filter_type) |
filter the options | |
oyOptions_s * | oyOptions_s::oyOptions_ForFilter_ (oyFilter_s *filter, uint32_t flags, oyObject_s object) |
provide Oyranos behaviour settings | |
oyOptions_s * | oyOptions_s::oyOptions_ForFilter (const char *registration, const char *cmm, uint32_t flags, oyObject_s object) |
provide Oyranos behaviour settings | |
oyOptions_s * | oyOptions_s::oyOptions_Copy (oyOptions_s *obj, oyObject_s object) |
release options | |
int | oyOptions_s::oyOptions_Release (oyOptions_s **obj) |
release options | |
OYAPI int OYEXPORT | oyOptions_s::oyOptions_MoveIn (oyOptions_s *list, oyOption_s **obj, int pos) |
add a element to a Options list | |
OYAPI int OYEXPORT | oyOptions_s::oyOptions_ReleaseAt (oyOptions_s *list, int pos) |
release a element from a Options list | |
OYAPI oyOption_s *OYEXPORT | oyOptions_s::oyOptions_Get (oyOptions_s *list, int pos) |
get a element of a Options list | |
int | oyOptions_s::oyOptions_Add (oyOptions_s *options, oyOption_s *option, int pos, oyObject_s object) |
add a element to a Options list | |
const char * | oyOptions_s::oyOptions_GetText (oyOptions_s *options, oyNAME_e type) |
dump options to text | |
oyOption_s * | oyOptions_s::oyOptions_Find (oyOptions_s *options, const char *key) |
search for a certain option key | |
const char * | oyOptions_s::oyOptions_FindString (oyOptions_s *options, const char *key, const char *value) |
search for a certain option key and possibly value | |
int | oyOptions_s::oyOptions_SetFromText (oyOptions_s *obj, const char *key, const char *value) |
change a value |
enum oyOPTIONATTRIBUTE_e |
usage typeThe types of Oyranos default settings to include into the options set. So proofing makes no sense for toolkit widgets, but for advanced graphics displaying. All other Oyranos behaviour settings should be taken over untouched.
int oyOption_Clear | ( | oyOption_s * | s | ) | [related, inherited] |
clear a option
Function oyOption_Clear
References oyOption_s::flags, oyOption_s::oy_, oyValue_u::oyValueRelease(), oyOption_s::registration, oyOption_s::value, and oyOption_s::value_type.
Referenced by oyOption_s::oyOption_Release().
oyOption_s * oyOption_Copy | ( | oyOption_s * | option, | |
oyObject_s | object | |||
) | [related, inherited] |
copy or reference a option
Function oyOption_Copy
References oyOption_s::oy_, and oyObject_s::oyObject_Copy().
Referenced by oyOption_s::oyOption_New(), oyOptions_s::oyOptions_Add(), and oyOptions_s::oyOptions_Find().
int oyOption_GetId | ( | oyOption_s * | obj | ) | [related, inherited] |
get the identification number of a option
Function oyOption_GetId
References oyOption_s::id.
const char * oyOption_GetText | ( | oyOption_s * | obj, | |
oyNAME_e | type | |||
) | [related, inherited] |
get a text dump
Function oyOption_GetText
Only oyOption_s::value is written.
The type argument should select the following string in return:
[in,out] | obj | the option |
type | oyNAME_NICK is equal to an ID |
References oyOption_s::oy_, oyNAME_DESCRIPTION, oyNAME_NAME, oyNAME_NICK, oyObject_s::oyObject_GetName(), oyObject_s::oyObject_SetName(), oyOption_s::oyOption_GetValueText(), oyOption_s::registration, and oyOption_s::value.
Referenced by oyOptions_s::oyOptions_DoFilter(), and oyOptions_s::oyOptions_GetText().
char * oyOption_GetValueText | ( | oyOption_s * | obj, | |
oyAlloc_f | allocateFunc | |||
) | [related, inherited] |
get value as a text dump
Function oyOption_GetValueText
obj | the option | |
allocateFunc | user allocator |
References oyValue_u::dbl_list, oyValue_u::int32_list, oyStruct_s::oy_, oyValue_u::oy_struct, oyNAME_NICK, oyObject_s::oyObject_GetName(), oyOBJECT_STRUCT_LIST_S, oyStructList_Count(), oyVAL_DOUBLE, oyValue_u::string, oyValue_u::string_list, oyOption_s::value, and oyOption_s::value_type.
Referenced by oyOption_s::oyOption_GetText().
oyOption_s * oyOption_New | ( | oyObject_s | object | ) | [related, inherited] |
new option
Function oyOption_New
References oyObject_s::oyObject_NewFrom(), oyOBJECT_OPTION_S, oyObject_s::oyObject_SetParent(), oyOption_s::oyOption_Copy(), oyOption_s::oyOption_Release(), and oyOption_s::release.
int oyOption_Release | ( | oyOption_s ** | obj | ) | [related, inherited] |
release a option
Function oyOption_Release
References oyOption_s::id, oyOption_s::oy_, oyOBJECT_OPTION_S, oyObject_s::oyObject_Release(), oyOption_s::oyOption_Clear(), and oyOption_s::type_.
Referenced by oyOption_s::oyOption_New(), oyOptions_s::oyOptions_Add(), oyOptions_s::oyOptions_DoFilter(), oyOptions_s::oyOptions_Find(), oyOptions_s::oyOptions_FindString(), oyOptions_s::oyOptions_ForFilter_(), oyOptions_s::oyOptions_FromBoolean(), oyOptions_s::oyOptions_GetText(), and oyOptions_s::oyOptions_SetFromText().
int oyOption_SetFromText | ( | oyOption_s * | obj, | |
const char * | text | |||
) | [related, inherited] |
set a option value from a string
Function oyOption_SetFromText
References oyOption_s::flags, oyOption_s::oy_, oyOPTIONATTRIBUTE_EDIT, oyValue_u::oyValueRelease(), oyValue_u::string, oyOption_s::value, and oyOption_s::value_type.
Referenced by oyOptions_s::oyOptions_DoFilter(), and oyOptions_s::oyOptions_SetFromText().
int oyOptions_Add | ( | oyOptions_s * | options, | |
oyOption_s * | option, | |||
int | pos, | |||
oyObject_s | object | |||
) | [related, inherited] |
add a element to a Options list
Function oyOptions_Add
We must not add any already listed option. A "shared" key has higher priority and substitutes a non "shared" one. (oyFILTER_REG_TOP)
Adding a new element without any checks is as simple as following code:
* tmp = oyOption_Copy( option, object ); * oyOptions_MoveIn( options, &tmp, -1 );
References oyFILTER_REG_OPTION, oyFILTER_REG_TOP, oyFilterRegistrationToText(), oyOption_s::oyOption_Copy(), oyOption_s::oyOption_Release(), oyOptions_s::oyOptions_Get(), oyOptions_s::oyOptions_MoveIn(), and oyOption_s::registration.
Referenced by oyOptions_s::oyOptions_DoFilter(), and oyOptions_s::oyOptions_FromBoolean().
oyOptions_s * oyOptions_Copy | ( | oyOptions_s * | obj, | |
oyObject_s | object | |||
) | [related, inherited] |
release options
Function oyOptions_Copy
References oyOptions_s::oy_, oyObject_s::oyObject_Copy(), oyOBJECT_OPTIONS_S, and oyOptions_s::type_.
Referenced by oyFilter_s::oyFilter_OptionsGet(), oyImage_s::oyImage_SetCritical(), oyOptions_s::oyOptions_FromBoolean(), and oyOptions_s::oyOptions_New().
int oyOptions_DoFilter | ( | oyOptions_s * | s, | |
uint32_t | flags, | |||
const char * | filter_type | |||
) | [related, inherited] |
filter the options
Function oyOptions_DoFilter
The returned options are read in from the Elektra settings and if thats not available from the inbuild defaults. The later can explicitely selected with oyOPTIONSOURCE_FILTER passed as flags argument. advanced options can be filtered out by adding oyOPTIONATTRIBUTE_ADVANCED.
Backends should handle the advanced options as well but shall normally not act upon them. The convention to set them zero, keeps them inactive.
On the front end side the CMM cache has to include them, as they will influence the hash sum generation. The question arrises, whether to include these options marked as non visible along the path or require the CMM cache code to check each time for them on cache lookup. The oyOption_s::flags is already in place. So we use it and do inclusion. Front end options can be filtered as they do not affect the CMM cache.
s | the options | |
[in] | flags | for inbuild defaults | oyOPTIONSOURCE_FILTER; for options marked as advanced | oyOPTIONATTRIBUTE_ADVANCED; for front end options | oyOPTIONATTRIBUTE_FRONT |
filter_type | the type level in a registration |
References oyOption_s::flags, oyOptions_s::list, oyOptions_s::oy_, oyFILTER_REG_TYPE, oyFilterRegistrationToText(), oyNAME_DESCRIPTION, oyOption_s::oyOption_GetText(), oyOption_s::oyOption_Release(), oyOption_s::oyOption_SetFromText(), oyOPTIONATTRIBUTE_EDIT, oyOPTIONATTRIBUTE_FRONT, oyOptions_s::oyOptions_Add(), oyOptions_s::oyOptions_Get(), oyOptions_s::oyOptions_New(), oyOptions_s::oyOptions_Release(), oyOPTIONSOURCE_FILTER, oyOPTIONSOURCE_USER, oyStructList_s::oyStructList_CopyFrom(), oyOption_s::registration, and oyOption_s::source.
Referenced by oyOptions_s::oyOptions_ForFilter_().
oyOption_s * oyOptions_Find | ( | oyOptions_s * | options, | |
const char * | key | |||
) | [related, inherited] |
search for a certain option key
Function oyOptions_Find
This function returns the first found option for a given key. The key is represented by the registration option level.
References oyFILTER_REG_OPTION, oyFilterRegistrationToText(), oyOBJECT_OPTION_S, oyOBJECT_OPTIONS_S, oyOption_s::oyOption_Copy(), oyOption_s::oyOption_Release(), oyOptions_s::oyOptions_Get(), oyOption_s::registration, oyOption_s::type_, and oyOptions_s::type_.
Referenced by oyOptions_s::oyOptions_SetFromText().
const char * oyOptions_FindString | ( | oyOptions_s * | options, | |
const char * | key, | |||
const char * | value | |||
) | [related, inherited] |
search for a certain option key and possibly value
Function oyOptions_FindString
This function returns the first found value for a given key. The key is represented by the oyOption_s::name::nick The returned string is valid along the livetime of the particular option value.
References oyFILTER_REG_OPTION, oyFilterRegistrationToText(), oyOBJECT_OPTION_S, oyOBJECT_OPTIONS_S, oyOption_s::oyOption_Release(), oyOptions_s::oyOptions_Get(), oyOption_s::registration, oyValue_u::string, oyValue_u::string_list, oyOption_s::type_, oyOptions_s::type_, oyOption_s::value, and oyOption_s::value_type.
oyOptions_s * oyOptions_ForFilter | ( | const char * | registration, | |
const char * | cmm, | |||
uint32_t | flags, | |||
oyObject_s | object | |||
) | [related, inherited] |
provide Oyranos behaviour settings
Function oyOptions_ForFilter
The returned options are read in from the Elektra settings and if thats not available from the inbuild defaults. The later can explicitely selected with oyOPTIONSOURCE_FILTER passed as flags argument. The key names map to the registration and XML syntax.
To obtain all front end options from a meta backend use:
* flags = oyOPTIONATTRIBUTE_ADVANCED | * oyOPTIONATTRIBUTE_FRONT | * OY_OPTIONSOURCE_META
[in] | registration | the filter registration to search for |
[in] | cmm | a CMM to match |
[in] | flags | for inbuild defaults | oyOPTIONSOURCE_FILTER; for options marked as advanced | oyOPTIONATTRIBUTE_ADVANCED | OY_OPTIONSOURCE_FILTER | OY_OPTIONSOURCE_META |
object | the optional object |
References oyFilter_s::oy_, oyFilter_s::oyFilter_Release(), oyFilterRegistrationToType(), oyOBJECT_CMM_API4_S, and oyOptions_s::oyOptions_ForFilter_().
oyOptions_s * oyOptions_ForFilter_ | ( | oyFilter_s * | filter, | |
uint32_t | flags, | |||
oyObject_s | object | |||
) | [related, inherited] |
provide Oyranos behaviour settings
Function oyOptions_ForFilter_
The returned options are read in from the Elektra settings and if thats not available from the inbuild defaults. The later can explicitely selected with oyOPTIONSOURCE_FILTER passed as flags argument. The key names map to the registration and XML syntax.
To obtain all front end options from a meta backend use:
* flags = oyOPTIONATTRIBUTE_ADVANCED | * oyOPTIONATTRIBUTE_FRONT | * OY_OPTIONSOURCE_META
[in] | filter | the filter |
[in] | flags | for inbuild defaults | oyOPTIONSOURCE_FILTER; for options marked as advanced | oyOPTIONATTRIBUTE_ADVANCED | OY_OPTIONSOURCE_FILTER | OY_OPTIONSOURCE_META |
object | the optional object |
Programm: 1. get filter and its type 2. get implementation for filter type 3. parse static common options from meta backend 4. parse static options from filter 5. merge both 6. get stored values from disk
References oyFilter_s::api4_, oyBOOLEAN_UNION, oyFILTER_REG_TYPE, oyFilterRegistrationToText(), oyOption_s::oyOption_Release(), oyOptions_s::oyOptions_DoFilter(), oyOptions_s::oyOptions_FromBoolean(), oyOptions_s::oyOptions_FromText(), oyOptions_s::oyOptions_Get(), oyOptions_s::oyOptions_Release(), oyOPTIONSOURCE_FILTER, oyFilter_s::registration_, and oyOption_s::source.
Referenced by oyFilter_s::oyFilter_New(), oyFilter_s::oyFilter_OptionsGet(), and oyOptions_s::oyOptions_ForFilter().
oyOptions_s * oyOptions_FromBoolean | ( | oyOptions_s * | set_a, | |
oyOptions_s * | set_b, | |||
oyBOOLEAN_e | type, | |||
oyObject_s | object | |||
) | [related, inherited] |
boolean operations on two sets of option
Function oyOptions_FromBoolean
[in] | set_a | options set A |
[in] | set_b | options set B |
[in] | type | the operation to perform |
object | the optional object |
References oyBOOLEAN_DIFFERENZ, oyBOOLEAN_UNION, oyFILTER_REG_OPTION, oyFilterRegistrationToText(), oyOption_s::oyOption_Release(), oyOptions_s::oyOptions_Add(), oyOptions_s::oyOptions_Copy(), oyOptions_s::oyOptions_Get(), oyOptions_s::oyOptions_New(), oyTextboolean_(), oyOption_s::registration, and oyOption_s::value_type.
Referenced by oyFilter_s::oyFilter_New(), and oyOptions_s::oyOptions_ForFilter_().
oyOptions_s * oyOptions_FromText | ( | const char * | text, | |
uint32_t | flags, | |||
oyObject_s | object | |||
) | [related, inherited] |
deserialise a text file to oyOptions_s data
Function oyOptions_FromText
This function is based on libxml2.
[in] | text | the text to process |
[in] | flags | for future use |
object | the optional object |
References oyOptions_s::oyOptions_New().
Referenced by oyOptions_s::oyOptions_ForFilter_().
OYAPI oyOption_s *OYEXPORT oyOptions_Get | ( | oyOptions_s * | list, | |
int | pos | |||
) | [related, inherited] |
get a element of a Options list
Function oyOptions_Get
[in,out] | list | the list |
pos | position |
References oyOptions_s::list, oyOBJECT_OPTION_S, oyOBJECT_OPTIONS_S, oyStructList_GetRefType(), and oyOptions_s::type_.
Referenced by oyOptions_s::oyOptions_Add(), oyOptions_s::oyOptions_DoFilter(), oyOptions_s::oyOptions_Find(), oyOptions_s::oyOptions_FindString(), oyOptions_s::oyOptions_ForFilter_(), oyOptions_s::oyOptions_FromBoolean(), and oyOptions_s::oyOptions_GetText().
const char * oyOptions_GetText | ( | oyOptions_s * | options, | |
oyNAME_e | type | |||
) | [related, inherited] |
dump options to text
Function oyOptions_GetText
The type argument should select the following string in return:
[in,out] | options | the option |
type | oyNAME_NICK is equal to an ID |
References oyOptions_s::oy_, oyObject_s::oyObject_GetName(), oyObject_s::oyObject_SetName(), oyOption_s::oyOption_GetText(), oyOption_s::oyOption_Release(), and oyOptions_s::oyOptions_Get().
OYAPI int OYEXPORT oyOptions_MoveIn | ( | oyOptions_s * | list, | |
oyOption_s ** | obj, | |||
int | pos | |||
) | [related, inherited] |
add a element to a Options list
Function oyOptions_MoveIn
[in] | list | list |
[in,out] | obj | list element |
pos | position |
References oyOptions_s::list, oyOBJECT_OPTION_S, oyOBJECT_OPTIONS_S, oyOptions_s::oyOptions_New(), oyOption_s::type_, and oyOptions_s::type_.
Referenced by oyOptions_s::oyOptions_Add().
oyOptions_s * oyOptions_New | ( | oyObject_s | object | ) | [related, inherited] |
new options
Function oyOptions_New
References oyObject_s::oyObject_NewFrom(), oyOBJECT_OPTIONS_S, oyObject_s::oyObject_SetParent(), oyOptions_s::oyOptions_Copy(), oyOptions_s::oyOptions_Release(), and oyOptions_s::release.
Referenced by oyOptions_s::oyOptions_DoFilter(), oyOptions_s::oyOptions_FromBoolean(), oyOptions_s::oyOptions_FromText(), and oyOptions_s::oyOptions_MoveIn().
int oyOptions_Release | ( | oyOptions_s ** | obj | ) | [related, inherited] |
release options
Function oyOptions_Release
References oyOptions_s::list, oyOptions_s::oy_, oyOBJECT_OPTIONS_S, oyObject_s::oyObject_Release(), and oyOptions_s::type_.
Referenced by oyOptions_s::oyOptions_DoFilter(), oyOptions_s::oyOptions_ForFilter_(), and oyOptions_s::oyOptions_New().
OYAPI int OYEXPORT oyOptions_ReleaseAt | ( | oyOptions_s * | list, | |
int | pos | |||
) | [related, inherited] |
release a element from a Options list
Function oyOptions_ReleaseAt
[in,out] | list | the list |
pos | position |
References oyOptions_s::list, oyOBJECT_OPTIONS_S, and oyOptions_s::type_.
int oyOptions_SetFromText | ( | oyOptions_s * | obj, | |
const char * | key, | |||
const char * | value | |||
) | [related, inherited] |
change a value
Function oyOptions_SetFromText
References oyOBJECT_OPTIONS_S, oyOption_s::oyOption_Release(), oyOption_s::oyOption_SetFromText(), oyOptions_s::oyOptions_Find(), and oyOptions_s::type_.
void oyValueClear | ( | oyValue_u * | v, | |
oyVALUETYPE_e | type, | |||
oyDeAlloc_f | deallocateFunc | |||
) | [related, inherited] |
clear a oyValue_u union
Function oyValueClear
References oyValue_u::int32_list, oyValue_u::oy_struct, oyVAL_DOUBLE, oyStruct_s::release, oyValue_u::string, and oyValue_u::string_list.
Referenced by oyValue_u::oyValueRelease().
void oyValueCopy | ( | oyValue_u * | to, | |
oyValue_u * | from, | |||
oyVALUETYPE_e | type, | |||
oyAlloc_f | allocateFunc, | |||
oyDeAlloc_f | deallocateFunc | |||
) | [related, inherited] |
copy a oyValue_u union
Function oyValueCopy
References oyStruct_s::copy, oyValue_u::dbl_list, oyValue_u::int32_list, oyStruct_s::oy_, oyValue_u::oy_struct, oyVAL_DOUBLE, oyStruct_s::release, oyValue_u::string, and oyValue_u::string_list.
void oyValueRelease | ( | oyValue_u ** | v, | |
oyVALUETYPE_e | type, | |||
oyDeAlloc_f | deallocateFunc | |||
) | [related, inherited] |
release a oyValue_u union
Function oyValueRelease
References oyValue_u::oyValueClear().
Referenced by oyOption_s::oyOption_Clear(), and oyOption_s::oyOption_SetFromText().
const char * oyValueTypeText | ( | oyVALUETYPE_e | type | ) | [related, inherited] |
obtain a short string about union type
Function oyValueTypeText
References oyVAL_DOUBLE.