* gdk-event accessors
@ 2003-08-05 0:35 Kevin Ryde
0 siblings, 0 replies; only message in thread
From: Kevin Ryde @ 2003-08-05 0:35 UTC (permalink / raw)
To: guile-gtk
[-- Attachment #1: Type: text/plain, Size: 270 bytes --]
FYI, a couple of missing gdkevent field accessor cases,
* gdk-support.c (gdk_event_deviceid): Use proximity.deviceid.
(gdk_event_source): Use proximity.source.
(gdk_event_state): Use crossing.state.
(gdk_event_time): Use crossing.time.
[-- Attachment #2: gdk-support.c.event-accessors.diff --]
[-- Type: text/plain, Size: 1218 bytes --]
--- gdk-support.c.~1.29.~ 2003-08-05 10:20:39.000000000 +1000
+++ gdk-support.c 2003-08-05 10:32:59.000000000 +1000
@@ -299,6 +299,9 @@
case GDK_BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
return event->button.time;
+ case GDK_ENTER_NOTIFY:
+ case GDK_LEAVE_NOTIFY:
+ return event->crossing.time;
case GDK_KEY_PRESS:
case GDK_KEY_RELEASE:
return event->key.time;
@@ -428,6 +431,9 @@
case GDK_BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
return event->button.state;
+ case GDK_ENTER_NOTIFY:
+ case GDK_LEAVE_NOTIFY:
+ return event->crossing.state;
case GDK_KEY_PRESS:
case GDK_KEY_RELEASE:
return event->key.state;
@@ -458,6 +464,9 @@
case GDK_BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
return event->button.source;
+ case GDK_PROXIMITY_IN:
+ case GDK_PROXIMITY_OUT:
+ return event->proximity.source;
default:
return GDK_SOURCE_MOUSE; /* XXX */
}
@@ -474,6 +483,9 @@
case GDK_BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
return event->button.deviceid;
+ case GDK_PROXIMITY_IN:
+ case GDK_PROXIMITY_OUT:
+ return event->proximity.deviceid;
default:
return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-08-05 0:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-05 0:35 gdk-event accessors Kevin Ryde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).