gr_application_set_data
#include <gre/gre.h>
int gr_application_set_data(
gr_application_t *app,
const char *key,
gr_data_format_t fmt,
gr_data_union_t *data
);
The gr_application_set_data function provides an interface to set a
Storyboard data variable. Copies the data into the corresponding data
manager key, creating the key if needed.
The gr_application_set_data can set or create data variables which are useable by the Storyboard engine.
Parameters
| Parameter | Type | Description |
|---|---|---|
app | gr_application_t* | A pointer to an application handle created using gr_application_create_args. |
key | const char* | The data key variable to set. |
fmt | const char* | The format describing the format of the provided data:GR_DATA_FORMAT_(1s0, 1u1, 1s1, 2u1, ...), "1s0" (string), "4u1" (uint32_t), "4s1" (int32_t)... |
data | gr_data_union_t* | A pointer to the data to set, this is not a transfer of memory ownership. |
Returns
| Type | Description |
|---|---|
int | Zero on success, -1 on failure. |