Hello,
I am trying to propagate X11 events, triggered by Xlib, to Evas. In my
application, I have a main event loop which intercepts the X11 events and
forwards the key events to Evas:
while (true) {
XNextEvent(m_display, &event);
if (event.type == KeyPress) {
char* s = XKeysymToString(XKeycodeToKeysym(event.xkey.display,
event.xkey.keycode, 0));
if (s) {
evas_event_feed_key_down(m_canvas, s, s, NULL, NULL, 0, NULL);
}
}
... same for KeyDown ...
}
Then, in my Evas logic I register a key calback to intercept key up and key
down events:
void keyUpCallback(void *data, Evas *e, Evas_Object *obj, void *event_info) {
std::cout << "KEY UP!" << std::endl;
}
evas_object_event_callback_add((Evas_Object*)canvas, EVAS_CALLBACK_KEY_UP,
keyUpCallback, NULL);
However, the callback is never called.
Could you please point out where I am wrong?
On a sidenote, is Evas thread-safe? That is, is it allowed and valid to access
an Evas* and Evas_Object* concurrently?
Kind regards,
John D.
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel