On Thu, Apr 15, 2010 at 8:09 PM, Andreas Volz <[email protected]> wrote:
> Hello,
>
> I'm a little confused how to correct add state names to a part with
> Edje_Edit API.
>
> To add a state:
>
> /**Create a new state to the give part
>  */
> EAPI void
> edje_edit_state_add(
>   Evas_Object *obj,       ///< The edje object
>   const char *part,       ///< The name of the part
>   const char *name        ///< The name for the new state (not
> including the state value)
> );
>
> The interesting here is the "not including the state value" comment. So
> how do I see the state value of the just added state?
>
> ...because I need it here as part of the state name to set a state
> property.
>
> /**Get the rel1 relative x value of state*/
> EAPI double                ///@return The 'rel1 relative X' value of the
> part state
> edje_edit_state_rel1_relative_x_get(
>   Evas_Object *obj,       ///< The edje object
>   const char *part,       ///< The name of the part
>   const char *state       ///< The name of the part state (ex. "default
> 0.00")
>
> And here in comparison the edje_edit_state_name_set:
>
> /**Set a new name for the given state in the given part.
>  * Note that state and new_name must include the floating value inside
> the string (ex. "default 0.00")
>  */
> EAPI Eina_Bool         ///@return EINA_TRUE on success, EINA_FALSE if
> name couldn't be set
> edje_edit_state_name_set(
>   Evas_Object *obj,       ///< The edje object
>   const char *part,       ///< The name of the part that contain state
>   const char *state,      ///< The current name of the state
>   const char *new_name    ///< The new name to assign (including the
> value)
> );
>
> Here I need to include the value in new_name. Hm, do I have to include
> the value in state variable?
>
> Sure I could add a state and then read the states list again. But if I
> like to add a state and then simply modify its properties I see
> currently no easy way to do it.
>
> Maybe I didn't understand the state value concept. I simply use 0.00
> always to be honest.
>

Your Edje is old, every state function in Edje_Edit now receives
the state value separately from the name. Documentation is still
not fixed, but will be done and committed by the beginning of next
week.

As to how it used to work, when you create a state, it uses 0.0
as the value, and you just pass the name to the function, for every
other state function, you have to pass both name and state within
the string, as it says there: "default 0.00".

> regards
>        Andreas
>
> ------------------------------------------------------------------------------
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to