On Sun, Mar 13, 2011 at 3:09 PM, Andreas Volz <li...@brachttal.net> wrote:
> Am Sun, 13 Mar 2011 13:13:37 -0300 schrieb Gustavo Sverzut Barbieri:
>
>> On Sun, Mar 13, 2011 at 12:54 PM, Andreas Volz <li...@brachttal.net>
>> wrote:
>> > Hello,
>> >
>> > does someone know how I could call a generic purpose signal with
>> > editje after finish an animation signal? Like with edc "after".
>> > I've to signal my application when an animation is finished. I
>> > tried to write an edc by hand with after transition. It seems
>> > editje doesn't show after. So how could I do this?
>>
>> Take a look at the generated EDC, you'll see Editje ALWAYS create such
>> "animation ended" signals for you. You just have to listen to them in
>> your app.
>
> Ah, thanks. This is good, but maybe not sufficient for my use case.
> I'll explain you with my hand written edc code what I need:
>
>      programs {
>         program { name: "visible";
>            signal: "visible";
>            source: "stateval";
>            action: STATE_SET "visible" 0.00;
>            transition: LINEAR 0.50000;
>            target: "border";
>            target: "text";
>            after: "visible_signal";
>         }
>         program { name: "invisible";
>            signal: "invisible";
>            source: "stateval";
>            action: STATE_SET "default" 0.00;
>            transition: LINEAR 0.50000;
>            target: "border";
>            target: "text";
>            after: "invisible_signal";
>         }
>         program { name: "visible_signal";
>            signal: "";
>            source: "";
>            action: SIGNAL_EMIT "visible_signal" "edje";
>         }
>         program { name: "invisible_signal";
>            signal: "";
>            source: "";
>            action: SIGNAL_EMIT "invisible_signal" "edje";
>         }
>
> My application logic is very generic and needs this spec for each edje view:
>
> - visible (IN)
>  - signal:visible
>  - source:stateval
>
> - invisible (IN)
>  - signal:invisible
>  - source:stateval
>
> - visible_signal (OUT)
>  - signal:visible
>  - source:edje
>
> - invisible_signal (OUT)
>  - signal:invisible
>  - source:edje
>
> It just provides two IN signals to show and hide a view and edje provides two 
> OUT
> signals to tell my application when it's finished shown or hidden. So I 
> couldn't use
> your editje provided signals as they have a name that is very dependant of the
> animation.
>
> Do you've some idea how I could map editje behaviour to my needs?

I'm not sure what you mean, I'm doing a quick read of things and can
try to find time for it later. But AFAIK this seems possible, just
stop and think, maybe globs? Also remember that you are suggested to
translate signals by using Editje's own signal dialogs. You can listen
there for specific signals using @-syntax then emit something new as
you wish (although bit useless).


> BTW: What is that "api" export function? Is this maybe usable for my needs? 
> There's
> nothing written in the wiki about it.

it is a hint/markup, not actually used so far. The idea is to provide
there a name and a description and applications should use them. It
would be a much saner version of our current naming scheme like
"elm.type.name". Tools like edje_inspector could help by filtering by
these names, so doubling as documentation. Other tools like
elementary-project (to be announced, I was working on it but ran out
of time/motivation) would automatically create C wrappers based on
"api" flagged parts. For instance my elementary-project, when ready
will manage things like:

edc:
    part { type: TEXT; name: "bla"; api: "label" "some description"; ...}
    part { type: EXTERNAL; source: "elm/button"; name: "ble"; api:
"button" "main button"; ...}

C: (suppose tst as namespace)

/* Text getter for "some description" */
const char *tst_label_get(const Evas_Object *o)
{
    return edje_object_part_text_get(o, "bla");
}

/* Text setter for "some description" */
void tst_label_set(Evas_Object *o, const char *label)
{
    return edje_object_part_text_set(o, "bla", label);
}

/* Button's text getter for "main button" */
void tst_button_text_get(const Evas_Object *o)
{
    Edje_External_Param param = {"text",
EDJE_EXTERNAL_PARAM_TYPE_STRING, 0, 0, NULL};
    if (edje_object_part_external_param_get(o, "ble", &param))
       return param.s;
    return NULL;
}
/* Button's text setter for "main button" */
void tst_button_text_set(Evas_Object *o, const char *text)
{
    Edje_External_Param param = {"text",
EDJE_EXTERNAL_PARAM_TYPE_STRING, 0, 0, text};
    edje_object_part_external_param_set(o, "ble", &param);
}

I guess you get the idea. It would be a major helper for us as you'd
not have to remember all the parts and like, it would be the expected
API, without possible errors such as part name typos..


> I'm also motivated to change my spec if needed or maybe provide some patches 
> to change
> editje to support my needs. Hand writing all my animations isn't so funny all 
> the time... :-(

yes, it's not funny at all.



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

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to