summaryrefslogtreecommitdiff
path: root/legacy/evas
diff options
context:
space:
mode:
authorJiyoun Park <jijibe99@gmail.com>2012-09-27 08:54:54 +0000
committerJiyoun Park <jijibe99@gmail.com>2012-09-27 08:54:54 +0000
commit7d2ced81f61a5f55b23ee67ea0bec20cd2dc77c9 (patch)
tree25e92c69edbcfdfc6143f1cdc75923159089de59 /legacy/evas
parent35934700690aeebcc670a89c39aceb88422f8c31 (diff)
add evas object display mode hint
this hint can be used when user want to notify and change object size hint(display mode) like compress(example, keyboard show and object need to be compressed) and etc. SVN revision: 77136
Diffstat (limited to 'legacy/evas')
-rw-r--r--legacy/evas/ChangeLog3
-rw-r--r--legacy/evas/NEWS1
-rw-r--r--legacy/evas/src/lib/Evas.h36
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_main.c27
-rw-r--r--legacy/evas/src/lib/include/evas_private.h1
5 files changed, 68 insertions, 0 deletions
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 @@
1063 if a swap was a copy, swap, discard and if a swap with 2 or 3 1063 if a swap was a copy, swap, discard and if a swap with 2 or 3
1064 buffers. don't have that but env var will do for now for testing. 1064 buffers. don't have that but env var will do for now for testing.
1065 1065
10662012-09-27 Jiyoun Park (jypark)
1066 1067
1068 * Add the object display mode hint. this can be used to check object
1069 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:
8 * WEBP image loader support. 8 * WEBP image loader support.
9 * EVAS_CALLBACK_IMAGE_RESIZE. 9 * EVAS_CALLBACK_IMAGE_RESIZE.
10 * Evas_Device registration/manipulation/querying API 10 * Evas_Device registration/manipulation/querying API
11 * Evas_Object_Display_Mode querying API
11 12
12Improvements: 13Improvements:
13 14
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
699 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 */ 699 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 */
700} Evas_Aspect_Control; /**< Aspect types/policies for scaling size hints, used for evas_object_size_hint_aspect_set() */ 700} Evas_Aspect_Control; /**< Aspect types/policies for scaling size hints, used for evas_object_size_hint_aspect_set() */
701 701
702typedef enum _Evas_Display_Mode
703{
704 EVAS_DISPLAY_MODE_NONE = 0, /**<Default mode */
705 EVAS_DISPLAY_MODE_INHERIT = 1, /**< Use this mode when object's display mode depend on ancestor's */
706 EVAS_DISPLAY_MODE_COMPRESS = 2, /**< Use this mode want to give comppress display mode hint to object */
707 EVAS_DISPLAY_MODE_EXPAND = 3, /**< Use this mode want to give expand display mode hint to object */
708 EVAS_DISPLAY_MODE_DONT_CHANGE = 4 /**< Use this mode when object should not change display mode */
709} Evas_Display_Mode; /**< object's display mode type related with compress/expand or etc mode */
710
702typedef struct _Evas_Pixel_Import_Source Evas_Pixel_Import_Source; /**< A source description of pixels for importing pixels */ 711typedef struct _Evas_Pixel_Import_Source Evas_Pixel_Import_Source; /**< A source description of pixels for importing pixels */
703typedef struct _Evas_Engine_Info Evas_Engine_Info; /**< A generic Evas Engine information structure */ 712typedef struct _Evas_Engine_Info Evas_Engine_Info; /**< A generic Evas Engine information structure */
704typedef struct _Evas_Device Evas_Device; /**< A source device handle - where the event came from */ 713typedef struct _Evas_Device Evas_Device; /**< A source device handle - where the event came from */
@@ -5288,6 +5297,33 @@ EAPI void evas_object_size_hint_max_get(const Evas_Object *obj, Evas_Coord *w, E
5288EAPI void evas_object_size_hint_max_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); 5297EAPI void evas_object_size_hint_max_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
5289 5298
5290/** 5299/**
5300 * Retrieves the hints for an object's display mode
5301 *
5302 * @param obj The given Evas object to query hints from.
5303 *
5304 * These are hints on the display mode @p obj. This is
5305 * not a size enforcement in any way, it's just a hint that can be
5306 * used whenever appropriate.
5307 * This mode can be used object's display mode like commpress or expand
5308 *
5309 * @see evas_object_size_hint_display_mode_set()
5310 */
5311EAPI Evas_Display_Mode evas_object_size_hint_display_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
5312
5313/**
5314 * Sets the hints for an object's disply mode
5315 *
5316 * @param obj The given Evas object to query hints from.
5317 * @param dispmode to use as the display mode hint.
5318 *
5319 * This is not a size enforcement in any way, it's just a hint that
5320 * can be used whenever appropriate.
5321 *
5322 * @see evas_object_size_hint_display_mode_get()
5323 */
5324EAPI void evas_object_size_hint_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode) EINA_ARG_NONNULL(1);
5325
5326/**
5291 * Retrieves the hints for an object's optimum size. 5327 * Retrieves the hints for an object's optimum size.
5292 * 5328 *
5293 * @param obj The given Evas object to query hints from. 5329 * @param obj The given Evas object to query hints from.
diff --git a/legacy/evas/src/lib/canvas/evas_object_main.c b/legacy/evas/src/lib/canvas/evas_object_main.c
index ee33df33fe..de28893de3 100644
--- a/legacy/evas/src/lib/canvas/evas_object_main.c
+++ b/legacy/evas/src/lib/canvas/evas_object_main.c
@@ -807,6 +807,33 @@ _evas_object_size_hint_alloc(Evas_Object *obj)
807 obj->size_hints->max.h = -1; 807 obj->size_hints->max.h = -1;
808 obj->size_hints->align.x = 0.5; 808 obj->size_hints->align.x = 0.5;
809 obj->size_hints->align.y = 0.5; 809 obj->size_hints->align.y = 0.5;
810 obj->size_hints->dispmode = EVAS_DISPLAY_MODE_NONE;
811}
812
813EAPI Evas_Display_Mode
814evas_object_size_hint_display_mode_get(const Evas_Object *obj)
815{
816 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
817 return EVAS_DISPLAY_MODE_NONE;
818 MAGIC_CHECK_END();
819 if ((!obj->size_hints) || obj->delete_me)
820 return EVAS_DISPLAY_MODE_NONE;
821 return obj->size_hints->dispmode;
822}
823
824EAPI void
825evas_object_size_hint_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode)
826{
827 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
828 return;
829 MAGIC_CHECK_END();
830 if (obj->delete_me)
831 return;
832 _evas_object_size_hint_alloc(obj);
833 if (obj->size_hints->dispmode == dispmode) return;
834 obj->size_hints->dispmode = dispmode;
835
836 evas_object_inform_call_changed_size_hints(obj);
810} 837}
811 838
812EAPI void 839EAPI 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
454 Evas_Aspect aspect; 454 Evas_Aspect aspect;
455 Evas_Double_Pair align, weight; 455 Evas_Double_Pair align, weight;
456 Evas_Border padding; 456 Evas_Border padding;
457 Evas_Display_Mode dispmode;
457}; 458};
458 459
459struct _Evas_Map_Point 460struct _Evas_Map_Point