The source code moved from the SPIN with license changed to Flora 1.1
[apps/native/home/homescreen-efl.git] / inc / livebox / livebox_widget.h
1 /*
2  * Copyright 2012  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_WIDGET_H_
18 #define LIVEBOX_WIDGET_H_
19
20 #include <Elementary.h>
21 #include <widget_service.h>
22
23 typedef struct {
24         char *pkg_id;
25         char *widget_id;
26         int is_prime;
27         int width;
28         int height;
29 } widget_info_t;
30
31 /**
32  * @brief Initializes the widget module.
33  */
34 extern void livebox_widget_init(void);
35
36 /**
37  * @brief Frees all data initialized for widget module.
38  */
39 extern void livebox_widget_fini(void);
40
41 /**
42  * @brief Gets the widgets list from the widget service
43  * @return Eina_List pointer
44  */
45 extern Eina_List *livebox_widget_get_list(void);
46
47 /**
48  * @brief Cretes new widget and add it to the parent.
49  *
50  * @param pkg_name char pointer to package name of the widget
51  * @param parent pointer to parent Evas_Object
52  * @param content info
53  *
54  * @return pointer to created widget's Evas_Object
55  */
56 extern Evas_Object *livebox_widget_add(const char *pkg_name, Evas_Object *parent, char *content_info);
57
58 /**
59  * @brief Removes the widget and its data.
60  *
61  * @param Widget's Evas_Object pointer.
62  */
63 extern void livebox_widget_del(Evas_Object *widget);
64
65 /**
66  * @brief Gets the widget size.
67  *
68  * @param size type
69  * @param x - x size in pixels.
70  * @param y - y size in pixels.
71  */
72 extern void livebox_widget_get_dimensions(int size, int *x, int *y);
73
74 /**
75  * @brief Gets the available sizes of the widget
76  * @param widget Evas_Object pointer to the widget object.
77  * @param cnt number of available widget sizes
78  * @param size_list sizes list.
79  */
80 extern void livebox_widget_get_size_available(Evas_Object *widget, int *cnt, int **size_list);
81
82
83 /**
84  * @brief Blocks the mouse_up event for given widget
85  * @param widget widget to block events for
86  */
87 extern void livebox_widget_set_event_blocking(Evas_Object *widget);
88
89 /**
90  */
91 extern void livebox_widget_viewer_paused(void);
92
93 /**
94  */
95 extern void livebox_widget_viewer_resumed(void);
96
97 #endif /* LIVEBOX_WIDGET_H_ */