Re: Gtk Event flow





On 8/8/07, Subramaniam Narayanan <snara broadcom com> wrote:
Hi,

Thanks for the prompt response. My comments are in-line.

Your help is appreciated.

Thanks
- Narayanan

-----Original Message-----
From: Anupama Chandwani [mailto: anupama chandwani gmail com]
Sent: Wednesday, August 08, 2007 2:00 AM
To: Subramaniam Narayanan
Cc: gtk-list gnome org
Subject: RE: Gtk Event flow

Hi Narayanan,

Your understanding about the flow of events in directfb is right.
However, ill have to know some specifications about your need before
helping.
1. What is the device from which you are trying to recieve events?
- This is our proprietery development platform running linux. The board
has keys for entering user input. The device driver receives the
keypress events and passes it up to the application layer. At the
application layer, I have a callback function which is called every time
a key is pressed.

2. On what pipe does it write these events for DirectFB?
- The events are written to /dev/usr_input. The callback event provides
the keypad details in the function parameters.


The directfb keyboard thread does not open /dev/user_input. It opens the /dev/input/event0
Maybe that is why the keyboard thread doesnt get called & your changes dont reflect on GUI. Try opening the pipe where you send events in the keyboard thread of directfb. Now this is done in a real hidden place, so u have to scrap a lot..
 

3. You cant use existing input handlers because the pipe they open dont
get your device events?
- I am not using the existing input handlers. I am still using the
inputhandlers/keyboard module for hookup up the device events at the
DirectFB layer. I know I am receiving these events. I think I am also
using the dfb_input_dispatch function to send the event back up.
However, this event is not going to the GTK layer. If there is any other
place I should add some print messages let me know.


Add your printfs in the keyboard thread in the while loop that does the read. Also before whichever dfb_input_dispatch() you think is getting called. Or u can also add it inside dfb_input_dispatch(). Once the event reaches here, it should reach GDK.
 

4. Does your callback get events? Add a printf there & c if at all its
getting stuff.
- I have printfs at the callback function. I can receive all the events
from the keys on the device. The trick is to send these events back up
to GTK for processing so that the UI can be updated appropriately. We
are currently using one of the demo applications(buttonbox) that comes
with the GTK download.

Ok, also try using the entry example, so u know wat key is being typed. I mean in text, the buttonbox will simple test button press.


--
Anupama Chandwani

Celunite Soft Systems
Middleware Team
Pune, INDIA - 411 00
Tel: 020-40179797 (ext# 776)
Fax: 020- 40046440

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