Values Handling
Description: C source code API documentation for the Oyranos project.
Keywords: Oyranos,Color Management,Color Management,ICC,CMS,C,doxygen,API,documentation

| Oyranos Color Management System API - Version 0.9.6

Data Structures | Macros | Enumerations | Functions
Values Handling
Miscellaneous

Manipulate and abstract values. More...

Collaboration diagram for Values Handling:

## Data Structures
struct | oyBlob_s
| A data blob object. More...
struct | oyConfig_s
| A group of options for a device. More...
struct | oyConfigs_s
| A Configs list. More...
union | oyValue_u
| a value More...
struct | oyOption_s
| Option object. More...
struct | oyOptions_s
| generic Options More...

## Macros
#define | OY_CREATE_NEW 0x02
#define | OY_ADD_ALWAYS 0x04
#define | OY_MATCH_KEY 0x08
#define | OY_SELECT_FILTER 2048
| select from filter More...
#define | OY_SELECT_COMMON 4096
| select from policySelect typical from a associatable oyCMMapi9_s type of filter for providing common options. More...

## Enumerations
enum | oyOPTIONATTRIBUTE_e { oyOPTIONATTRIBUTE_BASIC = 0, oyOPTIONATTRIBUTE_EDIT = 32, oyOPTIONATTRIBUTE_AUTOMATIC = 64, oyOPTIONATTRIBUTE_ADVANCED = 128, oyOPTIONATTRIBUTE_FRONT = 256, oyOPTIONATTRIBUTE_DOUBLE = 512 }
| 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. More...

## Functions
int | oyDbHandlingReady (void)
| tell if DB handling is ready More...
int | oyDbHandlingSet (const oyDbAPI_s *db_api)
| set DB functions for persistent settingsBe careful to set the APIs only before any call to the oyDB_s functions. Otherwise the behaviour is undefined. More...
int | oyGetPersistentStrings (const char *top_key_name)
| cache strings from DB More...
char * | oyGetPersistentString (const char *key_name, uint32_t flags, oySCOPE_e scope, oyAlloc_f alloc_func)
| get a cached string from DB More...
int | oySetPersistentString (const char *key_name, oySCOPE_e scope, const char *value, const char *comment)
| set string into DB and cache More...
OYAPI oyConfDomain_s *OYEXPORT | oyConfDomain_s::oyConfDomain_FromReg (const char *registration_domain, oyObject_s object)
| allocate a new ConfDomain object More...
OYAPI oyConfDomain_s *OYEXPORT | oyConfDomain_s::oyConfDomain_Copy (oyConfDomain_s *obj, oyObject_s object)
| copy or reference a ConfDomain object More...
OYAPI int OYEXPORT | oyConfDomain_s::oyConfDomain_Release (oyConfDomain_s **obj)
| release and possibly deallocate a ConfDomain object More...
OYAPI const char *OYEXPORT | oyConfDomain_s::oyConfDomain_GetText (oyConfDomain_s *obj, const char *name, oyNAME_e type)
| obtain a UI text from a ConfDomain object More...
OYAPI const char **OYEXPORT | oyConfDomain_s::oyConfDomain_GetTexts (oyConfDomain_s *obj)
| obtain a list of possible UI text from a ConfDomain object More...

## Detailed Description

Manipulate and abstract values.

## Macro Definition Documentation

## ◆ OY_ADD_ALWAYS

#define OY_ADD_ALWAYS 0x04

no check for double occurencies; do not use for configurations

## ◆ OY_CREATE_NEW

#define OY_CREATE_NEW 0x02

create

Examples:
  image_display.cpp, oyranos_cmm_oJPG.c, tutorial1.c, tutorial_json_options.c, and tutorial_taxi.c.

Referenced by oyImage_s::oyImage_CreateForDisplay(), oyImage_s::oyImage_FromFile(), oyImage_s::oyImage_ToFile(), and oyObject_SetName().

## ◆ OY_MATCH_KEY

#define OY_MATCH_KEY 0x08

check for double occurencies of key name, ignoring the path

## ◆ OY_SELECT_COMMON

#define OY_SELECT_COMMON 4096

select from policySelect typical from a associatable oyCMMapi9_s type of filter for providing common options.

Version
  Oyranos: 0.1.10

Since
  2009/07/27 (Oyranos: 0.1.10)

Date
  2009/07/27

## ◆ OY_SELECT_FILTER

#define OY_SELECT_FILTER 2048

select from filter

Version
  Oyranos: 0.1.10

Since
  2009/07/27 (Oyranos: 0.1.10)

Date
  2009/07/27

Examples:
  image_display.cpp.

Referenced by oyImage_s::oyImage_FromFile(), and oyImage_s::oyImage_ToFile().

## Enumeration Type Documentation

## ◆ oyOPTIONATTRIBUTE_e

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.

The ".invisible" attribute says a option shall not be displayed in a GUI. The ".readonly" attribute alllows for unchangeable, static options. They might be used for passing additional informations. The ".font" and ".advanced" attributes are described for the according enum values.

See as well Registration

Version
  Oyranos: 0.1.9

Since
  2008/10/08 (Oyranos: 0.1.8)

Date
  2008/11/27

Enumerator
oyOPTIONATTRIBUTE_BASIC | basic settings, as typical for toolkits and office/web applications, e.g. disable proofing or disable mark out of gamut colors
oyOPTIONATTRIBUTE_EDIT | user modified, e.g. after oyOption_SetFromText()
oyOPTIONATTRIBUTE_AUTOMATIC | automatically modified, e.g. by a CMM
oyOPTIONATTRIBUTE_ADVANCED | advanced settings, as typical for editing, e.g. include proofing (options appended with ".advanced")
oyOPTIONATTRIBUTE_FRONT | front end options, handled by the framework or policy module, e.g. ".front"
oyOPTIONATTRIBUTE_DOUBLE | tell this options is included twice

## Function Documentation

## ◆ oyConfDomain_Copy()

OYAPI oyConfDomain_s *OYEXPORT oyConfDomain_Copy | ( | oyConfDomain_s * | obj,
|  | oyObject_s | object
| ) |  |

copy or reference a ConfDomain object

Function oyConfDomain_Copy

Parameters

  [in] | obj | struct object
  | object | the optional object

Version
  Oyranos: 0.1.10

Since
  2009/12/30 (Oyranos: 0.1.10)

Date
  2009/12/30

References oyOBJECT_CONF_DOMAIN_S.

## ◆ oyConfDomain_FromReg()

OYAPI oyConfDomain_s *OYEXPORT oyConfDomain_FromReg | ( | const char * | registration_domain,
|  | oyObject_s | object
| ) |  |

allocate a new ConfDomain object

Function oyConfDomain_New

Version
  Oyranos: 0.1.10

Since
  2009/12/30 (Oyranos: 0.1.10)

Date
  2009/12/30

## ◆ oyConfDomain_GetText()

OYAPI const char *OYEXPORT oyConfDomain_GetText | ( | oyConfDomain_s * | obj,
|  | const char * | name,
|  | oyNAME_e | type
| ) |  |

obtain a UI text from a ConfDomain object

Function oyConfDomain_GetText

Parameters

  [in,out] | obj | struct object
  [in] | name | the category to return
  [in] | type | the type of string

Version
  Oyranos: 0.1.10

Since
  2009/12/30 (Oyranos: 0.1.10)

Date
  2009/12/30

References oyOBJECT_CONF_DOMAIN_S.

## ◆ oyConfDomain_GetTexts()

OYAPI const char **OYEXPORT oyConfDomain_GetTexts | ( | oyConfDomain_s * | obj | ) |

obtain a list of possible UI text from a ConfDomain object

Function oyConfDomain_GetTexts

Returns
  zero terminated list of strings, Each string is a "name" option to oyConfDomain_GetText().

Version
  Oyranos: 0.1.10

Since
  2009/12/30 (Oyranos: 0.1.10)

Date
  2009/12/30

References oyOBJECT_CONF_DOMAIN_S.

## ◆ oyConfDomain_Release()

OYAPI int OYEXPORT oyConfDomain_Release | ( | oyConfDomain_s ** | obj | ) |

release and possibly deallocate a ConfDomain object

Function oyConfDomain_Release

Parameters

  [in,out] | obj | struct object

Version
  Oyranos: 0.1.10

Since
  2009/12/30 (Oyranos: 0.1.10)

Date
  2009/12/30

References oyOBJECT_CONF_DOMAIN_S.

## ◆ oyDbHandlingReady()

int oyDbHandlingReady | ( | void |  | ) |

tell if DB handling is ready

Version
  Oyranos: 0.9.6

Date
  2016/10/23

Since
  2016/10/23 (Oyranos: 0.9.6)

## ◆ oyDbHandlingSet()

int oyDbHandlingSet | ( | const oyDbAPI_s * | db_api | ) |

set DB functions for persistent settingsBe careful to set the APIs only before any call to the oyDB_s functions. Otherwise the behaviour is undefined.

Version
  Oyranos: 0.9.6

Date
  2016/10/23

Since
  2016/10/23 (Oyranos: 0.9.6)

## ◆ oyGetPersistentString()

char* oyGetPersistentString | ( | const char * | key_name,
|  | uint32_t | flags,
|  | oySCOPE_e | scope,
|  | oyAlloc_f | alloc_func
| ) |  |

get a cached string from DB

Function oyGetPersistentString

Parameters

  key_name | the DB key name
  flags | 0 for cached string or oySOURCE_DATA for a likely expensive DB lookup
  scope | user/system or both, works together with flags |= oySOURCE_DATA
  alloc_func | the user allocator

Returns
  the cached value

Version
  Oyranos: 0.9.6

Date
  2015/02/06

Since
  2015/02/06 (Oyranos: 0.9.6)

Referenced by oyOption_s::oyOption_SetValueFromDB().

## ◆ oyGetPersistentStrings()

int oyGetPersistentStrings | ( | const char * | top_key_name | ) |

cache strings from DB

Function oyGetPersistentStrings

Parameters

  [in] | top_key_name | the DB root key, zero clears the DB cache; use for example OY_STD

Returns
  error

Version
  Oyranos: 0.9.6

Date
  2016/03/02

Since
  2015/02/26 (Oyranos: 0.9.6)

References oyOptions_s::oyOptions_Release().

## ◆ oySetPersistentString()

int oySetPersistentString | ( | const char * | key_name,
|  | oySCOPE_e | scope,
|  | const char * | value,
|  | const char * | comment
| ) |  |

set string into DB and cache

Function oySetPersistentString

Parameters

  key_name | the DB key name
  scope | possible values are: oySCOPE_USER oySCOPE_SYS oySCOPE_USER_SYS means, you are your own with prefixing
  value | the value string
  comment | the comment string

Returns
  DB specific return code

Version
  Oyranos: 0.9.6

Date
  2015/02/06

Since
  2015/02/06 (Oyranos: 0.9.6)

Examples:
  image_display.cpp.