Oyranos Color Management System API
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...
 
void oyOptionChoicesFree (oyWIDGET_e option, 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,
char ***  list,
int  size 
)

delete list of choices from a option

Parameters
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_stringstranslated list of n choices
[out]currentthe actual setting
Returns
success

◆ 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
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
Returns
widget type, gives a hint to further properties, { like choices or int/float value ranges ... }