Hey people, I've written an example of usage of elm_conformant, but I would be glad if somebody that developed it or that knows this widget better than I could check my example and see if there is some use more relevant to be cited / exemplified.
http://docs.enlightenment.org/auto/elementary/conformant_example.html API documentation at: http://docs.enlightenment.org/auto/elementary/group__Conformant.html Thanks in advance. On Mon, Jul 18, 2011 at 11:00 AM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > Elementary: Conformant Documentation > > > > Author: bdilly > Date: 2011-07-18 07:00:36 -0700 (Mon, 18 Jul 2011) > New Revision: 61479 > Trac: http://trac.enlightenment.org/e/changeset/61479 > > Added: > trunk/elementary/doc/img/screenshots/conformant_example_01.eps > trunk/elementary/doc/img/screenshots/conformant_example_01.png > trunk/elementary/doc/img/screenshots/conformant_example_02.eps > trunk/elementary/doc/img/screenshots/conformant_example_02.png > trunk/elementary/doc/img/screenshots/conformant_example_03.eps > trunk/elementary/doc/img/screenshots/conformant_example_03.png > trunk/elementary/doc/img/screenshots/conformant_example_04.eps > trunk/elementary/doc/img/screenshots/conformant_example_04.png > trunk/elementary/src/examples/conformant_example_01.c > trunk/elementary/src/examples/conformant_example_02.c > Modified: > trunk/elementary/doc/examples.dox trunk/elementary/src/examples/Makefile.am > trunk/elementary/src/lib/Elementary.h.in > trunk/elementary/src/lib/elm_conform.c > > Modified: trunk/elementary/doc/examples.dox > =================================================================== > --- trunk/elementary/doc/examples.dox 2011-07-18 11:25:54 UTC (rev 61478) > +++ trunk/elementary/doc/examples.dox 2011-07-18 14:00:36 UTC (rev 61479) > @@ -2189,6 +2189,79 @@ > */ > > /** > + * @page conformant_example Conformant Example. > + * > + * In this example we'll explain how to create applications to work > + * with illume, considering space required for virtual keyboards. > + * > + * Illume is a module for Enlightenment that modifies the user interface > + * to work cleanly and nicely on a mobile device. It has support for > + * virtual keyboard, among other nice features. > + * > + * Let's start creating a very simple window with a vertical box > + * with multi-line entry between two buttons. > + * This entry will expand filling all space on window not used by buttons. > + * > + * @dontinclude conformant_example_01.c > + * @skipline elm_main > + * @until } > + * > + * For information about how to create windows, boxes, buttons or entries, > + * look for documentation for these widgets. > + * > + * It will looks fine when you don't need a virtual keyboard, as you > + * can see on the following image: > + * > + * @image html screenshots/conformant_example_01.png > + * @image latex screenshots/conformant_example_01.eps > + * > + * But if you call a virtual keyboard, the window will resize, changing > + * widgets size and position. All the content will shrink. > + * The window will look like this: > + * > + * @image html screenshots/conformant_example_02.png > + * @image latex screenshots/conformant_example_02.eps > + * > + * If you don't want such behaviour, you > + * will need a conformant to account for space taken up by the indicator, > + * virtual keyboard and softkey windows. > + * > + * In this case, using the conformant in a proper way, you will have > + * a window like the following when the virtual keyboard is hidden: > + * > + * @image html screenshots/conformant_example_03.png > + * @image latex screenshots/conformant_example_03.eps > + * > + * As you can see, it guess the space that will be required by the keyboard. > + * Verify how perfectly it fits when keyboard is visible: > + * > + * @image html screenshots/conformant_example_04.png > + * @image latex screenshots/conformant_example_04.eps > + * > + * So, let's study each step required to transform our initial example on > + * the second one. > + * > + * First of all, we need to set the window as an illume conformant window: > + * @dontinclude conformant_example_02.c > + * @skipline elm_win_conformant_set > + * > + * Next, we'll add a conformant widget, and set it to resize with the window, > + * instead of the box. > + * @skipline conform > + * @until evas_object_show > + * > + * Finally, we'll set the box as conformant's content, just like this: > + * @skipline elm_conformant_content_set > + * > + * Compare both examples code: > + * @ref conformant_example_01.c "conformant_example_01.c" > + * @ref conformant_example_02.c "conformant_example_02.c" > + * > + * @example conformant_example_01.c > + * @example conformant_example_02.c > + */ > + > +/** > * @page bg_example_01_c bg_example_01.c > * @include bg_example_01.c > * @example bg_example_01.c > > > Property changes on: > trunk/elementary/doc/img/screenshots/conformant_example_01.png > ___________________________________________________________________ > Added: svn:mime-type > + application/octet-stream > > > Property changes on: > trunk/elementary/doc/img/screenshots/conformant_example_02.png > ___________________________________________________________________ > Added: svn:mime-type > + application/octet-stream > > > Property changes on: > trunk/elementary/doc/img/screenshots/conformant_example_03.png > ___________________________________________________________________ > Added: svn:mime-type > + application/octet-stream > > > Property changes on: > trunk/elementary/doc/img/screenshots/conformant_example_04.png > ___________________________________________________________________ > Added: svn:mime-type > + application/octet-stream > > Modified: trunk/elementary/src/examples/Makefile.am > =================================================================== > --- trunk/elementary/src/examples/Makefile.am 2011-07-18 11:25:54 UTC (rev > 61478) > +++ trunk/elementary/src/examples/Makefile.am 2011-07-18 14:00:36 UTC (rev > 61479) > @@ -57,6 +57,8 @@ > calendar_example_05.c \ > calendar_example_06.c \ > clock_example.c \ > + conformant_example_01.c \ > + conformant_example_02.c \ > image_example_01.c \ > flipselector_example.c \ > fileselector_example.c \ > @@ -113,6 +115,8 @@ > calendar_example_05 \ > calendar_example_06 \ > clock_example \ > + conformant_example_01 \ > + conformant_example_02 \ > image_example_01 \ > diskselector_example_01 \ > diskselector_example_02 \ > > Modified: trunk/elementary/src/lib/Elementary.h.in > =================================================================== > --- trunk/elementary/src/lib/Elementary.h.in 2011-07-18 11:25:54 UTC (rev > 61478) > +++ trunk/elementary/src/lib/Elementary.h.in 2011-07-18 14:00:36 UTC (rev > 61479) > @@ -7899,13 +7899,110 @@ > EINA_DEPRECATED EAPI void > elm_scrolled_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly) > EINA_ARG_NONNULL(1); > EINA_DEPRECATED EAPI Eina_Bool > elm_scrolled_entry_cnp_textonly_get(Evas_Object *obj) EINA_ARG_NONNULL(1); > > - /* conformant */ > + /** > + * @defgroup Conformant Conformant > + * @ingroup Elementary > + * > + * The aim is to provide a widget that can be used in elementary apps to > + * account for space taken up by the indicator, virtual keypad & softkey > + * windows when running the illume2 module of E17. > + * > + * So conformant content will be sized and positioned considering the > + * space required for such stuff, and when they popup, as a keyboard > + * shows when an entry is selected, conformant content won't change. > + * > + * Available styles for it: > + * - @c "default" > + * > + * See how to use this widget in this example: > + * @ref conformant_example > + */ > + > + /** > + * @addtogroup Conformant > + * @{ > + */ > + > + /** > + * Add a new conformant widget to the given parent Elementary > + * (container) object. > + * > + * @param parent The parent object. > + * @return A new conformant widget handle or @c NULL, on errors. > + * > + * This function inserts a new conformant widget on the canvas. > + * > + * @ingroup Conformant > + */ > EAPI Evas_Object *elm_conformant_add(Evas_Object *parent) > EINA_ARG_NONNULL(1); > + > + /** > + * Set the content of the conformant widget. > + * > + * @param obj The conformant object. > + * @param content The content to be displayed by the conformant. > + * > + * Content will be sized and positioned considering the space required > + * to display a virtual keyboard. So it won't fill all the conformant > + * size. This way is possible to be sure that content won't resize > + * or be re-positioned after the keyboard is displayed. > + * > + * Once the content object is set, a previously set one will be deleted. > + * If you want to keep that old content object, use the > + * elm_conformat_content_unset() function. > + * > + * @see elm_conformant_content_unset() > + * @see elm_conformant_content_get() > + * > + * @ingroup Conformant > + */ > EAPI void elm_conformant_content_set(Evas_Object *obj, Evas_Object > *content) EINA_ARG_NONNULL(1); > + > + /** > + * Get the content of the conformant widget. > + * > + * @param obj The conformant object. > + * @return The content that is being used. > + * > + * Return the content object which is set for this widget. > + * It won't be unparent from conformant. For that, use > + * elm_conformant_content_unset(). > + * > + * @see elm_conformant_content_set() for more details. > + * @see elm_conformant_content_unset() > + * > + * @ingroup Conformant > + */ > EAPI Evas_Object *elm_conformant_content_get(const Evas_Object *obj) > EINA_ARG_NONNULL(1); > + > + /** > + * Unset the content of the conformant widget. > + * > + * @param obj The conformant object. > + * @return The content that was being used. > + * > + * Unparent and return the content object which was set for this widget. > + * > + * @see elm_conformant_content_set() for more details. > + * > + * @ingroup Conformant > + */ > EAPI Evas_Object *elm_conformant_content_unset(Evas_Object *obj) > EINA_ARG_NONNULL(1); > + > + /** > + * Returns the Evas_Object that represents the content area. > + * > + * @param obj The conformant object. > + * @return The content area of the widget. > + * > + * @ingroup Conformant > + */ > EAPI Evas_Object *elm_conformant_content_area_get(const Evas_Object *obj) > EINA_ARG_NONNULL(1); > > + /** > + * @} > + */ > + > /* mapbuf */ > EAPI Evas_Object *elm_mapbuf_add(Evas_Object *parent) EINA_ARG_NONNULL(1); > EAPI void elm_mapbuf_content_set(Evas_Object *obj, Evas_Object > *content) EINA_ARG_NONNULL(1); > > Modified: trunk/elementary/src/lib/elm_conform.c > =================================================================== > --- trunk/elementary/src/lib/elm_conform.c 2011-07-18 11:25:54 UTC (rev > 61478) > +++ trunk/elementary/src/lib/elm_conform.c 2011-07-18 14:00:36 UTC (rev > 61479) > @@ -9,14 +9,6 @@ > # define MAX(a,b) ((a) < (b)) ? (b) : (a) > #endif > > -/** > - * @defgroup Conformant Conformant > - * > - * The aim is to provide a widget that can be used in elementary apps to > - * account for space taken up by the indicator, virtual keypad & softkey > windows when running > - * the illume2 module of E17. > - */ > - > typedef struct _Widget_Data Widget_Data; > struct _Widget_Data > { > @@ -444,14 +436,6 @@ > } > #endif > > -/** > - * Add a new Conformant object > - * > - * @param parent The parent object > - * @return The new conformant object or NULL if it cannot be created > - * > - * @ingroup Conformant > - */ > EAPI Evas_Object * > elm_conformant_add(Evas_Object *parent) > { > @@ -499,18 +483,6 @@ > return obj; > } > > -/** > - * Set the content of the conformant widget > - * > - * Once the content object is set, a previously set one will be deleted. > - * If you want to keep that old content object, use the > - * elm_conformat_content_unset() function. > - * > - * @param obj The conformant object > - * @return The content that was being used > - * > - * @ingroup Conformant > - */ > EAPI void > elm_conformant_content_set(Evas_Object *obj, Evas_Object *content) > { > @@ -532,16 +504,6 @@ > _sizing_eval(obj); > } > > -/** > - * Get the content of the conformant widget > - * > - * Return the content object which is set for this widget; > - * > - * @param obj The conformant object > - * @return The content that is being used > - * > - * @ingroup Conformant > - */ > EAPI Evas_Object * > elm_conformant_content_get(const Evas_Object *obj) > { > @@ -552,16 +514,6 @@ > return wd->content; > } > > -/** > - * Unset the content of the conformant widget > - * > - * Unparent and return the content object which was set for this widget; > - * > - * @param obj The conformant object > - * @return The content that was being used > - * > - * @ingroup Conformant > - */ > EAPI Evas_Object * > elm_conformant_content_unset(Evas_Object *obj) > { > @@ -577,14 +529,7 @@ > wd->content = NULL; > return content; > } > -/** > - * Returns the Evas_Object that represents the content area. > - * > - * @param obj The conformant object. > - * @return The content area of the widget. > - * > - * @ingroup Conformant > - */ > + > EAPI Evas_Object * > elm_conformant_content_area_get(const Evas_Object *obj) > { > @@ -596,4 +541,3 @@ > _elm_dangerous_call_check(__FUNCTION__); > return (Evas_Object *)edje_object_part_object_get(wd->base, > "elm.swallow.content"); > } > - > > > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > -- Bruno Dilly Senior Developer ProFUSION embedded systems http://profusion.mobi ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel