Contains definitions shared between the PageBuffer (pgbdev) and Screening (scrndev) example device implememtations. More...
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... | |
Contains definitions shared between the PageBuffer (pgbdev) and Screening (scrndev) example device implememtations.
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.
anonymous enum |
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.
pfnParamCallback | The callback function registered for the parameter. |
param | The parameter address. |
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.
params | Array of PARAM structures in which to add a hook. |
n_params | The number of parameters in params. |
paramname | The parameter name to monitor. |
paramtype | The 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. |
pfnParamCallback | Pointer to a function though which the RIP informs the skin of parameter changes. |
FALSE | If the callback could not be set (either the name of the parameter was not found, or the type of the parameter is incorrect). |
TRUE | If the callback was set. |