On Monday, June 28th, 2021 at 11:47 AM, Andreas Volz <[email protected]> wrote: > Am 28.06.21 um 17:52 schrieb Cedric Bail: > > On Sunday, June 27th, 2021 at 12:55 PM, Andreas Volz [email protected] > > wrote: > >
> > > I often don't find a Unified API equivalent in the new Unified API.
> > > Sure, the easy and obvious ones no problem. But sometimes the design
> > > seems to be changed a lot. Is there a general advice?
> >
> > > For example I use edje_object_part_external_param_*() much in my
> > > application. I thought it might be an equivalent in Efl.Ui.Layout_Part
> > > but I don't see an obvious function.
> >
> > > So any hints in general or this special case?
> >
> > Yes, I think this would be part of the efl_part API. Which should be
> > something
> > like:
> > efl::eo::downcastefl::Text(layout.part("title")).text_set("hello");
> >
> > or in C:
> > efl_text_set(efl_part(layout, "title"), "hello");
> >
> > The efl_part object returned is an Eo object that can only be used for one
> > call. If
> > you want to use it for more than that you need to increase its ref
> > counting. Something
> >
> > like that:
> >
> > Eo *part = efl_ref(efl_part(layout, "title"));
> > efl_text_set(part, "hello");
> > ...
> > efl_unref(part);
>
> Hm, I'd assume this works for text objects. But with the external API[1]
> you could get/set also int/bool data if you know the object supports it
> without detail information of what UI type is the object. With the C API
> this is possible.
With the efl_part, in the case of an external, you should actually get the
object
itself, not some kind of wrapper. You might have to do something like:
Eo *obj = efl_content_get(efl_part(layout, "yourpart"));
I am guessing you will need to do some casting in the C++ API, no idea on
that part I haven't played with it in a very long time and don't remember
enough.
Cedric
publickey - [email protected] - 0x1869A77F.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
_______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
