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 #ifndef _LIBPUI_INTERNAL_H_
27 #define _LIBPUI_INTERNAL_H_
29 #define EFL_BETA_API_SUPPORT
32 #include <Ecore_Wl2.h>
34 #include <wayland-tbm-client.h>
35 #include <tbm_surface_internal.h>
36 #include "PUI_common.h"
42 #define PUI_MAGIC_NONE 0xfedc4321
43 #define PUI_MAGIC_PUI_M 0xDE9BBFAE
44 #define PUI_MAGIC_PUI_H 0xDE89C0AD
45 #define PUI_MAGIC_ANI_H 0xDE77C1AC
46 #define PUI_MAGIC_ANI_T 0xDE65C2AB
48 typedef unsigned int PUI_Magic;
49 #define PUI_MAGIC PUI_Magic __magic
51 #define PUI_MAGIC_SET(p, m) (p)->__magic = (m)
52 #define PUI_MAGIC_CHECK(p, m) ((p) && ((p)->__magic == (m)))
53 #define PUI_MAGIC_FAIL(p, m, fn) _pui_magic_fail((p), (p) ? (p)->__magic : 0, (m), (fn));
62 Eina_Array *ecore_event_hdls;
63 Ecore_Wl2_Frame_Cb_Handle *frame_done_cb;
76 pui_ani_status status;
79 pui_ani_control_buffer *buffer;
81 Eina_Bool (*frame_cb)(void *data);
82 pui_bool (*backend_frame_cb)(void *data, int serial);
84 double frame_interval;
85 Ecore_Timer *frame_cb_timer;
87 pui_backend_ani_data *ani_data;
94 Ecore_Wl2_Window *win;
95 Ecore_Wl2_Display *ewd;
98 struct wayland_tbm_client *wl_tbm_client;
99 tbm_surface_queue_h tbm_queue;
101 pui_ani_h current_ani_h;
102 tbm_surface_info_s current_sinfo;
103 tbm_surface_h current_surface;
104 pui_ani_control_buffer last_buffer;
106 pui_bool manual_render;
108 Eina_List *ani_handles;
110 pui_backend_module_data *backend_module_data;
113 struct _pui_module_data
118 pui_backend_module *backend_module_info;
119 pui_backend_module_data *backend_module_data;
127 _pui_magic_fail(const void *p, PUI_Magic m, PUI_Magic req_m, const char *fname);
129 pui_ani_control_buffer *
130 pui_ani_get_last_buffer(pui_ani_h ani_h);
132 pui_ani_control_buffer *
133 pui_ani_get_buffer(pui_ani_h ani_h);
136 pui_ani_set_buffer(pui_ani_h ani_h, pui_ani_control_buffer *buffer);
139 pui_ani_update(pui_ani_h ani_h);
142 pui_ani_add_frame_cb(pui_ani_t *ani, pui_bool (*frame_cb)(void *data, int serial), double frame_interval);
145 pui_ani_remove_frame_cb(pui_ani_t *ani);
148 pui_ani_status_update(pui_ani_t *ani, pui_ani_status status);
151 pui_ani_status_get(pui_ani_t *ani);
153 pui_backend_ani_data *
154 pui_ani_get_ani_data(pui_ani_t *ani);
160 #endif//_LIBPUI_INTERNAL_H_