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_H
24 #define __DYNAMICBOX_UILITY_H
32 * @brief This file declares API of libdynamicbox library
37 * @addtogroup CAPI_DYNAMICBOX_UTILITY_MODULE
42 * @brief Definition for COLOR BLOCK.
45 #define DBOX_DESC_TYPE_COLOR "color"
48 * @brief Definition for TEXT BLOCK.
51 #define DBOX_DESC_TYPE_TEXT "text"
54 * @brief Definition for IMAGE BLOCK.
57 #define DBOX_DESC_TYPE_IMAGE "image"
60 * @brief Definition for SIGNAL BLOCK.
63 #define DBOX_DESC_TYPE_SIGNAL "signal"
66 * @brief Definition for INFO BLOCK.
69 #define DBOX_DESC_TYPE_INFO "info"
72 * @brief Definition for DRAG BLOCK.
75 #define DBOX_DESC_TYPE_DRAG "drag"
78 * @brief Definition for SCRIPT SCRIPT.
81 #define DBOX_DESC_TYPE_SCRIPT "script"
84 * @brief Definition for ACCESSIBILITY INFORMATION BLOCK.
87 #define DBOX_DESC_TYPE_ACCESS "access"
90 * @brief Definition for accessibility operation.
93 #define DBOX_DESC_TYPE_ACCESS_OPERATION "access,operation"
96 * @brief Definition for set highlight on specified part.
99 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_SET "set,hl"
102 * @brief Definition for remove highlight from specified part.
105 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_UNSET "unset,hl"
108 * @brief Definition for move the highlight to next part.
111 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_NEXT "next,hl"
114 * @brief Definition for move the highlight to previous part.
117 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_PREV "prev,hl"
120 * @brief Definition for reset the chain of accessibility highlight list.
123 #define DBOX_DESC_DATA_ACCESS_OPERATION_RESET "reset,focus"
126 * @brief Definition for specify the highlight move option.
127 * @details If the highlight list reaches to the last object, move back to the first object.
130 #define DBOX_DESC_OPTION_ACCESS_HL_LOOP "cycle"
133 * @brief Definition for specify the highlight move option.
134 * @details If the highlight list reaches to the last object(or the first object),
135 * the "prev,hl", "next,hl" will be failed.
138 #define DBOX_DESC_OPTION_ACCESS_HL_NOLOOP "no,cycle"
141 * @brief Dynamic Box description data handle.
144 typedef struct dynamicbox_desc *dynamicbox_desc_h;
148 * @brief Flush Callback for snapshot window
151 typedef void (*dynamicbox_flush_cb)(void *snapshot_window, const char *id, int status, void *data);
154 * @brief Updates a description file.
156 * @remarks Must be used only by Inhouse Dynamic Box.
157 * @param[in] id Dynamic Box Instance Id
158 * @param[in] gbar 1 for Glance Bar or 0
160 * @privilege %http://tizen.org/privilege/core/dynamicbox
161 * @return Handle of desc instance
162 * @pre Should be loaded by data-provider-slave.
163 * @post Should be destroyed(flushed) using dynamicbox_desc_close() API.
164 * @see dynamicbox_desc_close()
166 extern dynamicbox_desc_h dynamicbox_desc_open(const char *id, int gbar);
169 * @brief Completes the description file update.
170 * @details Only if this API is called, the description data will be applied to the content of Dynamic Box (or GBar).
172 * @remarks Must be used only by Inhouse Dynamic Box.
173 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
175 * @privilege %http://tizen.org/privilege/core/dynamicbox
177 * @retval #DBOX_STATUS_ERROR_NONE If the flushing description data is successfully done
178 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER If the given handle is not valid
179 * @pre Handle must be created by dynamicbox_desc_open()
180 * @post Handle must not be used after return from this function.
181 * @see dynamicbox_desc_open()
183 extern int dynamicbox_desc_close(dynamicbox_desc_h handle);
186 * @brief Sets the category information of current description data.
187 * @details Creates a new description block for updating category information of layout object.
189 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
190 * @param[in] id Id string of target object
191 * @param[in] category Category string that will be used by layout object
193 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid handle
194 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Memory is not enough to add this block
195 * @retval index Index(>=0) of added block, which can be used by dynamicbox_desc_set_id()
196 * @pre Must be called after create a handle using dynamicbox_desc_open()
197 * @see dynamicbox_desc_set_id()
199 extern int dynamicbox_desc_set_category(dynamicbox_desc_h handle, const char *id, const char *category);
202 * @brief Sets the content size.
203 * @details Sets the content size of layout.
205 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
206 * @param[in] id Id string of target object
207 * @param[in] w Width in pixel
208 * @param[in] h Height in pixel
210 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
211 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory to add a new block
212 * @retval index Index(>=0) of added block Successfully added
213 * @see dynamicbox_desc_open()
214 * @see dynamicbox_desc_set_id()
216 extern int dynamicbox_desc_set_size(dynamicbox_desc_h handle, const char *id, int w, int h);
219 * @brief Sets the target id of the given block.
220 * @details Only available for the script block.
222 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
223 * @param[in] idx Index of target block
224 * @param[in] id Id String which will be used by other dynamicbox_desc_XXX functions
226 * @retval #DBOX_STATUS_ERROR_NONE Id is successfully updated for given idx of desc block
227 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
228 * @retval #DBOX_STATUS_ERROR_NOT_EXIST Given index of desc block is not exists
229 * @pre Desc block should be exists which has given index "idx".
230 * @post Specified Id string("id") can be used by other dynamicbox_desc_XXXX functions.
231 * @see dynamicbox_desc_open()
232 * @see dynamicbox_desc_set_id()
234 extern int dynamicbox_desc_set_id(dynamicbox_desc_h handle, int idx, const char *id);
237 * @brief Adds a new block.
239 * @param[in] handle Handle which is created by the dynamicbox_desc_open() function
240 * @param[in] id ID of source script object
241 * @param[in] type Type (image|text|script|signal|.. etc)
242 * @param[in] part Target part to update with given content(data)
243 * @param[in] data Content for specified part
244 * @param[in] option Option for the block. (script: group, image: option, ...)
245 * @return Index of current description block
246 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
247 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory to add a new desc block
248 * @retval index Index(>=0) of added desc block
249 * @pre Handle must be created using dynamicbox_desc_open.
250 * @see dynamicbox_desc_set_id()
251 * @see dynamicbox_desc_del_block()
253 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);
256 * @brief Deletes an added block.
258 * @details If you discard the added desc block, use this API and the index of the created desc block.
259 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
260 * @param[in] idx Index of added block, returned from dynamicbox_desc_add_block(), dynamicbox_desc_set_size(), dynamicbox_desc_set_category(), etc
262 * @retval #DBOX_STATUS_ERROR_NONE Successfully deleted
263 * @retval #DBOX_STATUS_ERROR_NOT_EXIST Given index of desc block is not exists
264 * @pre Index must be exists.
265 * @see dynamicbox_desc_add_block()
266 * @see dynamicbox_desc_open()
268 extern int dynamicbox_desc_del_block(dynamicbox_desc_h handle, int idx);
271 * @brief Creates an Object to create an elm_win object.
272 * @details Creating a new Object using Dynamic Box frame buffer.
274 * @param[in] id Instance Id
275 * @param[in] gbar 1 if this object is created for Glance Bar or 0 (for Dynamic Box)
277 * @privilege %http://tizen.org/privilege/core/dynamicbox
278 * @return void* Object type
279 * @retval Address Valid evas object
280 * @retval @c NULL failed to create
282 extern void *dynamicbox_get_evas_object(const char *id, int gbar);
285 * @brief Set extra information for updated content.
287 * If the provider should give some hints to the viewer,
288 * such as title, icon and name, this function can set them.
289 * provider will send those information to the viewer when the
290 * content is updated.
292 * @remarks This function only works with the buffer type inhouse provider.
293 * @param[in] id Dynamic Box Instance Id
294 * @param[in] content Content string that will pass to a Dynamic Box via dynamicbox_create interface when it is re-created.
295 * @param[in] title Human readable text for accessitility, summarized text for representing the content of a box.
296 * @param[in] icon Path of icon image file - alternative image content
297 * @param[in] name Name of a box - alternative text content
299 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
300 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
301 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error
302 * @retval #DBOX_STATUS_ERROR_NONE Successfully sent
304 extern int dynamicbox_set_extra_info(const char *id, const char *content, const char *title, const char *icon, const char *name);
309 * @brief Structure for a Dynamic Box buffer defined by a provider.
312 typedef struct dynamicbox_buffer *dynamicbox_buffer_h;
316 * @brief Return values of dynamicbox programming interfaces: Operation is successfully done.
319 extern const int DBOX_DONE;
323 * @brief Return values of dynamicbox programming interfaces: Contents are updated.
326 extern const int DBOX_OUTPUT_UPDATED;
330 * @brief Return values of dynamicbox programming interfaces: Need to call the dynamicbox_need_to_update and dynamicbox_update_content.
333 extern const int DBOX_NEED_TO_SCHEDULE;
337 * @brief Return values of dynamicbox programming interfaces: Need to do force update.
340 extern const int DBOX_FORCE_TO_SCHEDULE;
344 * @brief Return values of dynamicbox programming interfaces: Need to create a new instance.
347 extern const int DBOX_NEED_TO_CREATE;
351 * @brief Return values of dynamicbox programming interfaces: Need to destroy this instance.
354 extern const int DBOX_NEED_TO_DESTROY;
358 * @brief Return values of dynamicbox programming interfaces: Need to update.
361 extern const int DBOX_NEED_TO_UPDATE;
365 * @brief Return values of dynamicbox programming interfaces: Using network.
368 extern const int DBOX_USE_NET;
372 * @brief System event type: System font is changed.
375 extern const int DBOX_SYS_EVENT_FONT_CHANGED;
379 * @brief System event type: System language is changed.
382 extern const int DBOX_SYS_EVENT_LANG_CHANGED;
386 * @brief System event type: System time is changed.
389 extern const int DBOX_SYS_EVENT_TIME_CHANGED;
393 * @brief System event type: Region changed.
396 extern const int DBOX_SYS_EVENT_REGION_CHANGED;
400 * @brief System event type: Accessibility mode changed.
403 extern const int DBOX_SYS_EVENT_TTS_CHANGED;
407 * @brief System event type: Dynamic Box is paused.
410 extern const int DBOX_SYS_EVENT_PAUSED;
414 * @brief System event type: Dynamic Box is resumed.
417 extern const int DBOX_SYS_EVENT_RESUMED;
421 * @brief System event type: MMC Status change event.
424 extern const int DBOX_SYS_EVENT_MMC_STATUS_CHANGED;
428 * @brief System event type: Dynamic Box instance is removed from a viewer.
431 extern const int DBOX_SYS_EVENT_DELETED;
435 * @brief Notifies the updated content to the provider.
436 * @details Forcedly notifies the updated contents.
437 * This function can be used from async callback function to notify the updated content.
439 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
440 * @param[in] gbar 1 for updating content of Glance Bar or 0(for content of Dynamic Box)
442 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory
443 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
444 * @retval #DBOX_STATUS_ERROR_IO_ERROR I/O failed, Cannot access given resource file(id)
445 * @retval #DBOX_STATUS_ERROR_NONE Successfully notified
446 * @pre This API only can be used after loaded into the data-provider-slave process.
448 extern int dynamicbox_content_is_updated(const char *id, int gbar);
452 * @brief Acquires a buffer for GBar or DBox, currently only the GBar is supported.
454 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
455 * @param[in] gbar 1 for Glance Bar or 0 for Dynamic Box
456 * @param[in] width Width in pixel
457 * @param[in] height Height in pixel
458 * @param[in] pixels Size of a pixel in bytes
459 * @param[in] handler Event handling callback
460 * @param[in] data User data for event handling callback
462 * @privilege %http://tizen.org/privilege/core/dynamicbox
463 * @return Buffer handle
464 * @retval @c NULL Failed to acquire buffer
465 * @retval handler Handle object
466 * @pre Given instance must be specify its type as buffer. or this API will be fail.
467 * @post Allocated buffer object must be released via dynamicbox_release_buffer().
468 * @see dynamicbox_release_buffer()
470 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);
474 * @brief Acquire a buffer for GBar or DBox.
476 * @param[in] handle Buffer handle
477 * @param[in] idx Index of a buffer, DBOX_PRIMARY_BUFFER is used for accessing primary buffer
478 * @param[in] width Width of a buffer
479 * @param[in] height Height of a buffer
480 * @param[in] pixels Pixel size in byte
482 * @privilege %http://tizen.org/privilege/core/dynamicbox
484 * @retval #DBOX_STATUS_ERROR_NONE Successfully allocated
485 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameter
486 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error occurred
487 * @pre dynamicbox_create_buffer() must be called
488 * @see dynamicbox_create_buffer()
489 * @see dynamicbox_release_buffer()
491 extern int dynamicbox_acquire_buffer(dynamicbox_buffer_h handle, int idx, int width, int height, int pixels);
495 * @brief Acquires the Id of Resource (window system).
496 * @details Only if the provider uses Resource for providing render buffer.
498 * @remarks Pixmap Id can be destroyed if you call the dynamicbox_release_buffer(). Then this Resource Id is not guaranteed to use.
499 * @param[in] handle Buffer handle
500 * @param[in] idx Index of a buffer, #c DBOX_PRIMARY_BUFFER is used for accessing the primary buffer
501 * @return unsigned int Resource Id
502 * @retval >0 Resource Id
503 * @retval 0 Failed to get Resource Id
504 * @pre The system must be set to use the Resource Id method for content sharing.
505 * @see dynamicbox_acquire_buffer()
507 extern unsigned int dynamicbox_resource_id(dynamicbox_buffer_h handle, int idx);
511 * @brief Releases the buffer of dynamicbox.
513 * @param[in] handle Buffer handle
514 * @param[in] idx Index of a buffer, #c DBOX_PRIMARY_BUFFER is used for accessing the primary buffer
516 * @privilege %http://tizen.org/privilege/core/dynamicbox
518 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
519 * @retval #DBOX_STATUS_ERROR_NONE Successfully released
520 * @pre Handle must be created using dynamicbox_acquire_buffer().
521 * @see dynamicbox_acquire_buffer()
523 extern int dynamicbox_release_buffer(dynamicbox_buffer_h handle, int idx);
527 * @brief Destroy a buffer of dynamicbox
529 * @param[in] handle buffer handle
531 * @privilege %http://tizen.org/privilege/core/dynamicbox
533 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMTER Invalid argument
534 * @retval #DBOX_STATUS_ERROR_NONE Successfully destroyed
535 * @see dynamicbox_create_buffer()
537 extern int dynamicbox_destroy_buffer(dynamicbox_buffer_h handle);
541 * @brief Gets the address of buffer for S/W rendering.
542 * @details If you try to use this, after dynamicbox_create_hw_buffer(), you will get @c NULL.
543 * This API only be used for primary buffer. you cannot access the extra buffer
545 * @param[in] handle Buffer handle
547 * @privilege %http://tizen.org/privilege/core/dynamicbox
548 * @return void* address of the render buffer
549 * @retval @c NULL If it falis to get buffer address
550 * @retval address If it succeed to get the buffer address
551 * @see dynamicbox_unref_buffer()
553 extern void *dynamicbox_ref_buffer(dynamicbox_buffer_h handle);
557 * @brief Releases the S/W render buffer.
559 * @param[in] buffer Address of render buffer
561 * @privilege %http://tizen.org/privilege/core/dynamicbox
563 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid handle
564 * @retval #DBOX_STATUS_ERROR_NONE Successfully unreference
565 * @pre dynamicbox_ref_buffer() must be called.
566 * @see dynamicbox_ref_buffer()
568 extern int dynamicbox_unref_buffer(void *buffer);
572 * @brief Synchronizes the updated buffer.
573 * @details This is only needed for non-H/W accelerated buffer.
574 * This API is only supported for primary buffer (#c DBOX_PRIMARY_BUFFER)
576 * @param[in] handle Buffer handle
578 * @privilege %http://tizen.org/privilege/core/dynamicbox
580 * @retval #DBOX_STATUS_ERROR_NONE Successfully sync'd
581 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
582 * @see dynamicbox_acquire_buffer()
584 extern int dynamicbox_sync_buffer(dynamicbox_buffer_h handle);
588 * @brief Requests to schedule the update operation to a provider.
589 * Your DBox will get the update request, if the @a id is specified, specific box only will get it.
591 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
593 * @privilege %http://tizen.org/privilege/core/dynamicbox
594 * @return If succes returns 0 or return less than 0
595 * @retval #DBOX_STATUS_ERROR_NONE Successfully triggered
596 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
597 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory
598 * @retval #DBOX_STATUS_ERROR_NOT_EXIST Given id instance is not exist
600 extern int dynamicbox_request_update(const char *id);
604 * @brief Checks whether the dynamicbox supports H/W acceleration or not.
605 * This API is only supported for primary buffer (#c DBOX_PRIMARY_BUFFER)
607 * @param[in] handle Buffer handle
609 * @retval 1 If the buffer handle support the H/W acceleration buffer
610 * @retval 0 If it doesn not supported
611 * @see dynamicbox_acquire_buffer()
613 extern int dynamicbox_support_hw_buffer(dynamicbox_buffer_h handle);
617 * @brief Creates the H/W accelerated buffer.
618 * This API is only supported for primary buffer (#c DBOX_PRIMARY_BUFFER)
620 * @param[in] handle Buffer handle
622 * @privilege %http://tizen.org/privilege/core/dynamicbox
624 * @retval #DBOX_STATUS_ERROR_ALREADY H/W buffer is already created
625 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
626 * @retval #DBOX_STATUS_ERROR_NONE Successfully created
627 * @pre Must be checked whether the H/W buffer is supported or not.
628 * @post Must be destroyed if it is not necessary.
629 * @see dynamicbox_support_hw_buffer()
631 extern int dynamicbox_create_hw_buffer(dynamicbox_buffer_h handle);
635 * @brief Destroys the H/W accelerated buffer.
636 * This API is only supported for primary buffer (#c DBOX_PRIMARY_BUFFER)
638 * @param[in] handle Buffer handle
640 * @privilege %http://tizen.org/privilege/core/dynamicbox
642 * @retval #DBOX_STATUS_ERROR_NONE Successfully destroyed
643 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
644 * @pre Must be created h/w buffer using dynamicbox_create_hw_buffer.
645 * @see dynamicbox_create_hw_buffer()
647 extern int dynamicbox_destroy_hw_buffer(dynamicbox_buffer_h handle);
651 * @brief Gets the address of the accelerated H/W buffer.
652 * This API is only supported for primary buffer (#c DBOX_PRIMARY_BUFFER)
654 * @param[in] handle Buffer handle
656 * @privilege %http://tizen.org/privilege/core/dynamicbox
658 * @retval @c NULL Failed to get H/W accelerated buffer address
659 * @retval addr H/W accelerated buffer address
660 * @see dynamicbox_create_hw_buffer()
662 extern void *dynamicbox_buffer_hw_buffer(dynamicbox_buffer_h handle);
666 * @brief Get the stride information from the buffer info
667 * This API is only supported for primary buffer (#c DBOX_PRIMARY_BUFFER)
669 * @param[in] handle Buffer handle
670 * @return int stride size
671 * @retval positive_value length of stride
672 * @return #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameter
673 * @return #DBOX_STATUS_ERROR_FAULT Unrecoverable error
674 * @see dynamicbox_create_hw_buffer()
676 extern int dynamicbox_buffer_stride(dynamicbox_buffer_h handle);
680 * @brief Pre-processes for rendering content.
681 * @details This is only needed for accessing H/W accelerated buffer.
683 * @param[in] handle Buffer handle
685 * @privilege %http://tizen.org/privilege/core/dynamicbox
687 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid handle
688 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
689 * @post dynamicbox_buffer_post_render must be called after the rendering (accessing buffer) is completed.
690 * @see dynamicbox_support_hw_buffer()
691 * @see dynamicbox_buffer_post_render()
693 extern int dynamicbox_buffer_pre_render(dynamicbox_buffer_h handle);
697 * @brief Post-processes for rendering content.
699 * @param[in] handle Buffer handle
701 * @privilege %http://tizen.org/privilege/core/dynamicbox
702 * @return If succes returns 0 or return less than 0
703 * @retval #DBOX_STATUS_ERROR_NONE If succeed
704 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
705 * @pre dynamicbox_buffer_pre_render must be called.
706 * @see dynamicbox_support_hw_buffer()
707 * @see dynamicbox_buffer_pre_render()
709 extern int dynamicbox_buffer_post_render(dynamicbox_buffer_h handle);
713 * @brief Sends a request to the viewer (homescreen) to close the GBar.
714 * @details Even though you call this function. the homescreen can ignore it.
716 * @param[in] dboxid Dynamic Box Package Id
717 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
718 * @param[in] reason #DBOX_STATUS_ERROR_NONE(0)
720 * @privilege %http://tizen.org/privilege/core/dynamicbox
722 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
723 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
724 * @retval #DBOX_STATUS_ERROR_FAULT Failed to send a request
725 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
727 extern int dynamicbox_request_close_glance_bar(const char *dboxid, const char *id, int reason);
731 * @brief Send a freeze request to the viewer (homescreen)
733 * The viewer will get this request via event callback.
734 * Then it should freeze its scroller or stop moving the dynamicbox.
736 * @remarks If the viewer doesn't care this request, this will has no effect.
737 * @param[in] dboxid Dynamic Box Package Id
738 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
740 * @privilege %http://tizen.org/privilege/core/dynamicbox
742 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
743 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
744 * @retval #DBOX_STATUS_ERROR_FAULT Failed to send requet
745 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
746 * @see dynamicbox_release_scroller()
748 extern int dynamicbox_freeze_scroller(const char *dboxid, const char *id);
752 * @brief Send a release request to the viewer (homescreen)
754 * The viewer will get this request via event callback.
755 * Then it should release its scroller or continue moving the dynamicbox.
757 * @remarks If the viewer doesn't care this request, this will has no effect.
758 * @param[in] dboxid Dynamic Box Package Id
759 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
761 * @privilege %http://tizen.org/privilege/core/dynamicbox
763 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
764 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
765 * @retval #DBOX_STATUS_ERROR_FAULT Failed to send requet
766 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
767 * @see dynamicbox_freeze_scroller()
769 extern int dynamicbox_thaw_scroller(const char *dboxid, const char *id);
773 * @brief Create a snapshot window
775 * If you want create a snapshot image of contents, create this snapshot window
776 * But it will not renders object asynchronously,
777 * So you have to render the objects immediately, the delayed rendering object will not be on the canvas
778 * After flush it to a file.
781 * @param[in] size_type
783 * @privilege %http://tizen.org/privilege/core/dynamicbox
784 * @return void* window
785 * @retval @c NULL failed to create a snapshot window
786 * @retval Object window object (ex, elementary window)
787 * @see dynamicbox_snapshot_window_flush()
789 extern void *dynamicbox_snapshot_window_add(const char *id, int size_type);
793 * @brief Flush to a file for snapshot window
795 * @param[in] snapshot_win Snapshot window
796 * @param[in] timeout After this, the image file will be created
797 * @param[in] flush_cb Right after flush an image file, this callback will be called
798 * @param[in] data Callback data for flush_cb
800 * @retval #DBOX_STATUS_ERROR_NONE Successfully flushed (flush timer added)
801 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid paramter
802 * @retval #DBOX_STATUS_ERROR_FAULT Failed to create a flush timer
803 * @see dynamicbox_snapshot_window_add()
805 extern int dynamicbox_snapshot_window_flush(void *snapshot_win, double timeout, dynamicbox_flush_cb flush_cb, void *data);
809 * @brief Sending the updated event to the viewer
811 * @param[in] handle Dynamicbox Buffer Handle
812 * @param[in] idx Index of a buffer
814 * @retval #DBOX_STATUS_ERROR_NONE Successfully sent
816 extern int dynamicbox_send_updated_by_idx(dynamicbox_buffer_h handle, int idx);