![]() |
Oyranos Color Management System API |
List of Single Color objects. More...
#include <oyNamedColors_s.h>
Inherits oyList_s.
Public Member Functions | |
OYAPI oyNamedColors_s *OYEXPORT | oyNamedColors_New (oyObject_s object) |
allocate a new NamedColors object More... | |
OYAPI oyNamedColors_s *OYEXPORT | oyNamedColors_Copy (oyNamedColors_s *namedcolors, oyObject_s object) |
copy or reference a NamedColors object More... | |
OYAPI int OYEXPORT | oyNamedColors_Release (oyNamedColors_s **namedcolors) |
release and possibly deallocate a oyNamedColors_s object More... | |
OYAPI int OYEXPORT | oyNamedColors_MoveIn (oyNamedColors_s *list, oyNamedColor_s **obj, int pos) |
add an element to a NamedColors list More... | |
OYAPI int OYEXPORT | oyNamedColors_ReleaseAt (oyNamedColors_s *list, int pos) |
release a element from a NamedColors list More... | |
OYAPI oyNamedColor_s *OYEXPORT | oyNamedColors_Get (oyNamedColors_s *list, int pos) |
get a element of a NamedColors list More... | |
OYAPI int OYEXPORT | oyNamedColors_Count (oyNamedColors_s *list) |
count the elements in a NamedColors list More... | |
OYAPI int OYEXPORT | oyNamedColors_Clear (oyNamedColors_s *list) |
clear the elements in a NamedColors list More... | |
OYAPI int OYEXPORT | oyNamedColors_Sort (oyNamedColors_s *list, int32_t *rank_list) |
sort a list according to a rank_list More... | |
void | oyNamedColors_SetPrefix (oyNamedColors_s *colors, const char *string) |
set name prefix More... | |
void | oyNamedColors_SetSuffix (oyNamedColors_s *colors, const char *string) |
set name suffix More... | |
const char * | oyNamedColors_GetPrefix (oyNamedColors_s *colors) |
get name prefix More... | |
const char * | oyNamedColors_GetSuffix (oyNamedColors_s *colors) |
get name suffix More... | |
const char * | oyNamedColors_GetColorName (oyNamedColors_s *colors, int pos) |
get full length name 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... | |
List of Single Color objects.
OYAPI int OYEXPORT oyNamedColors_Clear | ( | oyNamedColors_s * | list | ) |
clear the elements in a NamedColors list
Function oyNamedColors_Clear
[in,out] | list | the list |
References oyOBJECT_NAMED_COLORS_S, and oyStructList_s::oyStructList_Clear().
OYAPI oyNamedColors_s *OYEXPORT oyNamedColors_Copy | ( | oyNamedColors_s * | namedcolors, |
oyObject_s | object | ||
) |
copy or reference a NamedColors object
Function oyNamedColors_Copy
The function is for copying and for referencing. The reference is the most often used way, which saves resourcs and time.
[in] | namedcolors | NamedColors struct object |
object | NULL - means reference, the optional object triggers a real copy |
References oyOBJECT_NAMED_COLORS_S.
OYAPI int OYEXPORT oyNamedColors_Count | ( | oyNamedColors_s * | list | ) |
count the elements in a NamedColors list
Function oyNamedColors_Count
[in,out] | list | the list |
References oyOBJECT_NAMED_COLORS_S, and oyStructList_s::oyStructList_Count().
OYAPI oyNamedColor_s *OYEXPORT oyNamedColors_Get | ( | oyNamedColors_s * | list, |
int | pos | ||
) |
get a element of a NamedColors list
Function oyNamedColors_Get
[in,out] | list | the list |
pos | position |
References oyOBJECT_NAMED_COLOR_S, oyOBJECT_NAMED_COLORS_S, and oyStructList_s::oyStructList_GetRefType().
const char * oyNamedColors_GetColorName | ( | oyNamedColors_s * | colors, |
int | pos | ||
) |
get full length name
The name is constructed from suffix, name and prefix.
[in] | colors | Oyranos colors struct pointer |
[in] | pos | nth color in list |
References oyNAME_NICK, oyNamedColor_s::oyNamedColor_GetName(), oyObject_GetAlloc(), oyObject_GetDeAlloc(), oyOBJECT_NAMED_COLOR_S, oyOBJECT_NAMED_COLORS_S, and oyStructList_s::oyStructList_GetRefType().
const char * oyNamedColors_GetPrefix | ( | oyNamedColors_s * | colors | ) |
get name prefix
[in] | colors | Oyranos colors struct pointer |
References oyOBJECT_NAMED_COLORS_S.
const char * oyNamedColors_GetSuffix | ( | oyNamedColors_s * | colors | ) |
get name suffix
[in] | colors | Oyranos colors struct pointer |
References oyOBJECT_NAMED_COLORS_S.
OYAPI int OYEXPORT oyNamedColors_MoveIn | ( | oyNamedColors_s * | list, |
oyNamedColor_s ** | obj, | ||
int | pos | ||
) |
add an element to a NamedColors list
Function oyNamedColors_MoveIn
[in] | list | list |
[in,out] | obj | list element |
pos | position |
References oyOBJECT_NAMED_COLOR_S, oyOBJECT_NAMED_COLORS_S, oyStructList_s::oyStructList_Create(), oyStructList_s::oyStructList_MoveIn(), and oyNamedColor_s::type_.
OYAPI oyNamedColors_s *OYEXPORT oyNamedColors_New | ( | oyObject_s | object | ) |
OYAPI int OYEXPORT oyNamedColors_Release | ( | oyNamedColors_s ** | namedcolors | ) |
release and possibly deallocate a oyNamedColors_s object
Function oyNamedColors_Release
[in,out] | namedcolors | NamedColors struct object |
References oyOBJECT_NAMED_COLORS_S.
OYAPI int OYEXPORT oyNamedColors_ReleaseAt | ( | oyNamedColors_s * | list, |
int | pos | ||
) |
release a element from a NamedColors list
Function oyNamedColors_ReleaseAt
[in,out] | list | the list |
pos | position |
References oyOBJECT_NAMED_COLORS_S, oyStructList_s::oyStructList_GetParentObjType(), and oyStructList_s::oyStructList_ReleaseAt().
void oyNamedColors_SetPrefix | ( | oyNamedColors_s * | colors, |
const char * | string | ||
) |
set name prefix
[in] | colors | Oyranos colors struct pointer |
[in] | string | prefix string |
References oyObject_GetAlloc(), oyObject_GetDeAlloc(), and oyOBJECT_NAMED_COLORS_S.
void oyNamedColors_SetSuffix | ( | oyNamedColors_s * | colors, |
const char * | string | ||
) |
set name suffix
[in] | colors | Oyranos colors struct pointer |
[in] | string | suffix string |
References oyObject_GetAlloc(), oyObject_GetDeAlloc(), and oyOBJECT_NAMED_COLORS_S.
OYAPI int OYEXPORT oyNamedColors_Sort | ( | oyNamedColors_s * | list, |
int32_t * | rank_list | ||
) |
sort a list according to a rank_list
Function oyNamedColors_Sort
References oyOBJECT_NAMED_COLORS_S, and oyStructList_s::oyStructList_Sort().
oyStruct_Copy_f oyNamedColors_s::copy |
Copy function.
oyObject_s oyNamedColors_s::oy_ |
Oyranos internal object.
Features name and hash. Do not change during object life time.
oyStruct_Release_f oyNamedColors_s::release |
Release function.
const oyOBJECT_e oyNamedColors_s::type_ |
Type of object.
The struct type tells Oyranos how to interprete hidden fields.