I did some stuff with javascript but you can't get the mouse position with JS, when it is out of the window. The same goes for mouse button events.
It's not a problem that I'm not able todo this with JS, since I should be able todo it with the GUI Toolkit, right?
I am currently using cefglue with GTK#, although I could also use WinForms, since I am not using anything other than the browser window ( no menus, buttons or other gui elements ).
I am not quite sure how to catch mouse events with GTK#.
I tried to catch key events like this ( thought if I get this to work, I should be able to work with mouse events too ):
In the GTK Window I put this:
- Code: Select all
KeyPressEvent += KeyPressHandler;
And the corresponding method KeyPressHandler.
But the method is never called.
I am using the MultiThreadedMessageLoop, so I don't have direct access to the message loop.
Do I have to quit using the MultiThreadedMessageLoop and do my own message loop?
The GTK#'s message loop is also happening internally since
- Code: Select all
Application.Run();
So how am I able to see if a mouse button is pressed ( outside of the window ) ?