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>
21 #include "homescreen-efl.h"
25 APP_GRID_TYPE_ALL_APPS = 0,
29 * @brief Function creates app_grid wgt
30 * @details This is a kind of wrapper for a gengrid widget but handle drag and
31 * drop events between different gengrids created by this function. Reposition
32 * mechanism found active gengrid behind mouse pointer. Reposition is gengeric.
33 * If you want to modify it you should set some callbacks in function
34 * app_grid_custom_dnd_handlers_set.
36 * @param parent Pointer to eveas_object. Smart parent widget for app grid.
37 * Basically you can add it into win.
38 * @param data Pointer to Eina_List object with content will be inserted in
40 * @param item_width int describes width of an item in grid.
41 * @param item_height ind describes height of an item in grid
42 * @return pointer to created app_grid
44 extern Evas_Object *app_grid_create(Evas_Object *parent, Tree_node_t *data,
45 Evas_Coord gengrid_width, Evas_Coord gengrid_height,
46 app_grid_type_t type);
49 * @brief Append an imte inot app_grid
50 * @param app_grid Pointer to elm_gengrid widget
51 * @param icon_to_append pointer to appended item
53 * @return Elm_Object_Item if no errors, otherwise NULL
55 extern Elm_Object_Item *app_grid_append_item(Evas_Object *app_grid,
56 Evas_Object *icon_to_append);
59 * @brief Function inserts an item into specific position. If idx is inproper
60 * function tries to insert item at the end of the grid.
62 * @param app_grid Pointer to app_grid
63 * @param item Pointer to item evas_object
64 * @param idx index where item should be inserted
66 * @return Elm_Object_Item if no errors, otherwise NULL
68 extern Elm_Object_Item *app_grid_insert_item_relative(Evas_Object *app_grid,
69 Evas_Object *item, Elm_Object_Item *rel_it);
72 * @brief Function change state of app grids in homescreen
74 * @param app_grid Pointer to elm_layout widget
75 * @param view type of view mode
77 extern void app_grid_set_view_mode(Evas_Object *app_grid,
78 homescreen_view_t view);
81 * @brief Function unpack item from the app_grid
83 * @param item pointer to stored data model
85 extern void app_grid_unpack_item(Elm_Object_Item *item);
88 * @brief Function pack object to box
90 extern Evas_Object *app_grid_item_pack(Evas_Object *p, Evas_Object *c);
93 * @brief Function get icon and data from app_grid item
95 extern Eina_Bool app_grid_get_item_content(Elm_Object_Item *item,
96 Evas_Object **icon, Tree_node_t **data);
98 #endif /* APP_GRID_H_ */