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.
17 #ifndef __HOME_SCREEN_UTIL_H__
18 #define __HOME_SCREEN_UTIL_H__
21 #include <Elementary.h>
28 #define _(str) gettext(str)
32 #define HAPI __attribute__((visibility("hidden")))
35 ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
39 * @brief Creates elm_layout widget and load edje file to it.
41 * @param win Homescreen efl window pointer.
42 * @param edje_filename name of the edje file
43 * @param edje_group group name from the edje file
44 * @return elm_layout Evas_Object pointer.
46 extern Evas_Object *util_create_edje_layout(
47 Evas_Object *win, const char* edje_filename, const char* edje_group);
49 /*DBG callbacks set. Please use it if new objects are not visible .etc*/
50 extern void tst_resize_cb(void *data, Evas *e, Evas_Object *obj, void *ei);
51 extern void tst_show_cb(void *data, Evas *e, Evas_Object *obj, void *ei);
52 extern void tst_hide_cb(void *data, Evas *e, Evas_Object *obj, void *ei);
53 extern void tst_move_cb(void *data, Evas *e, Evas_Object *obj, void *ei);
54 extern void tst_del_cb(void *data, Evas *e, Evas_Object *obj, void *ei);
59 * @brief Function returns Eina list of evas objects visible in gengrid
61 * @param gengrid Evas_Object pointer to elm_gengrid
62 * @return Eina_List pointer which Evas_Objects
64 extern Eina_List *elm_gengrid_get_evas_objects_from_items(Evas_Object *gengrid);
67 * @brief Function returns pointer to elm_object_item placed in gengrid
68 * at specified position
69 * @param gengrid Pointer to elm_gengrid_widget;
71 * @return Pointer to elm_object_item
73 Elm_Object_Item *elm_gengrid_get_item_at_index(Evas_Object *gengrid, int idx);
75 #endif /* __HOME_SCREEN_UTIL_H__ */