2 * Copyright 2012 Samsung Electronics Co., Ltd
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
8 * http://floralicense.org/license/
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.
20 #include <Elementary.h>
23 #include "homescreen-efl.h"
30 } app_icon_popup_info_t;
33 APP_ICON_TYPE_APP = 0,
35 APP_ICON_TYPE_MINIATURE,
39 FOLDER_ICON_FRAME_POSSIBLE = 0,
40 FOLDER_ICON_FRAME_IMPOSSIBLE,
41 FOLDER_ICON_FRAME_NONE,
42 } folder_icon_frame_type_t;
45 * @brief Sets ignore click flag.
47 * @param ignore if it is true click event on icon will not be processed.
49 extern void app_icon_set_click_ignore(bool ignore);
52 * @brief Remove icon object
53 * @details Function removes elm_layout widget responsible for application
54 * shortcut view. It deletes also elm_image widget (application shortuc image)
55 * with is a child of icon_layout.
57 * @param icon_layout Evas_Object pointer to item witch will be deleted.
59 extern void app_icon_destroy(Evas_Object *icon_layout);
62 * @brief Sets badge number and shows it on application icon.
64 * @param app_icon_layout application icon layout.
65 * @param int number with will be displayed in badge layout.
67 extern void app_icon_show_badge(Evas_Object *app_icon_layout,
68 const unsigned int number);
71 * @brief Hides badge icon on application.
72 * @details [long description]
73 * @param application icon layout pointer.
75 extern void app_icon_hide_badge(Evas_Object *app_icon_layout);
78 * @brief Sets icon label visible
79 * @param app_icon_layout pointer to icon layout.
81 extern void app_icon_show_label(Evas_Object *app_icon_layout);
84 * @brief Sets icon label invisible.
85 * @param app_icon_layout pointer to icon layout.
87 extern void app_icon_hide_label(Evas_Object *app_icon_layout);
90 * @brief Function chage state of icon regarind to passed view type
92 * @param icon Pointer to icon object which should be changed.
93 * @param view view type
94 * @param in_folder value indicating whether given item is in folder
96 * @return true if success
98 bool app_icon_set_view_mode(Evas_Object *icon, homescreen_view_t view,
102 * @brief Creates icon using app_item_t structure
104 * @param parent Parent widget pointer
105 * @param item pointer to app_item_t structure
107 * @return Pointer to created icon or NULL.
109 Evas_Object *app_icon_create(Tree_node_t *tree_data, app_icon_type_t type);
112 * @brief Updates miniatures in folder icon
114 * @param folder_icon_layout folder icon layout to update
115 * @param folder_miniatures list of miniatures shown in folder icon
116 * @param folder_app_tree applications on the first page of folder
118 void app_icon_update_folder_icon(Tree_node_t *folder_node);
121 * @brief Highlights folder icon with specified frame type
123 * @param folder_icon_layout folder icon layout to highlight
124 * @param frame_type type of frame to use on folder icon
126 void app_icon_highlight_folder_icon(Evas_Object *folder_icon_layout,
127 folder_icon_frame_type_t frame_type);
130 * @brief Sets icon's label
132 * @param icon_layout icon layout in which label is set
133 * @param label label to set
135 void app_icon_set_label(Evas_Object *icon_layout, const char* label);
138 * @brief Sets icon layout's color
140 * @param icon_layout icon layout to set color
141 * @param r red component of given color
142 * @param g green component of given color
143 * @param b blue component of given color
144 * @param a alpha component of given color
146 void app_icon_set_color(Evas_Object *icon_layout, int r, int g, int b, int a);
149 * @brief Sets icon's label color to black
151 * @param icon_layout icon layout in which label's color is changed
153 void app_icon_set_label_black(Evas_Object *icon_layout);
156 * @brief Removes all data connected with icon_layout
157 * @param icon_layout Pointer to app_icon layout.
159 void app_icon_remove(Evas_Object *icon_layout);
161 #endif /* APP_ICON_H_ */