How to access ScreenMouseEvent

I need to be able to listen for ScreenMouseEvent so that I can know the absolute position of the mouse in the window manager. The documentation for it suggests that it’s dispatched from SystemTrayIcon but I don’t see anywhere in the documentation or the source code where that happens or any examples of anyone using it. It also appears when I read the actual text of NativeApplication that I don’t even have access to SystemTrayIcon except in Adobe Air. So does this mean that OpenFL provides no way to access the position of the mouse on the screen on normal desktop targets?

No we don’t support his api yet. For windows, I have already started working implementations for both system tray icon and screen mouse position behavior. You can find this in the draft api in the dev branch on gh.

1 Like

Okay thanks that’s good to know. Is there a way for me to just access the hxsdl Window directly? Or to instantiate it myself and have openfl draw to it?

you can draw fairly directly to lime opengl/webgl, but opengl/webgl is not the only possible target backend ( there is cairo, canvas, dom… ). some rough code here:

kitGL experiment has more setup for pure WebGL but the pattern for lime or nme are similar

But you can probably find better stuff. Rainy is the one to follow.

Okay I’ll look into that. The main complication that comes to mind when I think of different ways of embedding something made in openfl is that there needs to be multiple windows. I’ll look into what I can do directly modifying openfl and lime on the C++ side.