On Mon, Mar 8, 2010 at 5:36 AM, Enlightenment SVN
<no-re...@enlightenment.org> wrote:
> Log:
>  Add macros (actually defines like hint_fill_set) for expand_set to
>  make it easier for people to know that weight_set handles expansion.
>
>
> Author:       devilhorns
> Date:         2010-03-08 00:36:08 -0800 (Mon, 08 Mar 2010)
> New Revision: 46992
>
> Modified:
>  trunk/evas/src/lib/Evas.h
>
> Modified: trunk/evas/src/lib/Evas.h
> ===================================================================
> --- trunk/evas/src/lib/Evas.h   2010-03-08 08:34:18 UTC (rev 46991)
> +++ trunk/evas/src/lib/Evas.h   2010-03-08 08:36:08 UTC (rev 46992)
> @@ -497,10 +497,12 @@
>  #define EVAS_TEXTURE_RESTRICT_REPEAT    4 /**< tiling clamps and any range 
> offset repeats */
>  #define EVAS_TEXTURE_PAD                5 /**< tiling extends with end 
> values */
>
> -#define EVAS_HINT_EXPAND  1.0 /**< Use with 
> evas_object_size_hint_weight_set(), evas_object_size_hint_weight_get() */
> +#define EVAS_HINT_EXPAND  1.0 /**< Use with 
> evas_object_size_hint_weight_set(), evas_object_size_hint_weight_get(), 
> evas_object_size_hint_expand_set(), evas_object_size_hint_expand_get() */
>  #define EVAS_HINT_FILL   -1.0 /**< Use with 
> evas_object_size_hint_align_set(), evas_object_size_hint_align_get(), 
> evas_object_size_hint_fill_set(), evas_object_size_hint_fill_get() */
>  #define evas_object_size_hint_fill_set evas_object_size_hint_align_set /**< 
> Convenience macro to make it easier to understand that align is also used for 
> fill properties (as fill is mutually exclusive to align) */
>  #define evas_object_size_hint_fill_get evas_object_size_hint_align_get /**< 
> Convenience macro to make it easier to understand that align is also used for 
> fill properties (as fill is mutually exclusive to align) */
> +#define evas_object_size_hint_expand_set evas_object_size_hint_weight_set 
> /**< Convenience macro to make it easier to understand that weight is also 
> used for expand properties */
> +#define evas_object_size_hint_expand_get evas_object_size_hint_weight_get 
> /**< Convenience macro to make it easier to understand that weight is also 
> used for expand properties */


ouch! these macros will make it more error-prone and confusing, not
less. Expand would be boolean, but we get double values... meaning?

I'd rather add static inline functions that would check and convert parameters.


-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to