2 * Copyright 2013 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include <dynamicbox_service.h>
19 #ifndef __DYNAMICBOX_VIEWER_H
20 #define __DYNAMICBOX_VIEWER_H
28 * @brief This file declares API of libdynamicbox-viewer library
33 * @addtogroup CAPI_DYNAMICBOX_VIEWER_MODULE
39 * @brief Structure definition for a Dynamic Box instance.
42 typedef struct dynamicbox *dynamicbox_h;
46 * @brief Definition for a default update period for Dynamicbox (defined in the package manifest file).
49 #define DBOX_DEFAULT_PERIOD -1.0f
53 * @brief Enumeration for Mouse & Key event for buffer type Dynamic Box or Glance Bar.
54 * @details Viewer should send these events to dynamicbox.
57 typedef enum dynamicbox_mouse_event_type {
58 DBOX_MOUSE_EVENT_MASK = 0x20000000, /**< Mask value for mouse event */
59 DBOX_MOUSE_EVENT_GBAR_MASK = 0x10000000, /**< Mask value for Glance Bar event */
60 DBOX_MOUSE_EVENT_DBOX_MASK = 0x40000000, /**< Mask value for Dynamic Box event */
62 DBOX_MOUSE_EVENT_DOWN = 0x00000001, /**< Dynamic Box mouse down event for dynamicbox */
63 DBOX_MOUSE_EVENT_UP = 0x00000002, /**< Dynamic Box mouse up event for dynamicbox */
64 DBOX_MOUSE_EVENT_MOVE = 0x00000004, /**< Dynamic Box mouse move event for dynamicbox */
65 DBOX_MOUSE_EVENT_ENTER = 0x00000008, /**< Dynamic Box mouse enter event for dynamicbox */
66 DBOX_MOUSE_EVENT_LEAVE = 0x00000010, /**< Dynamic Box mouse leave event for dynamicbox */
67 DBOX_MOUSE_EVENT_SET = 0x00000020, /**< Dynamic Box mouse set auto event for dynamicbox */
68 DBOX_MOUSE_EVENT_UNSET = 0x00000040, /**< Dynamic Box mouse unset auto event for dynamicbox */
70 DBOX_MOUSE_EVENT_ON_SCROLL = 0x00000080, /**< Dynamic Box On scrolling */
71 DBOX_MOUSE_EVENT_ON_HOLD = 0x00000100, /**< Dynamic Box On holding */
72 DBOX_MOUSE_EVENT_OFF_SCROLL = 0x00000200, /**< Dynamic Box Stop scrolling */
73 DBOX_MOUSE_EVENT_OFF_HOLD = 0x00000400, /**< Dynamic Box Stop holding */
75 DBOX_MOUSE_ON_SCROLL = DBOX_MOUSE_EVENT_DBOX_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_ON_SCROLL, /**< Mouse event occurs while scrolling */
76 DBOX_MOUSE_ON_HOLD = DBOX_MOUSE_EVENT_DBOX_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_ON_HOLD, /**< Mouse event occurs on holding */
77 DBOX_MOUSE_OFF_SCROLL = DBOX_MOUSE_EVENT_DBOX_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_OFF_SCROLL, /**< Scrolling stopped */
78 DBOX_MOUSE_OFF_HOLD = DBOX_MOUSE_EVENT_DBOX_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_OFF_HOLD, /**< Holding stopped */
80 DBOX_MOUSE_DOWN = DBOX_MOUSE_EVENT_DBOX_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_DOWN, /**< Mouse down on the dynamicbox */
81 DBOX_MOUSE_UP = DBOX_MOUSE_EVENT_DBOX_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_UP, /**< Mouse up on the dynamicbox */
82 DBOX_MOUSE_MOVE = DBOX_MOUSE_EVENT_DBOX_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_MOVE, /**< Move move on the dynamicbox */
83 DBOX_MOUSE_ENTER = DBOX_MOUSE_EVENT_DBOX_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_ENTER, /**< Mouse enter to the dynamicbox */
84 DBOX_MOUSE_LEAVE = DBOX_MOUSE_EVENT_DBOX_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_LEAVE, /**< Mouse leave from the dynamicbox */
85 DBOX_MOUSE_SET = DBOX_MOUSE_EVENT_DBOX_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_SET, /**< Mouse event, start feeding event by master */
86 DBOX_MOUSE_UNSET = DBOX_MOUSE_EVENT_DBOX_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_UNSET, /**< Mouse event, stop feeding event by master */
88 DBOX_GBAR_MOUSE_ON_SCROLL = DBOX_MOUSE_EVENT_GBAR_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_ON_SCROLL, /**< Mouse event occurs while scrolling */
89 DBOX_GBAR_MOUSE_ON_HOLD = DBOX_MOUSE_EVENT_GBAR_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_ON_HOLD, /**< Mouse event occurs on holding */
90 DBOX_GBAR_MOUSE_OFF_SCROLL = DBOX_MOUSE_EVENT_GBAR_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_OFF_SCROLL, /**< Scrolling stopped */
91 DBOX_GBAR_MOUSE_OFF_HOLD = DBOX_MOUSE_EVENT_GBAR_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_OFF_HOLD, /**< Holding stopped */
93 DBOX_GBAR_MOUSE_DOWN = DBOX_MOUSE_EVENT_GBAR_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_DOWN, /**< Mouse down on the Glance Bar */
94 DBOX_GBAR_MOUSE_UP = DBOX_MOUSE_EVENT_GBAR_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_UP, /**< Mouse up on the Glance Bar */
95 DBOX_GBAR_MOUSE_MOVE = DBOX_MOUSE_EVENT_GBAR_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_MOVE, /**< Mouse move on the Glance Bar */
96 DBOX_GBAR_MOUSE_ENTER = DBOX_MOUSE_EVENT_GBAR_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_ENTER, /**< Mouse enter to the Glance Bar */
97 DBOX_GBAR_MOUSE_LEAVE = DBOX_MOUSE_EVENT_GBAR_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_LEAVE, /**< Mouse leave from the Glance Bar */
98 DBOX_GBAR_MOUSE_SET = DBOX_MOUSE_EVENT_GBAR_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_SET, /**< Mouse event, start feeding event by master */
99 DBOX_GBAR_MOUSE_UNSET = DBOX_MOUSE_EVENT_GBAR_MASK | DBOX_MOUSE_EVENT_MASK | DBOX_MOUSE_EVENT_UNSET, /**< Mouse event, stop feeding event by master */
101 DBOX_MOUSE_EVENT_MAX = 0xFFFFFFFF /**< Unknown event */
102 } dynamicbox_mouse_event_type_e;
104 typedef enum dynamicbox_key_event_type {
105 DBOX_KEY_EVENT_MASK = 0x80000000, /**< Mask value for key event */
106 DBOX_KEY_EVENT_GBAR_MASK = 0x10000000, /**< Mask value for Glance Bar event */
107 DBOX_KEY_EVENT_DBOX_MASK = 0x40000000, /**< Mask value for Dynamic Box event */
109 DBOX_KEY_EVENT_DOWN = 0x00000001, /**< Dynamic Box key press */
110 DBOX_KEY_EVENT_UP = 0x00000002, /**< Dynamic Box key release */
111 DBOX_KEY_EVENT_FOCUS_IN = 0x00000008, /**< Dynamic Box key focused in */
112 DBOX_KEY_EVENT_FOCUS_OUT = 0x00000010, /**< Dynamic Box key focused out */
113 DBOX_KEY_EVENT_SET = 0x00000020, /**< Dynamic Box Key, start feeding event by master */
114 DBOX_KEY_EVENT_UNSET = 0x00000040, /**< Dynamic Box key, stop feeding event by master */
116 DBOX_KEY_DOWN = DBOX_KEY_EVENT_MASK | DBOX_KEY_EVENT_DBOX_MASK | DBOX_KEY_EVENT_DOWN, /**< Key down on the dynamicbox */
117 DBOX_KEY_UP = DBOX_KEY_EVENT_MASK | DBOX_KEY_EVENT_DBOX_MASK | DBOX_KEY_EVENT_UP, /**< Key up on the dynamicbox */
118 DBOX_KEY_SET = DBOX_KEY_EVENT_MASK | DBOX_KEY_EVENT_DBOX_MASK | DBOX_KEY_EVENT_SET, /**< Key event, start feeding event by master */
119 DBOX_KEY_UNSET = DBOX_KEY_EVENT_MASK | DBOX_KEY_EVENT_DBOX_MASK | DBOX_KEY_EVENT_UNSET, /**< Key event, stop feeding event by master */
120 DBOX_KEY_FOCUS_IN = DBOX_KEY_EVENT_MASK | DBOX_KEY_EVENT_DBOX_MASK | DBOX_KEY_EVENT_FOCUS_IN, /**< Key event, focus in */
121 DBOX_KEY_FOCUS_OUT = DBOX_KEY_EVENT_MASK | DBOX_KEY_EVENT_DBOX_MASK | DBOX_KEY_EVENT_FOCUS_OUT, /**< Key event, foucs out */
123 DBOX_GBAR_KEY_DOWN = DBOX_KEY_EVENT_MASK | DBOX_KEY_EVENT_GBAR_MASK | DBOX_KEY_EVENT_DOWN, /**< Key down on the dynamicbox */
124 DBOX_GBAR_KEY_UP = DBOX_KEY_EVENT_MASK | DBOX_KEY_EVENT_GBAR_MASK | DBOX_KEY_EVENT_UP, /**< Key up on the dynamicbox */
125 DBOX_GBAR_KEY_SET = DBOX_KEY_EVENT_MASK | DBOX_KEY_EVENT_GBAR_MASK | DBOX_KEY_EVENT_SET, /**< Key event, start feeding event by master */
126 DBOX_GBAR_KEY_UNSET = DBOX_KEY_EVENT_MASK | DBOX_KEY_EVENT_GBAR_MASK | DBOX_KEY_EVENT_UNSET, /**< Key event, stop feeding event by master */
127 DBOX_GBAR_KEY_FOCUS_IN = DBOX_KEY_EVENT_MASK | DBOX_KEY_EVENT_GBAR_MASK | DBOX_KEY_EVENT_FOCUS_IN, /**< Key event, focus in */
128 DBOX_GBAR_KEY_FOCUS_OUT = DBOX_KEY_EVENT_MASK | DBOX_KEY_EVENT_GBAR_MASK | DBOX_KEY_EVENT_FOCUS_OUT, /**< Key event, focus out */
130 DBOX_KEY_EVENT_MAX = 0xFFFFFFFF /**< Unknown event */
131 } dynamicbox_key_event_type_e;
135 * @brief Enumeration for Accessibility event for buffer type Dynamic Box or Glance Bar.
136 * @details These events are sync'd with Tizen accessibility event set.
139 typedef enum dynamicbox_access_event_type {
140 DBOX_ACCESS_EVENT_GBAR_MASK = 0x10000000, /**< Glance Bar Accessibilivent mask */
141 DBOX_ACCESS_EVENT_DBOX_MASK = 0x20000000, /**< Dynamic Box Accessibility event mask */
143 DBOX_ACCESS_EVENT_HIGHLIGHT = 0x00000100, /**< Dynamic Box accessibility: Hightlight a object, Next, Prev,Unhighlight */
144 DBOX_ACCESS_EVENT_ACTIVATE = 0x00000200, /**< Dynamic Box accessibility activate */
145 DBOX_ACCESS_EVENT_ACTION = 0x00000400, /**< Dynamic Box accessibility value changed, Up, Down */
146 DBOX_ACCESS_EVENT_SCROLL = 0x00000800, /**< Dynamic Box accessibility scroll down, move, up */
147 DBOX_ACCESS_EVENT_VALUE_CHANGE = 0x00001000, /**< LB accessibility value change */
148 DBOX_ACCESS_EVENT_MOUSE = 0x00002000, /**< Give mouse event to highlight object, down, move, up */
149 DBOX_ACCESS_EVENT_BACK = 0x00004000, /**< Go back to a previous view ex: pop naviframe item */
150 DBOX_ACCESS_EVENT_OVER = 0x00008000, /**< Mouse over an object */
151 DBOX_ACCESS_EVENT_READ = 0x00010000, /**< Highlight an object */
152 DBOX_ACCESS_EVENT_ENABLE = 0x00020000, /**< Disable highlight and read ability, disable, enable */
154 DBOX_ACCESS_HIGHLIGHT = DBOX_ACCESS_EVENT_DBOX_MASK | DBOX_ACCESS_EVENT_HIGHLIGHT, /**< Access event - Highlight an object in the dynamicbox */
155 DBOX_ACCESS_ACTIVATE = DBOX_ACCESS_EVENT_DBOX_MASK | DBOX_ACCESS_EVENT_ACTIVATE, /**< Access event - Launch or activate the highlighted object */
156 DBOX_ACCESS_ACTION = DBOX_ACCESS_EVENT_DBOX_MASK | DBOX_ACCESS_EVENT_ACTION, /**< Access event - down */
157 DBOX_ACCESS_SCROLL = DBOX_ACCESS_EVENT_DBOX_MASK | DBOX_ACCESS_EVENT_SCROLL, /**< Access event - scroll down */
158 DBOX_ACCESS_VALUE_CHANGE = DBOX_ACCESS_EVENT_DBOX_MASK | DBOX_ACCESS_EVENT_VALUE_CHANGE, /**< LB accessibility value change */
159 DBOX_ACCESS_MOUSE = DBOX_ACCESS_EVENT_DBOX_MASK | DBOX_ACCESS_EVENT_MOUSE, /**< Give mouse event to highlight object */
160 DBOX_ACCESS_BACK = DBOX_ACCESS_EVENT_DBOX_MASK | DBOX_ACCESS_EVENT_BACK, /**< Go back to a previous view ex: pop naviframe item */
161 DBOX_ACCESS_OVER = DBOX_ACCESS_EVENT_DBOX_MASK | DBOX_ACCESS_EVENT_OVER, /**< Mouse over an object */
162 DBOX_ACCESS_READ = DBOX_ACCESS_EVENT_DBOX_MASK | DBOX_ACCESS_EVENT_READ, /**< Highlight an object */
163 DBOX_ACCESS_ENABLE = DBOX_ACCESS_EVENT_DBOX_MASK | DBOX_ACCESS_EVENT_ENABLE, /**< Enable highlight and read ability */
165 DBOX_GBAR_ACCESS_HIGHLIGHT = DBOX_ACCESS_EVENT_GBAR_MASK | DBOX_ACCESS_EVENT_HIGHLIGHT, /**< Access event - Highlight an object in the Glance Bar */
166 DBOX_GBAR_ACCESS_ACTIVATE = DBOX_ACCESS_EVENT_GBAR_MASK | DBOX_ACCESS_EVENT_ACTIVATE, /**< Access event - Launch or activate the highlighted object */
167 DBOX_GBAR_ACCESS_ACTION = DBOX_ACCESS_EVENT_GBAR_MASK | DBOX_ACCESS_EVENT_ACTION, /**< Access event - down */
168 DBOX_GBAR_ACCESS_SCROLL = DBOX_ACCESS_EVENT_GBAR_MASK | DBOX_ACCESS_EVENT_SCROLL, /**< Access event - scroll down */
169 DBOX_GBAR_ACCESS_VALUE_CHANGE = DBOX_ACCESS_EVENT_GBAR_MASK | DBOX_ACCESS_EVENT_VALUE_CHANGE, /**< LB accessibility value change */
170 DBOX_GBAR_ACCESS_MOUSE = DBOX_ACCESS_EVENT_GBAR_MASK | DBOX_ACCESS_EVENT_MOUSE, /**< Give mouse event to highlight object */
171 DBOX_GBAR_ACCESS_BACK = DBOX_ACCESS_EVENT_GBAR_MASK | DBOX_ACCESS_EVENT_BACK, /**< Go back to a previous view ex: pop naviframe item */
172 DBOX_GBAR_ACCESS_OVER = DBOX_ACCESS_EVENT_GBAR_MASK | DBOX_ACCESS_EVENT_OVER, /**< Mouse over an object */
173 DBOX_GBAR_ACCESS_READ = DBOX_ACCESS_EVENT_GBAR_MASK | DBOX_ACCESS_EVENT_READ, /**< Highlight an object */
174 DBOX_GBAR_ACCESS_ENABLE = DBOX_ACCESS_EVENT_GBAR_MASK | DBOX_ACCESS_EVENT_ENABLE, /**< Enable highlight and read ability */
175 DBOX_GBAR_ACCESS_EVENT_MAX = 0xFFFFFFFF
176 } dynamicbox_access_event_type_e;
180 * @brief Enumeration for Dynamic Box content type.
183 typedef enum dynamicbox_type {
184 DBOX_CONTENT_TYPE_IMAGE = 0x01, /**< Contents of a dynamicbox is based on the image file */
185 DBOX_CONTENT_TYPE_BUFFER = 0x02, /**< Contents of a dynamicbox is based on canvas buffer(shared) */
186 DBOX_CONTENT_TYPE_TEXT = 0x04, /**< Contents of a dynamicbox is based on formatted text file */
187 DBOX_CONTENT_TYPE_RESOURCE_ID = 0x08, /**< Contens of a dynamicbox is shared by the resource id(depends on window system) */
188 DBOX_CONTENT_TYPE_UIFW = 0x10, /**< Using UI F/W resource for sharing content & event */
189 DBOX_CONTENT_TYPE_INVALID = 0xFF /**< Unknown Dynamic Box type */
194 * @brief Enumeration for Dynamicbox event type.
195 * @details These events will be sent from the provider.
198 typedef enum dynamicbox_event_type { /**< dynamicbox_event_handler_set Event list */
199 DBOX_EVENT_DBOX_UPDATED, /**< Contents of the given dynamicbox is updated */
200 DBOX_EVENT_DBOX_EXTRA_UPDATED,
201 DBOX_EVENT_GBAR_UPDATED, /**< Contents of the given pd is updated */
202 DBOX_EVENT_GBAR_EXTRA_UPDATED,
204 DBOX_EVENT_CREATED, /**< A new dynamicbox is created */
205 DBOX_EVENT_DELETED, /**< A dynamicbox is deleted */
207 DBOX_EVENT_GROUP_CHANGED, /**< Group (Cluster/Sub-cluster) information is changed */
208 DBOX_EVENT_PINUP_CHANGED, /**< PINUP status is changed */
209 DBOX_EVENT_PERIOD_CHANGED, /**< Update period is changed */
211 DBOX_EVENT_DBOX_SIZE_CHANGED, /**< Dynamicbox size is changed */
212 DBOX_EVENT_GBAR_SIZE_CHANGED, /**< Glance Bar size is changed */
214 DBOX_EVENT_GBAR_CREATED, /**< If a Glance Bar is created even if you didn't call the dynamicbox_create_glance_bar API */
215 DBOX_EVENT_GBAR_DESTROYED, /**< If a Glance Bar is destroyed even if you didn't call the dynamicbox_destroy_glance_bar API */
217 DBOX_EVENT_HOLD_SCROLL, /**< If the screen should be freezed */
218 DBOX_EVENT_RELEASE_SCROLL, /**< If the screen can be scrolled */
220 DBOX_EVENT_DBOX_UPDATE_BEGIN, /**< Dynamic Box content update is started */
221 DBOX_EVENT_DBOX_UPDATE_END, /**< Dynamic Box content update is finished */
223 DBOX_EVENT_GBAR_UPDATE_BEGIN, /**< Glance Bar content update is started */
224 DBOX_EVENT_GBAR_UPDATE_END, /**< Glance Bar content update is finished */
226 DBOX_EVENT_UPDATE_MODE_CHANGED, /**< Dynamic Box Update mode is changed */
228 DBOX_EVENT_REQUEST_CLOSE_GBAR, /**< Dynamic Box requests to close the Glance Bar */
230 DBOX_EVENT_EXTRA_INFO_UPDATED, /**< Extra information is updated */
232 DBOX_EVENT_DBOX_EXTRA_BUFFER_CREATED, /**< DBOX Extra Buffer created event */
233 DBOX_EVENT_GBAR_EXTRA_BUFFER_CREATED, /**< GBAR Extra Buffer created event */
235 DBOX_EVENT_DBOX_EXTRA_BUFFER_DESTROYED, /**< DBOX Extra Buffer destroyed event */
236 DBOX_EVENT_GBAR_EXTRA_BUFFER_DESTROYED, /**< DBOX Extra Buffer destroyed event */
238 DBOX_EVENT_IGNORED = 0xFF /**< Request is ignored */
239 } dynamicbox_event_type_e;
243 * @brief Enumeration for Dynamicbox option types.
246 typedef enum dynamicbox_option_type {
247 DBOX_OPTION_MANUAL_SYNC, /**< Sync frame manually */
248 DBOX_OPTION_FRAME_DROP_FOR_RESIZE, /**< Drop frames while resizing */
249 DBOX_OPTION_SHARED_CONTENT, /**< Use only one real instance for multiple fake instances if user creates dbox for same content */
250 DBOX_OPTION_DIRECT_UPDATE, /**< Use the private socket for receiving updated event */
251 DBOX_OPTION_EXTRA_BUFFER_CNT, /**< Extra buffer count, ReadOnly value */
253 DBOX_OPTION_ERROR = 0xFFFFFFFF /**< To specify the size of this enumeration type */
254 } dynamicbox_option_type_e;
258 * @brief Reason of faults
261 typedef enum dynamicbox_fault_type {
262 DBOX_FAULT_DEACTIVATED, /**< Dynamicbox is deactivated by its fault operation */
263 DBOX_FAULT_PROVIDER_DISCONNECTED, /**< Provider is disconnected */
264 DBOX_FAULT_MAX = 0xFF /**< To specify the size of this enumeration type, some compiler enjoy of this kind of notation */
265 } dynamicbox_fault_type_e;
269 * @brief Enumeration for Dynamicbox visible states.
270 * @details Must be sync'd with a provider.
273 typedef enum dynamicbox_visible_state {
274 DBOX_SHOW = 0x00, /**< Dynamicbox is shown. Default state */
275 DBOX_HIDE = 0x01, /**< Dynamicbox is hidden, Update timer will not be freezed. but you cannot receive any updates events. */
277 DBOX_HIDE_WITH_PAUSE = 0x02, /**< Dynamicbox is hidden, it will pause the update timer, but if a dynamicbox updates its contents, update event will be triggered */
279 DBOX_VISIBLE_ERROR = 0xFF /**< To specify the size of this enumeration type */
280 } dynamicbox_visible_state_e;
284 * @brief Accessibility Event type
286 * @see dynamicbox_feed_access_event()
288 typedef enum dynamicbox_access_info_type {
289 DBOX_ACCESS_TYPE_NONE = 0x00, /**< Initialized */
291 DBOX_ACCESS_TYPE_DOWN = 0x00, /**< Mouse down */
292 DBOX_ACCESS_TYPE_MOVE = 0x01, /**< Mouse move */
293 DBOX_ACCESS_TYPE_UP = 0x02, /**< Mouse up */
295 DBOX_ACCESS_TYPE_HIGHLIGHT = 0x00, /**< Highlight */
296 DBOX_ACCESS_TYPE_HIGHLIGHT_NEXT = 0x01, /**< Highlight next */
297 DBOX_ACCESS_TYPE_HIGHLIGHT_PREV = 0x02, /**< Highlight prev */
298 DBOX_ACCESS_TYPE_UNHIGHLIGHT = 0x03, /**< Unhighlight */
300 DBOX_ACCESS_TYPE_DISABLE = 0x00, /**< Disable */
301 DBOX_ACCESS_TYPE_ENABLE = 0x01 /**< Enable */
302 } dynamicbox_access_info_type_e;
306 * @brief Accessibility Event Information
309 typedef struct dynamicbox_access_event_info {
310 double x; /**< X Coordinates that the event occurred */
311 double y; /**< Y Coordinates that the event occurred */
312 dynamicbox_access_info_type_e type; /**< Accessibility event type */
313 int info; /**< Extra information for this event */
314 } *dynamicbox_access_event_info_t;
318 * @brief Damaged Region representation
321 typedef struct dynamicbox_damage_region {
322 int x; /**< Coordinates X of Left-Top corner */
323 int y; /**< Coordinates Y of Left-Top corner */
324 int w; /**< Damage'd Width */
325 int h; /**< Damage'd Height */
326 } dynamicbox_damage_region_t;
330 * @brief Mouse Event Information
333 typedef struct dynamicbox_mouse_event_info {
334 double x; /**< X coordinates of Mouse Event */
335 double y; /**< Y coordinates of Mouse Event */
336 } *dynamicbox_mouse_event_info_t;
340 * @brief Key Event Information
343 typedef struct dynamicbox_key_event_info {
344 unsigned int keycode; /**< Key code */
345 } *dynamicbox_key_event_info_t;
349 * @brief Text Event Information
352 typedef struct dynamicbox_text_event {
353 const char *emission;
361 } *dynamicbox_text_event_t;
365 * @brief Structure for TEXT type dynamicbox contents handling opertators.
368 typedef struct dynamicbox_script_operators {
369 int (*update_begin)(dynamicbox_h handle); /**< Content parser is started */
370 int (*update_end)(dynamicbox_h handle); /**< Content parser is finished */
372 /* Listed functions will be called when parser meets each typed content */
373 int (*update_text)(dynamicbox_h handle, const char *id, const char *part, const char *data); /**< Update text content */
374 int (*update_image)(dynamicbox_h handle, const char *id, const char *part, const char *data, const char *option); /**< Update image content */
375 int (*update_script)(dynamicbox_h handle, const char *id, const char *new_id, const char *part, const char *file, const char *group); /**< Update script content */
376 int (*update_signal)(dynamicbox_h handle, const char *id, const char *emission, const char *signal); /**< Update signal */
377 int (*update_drag)(dynamicbox_h handle, const char *id, const char *part, double dx, double dy); /**< Update drag info */
378 int (*update_info_size)(dynamicbox_h handle, const char *id, int w, int h); /**< Update content size */
379 int (*update_info_category)(dynamicbox_h handle, const char *id, const char *category); /**< Update content category info */
380 int (*update_access)(dynamicbox_h handle, const char *id, const char *part, const char *text, const char *option); /**< Update access information */
381 int (*operate_access)(dynamicbox_h handle, const char *id, const char *part, const char *operation, const char *option); /**< Update access operation */
382 int (*update_color)(dynamicbox_h handle, const char *id, const char *part, const char *data); /**< Update color */
383 } *dynamicbox_script_operator_t;
387 * @brief Called for every async function.
388 * @details Prototype of the return callback of every async functions.
390 * @param[in] handle Handle of the dynamicbox instance
391 * @param[in] ret Result status of operation (DBOX_STATUS_XXX defined from libdynamicbox-service)
392 * @param[in] data Data for result callback
394 * @see dynamicbox_add()
395 * @see dynamicbox_del()
396 * @see dynamicbox_activate()
397 * @see dynamicbox_resize()
398 * @see dynamicbox_set_group()
399 * @see dynamicbox_set_period()
400 * @see dynamicbox_access_event()
401 * @see dynamicbox_set_pinup()
402 * @see dynamicbox_create_glance_bar()
403 * @see dynamicbox_destroy_glance_bar()
404 * @see dynamicbox_emit_text_signal()
405 * @see dynamicbox_acquire_resource_id()
406 * @see dynamicbox_set_update_mode()
408 typedef void (*dynamicbox_ret_cb)(dynamicbox_h handle, int ret, void *data);
412 * @brief Fault event handler
413 * @param[in] type Type of fault event.
414 * @param[in] dbox_id Faulted DynamicBox Id
415 * @param[in] file faulted filename (implementation file if it is supported)
416 * @param[in] func faulted function name (if it is supported)
417 * @param[in] data Callback data
419 * @retval @c EXIT_FAILURE delete this event callback from the event callback list
420 * @retval @c EXIT_SUCCESS successfully handled, keep this callback in the event callback list
422 typedef int (*dynamicbox_fault_handler_cb)(enum dynamicbox_fault_type type, const char *dbox_id, const char *file, const char *func, void *data);
426 * @brief Event handler
428 * @param[in] handler Dynamic Box Event handler
429 * @param[in] event Event type for Dynamic Box
430 * @param[in] data Callback Data
432 * @return @c EXIT_FAILURE delete this event callback from the event callback list
433 * @return @c EXIT_SUCCESS successfully handled, keep this callback in the event callback list
435 typedef int (*dynamicbox_event_handler_cb)(dynamicbox_h handler, dynamicbox_event_type_e event, void *data);
439 * @brief Auto launch handler
441 * @param[in] handler DynamicBox Handler
442 * @param[in] appid UI Application Id, which should be launched
443 * @param[in] data callback data
445 typedef int (*dynamicbox_auto_launch_handler_cb)(dynamicbox_h handler, const char *appid, void *data);
449 * @brief Initializes the dynamicbox system with some options.
450 * @details dynamicbox_init function uses environment value to initiate some configurable values.
451 * But some applications do not want to use the env value.
452 * For them, this API will give a chance to set default options using given arguments.
453 * @a disp is a Display object which is used to hold a connection with a display server (eg, Xorg)
455 * @param[in] disp Display, If @a disp is @c NULL, the library will try to acquire a new connection to display server
456 * @param[in] prevent_overwrite Overwrite flag (when the content of an image type dynamicbox is updated, it will be overwriten (0) or not (1))
457 * @param[in] event_filter If the dynamicbox_feed_mouse_event() is called again in this secs, it will be ignored and the dynamicbox_feed_mouse_event() will returns DBOX_STATUS_ERROR_BUSY status code
458 * @param[in] use_thread If this value has true, the viewer library will create a new thread to communicate with master service
459 * @privlevel platform
460 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
461 * @return int Integer, Dynamicbox status code
462 * @retval #DBOX_STATUS_ERROR_NONE if successfully initialized.
463 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY If a memory is not enough to do this operation.
464 * @retval #DBOX_STATUS_ERROR_IO_ERROR If fails to access dynamicbox database.
465 * @see dynamicbox_fini()
466 * @see dynamicbox_feed_mouse_event()
468 extern int dynamicbox_init(void *disp, int prevent_overwrite, double event_filter, int use_thread);
472 * @brief Finalizes the dynamicbox system.
474 * @privlevel platform
475 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
477 * @retval #DBOX_STATUS_SUCCES if success
478 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER if dynamicbox_init is not called
479 * @see dynamicbox_init()
481 extern int dynamicbox_fini(void);
485 * @brief Notifies the status of a client ("it is paused") to the provider.
487 * @privlevel platform
488 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
490 * @retval #DBOX_STATUS_ERROR_NONE if success
491 * @retval #DBOX_STATUS_ERROR_FAULT if it failed to send state (paused) info
492 * @see dynamicbox_client_set_resumed()
494 extern int dynamicbox_viewer_set_paused(void);
498 * @brief Notifies the status of client ("it is resumed") to the provider.
500 * @privlevel platform
501 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
503 * @retval #DBOX_STATUS_ERROR_NONE if success
504 * @retval #DBOX_STATUS_ERROR_FAULT if it failed to send state (resumed) info
505 * @see dynamicbox_client_set_paused()
507 extern int dynamicbox_viewer_set_resumed(void);
511 * @brief Adds a new dynamicbox.
512 * @details If the screen size is "1280x720", the below size lists are used for default.
513 * Or you can find the default sizes in pixel from /usr/share/data-provider-master/resolution.ini.
514 * Size types are defined from the libdynamicbox-service package (dynamicbox-service.h).
516 * Normal mode dynamicbox
517 * 1x1=175x175, #DBOX_SIZE_TYPE_1x1
518 * 2x1=354x175, #DBOX_SIZE_TYPE_2x1
519 * 2x2=354x354, #DBOX_SIZE_TYPE_2x2
520 * 4x1=712x175, #DBOX_SIZE_TYPE_4x1
521 * 4x2=712x354, #DBOX_SIZE_TYPE_4x2
522 * 4x4=712x712, #DBOX_SIZE_TYPE_4x4
525 * 4x3=712x533, #DBOX_SIZE_TYPE_4x3
526 * 4x5=712x891, #DBOX_SIZE_TYPE_4x5
527 * 4x6=712x1070, #DBOX_SIZE_TYPE_4x6
529 * Easy mode dynamicbox
530 * 21x21=224x215, #DBOX_SIZE_TYPE_EASY_1x1
531 * 23x21=680x215, #DBOX_SIZE_TYPE_EASY_3x1
532 * 23x23=680x653, #DBOX_SIZE_TYPE_EASY_3x3
535 * 0x0=720x1280, #DBOX_SIZE_TYPE_0x0
538 * This is an ASYNCHRONOUS API.
539 * Even if you get a handle from the return value of this function, it is not a created instance.
540 * So you have to consider it as a not initialized handle.
541 * It can be initialized only after getting the return callback with "ret == #DBOX_STATUS_ERROR_NONE"
542 * This function is Asynchronous, so you will get result of add requst from @a cb, if you failed to send request to create a new dynamicbox,
543 * This function will returns proper error code
544 * If this returns @c NULL, you can get the reason of failure using dynamicbox_last_status()
545 * @param[in] dbox_id DynamicBox Id
546 * @param[in] content Contents that will be given to the dynamicbox instance
547 * @param[in] cluster Main group
548 * @param[in] category Sub group
549 * @param[in] period Update period (@c DBOX_DEFAULT_PERIOD can be used for this; this argument will be used to specify the period of updating contents of a dynamicbox)
550 * @param[in] type Size type (defined from libdynamicbox-service package)
551 * @param[in] cb After the request is sent to the master provider, this callback will be called
552 * @param[in] data This data will be passed to the callback
553 * @privlevel platform
554 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
556 * @retval Handle Dynamicbox handle but not yet initialized
557 * @retval @c NULL if it fails to create a handle
558 * @see dynamicbox_ret_cb
560 extern dynamicbox_h dynamicbox_add(const char *dbox_id, const char *content, const char *cluster, const char *category, double period, dynamicbox_size_type_e type, dynamicbox_ret_cb cb, void *data);
564 * @brief Deletes a dynamicbox (will replace dynamicbox_del).
567 * This is an ASYNCHRONOUS API.
568 * If you call this with an uninitialized handle, the return callback will be called synchronously.
569 * So before returning from this function, the return callback will be called first.
570 * This function is Asynchronous, so you will get result of add requst from @a cb, if you failed to send request to create a new dynamicbox,
571 * This function will returns proper error code
572 * @param[in] handler Handler of a dynamicbox instance
573 * @param[in] type Deletion type (DBOX_DELETE_PERMANENTLY or DBOX_DELETE_TEMPORARY)
574 * @param[in] cb Return callback
575 * @param[in] data User data for return callback
576 * @privlevel platform
577 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
579 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
580 * @retval #DBOX_STATUS_ERROR_BUSY Already in process
581 * @retval #DBOX_STATUS_ERROR_FAULT Failed to create a request packet
582 * @retval #DBOX_STATUS_ERROR_NONE Successfully sent, return callack will be called
583 * @see dynamicbox_ret_cb
585 extern int dynamicbox_del(dynamicbox_h handler, dynamicbox_delete_type_e type, dynamicbox_ret_cb cb, void *data);
589 * @brief Sets a dynamicbox events callback.
590 * @details To get the event which is pushed from the provider, Register the event callback using this API.
591 * The registered callback will be invoked if there are any events from the provider.
593 * @param[in] cb Event handler
594 * @param[in] data User data for the event handler
596 * @retval #DBOX_STATUS_ERROR_NONE If succeed to set event handler
597 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
598 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory
599 * @see dynamicbox_unset_event_handler()
601 extern int dynamicbox_add_event_handler(dynamicbox_event_handler_cb cb, void *data);
605 * @brief Unsets the dynamicbox event handler.
607 * @param[in] cb Event handler
608 * @return void * Event handler data
609 * @retval pointer Pointer of 'data' which is used with the dynamicbox_set_event_handler
610 * @see dynamicbox_set_event_handler()
612 extern void *dynamicbox_remove_event_handler(dynamicbox_event_handler_cb cb);
616 * @brief Registers the dynamicbox fault event handler.
617 * @details Argument list: event, pkgname, filename, funcname.
619 * @param[in] cb Event handler
620 * @param[in] data Event handler data
622 * @retval #DBOX_STATUS_ERROR_NONE If succeed to set fault event handler
623 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
624 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory
625 * @see dynamicbox_unset_fault_handler()
627 extern int dynamicbox_add_fault_handler(dynamicbox_fault_handler_cb cb, void *data);
631 * @brief Unsets the dynamicbox fault event handler.
633 * @param[in] cb Event handler
634 * @return void * Callback data which is set via dynamicbox_set_fault_handler
635 * @retval pointer Pointer of 'data' which is used with the dynamicbox_set_fault_handler
636 * @see dynamicbox_set_fault_handler()
638 extern void *dynamicbox_remove_fault_handler(dynamicbox_fault_handler_cb cb);
642 * @brief Activates the faulted dynamicbox.
643 * @details Request result will be returned via return callback.
646 * This is an ASYNCHRONOUS API.
647 * Even though this function returns ERROR_NONE, it means that it just successfully sent a request to the provider.
648 * So you have to check the return callback and its "ret" argument.
649 * This function is Asynchronous, so you will get result of add requst from @a cb, if you failed to send request to create a new dynamicbox,
650 * This function will returns proper error code
651 * @param[in] dbox_id Package name which should be activated
652 * @param[in] cb Result callback
653 * @param[in] data Callback data
654 * @privlevel platform
655 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
657 * @retval #DBOX_STATUS_ERROR_NONE Successfully sent a request
658 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
659 * @retval #DBOX_STATUS_ERROR_FAULT Failed to make a request
660 * @see dynamicbox_ret_cb
662 extern int dynamicbox_activate(const char *dbox_id, dynamicbox_ret_cb cb, void *data);
666 * @brief Resizes the dynamicbox.
668 * Normal mode dynamicbox size
669 * 1x1=175x175, DBOX_SIZE_TYPE_1x1
670 * 2x1=354x175, DBOX_SIZE_TYPE_2x1
671 * 2x2=354x354, DBOX_SIZE_TYPE_2x2
672 * 4x1=712x175, DBOX_SIZE_TYPE_4x1
673 * 4x2=712x354, DBOX_SIZE_TYPE_4x2
674 * 4x4=712x712, DBOX_SIZE_TYPE_4x4
676 * Extended dynamicbox size
677 * 4x3=712x533, DBOX_SIZE_TYPE_4x3
678 * 4x5=712x891, DBOX_SIZE_TYPE_4x5
679 * 4x6=712x1070, DBOX_SIZE_TYPE_4x6
681 * Easy mode dynamicbox size
682 * 21x21=224x215, DBOX_SIZE_TYPE_EASY_1x1
683 * 23x21=680x215, DBOX_SIZE_TYPE_EASY_3x1
684 * 23x23=680x653, DBOX_SIZE_TYPE_EASY_3x3
686 * Special mode dynamicbox size
687 * 0x0=720x1280, DBOX_SIZE_TYPE_0x0
690 * This is an ASYNCHRONOUS API.
691 * This function is Asynchronous, so you will get result of add requst from @a cb, if you failed to send request to create a new dynamicbox,
692 * This function will returns proper error code
693 * @param[in] handler Handler of a dynamicbox instance
694 * @param[in] type Type of a dynamicbox size (e.g., DBOX_SIZE_TYPE_1x1, ...)
695 * @param[in] cb Result callback of the resize operation
696 * @param[in] data User data for return callback
697 * @privlevel platform
698 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
700 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
701 * @retval #DBOX_STATUS_ERROR_BUSY Previous request of resize is in progress
702 * @retval #DBOX_STATUS_ERROR_ALREADY Already resized, there is no differences between current size and requested size
703 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied, you only have view the content of this box
704 * @retval #DBOX_STATUS_ERROR_FAULT Failed to make a request
705 * @see dynamicbox_ret_cb
707 extern int dynamicbox_resize(dynamicbox_h handler, dynamicbox_size_type_e type, dynamicbox_ret_cb cb, void *data);
711 * @brief Sends the click event to a dynamicbox, This is not related with mouse_event, viewer can send "clicked" event directly.
713 * @param[in] handler Handler of a dynamicbox instance
714 * @param[in] x Rational X of the content width
715 * @param[in] y Rational Y of the content height
716 * @privlevel platform
717 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
719 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
720 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
721 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
723 extern int dynamicbox_click(dynamicbox_h handler, double x, double y);
727 * @brief Changes the cluster/sub-cluster name of the given dynamicbox handler.
730 * This is an ASYNCHRONOUS API.
731 * This function is Asynchronous, so you will get result of add requst from @a cb, if you failed to send request to create a new dynamicbox,
732 * This function will returns proper error code
733 * @param[in] handler Handler of a dynamicbox instance
734 * @param[in] cluster New cluster of a dynamicbox
735 * @param[in] category New category of a dynamicbox
736 * @param[in] cb Result callback for changing the cluster/category of a dynamicbox
737 * @param[in] data User data for the result callback
738 * @privlevel platform
739 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
741 * @retval #DBOX_STATUS_ERROR_NONE Request is successfully sent. the return callback will be called
742 * @retval #DBOX_STATUS_ERROR_BUSY Previous request is not finished yet
743 * @retval #DBOX_STATUS_ERROR_ALREADY Group name is same with current one
744 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED You have no permission to change property of this dynamicbox instance
745 * @retval #DBOX_STATUS_ERROR_FAULT Failed to make a request
746 * @see dynamicbox_ret_cb
748 extern int dynamicbox_set_group(dynamicbox_h handler, const char *cluster, const char *category, dynamicbox_ret_cb cb, void *data);
752 * @brief Gets the cluster and category (sub-cluster) name of the given dynamicbox (it is not I18N format, only English).
754 * @remarks You have to do not release the cluster & category.
755 * It is allocated inside of a given dynamicbox instance, so you can only read it.
756 * @param[in] handler Handler of a dynamicbox instance
757 * @param[out] cluster Storage(memory) for containing the cluster name
758 * @param[out] category Storage(memory) for containing the category name
760 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
761 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
763 extern int dynamicbox_get_group(dynamicbox_h handler, const char **cluster, const char **category);
767 * @brief Gets the period of the dynamicbox handler.
769 * @remarks If this function returns 0.0f, it means the dynamicbox has no update period or the handle is not valid.
770 * This function only works after the return callback of dynamicbox_create fucntion is called.
771 * If this returns negative value, you can get the reason of failure using dynamicbox_last_status()
772 * @param[in] handler Handler of a dynamicbox instance
774 * @retval >0 Current update period of a dynamicbox
775 * @retval 0.0f The box has no update period
776 * @retval -1.0f Failed to get the period info
778 extern double dynamicbox_period(dynamicbox_h handler);
782 * @brief Changes the update period.
785 * This is an ASYNCHRONOUS API.
786 * This function is Asynchronous, so you will get result of add requst from @a cb, if you failed to send request to create a new dynamicbox,
787 * This function will returns proper error code
788 * @param[in] handler Handler of a dynamicbox instance
789 * @param[in] period New update period of a dynamicbox
790 * @param[in] cb Result callback of changing the update period of this dynamicbox
791 * @param[in] data User data for the result callback
792 * @privlevel platform
793 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
795 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
796 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
797 * @retval #DBOX_STATUS_ERROR_BUSY
798 * @retval #DBOX_STATUS_ERROR_ALREADY
799 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
800 * @see dynamicbox_ret_cb
802 extern int dynamicbox_set_period(dynamicbox_h handler, double period, dynamicbox_ret_cb cb, void *data);
806 * @brief Checks whether the given dynamicbox is a text type or not.
808 * If this returns DBOX_CONTENT_TYPE_INVALID, you can get the reason of failure using dynamicbox_last_status()
810 * @param[in] handler Handler of a dynamicbox instance
811 * @param[in] gbar 1 for Glance Bar or 0
812 * @return dynamicbox_type
813 * @retval #DBOX_CONTENT_TYPE_IMAGE Contents of a dynamicbox is based on the image file
814 * @retval #DBOX_CONTENT_TYPE_BUFFER Contents of a dynamicbox is based on canvas buffer(shared)
815 * @retval #DBOX_CONTENT_TYPE_TEXT Contents of a dynamicbox is based on formatted text file
816 * @retval #DBOX_CONTENT_TYPE_RESOURCE_ID Contens of a dynamicbox is shared by the resource id (depends on the Window system, eg, Xorg)
817 * @retval #DBOX_CONTENT_TYPE_UIFW UI F/W supported content type for dynamic box
818 * @retval #DBOX_CONTENT_TYPE_INVALID Invalid type
819 * @see dynamicbox_type()
821 extern dynamicbox_type_e dynamicbox_type(dynamicbox_h handler, int gbar);
825 * @brief Checks if the given dynamicbox is created by user or not.
826 * @remarks if this returns negative value, you can get the reason of failure using dynamicbox_last_status()
828 * @details If the dynamicbox instance is created by a system this will return 0.
829 * @param[in] handler Handler of a dynamicbox instance
831 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
832 * @retval 0 Automatically created dynamicbox by the provider
833 * @retval 1 Created by user via dynamicbox_add()
834 * @see dynamicbox_add()
835 * @see dynamicbox_set_event_handler()
837 extern int dynamicbox_is_created_by_user(dynamicbox_h handler);
841 * @brief Gets content information string of the given dynamicbox.
842 * @remarks if this returns @c NULL, you can get the reason of failure using dynamicbox_last_status()
844 * @param[in] handler Handler of a dynamicbox instance
845 * @return const char *
846 * @retval content_info Dynamicbox content info that can be used again via content_info argument of dynamicbox_add()
847 * @see dynamicbox_add()
849 extern const char *dynamicbox_content(dynamicbox_h handler);
853 * @brief Gets the sub cluster title string of the given dynamicbox.
854 * @details This API is now used for accessibility.
855 * Each box should set their content as a string to be read by TTS.
856 * So if the box has focused on the homescreen, the homescreen will read text using this API.
858 * @remarks The title returned by this API can be read by TTS.
859 * But it is just recomendation for the homescreen.
860 * So, to read it or not depends on its implementation.
861 * if this returns @c NULL, you can get the reason of failure using dynamicbox_last_status()
862 * @param[in] handler Handler of a dynamicbox instance
863 * @return const char *
864 * @retval sub Cluster name
867 extern const char *dynamicbox_title(dynamicbox_h handler);
871 * @brief Gets the filename of the given dynamicbox, if it is an IMAGE type dynamicbox.
872 * @details If the box is developed as an image format to represent its contents, the homescreen should know its image file name.
873 * @remarks if this returns @c NULL, you can get the reason of failure using dynamicbox_last_status()
875 * @param[in] handler Handler of a dynamicbox instance
876 * @return const char *
877 * @retval filename If the dynamicbox type is image this function will give you a abs-path of an image file (content is rendered)
878 * @retval @c NULL If this has no image file or type is not image file.
880 extern const char *dynamicbox_filename(dynamicbox_h handler);
884 * @brief Gets the package name of the given dynamicbox handler.
885 * @remarks if this returns @c NULL, you can get the reason of failure using dynamicbox_last_status()
887 * @param[in] handler Handler of a dynamicbox instance
888 * @return const char *
889 * @retval pkgname Package name
890 * @retval @c NULL If the handler is not valid
892 extern const char *dynamicbox_pkgname(dynamicbox_h handler);
896 * @brief Gets the priority of a current content.
897 * @remarks if this returns negative value, you can get the reason of failure using dynamicbox_last_status()
899 * @param[in] handler Handler of a dynamicbox instance
901 * @retval 0.0f Handler is @c NULL
902 * @retval -1.0f Handler is not valid (not yet initialized)
903 * @retval real Number between 0.0 and 1.0
905 extern double dynamicbox_priority(dynamicbox_h handler);
909 * @brief Acquires the buffer of a given dynamicbox (only for the buffer type).
911 * @param[in] handler Handler of a dynamicbox instance
912 * @param[in] gbar 1 for Glance Bar or 0
913 * @privlevel platform
914 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
916 * @retval address Address of a Frame Buffer
917 * @retval @c NULL If it fails to get buffer address
919 extern void *dynamicbox_acquire_buffer(dynamicbox_h handler, int gbar);
923 * @brief Releases the buffer of a dynamicbox (only for the buffer type).
925 * @param[in] buffer Buffer
926 * @privlevel platform
927 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
929 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
930 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
931 * @see dynamicbox_acquire_buffer()
933 extern int dynamicbox_release_buffer(void *buffer);
937 * @brief Gets the reference count of Dynamicbox buffer (only for the buffer type).
939 * @param[in] buffer Buffer
941 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
942 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
943 * @retval refcnt Positive integer value including ZERO
945 extern int dynamicbox_buffer_refcnt(void *buffer);
949 * @brief Gets the size of the Dynamicbox.
951 * If this returns DBOX_SIZE_TYPE_UNKNOWN, you can get the reason of failure using dynamicbox_last_status()
953 * @param[in] handler Handler of a dynamicbox instance
954 * @return dynamicbox_size_type_e
955 * @retval #DBOX_SIZE_TYPE_NxM N by M size
956 * @retval #DBOX_SIZE_TYPE_UNKNOWN Invalid handler or size type is not defined yet
958 extern dynamicbox_size_type_e dynamicbox_size(dynamicbox_h handler);
962 * @brief Gets the size of the Glance Bar.
964 * @param[in] handler Handler of a dynamicbox instance
965 * @param[out] w Width of glance bar in pixels
966 * @param[out] h Height of glance bar in pixels
968 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters are used
969 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
971 extern int dynamicbox_get_glance_bar_size(dynamicbox_h handler, int *w, int *h);
975 * @brief Gets a list of the supported sizes of a given handler.
977 * @param[in] handler Handler of a dynamicbox instance
978 * @param[in] size_list Array buffer for getting the size types
979 * @param[in] cnt size of array
980 * @param[out] cnt Count of returned size types
981 * @param[out] size_list Array of size types
983 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
984 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
986 extern int dynamicbox_get_supported_sizes(dynamicbox_h handler, int *cnt, dynamicbox_size_type_e *size_list);
990 * @brief Gets BUFFER SIZE of the dynamicbox if it is a buffer type.
992 * @param[in] handler Handler of a dynamicbox instance
993 * @param[in] gbar 1 for Glance Bar or 0
995 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
996 * @retval size Size in bytes of the dynamicbox buffer
998 extern int dynamicbox_buffer_size(dynamicbox_h handler, int gbar);
1002 * @brief Sends a content event (for buffer type) to the provider (dynamicbox).
1004 * @param[in] handler Handler of a dynamicbox instance
1005 * @param[in] type Event type
1006 * @param[in] x Coordinates of X axis
1007 * @param[in] y Coordinates of Y axis
1008 * @privlevel platform
1009 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1011 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1012 * @retval #DBOX_STATUS_ERROR_BUSY Previous operation is not finished yet
1013 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1014 * @retval #DBOX_STATUS_ERROR_NONE Successfully sent
1015 * @see dynamicbox_feed_access_event()
1016 * @see dynamicbox_feed_key_event()
1018 extern int dynamicbox_feed_mouse_event(dynamicbox_h handler, dynamicbox_mouse_event_type_e type, dynamicbox_mouse_event_info_t info);
1022 * @brief Sends an access event (for buffer type) to the provider (dynamicbox).
1024 * This is an ASYNCHRONOUS API.
1026 * @param[in] handler Handler of a dynamicbox instance
1027 * @param[in] type Event type
1028 * @param[in] x Coordinates of X axsis
1029 * @param[in] y Coordinates of Y axsis
1030 * @param[in] cb Result callback function
1031 * @param[in] data Callback data
1032 * @privlevel platform
1033 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1035 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1036 * @retval #DBOX_STATUS_ERROR_BUSY Previous operation is not finished yet
1037 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1038 * @retval #DBOX_STATUS_ERROR_NONE Successfully sent
1039 * @see dynamicbox_feed_mouse_event()
1040 * @see dynamicbox_feed_key_event()
1042 extern int dynamicbox_feed_access_event(dynamicbox_h handler, dynamicbox_access_event_type_e type, dynamicbox_access_event_info_t info, dynamicbox_ret_cb cb, void *data);
1046 * @brief Sends a key event (for buffer type) to the provider (dynamicbox).
1048 * This is an ASYNCHRONOUS API.
1050 * @param[in] handler Handler of a dynamicbox instance
1051 * @param[in] type Key event type
1052 * @param[in] keycode Code of key
1053 * @param[in] cb Result callback
1054 * @param[in] data Callback data
1055 * @privlevel platform
1056 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1058 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1059 * @retval #DBOX_STATUS_ERROR_BUSY Previous operation is not finished yet
1060 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1061 * @retval #DBOX_STATUS_ERROR_NONE Successfully sent
1062 * @see dynamicbox_feed_mouse_event()
1063 * @see dynamicbox_feed_access_event()
1065 extern int dynamicbox_feed_key_event(dynamicbox_h handler, dynamicbox_key_event_type_e type, dynamicbox_key_event_info_t info, dynamicbox_ret_cb cb, void *data);
1069 * @brief Sets pin-up status of the given handler.
1070 * @details If the dynamicbox supports the pinup feature,
1071 * you can freeze the update of the given dynamicbox.
1072 * But it is different from pause.
1073 * The box will be updated and it will decide wheter update its content or not when the pinup is on.
1075 * This is an ASYNCHRONOUS API.
1077 * @param[in] handler Handler of a dynamicbox instance
1078 * @param[in] flag Pinup value
1079 * @param[in] cb Result callback
1080 * @param[in] data Callback data
1081 * @privlevel platform
1082 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1084 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
1085 * @see dynamicbox_ret_cb
1086 * @see dynamicbox_set_visibility()
1087 * @see dynamicbox_is_pinned_up()
1089 extern int dynamicbox_set_pinup(dynamicbox_h handler, int flag, dynamicbox_ret_cb cb, void *data);
1093 * @brief Checks the PIN-UP status of the given handler.
1095 * @param[in] handler Handler of a dynamicbox instance
1097 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
1098 * @retval 1 Box is pinned up
1099 * @retval 0 Box is not pinned up
1100 * @see dynamicbox_set_pinup()
1102 extern int dynamicbox_is_pinned_up(dynamicbox_h handler);
1106 * @brief Checks the availability of the PIN-UP feature for the given handler.
1108 * @param[in] handler Handler of a dynamicbox instance
1110 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1111 * @retval 1 If the box support Pinup feature
1112 * @retval 0 If the box does not support the Pinup feature
1113 * @see dynamicbox_is_pinned_up()
1114 * @see dynamicbox_set_pinup()
1116 extern int dynamicbox_has_pinup(dynamicbox_h handler);
1120 * @brief Checks the existence of Glance Bar for the given handler.
1122 * @param[in] handler Handler of a dynamicbox instance
1124 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1125 * @retval 1 If the box support the Glance Bar
1126 * @retval 0 If the box has no Glance Bar
1128 extern int dynamicbox_has_glance_bar(dynamicbox_h handler);
1132 * @brief Creates Glance Bar of the given handler with the relative position from dynamicbox.
1134 * This is an ASYNCHRONOUS API.
1136 * @param[in] handler Handler of a dynamicbox instance
1137 * @param[in] x 0.0 ~ 1.0
1138 * @param[in] y 0.0 ~ 1.0
1139 * @param[in] cb Result callback
1140 * @param[in] data Callback data
1141 * @privlevel platform
1142 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1144 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
1145 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1146 * @retval #DBOX_STATUS_ERROR_BUSY Previous operation is not finished yet
1147 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1148 * @see dynamicbox_create_glance_bar()
1149 * @see dynamicbox_destroy_glance_bar()
1150 * @see dynamicbox_move_glance_bar()
1152 extern int dynamicbox_create_glance_bar(dynamicbox_h handler, double x, double y, dynamicbox_ret_cb cb, void *data);
1156 * @brief Updates a position of the given Glance Bar.
1158 * @param[in] handler Handler of a dynamicbox instance
1159 * @param[in] x 0.0 ~ 1.0, 0.0 indicates the coordinate X of left of dynamicbox
1160 * @param[in] y 0.0 ~ 1.0, 0.0 indicates the coordinate Y of top of dynamicbox
1161 * @privlevel platform
1162 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1164 * @retval #DBOX_STATUS_ERROR_NONE If sending a request for updating position of the Glance Bar has been done successfully
1165 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1166 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1168 extern int dynamicbox_move_glance_bar(dynamicbox_h handler, double x, double y);
1172 * @brief Destroys the Glance Bar of the given handler if it is created.
1174 * This is an ASYNCHRONOUS API.
1176 * @param[in] handler Handler of a dynamicbox instance
1177 * @param[in] cb Callback function
1178 * @param[in] data Callback data
1179 * @privlevel platform
1180 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1182 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1183 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1184 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
1185 * @see dynamicbox_ret_cb
1187 extern int dynamicbox_destroy_glance_bar(dynamicbox_h handler, dynamicbox_ret_cb cb, void *data);
1191 * @brief Checks the create status of the given dynamicbox handler.
1193 * @param[in] handler Handler of a dynamicbox instance
1195 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1196 * @retval 0 Glance Bar is not created
1197 * @retval 1 Glance Bar is created
1199 extern int dynamicbox_glance_bar_is_created(dynamicbox_h handler);
1203 * @brief Sets a function table for parsing the text content of a dynamicbox.
1205 * @param[in] handler Handler of a dynamicbox instance
1206 * @param[in] gbar 1 for Glance Bar or 0
1209 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
1210 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1211 * @see dynamicbox_set_gbar_text_handler()
1213 extern int dynamicbox_set_text_handler(dynamicbox_h handler, int gbar, dynamicbox_script_operator_t ops);
1217 * @brief Emits a text signal to the given dynamicbox only if it is a text type.
1220 * This is an ASYNCHRONOUS API.
1221 * This function is Asynchronous, so you will get result of add requst from @a cb, if you failed to send request to create a new dynamicbox,
1222 * This function will returns proper error code
1223 * @param[in] handler Handler of a dynamicbox instance
1224 * @param[in] emission Emission string
1225 * @param[in] source Source string
1226 * @param[in] sx Start X
1227 * @param[in] sy Start Y
1228 * @param[in] ex End X
1229 * @param[in] ey End Y
1230 * @param[in] cb Result callback
1231 * @param[in] data Callback data
1232 * @privlevel platform
1233 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1235 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
1236 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1237 * @retval #DBOX_STATUS_ERROR_NONE Successfully emitted
1238 * @see dynamicbox_ret_cb
1240 extern int dynamicbox_emit_text_signal(dynamicbox_h handler, dynamicbox_text_event_t event_info, dynamicbox_ret_cb cb, void *data);
1244 * @brief Sets a private data pointer to carry it using the given handler.
1246 * @param[in] handler Handler of a dynamicbox instance
1247 * @param[in] data Data pointer
1249 * @retval #DBOX_STATUS_ERROR_NONE Successfully registered
1250 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1251 * @see dynamicbox_data()
1253 extern int dynamicbox_set_data(dynamicbox_h handler, void *data);
1257 * @brief Gets a private data pointer which is carried by a given handler.
1259 * @param[in] handler Handler of a dynamicbox instance
1261 * @retval data Data pointer
1262 * @retval @c NULL If there is no data
1263 * @see dynamicbox_set_data()
1265 extern void *dynamicbox_data(dynamicbox_h handler);
1269 * @brief Subscribes an event for dynamicboxes only in a given cluster and sub-cluster.
1270 * @details If you wrote a view-only client,
1271 * you can receive the event of specific dynamicboxes which belong to a given cluster/category.
1272 * But you cannot modify their attributes (such as size, ...).
1274 * @param[in] cluster Cluster ("*" can be used for subscribe all cluster's dynamicboxes event; If you use the "*", value in the category will be ignored)
1275 * @param[in] category Category ("*" can be used for subscribe dynamicboxes events of all category(sub-cluster) in a given "cluster")
1276 * @privlevel platform
1277 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1279 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1280 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
1281 * @see dynamicbox_unsubscribe_group()
1283 extern int dynamicbox_subscribe_group(const char *cluster, const char *category);
1287 * @brief Unsubscribes an event for the dynamicboxes, but you will receive already added dynamicboxes events.
1289 * @param[in] cluster Cluster("*" can be used for subscribe all cluster's dynamicboxes event; If you use the "*", value in the category will be ignored)
1290 * @param[in] category Category ("*" can be used for subscribe all sub-cluster's dynamicboxes event in a given "cluster")
1291 * @privlevel platform
1292 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1294 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1295 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
1296 * @see dynamicbox_subscribe_group()
1298 extern int dynamicbox_unsubscribe_group(const char *cluster, const char *category);
1302 * @brief Refreshes the group (cluster/sub-cluser (aka. category)).
1303 * @details This function will trigger the update of all dynamicboxes in a given cluster/category group.
1305 * @remarks Basically, a default dynamicbox system doesn't use the cluster/category concept.
1306 * But you can use it. So if you decide to use it, then you can trigger the update of all dynamicboxes in the given group.
1307 * @param[in] cluster Cluster ID
1308 * @param[in] category Sub-cluster ID
1309 * @param[in] force 1 if the boxes should be updated even if they are paused
1310 * @privlevel platform
1311 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1313 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1314 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1315 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
1316 * @see dynamicbox_refresh()
1318 extern int dynamicbox_refresh_group(const char *cluster, const char *category, int force);
1322 * @brief Refreshes a dynamicbox.
1324 * @param[in] handler Handler of a dynamicbox instance
1325 * @param[in] force 1 if the box should be updated even if it is paused
1326 * @privlevel platform
1327 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1329 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1330 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1331 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
1332 * @see dynamicbox_refresh_group()
1334 extern int dynamicbox_refresh(dynamicbox_h handler, int force);
1338 * @brief Gets Resource Id of a dynamicbox content.
1339 * @details This function doesn't guarantee the life-cycle of the resource id.
1340 * If the service provider destroyed the resource id, you will not know about it.
1341 * So you should validate it before accessing it.
1343 * @param[in] handler Handler of a dynamicbox instance
1344 * @param[in] gbar 1 for Glance Bar or 0
1346 * @retval 0 If the resource id is not created
1347 * @retval ResourceId Resource Id
1348 * @see dynamicbox_resource_id()
1350 extern unsigned int dynamicbox_resource_id(const dynamicbox_h handler, int gbar);
1354 * @brief Gets the Resource Id of a dynamicbox.
1355 * @details Even if a render process releases the Resource Id, the Resource Id will be kept before being released by dynamicbox_release_resource_id.
1356 * You should release the resource id manually.
1358 * This is an ASYNCHRONOUS API.
1360 * @param[in] handler Handler of a dynamicbox instance
1361 * @param[in] gbar 1 for Glance Bar or 0
1362 * @param[in] cb Callback function which will be called with result of acquiring dbox resource id
1363 * @param[in] data Callback data
1364 * @privlevel platform
1365 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1367 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1368 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1369 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
1370 * @pre Dynamicbox service system should support the ResourceId type buffer.
1371 * The dynamicbox should be designed to use the buffer (or script).
1372 * @see dynamicbox_release_resource_id()
1373 * @see dynamicbox_ret_cb
1375 extern int dynamicbox_acquire_resource_id(dynamicbox_h handler, int gbar, dynamicbox_ret_cb cb, void *data);
1379 * @brief Get the Resource Id of a dynamicbox for Extra buffer
1380 * @details Even if a render process(provider) released the Resource Id, it will be kept while release it by viewer.\n
1381 * This will prevent from unexpected resource releasing for viewer.\n
1382 * You should release this using dynamicbox_release_resource_id()
1384 * This is an ASYNCHRONOUS API.
1386 * @param[in] handler Handler of a dynamicbox instance
1387 * @param[in] gbar 1 for Glance Bar or 0
1388 * @param[in] idx Index of extra buffer, it is limited to dynamicbox configuration
1389 * @param[in] cb Callback function which will be called with result of acquiring dbox resource id
1390 * @param[in] data Callback data
1391 * @privlevel platform
1392 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1394 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1395 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1396 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
1397 * @pre Dynamicbox service system should support the resource id type buffer.
1398 * The dynamicbox should be designed to use the buffer (or script)
1399 * @see dynamicbox_release_resource_id()
1400 * @see dynamicbox_ret_cb
1402 extern int dynamicbox_acquire_extra_resource_id(dynamicbox_h handler, int gbar, int idx, dynamicbox_ret_cb cb, void *data);
1406 * @brief Releases the Resource Id of a dynamicbox.
1407 * @details After a client gets a new Resource Id or does not need to keep the current Resource Id anymore, use this function to release it.
1408 * If there is no user for a given Resource Id, the Resource Id will be destroyed.
1410 * @param[in] handler Handler of a dynamicbox instance
1411 * @param[in] gbar 1 for Glance Bar or 0
1412 * @param[in] resource_id Resource Id of given dynamicbox handler
1413 * @privlevel platform
1414 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1416 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1417 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1418 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
1419 * @pre The Resource Id should be acquired by dynamicbox_acquire_resource_id
1420 * @see dynamicbox_acquire_resource_id()
1422 extern int dynamicbox_release_resource_id(dynamicbox_h handler, int gbar, unsigned int resource_id);
1426 * @brief Updates a visible state of the dynamicbox.
1428 * @param[in] handler Handler of a dynamicbox instance
1429 * @param[in] state Configure the current visible state of a dynamicbox
1430 * @privlevel platform
1431 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1433 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1434 * @retval #DBOX_STATUS_ERROR_BUSY
1435 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED
1436 * @retval #DBOX_STATUS_ERROR_ALREADY
1437 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1438 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
1440 extern int dynamicbox_set_visibility(dynamicbox_h handler, dynamicbox_visible_state_e state);
1444 * @brief Gets the current visible state of a dynamicbox.
1446 * If this returns DBOX_VISIBLE_ERROR, you can get the reason of failure using dynamicbox_last_status()
1448 * @param[in] handler Handler of a dynamicbox instance
1449 * @return dynamicbox_visible_state
1450 * @retval #DBOX_SHOW Dynamicbox is shown (Default state)
1451 * @retval #DBOX_HIDE Dynamicbox is hidden, Update timer is not frozen (but a user cannot receive any updated events; a user should refresh(reload) the content of a dynamicbox when a user make this show again)
1452 * @retval #DBOX_HIDE_WITH_PAUSE Dynamicbox is hidden, it will pause the update timer, but if a dynamicbox updates its contents, update event will occur
1453 * @retval #DBOX_VISIBLE_ERROR To enlarge the size of this enumeration type
1455 extern dynamicbox_visible_state_e dynamicbox_visibility(dynamicbox_h handler);
1459 * @brief Sets an update mode of the current dynamicbox.
1460 * @details If you set 1 for active update mode, you should get a buffer without updated event from provider.
1461 * But if it is passive mode, you have to update content of a box when you get updated events.
1462 * Default is Passive mode.
1465 * This is an ASYNCHRONOUS API.
1466 * This function is Asynchronous, so you will get result of add requst from @a cb, if you failed to send request to create a new dynamicbox,
1467 * This function will returns proper error code
1468 * @param[in] handler Handler of a dynamicbox instance
1469 * @param[in] active_update 1 means active update, 0 means passive update (default)
1470 * @param[in] cb Result callback function
1471 * @param[in] data Callback data
1472 * @privlevel platform
1473 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1475 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1476 * @retval #DBOX_STATUS_ERROR_BUSY
1477 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED
1478 * @retval #DBOX_STATUS_ERROR_ALREADY
1479 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1480 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
1481 * @see dynamicbox_ret_cb
1483 extern int dynamicbox_set_update_mode(dynamicbox_h handler, int active_update, dynamicbox_ret_cb cb, void *data);
1487 * @brief Checks the active update mode of the given dynamicbox.
1489 * If this returns negative value, you can get the reason of failure using dynamicbox_last_status()
1491 * @param[in] handler Handler of a dynamicbox instance
1493 * @retval 0 If passive mode
1494 * @retval 1 If active mode or error code
1496 extern int dynamicbox_is_active_update(dynamicbox_h handler);
1500 * @brief Syncs manually
1502 * @param[in] handler Handler of a dynamicbox instance
1503 * @param[in] gbar 1 for Glance Bar or 0
1504 * @privlevel platform
1505 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1507 * @retval #DBOX_STATUS_ERROR_NONE If success
1508 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid handle
1509 * @see dynamicbox_set_manual_sync()
1510 * @see dynamicbox_manual_sync()
1512 extern int dynamicbox_sync_buffer(dynamicbox_h handler, int gbar);
1516 * @brief Getting the damaged region info
1518 * @param[in] handler Handler of a dynamicbox instance
1519 * @param[in] gbar 1 for Glance Bar or 0
1520 * @param[out] region Readonly information for damaged area
1522 * @retval #DBOX_STATUS_ERROR_NONE if success
1523 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid handle
1525 extern int dynamicbox_damage_region_get(dynamicbox_h handler, int gbar, const dynamicbox_damage_region_t *region);
1529 * @brief Gets an alternative icon of the given dynamicbox instance.
1530 * @details If the box should be represented as a shortcut icon, this function will get the alternative icon.
1532 * If this returns @c NULL, you can get the reason of failure using dynamicbox_last_status()
1534 * @param[in] handler Handler of a dynamicbox instance
1535 * @return const char *
1536 * @retval address Absolute path of an alternative icon file
1537 * @retval @c NULL Dynamicbox has no alternative icon file
1538 * @see dynamicbox_alt_name()
1540 extern const char *dynamicbox_alternative_icon(dynamicbox_h handler);
1544 * @brief Gets an alternative name of the given dynamicbox instance.
1545 * @details If the box should be represented as a shortcut name, this function will get the alternative name.
1547 * If this returns @c NULL, you can get the reason of failure using dynamicbox_last_status()
1549 * @param[in] handler Handler of a dynamicbox instance
1550 * @return const char *
1551 * @retval name Alternative name of a dynamicbox
1552 * @retval @c NULL Dynamicbox has no alternative name
1553 * @see dynamicbox_alt_icon()
1555 extern const char *dynamicbox_alternative_name(dynamicbox_h handler);
1559 * @brief Gets a lock for a frame buffer.
1560 * @details This function should be used to prevent from rendering to the frame buffer while reading it.
1561 * And the locking area should be short and must be released ASAP, or the render thread will be hanged.
1563 * @param[in] handler Handler of a dynamicbox instance
1564 * @param[in] gbar 1 for Glance Bar or 0
1565 * @privlevel platform
1566 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1568 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1569 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1570 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
1571 * @see dynamicbox_release_buffer_lock()
1573 extern int dynamicbox_acquire_buffer_lock(dynamicbox_h handler, int gbar);
1577 * @brief Releases a lock of the frame buffer.
1578 * @details This function should be called ASAP after acquiring a lock of FB, or the render process will be blocked.
1580 * @param[in] handler Handler of a dynamicbox instance
1581 * @param[in] gbar 1 for Glance Bar or 0
1582 * @privlevel platform
1583 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.viewer
1585 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
1586 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
1587 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
1588 * @see dynamicbox_acquire_buffer_lock()
1590 extern int dynamicbox_release_buffer_lock(dynamicbox_h handler, int gbar);
1594 * @brief Sets options for controlling a dynamicbox sub-system.
1596 * #DBOX_OPTION_FRAME_DROP_FOR_RESIZE
1597 * While resizing the box, viewer doesn't want to know the updated frames of an old size content anymore.
1598 * In that case, turn this on, the provider will not send the updated event to the viewer about an old content.
1599 * So the viewer can reduce its burden to update unnecessary frames.
1600 * #DBOX_OPTION_MANUAL_SYNC
1601 * If you don't want to update frames automatically, or you want only reload the frames by your hands, (manually)
1603 * After turnning it on, you should sync it using dynamicbox_sync_buffer().
1604 * #DBOX_OPTION_SHARED_CONTENT
1605 * If this option is turnned on, even though you create a new dynamicbox,
1606 * if there are already added same instances that have same contents, the instance will not be created again.
1607 * Instead of creating a new instance, a viewer will provide an old instance with a new handle.
1609 * @param[in] option Option which will be affected by this call
1610 * @param[in] state New value for given option
1612 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Unknown option
1613 * @retval #DBOX_STATUS_ERROR_FAULT Failed to change the state of option
1614 * @retval #DBOX_STATUS_ERROR_NONE Successfully changed
1615 * @see dynamicbox_get_option()
1616 * @see dynamicbox_sync_buffer()
1618 extern int dynamicbox_set_option(dynamicbox_option_type_e option, int state);
1622 * @brief Gets options of a dynamicbox sub-system.
1624 * If this returns negative value, you can get the reason of failure using dynamicbox_last_status()
1626 * @param[in] option Type of option
1628 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid option
1629 * @retval #DBOX_STATUS_ERROR_FAULT Failed to get option
1630 * @retval >=0 Value of given option (must be >=0)
1631 * @see dynamicbox_set_option()
1633 extern int dynamicbox_option(dynamicbox_option_type_e option);
1637 * @brief Set a handler for launching an app by auto-launch feature
1638 * @details If a user clicks a box, which box enabled auto-launch option, the launcher_handler will be called.
1639 * From that callback, you should launch an app using given ui-app id.
1641 * @param[in] launch_handler Handler for launching an app manually
1642 * @param[in] data Callback data which will be given a data for launch_handler
1644 * @retval #DBOX_STATUS_ERROR_NONE Succeed to set new handler. there is no other cases
1646 extern int dynamicbox_set_auto_launch_handler(dynamicbox_auto_launch_handler_cb cb, void *data);
1650 * @brief Get the last extra buffer index and its id.
1652 * If there is an event of #DBOX_EVENT_DBOX_EXTRA_BUFFER_CREATED or #DBOX_EVENT_GBAR_EXTRA_BUFFER_CREATED,
1653 * #DBOX_EVENT_DBOX_EXTRA_BUFFER_DESTROYED or #DBOX_EVENT_GBAR_EXTRA_BUFFER_DESTROYED
1654 * you can use this to get the last created buffer info
1656 * @param[in] handler Dynamicbox handler
1657 * @param[in] gbar 1 if you want get the glance bar's info or 0
1658 * @param[out] idx Index of buffer
1659 * @param[out] resource_id Resource Id
1661 * @retval #DBOX_STATUS_ERROR_NONE Successfully get
1662 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Handler is not valid
1663 * @retval #DBOX_STATUS_ERROR_NOT_EXIST There is no extra buffer
1665 extern int dynamicbox_get_affected_extra_buffer(dynamicbox_h handler, int gbar, int *idx, unsigned int *resource_id);
1675 #endif // __DYNAMICBOX_VIEWER_H