Hi jpeg,

On Mon, Dec 5, 2016 at 2:21 AM, Jean-Philippe André <[email protected]>
wrote:

> Hi,
>
>
> This seems to assume a finite and known in advance number of seats?
> I'm not well aware of what the seats are or how that's all supposed to
> work, but this sounds strange to me.
>
>
On theme point of view, I can't see how this could be any different.
If you don't know how many seats do you support or which seats would be
supported,
how could you be able to design it?

EDC is pretty much a lot of parts with different states and programas
listening to specific signals-sources and taking an action when it matches.
Everything is hardcoded on EDC files, right?

But nothing stops you to create an UI more dynamic on code.
You could listen to "seat,added,X" and create a random color
to represent it. Then when you receive "mouse,over,X" for specific parts,
you could change their colors, images, emit different sounds or whatever
that makes sense for you.



> Maybe someone can enlighten me? Why would the theme know the number of
> seats?
> (the approach probably makes perfect sense but i'm not sure what edje
> should do wrt. seats)
>

I can see two different use cases here:

1) you're developing an specific product and you know the limit of seats
that is supported.

When you're writing a game for a console you know that you support 2, or 4
different players,
and know how to interact with each controller, right?

In this case you just have multiple states for EDC parts to represent which
seat is interacting
with it and programs for that.

2) you're developing a program that could handle as many seats as the user
want to add

You'll need to modify your UI in a programmatic way, changing Edje parts
with the API or
sending custom signals or messages for your theme.

I'll create an example exercising this idea. Indeed edje_multiseat example
just cover
the first scenario. Maybe some challenges (and consequently, improvements
on Edje)
may come from this.

Thanks


>
>
> TIA,
>
>
> On 4 December 2016 at 10:58, Carsten Haitzler <[email protected]>
> wrote:
>
> > On Sat, 03 Dec 2016 15:24:17 +0000 Gustavo Sverzut Barbieri
> > <[email protected]> said:
> >
> > > Just seat1, seat2...
> > >
> > > That's what I said we found unusable to get "bob", "jane" in EDC.
> > >
> > > In C you could snprintf() and add signals, or register with ",*" and
> then
> > > parse, BUT that's only in C or bindings, not EDC/Embryo since in a
> > > script/program you can't know the signal that triggered you.
> > >
> > > In C you can retrieve bob from seat1, seat1 from bob and map
> accordingly.
> >
> > ok. so edje will stick to simple seat1, seat2 etc. ok. sensible.
> >
> > > From edc point of view, you can only write theme based on something you
> > > know. Like assign focus color red to seat1, green to seat2, blue to
> > seat3.
> > > If you get bob, you can't figure it out since it is dependent on the
> > system
> > > configuration.
> >
> > yeah. unless the app emits these signals specifically as part of the edje
> > <->
> > app "interface".
> >
> > > Em sáb, 3 de dez de 2016 às 01:20, Carsten Haitzler <
> > [email protected]>
> > > escreveu:
> > >
> > > > On Fri, 2 Dec 2016 14:54:20 -0200 Bruno Dilly <[email protected]
> >
> > > > said:
> > > >
> > > > > Hi folks,
> > > > >
> > > > > now that multiseat is supported up to Evas, we’re working on Edje.
> > > > >
> > > > > The idea is that a developer would be able to implement an UI that
> > > > > may be used by more than one single seat, properly handling focus,
> > > > > and providing different feedback for different seats action.
> > > > >
> > > > > Let’s say, different colors on focus, different images when
> different
> > > > > seat pointers are over, etc.
> > > > >
> > > > > I’ve done an initial implementation and wrote an example. It’s
> > available
> > > > > on my branch devs/bdilly/edje_multiseat . There you’ll be able to
> > find
> > > > > edje_multiseat example (C code + EDC).
> > > > >
> > > > > To make this possible, a few main changes were done:
> > > > >   *  New signals were added, adding the seat as suffix. So
> “mouse,in”
> > > > would
> > > > > be still be emitted, but also “mouse,in,seat1”, for example
> > > > >   * Real Parts now may be focused by multiple seats
> > > > >   * Some actions receive an optional seat parameter. For instance,
> > > > > FOCUS_SET may receive the seat name, or it will consider it's about
> > the
> > > > > default seat.
> > > > >    * Since Evas seat devices may have arbitrary names (at least
> using
> > > > > wayland backend you can name them as you want using udev rules), or
> > set
> > > > > them on programmatic ways, Edje will have custom names for seats,
> > > > following
> > > > > a well established pattern. So first announced seat will be named
> > > > “seat1”,
> > > > > the second “seat2”... If an application supports three seats, on
> EDC
> > you
> > > > > know what signals you should expect. It makes it possible to write
> > > > general
> > > > > applications (in the sense of not knowing exactly seats
> beforehand).
> > But
> > > > > let’s say it’s not the case. there is a specific product built in a
> > way
> > > > > that they know exactly which seats are supported and configured
> their
> > > > > names, or want to check if this seat has pointer, keyboard, or
> > whatever…
> > > > > for this cases, Edje also emits signals saying when devices were
> > added
> > > > (or
> > > > > removed) and their names. With these names you can use a new Edje
> > > > function
> > > > > to fetch the Evas device named as “seat1”.
> > > > >
> > > > > Please let me know about any suggestions or concerns.
> > > > >
> > > > > I should make a pull request with this initial patchset soon
> > > >
> > > > wait... so seats can be named... udev rules. so lets say i have
> seats:
> > > >
> > > > bob
> > > > jane
> > > >
> > > > i get signals like:
> > > >
> > > > mouse,in,bob
> > > > mouse,out,jane
> > > >
> > > > right?
> > > >
> > > > so i ALSO get
> > > >
> > > > mouse,in,seat1
> > > > mouse,out,seat2
> > > >
> > > > ? so i can write specific seat name handling signal stuff AND also
> have
> > > > generic? or... ?
> > > >
> > > > --
> > > > ------------- Codito, ergo sum - "I code, therefore I am"
> > --------------
> > > > The Rasterman (Carsten Haitzler)    [email protected]
> > > >
> > > >
> > > >
> > > > ------------------------------------------------------------
> > ------------------
> > > > Check out the vibrant tech community on one of the world's most
> > > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > > _______________________________________________
> > > > enlightenment-devel mailing list
> > > > [email protected]
> > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > >
> > > ------------------------------------------------------------
> > ------------------
> > > Check out the vibrant tech community on one of the world's most
> > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > _______________________________________________
> > > enlightenment-devel mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> >
> > --
> > ------------- Codito, ergo sum - "I code, therefore I am" --------------
> > The Rasterman (Carsten Haitzler)    [email protected]
> >
> >
> > ------------------------------------------------------------
> > ------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > _______________________________________________
> > enlightenment-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
>
>
>
> --
> Jean-Philippe André
> ------------------------------------------------------------
> ------------------
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>



-- 
Bruno Dilly
ProFUSION embedded systems
http://profusion.mobi
------------------------------------------------------------------------------
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to