* Enlightenment SVN <no-re...@enlightenment.org> [2012-09-27 01:54:54 -0700]:
> Log: > 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. Do you mind to explain it better and exemplify it? I can't even imagine how it is used... BR, > > > Author: jypark > Date: 2012-09-27 01:54:54 -0700 (Thu, 27 Sep 2012) > New Revision: 77136 > Trac: http://trac.enlightenment.org/e/changeset/77136 > > Modified: > trunk/evas/ChangeLog trunk/evas/NEWS trunk/evas/src/lib/Evas.h > trunk/evas/src/lib/canvas/evas_object_main.c > trunk/evas/src/lib/include/evas_private.h > > Modified: trunk/evas/ChangeLog > =================================================================== > --- trunk/evas/ChangeLog 2012-09-27 08:40:24 UTC (rev 77135) > +++ trunk/evas/ChangeLog 2012-09-27 08:54:54 UTC (rev 77136) > @@ -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 > > Modified: trunk/evas/NEWS > =================================================================== > --- trunk/evas/NEWS 2012-09-27 08:40:24 UTC (rev 77135) > +++ trunk/evas/NEWS 2012-09-27 08:54:54 UTC (rev 77136) > @@ -8,6 +8,7 @@ > * WEBP image loader support. > * EVAS_CALLBACK_IMAGE_RESIZE. > * Evas_Device registration/manipulation/querying API > + * Evas_Object_Display_Mode querying API > > Improvements: > > > Modified: trunk/evas/src/lib/Evas.h > =================================================================== > --- trunk/evas/src/lib/Evas.h 2012-09-27 08:40:24 UTC (rev 77135) > +++ trunk/evas/src/lib/Evas.h 2012-09-27 08:54:54 UTC (rev 77136) > @@ -699,6 +699,15 @@ > 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 */ > @@ -5288,6 +5297,33 @@ > 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. > * > * @param obj The given Evas object to query hints from. > > Modified: trunk/evas/src/lib/canvas/evas_object_main.c > =================================================================== > --- trunk/evas/src/lib/canvas/evas_object_main.c 2012-09-27 08:40:24 UTC > (rev 77135) > +++ trunk/evas/src/lib/canvas/evas_object_main.c 2012-09-27 08:54:54 UTC > (rev 77136) > @@ -807,9 +807,36 @@ > 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 > evas_object_size_hint_min_get(const Evas_Object *obj, Evas_Coord *w, > Evas_Coord *h) > { > MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); > > Modified: trunk/evas/src/lib/include/evas_private.h > =================================================================== > --- trunk/evas/src/lib/include/evas_private.h 2012-09-27 08:40:24 UTC (rev > 77135) > +++ trunk/evas/src/lib/include/evas_private.h 2012-09-27 08:54:54 UTC (rev > 77136) > @@ -454,6 +454,7 @@ > Evas_Aspect aspect; > Evas_Double_Pair align, weight; > Evas_Border padding; > + Evas_Display_Mode dispmode; > }; > > struct _Evas_Map_Point > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://ad.doubleclick.net/clk;258768047;13503038;j? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn -- Gustavo Lima Chaves Computer Engineer @ ProFUSION Embedded Systems ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel