Sync with the latest tizen 2.x
[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  * @privlevel public
45  * @privilege %http://tizen.org/privilege/widget.provider
46  * @return instance of Evas
47  * @retval Valid pointer of Evas instance on success,
48  * @retval @c NULL failed to create, get_last_result() will returns reason of failure
49  */
50 extern Evas *widget_get_evas(const char *widget_intance_id);
51
52 /**
53  * @brief Requests to schedule the update operation to a provider.
54  * @detail Inserts a update event to event queue and it will be handled by update callback function defined by provider
55  * @since_tizen 2.3.1
56  * @param[in] widget_intance_id A instance id of the widget to be updated
57  * @return 0 on success, otherwise a negative error value
58  * @retval #WIDGET_ERROR_NONE Successfully triggered
59  * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
60  * @retval #WIDGET_ERROR_OUT_OF_MEMORY Not enough memory
61  * @retval #WIDGET_ERROR_NOT_EXIST Given id instance is not exist
62  * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
63  * @retval #WIDGET_ERROR_DISABLED in case of direct request for updating is disabled
64  */
65 extern int widget_request_update(const char *widget_intance_id);
66
67 /**
68  * @}
69  */
70
71 #ifdef __cplusplus
72 }
73 #endif
74
75 #endif
76 /* End of a file */