Results 1 to 6 of 6
Hi everyone ,
I've recently installed ubuntu. I'm working on a project for which I have to capture the mouse events.
Also besides capturing the events i have to display ...
- 09-04-2008 #1Just Joined!
- Join Date
- Sep 2008
- Posts
- 9
Mouse event handling in Ubuntu
Hi everyone
,
I've recently installed ubuntu. I'm working on a project for which I have to capture the mouse events.
Also besides capturing the events i have to display a secondary cursor on the screen.
Please i need help as this project holds grave importance in our college curriculum.
I've been researching on this but my efforts have been in vain.
I'm aware that the driver writes to the /dev/input file but i need write a program to do all this.
Any kind of help would be appreciated.
- 09-04-2008 #2Just Joined!
- Join Date
- Sep 2008
- Posts
- 4
To capture the mouse event you could use the XGrabPointer() function from Xlib, but then the mouse events aren't send on to the windows, so then won't react on a mouseclick
more info here:
http://www.tronche.com/gui/x/xlib
Xlib Programming Manual: Pointer Grabbing
- 09-04-2008 #3
This project....what will it be written in...GTK+, qt...etc
- 09-04-2008 #4Just Joined!
- Join Date
- Sep 2008
- Posts
- 9
Mouse event
Thanls for the reply,
It has been told to my project group that a separate cursor is to be created using GTK+2.
After we have displayed the mouse on the screen we are suppose to simply move the cusor or show some events such as a right click.
It would be really helpful of you if you could direct me on how a C code can be written for this.
Any documents or examples would be really helpful
Thank you
- 09-04-2008 #5
Here's a good starting point
GNOME Library
Plus look at the the posting "XLib question", it has some code for dealing with the mouse in GTK+
- 09-08-2008 #6Just Joined!
- Join Date
- Sep 2008
- Posts
- 9
Uinput driver
Hi,
I went through Xlib manual it was quite helpful.
But the project guide has asked us to do it using Uinput driver.
I've gone through Uinput driver but have understood very little of it since i am new to linux.
Can u direct me as to how i've to go about the similar problem using UINPUT driver?
If you could suggest any material or exammples it would really helpful.
Thank you


Reply With Quote