diff -Naur cl-cairo2-latest/cl-cairo2.asd cl-cairo2-ph/cl-cairo2.asd
--- cl-cairo2-latest/cl-cairo2.asd	2007-08-22 18:13:14.000000000 +0200
+++ cl-cairo2-ph/cl-cairo2.asd	2007-12-04 14:11:44.000000000 +0100
@@ -1,3 +1,9 @@
+
+(defpackage #:cl-cairo2-asd
+  (:use :cl :asdf))
+
+(in-package :cl-cairo2-asd)
+
 (defsystem cl-cairo2
   :description "Cairo 1.4 bindings"
   :version "0.3"
@@ -13,9 +19,12 @@
                (:file "text" :depends-on ("context"))
                (:file "transformations" :depends-on ("context"))
 	       (:file "xlib" :depends-on ("context")
-			     :in-order-to ((load-op (feature :unix))
-					   (compile-op (feature :unix))))
+		      :in-order-to ((load-op (feature :unix))
+				    (compile-op (feature :unix))))
 	       (:file "xlib-context" :depends-on ("xlib")
-			     :in-order-to ((load-op (feature :unix))
-					   (compile-op (feature :unix)))))
+		      :in-order-to ((load-op (feature :unix))
+				    (compile-op (feature :unix))))
+	       (:file "gtk-context" :depends-on ("context")
+		      :in-order-to ((load-op (feature :unix))
+				    (compile-op (feature :unix)))))
   :depends-on (:cffi :cl-colors :cl-utilities))
diff -Naur cl-cairo2-latest/cl-cairo2.asd~ cl-cairo2-ph/cl-cairo2.asd~
--- cl-cairo2-latest/cl-cairo2.asd~	1970-01-01 01:00:00.000000000 +0100
+++ cl-cairo2-ph/cl-cairo2.asd~	2007-11-28 18:34:19.000000000 +0100
@@ -0,0 +1,30 @@
+
+(defpackage #:cl-cairo2-asd
+  (:use :cl :asdf))
+
+(in-package :cl-cairo2-asd)
+
+(defsystem cl-cairo2
+  :description "Cairo 1.4 bindings"
+  :version "0.3"
+  :author "Tamas K Papp"
+  :license "GPL"
+  :components (
+               (:file "package")
+               (:file "cairo" :depends-on ("package"))
+  	       (:file "cl-cairo2-swig" :depends-on ("cairo"))
+               (:file "tables" :depends-on ("cl-cairo2-swig"))
+               (:file "surface" :depends-on ("cairo" "tables" "cl-cairo2-swig"))
+               (:file "context" :depends-on ("surface" "tables" "cl-cairo2-swig"))
+               (:file "path" :depends-on ("context"))
+               (:file "text" :depends-on ("context"))
+               (:file "transformations" :depends-on ("context"))
+	       (:file "xlib" :depends-on ("context")
+			     :in-order-to ((load-op (feature :unix))
+					   (compile-op (feature :unix))))
+	       (:file "xlib-context" :depends-on ("xlib")
+			     :in-order-to ((load-op (feature :unix))
+						   (compile-op (feature :unix))))
+	       (:file "gtk-context" :depends-on ("context"))
+               )
+  :depends-on (:cffi :cl-colors :cl-utilities))
diff -Naur cl-cairo2-latest/gtk-context.lisp cl-cairo2-ph/gtk-context.lisp
--- cl-cairo2-latest/gtk-context.lisp	1970-01-01 01:00:00.000000000 +0100
+++ cl-cairo2-ph/gtk-context.lisp	2007-11-28 20:47:42.000000000 +0100
@@ -0,0 +1,40 @@
+(in-package :cl-cairo2)
+
+
+;; library functions to create a gdk-surface 
+
+(define-foreign-library :gdk
+  (cffi-features:unix "libgdk-x11-2.0.so")
+  (cffi-features:windows "libgdk-win32-2.0-0.dll")
+  (cffi-features:darwin "libgdk-win32-2.0-0.dylib"))
+
+(load-foreign-library :gdk)
+(defcfun ("gdk_cairo_create" gdk-cairo-create) :pointer (window :pointer))
+
+
+
+(defclass gtk-context (context)
+  ())
+
+                          
+(defun create-gtk-context (gdk-window)
+  "creates an context to draw on a GTK widget, more precisely on the associated gdk-window.  This
+should only be called from within the expose event.  In cells-gtk, use
+(gtk-adds-widget-window gtk-pointer) to obtain the gdk-window. 'gtk-pointer' is the pointer
+ parameter passed to the expose event handler."
+  (make-instance 'gtk-context
+                 :pointer (gdk-cairo-create gdk-window)))
+
+
+(defmethod destroy ((self gtk-context))
+  (cairo_destroy (slot-value self 'pointer)))
+
+(defmacro with-gtk-context ((context gdk-window) &body body)
+  "Executes body while context is bound to a valid cairo context for gdk-window.  This should only be
+called from within an expose event handler.  In cells-gtk, use (gtk-adds-widget-window gtk-pointer) 
+to obtain the gdk-window. 'gtk-pointer' is the pointer parameter passed to the expose event handler."
+  (with-gensyms (context-pointer)
+    `(let ((,context (create-gtk-context ,gdk-window)))
+       (with-context (,context ,context-pointer)
+         ,@body)
+       (destroy ,context))))
diff -Naur cl-cairo2-latest/package.lisp cl-cairo2-ph/package.lisp
--- cl-cairo2-latest/package.lisp	2007-08-25 14:34:48.000000000 +0200
+++ cl-cairo2-ph/package.lisp	2007-11-28 18:35:27.000000000 +0100
@@ -1,3 +1,4 @@
+
 (defpackage :cl-cairo2
    (:use :common-lisp :cffi :cl-colors :cl-utilities)
    (:export
@@ -51,4 +52,8 @@
 
     ;; xlib-context
 
-    xlib-context xlib-display open-xlib-display create-xlib-context))
+    xlib-context xlib-display open-xlib-display create-xlib-context
+     
+     ;; gtk-context
+     
+     gtk-context create-gtk-context with-gtk-context))
