*/
extern struct packet *provider_buffer_pd_key_up(pid_t pid, int handle, const struct packet *packet);
+/*!
+ */
+extern void *provider_buffer_user_data(struct livebox_buffer *handle);
+
+/*!
+ */
+extern int provider_buffer_set_user_data(struct livebox_buffer *handle, void *data);
+
#ifdef __cplusplus
}
#endif
int (*handler)(struct livebox_buffer *info, enum buffer_event event, double timestamp, double x, double y, void *data);
void *data;
+
+ void *user_data;
};
extern struct livebox_buffer *provider_buffer_find_buffer(enum target_type type, const char *pkgname, const char *id);
return NULL;
}
+EAPI int provider_buffer_set_user_data(struct livebox_buffer *handle, void *data)
+{
+ if (!handle || handle->state != BUFFER_CREATED) {
+ ErrPrint("info is not valid\n");
+ return -EINVAL;
+ }
+
+ handle->user_data = data;
+ return 0;
+}
+
+EAPI void *provider_buffer_user_data(struct livebox_buffer *handle)
+{
+ if (!handle || handle->state != BUFFER_CREATED) {
+ ErrPrint("info is not valid\n");
+ return NULL;
+ }
+
+ return handle->user_data;
+}
+
EAPI struct livebox_buffer *provider_buffer_acquire(enum target_type type, const char *pkgname, const char *id, int width, int height, int pixel_size, int (*handler)(struct livebox_buffer *, enum buffer_event, double, double, double, void *), void *data)
{
struct livebox_buffer *info;