Reputation: 1
We know that we can use int 33h (51) in DOS and write functions like resetmouse()
as r.x.ax=0000; int86x(0x33, &r, &r); return r.x.ax
in all applications using DOS interrupts on DOS and Windows. Similarly in gcc in Linux, I am seeking for already built in functions or writing mouse interface in gcc
on Linux. If gcc
provides or any other open software provides these functionality. It is well and good. To make this more precise: I want to select a point to draw a circle or a rectangle etc. and my input will be through mouse clicks.
Upvotes: 0
Views: 988
Reputation: 1784
With linux you grab a pseudo-file (pseudo = fake) which is a raw access to the mouse. It is not recommended to redo what has already been done. You should look at libgpm which supports many kind of pointing devices : http://www.linuxjournal.com/article/4600
Anyway many libraries can handle both mouse and screen access.
You can have a look at svgalib, which offer direct screen functions and mouse grab. But this don't seem be be maintained since 1999 : http://www.svgalib.org/
SDL seems to be a better one as many games are using it : http://www.libsdl.org/
Allegro is a crossplatform "game" library which can also draw and grab mouse : http://alleg.sourceforge.net/
Upvotes: 1