Merge from tizen 2.3.1
[apps/native/widget/widget.git] / include / widget.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 #include <widget_service.h>
18 #include <Evas.h>
19 #include <Ecore.h>
20
21 #ifndef __WIDGET_UILITY_H
22 #define __WIDGET_UILITY_H
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /**
29  * @file widget.h
30  * @brief This file declares API of libwidget library
31  * @since_tizen 2.3.1
32  */
33
34 /**
35  * @addtogroup CAPI_WIDGET_UTILITY_MODULE
36  * @{
37  */
38
39 /**
40  * @brief Creates an Evas to draw widget contents
41  * @details Creating a new Object using widget frame buffer.
42  * @since_tizen 2.3.1
43  * @param[in] widget_intance_id widget instance id
44  * @return instance of Evas
45  * @retval Valid pointer of Evas instance on success,
46  * @retval @c NULL failed to create, get_last_result() will returns reason of failure
47  */
48 extern Evas *widget_get_evas(const char *widget_intance_id);
49
50 /**
51  * @brief Requests to schedule the update operation to a provider.
52  * @detail Inserts a update event to event queue and it will be handled by update callback function defined by provider
53  * @since_tizen 2.3.1
54  * @param[in] widget_intance_id A instance id of the widget to be updated
55  * @return 0 on success, otherwise a negative error value
56  * @retval #WIDGET_ERROR_NONE Successfully triggered
57  * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
58  * @retval #WIDGET_ERROR_OUT_OF_MEMORY Not enough memory
59  * @retval #WIDGET_ERROR_NOT_EXIST Given id instance is not exist
60  * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
61  * @retval #WIDGET_ERROR_DISABLED in case of direct request for updating is disabled
62  */
63 extern int widget_request_update(const char *widget_intance_id);
64
65 /**
66  * @}
67  */
68
69 #ifdef __cplusplus
70 }
71 #endif
72
73 #endif
74 /* End of a file */