RE: Gtk Event flow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi Narayanan

sorry to say i don't have any document related to event handling in
directfb.
Also i do not have any idea regarding device drivers.

what i can say is if you want to know about event handling in directfb, you
can go through files like gtk/gtkmain.c --> function
gtk_main_do_event(GdkEvent *event)  --> gtk gets info about events from gdk
through this function, gdk/gdkevents.c  and
gdk/directfb/gdkevents-directfb.c files.

i think device driver will send event to kernel regarding DFB_Down, in turn
kernel will pass DFB_Down to directfb, in turn directfb will pass it to GDK.
So i think you should process the event  at GDK rather than at device
driver. (i think i understood your question well.)


greetings
varun


Subramaniam Narayanan wrote:
> 
> Hi Varun,
> 
> Thanks for the event flow explanation. I have a another question
> regarding this. Do you have a similar event handling documentation at
> the DirectDB level? I need to understand how events are generated and
> handled in the DirectFB level. I am trying to hook up GUI events(like
> up/down/arrow keys) coming from my device to GTK. I cannot use the
> existing input handlers. So far what I am doing is the following:
> 
> *	In keyboard.c file, function driver_open_device, I register my
> custom callback functions with my device driver user level interface
> module. I remove everything else in the function. Similarly, I remove
> the default implementation is functions: river_get_keymap_entry,
> driver_close_device, driver_get_keymap_entry. These functions now just
> return the default DFB_OK return value. 
> *	In my custom handler, I fill a DFBInputEvent local variable,
> evt, with(in this example, the event I want to send to GTK is the down
> keypress): 
> 
> 	evt.key_id = DIKI_DOWN; evt.type = DIET_KEYRELEASE; evt.flags =
> DIEF_KEYCODE | DIEF_KEYID; evt.key_code = DIKS_CURSOR_DOWN;
> 
> *	Now, I call dfb_input_dispatch( inpdevice, &evt );, where
> inpdevice is the CoreInputDevice ptr passed to driver_open_device.
> 
> *	The function dfb_input_dispatch is called and completes without
> issues.
> 
> *	I do not see any change to the UI. For some reason, the event is
> not processed. I expect the UI to change to reflect that down key was
> pressed.
> 
> Is there anything different that I need to do in this flow? What I want
> to do is to simply catch the event coming from my device and pass is to
> GTK for processing. This is my current approach. I am using GTK2.10.12
> and DirectFB-1.0.0 on linux.
> 
> Any help would be appreciated.
> 
> Thanks
> 
> - Narayanan
> 
> 
> _______________________________________________
> gtk-list mailing list
> gtk-list@xxxxxxxxx
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 
> 

-- 
View this message in context: http://www.nabble.com/Gtk-Event-flow-tf4229640.html#a12047060
Sent from the Gtk+ - General mailing list archive at Nabble.com.

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux