Harlequin RIP SDK

Contains definitions shared between the PageBuffer (pgbdev) and Screening (scrndev) example device implememtations. More...

#include "swdevice.h"
#include "skinkit.h"

Data Structures

struct  PARAM
 Encapsulates the meta-data for a single device parameter. More...
 

Typedefs

typedef struct PARAM PARAM
 Encapsulates the meta-data for a single device parameter. More...
 

Enumerations

enum  { PARAM_READONLY = 0 , PARAM_SET = 1 , PARAM_WRITEABLE = 2 , PARAM_RANGE = 4 }
 

Functions

HqBool KParamSetCallback (PARAM params[], size_t n_params, const char *paramname, int32 paramtype, SwLeParamCallback *pfnParamCallback)
 Utility function to set skin callbacks. More...
 
int32 KCallParamCallback (SwLeParamCallback *pfnParamCallback, const void *param)
 This function informs the skin whenever a monitored parameter changes. If no callback has been registered, nothing happens. More...
 

Detailed Description

Contains definitions shared between the PageBuffer (pgbdev) and Screening (scrndev) example device implememtations.

Typedef Documentation

◆ PARAM

typedef struct PARAM PARAM

Encapsulates the meta-data for a single device parameter.

Linking device parameter names with their values and providing a semi-automatic method for parsing and accepting values is done via this structure type and an array of these, an element for each parameter. See set_param, etc. for how these are used.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Bitmask of parameter attributes.

Enumerator
PARAM_READONLY 

no flags

PARAM_SET 

parameter now has explicitly set valid value

PARAM_WRITEABLE 

set_param call is allowed to change the value

PARAM_RANGE 

Says range is given and should be checked

Function Documentation

◆ KCallParamCallback()

int32 KCallParamCallback ( SwLeParamCallback pfnParamCallback,
const void *  param 
)

This function informs the skin whenever a monitored parameter changes. If no callback has been registered, nothing happens.

Parameters
pfnParamCallbackThe callback function registered for the parameter.
paramThe parameter address.
Returns
One of the Param* enumeration values from swdevice.h.

◆ KParamSetCallback()

HqBool KParamSetCallback ( PARAM  params[],
size_t  n_params,
const char *  paramname,
int32  paramtype,
SwLeParamCallback pfnParamCallback 
)

Utility function to set skin callbacks.

This function should be called through a trampoline function that passes in the parameter array and size. To remove a callback hook, call this function with a NULL function pointer.

Parameters
paramsArray of PARAM structures in which to add a hook.
n_paramsThe number of parameters in params.
paramnameThe parameter name to monitor.
paramtypeThe type of the parameter name to monitor. The callback functions use a generic pointer to pass the changed parameter value. Passing the expected type in with the hook function lets the skinkit check that the hook function will be passed the type it expects.
pfnParamCallbackPointer to a function though which the RIP informs the skin of parameter changes.
Return values
FALSEIf the callback could not be set (either the name of the parameter was not found, or the type of the parameter is incorrect).
TRUEIf the callback was set.