From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30786 invoked by alias); 20 Jun 2003 23:54:06 -0000 Mailing-List: contact guile-gtk-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: guile-gtk-owner@sources.redhat.com Received: (qmail 30487 invoked from network); 20 Jun 2003 23:54:04 -0000 Received: from unknown (HELO snoopy.pacific.net.au) (61.8.0.36) by sources.redhat.com with SMTP; 20 Jun 2003 23:54:04 -0000 Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.3) with ESMTP id h5KNs2Yd002022 for ; Sat, 21 Jun 2003 09:54:03 +1000 Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h5KNs2Qg004361 for ; Sat, 21 Jun 2003 09:54:02 +1000 (EST) Received: from localhost (ppp78.dyn228.pacific.net.au [203.143.228.78]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h5KNs0nh005681 for ; Sat, 21 Jun 2003 09:54:01 +1000 (EST) Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19TVhR-0000wW-00; Sat, 21 Jun 2003 09:53:45 +1000 To: guile-gtk@sources.redhat.com Subject: sgtk_timestamp returns (was: Added a bunch of GDK routines.) References: From: Kevin Ryde Mail-Copies-To: never Date: Fri, 20 Jun 2003 23:54:00 -0000 Message-ID: <87znkctiev.fsf@zip.com.au> User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2003-q2/txt/msg00148.txt.bz2 --=-=-= Content-length: 1302 Marko Rauhamaa writes: > > - gdk-1.2.defs and guile-gtk.h: Added a new auxiliary data type > sgtk_timestamp, which is typedef'ed from guint32; that way > 'current-time can be specified symbolically in scheme code. I believe this change has broken gdk-event-time and gdk-event-get-time. The reason for naming things in the ChangeLog is so it's not a matter of guesswork whey they were last touched. Any change to working code also needs to be actually run to see it has the desired effect. The following program exhibits the problem. Moving the mouse over the resulting window produces an error popup from the default trampoline about enum->symbol in gdk-event-time. (use-modules (gtk gtk) (gtk gdk)) (define w (gtk-window-new 'toplevel)) (gtk-widget-add-events w '(pointer-motion-mask)) (gtk-signal-connect w "motion_notify_event" (lambda (event) (gdk-event-time event))) (gtk-widget-show-all w) (gtk-main) I propose to make the following, * gdk-1.2.defs (gdk_event_get_time, gdk_event_time): Revert change by Marko to return sgtk_timestamp, it doesn't work for arbitrary time values. Go back to return plain uint. --=-=-= Content-Disposition: attachment; filename=gdk-1.2.defs.timestamp-return.diff Content-length: 736 --- gdk-1.2.defs.~1.34.~ 2003-06-19 11:00:16.000000000 +1000 +++ gdk-1.2.defs 2003-06-20 18:32:23.000000000 +1000 @@ -23,6 +23,10 @@ ;;; Gdk enums +;; Note that sgtk_timestamp cannot be used for a timestamp return value, +;; since an of course an actual timestamp value is an arbitrary number, not +;; merely the value here. +;; (define-enum sgtk_timestamp (current-time GDK_CURRENT_TIME)) @@ -1493,7 +1497,7 @@ ((GdkEvent event))) (define-func gdk_event_get_time - sgtk_timestamp + uint ((GdkEvent event))) (define-func gdk_event_send_client_message_interp @@ -1545,7 +1549,7 @@ ((GdkEvent event))) (define-func gdk_event_time - sgtk_timestamp + uint ((GdkEvent event))) (define-func gdk_event_x --=-=-=--