63164ac4ffa321899476aa40eb09e1424f7673c8
[profile/mobile/apps/native/homescreen-efl.git] / inc / add_viewer / 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 WIDGET_H_
18 #define WIDGET_H_
19
20 #include "homescreen-efl.h"
21
22 typedef struct {
23         char *widget_id;
24         char *app_id;
25         char *label;
26
27         Eina_List *preview_list;
28         Elm_Object_Item *genlist_item;
29
30         int size_types_count;
31         int size_types;
32 } widget_t;
33
34 typedef struct {
35         int type;
36         char *path;
37 } preview_t;
38
39 /**
40  * @brief Initialize widget list
41  *
42  * @details Function creates list with all target widgets, previews
43  * and its sizes.
44  *
45  * @return 0 on success, 1 on failure
46  */
47 int widget_init(void);
48
49 /**
50  * @brief Remove widget list
51  *
52  * @details This function removes widget list and frees all its allocated
53  * memory
54  */
55 void widget_fini(void);
56
57 /**
58  * @brief Get widget list
59  *
60  * @details Function returns list with all found widgets and their data.
61  *
62  * @return widget_list Eina_List
63  */
64 Eina_List* widget_get_widget_list(void);
65
66 #endif