anchor.diff:  ;; Common Lisp bindings for GTK+ v2.0
  -;; Copyright (C) 1999-2000 Espen S. Johnsen <esj@ostud.cs.uit.no>
  +;; Copyright (C) 1999-2001 Espen S. Johnsen <esj@stud.cs.uit.no>
   ;;
   ;; This library is free software; you can redistribute it and/or
   ;; modify it under the terms of the GNU Lesser General Public
  
positive.code: ;; License along with this library; if not, write to the Free Software
  ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  
  ;; $Id: gtkobject.lisp,v 1.8 2001-01-28 14:23:38 espen Exp $
  
  
  (in-package "GTK")
  
  
  ;;;; Initializing
  
  (setf (alien-type-name 'pointer) "gpointer")
  
  
  ;;;; Misc utils
  
  (defun name-to-string (name)
    (substitute #\_ #\- (string-downcase (string name))))
  
  (defun string-to-name (name &optional (package "KEYWORD"))
    (intern (substitute #\- #\_ (string-upcase name)) package))
  
  
  ;;; Argument stuff - to be removed soon
  
negative.code: ;;;; Superclass for the gtk class hierarchy
  
  (eval-when (:compile-toplevel :load-toplevel :execute)
    (init-types-in-library "/opt/gnome/lib/libgtk-x11-1.3.so")
  
    (defclass %object (gobject)
      ()
      (:metaclass gobject-class)
      (:alien-name "GtkObject")))
  
  
  (defmethod shared-initialize ((object %object) names &rest initargs
  			      &key signals)
    (declare (ignore initargs names))
    (call-next-method)
    (%object-sink object)
    (dolist (signal signals)
      (apply #'signal-connect object signal)))
  
  (defmethod initialize-proxy ((object %object) &rest initargs &key location)
    (declare (ignore initargs))
    (call-next-method)
    (%object-sink location))
  
  (defbinding %object-sink () nil
    (object %object))
  
  
  ;;;; Main loop, timeouts and idle functions
  
  (declaim (inline events-pending-p main-iteration))
  
  (defbinding (events-pending-p "gtk_events_pending") () boolean)
  
  (defbinding get-current-event () gdk:event)
  
  (defbinding main-do-event () nil
    (event gdk:event))
  
  (defbinding main () nil)
  
  (defbinding main-level () int)
  
  (defbinding main-quit () nil)
  
  (defbinding main-iteration-do (&optional (blocking t)) boolean
    (blocking boolean))
  
  (defun main-iterate-all (&rest args)
    (declare (ignore args))
    (when (events-pending-p)
      (main-iteration-do nil)
      (main-iterate-all)))
  
  (system:add-fd-handler (gdk:event-poll-fd) :input #'main-iterate-all)
  (setq lisp::*periodic-polling-function* #'main-iterate-all)
  