+/*
+ * Copyright © 2019 Samsung Electronics co., Ltd. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
#ifndef _LIBPUI_BACKEND_H_
#define _LIBPUI_BACKEND_H_
-#include "PUI.h"
-#include "PUI_internal.h"
+#include "PUI_common.h"
#define PUI_BACKEND_ABI_MAJOR_MASK 0xFFFF0000
#define PUI_BACKEND_ABI_MINOR_MASK 0x0000FFFF
-#define PUI_BACKEND_GET_ABI_MAJOR(m) ((m) & PUI_BACKEND_ABI_MAJOR_MASK) >> 16)
+#define PUI_BACKEND_GET_ABI_MAJOR(m) (((m) & PUI_BACKEND_ABI_MAJOR_MASK) >> 16)
#define PUI_BACKEND_GET_ABI_MINOR(m) ((m) & PUI_BACKEND_ABI_MINOR_MASK)
#define PUI_BACKEND_SET_ABI_VERSION(major, minor) \
#define PUI_BACKEND_ABI_VERSION_1_0 PUI_BACKEND_SET_ABI_VERSION(1, 0)
#define PUI_BACKEND_AB_VERSION_LAST PUI_BACKEND_ABI_VERSION_1_0
-typedef struct _pui_ani_control_buffer pui_ani_control_buffer;
-typedef struct _pui_ani_mgr pui_ani_mgr;
-
typedef struct _pui_backend_ani_func pui_backend_ani_func;
struct _pui_backend_ani_func
{
- pui_error (*ani_create)(pui_ani_mgr *ani_mgr, pui_id id);
- pui_error (*ani_start)(pui_ani_mgr *ani_mgr, int repeat);
- pui_error (*ani_stop)(pui_ani_mgr *ani_mgr);
+ pui_error (*ani_start)(pui_ani_t *ani, int repeat);
+ pui_error (*ani_stop)(pui_ani_t *ani, pui_bool force);
void (*reserved1)(void);
void (*reserved2)(void);
void (*reserved3)(void);
void (*reserved4)(void);
void (*reserved5)(void);
- void (*reserved6)(void);
- void (*reserved7)(void);
- void (*reserved8)(void);
- void (*reserved9)(void);
- void (*reserved10)(void);
};
-typedef struct _pui_backend_module_data pui_backend_module_data;
+typedef void pui_backend_ani_info;
+
+struct _pui_backend_ani_data
+{
+ pui_backend_ani_func *ani_func;
+ pui_backend_ani_info *ani_info;
+};
+
struct _pui_backend_module_data
{
void *data;
pui_int_error (*create_ani_collection)(void);
- pui_int_error (*is_ani_supported)(pui_id id);
- pui_backend_ani_func *(*get_ani_func)(pui_id id);
+ pui_bool (*geometry_get)(int *width, int *height);
+ pui_backend_ani_data *(*ani_create)(pui_id id);
+ void (*ani_destroy)(pui_backend_ani_data *ani_data);
+
+ void (*reserved1)(void);
+ void (*reserved2)(void);
+ void (*reserved3)(void);
+ void (*reserved4)(void);
+ void (*reserved5)(void);
};
-typedef struct _pui_backend_module pui_backend_module;
-typedef struct _pui_backend_module
+struct _pui_backend_module
{
const char *name; /**< The name of a backend module */
const char *vendor; /**< The vendor name of a backend module */
void (*backend_deinit)(pui_backend_module_data *backend_data);
};
-typedef void pui_backend_ani_data;
-
#ifdef __cplusplus
extern "C" {
#endif
pui_ani_control_buffer *
-pui_backend_ani_get_buffer(pui_ani_mgr *ani_mgr);
+pui_backend_ani_get_last_buffer(pui_ani_t *ani);
+
+pui_ani_control_buffer *
+pui_backend_ani_get_buffer(pui_ani_t *ani);
pui_int_error
-pui_backend_ani_set_buffer(pui_ani_mgr *ani_mgr, pui_ani_control_buffer *buffer);
+pui_backend_ani_set_buffer(pui_ani_t *ani, pui_ani_control_buffer *buffer);
pui_int_error
-pui_backend_ani_update(pui_ani_mgr *ani_mgr);
+pui_backend_ani_update(pui_ani_t *ani);
+
+pui_bool
+pui_backend_ani_add_frame_cb(pui_ani_t *ani, pui_bool (*frame_cb)(void *data, int serial), double frame_interval);
void
-pui_backend_ani_add_frame_cb(pui_ani_mgr *ani_mgr, Eina_Bool (*frame_cb)(void *data), double expire, void *data)\r;
+pui_backend_ani_remove_frame_cb(pui_ani_t *ani);
void
-pui_backend_ani_remove_frame_cb(pui_ani_mgr *ani_mgr, void *data);
+pui_backend_ani_status_update(pui_ani_t *ani, pui_ani_status status);
pui_backend_ani_func *
pui_backend_ani_alloc_ani_func(void);
void
pui_backend_ani_free_ani_func(pui_backend_ani_func *func);
+pui_backend_ani_data *
+pui_backend_ani_get_ani_data(pui_ani_t *ani);
+
#ifdef __cplusplus
}
#endif