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
This commit is contained in:
Jiyoun Park 2012-09-27 08:54:54 +00:00
parent 3593470069
commit 7d2ced81f6
5 changed files with 68 additions and 0 deletions

View File

@ -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

View File

@ -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:

View File

@ -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, /**<Default mode */
EVAS_DISPLAY_MODE_INHERIT = 1, /**< Use this mode when object's display mode depend on ancestor's */
EVAS_DISPLAY_MODE_COMPRESS = 2, /**< Use this mode want to give comppress display mode hint to object */
EVAS_DISPLAY_MODE_EXPAND = 3, /**< Use this mode want to give expand display mode hint to object */
EVAS_DISPLAY_MODE_DONT_CHANGE = 4 /**< Use this mode when object should not change display mode */
} Evas_Display_Mode; /**< object's display mode type related with compress/expand or etc mode */
typedef struct _Evas_Pixel_Import_Source Evas_Pixel_Import_Source; /**< A source description of pixels for importing pixels */
typedef struct _Evas_Engine_Info Evas_Engine_Info; /**< A generic Evas Engine information structure */
typedef struct _Evas_Device Evas_Device; /**< A source device handle - where the event came from */
@ -5287,6 +5296,33 @@ EAPI void evas_object_size_hint_max_get(const Evas_Object *obj, Evas_Coord *w, E
*/
EAPI void evas_object_size_hint_max_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
/**
* Retrieves the hints for an object's display mode
*
* @param obj The given Evas object to query hints from.
*
* These are hints on the display mode @p obj. This is
* not a size enforcement in any way, it's just a hint that can be
* used whenever appropriate.
* This mode can be used object's display mode like commpress or expand
*
* @see evas_object_size_hint_display_mode_set()
*/
EAPI Evas_Display_Mode evas_object_size_hint_display_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Sets the hints for an object's disply mode
*
* @param obj The given Evas object to query hints from.
* @param dispmode to use as the display mode hint.
*
* This is not a size enforcement in any way, it's just a hint that
* can be used whenever appropriate.
*
* @see evas_object_size_hint_display_mode_get()
*/
EAPI void evas_object_size_hint_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode) EINA_ARG_NONNULL(1);
/**
* Retrieves the hints for an object's optimum size.
*

View File

@ -807,6 +807,33 @@ _evas_object_size_hint_alloc(Evas_Object *obj)
obj->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

View File

@ -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