The API implementation. More...
#include <sys/stat.h>#include <unistd.h>#include <stdarg.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include <langinfo.h>#include "config.h"#include "oyranos.h"#include "oyranos_check.h"#include "oyranos_cmms.h"#include "oyranos_debug.h"#include "oyranos_elektra.h"#include "oyranos_helper.h"#include "oyranos_internal.h"#include "oyranos_io.h"#include "oyranos_sentinel.h"#include "oyranos_texts.h"#include "oyranos_xml.h"#include "config.log.h"Defines | |
| #define | ERR if (rc<=0 && oy_debug) { oyMessageFunc_p(oyMSG_WARN,0,"%s:%d %d\n", __FILE__,__LINE__,rc); perror("Error"); } |
| public Oyranos API's | |
Functions | |
| int | oyMessageFunc_ (int code, const oyStruct_s *context, const char *format,...) |
| int | oyMessageFuncSet (oyMessage_f message_func) |
| oyWIDGET_e * | oyWidgetListGet (oyGROUP_e group, int *count, oyAlloc_f allocate_func) |
| all widgets of a group | |
| 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. | |
| int | oyOptionChoicesGet (oyWIDGET_e option, int *choices, const char ***choices_string_list, int *current) |
| Get a Options choices UI strings. | |
| void | oyOptionChoicesFree (oyWIDGET_e option, char ***list, int size) |
| delete list of choices from a option | |
| int | oySetBehaviour (oyBEHAVIOUR_e type, int choice) |
| int | oyGetBehaviour (oyBEHAVIOUR_e type) |
| int | oyPolicySaveActual (oyGROUP_e group, const char *name) |
| save a options group to a file | |
| char * | oyPolicyToXML (oyGROUP_e group, int add_header, oyAlloc_f allocate_func) |
| int | oyReadXMLPolicy (oyGROUP_e group, const char *xml) |
| int | oyPolicySet (const char *policy_file, const char *full_name) |
| int | oySetDefaultProfile (oyPROFILE_e type, const char *file_name) |
| int | oySetDefaultProfileBlock (oyPROFILE_e type, const char *file_name, void *mem, size_t size) |
| char * | oyGetDefaultProfileName (oyPROFILE_e type, oyAlloc_f allocate_func) |
| char ** | oyProfileListGet (const char *coloursig, uint32_t *size, oyAlloc_f allocateFunc) |
| get a list of profile filenames | |
| int | oyCheckProfile (const char *filename, const char *coloursig) |
| check an file if it is a profile | |
| int | oyCheckProfileMem (const void *mem, size_t size, const char *coloursig) |
| check an memory block if it is a profile | |
| size_t | oyGetProfileSize (const char *profilename) |
| get the profiles size | |
| void * | oyGetProfileBlock (const char *profilename, size_t *size, oyAlloc_f allocate_func) |
| obtain an memory block in the responsibility of the user | |
| char * | oyGetPathFromProfileName (const char *profile_name, oyAlloc_f allocate_func) |
| char * | oyGetDeviceProfile (oyDEVICETYP_e typ, const char *manufacturer, const char *model, const char *product_id, const char *host, const char *port, const char *attrib1, const char *attrib2, const char *attrib3, oyAlloc_f allocate_func) |
| ask for a profile name by specifying device attributes | |
| int | oySetDeviceProfile (oyDEVICETYP_e typ, const char *manufacturer, const char *model, const char *product_id, const char *host, const char *port, const char *attrib1, const char *attrib2, const char *attrib3, const char *profileName, const void *mem, size_t size) |
| set a profile name with specifying device attributes | |
| int | oyEraseDeviceProfile (oyDEVICETYP_e typ, const char *manufacturer, const char *model, const char *product_id, const char *host, const char *port, const char *attrib1, const char *attrib2, const char *attrib3) |
| remove or deinstall the profile from the current path | |
| char ** | oyModulsGetNames (int *count, oyAlloc_f allocate_func) |
| void | oyI18NSet (int active, int reserved) |
| switch internationalisation of strings on or off | |
| const char * | oyLanguage (void) |
| get language code | |
| const char * | oyCountry (void) |
| get country code | |
| const char * | oyLang (void) |
| get LANG code/variable | |
| int | oyVersion (int type) |
| give the compiled in library version | |
| char * | oyVersionString (int type, oyAlloc_f allocateFunc) |
| give the configure options for Oyranos | |
| int | oyProfileGetMD5 (void *buffer, size_t size, unsigned char *md5_return) |
| calculate a md5 digest beginning after the header offset | |
The API implementation.
This file contains functions implementing the Oyranos API.
For the Oyranos API see
Oyranos is an open source Colour Management System
Copyright (C) 2004-2008 Kai-Uwe Behrmann
| #define ERR if (rc<=0 && oy_debug) { oyMessageFunc_p(oyMSG_WARN,0,"%s:%d %d\n", __FILE__,__LINE__,rc); perror("Error"); } |
public Oyranos API's
| int oyEraseDeviceProfile | ( | oyDEVICETYP_e | typ, | |
| const char * | manufacturer, | |||
| const char * | model, | |||
| const char * | product_id, | |||
| const char * | host, | |||
| const char * | port, | |||
| const char * | attrib1, | |||
| const char * | attrib2, | |||
| const char * | attrib3 | |||
| ) |
remove or deinstall the profile from the current path
| char* oyGetDeviceProfile | ( | oyDEVICETYP_e | typ, | |
| const char * | manufacturer, | |||
| const char * | model, | |||
| const char * | product_id, | |||
| const char * | host, | |||
| const char * | port, | |||
| const char * | attrib1, | |||
| const char * | attrib2, | |||
| const char * | attrib3, | |||
| oyAlloc_f | allocate_func | |||
| ) |
ask for a profile name by specifying device attributes
| typ | kind of device | |
| manufacturer | the device manufacturer (EIZO) | |
| model | the model (LCD2100) | |
| product_id | the ID reported during connection (ID_701200xx) | |
| host | useful for monitor identification (grafic:0.0) | |
| port | kind of connection (Matrox G650) | |
| attrib1 | additional attribute | |
| attrib2 | additional attribute | |
| attrib3 | additional attribute | |
| allocate_func | the users memory allocation function |
simply pass 0 for not specified properties
char* profile_name = oyGetDeviceProfile ("EIZO", "LCD2100", "ID 87-135.19", "grafic:0.0", "Matrox G650", "100lux", 0, "", allocate_func); if (profile_name) { char* ptr = NULL; ptr = oyGetProfileBlock (profile_name, allocate_func); // do something free (ptr); }
| int oyMessageFunc_ | ( | int | code, | |
| const oyStruct_s * | context, | |||
| const char * | format, | |||
| ... | ||||
| ) |
oyMessageFunc_
References oyStruct_s::oy_, oyObject_s::oyObject_GetId(), and oyStruct_TypeToText().
| int oyMessageFuncSet | ( | oyMessage_f | message_func | ) |
oyMessageFuncSet
| char** oyModulsGetNames | ( | int * | count, | |
| oyAlloc_f | allocateFunc | |||
| ) |
obtain 4 char CMM identifiers and count of CMM's
| int oySetDeviceProfile | ( | oyDEVICETYP_e | typ, | |
| const char * | manufacturer, | |||
| const char * | model, | |||
| const char * | product_id, | |||
| const char * | host, | |||
| const char * | port, | |||
| const char * | attrib1, | |||
| const char * | attrib2, | |||
| const char * | attrib3, | |||
| const char * | profileName, | |||
| const void * | mem, | |||
| size_t | size | |||
| ) |
set a profile name with specifying device attributes
| mem | remains in the users domain |
1.6.1