From: Kevin Ryde <user42@zip.com.au>
To: guile-gtk@sources.redhat.com
Subject: sgtk_timestamp returns (was: Added a bunch of GDK routines.)
Date: Fri, 20 Jun 2003 23:54:00 -0000 [thread overview]
Message-ID: <87znkctiev.fsf@zip.com.au> (raw)
In-Reply-To: <m33cjyxi3p.fsf@lumo.pacujo.net>
[-- Attachment #1: Type: text/plain, Size: 1302 bytes --]
Marko Rauhamaa <marko@pacujo.net> 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.
[-- Attachment #2: gdk-1.2.defs.timestamp-return.diff --]
[-- Type: text/plain, Size: 736 bytes --]
--- 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
prev parent reply other threads:[~2003-06-20 23:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-02 1:25 Added a bunch of GDK routines Marko Rauhamaa
2003-05-11 23:28 ` Kevin Ryde
2003-05-12 18:06 ` Marko Rauhamaa
2003-05-12 18:56 ` Marko Rauhamaa
2003-06-06 22:23 ` GdkWChar (was: Added a bunch of GDK routines.) Kevin Ryde
2003-06-14 23:58 ` gdk-gc-copy comments " Kevin Ryde
2003-06-20 23:54 ` Kevin Ryde [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87znkctiev.fsf@zip.com.au \
--to=user42@zip.com.au \
--cc=guile-gtk@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).