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 #ifndef __DYNAMICBOX_UILITY_H
18 #define __DYNAMICBOX_UILITY_H
28 * @brief This file declares API of libdynamicbox library
33 * @addtogroup CAPI_DYNAMICBOX_UTILITY_MODULE
38 * @brief Definition for COLOR BLOCK.
41 #define DBOX_DESC_TYPE_COLOR "color"
44 * @brief Definition for TEXT BLOCK.
47 #define DBOX_DESC_TYPE_TEXT "text"
50 * @brief Definition for IMAGE BLOCK.
53 #define DBOX_DESC_TYPE_IMAGE "image"
56 * @brief Definition for SIGNAL BLOCK.
59 #define DBOX_DESC_TYPE_SIGNAL "signal"
62 * @brief Definition for INFO BLOCK.
65 #define DBOX_DESC_TYPE_INFO "info"
68 * @brief Definition for DRAG BLOCK.
71 #define DBOX_DESC_TYPE_DRAG "drag"
74 * @brief Definition for SCRIPT SCRIPT.
77 #define DBOX_DESC_TYPE_SCRIPT "script"
80 * @brief Definition for ACCESSIBILITY INFORMATION BLOCK.
83 #define DBOX_DESC_TYPE_ACCESS "access"
86 * @brief Definition for accessibility operation.
89 #define DBOX_DESC_TYPE_ACCESS_OPERATION "access,operation"
92 * @brief Definition for set highlight on specified part.
95 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_SET "set,hl"
98 * @brief Definition for remove highlight from specified part.
101 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_UNSET "unset,hl"
104 * @brief Definition for move the highlight to next part.
107 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_NEXT "next,hl"
110 * @brief Definition for move the highlight to previous part.
113 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_PREV "prev,hl"
116 * @brief Definition for reset the chain of accessibility highlight list.
119 #define DBOX_DESC_DATA_ACCESS_OPERATION_RESET "reset,focus"
122 * @brief Definition for specify the highlight move option.
123 * @details If the highlight list reaches to the last object, move back to the first object.
126 #define DBOX_DESC_OPTION_ACCESS_HL_LOOP "cycle"
129 * @brief Definition for specify the highlight move option.
130 * @details If the highlight list reaches to the last object(or the first object),
131 * the "prev,hl", "next,hl" will be failed.
134 #define DBOX_DESC_OPTION_ACCESS_HL_NOLOOP "no,cycle"
137 * @brief Dynamic Box description data handle.
140 struct dynamicbox_desc;
143 * @brief Updates a description file.
145 * @remarks Must be used only by Inhouse Dynamic Box.
146 * @param[in] id Dynamic Box Instance Id
147 * @param[in] gbar 1 for Glance Bar or 0
149 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
150 * @return Handle of desc instance
151 * @pre Should be loaded by data-provider-slave.
152 * @post Should be destroyed(flushed) using dynamicbox_desc_close() API.
153 * @see dynamicbox_desc_close()
155 extern struct dynamicbox_desc *dynamicbox_desc_open(const char *id, int gbar);
158 * @brief Completes the description file update.
159 * @details Only if this API is called, the description data will be applied to the content of Dynamic Box (or GBar).
161 * @remarks Must be used only by Inhouse Dynamic Box.
162 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
164 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
166 * @retval #DBOX_STATUS_ERROR_NONE If the flushing description data is successfully done
167 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER If the given handle is not valid
168 * @pre Handle must be created by dynamicbox_desc_open()
169 * @post Handle must not be used after return from this function.
170 * @see dynamicbox_desc_open()
172 extern int dynamicbox_desc_close(struct dynamicbox_desc *handle);
175 * @brief Sets the category information of current description data.
176 * @details Creates a new description block for updating category information of layout object.
178 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
179 * @param[in] id Id string of target object
180 * @param[in] category Category string that will be used by layout object
182 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid handle
183 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Memory is not enough to add this block
184 * @retval index Index(>=0) of added block, which can be used by dynamicbox_desc_set_id()
185 * @pre Must be called after create a handle using dynamicbox_desc_open()
186 * @see dynamicbox_desc_set_id()
188 extern int dynamicbox_desc_set_category(struct dynamicbox_desc *handle, const char *id, const char *category);
191 * @brief Sets the content size.
192 * @details Sets the content size of layout.
194 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
195 * @param[in] id Id string of target object
196 * @param[in] w Width in pixel
197 * @param[in] h Height in pixel
199 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
200 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory to add a new block
201 * @retval index Index(>=0) of added block Successfully added
202 * @see dynamicbox_desc_open()
203 * @see dynamicbox_desc_set_id()
205 extern int dynamicbox_desc_set_size(struct dynamicbox_desc *handle, const char *id, int w, int h);
208 * @brief Sets the target id of the given block.
209 * @details Only available for the script block.
211 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
212 * @param[in] idx Index of target block
213 * @param[in] id Id String which will be used by other dynamicbox_desc_XXX functions
215 * @retval #DBOX_STATUS_ERROR_NONE Id is successfully updated for given idx of desc block
216 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
217 * @retval #DBOX_STATUS_ERROR_NOT_EXIST Given index of desc block is not exists
218 * @pre Desc block should be exists which has given index "idx".
219 * @post Specified Id string("id") can be used by other dynamicbox_desc_XXXX functions.
220 * @see dynamicbox_desc_open()
221 * @see dynamicbox_desc_set_id()
223 extern int dynamicbox_desc_set_id(struct dynamicbox_desc *handle, int idx, const char *id);
226 * @brief Adds a new block.
228 * @param[in] handle Handle which is created by the dynamicbox_desc_open() function
229 * @param[in] id ID of source script object
230 * @param[in] type Type (image|text|script|signal|.. etc)
231 * @param[in] part Target part to update with given content(data)
232 * @param[in] data Content for specified part
233 * @param[in] option Option for the block. (script: group, image: option, ...)
234 * @return Index of current description block
235 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
236 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory to add a new desc block
237 * @retval index Index(>=0) of added desc block
238 * @pre Handle must be created using dynamicbox_desc_open.
239 * @see dynamicbox_desc_set_id()
240 * @see dynamicbox_desc_del_block()
242 extern int dynamicbox_desc_add_block(struct dynamicbox_desc *handle, const char *id, const char *type, const char *part, const char *data, const char *option);
245 * @brief Deletes an added block.
247 * @details If you discard the added desc block, use this API and the index of the created desc block.
248 * @param[in] handle Handle which is created by dynamicbox_desc_open() function
249 * @param[in] idx Index of added block, returned from dynamicbox_desc_add_block(), dynamicbox_desc_set_size(), dynamicbox_desc_set_category(), etc
251 * @retval #DBOX_STATUS_ERROR_NONE Successfully deleted
252 * @retval #DBOX_STATUS_ERROR_NOT_EXIST Given index of desc block is not exists
253 * @pre Index must be exists.
254 * @see dynamicbox_desc_add_block()
255 * @see dynamicbox_desc_open()
257 extern int dynamicbox_desc_del_block(struct dynamicbox_desc *handle, int idx);
260 * @brief Creates an Evas_Object to create an elm_win object.
261 * @details Creating a new Evas_Object using Dynamic Box frame buffer.
263 * @param[in] id Instance Id
264 * @param[in] gbar 1 if this object is created for Glance Bar or 0 (for Dynamic Box)
266 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
267 * @return Evas_Object* Evas Object type
268 * @retval Address Valid evas object
269 * @retval @c NULL failed to create
271 extern Evas_Object *dynamicbox_get_evas_object(const char *id, int gbar);
274 * @brief Set extra information for updated content.
276 * If the provider should give some hints to the viewer,
277 * such as title, icon and name, this function can set them.
278 * provider will send those information to the viewer when the
279 * content is updated.
281 * @remarks This function only works with the buffer type inhouse provider.
282 * @param[in] id Dynamic Box Instance Id
283 * @param[in] content Content string that will pass to a Dynamic Box via dynamicbox_create interface when it is re-created.
284 * @param[in] title Human readable text for accessitility, summarized text for representing the content of a box.
285 * @param[in] icon Path of icon image file - alternative image content
286 * @param[in] name Name of a box - alternative text content
288 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
289 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
290 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error
291 * @retval #DBOX_STATUS_ERROR_NONE Successfully sent
293 extern int dynamicbox_set_extra_info(const char *id, const char *content, const char *title, const char *icon, const char *name);
298 * @brief Structure for a Dynamic Box buffer defined by a provider.
301 struct dynamicbox_buffer;
305 * @brief Return values of dynamicbox programming interfaces: Operation is successfully done.
308 extern const int DONE;
312 * @brief Return values of dynamicbox programming interfaces: Contents are updated.
315 extern const int OUTPUT_UPDATED;
319 * @brief Return values of dynamicbox programming interfaces: Need to call the dynamicbox_need_to_update and dynamicbox_update_content.
322 extern const int NEED_TO_SCHEDULE;
326 * @brief Return values of dynamicbox programming interfaces: Need to do force update.
329 extern const int FORCE_TO_SCHEDULE;
333 * @brief Return values of dynamicbox programming interfaces: Need to create a new instance.
336 extern const int NEED_TO_CREATE;
340 * @brief Return values of dynamicbox programming interfaces: Need to destroy this instance.
343 extern const int NEED_TO_DESTROY;
347 * @brief Return values of dynamicbox programming interfaces: Need to update.
350 extern const int NEED_TO_UPDATE;
354 * @brief Return values of dynamicbox programming interfaces: Using network.
357 extern const int USE_NET;
361 * @brief System event type: System font is changed.
364 extern const int DBOX_SYS_EVENT_FONT_CHANGED;
368 * @brief System event type: System language is changed.
371 extern const int DBOX_SYS_EVENT_LANG_CHANGED;
375 * @brief System event type: System time is changed.
378 extern const int DBOX_SYS_EVENT_TIME_CHANGED;
382 * @brief System event type: Region changed.
385 extern const int DBOX_SYS_EVENT_REGION_CHANGED;
389 * @brief System event type: Accessibility mode changed.
392 extern const int DBOX_SYS_EVENT_TTS_CHANGED;
396 * @brief System event type: Dynamic Box is paused.
399 extern const int DBOX_SYS_EVENT_PAUSED;
403 * @brief System event type: Dynamic Box is resumed.
406 extern const int DBOX_SYS_EVENT_RESUMED;
410 * @brief System event type: MMC Status change event.
413 extern const int DBOX_SYS_EVENT_MMC_STATUS_CHANGED;
417 * @brief System event type: Dynamic Box instance is removed from a viewer.
420 extern const int DBOX_SYS_EVENT_DELETED;
424 * @brief Structure for extra event information for dynamicbox_content_event interface function.
427 #if !defined(__SCRIPT_EVENT_INFO)
428 #define __SCRIPT_EVENT_INFO
433 * Text signal & Content event uses this data structure.
438 double x; /**< X value of current mouse(touch) position */
439 double y; /**< Y value of current mouse(touch) position */
440 int down; /**< Is it pressed(1) or not(0) */
444 double sx; /**< Pressed object's left top X */
445 double sy; /**< Pressed object's left top Y */
446 double ex; /**< Pressed object's right bottom X */
447 double ey; /**< Pressed object's right bottom Y */
454 * @brief Notifies the updated content to the provider.
455 * @details Forcedly notifies the updated contents.
456 * This function can be used from async callback function to notify the updated content.
458 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
459 * @param[in] gbar 1 for updating content of Glance Bar or 0(for content of Dynamic Box)
461 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory
462 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
463 * @retval #DBOX_STATUS_ERROR_IO_ERROR I/O failed, Cannot access given resource file(id)
464 * @retval #DBOX_STATUS_ERROR_NONE Successfully notified
465 * @pre This API only can be used after loaded into the data-provider-slave process.
467 extern int dynamicbox_content_is_updated(const char *id, int gbar);
471 * @brief Replaces "\n" (new line character) with <br> tag.
472 * @details This utility function is used to replace all NEW LINE CHARACTER ("\n") with <br> tag.
474 * @param[in] str Source string
475 * @return char * type
476 * @retval string Allocted in the heap
477 * @retval @c NULL If it fails to replace string
478 * @post Returned string must has to be free'd by user manually.
480 extern char *dynamicbox_util_nl2br(const char *str);
484 * @brief Interfaces for direct buffer management (Available only for the GBar area).
487 #ifndef __DBOX_PROVIDER_BUFFER_H
490 * @brief Enumeration for value should be sync'd with provider.
493 enum dbox_buffer_event {
494 DBOX_BUFFER_EVENT_ENTER, /**< Mouse cursor enter */
495 DBOX_BUFFER_EVENT_LEAVE, /**< Mouse cursor leave */
496 DBOX_BUFFER_EVENT_DOWN, /**< Mouse down */
497 DBOX_BUFFER_EVENT_MOVE, /**< Mouse move */
498 DBOX_BUFFER_EVENT_UP, /**< Mouse up */
500 DBOX_BUFFER_EVENT_KEY_DOWN, /**< Key down */
501 DBOX_BUFFER_EVENT_KEY_UP, /**< Key up */
502 DBOX_BUFFER_EVENT_KEY_FOCUS_IN, /**< Key focus in */
503 DBOX_BUFFER_EVENT_KEY_FOCUS_OUT, /**< Key focus out */
505 DBOX_BUFFER_EVENT_HIGHLIGHT, /**< Accessibility - Highlight */
506 DBOX_BUFFER_EVENT_HIGHLIGHT_NEXT, /**< Accessibility - Move highlight to next */
507 DBOX_BUFFER_EVENT_HIGHLIGHT_PREV, /**< Accessibility - Move highlight to prev */
508 DBOX_BUFFER_EVENT_ACTIVATE, /**< Accessibility - Activate the highlighted object */
509 DBOX_BUFFER_EVENT_ACTION_UP, /**< Accessibility - Make UP action */
510 DBOX_BUFFER_EVENT_ACTION_DOWN, /**< Accessibility - Make Down action */
511 DBOX_BUFFER_EVENT_SCROLL_UP, /**< Accessibility - Scroll up */
512 DBOX_BUFFER_EVENT_SCROLL_MOVE, /**< Accessibility - Scroll move */
513 DBOX_BUFFER_EVENT_SCROLL_DOWN, /**< Accessibility - Scroll down */
514 DBOX_BUFFER_EVENT_UNHIGHLIGHT, /**< Accessibility - Remove highlight */
516 DBOX_BUFFER_EVENT_ON_HOLD, /**< To prevent from generating mouse clicked event */
517 DBOX_BUFFER_EVENT_OFF_HOLD, /**< Stopped holding. */
518 DBOX_BUFFER_EVENT_ON_SCROLL, /**< On scrolling */
519 DBOX_BUFFER_EVENT_OFF_SCROLL, /**< Scrolling stopped */
521 DBOX_BUFFER_EVENT_ACCESS_VALUE_CHANGE, /**< */
522 DBOX_BUFFER_EVENT_ACCESS_MOUSE, /**< give mouse event to highlight object */
523 DBOX_BUFFER_EVENT_ACCESS_BACK, /**< go back to a previous view ex: pop naviframe item */
524 DBOX_BUFFER_EVENT_ACCESS_OVER, /**< mouse over an object */
525 DBOX_BUFFER_EVENT_ACCESS_READ, /**< highlight an object */
526 DBOX_BUFFER_EVENT_ACCESS_ENABLE, /**< enable highlight and read ability */
527 DBOX_BUFFER_EVENT_ACCESS_DISABLE /**< disable highlight and read ability */
535 struct dbox_buffer_event_data {
536 enum dbox_buffer_event type; /**< Mouse, Keyboard, Accessibility event type */
537 double timestamp; /**< Timestamp of events */
541 int x; /**< If the event type is for accessibility or mouse, coordinates of X for pointer */
542 int y; /**< If the event type is for accessibility or mouse, coordinates of Y for pointer */
546 int x; /**< Accessibility event X coordinate */
547 int y; /**< Accessibility event Y coordinate */
548 unsigned int mouse_type; /**< 0: down, 1: move, 2: up | 0: cur, 1: next, 2: prev, 3: off */
549 unsigned int action_type; /**< reserved for protocol */
550 unsigned int action_by; /**< reserved for protocol */
551 int cycle; /**< reserved for protocol */
554 unsigned int keycode; /**< If the event type is for keyboard, the value of keycode */
561 * @brief Acquires a buffer for GBar or DBox, currently only the GBar is supported.
563 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
564 * @param[in] gbar 1 for Glance Bar or 0 for Dynamic Box
565 * @param[in] width Width in pixel
566 * @param[in] height Height in pixel
567 * @param[in] pixels Size of a pixel in bytes
568 * @param[in] handler Event handling callback
569 * @param[in] data User data for event handling callback
571 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
572 * @return Buffer handle
573 * @retval @c NULL Failed to acquire buffer
574 * @retval handler Handle object
575 * @pre Given instance must be specify its type as buffer. or this API will be fail.
576 * @post Allocated buffer object must be released via dynamicbox_release_buffer().
577 * @see dynamicbox_release_buffer()
579 extern struct dynamicbox_buffer *dynamicbox_acquire_buffer(const char *id, int gbar, int width, int height, int pixels, int auto_align, int (*handler)(struct dynamicbox_buffer *, struct dbox_buffer_event_data *, void *), void *data);
583 * @brief Acquires the Id of Resource (window system).
584 * @details Only if the provider uses Resource for providing render buffer.
586 * @remarks Pixmap Id can be destroyed if you call the dynamicbox_release_buffer(). Then this Resource Id is not guaranteed to use.
587 * @param[in] handle Buffer handle
588 * @return unsigned int Resource Id
589 * @retval >0 Resource Id
590 * @retval 0 Failed to get Resource Id
591 * @pre The system must be set to use the Resource Id method for content sharing.
592 * @see dynamicbox_acquire_buffer()
594 extern unsigned int dynamicbox_resource_id(struct dynamicbox_buffer *handle);
598 * @brief Releases the buffer of dynamicbox.
600 * @param[in] handle Buffer handle
602 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
604 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
605 * @retval #DBOX_STATUS_ERROR_NONE Successfully released
606 * @pre Handle must be created using dynamicbox_acquire_buffer().
607 * @see dynamicbox_acquire_buffer()
609 extern int dynamicbox_release_buffer(struct dynamicbox_buffer *handle);
613 * @brief Gets the address of buffer for S/W rendering.
614 * @details If you try to use this, after dynamicbox_create_hw_buffer(), you will get @c NULL.
616 * @param[in] handle Buffer handle
618 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
619 * @return void* address of the render buffer
620 * @retval @c NULL If it falis to get buffer address
621 * @retval address If it succeed to get the buffer address
622 * @see dynamicbox_unref_buffer()
624 extern void *dynamicbox_ref_buffer(struct dynamicbox_buffer *handle);
628 * @brief Releases the S/W render buffer.
630 * @param[in] buffer Address of render buffer
632 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
634 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid handle
635 * @retval #DBOX_STATUS_ERROR_NONE Successfully unreference
636 * @pre dynamicbox_ref_buffer() must be called.
637 * @see dynamicbox_ref_buffer()
639 extern int dynamicbox_unref_buffer(void *buffer);
643 * @brief Synchronizes the updated buffer.
644 * @details This is only needed for non-H/W accelerated buffer.
646 * @param[in] handle Buffer handle
648 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
650 * @retval #DBOX_STATUS_ERROR_NONE Successfully sync'd
651 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
652 * @see dynamicbox_acquire_buffer()
654 extern int dynamicbox_sync_buffer(struct dynamicbox_buffer *handle);
658 * @brief Requests to schedule the update operation to a provider.
660 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
662 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
663 * @return If succes returns 0 or return less than 0
664 * @retval #DBOX_STATUS_ERROR_NONE Successfully triggered
665 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
666 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory
667 * @retval #DBOX_STATUS_ERROR_NOT_EXIST Given id instance is not exist
669 extern int dynamicbox_request_update(const char *id);
673 * @brief Checks whether the dynamicbox supports H/W acceleration or not.
675 * @param[in] handle Buffer handle
677 * @retval 1 If the buffer handle support the H/W acceleration buffer
678 * @retval 0 If it doesn not supported
679 * @see dynamicbox_acquire_buffer()
681 extern int dynamicbox_support_hw_buffer(struct dynamicbox_buffer *handle);
685 * @brief Creates the H/W accelerated buffer.
687 * @param[in] handle Buffer handle
689 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
691 * @retval #DBOX_STATUS_ERROR_ALREADY H/W buffer is already created
692 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
693 * @retval #DBOX_STATUS_ERROR_NONE Successfully created
694 * @pre Must be checked whether the H/W buffer is supported or not.
695 * @post Must be destroyed if it is not necessary.
696 * @see dynamicbox_support_hw_buffer()
698 extern int dynamicbox_create_hw_buffer(struct dynamicbox_buffer *handle);
702 * @brief Destroys the H/W accelerated buffer.
704 * @param[in] handle Buffer handle
706 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
708 * @retval #DBOX_STATUS_ERROR_NONE Successfully destroyed
709 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
710 * @pre Must be created h/w buffer using dynamicbox_create_hw_buffer.
711 * @see dynamicbox_create_hw_buffer()
713 extern int dynamicbox_destroy_hw_buffer(struct dynamicbox_buffer *handle);
717 * @brief Gets the address of the accelerated H/W buffer.
719 * @param[in] handle Buffer handle
721 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
723 * @retval @c NULL Failed to get H/W accelerated buffer address
724 * @retval addr H/W accelerated buffer address
725 * @see dynamicbox_create_hw_buffer()
727 extern void *dynamicbox_buffer_hw_buffer(struct dynamicbox_buffer *handle);
731 * @brief Get the stride information from the buffer info
733 * @param[in] handle Buffer handle
734 * @return int stride size
735 * @retval positive_value length of stride
736 * @return DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameter
737 * @return DBOX_STATUS_ERROR_FAULT Unrecoverable error
738 * @see dynamicbox_create_hw_buffer()
740 extern int dynamicbox_buffer_stride(struct dynamicbox_buffer *handle);
744 * @brief Pre-processes for rendering content.
745 * @details This is only needed for accessing H/W accelerated buffer.
747 * @param[in] handle Buffer handle
749 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
751 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid handle
752 * @retval #DBOX_STATUS_ERROR_NONE Successfully done
753 * @post dynamicbox_buffer_post_render must be called after the rendering (accessing buffer) is completed.
754 * @see dynamicbox_support_hw_buffer()
755 * @see dynamicbox_buffer_post_render()
757 extern int dynamicbox_buffer_pre_render(struct dynamicbox_buffer *handle);
761 * @brief Post-processes for rendering content.
763 * @param[in] handle Buffer handle
765 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
766 * @return If succes returns 0 or return less than 0
767 * @retval #DBOX_STATUS_ERROR_NONE If succeed
768 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
769 * @pre dynamicbox_buffer_pre_render must be called.
770 * @see dynamicbox_support_hw_buffer()
771 * @see dynamicbox_buffer_pre_render()
773 extern int dynamicbox_buffer_post_render(struct dynamicbox_buffer *handle);
777 * @brief Sends a request to the viewer (homescreen) to close the GBar.
778 * @details Even though you call this function. the homescreen can ignore it.
780 * @param[in] dboxid Dynamic Box Package Id
781 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
782 * @param[in] reason DBOX_STATUS_ERROR_NONE(0)
784 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
786 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
787 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
788 * @retval #DBOX_STATUS_ERROR_FAULT Failed to send a request
789 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
791 extern int dynamicbox_request_close_gbar(const char *dboxid, const char *id, int reason);
795 * @brief Send a freeze request to the viewer (homescreen)
797 * The viewer will get this request via event callback.
798 * Then it should freeze its scroller or stop moving the dynamicbox.
800 * @remarks If the viewer doesn't care this request, this will has no effect.
801 * @param[in] dboxid Dynamic Box Package Id
802 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
804 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
806 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
807 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
808 * @retval #DBOX_STATUS_ERROR_FAULT Failed to send requet
809 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
810 * @see dynamicbox_release_scroller()
812 extern int dynamicbox_freeze_scroller(const char *dboxid, const char *id);
816 * @brief Send a release request to the viewer (homescreen)
818 * The viewer will get this request via event callback.
819 * Then it should release its scroller or continue moving the dynamicbox.
821 * @remarks If the viewer doesn't care this request, this will has no effect.
822 * @param[in] dboxid Dynamic Box Package Id
823 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
825 * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
827 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
828 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
829 * @retval #DBOX_STATUS_ERROR_FAULT Failed to send requet
830 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
831 * @see dynamicbox_freeze_scroller()
833 extern int dynamicbox_thaw_scroller(const char *dboxid, const char *id);
837 * @brief Get the configuration value for premultiplied alpha.
839 * If the system uses the premultiplied alpha for content,
840 * This function will returns 1.
842 * @remarks This function only works with the inhouse provider.
843 * @return status of premultiplied alpha.
844 * @retval 1 Content rendered with premultiplied alpha.
845 * @retval 0 Content doesn't rendered with premultiplied alpha.
847 extern int dynamicbox_conf_premultiplied_alpha(void);
851 * @brief Get the configuration value for AUTO Alignment of canvas buffer.
853 * If the UIFW does not support the STRIDE information for rendering frame,
854 * This function will returns 1, then the dynamicbox will automatically aligning the buffer.
856 * @return status of auto alignment.
857 * @retval 1 Content will be automatically aligned by dynamicbox.
858 * @retval 0 Content will be aligned by UIFW, using stride information.
860 extern int dynamicbox_conf_auto_align(void);