Header file defining the Structured data callback API. More...
Enumerations | |
enum | { SWDATUM_FROM_KEY , SWDATUM_FROM_VALUE } |
Functions | |
sw_data_result | SwDatumFromDEVICEPARAM (sw_datum *datum, const DEVICEPARAM *devparam, int swdatum_from) |
Header file defining the Structured data callback API.
Copyright (C) 2019 Global Graphics Software Ltd. All rights reserved.
This source code contains the confidential and trade secret information of Global Graphics Software Ltd. It may not be used, copied or distributed for any reason except as set forth in the applicable Global Graphics license agreement.
This file defines one function that provides a sw_data_api interface to DEVICEPARAMs. This interface may be more convenient for searching and accessing composite DEVICEPARAMs, and also can be used to retain the data across calls to the device, by using the sw_data_api::retain() and sw_data_api::release() methods.
anonymous enum |
Values for the swdatum_from
parameter to SwDatumFromDEVICEPARAM().
Enumerator | |
---|---|
SWDATUM_FROM_KEY | Create a datum representing the DEVICEPARAM's key. |
SWDATUM_FROM_VALUE | Create a datum representing the DEVICEPARAM's value. |
sw_data_result SwDatumFromDEVICEPARAM | ( | sw_datum * | datum, |
const DEVICEPARAM * | devparam, | ||
int | swdatum_from | ||
) |
Create a read-only sw_datum value representing a DEVICEPARAM's key or value.
[out] | datum | A datum object to initialise to represent the devparam key or value as appropriate. This object is only valid as long as the devparam object is valid (usually to the end of a device call that set the parameter). The data may be retained for longer by calling the sw_data_api::retain() method, in which case the data must be released by calling sw_data_api::release(). |
[in] | devparam | The device parameter to represent in datum. |
[in] | swdatum_from | One of the values SWDATUM_FROM_KEY or SWDATUM_FROM_VALUE, indicating whether datum should represent the key or value of devparam respectively. |
SW_DATA_OK | if the representation of devparam in datum was successful. |
SW_DATA_ERROR_SYNTAX | if the parameters are invalid. |
SW_DATA_ERROR_TYPECHECK | if the device parameter is of a type that cannot be represented in a sw_datum. |