Re: Pointer Warp
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: Carsten Burstedde <c burstedde de>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Pointer Warp
- Date: Thu, 6 Jan 2005 23:28:59 +0100
On Thu, Jan 06, 2005 at 09:37:18PM +0100, Carsten Burstedde wrote:
I am considering writing a little game with gtk/gtkglext. Most part of
the (optionally fullscreen) window is a drawingarea. What can I do to
hide the cursor and get relative mouse events, regardless of window
borders and screen size, like it is possible in sdl or glut?
1. Create an empty cursor with gdk_cursor_new_from_pixmap()
and set it for the widget with
gdk_window_set_cursor(widget->window, empty_cursor).
2. Connect to "motion-notify-event", "button-press-event", or
"button-release-event" signal of the widget and use
event->x, event->y of the event passed to the signal handler
(if I understand wht you want).
Yeti
--
Dynamic IP address is not a crime.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]