diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-09-14 11:59:44 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-09-18 13:22:52 +0900 |
commit | f3eff6eb3ee6e9b56c0be5cd7f8905f14b388e4f (patch) | |
tree | 473b3d1b3e56cc5875d4496bf40fe8279165e132 /src/lib/elementary/elm_widget.h | |
parent | cb3b4cc8d7794bea575a85325c8a58f25f0507b2 (diff) |
efl: Introduce Eina.Rect and switch EO APIs to it
It's a complex struct but defined in EO as a simple struct. ABI-wise
it's equivalent to Eina_Rectangle. Some macros that use Eina_Rectangle
also work on Eina_Rect out of the box, most of the code dealing with
x,y,w,h will require no modifications either.
But Eina_Rect provides direct access to a size or position 2d component,
as well as the usual x,y,w,h. The field "rect" is provided as a
convenience for code dealing with both Eina_Rectangle and Eina_Rect. We
may or may not require it.
Note: Size2D could use unsigned values but I have spotted a few places
in the code that actually use -1 to indicate invalid size (as opposed to
0x0).
@feature
Diffstat (limited to 'src/lib/elementary/elm_widget.h')
-rw-r--r-- | src/lib/elementary/elm_widget.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h index 0e51f610f2..799ec11305 100644 --- a/src/lib/elementary/elm_widget.h +++ b/src/lib/elementary/elm_widget.h | |||
@@ -312,8 +312,6 @@ typedef void (*Elm_Widget_Focus_Set_Cb)(void *data, Eina_Bool f | |||
312 | typedef Eina_Bool (*Elm_Widget_Focus_Get_Cb)(const void *data); | 312 | typedef Eina_Bool (*Elm_Widget_Focus_Get_Cb)(const void *data); |
313 | 313 | ||
314 | typedef void (*Elm_Access_On_Highlight_Cb)(void *data); | 314 | typedef void (*Elm_Access_On_Highlight_Cb)(void *data); |
315 | |||
316 | typedef void (*region_hook_func_type)(void *data, Evas_Object *obj, Eina_Rectangle region); | ||
317 | typedef void * (*list_data_get_func_type)(const Eina_List * l); | 315 | typedef void * (*list_data_get_func_type)(const Eina_List * l); |
318 | 316 | ||
319 | #include "elm_widget.eo.h" | 317 | #include "elm_widget.eo.h" |
@@ -396,7 +394,7 @@ typedef struct _Elm_Widget_Smart_Data | |||
396 | /* "show region" coordinates. all widgets got those because this | 394 | /* "show region" coordinates. all widgets got those because this |
397 | * info may be set and queried recursively through the widget | 395 | * info may be set and queried recursively through the widget |
398 | * parenting tree */ | 396 | * parenting tree */ |
399 | Eina_Rectangle show_region; | 397 | Eina_Rect show_region; |
400 | 398 | ||
401 | /* scrolling hold/freeze hints. all widgets got those because this | 399 | /* scrolling hold/freeze hints. all widgets got those because this |
402 | * info may be set and queried recursively through the widget | 400 | * info may be set and queried recursively through the widget |
@@ -697,9 +695,9 @@ EAPI const Elm_Widget_Smart_Class *elm_widget_smart_class_get(void); | |||
697 | 695 | ||
698 | EAPI void elm_widget_disabled_set(Evas_Object *obj, Eina_Bool disabled); | 696 | EAPI void elm_widget_disabled_set(Evas_Object *obj, Eina_Bool disabled); |
699 | EAPI Eina_Bool elm_widget_disabled_get(const Evas_Object *obj); | 697 | EAPI Eina_Bool elm_widget_disabled_get(const Evas_Object *obj); |
700 | EAPI void elm_widget_show_region_set(Evas_Object *obj, Eina_Rectangle sr, Eina_Bool forceshow); | 698 | EAPI void elm_widget_show_region_set(Evas_Object *obj, Eina_Rect sr, Eina_Bool forceshow); |
701 | EAPI Eina_Rectangle elm_widget_show_region_get(const Evas_Object *obj); | 699 | EAPI Eina_Rect elm_widget_show_region_get(const Evas_Object *obj); |
702 | EAPI Eina_Rectangle elm_widget_focus_region_get(const Evas_Object *obj); | 700 | EAPI Eina_Rect elm_widget_focus_region_get(const Evas_Object *obj); |
703 | EAPI void elm_widget_focus_region_show(Evas_Object *obj); | 701 | EAPI void elm_widget_focus_region_show(Evas_Object *obj); |
704 | EAPI void elm_widget_scroll_hold_push(Evas_Object *obj); | 702 | EAPI void elm_widget_scroll_hold_push(Evas_Object *obj); |
705 | EAPI void elm_widget_scroll_hold_pop(Evas_Object *obj); | 703 | EAPI void elm_widget_scroll_hold_pop(Evas_Object *obj); |
@@ -741,7 +739,7 @@ EAPI void elm_widget_access_info_set(Evas_Object *obj, const char *t | |||
741 | EAPI const char *elm_widget_access_info_get(const Evas_Object *obj); | 739 | EAPI const char *elm_widget_access_info_get(const Evas_Object *obj); |
742 | EAPI void elm_widget_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled); | 740 | EAPI void elm_widget_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled); |
743 | EAPI Eina_Bool elm_widget_orientation_mode_disabled_get(const Evas_Object *obj); | 741 | EAPI Eina_Bool elm_widget_orientation_mode_disabled_get(const Evas_Object *obj); |
744 | EAPI Eina_Rectangle elm_widget_focus_highlight_geometry_get(const Evas_Object *obj); | 742 | EAPI Eina_Rect elm_widget_focus_highlight_geometry_get(const Evas_Object *obj); |
745 | void _elm_widget_item_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *it); | 743 | void _elm_widget_item_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *it); |
746 | EAPI void elm_widget_focus_region_show_mode_set(Evas_Object *obj, Elm_Focus_Region_Show_Mode mode); | 744 | EAPI void elm_widget_focus_region_show_mode_set(Evas_Object *obj, Elm_Focus_Region_Show_Mode mode); |
747 | EAPI Elm_Focus_Region_Show_Mode elm_widget_focus_region_show_mode_get(const Evas_Object *obj); | 745 | EAPI Elm_Focus_Region_Show_Mode elm_widget_focus_region_show_mode_get(const Evas_Object *obj); |