Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Developers

HildonAnimationActor and button events

 

 

Maemo developers RSS feed   Index | Next | Previous | View Threaded


hald at icandy

Oct 23, 2009, 1:41 AM

Post #1 of 5 (382 views)
Permalink
HildonAnimationActor and button events

Hi,

the documentation of HildonAnimationActor states that by design it is
not reactive. Meaning that actors do not receive motion or button
events.

The thing is, I want to get notified if someone clicks on my actor, so
how can I do this?

I have a half working solution: I'm using a signal emission hook to
catch all button events that have been emitted. Then I translate the
button press coordinates into coordinates of the main window. With those
coordinates I check whether or not the click was on my actor or not.

The problem is, that the signal is propagated further, so if there is,
for example, a button under my actor it will also receive the button
clicked event. I don't want that. I want that it stops after being
handled by my actor. I tried using g_signal_stop_emission() inside the
signal hook function, but glib tells me that this is not allowed.

I'm really lost here, help would be very much appreciated :)

Thanks!
Conny


_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


apinheiro at igalia

Oct 23, 2009, 4:01 AM

Post #2 of 5 (353 views)
Permalink
Re: HildonAnimationActor and button events [In reply to]

From: Cornelius Hald <hald [at] icandy>

> the documentation of HildonAnimationActor states that by design it is
> not reactive. Meaning that actors do not receive motion or button
> events.
>
> The thing is, I want to get notified if someone clicks on my actor, so
> how can I do this?

Well, as the documentation says, and you have just said, by design
this is not possible.

> I have a half working solution: I'm using a signal emission hook to
> catch all button events that have been emitted. Then I translate the
> button press coordinates into coordinates of the main window. With those
> coordinates I check whether or not the click was on my actor or not.
>
> The problem is, that the signal is propagated further, so if there is,
> for example, a button under my actor it will also receive the button
> clicked event. I don't want that. I want that it stops after being
> handled by my actor. I tried using g_signal_stop_emission() inside the
> signal hook function, but glib tells me that this is not allowed.
>
> I'm really lost here, help would be very much appreciated :)

AFAIK, the real purpose of HildonAnimationActor is just what his name
indicates, a way to introduce animations on the hildon applications
with the help of the window manager, so in fact, it shouldn't be
required the feature you want.

Why do you want to interact with this actor? What do you want to get?

===
API (apinheiro [at] igalia)
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


hald at icandy

Oct 23, 2009, 4:12 AM

Post #3 of 5 (356 views)
Permalink
Re: HildonAnimationActor and button events [In reply to]

Hi and thanks for you answer :)

On Fri, 2009-10-23 at 13:01 +0200, Piñeiro wrote:
> AFAIK, the real purpose of HildonAnimationActor is just what his name
> indicates, a way to introduce animations on the hildon applications
> with the help of the window manager, so in fact, it shouldn't be
> required the feature you want.

I could imagine many use cases where you want to click on something that
is animated. For example a free floating UI element which you want to
drag freely over the main window. Or which automatically moves away from
the cursor, etc...

> Why do you want to interact with this actor? What do you want to get?

I've written a free floating semi transparent button which allows you to
quit the fullscreen mode. It's supposed to behave exactly like in the
browser. Of course I have no idea how they implemented it, but my
implementation does work quite well already.

The only problem is, that if you click this button, not only the
fullscreen mode is toggled, but also the cursor is moved in the
underlaying widget.

Ideas how to implement that without the HildonAnimationActor are welcome
of course. I tried two other ways of realizing this button, but both
failed, so ATM the HildonAnimationActor is my best bet.

Thanks!
Conny



_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


hald at icandy

Oct 23, 2009, 4:52 AM

Post #4 of 5 (355 views)
Permalink
Re: HildonAnimationActor and button events [In reply to]

I think I now know how to do it. Probably I don't even need the
HildonAnimationActor. It should be possible only using cairo and argb
colormap. I'll give it a try later and report back.

Cheers!
Conny


On Fri, 2009-10-23 at 13:12 +0200, Cornelius Hald wrote:
> Hi and thanks for you answer :)
>
> On Fri, 2009-10-23 at 13:01 +0200, Piñeiro wrote:
> > AFAIK, the real purpose of HildonAnimationActor is just what his name
> > indicates, a way to introduce animations on the hildon applications
> > with the help of the window manager, so in fact, it shouldn't be
> > required the feature you want.
>
> I could imagine many use cases where you want to click on something that
> is animated. For example a free floating UI element which you want to
> drag freely over the main window. Or which automatically moves away from
> the cursor, etc...
>
> > Why do you want to interact with this actor? What do you want to get?
>
> I've written a free floating semi transparent button which allows you to
> quit the fullscreen mode. It's supposed to behave exactly like in the
> browser. Of course I have no idea how they implemented it, but my
> implementation does work quite well already.
>
> The only problem is, that if you click this button, not only the
> fullscreen mode is toggled, but also the cursor is moved in the
> underlaying widget.
>
> Ideas how to implement that without the HildonAnimationActor are welcome
> of course. I tried two other ways of realizing this button, but both
> failed, so ATM the HildonAnimationActor is my best bet.
>
> Thanks!
> Conny
>
>
>
> _______________________________________________
> maemo-developers mailing list
> maemo-developers [at] maemo
> https://lists.maemo.org/mailman/listinfo/maemo-developers

_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


hald at icandy

Oct 23, 2009, 8:28 AM

Post #5 of 5 (357 views)
Permalink
Re: HildonAnimationActor and button events [In reply to]

It turned out to be sooooo much easier without HildonAnimationActor. I
was just totally on the wrong track regarding transparency, composition,
clutter, and all.

After spending one night with HildonRemoteTexture and one with
HildonAnimationActor. I'm happy to say that to create a transparent
overlay, you don't need them. Just create a new GtkWindow without
decorations and use the code that Vlad sent earlier to get it
transparent.

Well, looks like I'm still a noob :)

Thanks for all the help!
Conny


On Fri, 2009-10-23 at 13:52 +0200, Cornelius Hald wrote:
> I think I now know how to do it. Probably I don't even need the
> HildonAnimationActor. It should be possible only using cairo and argb
> colormap. I'll give it a try later and report back.
>
> Cheers!
> Conny
>
>
> On Fri, 2009-10-23 at 13:12 +0200, Cornelius Hald wrote:
> > Hi and thanks for you answer :)
> >
> > On Fri, 2009-10-23 at 13:01 +0200, Piñeiro wrote:
> > > AFAIK, the real purpose of HildonAnimationActor is just what his name
> > > indicates, a way to introduce animations on the hildon applications
> > > with the help of the window manager, so in fact, it shouldn't be
> > > required the feature you want.
> >
> > I could imagine many use cases where you want to click on something that
> > is animated. For example a free floating UI element which you want to
> > drag freely over the main window. Or which automatically moves away from
> > the cursor, etc...
> >
> > > Why do you want to interact with this actor? What do you want to get?
> >
> > I've written a free floating semi transparent button which allows you to
> > quit the fullscreen mode. It's supposed to behave exactly like in the
> > browser. Of course I have no idea how they implemented it, but my
> > implementation does work quite well already.
> >
> > The only problem is, that if you click this button, not only the
> > fullscreen mode is toggled, but also the cursor is moved in the
> > underlaying widget.
> >
> > Ideas how to implement that without the HildonAnimationActor are welcome
> > of course. I tried two other ways of realizing this button, but both
> > failed, so ATM the HildonAnimationActor is my best bet.
> >
> > Thanks!
> > Conny
> >
> >
> >
> > _______________________________________________
> > maemo-developers mailing list
> > maemo-developers [at] maemo
> > https://lists.maemo.org/mailman/listinfo/maemo-developers
>
> _______________________________________________
> maemo-developers mailing list
> maemo-developers [at] maemo
> https://lists.maemo.org/mailman/listinfo/maemo-developers

_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers

Maemo developers RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.