From: Enlightenment S. <no-...@en...> - 2011-07-29 16:31:11
|
Log: [edje] First commented example, along with infra to build it. Author: glima Date: 2011-07-29 09:31:05 -0700 (Fri, 29 Jul 2011) New Revision: 61903 Trac: http://trac.enlightenment.org/e/changeset/61903 Added: trunk/edje/doc/img/edje-basics-example.eps trunk/edje/doc/img/edje-basics-example.png trunk/edje/src/examples/ trunk/edje/src/examples/Makefile.am trunk/edje/src/examples/basic.edc trunk/edje/src/examples/edje-basic.c trunk/edje/src/examples/red.png Modified: trunk/edje/configure.ac trunk/edje/doc/Doxyfile.in trunk/edje/src/Makefile.am trunk/edje/src/lib/Edje.h Modified: trunk/edje/configure.ac =================================================================== --- trunk/edje/configure.ac 2011-07-29 16:30:12 UTC (rev 61902) +++ trunk/edje/configure.ac 2011-07-29 16:31:05 UTC (rev 61903) @@ -371,7 +371,43 @@ ;; esac +## Examples +install_examples="yes" +AC_ARG_ENABLE([install-examples], + AC_HELP_STRING([--disable-install-examples], + [disable installing examples (compiled or just source). + @<:@default==enabled@:>@]), + [ + if test "x${enableval}" = "xyes" ; then + install_examples="yes" + else + install_examples="no" + fi + ], + [install_examples="yes"]) +AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"]) + +build_examples="no" +AC_ARG_ENABLE([build-examples], + AC_HELP_STRING([--enable-build-examples], + [Enable building examples. This requires extra denpendencies. If you don't have them installed yet, don't build with this option or it will fail. Build again when you have it, overriding the previous installation). @<:@default==disabled@:>@]), + [ + if test "x${enableval}" = "xyes" ; then + build_examples="yes" + edje_cc=$($PKG_CONFIG --variable=prefix edje)/bin/edje_cc + # put in here the dependencies for Edje' examples. They are + # meant to be 'real world' usage examples, thus one will be + # using higher level libraries on these programs + PKG_CHECK_MODULES([ECORE_EVAS], [ecore-evas ecore], [], [build_examples="no"]) + AC_SUBST(edje_cc) + else + build_examples="no" + fi + ], + [build_examples="no"]) +AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"]) + AC_SUBST(requirement_edje) AC_OUTPUT([ @@ -388,6 +424,7 @@ src/bin/Makefile src/bin/epp/Makefile utils/Makefile +src/examples/Makefile ]) @@ -409,6 +446,7 @@ echo " EDJE_CALC_CACHE......: $want_edje_calc_cache" echo " Fixed point..........: $want_fixed_point" echo " Documentation........: ${build_doc}" +echo " Examples.............: install:${install_examples} build:${build_examples}" echo echo "Programs:" echo Modified: trunk/edje/doc/Doxyfile.in =================================================================== --- trunk/edje/doc/Doxyfile.in 2011-07-29 16:30:12 UTC (rev 61902) +++ trunk/edje/doc/Doxyfile.in 2011-07-29 16:31:05 UTC (rev 61903) @@ -586,7 +586,7 @@ # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = @srcdir@/edje.dox @top_srcdir@/src/bin/edje_cc_handlers.c @top_srcdir@/src/lib +INPUT = @srcdir@/edje.dox @srcdir@/examples.dox @top_srcdir@/src/bin/edje_cc_handlers.c @top_srcdir@/src/lib # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is Property changes on: trunk/edje/doc/img/edje-basics-example.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/edje/src/Makefile.am =================================================================== --- trunk/edje/src/Makefile.am 2011-07-29 16:30:12 UTC (rev 61902) +++ trunk/edje/src/Makefile.am 2011-07-29 16:31:05 UTC (rev 61903) @@ -1,4 +1,4 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = lib bin +SUBDIRS = lib bin examples MAINTAINERCLEANFILES = Makefile.in Property changes on: trunk/edje/src/examples/red.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/edje/src/lib/Edje.h =================================================================== --- trunk/edje/src/lib/Edje.h 2011-07-29 16:30:12 UTC (rev 61902) +++ trunk/edje/src/lib/Edje.h 2011-07-29 16:31:05 UTC (rev 61903) @@ -441,8 +441,12 @@ +@section Edje_Examples Examples on Edje's usage +What follows is a list with varios commented examples, covering a great +part of Edje's API: +- @ref Example_Edje_Basics @@ -1154,16 +1158,20 @@ * * Edje allows one to build scalable interfaces. Scaling factors, * which are set to neutral (@c 1.0) values by default (no scaling, - * actual sizes), are of two types: @b global and @b - * individual. Edje's global scaling factor will affect all its - * objects which hadn't their individual scaling factors altered from - * the default value. If they had it set differently, by + * actual sizes), are of two types: @b global and @b individual. + * Edje's global scaling factor will affect all its objects which + * hadn't their individual scaling factors altered from the default + * value (which is zero). If they had it set differently, by * edje_object_scale_set(), that factor will @b override the global * one. * - * Scaling affects the values of mininum/maximum object sizes, which + * Scaling affects the values of mininum/maximum @b part sizes, which * are @b multiplied by it. Font sizes are scaled, too. * + * @warning Only parts which, at EDC level, had the @c "scale" + * property set to @c 1, will be affected by this function. Check the + * complete @ref edcref "syntax reference" for EDC files. + * * @see edje_scale_get(). */ EAPI void edje_scale_set (double scale); @@ -1213,17 +1221,20 @@ * @brief Set the scaling factor for a given Edje object. * * @param obj A handle to an Edje object - * @param scale The scaling factor (the defaul value is @c 1.0) + * @param scale The scaling factor (the default value is @c 0.0, + * meaning indivinual scaling @b not set) * * This function sets an @b individual scaling factor on the @a obj * Edje object. This property (or Edje's global scaling factor, when - * applicable), will affect this object's parts. However, only parts - * which, at the EDC language level, were declared which the - * @c "scale" attribute set to @c 1 (default value being @c 0) will be - * affected. That EDC attribute means that the given part is subject - * to scaling. Check the complete @ref edcref "syntax reference" for - * EDC files. + * applicable), will affect this object's part sizes. If @p scale is + * not zero, than the individual scaling will @b override any global + * scaling set, for the object @p obj's parts. Put it back to zero to + * get the effects of the global scaling again. * + * @warning Only parts which, at EDC level, had the @c "scale" + * property set to @c 1, will be affected by this function. Check the + * complete @ref edcref "syntax reference" for EDC files. + * * @see edje_object_scale_get() * @see edje_scale_get() for more details */ @@ -1628,9 +1639,11 @@ * @return The data's value string * * This function fetches an EDC data field's value, which is declared - * on the objects building EDC file, <b>under its group</b>. + * on the objects building EDC file, <b>under its group</b>. EDC data + * blocks are most commonly used to pass arbitrary parameters from an + * application's theme to its code. * - * Data fields in EDC files are @c "data" blocks, like the following: + * They look like the following: * * @code * collections { @@ -2162,7 +2175,7 @@ * * This call works exactly as edje_object_size_min_restricted_calc(), * with the last two arguments set to 0. Please refer to its - * documentation, than. + * documentation, then. */ EAPI void edje_object_size_min_calc (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh); @@ -2221,8 +2234,7 @@ * sizes. The caller is the one up to change its geometry or not. * * @warning Be advised that invisible parts in @p obj @b will be taken - * into account in this calculation. If you don't want that to happen, - * resize those parts to zeroed dimensions. + * into account in this calculation. */ EAPI void edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh); |