OpenICC Documentation  git-devel
OpenICC provides a simple Color Management configuration API
Macros | Enumerations | Functions
Miscellaneous

Macros

#define OI_DEBUG   "OI_DEBUG"
 customisable messages More...
 

Enumerations

enum  openiccMSG_e { openiccMSG_ERROR = 300, openiccMSG_WARN, openiccMSG_DBG }
 message classes More...
 

Functions

int openiccInit (const char *loc)
 init the library; optionally More...
 
int openiccMessageFuncSet (openiccMessage_f message_func)
 set a custom message listener More...
 
int openiccVersion (void)
 runtime version More...
 
void * openiccMemDup (const void *src, size_t size)
 return the malloced copy of a pointer More...
 
int openiccMessageFormat (char **message_text, int code, const void *context_object, const char *string)
 default function to form a message string More...
 
int openiccMessageFunc (int code, const void *context_object, const char *format,...)
 default message function to console More...
 

Detailed Description

Macro Definition Documentation

◆ OI_DEBUG

#define OI_DEBUG   "OI_DEBUG"

customisable messages

Enumeration Type Documentation

◆ openiccMSG_e

message classes

Version
OpenICC Config: 0.0.1
Date
2013/09/16
Since
2013/09/16 (OpenICC Config: 0.0.1)
Enumerator
openiccMSG_ERROR 

fatal user messages

openiccMSG_WARN 

log messages

openiccMSG_DBG 

developer messages

Function Documentation

◆ openiccInit()

int openiccInit ( const char *  loc)

init the library; optionally

Additionally use setlocale() somewhere in your application. The message catalog search path is detected from the OI_LOCALEDIR and the LOCPATH environment variables. If those are not present; the inbuild ::OPENICC_LOCALEDIR macro is used.

return -1 for no USE_GETTEXT defined, otherwise 1

Version
OpenICC: 0.1.0
Date
2021/11/11
Since
2015/08/27 (OpenICC: 0.1.0)
Examples:
openicc_config_read.c, and test.c.

◆ openiccMemDup()

void * openiccMemDup ( const void *  src,
size_t  size 
)

return the malloced copy of a pointer

Version
OpenICC: 0.1.1
Date
2018/08/14
Since
2018/08/14 (OpenICC: 0.1.1)
Examples:
openicc_config_read.c.

◆ openiccMessageFormat()

int openiccMessageFormat ( char **  message_text,
int  code,
const void *  context_object,
const char *  string 
)

default function to form a message string

This default message function is used as a message formatter. The resulting string can be placed anywhere, e.g. in a GUI.

See also
the openiccMessageFunc() needs just to replace the fprintf with your favourite GUI call.
Version
OpenICC: 0.1.0
Date
2011/01/15
Since
2008/04/03 (OpenICC: 0.1.0)

Referenced by openiccMessageFunc().

◆ openiccMessageFunc()

int openiccMessageFunc ( int  code,
const void *  context_object,
const char *  format,
  ... 
)

default message function to console

The default message function is used as a message printer to the console from library start.

Parameters
codea message code understood be your message handler or openiccMSG_e
context_objecta openicc object is expected
formatthe text format string for following args
...the variable args fitting to format
Returns
0 - success; 1 - error
Version
OpenICC: 0.1.0
Date
2009/07/20
Since
2008/04/03 (OpenICC: 0.1.0)

References openiccMessageFormat().

◆ openiccMessageFuncSet()

int openiccMessageFuncSet ( openiccMessage_f  message_func)

set a custom message listener

Version
OpenICC: 0.1.0
Date
2011/10/21
Since
2008/04/03 (OpenICC: 0.1.0)
Examples:
test.c.

◆ openiccVersion()

int openiccVersion ( void  )

runtime version

Version
OpenICC: 0.1.0
Date
2015/08/27
Since
2015/08/27 (OpenICC: 0.1.0)
Examples:
test.c.