How to Create Clutter events with GJS
Asked Answered
I

1

1

I will receive {x,y} data from the network corresponding to a pixel coordinate.

I would like to create clutter event or at least inform the system (clutter stage) there is a mouse move to the received {x,y} data.

I had a look on the unofficial GJS documentation: http://www.roojs.com/seed/gir-1.2-gtk-3.0/seed/Clutter.Event.html

ev = new Clutter.Event(); // or Clutter.Event(Clutter.TouchEvent) are not working
Inbreeding answered 22/1, 2016 at 13:15 Comment(1)
That is not the unofficial GJS documentation: that's the unofficial Seed documentation, and Seed is unmaintained and pretty much abandoned.Hays
H
2

You cannot create events in GJS, because the ClutterEvent data structure is not really introspectable, for a bunch of historical reasons.

On top of that, creating ClutterEvents is not something you should do; events come from the windowing system, and you cannot just synthesize them on client-side code and expect Clutter to actually work as usual.

Hays answered 22/1, 2016 at 19:33 Comment(2)
Can i create a virtual input device, and then push x,y in it ? GJS or C ?Inbreeding
No, you can't do that in either language.Hays

© 2022 - 2024 — McMap. All rights reserved.