summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--NEWS1
-rw-r--r--src/bin/e_layout.c35
-rw-r--r--src/bin/e_layout.h3
4 files changed, 40 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fe83569a2..a4aaaf65c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
7 * e_util_size_debug_set now also prints for object show/hide events 7 * e_util_size_debug_set now also prints for object show/hide events
8 * e_gadcon_unpopulate now correctly freezes the container while deleting gadgets 8 * e_gadcon_unpopulate now correctly freezes the container while deleting gadgets
9 * e_popup is now a wrapper for drawing objects onto the compositor canvas 9 * e_popup is now a wrapper for drawing objects onto the compositor canvas
10 * added e_layout functions for returning objects above or below a layout child
10 11
112013-02-13 Deon Thomas 122013-02-13 Deon Thomas
12 13
diff --git a/NEWS b/NEWS
index e8a339ccb..8a6af86bf 100644
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,7 @@ Additions:
28 * e_int_border_remember_edit 28 * e_int_border_remember_edit
29 * Added function for getting children of e_layout 29 * Added function for getting children of e_layout
30 * added utility function for printing all objects above a given object 30 * added utility function for printing all objects above a given object
31 * added e_layout functions for returning objects above or below a layout child
31 Config: 32 Config:
32 * Added option for disabling icons in menus 33 * Added option for disabling icons in menus
33 * Added option for disabling pointer warping when performing directional focus changes using winlist 34 * Added option for disabling pointer warping when performing directional focus changes using winlist
diff --git a/src/bin/e_layout.c b/src/bin/e_layout.c
index 389299ddd..c075184cd 100644
--- a/src/bin/e_layout.c
+++ b/src/bin/e_layout.c
@@ -154,6 +154,41 @@ e_layout_child_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
154 if (li->sd->frozen <= 0) _e_layout_smart_move_resize_item(li); 154 if (li->sd->frozen <= 0) _e_layout_smart_move_resize_item(li);
155} 155}
156 156
157EAPI Evas_Object *
158e_layout_child_above_get(Evas_Object *obj)
159{
160 E_Layout_Item *li;
161
162 li = evas_object_data_get(obj, "e_layout_data");
163 EINA_SAFETY_ON_NULL_RETURN_VAL(li, NULL);
164 li = (E_Layout_Item*)EINA_INLIST_GET(li)->next;
165 return li ? li->obj : NULL;
166}
167
168EAPI Evas_Object *
169e_layout_child_below_get(Evas_Object *obj)
170{
171 E_Layout_Item *li;
172
173 li = evas_object_data_get(obj, "e_layout_data");
174 EINA_SAFETY_ON_NULL_RETURN_VAL(li, NULL);
175 li = (E_Layout_Item*)EINA_INLIST_GET(li)->prev;
176 return li ? li->obj : NULL;
177}
178
179EAPI Evas_Object *
180e_layout_top_child_get(Evas_Object *obj)
181{
182 E_Smart_Data *sd;
183 E_Layout_Item *li;
184
185 if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR() NULL;
186 sd = evas_object_smart_data_get(obj);
187 if (!sd->items) return NULL;
188 li = (E_Layout_Item*)sd->items->last;
189 return li->obj;
190}
191
157EAPI void 192EAPI void
158e_layout_child_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) 193e_layout_child_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
159{ 194{
diff --git a/src/bin/e_layout.h b/src/bin/e_layout.h
index 0e6ef59c2..43a6fdfd5 100644
--- a/src/bin/e_layout.h
+++ b/src/bin/e_layout.h
@@ -25,5 +25,8 @@ EAPI void e_layout_unpack (Evas_Object *obj);
25EAPI Eina_List *e_layout_children_get(Evas_Object *obj); 25EAPI Eina_List *e_layout_children_get(Evas_Object *obj);
26EAPI Evas_Object *e_layout_top_child_at_xy_get(Evas_Object *obj, Evas_Coord x, Evas_Coord y, const Eina_List *ignore); 26EAPI Evas_Object *e_layout_top_child_at_xy_get(Evas_Object *obj, Evas_Coord x, Evas_Coord y, const Eina_List *ignore);
27 27
28EAPI Evas_Object *e_layout_child_below_get(Evas_Object *obj);
29EAPI Evas_Object *e_layout_child_above_get(Evas_Object *obj);
30EAPI Evas_Object *e_layout_top_child_get(Evas_Object *obj);
28#endif 31#endif
29#endif 32#endif