Oyranos Color Management System API
Public Types | Public Member Functions | Data Fields
oyCMMapi_s Struct Reference

the basic API interface More...

#include <oyCMMapi_s.h>

Inheritance diagram for oyCMMapi_s:
Inheritance graph
Collaboration diagram for oyCMMapi_s:
Collaboration graph

Public Types

typedef int(* oyCMMInit_f) (oyStruct_s *filter)
 optional CMM init function More...
 
typedef int(* oyCMMMessageFuncSet_f) (oyMessage_f message_func)
 optionaly sets a CMM message function More...
 
typedef int(* oyCMMCanHandle_f) (oyCMMQUERY_e type, uint32_t value)
 CMM feature declaration function. More...
 
typedef const char *(* oyCMMGetText_f) (const char *select, oyNAME_e type, oyStruct_s *context)
 get strings from a CMM More...
 

Public Member Functions

OYAPI oyCMMapi_s *OYEXPORT oyCMMapi_New (oyObject_s object)
 allocate a new CMMapi object More...
 
OYAPI oyCMMapi_s *OYEXPORT oyCMMapi_Copy (oyCMMapi_s *cmmapi, oyObject_s object)
 copy or reference a CMMapi object More...
 
OYAPI int OYEXPORT oyCMMapi_Release (oyCMMapi_s **cmmapi)
 release and possibly deallocate a oyCMMapi_s object More...
 
void oyCMMapi_Set (oyCMMapi_s *api, oyCMMInit_f init, oyCMMMessageFuncSet_f msg_set, const char *registration, int32_t version[3], int32_t module_api[3])
 CMMapi member setter. More...
 
void oyCMMapi_SetNext (oyCMMapi_s *api, oyCMMapi_s *next)
 chain CMMapi's More...
 
oyCMMapi_soyCMMapi_GetNext (oyCMMapi_s *api)
 get next CMMapi More...
 
- Public Member Functions inherited from oyStruct_s
const char * oyStruct_GetTextFromModule (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags)
 get object infos from a module More...
 
const char * oyStruct_GetText (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags)
 get a text dump More...
 

Data Fields

const oyOBJECT_e type_
 Type of object. More...
 
oyStruct_Copy_f copy
 Copy function. More...
 
oyStruct_Release_f release
 Release function. More...
 
oyObject_s oy_
 Oyranos internal object. More...
 
- Data Fields inherited from oyStruct_s
const oyOBJECT_e type_
 Type of object. More...
 
oyStruct_Copy_f copy
 Copy function. More...
 
oyStruct_Release_f release
 Release function. More...
 
oyObject_s oy_
 Oyranos internal object. More...
 

Detailed Description

the basic API interface

The registration should provide keywords for selection. The api5_ member is missed for oyCMMapi5_s.

Version
Oyranos: 0.1.10
Since
2009/01/16 (Oyranos: 0.1.10)
Date
2009/01/16

Member Typedef Documentation

◆ oyCMMCanHandle_f

typedef int(* oyCMMCanHandle_f) (oyCMMQUERY_e type, uint32_t value)

CMM feature declaration function.

typedef oyCMMCanHandle_f

◆ oyCMMGetText_f

typedef const char*(* oyCMMGetText_f) (const char *select, oyNAME_e type, oyStruct_s *context)

get strings from a CMM

typedef oyCMMGetText_f

type:

  • oyNAME_NICK: compact, e.g. "GPU"
  • oyNAME_NAME: a short explanation, e.g. "Rendering with GPU"
  • oyNAME_DESCRIPTION: a long explanation, e.g. "Accelerated calculations on a GPU"
Parameters
selectone from "name", "manufacturer" or "copyright"
typeselect flavour
contextthe object to ask for a optional context This will typical be the object to which this function belongs, but can be stated otherwise.
Returns
text string or zero
Version
Oyranos: 0.3.0
Since
2008/12/23 (Oyranos: 0.1.10)
Date
2011/02/01

◆ oyCMMInit_f

typedef int(* oyCMMInit_f) (oyStruct_s *filter)

optional CMM init function

typedef oyCMMInit_f

◆ oyCMMMessageFuncSet_f

typedef int(* oyCMMMessageFuncSet_f) (oyMessage_f message_func)

optionaly sets a CMM message function

typedef oyCMMMessageFuncSet_f

Member Function Documentation

◆ oyCMMapi_Copy()

OYAPI oyCMMapi_s *OYEXPORT oyCMMapi_Copy ( oyCMMapi_s cmmapi,
oyObject_s  object 
)

copy or reference a CMMapi object

Function oyCMMapi_Copy

The function is for copying and for referencing. The reference is the most often used way, which saves resourcs and time.

Parameters
[in]cmmapiCMMapi struct object
objectNULL - means reference, the optional object triggers a real copy

References oyOBJECT_CMM_API_S.

◆ oyCMMapi_GetNext()

oyCMMapi_s * oyCMMapi_GetNext ( oyCMMapi_s api)

get next CMMapi

Function oyCMMapi_GetNext

oyCMMapi_s forms a single linked list. The start must be set in oyCMMinfo_s to be parsed by the module loader.

See also
oyCMMapi_SetNext oyCMMinfo_SetApi
Parameters
apithe struct
Returns
the next struct
Version
Oyranos: 0.9.5
Since
2013/06/10 (Oyranos: 0.9.5)
Date
2013/06/10

◆ oyCMMapi_New()

OYAPI oyCMMapi_s *OYEXPORT oyCMMapi_New ( oyObject_s  object)

allocate a new CMMapi object

Function oyCMMapi_New

References oyOBJECT_OBJECT_S.

◆ oyCMMapi_Release()

OYAPI int OYEXPORT oyCMMapi_Release ( oyCMMapi_s **  cmmapi)

release and possibly deallocate a oyCMMapi_s object

Function oyCMMapi_Release

Parameters
[in,out]cmmapiCMMapi struct object

References oyOBJECT_CMM_API_S.

◆ oyCMMapi_Set()

void oyCMMapi_Set ( oyCMMapi_s api,
oyCMMInit_f  init,
oyCMMMessageFuncSet_f  msg_set,
const char *  registration,
int32_t  version[3],
int32_t  module_api[3] 
)

CMMapi member setter.

Function oyCMMapi_Set

Parameters
apithe struct
initcustom initialisation
msg_setmessage function setter
registrationthe modules registration string,
versionmodule version
  • 0: major - should be stable for the live time of a filter
  • 1: minor - mark new features
  • 2: patch version - correct errors
module_apitell compatibility with Oyranos API
  • 0: last major Oyranos version during development time, e.g. 0
  • 1: last minor Oyranos version during development time, e.g. 9
  • 2: last Oyranos patch version during development time, e.g. 5
Version
Oyranos: 0.9.5
Since
2013/06/10 (Oyranos: 0.9.5)
Date
2013/06/10

Referenced by oyCMMapi4_s::oyCMMapi4_Create(), and oyCMMapi7_s::oyCMMapi7_Create().

◆ oyCMMapi_SetNext()

void oyCMMapi_SetNext ( oyCMMapi_s api,
oyCMMapi_s next 
)

chain CMMapi's

Function oyCMMapi_SetNext

A oyCMMapi_s is initially not chained and will thus not be detected during parsing the oyCMMinfo_s structure. Append a CMMapi by searching for a empty place through oyCMMapi_s::oyCMMapi_GetNext ( api ) == NULL . Then append the new CMMapi with oyCMMapi_s::oyCMMapi_SetNext ( old_api, my_new_api ).

See also
oyCMMinfo_SetApi for setting the first visible api.
Parameters
apithe struct
nextstruct to chain
Version
Oyranos: 0.9.5
Since
2013/06/10 (Oyranos: 0.9.5)
Date
2013/06/10

Field Documentation

◆ copy

oyStruct_Copy_f oyCMMapi_s::copy

Copy function.

◆ oy_

oyObject_s oyCMMapi_s::oy_

Oyranos internal object.

Features name and hash. Do not change during object life time.

Referenced by oyCMMapi7_s::oyCMMapi7_Create().

◆ release

oyStruct_Release_f oyCMMapi_s::release

Release function.

◆ type_

const oyOBJECT_e oyCMMapi_s::type_

Type of object.

The struct type tells Oyranos how to interprete hidden fields.

Referenced by oyCMMapis_s::oyCMMapis_MoveIn().