Oyranos  git-devel
Oyranos is a full featured Color Management System
Functions
Options API

The idea behind this API is to provide one layout for presenting a configuration dialog to users. The advantage is, every application, like KDE and Gnome control panels, will inherit the same logic. A user can easily use the one and the other panel without too much relearning. More...

Collaboration diagram for Options API:

Functions

oyWIDGET_eoyWidgetListGet (oyGROUP_e group, int *count, oyAlloc_f allocate_func)
 all widgets of a group More...
 
oyWIDGET_TYPE_e oyWidgetTitleGet (oyWIDGET_e option, const oyGROUP_e **categories, const char **name, const char **tooltip, int *flags)
 Get a special Options UI strings. More...
 
int oyOptionChoicesGet (oyWIDGET_e option, int *choices, const char ***choices_string_list, int *current)
 Get a Options choices UI strings. More...
 
int oyOptionChoicesGet2 (oyWIDGET_e option, uint32_t flags, int name_type, int *choices, const char ***choices_string_list, int *current)
 see oyOptionChoicesGet() More...
 
void oyOptionChoicesFree (oyWIDGET_e option, const char ***list, int size)
 delete list of choices from a option More...
 

Detailed Description

The idea behind this API is to provide one layout for presenting a configuration dialog to users. The advantage is, every application, like KDE and Gnome control panels, will inherit the same logic. A user can easily use the one and the other panel without too much relearning.

To illustrate a bit: In analogy to the WWW, I suggest to implement something like a minimalistic HTML display. Once the HTML alike content logic is done in Oyranos, the HTML page works and appears everywhere compareable. Smaller changes to the Oyranos HTML alike pages will appear everywhere in all HTML page display programms. To remain in the WWW analogy, CSS would be optional to adapt visually.

Functions are provided to set and query for Options layout and UI strings in Oyranos.

Function Documentation

◆ oyOptionChoicesFree()

void oyOptionChoicesFree ( oyWIDGET_e  option,
const char ***  list,
int  size 
)

delete list of choices from a option

Parameters
optionoption type
liststring list
sizenumber of strings in the list to free

◆ oyOptionChoicesGet()

int oyOptionChoicesGet ( oyWIDGET_e  option,
int *  choices,
const char ***  choices_string_list,
int *  current 
)

Get a Options choices UI strings.

This function is checked for double occuring profiles. Such are sorted out.

Todo:
In the future a second choices_string_list may appear for displaying.
Parameters
optionmerge oyBEHAVIOUR_e and oyPROFILE_e
[out]choicesn choices; if choices is zero then you need to optain the choices otherwise, like for profiles
[out]choices_string_listtranslated list of n choices
[out]currentthe actual setting
Returns
error

◆ oyOptionChoicesGet2()

int oyOptionChoicesGet2 ( oyWIDGET_e  option,
uint32_t  flags,
int  name_type,
int *  choices,
const char ***  choices_string_list,
int *  current 
)

see oyOptionChoicesGet()

flags can come from oyICCProfileSelectionFlagsFromRegistration() and is for oyProfiles_Create() . Possible values for name_type come from oyNAME_e.

The flags argument relates to the option arg. For profile options see oyICCProfileSelectionFlagsFromRegistration(). The name_type argument can be a oyNAME_e .

Version
Oyranos: 0.9.6
Date
2014/06/13
Since
2014/04/08 (Oyranos: 0.9.6)

◆ oyWidgetListGet()

oyWIDGET_e* oyWidgetListGet ( oyGROUP_e  group,
int *  count,
oyAlloc_f  allocate_func 
)

all widgets of a group

Parameters
groupspecify which group dialog to build
[out]countnumber of widgets contained in list
allocate_funcuser provided function for allocating the strings memory
Returns
list of widgets to create in correct order

◆ oyWidgetTitleGet()

oyWIDGET_TYPE_e oyWidgetTitleGet ( oyWIDGET_e  option,
const oyGROUP_e **  categories,
const char **  name,
const char **  tooltip,
int *  flags 
)

Get a special Options UI strings.

Parameters
optionmerges oyBEHAVIOUR_e and oyPROFILE_e
[out]categoriesenums list, to place into the right group widget { n, first category, second c., ... , n'th c. } for widget of type oyGROUP_e this is empty
[out]nametransated widget title
[out]tooltiptransated tooltip
[out]flagsoption properties
Returns
widget type, gives a hint to further properties, { like choices or int/float value ranges ... }