Replace livebox with dynamicbox
[apps/native/widget/widget.git] / include / dynamicbox.h
1 /*
2  * Copyright 2013  Samsung Electronics Co., Ltd
3  *
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
7  *
8  * http://floralicense.org/license/
9  *
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.
15  */
16
17 /**
18  * Export by dynamicbox_service
19  */
20 #include <dynamicbox_buffer.h>
21 #include <dynamicbox_script.h>
22
23 #ifndef __DYNAMICBOX_UILITY_H
24 #define __DYNAMICBOX_UILITY_H
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 /**
31  * @file dynamicbox.h
32  * @brief This file declares API of libdynamicbox library
33  * @since_tizen 2.3
34  */
35
36 /**
37  * @addtogroup CAPI_DYNAMICBOX_UTILITY_MODULE
38  * @{
39  */
40
41 /**
42  * @brief Definition for COLOR BLOCK.
43  * @since_tizen 2.3
44  */
45 #define DBOX_DESC_TYPE_COLOR "color"
46
47 /**
48  * @brief Definition for TEXT BLOCK.
49  * @since_tizen 2.3
50  */
51 #define DBOX_DESC_TYPE_TEXT "text"
52
53 /**
54  * @brief Definition for IMAGE BLOCK.
55  * @since_tizen 2.3
56  */
57 #define DBOX_DESC_TYPE_IMAGE "image"
58
59 /**
60  * @brief Definition for SIGNAL BLOCK.
61  * @since_tizen 2.3
62  */
63 #define DBOX_DESC_TYPE_SIGNAL "signal"
64
65 /**
66  * @brief Definition for INFO BLOCK.
67  * @since_tizen 2.3
68  */
69 #define DBOX_DESC_TYPE_INFO "info"
70
71 /**
72  * @brief Definition for DRAG BLOCK.
73  * @since_tizen 2.3
74  */
75 #define DBOX_DESC_TYPE_DRAG "drag"
76
77 /**
78  * @brief Definition for SCRIPT SCRIPT.
79  * @since_tizen 2.3
80  */
81 #define DBOX_DESC_TYPE_SCRIPT "script"
82
83 /**
84  * @brief Definition for ACCESSIBILITY INFORMATION BLOCK.
85  * @since_tizen 2.3
86  */
87 #define DBOX_DESC_TYPE_ACCESS "access"
88
89 /**
90  * @brief Definition for accessibility operation.
91  * @since_tizen 2.3
92  */
93 #define DBOX_DESC_TYPE_ACCESS_OPERATION "access,operation"
94
95 /**
96  * @brief Definition for set highlight on specified part.
97  * @since_tizen 2.3
98  */
99 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_SET "set,hl"
100
101 /**
102  * @brief Definition for remove highlight from specified part.
103  * @since_tizen 2.3
104  */
105 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_UNSET "unset,hl"
106
107 /**
108  * @brief Definition for move the highlight to next part.
109  * @since_tizen 2.3
110  */
111 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_NEXT "next,hl"
112
113 /**
114  * @brief Definition for move the highlight to previous part.
115  * @since_tizen 2.3
116  */
117 #define DBOX_DESC_DATA_ACCESS_OPERATION_HL_PREV "prev,hl"
118
119 /**
120  * @brief Definition for reset the chain of accessibility highlight list.
121  * @since_tizen 2.3
122  */
123 #define DBOX_DESC_DATA_ACCESS_OPERATION_RESET "reset,focus"
124
125 /**
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.
128  * @since_tizen 2.3
129  */
130 #define DBOX_DESC_OPTION_ACCESS_HL_LOOP "cycle"
131
132 /**
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.
136  * @since_tizen 2.3
137  */
138 #define DBOX_DESC_OPTION_ACCESS_HL_NOLOOP "no,cycle"
139
140 /**
141  * @brief Dynamic Box description data handle.
142  * @since_tizen 2.3
143  */
144 typedef struct dynamicbox_desc *dynamicbox_desc_h;
145
146 /**
147  * @brief Updates a description file.
148  * @since_tizen 2.3
149  * @remarks Must be used only by Inhouse Dynamic Box.
150  * @param[in] id Dynamic Box Instance Id
151  * @param[in] gbar 1 for Glance Bar or 0
152  * @privlevel public
153  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
154  * @return Handle of desc instance
155  * @pre Should be loaded by data-provider-slave.
156  * @post Should be destroyed(flushed) using dynamicbox_desc_close() API.
157  * @see dynamicbox_desc_close()
158  */
159 extern dynamicbox_desc_h dynamicbox_desc_open(const char *id, int gbar);
160
161 /**
162  * @brief Completes the description file update.
163  * @details Only if this API is called, the description data will be applied to the content of Dynamic Box (or GBar).
164  * @since_tizen 2.3
165  * @remarks Must be used only by Inhouse Dynamic Box.
166  * @param[in] handle Handle which is created by dynamicbox_desc_open() function
167  * @privlevel public
168  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
169  * @return int type
170  * @retval #DBOX_STATUS_ERROR_NONE If the flushing description data is successfully done
171  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER If the given handle is not valid
172  * @pre Handle must be created by dynamicbox_desc_open()
173  * @post Handle must not be used after return from this function.
174  * @see dynamicbox_desc_open()
175  */
176 extern int dynamicbox_desc_close(dynamicbox_desc_h handle);
177
178 /**
179  * @brief Sets the category information of current description data.
180  * @details Creates a new description block for updating category information of layout object.
181  * @since_tizen 2.3
182  * @param[in] handle Handle which is created by dynamicbox_desc_open() function
183  * @param[in] id Id string of target object
184  * @param[in] category Category string that will be used by layout object
185  * @return int type
186  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid handle
187  * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Memory is not enough to add this block
188  * @retval index Index(>=0) of added block, which can be used by dynamicbox_desc_set_id()
189  * @pre Must be called after create a handle using dynamicbox_desc_open()
190  * @see dynamicbox_desc_set_id()
191  */
192 extern int dynamicbox_desc_set_category(dynamicbox_desc_h handle, const char *id, const char *category);
193
194 /**
195  * @brief Sets the content size.
196  * @details Sets the content size of layout.
197  * @since_tizen 2.3
198  * @param[in] handle Handle which is created by dynamicbox_desc_open() function
199  * @param[in] id Id string of target object
200  * @param[in] w Width in pixel
201  * @param[in] h Height in pixel
202  * @return int type
203  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
204  * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory to add a new block
205  * @retval index Index(>=0) of added block Successfully added
206  * @see dynamicbox_desc_open()
207  * @see dynamicbox_desc_set_id()
208  */
209 extern int dynamicbox_desc_set_size(dynamicbox_desc_h handle, const char *id, int w, int h);
210
211 /**
212  * @brief Sets the target id of the given block.
213  * @details Only available for the script block.
214  * @since_tizen 2.3
215  * @param[in] handle Handle which is created by dynamicbox_desc_open() function
216  * @param[in] idx Index of target block
217  * @param[in] id Id String which will be used by other dynamicbox_desc_XXX functions
218  * @return int type
219  * @retval #DBOX_STATUS_ERROR_NONE Id is successfully updated for given idx of desc block
220  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
221  * @retval #DBOX_STATUS_ERROR_NOT_EXIST Given index of desc block is not exists
222  * @pre Desc block should be exists which has given index "idx".
223  * @post Specified Id string("id") can be used by other dynamicbox_desc_XXXX functions.
224  * @see dynamicbox_desc_open()
225  * @see dynamicbox_desc_set_id()
226  */
227 extern int dynamicbox_desc_set_id(dynamicbox_desc_h handle, int idx, const char *id);
228
229 /**
230  * @brief Adds a new block.
231  * @since_tizen 2.3
232  * @param[in] handle Handle which is created by the dynamicbox_desc_open() function
233  * @param[in] id ID of source script object
234  * @param[in] type Type (image|text|script|signal|.. etc)
235  * @param[in] part Target part to update with given content(data)
236  * @param[in] data Content for specified part
237  * @param[in] option Option for the block. (script: group, image: option, ...)
238  * @return Index of current description block
239  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
240  * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory to add a new desc block
241  * @retval index Index(>=0) of added desc block
242  * @pre Handle must be created using dynamicbox_desc_open.
243  * @see dynamicbox_desc_set_id()
244  * @see dynamicbox_desc_del_block()
245  */
246 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);
247
248 /**
249  * @brief Deletes an added block.
250  * @since_tizen 2.3
251  * @details If you discard the added desc block, use this API and the index of the created desc block.
252  * @param[in] handle Handle which is created by dynamicbox_desc_open() function
253  * @param[in] idx Index of added block, returned from dynamicbox_desc_add_block(), dynamicbox_desc_set_size(), dynamicbox_desc_set_category(), etc
254  * @return int type
255  * @retval #DBOX_STATUS_ERROR_NONE Successfully deleted
256  * @retval #DBOX_STATUS_ERROR_NOT_EXIST Given index of desc block is not exists
257  * @pre Index must be exists.
258  * @see dynamicbox_desc_add_block()
259  * @see dynamicbox_desc_open()
260  */
261 extern int dynamicbox_desc_del_block(dynamicbox_desc_h handle, int idx);
262
263 /**
264  * @brief Creates an Object to create an elm_win object.
265  * @details Creating a new Object using Dynamic Box frame buffer.
266  * @since_tizen 2.3
267  * @param[in] id Instance Id
268  * @param[in] gbar 1 if this object is created for Glance Bar or 0 (for Dynamic Box)
269  * @privlevel public
270  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
271  * @return void* Object type
272  * @retval Address Valid evas object
273  * @retval @c NULL failed to create
274  */
275 extern void *dynamicbox_get_evas_object(const char *id, int gbar);
276
277 /**
278  * @brief Set extra information for updated content.
279  * @details
280  *      If the provider should give some hints to the viewer,
281  *      such as title, icon and name, this function can set them.
282  *      provider will send those information to the viewer when the
283  *      content is updated.
284  * @since_tizen 2.3
285  * @remarks This function only works with the buffer type inhouse provider.
286  * @param[in] id Dynamic Box Instance Id
287  * @param[in] content Content string that will pass to a Dynamic Box via dynamicbox_create interface when it is re-created.
288  * @param[in] title Human readable text for accessitility, summarized text for representing the content of a box.
289  * @param[in] icon Path of icon image file - alternative image content
290  * @param[in] name Name of a box - alternative text content
291  * @return int type
292  * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
293  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
294  * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error
295  * @retval #DBOX_STATUS_ERROR_NONE Successfully sent
296  */
297 extern int dynamicbox_set_extra_info(const char *id, const char *content, const char *title, const char *icon, const char *name);
298
299
300 /**
301  * @internal
302  * @brief Structure for a Dynamic Box buffer defined by a provider.
303  * @since_tizen 2.3
304  */
305 typedef struct dynamicbox_buffer *dynamicbox_buffer_h;
306
307 /**
308  * @internal
309  * @brief Return values of dynamicbox programming interfaces: Operation is successfully done.
310  * @since_tizen 2.3
311  */
312 extern const int DBOX_DONE;
313
314 /**
315  * @internal
316  * @brief Return values of dynamicbox programming interfaces: Contents are updated.
317  * @since_tizen 2.3
318  */
319 extern const int DBOX_OUTPUT_UPDATED;
320
321 /**
322  * @internal
323  * @brief Return values of dynamicbox programming interfaces: Need to call the dynamicbox_need_to_update and dynamicbox_update_content.
324  * @since_tizen 2.3
325  */
326 extern const int DBOX_NEED_TO_SCHEDULE;
327
328 /**
329  * @internal
330  * @brief Return values of dynamicbox programming interfaces: Need to do force update.
331  * @since_tizen 2.3
332  */
333 extern const int DBOX_FORCE_TO_SCHEDULE;
334
335 /**
336  * @internal
337  * @brief Return values of dynamicbox programming interfaces: Need to create a new instance.
338  * @since_tizen 2.3
339  */
340 extern const int DBOX_NEED_TO_CREATE;
341
342 /**
343  * @internal
344  * @brief Return values of dynamicbox programming interfaces: Need to destroy this instance.
345  * @since_tizen 2.3
346  */
347 extern const int DBOX_NEED_TO_DESTROY;
348
349 /**
350  * @internal
351  * @brief Return values of dynamicbox programming interfaces: Need to update.
352  * @since_tizen 2.3
353  */
354 extern const int DBOX_NEED_TO_UPDATE;
355
356 /**
357  * @internal
358  * @brief Return values of dynamicbox programming interfaces: Using network.
359  * @since_tizen 2.3
360  */
361 extern const int DBOX_USE_NET;
362
363 /**
364  * @internal
365  * @brief System event type: System font is changed.
366  * @since_tizen 2.3
367  */
368 extern const int DBOX_SYS_EVENT_FONT_CHANGED;
369
370 /**
371  * @internal
372  * @brief System event type: System language is changed.
373  * @since_tizen 2.3
374  */
375 extern const int DBOX_SYS_EVENT_LANG_CHANGED;
376
377 /**
378  * @internal
379  * @brief System event type: System time is changed.
380  * @since_tizen 2.3
381  */
382 extern const int DBOX_SYS_EVENT_TIME_CHANGED;
383
384 /**
385  * @internal
386  * @brief System event type: Region changed.
387  * @since_tizen 2.3
388  */
389 extern const int DBOX_SYS_EVENT_REGION_CHANGED;
390
391 /**
392  * @internal
393  * @brief System event type: Accessibility mode changed.
394  * @since_tizen 2.3
395  */
396 extern const int DBOX_SYS_EVENT_TTS_CHANGED;
397
398 /**
399  * @internal
400  * @brief System event type: Dynamic Box is paused.
401  * @since_tizen 2.3
402  */
403 extern const int DBOX_SYS_EVENT_PAUSED;
404
405 /**
406  * @internal
407  * @brief System event type: Dynamic Box is resumed.
408  * @since_tizen 2.3
409  */
410 extern const int DBOX_SYS_EVENT_RESUMED;
411
412 /**
413  * @internal
414  * @brief System event type: MMC Status change event.
415  * @since_tizen 2.3
416  */
417 extern const int DBOX_SYS_EVENT_MMC_STATUS_CHANGED;
418
419 /**
420  * @internal
421  * @brief System event type: Dynamic Box instance is removed from a viewer.
422  * @since_tizen 2.3
423  */
424 extern const int DBOX_SYS_EVENT_DELETED;
425
426 /**
427  * @internal
428  * @brief Notifies the updated content to the provider.
429  * @details Forcedly notifies the updated contents.
430  *    This function can be used from async callback function to notify the updated content.
431  * @since_tizen 2.3
432  * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
433  * @param[in] gbar 1 for updating content of Glance Bar or 0(for content of Dynamic Box)
434  * @return int type
435  * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory
436  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
437  * @retval #DBOX_STATUS_ERROR_IO_ERROR I/O failed, Cannot access given resource file(id)
438  * @retval #DBOX_STATUS_ERROR_NONE Successfully notified
439  * @pre This API only can be used after loaded into the data-provider-slave process.
440  */
441 extern int dynamicbox_content_is_updated(const char *id, int gbar);
442
443 /**
444  * @internal
445  * @brief Acquires a buffer for GBar or DBox, currently only the GBar is supported.
446  * @since_tizen 2.3
447  * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
448  * @param[in] gbar 1 for Glance Bar or 0 for Dynamic Box
449  * @param[in] width Width in pixel
450  * @param[in] height Height in pixel
451  * @param[in] pixels Size of a pixel in bytes
452  * @param[in] handler Event handling callback
453  * @param[in] data User data for event handling callback
454  * @privlevel public
455  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
456  * @return Buffer handle
457  * @retval @c NULL Failed to acquire buffer
458  * @retval handler Handle object
459  * @pre Given instance must be specify its type as buffer. or this API will be fail.
460  * @post Allocated buffer object must be released via dynamicbox_release_buffer().
461  * @see dynamicbox_release_buffer()
462  */
463 extern dynamicbox_buffer_h dynamicbox_acquire_buffer(const char *id, int gbar, int width, int height, int pixels, int auto_align, int (*handler)(dynamicbox_buffer_h, dynamicbox_buffer_event_data_t, void *), void *data);
464
465 /**
466  * @internal
467  * @brief Acquires the Id of Resource (window system).
468  * @details Only if the provider uses Resource for providing render buffer.
469  * @since_tizen 2.3
470  * @remarks Pixmap Id can be destroyed if you call the dynamicbox_release_buffer(). Then this Resource Id is not guaranteed to use.
471  * @param[in] handle Buffer handle
472  * @return unsigned int Resource Id
473  * @retval >0 Resource Id
474  * @retval 0 Failed to get Resource Id
475  * @pre The system must be set to use the Resource Id method for content sharing.
476  * @see dynamicbox_acquire_buffer()
477  */
478 extern unsigned int dynamicbox_resource_id(dynamicbox_buffer_h handle);
479
480 /**
481  * @internal
482  * @brief Releases the buffer of dynamicbox.
483  * @since_tizen 2.3
484  * @param[in] handle Buffer handle
485  * @privlevel public
486  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
487  * @return int type
488  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
489  * @retval #DBOX_STATUS_ERROR_NONE Successfully released
490  * @pre Handle must be created using dynamicbox_acquire_buffer().
491  * @see dynamicbox_acquire_buffer()
492  */
493 extern int dynamicbox_release_buffer(dynamicbox_buffer_h handle);
494
495 /**
496  * @internal
497  * @brief Gets the address of buffer for S/W rendering.
498  * @details If you try to use this, after dynamicbox_create_hw_buffer(), you will get @c NULL.
499  * @since_tizen 2.3
500  * @param[in] handle Buffer handle
501  * @privlevel public
502  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
503  * @return void* address of the render buffer
504  * @retval @c NULL If it falis to get buffer address
505  * @retval address If it succeed to get the buffer address
506  * @see dynamicbox_unref_buffer()
507  */
508 extern void *dynamicbox_ref_buffer(dynamicbox_buffer_h handle);
509
510 /**
511  * @internal
512  * @brief Releases the S/W render buffer.
513  * @since_tizen 2.3
514  * @param[in] buffer Address of render buffer
515  * @privlevel public
516  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
517  * @return int type
518  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid handle
519  * @retval #DBOX_STATUS_ERROR_NONE Successfully unreference
520  * @pre dynamicbox_ref_buffer() must be called.
521  * @see dynamicbox_ref_buffer()
522  */
523 extern int dynamicbox_unref_buffer(void *buffer);
524
525 /**
526  * @internal
527  * @brief Synchronizes the updated buffer.
528  * @details This is only needed for non-H/W accelerated buffer.
529  * @since_tizen 2.3
530  * @param[in] handle Buffer handle
531  * @privlevel public
532  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
533  * @return int type
534  * @retval #DBOX_STATUS_ERROR_NONE Successfully sync'd
535  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
536  * @see dynamicbox_acquire_buffer()
537  */
538 extern int dynamicbox_sync_buffer(dynamicbox_buffer_h handle);
539
540 /**
541  * @internal
542  * @brief Requests to schedule the update operation to a provider.
543  * @since_tizen 2.3
544  * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
545  * @privlevel public
546  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
547  * @return If succes returns 0 or return less than 0
548  * @retval #DBOX_STATUS_ERROR_NONE Successfully triggered
549  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
550  * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory
551  * @retval #DBOX_STATUS_ERROR_NOT_EXIST Given id instance is not exist
552  */
553 extern int dynamicbox_request_update(const char *id);
554
555 /**
556  * @internal
557  * @brief Checks whether the dynamicbox supports H/W acceleration or not.
558  * @since_tizen 2.3
559  * @param[in] handle Buffer handle
560  * @return int type
561  * @retval 1 If the buffer handle support the H/W acceleration buffer
562  * @retval 0 If it doesn not supported
563  * @see dynamicbox_acquire_buffer()
564  */
565 extern int dynamicbox_support_hw_buffer(dynamicbox_buffer_h handle);
566
567 /**
568  * @internal
569  * @brief Creates the H/W accelerated buffer.
570  * @since_tizen 2.3
571  * @param[in] handle Buffer handle
572  * @privlevel public
573  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
574  * @return int type
575  * @retval #DBOX_STATUS_ERROR_ALREADY H/W buffer is already created
576  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
577  * @retval #DBOX_STATUS_ERROR_NONE Successfully created
578  * @pre Must be checked whether the H/W buffer is supported or not.
579  * @post Must be destroyed if it is not necessary.
580  * @see dynamicbox_support_hw_buffer()
581  */
582 extern int dynamicbox_create_hw_buffer(dynamicbox_buffer_h handle);
583
584 /**
585  * @internal
586  * @brief Destroys the H/W accelerated buffer.
587  * @since_tizen 2.3
588  * @param[in] handle Buffer handle
589  * @privlevel public
590  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
591  * @return int type
592  * @retval #DBOX_STATUS_ERROR_NONE Successfully destroyed
593  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
594  * @pre Must be created h/w buffer using dynamicbox_create_hw_buffer.
595  * @see dynamicbox_create_hw_buffer()
596  */
597 extern int dynamicbox_destroy_hw_buffer(dynamicbox_buffer_h handle);
598
599 /**
600  * @internal
601  * @brief Gets the address of the accelerated H/W buffer.
602  * @since_tizen 2.3
603  * @param[in] handle Buffer handle
604  * @privlevel public
605  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
606  * @return void* type
607  * @retval @c NULL Failed to get H/W accelerated buffer address
608  * @retval addr H/W accelerated buffer address
609  * @see dynamicbox_create_hw_buffer()
610  */
611 extern void *dynamicbox_buffer_hw_buffer(dynamicbox_buffer_h handle);
612
613 /**
614  * @internal
615  * @brief Get the stride information from the buffer info
616  * @since_tizen 2.3
617  * @param[in] handle Buffer handle
618  * @return int stride size
619  * @retval positive_value length of stride
620  * @return DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameter
621  * @return DBOX_STATUS_ERROR_FAULT Unrecoverable error
622  * @see dynamicbox_create_hw_buffer()
623  */
624 extern int dynamicbox_buffer_stride(dynamicbox_buffer_h handle);
625
626 /**
627  * @internal
628  * @brief Pre-processes for rendering content.
629  * @details This is only needed for accessing H/W accelerated buffer.
630  * @since_tizen 2.3
631  * @param[in] handle Buffer handle
632  * @privlevel public
633  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
634  * @return int type
635  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid handle
636  * @retval #DBOX_STATUS_ERROR_NONE Successfully done
637  * @post dynamicbox_buffer_post_render must be called after the rendering (accessing buffer) is completed.
638  * @see dynamicbox_support_hw_buffer()
639  * @see dynamicbox_buffer_post_render()
640  */
641 extern int dynamicbox_buffer_pre_render(dynamicbox_buffer_h handle);
642
643 /**
644  * @internal
645  * @brief Post-processes for rendering content.
646  * @since_tizen 2.3
647  * @param[in] handle Buffer handle
648  * @privlevel public
649  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
650  * @return If succes returns 0 or return less than 0
651  * @retval #DBOX_STATUS_ERROR_NONE If succeed
652  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
653  * @pre dynamicbox_buffer_pre_render must be called.
654  * @see dynamicbox_support_hw_buffer()
655  * @see dynamicbox_buffer_pre_render()
656  */
657 extern int dynamicbox_buffer_post_render(dynamicbox_buffer_h handle);
658
659 /**
660  * @internal
661  * @brief Sends a request to the viewer (homescreen) to close the GBar.
662  * @details Even though you call this function. the homescreen can ignore it.
663  * @since_tizen 2.3
664  * @param[in] dboxid Dynamic Box Package Id
665  * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
666  * @param[in] reason DBOX_STATUS_ERROR_NONE(0)
667  * @privlevel public
668  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
669  * @return int type
670  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
671  * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
672  * @retval #DBOX_STATUS_ERROR_FAULT Failed to send a request
673  * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
674  */
675 extern int dynamicbox_request_close_gbar(const char *dboxid, const char *id, int reason);
676
677 /**
678  * @internal
679  * @brief Send a freeze request to the viewer (homescreen)
680  * @details
681  *        The viewer will get this request via event callback.
682  *        Then it should freeze its scroller or stop moving the dynamicbox.
683  * @since_tizen 2.3
684  * @remarks If the viewer doesn't care this request, this will has no effect.
685  * @param[in] dboxid Dynamic Box Package Id
686  * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
687  * @privlevel public
688  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
689  * @return int type
690  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
691  * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
692  * @retval #DBOX_STATUS_ERROR_FAULT Failed to send requet
693  * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
694  * @see dynamicbox_release_scroller()
695  */
696 extern int dynamicbox_freeze_scroller(const char *dboxid, const char *id);
697
698 /**
699  * @internal
700  * @brief Send a release request to the viewer (homescreen)
701  * @details
702  *        The viewer will get this request via event callback.
703  *        Then it should release its scroller or continue moving the dynamicbox.
704  * @since_tizen 2.3
705  * @remarks If the viewer doesn't care this request, this will has no effect.
706  * @param[in] dboxid Dynamic Box Package Id
707  * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
708  * @privlevel public
709  * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
710  * @return int type
711  * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
712  * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
713  * @retval #DBOX_STATUS_ERROR_FAULT Failed to send requet
714  * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
715  * @see dynamicbox_freeze_scroller()
716  */
717 extern int dynamicbox_thaw_scroller(const char *dboxid, const char *id);
718
719 /**
720  * @internal
721  * @brief Get the configuration value for premultiplied alpha.
722  * @details
723  *      If the system uses the premultiplied alpha for content,
724  *      This function will returns 1.
725  * @since_tizen 2.3
726  * @remarks This function only works with the inhouse provider.
727  * @return status of premultiplied alpha.
728  * @retval 1 Content rendered with premultiplied alpha.
729  * @retval 0 Content doesn't rendered with premultiplied alpha.
730  */
731 extern int dynamicbox_conf_premultiplied_alpha(void);
732
733 /**
734  * @internal
735  * @brief Get the configuration value for AUTO Alignment of canvas buffer.
736  * @details
737  *      If the UIFW does not support the STRIDE information for rendering frame,
738  *      This function will returns 1, then the dynamicbox will automatically aligning the buffer.
739  * @since_tizen 2.3
740  * @return status of auto alignment.
741  * @retval 1 Content will be automatically aligned by dynamicbox.
742  * @retval 0 Content will be aligned by UIFW, using stride information.
743  */
744 extern int dynamicbox_conf_auto_align(void);
745
746 /**
747  * @}
748  */
749
750 #ifdef __cplusplus
751 }
752 #endif
753
754 #endif
755 /* End of a file */