2 * Copyright © 2019 Samsung Electronics co., Ltd. All Rights Reserved.
4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial
14 * portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
20 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26 #include "PUI_internal.h"
27 #include "PUI_backend.h"
29 pui_ani_control_buffer *
30 pui_backend_ani_get_buffer(pui_ani_t *ani)
32 pui_ani_control_buffer *buffer = NULL;
34 buffer = pui_ani_get_buffer(ani->ani_h);
43 pui_backend_ani_set_buffer(pui_ani_t *ani, pui_ani_control_buffer *buffer)
45 pui_int_error err = PUI_INT_ERROR_NONE;
48 return PUI_INT_ERROR_INVALID_BUFFER;
50 err = pui_ani_set_buffer(ani->ani_h, buffer);
56 pui_backend_ani_update(pui_ani_t *ani)
58 pui_int_error err = PUI_INT_ERROR_NONE;
60 err = pui_ani_update(ani->ani_h);
66 pui_backend_ani_status_get(pui_ani_t *ani)
68 return pui_ani_status_get(ani);
72 pui_backend_ani_add_frame_cb(pui_ani_t *ani, pui_bool (*frame_cb)(void *data, int serial), double frame_interval)
74 return pui_ani_add_frame_cb(ani, frame_cb, frame_interval);
78 pui_backend_ani_remove_frame_cb(pui_ani_t *ani)
80 pui_ani_remove_frame_cb(ani);
84 pui_backend_ani_status_update(pui_ani_t *ani, pui_ani_status status)
86 pui_ani_status_update(ani, status);
89 pui_backend_ani_func *
90 pui_backend_ani_alloc_ani_func(void)
92 pui_backend_ani_func *ani_func = NULL;
94 ani_func = (pui_backend_ani_func *)calloc(1, sizeof(pui_backend_ani_func));
98 pui_err("Failed to allocate memory !\n");
106 pui_backend_ani_free_ani_func(pui_backend_ani_func *ani_func)
110 pui_err("Invalid ani backend_func pointer !\n");
117 pui_backend_ani_data *
118 pui_backend_ani_get_ani_data(pui_ani_t *ani)
120 return pui_ani_get_ani_data(ani);