diff --git a/legacy/evas/ChangeLog b/legacy/evas/ChangeLog index 316f1f0a26..377cec6622 100644 --- a/legacy/evas/ChangeLog +++ b/legacy/evas/ChangeLog @@ -1063,4 +1063,7 @@ if a swap was a copy, swap, discard and if a swap with 2 or 3 buffers. don't have that but env var will do for now for testing. +2012-09-27 Jiyoun Park (jypark) + * Add the object display mode hint. this can be used to check object + mode like compress or expand or etc diff --git a/legacy/evas/NEWS b/legacy/evas/NEWS index e8d819a39a..5e25b5589a 100644 --- a/legacy/evas/NEWS +++ b/legacy/evas/NEWS @@ -8,6 +8,7 @@ Additions: * WEBP image loader support. * EVAS_CALLBACK_IMAGE_RESIZE. * Evas_Device registration/manipulation/querying API + * Evas_Object_Display_Mode querying API Improvements: diff --git a/legacy/evas/src/lib/Evas.h b/legacy/evas/src/lib/Evas.h index 643762f88b..e5281a4369 100644 --- a/legacy/evas/src/lib/Evas.h +++ b/legacy/evas/src/lib/Evas.h @@ -699,6 +699,15 @@ typedef enum _Evas_Aspect_Control EVAS_ASPECT_CONTROL_BOTH = 4 /**< Use all horizontal @b and vertical container spaces to place an object (never growing it out of those bounds), using the given aspect */ } Evas_Aspect_Control; /**< Aspect types/policies for scaling size hints, used for evas_object_size_hint_aspect_set() */ +typedef enum _Evas_Display_Mode +{ + EVAS_DISPLAY_MODE_NONE = 0, /**size_hints->max.h = -1; obj->size_hints->align.x = 0.5; obj->size_hints->align.y = 0.5; + obj->size_hints->dispmode = EVAS_DISPLAY_MODE_NONE; +} + +EAPI Evas_Display_Mode +evas_object_size_hint_display_mode_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EVAS_DISPLAY_MODE_NONE; + MAGIC_CHECK_END(); + if ((!obj->size_hints) || obj->delete_me) + return EVAS_DISPLAY_MODE_NONE; + return obj->size_hints->dispmode; +} + +EAPI void +evas_object_size_hint_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) + return; + _evas_object_size_hint_alloc(obj); + if (obj->size_hints->dispmode == dispmode) return; + obj->size_hints->dispmode = dispmode; + + evas_object_inform_call_changed_size_hints(obj); } EAPI void diff --git a/legacy/evas/src/lib/include/evas_private.h b/legacy/evas/src/lib/include/evas_private.h index 46e5c97a12..62f925c5c3 100644 --- a/legacy/evas/src/lib/include/evas_private.h +++ b/legacy/evas/src/lib/include/evas_private.h @@ -454,6 +454,7 @@ struct _Evas_Size_Hints Evas_Aspect aspect; Evas_Double_Pair align, weight; Evas_Border padding; + Evas_Display_Mode dispmode; }; struct _Evas_Map_Point