public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
From: Mark Seaborn <mseaborn@argonet.co.uk>
To: guile-gtk@sourceware.cygnus.com
Subject: Making gdk-event-area work
Date: Mon, 04 Sep 2000 03:37:00 -0000	[thread overview]
Message-ID: <20000903203713R.mseaborn@argonet.co.uk> (raw)

Here's a patch to make gdk-event-area work.  It doesn't handle the
case when the event isn't an expose event very prettily.
(Incidentally, converting rectangles to pairs of pairs isn't very
nice.  Are there any plans to use a more abstract data type?)


diff -u guile-gtk-0.19/gdk-1.2.defs guile-gtk-0.19-new/gdk-1.2.defs
--- guile-gtk-0.19/gdk-1.2.defs	Tue May 23 13:19:23 2000
+++ guile-gtk-0.19-new/gdk-1.2.defs	Sun Sep  3 18:47:35 2000
@@ -526,9 +526,9 @@
   bool
   ((GdkEvent event)))
 
-;(define-func gdk_event_area
-;  rect
-;  ((GdkEvent event)))
+(define-func gdk_event_area
+  rect
+  ((GdkEvent event)))
 
 (define-func gdk_event_visibility_state
   GdkVisibilityState
diff -u guile-gtk-0.19/gtk-support.c guile-gtk-0.19-new/gtk-support.c
--- guile-gtk-0.19/gtk-support.c	Tue May 23 10:48:16 2000
+++ guile-gtk-0.19-new/gtk-support.c	Sun Sep  3 20:22:59 2000
@@ -121,15 +121,18 @@
   return event->any.send_event;
 }
 
-GdkRectangle *
+GdkRectangle
 gdk_event_area (GdkEvent *event)
 {
   switch (event->any.type)
     {
     case GDK_EXPOSE:
-      return &event->expose.area;
+      return event->expose.area;
     default:
-      return NULL;
+      {
+	GdkRectangle r = { 0, 0, 0, 0 };
+	return r;
+      }
     }
 }
 
diff -u guile-gtk-0.19/guile-gtk.h guile-gtk-0.19-new/guile-gtk.h
--- guile-gtk-0.19/guile-gtk.h	Tue May 16 21:19:52 2000
+++ guile-gtk-0.19-new/guile-gtk.h	Sun Sep  3 20:20:19 2000
@@ -192,7 +192,7 @@
 GdkEventType gdk_event_type (GdkEvent *event);
 GdkWindow *gdk_event_window (GdkEvent *event);
 gboolean gdk_event_send_event (GdkEvent *event);
-GdkRectangle *gdk_event_area (GdkEvent *event);
+GdkRectangle gdk_event_area (GdkEvent *event);
 GdkVisibilityState gdk_event_visibility_state (GdkEvent *event);
 guint32 gdk_event_time (GdkEvent *event);
 gdouble gdk_event_x (GdkEvent *event);


-- 
         Mark Seaborn
   - mseaborn@bigfoot.com - http://members.xoom.com/mseaborn/ -

  A few months in the laboratory often saves several hours at the library.

             reply	other threads:[~2000-09-04  3:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-04  3:37 Mark Seaborn [this message]
2000-09-05 11:41 ` Marius Vollmer
2000-09-06 13:32   ` Mark Seaborn
2000-09-10  7:40     ` Marius Vollmer

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=20000903203713R.mseaborn@argonet.co.uk \
    --to=mseaborn@argonet.co.uk \
    --cc=guile-gtk@sourceware.cygnus.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).