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.
18 * Export by dynamicbox_service
20 #include <dynamicbox_buffer.h>
21 #include <dynamicbox_script.h>
23 #ifndef __DYNAMICBOX_UILITY_INTERNAL_H
24 #define __DYNAMICBOX_UILITY_INTERNAL_H
31 * @file dynamicbox_internal.h
32 * @brief This file declares API of libdynamicbox library
37 * @addtogroup CAPI_DYNAMICBOX_UTILITY_MODULE
43 * @brief Definition for COLOR BLOCK.
46 #define DBOX_DESC_TYPE_COLOR "color"
50 * @brief Definition for TEXT BLOCK.
53 #define DBOX_DESC_TYPE_TEXT "text"
57 * @brief Definition for IMAGE BLOCK.
60 #define DBOX_DESC_TYPE_IMAGE "image"
64 * @brief Definition for SIGNAL BLOCK.
67 #define DBOX_DESC_TYPE_SIGNAL "signal"
71 * @brief Definition for INFO BLOCK.
74 #define DBOX_DESC_TYPE_INFO "info"
78 * @brief Definition for DRAG BLOCK.
81 #define DBOX_DESC_TYPE_DRAG "drag"
85 * @brief Definition for SCRIPT SCRIPT.
88 #define DBOX_DESC_TYPE_SCRIPT "script"
92 * @brief Definition for ACCESSIBILITY INFORMATION BLOCK.
95 #define DBOX_DESC_TYPE_ACCESS "access"
99 * @brief Definition for accessibility operation.
102 #define DBOX_DESC_TYPE_ACCESS_OPERATION "access,operation"
106 * @brief Definition for set highlight on specified part.
109 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_SET "set,hl"
113 * @brief Definition for remove highlight from specified part.
116 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_UNSET "unset,hl"
120 * @brief Definition for move the highlight to next part.
123 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_NEXT "next,hl"
127 * @brief Definition for move the highlight to previous part.
130 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_PREV "prev,hl"
134 * @brief Definition for reset the chain of accessibility highlight list.
137 #define DBOX_DESC_DATA_ACCESS_OPERATION_RESET "reset,focus"
141 * @brief Definition for specify the highlight move option.
142 * @details If the highlight list reaches to the last object, move back to the first object.
145 #define DBOX_DESC_OPTION_ACCESS_HL_LOOP "cycle"
149 * @brief Definition for specify the highlight move option.
150 * @details If the highlight list reaches to the last object(or the first object),
151 * the "prev,hl", "next,hl" will be failed.
154 #define DBOX_DESC_OPTION_ACCESS_HL_NOLOOP "no,cycle"
158 * @brief Dynamic Box description data handle.
161 typedef struct dynamicbox_desc *dynamicbox_desc_h;
165 * @brief Flush Callback for snapshot window
168 typedef void (*dynamicbox_flush_cb)(void *snapshot_window, const char *id, int status, void *data);
172 * @brief Updates a description file.
174 * @remarks Must be used only by Inhouse Dynamic Box.
175 * @param[in] id Dynamic Box Instance Id
176 * @param[in] gbar 1 for Glance Bar or 0
178 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
179 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
180 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
181 * @return Handle of desc instance
182 * @retval @c NULL Failed to create a desc instance, dynamicbox_last_status() will returns reason of failure
183 * @pre Should be loaded by data-provider-slave.
184 * @post Should be destroyed(flushed) using dynamicbox_desc_close() API.
185 * @see dynamicbox_desc_close()
187 extern dynamicbox_desc_h dynamicbox_desc_open(const char *id, int gbar);
191 * @brief Completes the description file update.
192 * @details Only if this API is called, the description data will be applied to the content of Dynamic Box (or GBar).
194 * @remarks Must be used only by Inhouse Dynamic Box.
195 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
197 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
198 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
199 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
201 * @retval #DBOX_STATUS_ERROR_NONE If the flushing description data is successfully done
202 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER If the given handle is not valid
203 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
204 * @pre Handle must be created by dynamicbox_desc_open()
205 * @post Handle must not be used after return from this function.
206 * @see dynamicbox_desc_open()
208 extern int dynamicbox_desc_close(dynamicbox_desc_h handle);
212 * @brief Sets the category information of current description data.
213 * @details Creates a new description block for updating category information of layout object.
215 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
216 * @param[in] id Id string of target object
217 * @param[in] category Category string that will be used by layout object
219 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid handle
220 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Memory is not enough to add this block
221 * @retval index Index(>=0) of added block, which can be used by dynamicbox_desc_set_id()
222 * @pre Must be called after create a handle using dynamicbox_desc_open()
223 * @see dynamicbox_desc_set_id()
225 extern int dynamicbox_desc_set_category(dynamicbox_desc_h handle, const char *id, const char *category);
229 * @brief Sets the content size.
230 * @details Sets the content size of layout.
232 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
233 * @param[in] id Id string of target object
234 * @param[in] w Width in pixel
235 * @param[in] h Height in pixel
237 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
238 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory to add a new block
239 * @retval index Index(>=0) of added block Successfully added
240 * @see dynamicbox_desc_open()
241 * @see dynamicbox_desc_set_id()
243 extern int dynamicbox_desc_set_size(dynamicbox_desc_h handle, const char *id, int w, int h);
247 * @brief Sets the target id of the given block.
248 * @details Only available for the script block.
250 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
251 * @param[in] idx Index of target block
252 * @param[in] id Id String which will be used by other dynamicbox_desc_XXX functions
254 * @retval #DBOX_STATUS_ERROR_NONE Id is successfully updated for given idx of desc block
255 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
256 * @retval #DBOX_STATUS_ERROR_NOT_EXIST Given index of desc block is not exists
257 * @pre Desc block should be exists which has given index "idx".
258 * @post Specified Id string("id") can be used by other dynamicbox_desc_XXXX functions.
259 * @see dynamicbox_desc_open()
260 * @see dynamicbox_desc_set_id()
262 extern int dynamicbox_desc_set_id(dynamicbox_desc_h handle, int idx, const char *id);
266 * @brief Adds a new block.
268 * @param[in] handle Handle which is created by the dynamicbox_desc_open() function
269 * @param[in] id ID of source script object
270 * @param[in] type Type (image|text|script|signal|.. etc)
271 * @param[in] part Target part to update with given content(data)
272 * @param[in] data Content for specified part
273 * @param[in] option Option for the block. (script: group, image: option, ...)
274 * @return Index of current description block
275 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
276 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory to add a new desc block
277 * @retval index Index(>=0) of added desc block
278 * @pre Handle must be created using dynamicbox_desc_open.
279 * @see dynamicbox_desc_set_id()
280 * @see dynamicbox_desc_del_block()
282 extern int dynamicbox_desc_add_block(dynamicbox_desc_h handle, const char *id, const char *type, const char *part, const char *data, const char *option);
286 * @brief Deletes an added block.
288 * @details If you discard the added desc block, use this API and the index of the created desc block.
289 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
290 * @param[in] idx Index of added block, returned from dynamicbox_desc_add_block(), dynamicbox_desc_set_size(), dynamicbox_desc_set_category(), etc
292 * @retval #DBOX_STATUS_ERROR_NONE Successfully deleted
293 * @retval #DBOX_STATUS_ERROR_NOT_EXIST Given index of desc block is not exists
294 * @pre Index must be exists.
295 * @see dynamicbox_desc_add_block()
296 * @see dynamicbox_desc_open()
298 extern int dynamicbox_desc_del_block(dynamicbox_desc_h handle, int idx);
302 * @brief Structure for a Dynamic Box buffer defined by a provider.
305 typedef struct dynamicbox_buffer *dynamicbox_buffer_h;
309 * @brief Return values of dynamicbox programming interfaces: Using network.
312 extern const int DBOX_USE_NET;
316 * @brief Notifies the updated content to the provider.
317 * @details Forcedly notifies the updated contents.
318 * This function can be used from async callback function to notify the updated content.
320 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
321 * @param[in] gbar 1 for updating content of Glance Bar or 0(for content of Dynamic Box)
323 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory
324 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
325 * @retval #DBOX_STATUS_ERROR_IO_ERROR I/O failed, Cannot access given resource file(id)
326 * @retval #DBOX_STATUS_ERROR_NONE Successfully notified
327 * @pre This API only can be used after loaded into the data-provider-slave process.
329 extern int dynamicbox_content_is_updated(const char *id, int gbar);
333 * @brief Acquires a buffer for GBar or DBox, currently only the GBar is supported.
335 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
336 * @param[in] gbar 1 for Glance Bar or 0 for Dynamic Box
337 * @param[in] width Width in pixel
338 * @param[in] height Height in pixel
339 * @param[in] pixels Size of a pixel in bytes
340 * @param[in] handler Event handling callback
341 * @param[in] data User data for event handling callback
343 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
344 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
345 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
346 * @return Buffer handle
347 * @retval @c NULL Failed to acquire buffer, dynamicbox_last_status() will returns reason of failure.
348 * @retval handler Handle object
349 * @pre Given instance must be specify its type as buffer. or this API will be fail.
350 * @post Allocated buffer object must be released via dynamicbox_release_buffer().
351 * @see dynamicbox_release_buffer()
353 extern dynamicbox_buffer_h dynamicbox_create_buffer(const char *id, int gbar, int auto_align, int (*handler)(dynamicbox_buffer_h, dynamicbox_buffer_event_data_t, void *), void *data);
357 * @brief Acquire a buffer for GBar or DBox.
359 * @param[in] handle Buffer handle
360 * @param[in] idx Index of a buffer, DBOX_PRIMARY_BUFFER is used for accessing primary buffer
361 * @param[in] width Width of a buffer
362 * @param[in] height Height of a buffer
363 * @param[in] pixels Pixel size in byte
365 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
366 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
367 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
369 * @retval #DBOX_STATUS_ERROR_NONE Successfully allocated
370 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameter
371 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
372 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
373 * @pre dynamicbox_create_buffer() must be called
374 * @see dynamicbox_create_buffer()
375 * @see dynamicbox_release_buffer()
377 extern int dynamicbox_acquire_buffer(dynamicbox_buffer_h handle, int idx, int width, int height, int pixels);
381 * @brief Acquires the Id of Resource (window system).
382 * @details Only if the provider uses Resource for providing render buffer.
384 * @remarks Pixmap Id can be destroyed if you call the dynamicbox_release_buffer(). Then this Resource Id is not guaranteed to use.
385 * @param[in] handle Buffer handle
386 * @param[in] idx Index of a buffer, #c DBOX_PRIMARY_BUFFER is used for accessing the primary buffer
387 * @return unsigned int Resource Id
388 * @retval >0 Resource Id
389 * @retval 0 Failed to get Resource Id
390 * @pre The system must be set to use the Resource Id method for content sharing.
391 * @see dynamicbox_acquire_buffer()
393 extern unsigned int dynamicbox_resource_id(dynamicbox_buffer_h handle, int idx);
397 * @brief Releases the buffer of dynamicbox.
399 * @param[in] handle Buffer handle
400 * @param[in] idx Index of a buffer, #c DBOX_PRIMARY_BUFFER is used for accessing the primary buffer
402 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
403 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
404 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
406 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
407 * @retval #DBOX_STATUS_ERROR_NONE Successfully released
408 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
409 * @pre Handle must be created using dynamicbox_acquire_buffer().
410 * @see dynamicbox_acquire_buffer()
412 extern int dynamicbox_release_buffer(dynamicbox_buffer_h handle, int idx);
416 * @brief Destroy a buffer of dynamicbox
418 * @param[in] handle buffer handle
420 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
421 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
422 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
424 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMTER Invalid argument
425 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
426 * @retval #DBOX_STATUS_ERROR_NONE Successfully destroyed
427 * @see dynamicbox_create_buffer()
429 extern int dynamicbox_destroy_buffer(dynamicbox_buffer_h handle);
433 * @brief Gets the address of buffer for S/W rendering.
434 * @details If you try to use this, after dynamicbox_create_hw_buffer(), you will get @c NULL.
435 * This API only be used for primary buffer. you cannot access the extra buffer
437 * @param[in] handle Buffer handle
439 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
440 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
441 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
442 * @return void* address of the render buffer
443 * @retval @c NULL If it falis to get buffer address, dynamicbox_last_status() will returns reason of failure.
444 * @retval address If it succeed to get the buffer address
445 * @see dynamicbox_unref_buffer()
447 extern void *dynamicbox_ref_buffer(dynamicbox_buffer_h handle);
451 * @brief Releases the S/W render buffer.
453 * @param[in] buffer Address of render buffer
455 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
456 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
457 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
459 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid handle
460 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
461 * @retval #DBOX_STATUS_ERROR_NONE Successfully unreference
462 * @pre dynamicbox_ref_buffer() must be called.
463 * @see dynamicbox_ref_buffer()
465 extern int dynamicbox_unref_buffer(void *buffer);
469 * @brief Synchronizes the updated buffer.
470 * @details This is only needed for non-H/W accelerated buffer.
471 * This API is only supported for primary buffer (#c DBOX_PRIMARY_BUFFER)
473 * @param[in] handle Buffer handle
475 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
476 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
477 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
479 * @retval #DBOX_STATUS_ERROR_NONE Successfully sync'd
480 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
481 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
482 * @see dynamicbox_acquire_buffer()
484 extern int dynamicbox_sync_buffer(dynamicbox_buffer_h handle);
488 * @brief Checks whether the dynamicbox supports H/W acceleration or not.
489 * This API is only supported for primary buffer (#c DBOX_PRIMARY_BUFFER)
491 * @param[in] handle Buffer handle
493 * @retval 1 If the buffer handle support the H/W acceleration buffer
494 * @retval 0 If it doesn not supported
495 * @see dynamicbox_acquire_buffer()
497 extern int dynamicbox_support_hw_buffer(dynamicbox_buffer_h handle);
501 * @brief Creates the H/W accelerated buffer.
502 * This API is only supported for primary buffer (#c DBOX_PRIMARY_BUFFER)
504 * @param[in] handle Buffer handle
506 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
507 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
508 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
510 * @retval #DBOX_STATUS_ERROR_ALREADY H/W buffer is already created
511 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
512 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
513 * @retval #DBOX_STATUS_ERROR_NONE Successfully created
514 * @pre Must be checked whether the H/W buffer is supported or not.
515 * @post Must be destroyed if it is not necessary.
516 * @see dynamicbox_support_hw_buffer()
518 extern int dynamicbox_create_hw_buffer(dynamicbox_buffer_h handle);
522 * @brief Destroys the H/W accelerated buffer.
523 * This API is only supported for primary buffer (#c DBOX_PRIMARY_BUFFER)
525 * @param[in] handle Buffer handle
527 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
528 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
529 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
531 * @retval #DBOX_STATUS_ERROR_NONE Successfully destroyed
532 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
533 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
534 * @pre Must be created h/w buffer using dynamicbox_create_hw_buffer.
535 * @see dynamicbox_create_hw_buffer()
537 extern int dynamicbox_destroy_hw_buffer(dynamicbox_buffer_h handle);
541 * @brief Gets the address of the accelerated H/W buffer.
542 * This API is only supported for primary buffer (#c DBOX_PRIMARY_BUFFER)
544 * @param[in] handle Buffer handle
546 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
547 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
548 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
550 * @retval @c NULL Failed to get H/W accelerated buffer address, dynamicbox_last_status() will returns reason of failure.
551 * @retval addr H/W accelerated buffer address
552 * @see dynamicbox_create_hw_buffer()
554 extern void *dynamicbox_buffer_hw_buffer(dynamicbox_buffer_h handle);
558 * @brief Get the stride information from the buffer info
559 * This API is only supported for primary buffer (#c DBOX_PRIMARY_BUFFER)
561 * @param[in] handle Buffer handle
562 * @return int stride size
563 * @retval positive_value length of stride
564 * @return #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameter
565 * @return #DBOX_STATUS_ERROR_FAULT Unrecoverable error
566 * @see dynamicbox_create_hw_buffer()
568 extern int dynamicbox_buffer_stride(dynamicbox_buffer_h handle);
572 * @brief Pre-processes for rendering content.
573 * @details This is only needed for accessing H/W accelerated buffer.
575 * @param[in] handle Buffer handle
577 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
578 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
579 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
581 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid handle
582 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
583 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
584 * @post dynamicbox_buffer_post_render must be called after the rendering (accessing buffer) is completed.
585 * @see dynamicbox_support_hw_buffer()
586 * @see dynamicbox_buffer_post_render()
588 extern int dynamicbox_buffer_pre_render(dynamicbox_buffer_h handle);
592 * @brief Post-processes for rendering content.
594 * @param[in] handle Buffer handle
596 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
597 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
598 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
599 * @return If succes returns 0 or return less than 0
600 * @retval #DBOX_STATUS_ERROR_NONE If succeed
601 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
602 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
603 * @pre dynamicbox_buffer_pre_render must be called.
604 * @see dynamicbox_support_hw_buffer()
605 * @see dynamicbox_buffer_pre_render()
607 extern int dynamicbox_buffer_post_render(dynamicbox_buffer_h handle);
611 * @brief Sends a request to the viewer (homescreen) to close the GBar.
612 * @details Even though you call this function. the homescreen can ignore it.
614 * @param[in] dboxid Dynamic Box Package Id
615 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
616 * @param[in] reason #DBOX_STATUS_ERROR_NONE(0)
618 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
619 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
620 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
622 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
623 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
624 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
625 * @retval #DBOX_STATUS_ERROR_FAULT Failed to send a request
626 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
628 extern int dynamicbox_request_close_glance_bar(const char *dboxid, const char *id, int reason);
632 * @brief Create a snapshot window
634 * If you want create a snapshot image of contents, create this snapshot window
635 * But it will not renders object asynchronously,
636 * So you have to render the objects immediately, the delayed rendering object will not be on the canvas
637 * After flush it to a file.
640 * @param[in] size_type
641 * @return void* window
642 * @retval @c NULL failed to create a snapshot window, dynamicbox_last_status() will returns reason of failure.
643 * @retval Object window object (ex, elementary window)
644 * @see dynamicbox_snapshot_window_flush()
646 extern void *dynamicbox_snapshot_window_add(const char *id, int size_type);
650 * @brief Flush to a file for snapshot window
652 * @param[in] snapshot_win Snapshot window
653 * @param[in] timeout After this, the image file will be created
654 * @param[in] flush_cb Right after flush an image file, this callback will be called
655 * @param[in] data Callback data for flush_cb
657 * @retval #DBOX_STATUS_ERROR_NONE Successfully flushed (flush timer added)
658 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid paramter
659 * @retval #DBOX_STATUS_ERROR_FAULT Failed to create a flush timer
660 * @see dynamicbox_snapshot_window_add()
662 extern int dynamicbox_snapshot_window_flush(void *snapshot_win, double timeout, dynamicbox_flush_cb flush_cb, void *data);
666 * @brief Sending the updated event to the viewer
668 * @param[in] handle Dynamicbox Buffer Handle
669 * @param[in] idx Index of a buffer
671 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
672 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
673 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
675 * @retval #DBOX_STATUS_ERROR_NONE Successfully sent
677 extern int dynamicbox_send_updated_by_idx(dynamicbox_buffer_h handle, int idx);