guile-gtk-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Death of -glib, Life of -platform


From: Jan Nieuwenhuizen
Subject: Re: Death of -glib, Life of -platform
Date: Wed, 15 Sep 2004 12:46:35 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Andy Wingo writes:

Andy,

> If you could figure out what's missing in my libgnomecanvas--release--0
> branch, that would be really helpful. I want to see the canvas
> working :)

This patch below should hopefully get you going.  It's untested,
I haven't figured out how to pull a working tree yet %-/


Greetings,
Jan.


* looking for address@hidden/guile-gnome-libgnomecanvas--release--0--patch-1 to 
compare with
* comparing to address@hidden/guile-gnome-libgnomecanvas--release--0--patch-1
M  gnome/overrides/libgnomecanvas.defs
M  examples/canvas.scm
M  gnome/Makefile.am

* modified files

--- orig/examples/canvas.scm
+++ mod/examples/canvas.scm
@@ -68,7 +68,10 @@
     
       (for-each (lambda (item)
                  (move item -40 20)
-                 (affine-relative item output-scale 0 0 output-scale 0 0))
+
+                 ;; FIXME affine overrides are broken
+                 ;; (affine-relative item output-scale 0 0 output-scale 0 0))
+                  )
        (list line line-2)))
 
     (add vbox button)
@@ -78,7 +81,8 @@
     (gtype-instance-signal-connect window 'key-press-event key-press-event)
     
     (set-size-request button canvas-width 20)
-    (set-child-packing vbox button #f #f 0 'end)
+    ;; FIXME -- parameter '0' now broken?
+    ;; (set-child-packing vbox button #f #f 0 'end)
     (set-size-request canvas canvas-width canvas-height)
     
     (show-all window)


--- orig/gnome/Makefile.am
+++ mod/gnome/Makefile.am
@@ -2,10 +2,10 @@
 
 SUBDIRS = overrides
 
-guilegwmodule_DATA = 
+guilemodule_DATA = 
 
 if HAVE_CANVAS
-guilegwmodule_DATA += canvas.scm
+guilemodule_DATA += canvas.scm
 SUBDIRS += gw
 endif
 


--- orig/gnome/overrides/libgnomecanvas.defs
+++ mod/gnome/overrides/libgnomecanvas.defs
@@ -1,63 +1,72 @@
-;; -*- scheme -*-
-;; guile-gnome
-;; Copyright (C) 2003,2004 Andy Wingo <wingo at pobox dot com>
-
-;; This program is free software; you can redistribute it and/or    
-;; modify it under the terms of the GNU General Public License as   
-;; published by the Free Software Foundation; either version 2 of   
-;; the License, or (at your option) any later version.              
-;;                                                                  
-;; This program is distributed in the hope that it will be useful,  
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of   
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    
-;; GNU General Public License for more details.                     
-;;                                                                  
-;; You should have received a copy of the GNU General Public License
-;; along with this program; if not, contact:
-;;
-;; Free Software Foundation           Voice:  +1-617-542-5942
-;; 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
-;; Boston, MA  02111-1307,  USA       address@hidden
-
-;;; Commentary:
-;;
-;;Custom wrapper definitions.
-;;
-;;; Code:
-
-(ignore-glob  "*_get_type"
-              "_*"
-              "*_ref"
-              "*_unref"
-              "*_copy"
-              "*_free"
-              "*_newv"
-              "*_valist"
-              "*_setv"
-              "*_foreach"
-              "*_valist"
-
-              ;; only used by item implementations
-              "gnome_canvas_request_redraw*"
-
-              ;; don't deal with those yet
-              "*_svp"
-              "*_svp_*"
-              )
-
-
-
-(ignore "gnome_canvas_item_affine_relative" ;; don't deal with these affines 
yet
-        "gnome_canvas_item_affine_absolute"
-        "gnome_canvas_item_i2w_affine"
-        "gnome_canvas_item_i2c_affine"
-        "gnome_canvas_w2c_affine"
-
-        ;; only for use by item implementations
-        "gnome_canvas_item_request_update"
-        "gnome_canvas_set_stipple_origin"
-
-        ;; these use Art types, don't deal with them yet
-        "gnome_canvas_cap_gdk_to_art"
-        "gnome_canvas_join_gdk_to_art"
-        )
+;;;; -*- scheme -*-
+;;;; guile-gnome
+;;;; Copyright (C) 2004 Jan Nieuwenhuizen <address@hidden>
+;;;;                    Andy Wingo <wingo at pobox dot com>
+
+;;;; This program is free software; you can redistribute it and/or
+;;;; modify it under the terms of the GNU General Public License as
+;;;; published by the Free Software Foundation; either version 2 of
+;;;; the License, or (at your option) any later version.
+;;;;
+;;;; This program is distributed in the hope that it will be useful,
+;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;; GNU General Public License for more details.
+;;;;
+;;;; You should have received a copy of the GNU General Public License
+;;;; along with this program; if not, contact:
+;;;;
+;;;; Free Software Foundation           Voice:  +1-617-542-5942
+;;;; 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
+;;;; Boston, MA  02111-1307,  USA       address@hidden
+
+
+;; I'm not sure this wrapping for affine funtctions is the Right Way,
+;; but it works.  Maybe we should have a plain affine maker: double[6]
+;; list_to_affine (SCM) or have affine_absolute take a SCM list
+;; directly?
+(define-method affine_absolute
+  (of-object "GnomeCanvasItem")
+  (c-name "_wrap_gnome_canvas_item_affine_absolute")
+  (overrides "gnome_canvas_item_affine_absolute")
+  (return-type "void")
+  (parameters
+    '("double" "x1")
+    '("double" "y2")
+    '("double" "x2")
+    '("double" "y2")
+    '("double" "x3")
+    '("double" "y3")))
+
+(define-method affine_relative
+  (of-object "GnomeCanvasItem")
+  (c-name "_wrap_gnome_canvas_item_affine_relative")
+  (overrides "gnome_canvas_item_affine_relative")
+  (return-type "void")
+  (parameters
+    '("double" "x1")
+    '("double" "y2")
+    '("double" "x2")
+    '("double" "y2")
+    '("double" "x3")
+    '("double" "y3")))
+
+(ignore-glob
+ ;; _get_type is needed/useful for the canvas, why ignore those?
+ ;;"*_get_type"
+ "_*"
+ "*_ref"
+ "*_unref"
+ "*_copy"
+ "*_free"
+ "*_newv"
+ "*_setv"
+ "*_foreach"
+ ;; "*_affine*"  this removes the overridden _wrap methods now too --jcn
+ "*i2c_affine*"
+ "*i2w_affine*"
+ "*w2c_affine*"
+ "*gdk_to_art*"
+ ;; It seems that vararg functions are skipped no matter what.
+ ;;"*_valist"
+ )


-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]