Add new event type for handling the deletion of an instance.
[apps/native/widget/widget.git] / include / livebox.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 #ifndef __LIVEBOX_HELPER_H
18 #define __LIVEBOX_HELPER_H
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 #include <Evas.h>
25
26 /**
27  * \addtogroup CAPI_LIVEBOX_HELPER_MODULE
28  * \{
29  */
30
31 /*!
32  * \brief Defined by provider
33  */
34 struct livebox_buffer;
35
36 /*!
37  * \brief
38  * Return values of livebox programming interfaces.
39  */
40 /*!
41  * \brief
42  * Operation is successfully done
43  */
44 extern const int DONE;
45
46 /*!
47  * \brief
48  * Contents is updated
49  */
50 extern const int OUTPUT_UPDATED;
51
52 /*!
53  * \brief
54  * Need to call the livebox_need_to_update and livebox_update_content
55  */
56 extern const int NEED_TO_SCHEDULE;
57
58 /*!
59  * Need to do force update
60  */
61 extern const int FORCE_TO_SCHEDULE;
62
63 /*!
64  * \brief
65  * Need to create a new instance
66  */
67 extern const int NEED_TO_CREATE;
68
69 /*!
70  * \brief
71  * Need to destroy this instance
72  */
73 extern const int NEED_TO_DESTROY;
74
75 /*!
76  * \brief
77  * Need to update
78  */
79 extern const int NEED_TO_UPDATE;
80
81 /*!
82  * \brief
83  * Using network
84  */
85 extern const int USE_NET;
86
87 /*!
88  * \brief
89  * System font is changed
90  */
91 extern const int LB_SYS_EVENT_FONT_CHANGED;
92
93 /*!
94  * \brief
95  * System language is changed
96  */
97 extern const int LB_SYS_EVENT_LANG_CHANGED;
98
99 /*!
100  * \brief
101  * System time is changed
102  */
103 extern const int LB_SYS_EVENT_TIME_CHANGED;
104
105 /*!
106  * \brief
107  * Region changed
108  */
109 extern const int LB_SYS_EVENT_REGION_CHANGED;
110
111 /*!
112  * \brief
113  * Livebox is paused
114  */
115 extern const int LB_SYS_EVENT_PAUSED;
116
117 /*!
118  * \brief
119  * Livebox is resumed
120  */
121 extern const int LB_SYS_EVENT_RESUMED;
122
123 /*!
124  * \brief
125  * MMC Status change event
126  */
127 extern const int LB_SYS_EVENT_MMC_STATUS_CHANGED;
128
129 /*!
130  * \brief
131  * Livebox is deleted
132  */
133 extern const int LB_SYS_EVENT_DELETED;
134
135 /*!
136  * \brief
137  * COLOR BLOCK
138  */
139 #define LB_DESC_TYPE_COLOR "color"
140
141 /*!
142  * \brief
143  * TEXT BLOCK
144  */
145 #define LB_DESC_TYPE_TEXT "text"
146
147 /*!
148  * \brief
149  * IMAGE BLOCK
150  */
151 #define LB_DESC_TYPE_IMAGE "image"
152
153 /*!
154  * \brief
155  * SIGNAL BLOCK
156  */
157 #define LB_DESC_TYPE_SIGNAL "signal"
158
159 /*!
160  * \brief
161  * INFO BLOCK
162  */
163 #define LB_DESC_TYPE_INFO "info"
164
165 /*!
166  * \brief
167  * DRAG BLOCK
168  */
169 #define LB_DESC_TYPE_DRAG "drag"
170
171 /*!
172  * \brief
173  * SCRIPT SCRIPT
174  */
175 #define LB_DESC_TYPE_SCRIPT "script"
176
177 /*!
178  * \brief
179  * ACCESSIBILITY INFORMATION BLOCK
180  */
181 #define LB_DESC_TYPE_ACCESS "access"
182
183 /*!
184  * \brief
185  * Accessibility operation.
186  */
187 #define LB_DESC_TYPE_ACCESS_OPERATION   "access,operation"
188
189 /*!
190  * \brief
191  * Set highlight on specified part
192  */
193 #define LB_DESC_DATA_ACCESS_OPERATION_HL_SET "set,hl"
194
195 /*!
196  * \brief
197  * Remove highlight from specified part
198  */
199 #define LB_DESC_DATA_ACCESS_OPERATION_HL_UNSET "unset,hl"
200
201 /*!
202  * \brief
203  * Move the highlight to next part
204  */
205 #define LB_DESC_DATA_ACCESS_OPERATION_HL_NEXT "next,hl"
206
207 /*!
208  * \brief
209  * Move the highlight to previous part
210  */
211 #define LB_DESC_DATA_ACCESS_OPERATION_HL_PREV "prev,hl"
212
213 /*!
214  * \brief
215  * Reset the chain of accessibility highlight list.
216  */
217 #define LB_DESC_DATA_ACCESS_OPERATION_RESET "reset,focus"
218
219 /*!
220  * \brief
221  * Specify the highligt move option.
222  * If the highlight list reaches to the last object, move back to the first object.
223  */
224 #define LB_DESC_OPTION_ACCESS_HL_LOOP "cycle"
225
226 /*!
227  * \brief
228  * [Default] Specify the highlight move option.
229  * If the highlight list reaches to the last object(or the first object),
230  * the "prev,hl", "next,hl" will be failed.
231  */
232 #define LB_DESC_OPTION_ACCESS_HL_NOLOOP "no,cycle"
233
234 /*!
235  * \brief
236  * Extra event informatino for livebox_content_event interface function
237  */
238 #ifndef __PROVIDER_H
239 struct event_info {
240         struct {
241                 double x;
242                 double y;
243                 int down;
244         } pointer; /*!< Down/Up state and mouse position */
245
246         struct {
247                 double sx;
248                 double sy;
249                 double ex;
250                 double ey;
251         } part; /*!< Geometry of event received part */
252 };
253 #endif
254
255 /*!
256  * Livebox description data handle structure.
257  */
258 struct livebox_desc;
259
260 /*!
261  * \brief Update a description file.
262  * \details explain api more detail
263  * \remarks must be used only by Inhouse livebox
264  * \param[in] filename
265  * \param[in] for_pd
266  * \return handle
267  * \retval Handle of desc instance
268  * \pre Should be loaded by data-provider-slave
269  * \post Should be destroyed(flushed) using livebox_desc_close API
270  * \see livebox_desc_close
271  */
272 extern struct livebox_desc *livebox_desc_open(const char *filename, int for_pd);
273
274 /*!
275  * \brief Complete the description file updating
276  * \details Only if this API is called, the description data will be applied to the content of livebox(or PD).
277  * \remarks must be used only by Inhouse livebox
278  * \param[in] handle Handle which is created by livebox_desc_open function
279  * \return int
280  * \retval LB_STATUS_SUCCESS If the flushing description data is successfully done.
281  * \retval LB_STATUS_ERROR_INVALID If the given handle is not valid.
282  * \pre handle must be created by livebox_desc_open
283  * \post Handle must not be used after return from this function
284  * \see livebox_desc_open
285  */
286 extern int livebox_desc_close(struct livebox_desc *handle);
287
288 /*!
289  * \brief
290  *    Set the category information of current description data
291  * \details
292  *    Create a new description block for updating category information of layout object
293  * \remarks N/A
294  * \param[in] handle Handle which is created by livebox_desc_open function
295  * \param[in] id Id string of target object.
296  * \param[in] category Category string that will be used by layout object
297  * \return int
298  * \retval LB_STATUS_ERROR_INVALID Invalid handle
299  * \retval LB_STATUS_ERROR_MEMORY Memory is not enough to add this block
300  * \retval index Index(>=0) of added block, which can be used by livebox_desc_set_id
301  * \pre Must be called after create a handle using livebox_desc_open.
302  * \post N/A
303  * \see livebox_desc_set_id
304  */
305 extern int livebox_desc_set_category(struct livebox_desc *handle, const char *id, const char *category);
306
307 /*!
308  * \brief
309  *    Set the content size
310  * \details
311  *    Set the content size of layout
312  * \remarks N/A
313  * \param[in] handle Handle which is created by livebox_desc_open function
314  * \param[in] id Id string of target object.
315  * \param[in] w Width in pixel
316  * \param[in] h Height in pixel
317  * \return int
318  * \retval LB_STATUS_ERROR_INVALID Invalid argument
319  * \retval LB_STATUS_ERROR_MEMORY Not enough memory to add a new block
320  * \retval index Index(>=0) of added block Successfully added
321  * \pre N/A
322  * \post N/A
323  * \see livebox_desc_open
324  * \see livebox_desc_set_id
325  */
326 extern int livebox_desc_set_size(struct livebox_desc *handle, const char *id, int w, int h);
327
328 /*!
329  * \brief
330  *    Set the target id of given block
331  *    Only available for the script block
332  * \details
333  *    N/A
334  * \remarks N/A
335  * \param[in] handle Handle which is created by livebox_desc_open function
336  * \param[in] idx Index of target block
337  * \param[in] id Id String which will be used by other livebox_desc_XXX functions
338  * \return int
339  * \retval LB_STATUS_SUCCESS Id is successfully updated for given idx of desc block
340  * \retval LB_STATUS_ERROR_INVALID Invalid argument
341  * \retval LB_STATUS_ERROR_NOT_EXIST Given index of desc block is not exists
342  * \pre desc block should be exists which has given index "idx"
343  * \post specified Id string("id") can be used by other livebox_desc_XXXX functions
344  * \see livebox_desc_open
345  * \see livebox_desc_set_id
346  */
347 extern int livebox_desc_set_id(struct livebox_desc *handle, int idx, const char *id);
348
349 /*!
350  * \brief Add a new block
351  * \details N/A
352  * \remarks N/A
353  * \param[in] handle Handle which is created by livebox_desc_open function
354  * \param[in] id ID of source script object
355  * \param[in] type image|text|script|signal|...
356  * \param[in] part target part to update with given content(data)
357  * \param[in] data content for specified part
358  * \param[in] option option for the block. (script: group, image: option, ...)
359  * \return idx Index of current description block
360  * \retval LB_STATUS_ERROR_INVALID Invalid argument
361  * \retval LB_STATUS_ERROR_MEMORY Not enough memory to add a new desc block
362  * \retval Index index(>=0) of added desc block
363  * \pre handle must be created using livebox_desc_open
364  * \post N/A
365  * \see livebox_desc_set_id
366  * \see livebox_desc_del_block
367  */
368 extern int livebox_desc_add_block(struct livebox_desc *handle, const char *id, const char *type, const char *part, const char *data, const char *option);
369
370 /*!
371  * \brief Delete a added block
372  * \details
373  *    If you discard the added desc block, use this API and the index of created desc block.
374  * \remarks N/A
375  * \param[in] handle Handle which is created by livebox_desc_open function
376  * \param[in] idx Index of added block, returned from livebox_desc_add_block, livebox_desc_set_size, livebox_desc_set_category, ...
377  * \return int
378  * \retval LB_STATUS_SUCCESS Successfully deleted
379  * \retval LB_STATUS_ERROR_NOT_EXIST Given index of desc block is not exists
380  * \pre index must be exists.
381  * \post N/A
382  * \see livebox_desc_add_block
383  * \see livebox_desc_open
384  */
385 extern int livebox_desc_del_block(struct livebox_desc *handle, int idx);
386
387 /*!
388  * \brief Notify the updated content to the provider.
389  * \details
390  *    Forcely notify the updated contents.
391  *    This function can be used from async callback function to notify the updated content.
392  * \remarks N/A
393  * \param[in] id Instance Id which is passed to you via the first parameter of every livebox_XXXX interface functions.
394  * \param[in] is_pd 1 for updating content of PD or 0(for content of LB).
395  * \return int
396  * \retval LB_STATUS_ERROR_MEMORY Not enough memory
397  * \retval LB_STATUS_ERROR_INVALID Invalid argument
398  * \retval LB_STATUS_ERROR_IO I/O failed, Cannot access given resource file(id)
399  * \retval LB_STATUS_SUCCESS Successfully notified
400  * \pre This API only can be used after loaded into the data-provider-slave process.
401  * \post N/A
402  * \see N/A
403  */
404 extern int livebox_content_is_updated(const char *id, int is_pd);
405
406 /*!
407  * \brief Replace "\n"(new line character) with &lt;br&gt;
408  * \details
409  *    This utility function is used to replace all NEW LINE CHARACTER("\n") with &lt;br&gt; tag.
410  * \remarks N/A
411  * \param[in] str Source string
412  * \return char *
413  * \retval String that is allocted in the heap
414  * \retval NULL if it fails to replace string
415  * \pre N/A
416  * \post Returned string must has to be free'd by user manually.
417  * \see N/A
418  */
419 extern char *livebox_util_nl2br(const char *str);
420
421
422 /*!
423  * \brief
424  * Interfaces for direct buffer management (Available only for the PD area)
425  */
426 #ifndef __PROVIDER_BUFFER_H
427 /*!
428  * \note
429  * This enumeration value should be sync'd with provider
430  */
431 enum buffer_event {
432         BUFFER_EVENT_ENTER, /*!< Mouse cursor enter */
433         BUFFER_EVENT_LEAVE, /*!< Mouse cursor leave */
434         BUFFER_EVENT_DOWN, /*!< Mouse down */
435         BUFFER_EVENT_MOVE, /*!< Mouse move */
436         BUFFER_EVENT_UP, /*!< Mouse up */
437
438         BUFFER_EVENT_KEY_DOWN, /*!< Key down */
439         BUFFER_EVENT_KEY_UP, /*!< Key up */
440         BUFFER_EVENT_KEY_FOCUS_IN, /*!< Key focus in */
441         BUFFER_EVENT_KEY_FOCUS_OUT, /*!< Key focus out */
442
443         BUFFER_EVENT_HIGHLIGHT, /*!< Accessibility - Highlight */
444         BUFFER_EVENT_HIGHLIGHT_NEXT, /*!< Accessibility - Move highlight to next */
445         BUFFER_EVENT_HIGHLIGHT_PREV, /*!< Accessibility - Move highlight to prev */
446         BUFFER_EVENT_ACTIVATE, /*!< Accessibility - Activate the highlighted object */
447         BUFFER_EVENT_ACTION_UP, /*!< Accessibility - Make UP action */
448         BUFFER_EVENT_ACTION_DOWN, /*!< Accessibility - Make Down action */
449         BUFFER_EVENT_SCROLL_UP, /*!< Accessibility - Scroll up */
450         BUFFER_EVENT_SCROLL_MOVE, /*!< Accessibility - Scroll move */
451         BUFFER_EVENT_SCROLL_DOWN, /*!< Accessibility - Scroll down */
452         BUFFER_EVENT_UNHIGHLIGHT, /*!< Accessibility - Remove highlight */
453
454         BUFFER_EVENT_ON_HOLD,   /*!< To prevent from generating mouse clicked event */
455         BUFFER_EVENT_OFF_HOLD,  /*!< Stopped holding. */
456         BUFFER_EVENT_ON_SCROLL, /*!< On scrolling */
457         BUFFER_EVENT_OFF_SCROLL /*!< Scrolling stopped */
458 };
459
460 struct buffer_event_data {
461         enum buffer_event type; /*!< Mouse, Keyboard, Accessibility event type */
462         double timestamp; /*!< Timestamp of events */
463
464         union input_data {
465                 struct mouse {
466                         int x; /*!< If the event type is for accessibility or mouse, coordinates of X for pointer */
467                         int y; /*!< If the event type is for accessibility or mouse, coordinates of Y for pointer */
468                 } pointer;
469
470                 unsigned int keycode; /*!< If the event type is for keyboard, the value of keycode */
471         } info;
472 };
473 #endif
474
475 /*!
476  * \brief
477  *    Acquire a buffer for PD or LB, Currently, we only supporting the PD.
478  * \details N/A
479  * \remarks N/A
480  * \param[in] id Id of a livebox instance
481  * \param[in] is_pd 1 for PD or 0 for livebox
482  * \param[in] width Width in pixel
483  * \param[in] height Height in pixel
484  * \param[in] handler Event handling callback
485  * \param[in] data user data for event handling callback
486  * \return handler Buffer handle
487  * \retval NULL Failed to acquire buffer
488  * \retval Handle object
489  * \pre
490  *    Given instance must be specify its type as buffer. or this API will be fail
491  * \post
492  *    Allocated buffer object must be released via livebox_release_Buffer
493  * \see livebox_release_buffer
494  * \sa livebox_acquire_buffer_NEW
495  */
496 extern struct livebox_buffer *livebox_acquire_buffer(const char *id, int is_pd, int width, int height, int (*handler)(struct livebox_buffer *, enum buffer_event, double, double, double, void *), void *data);
497 extern struct livebox_buffer *livebox_acquire_buffer_NEW(const char *id, int is_pd, int width, int height, int pixels, int (*handler)(struct livebox_buffer *, struct buffer_event_data *, void *), void *data);
498
499 /*!
500  * \brief Acquire the ID of pixmap resource
501  *        Only if the provider uses pixmap for providing render buffer.
502  * \details N/A
503  * \remarks Pixmap Id can be destroyed if you call the livebox_release_buffer. than this pixmap Id is not guaranteed to use.
504  * \param[in] handle Buffer handle
505  * \return unsigned
506  * \retval positive Pixmap Id
507  * \retval 0 failed to get pixmap Id.
508  * \pre The system must be set to use the pixmap method for content sharing
509  * \post N/A
510  * \see livebox_acquire_buffer
511  */
512 extern unsigned long livebox_pixmap_id(struct livebox_buffer *handle);
513
514 /*!
515  * \brief Release the buffer of livebox
516  * \details N/A
517  * \remarks N/A
518  * \param[in] handle Buffer handle
519  * \return int
520  * \retval LB_STATUS_ERROR_INVALID Invalid argument
521  * \retval LB_STATUS_SUCCESS Successfully released
522  * \pre handle must be created using livebox_acquire_buffer.
523  * \post N/A
524  * \see livebox_acquire_buffer
525  * \sa livebox_release_buffer_NEW
526  */
527 extern int livebox_release_buffer(struct livebox_buffer *handle);
528 extern int livebox_release_buffer_NEW(struct livebox_buffer *handle);
529
530 /*!
531  * \brief Get the address of S/W render buffer.
532  *        If you try to use this, after create_hw_buffer, you will get NULL
533  * \details N/A
534  * \remarks N/A
535  * \param[in] handle Buffer handle
536  * \return void* address of the render buffer
537  * \retval NULL if it falis to get buffer address
538  * \retval address if it succeed to get the buffer address
539  * \pre N/A
540  * \post N/A
541  * \see livebox_unref_buffer
542  */
543 extern void *livebox_ref_buffer(struct livebox_buffer *handle);
544
545 /*!
546  * \brief Release the S/W render buffer.
547  * \details N/A
548  * \remarks N/A
549  * \param[in] buffer Address of render buffer
550  * \return int
551  * \retval LB_STATUS_ERROR_INVALID Invalid handle
552  * \retval LB_STATUS_SUCCESS Successfully unref'd
553  * \pre livebox_ref_buffer must be called
554  * \post N/A
555  * \see livebox_ref_buffer
556  */
557 extern int livebox_unref_buffer(void *buffer);
558
559 /*!
560  * \brief Sync the updated buffer
561  *        This is only needed for non-H/W accelerated buffer
562  * \details N/A
563  * \remarks N/A
564  * \param[in] handle Buffer handle
565  * \return int
566  * \retval LB_STATUS_SUCCESS Successfully sync'd
567  * \retval LB_STATUS_ERROR_INVALID Invalid argument
568  * \pre N/A
569  * \post N/A
570  * \see livebox_acquire_buffer
571  */
572 extern int livebox_sync_buffer(struct livebox_buffer *handle);
573
574 /*!
575  * \brief Request schedule the update operation to a provider.
576  * \details
577  * \remarks N/A
578  * \param[in] id Livebox Id
579  * \return int 0 if succeed or errno < 0
580  * \retval LB_STATUS_SUCCESS Successfully triggered
581  * \retval LB_STATUS_ERROR_INVALID Invalid argument
582  * \retval LB_STATUS_ERROR_MEMORY Not enough memory
583  * \retval LB_STATUS_ERROR_NOT_EXIST Given id instance is not exist
584  * \pre N/A
585  * \post N/A
586  * \see N/A
587  */
588 extern int livebox_request_update(const char *id);
589
590 /*!
591  * \brief Checking wether the livebox support H/W acceleration or not.
592  * \details
593  * \remarks N/A
594  * \param[in] handle Buffer handle.
595  * \return int
596  * \retval 1 if the buffer handle support the H/W acceleration buffer
597  * \retval 0 if it doesn not supported
598  * \pre N/A
599  * \post N/A
600  * \see livebox_acquire_buffer
601  */
602 extern int livebox_support_hw_buffer(struct livebox_buffer *handle);
603
604 /*!
605  * \brief Create the H/W accelerated buffer.
606  * \details Create the H/W accelerated buffer
607  * \remarks N/A
608  * \param[in] handle Buffer handle
609  * \return int
610  * \retval LB_STATUS_ERROR_ALREADY H/W buffer is already created
611  * \retval LB_STATUS_ERROR_INVALID Invalid argument
612  * \retval LB_STATUS_SUCCESS Successfully created
613  * \pre Must be checked whether the H/W buffer is supported or not.
614  * \post Must be destroyed if it is not necessary
615  * \see livebox_support_hw_buffer
616  */
617 extern int livebox_create_hw_buffer(struct livebox_buffer *handle);
618
619 /*!
620  * \brief Destroy the H/W accelerated buffer.
621  * \details N/A
622  * \remarks N/A
623  * \param[in] handle Buffer handle
624  * \return int
625  * \retval LB_STATUS_SUCCESS Successfully destroyed
626  * \retval LB_STATUS_ERROR_INVALID Invalid argument
627  * \pre Must be created h/w buffer using livebox_create_hw_buffer
628  * \post N/A
629  * \see livebox_create_hw_buffer
630  */
631 extern int livebox_destroy_hw_buffer(struct livebox_buffer *handle);
632
633 /*!
634  * \brief Get the address of accelerated H/W buffer
635  * \details N/A
636  * \remarks N/A
637  * \param[in] handle Buffer handle
638  * \return void *
639  * \retval NULL failed to get H/W accelerated buffer address
640  * \retval addr H/W accelerated buffer address
641  * \pre N/A
642  * \post N/A
643  * \see livebox_create_hw_buffer
644  */
645 extern void *livebox_buffer_hw_buffer(struct livebox_buffer *handle);
646
647 /*!
648  * \brief Pre-processing for rendering content.
649  *        This is only needed for accessing H/W accelerated buffer.
650  * \details N/A
651  * \remarks N/A
652  * \param[in] handle Buffer handle
653  * \return int
654  * \retval LB_STATUS_ERROR_INVALID Invalid handle
655  * \retval LB_STATUS_SUCCESS Successfully done
656  * \pre N/A
657  * \post livebox_buffer_post_render must be called after the rendering (accessing buffer) is completed.
658  * \see livebox_support_hw_buffer
659  * \see livebox_buffer_post_render
660  */
661 extern int livebox_buffer_pre_render(struct livebox_buffer *handle);
662
663 /*!
664  * \brief Post-processing for rendering content.
665  * \details N/A
666  * \remarks N/A
667  * \param[in] handle Buffer handle
668  * \return integer 0 if succeed or errno < 0
669  * \retval LB_STATUS_SUCCESS if succeed
670  * \retval LB_STATUS_ERROR_INVALID Invalid argument
671  * \pre livebox_buffer_pre_render must be called
672  * \post N/A
673  * \see livebox_support_hw_buffer
674  * \see livebox_buffer_pre_render
675  */
676 extern int livebox_buffer_post_render(struct livebox_buffer *handle);
677
678 /*!
679  * \brief
680  * Deprecated API set.
681 extern Evas_Object *livebox_snapshot_window_add(const char *id, int size_type);
682 extern int livebox_snapshot_window_flush(Evas_Object *snapshot_win, double timeout, void (*flush_cb)(Evas_Object *snapshot_window, const char *id, int status, void *data), void *data);
683 extern int livebox_snapshot_window_del(Evas_Object *snapshot_win);
684 */
685
686 /*!
687  * \brief Create an Evas_Object to create a elm_win object
688  * \details Creating a new Evas_Object using livebox frame buffer.
689  * \remarks N/A
690  * \param[in] id Instance Id
691  * \param[in] is_pd 1 if this object is created for PD or 0 (for LB)
692  * \return Evas_Object* Evas Object
693  * \retval Address Valid evas object
694  * \retval NULL failed to create
695  * \pre N/A
696  * \post N/A
697  * \see livebox_set_elm_window
698  */
699 extern Evas_Object *livebox_get_evas_object(const char *id, int is_pd);
700
701 /*!
702  * \brief Send a request to the viewer (homescreen) to close the PD.
703  * \details Even though you call this function. the homescreen can ignore it.
704  * \remarks
705  * \param[in] pkgname Livebox Package Id
706  * \param[in] id Livebox Instance Id
707  * \param[in] reason LB_STATUS_SUCCESS(0)
708  * \return int
709  * \retval LB_STATUS_ERROR_INVALID Invalid parameters
710  * \retval LB_STATUS_ERROR_MEMORY Out of memory
711  * \retval LB_STATUS_ERROR_FAULT Failed to send a request
712  * \retval LB_STATUS_SUCCESS Successfully requested
713  * \pre N/A
714  * \post N/A
715  * \see
716  */
717 extern int livebox_request_close_pd(const char *pkgname, const char *id, int reason);
718
719 /*!
720  * \brief Send a freeze request to the viewer (homescreen)
721  * \details
722  *        The viewer will get this request via event callback.
723  *        Then it should freeze its scroller or stop moving the livebox.
724  * \remarks If the viewer doesn't care this request, this will has no effect.
725  * \param[in] pkgname Livebox Package Id
726  * \param[in] id Livebox Instance Id
727  * \return int
728  * \retval LB_STATUS_ERROR_INVALID Invalid parameters
729  * \retval LB_STATUS_ERROR_MEMORY Out of memory
730  * \retval LB_STATUS_ERROR_FAULT Failed to send requet
731  * \retval LB_STATUS_SUCCESS Successfully requested
732  * \pre N/A
733  * \post N/A
734  * \see livebox_release_scroller
735  */
736 extern int livebox_freeze_scroller(const char *pkgname, const char *id);
737
738 /*!
739  * \brief Send a release request to the viewer (homescreen)
740  * \details
741  *        The viewer will get this request via event callback.
742  *        Then it should release its scroller or continue moving the livebox.
743  * \remarks If the viewer doesn't care this request, this will has no effect.
744  * \param[in] pkgname Livebox Package Id
745  * \param[in] id Livebox Instance Id
746  * \retval LB_STATUS_ERROR_INVALID Invalid parameters
747  * \retval LB_STATUS_ERROR_MEMORY Out of memory
748  * \retval LB_STATUS_ERROR_FAULT Failed to send requet
749  * \retval LB_STATUS_SUCCESS Successfully requested
750  * \pre N/A
751  * \post N/A
752  * \see livebox_freeze_scroller
753  */
754 extern int livebox_release_scroller(const char *pkgname, const char *id);
755
756 /*!
757  * \brief Get the configuration status of premultiplied alpha.
758  * \details
759  *      If the system uses the premultiplied alpha for content,
760  *      This function will returns 1.
761  * \remarks This function only works with the inhouse provider.
762  * \return status of premultiplied alpha.
763  * \retval 1 Content rendered with premultiplied alpha.
764  * \retval 0 Content doesn't rendered with premultiplied alpha.
765  */
766 extern int livebox_conf_premultiplied_alpha(void);
767
768 /*!
769  * \}
770  */
771
772 #ifdef __cplusplus
773 }
774 #endif
775
776 #endif
777 /* End of a file */