anchor.diff:     (width :accessor width :initarg :width :initform 0)
      (height :accessor height :initarg :height :initform 0)
      (operation :accessor operation :initarg :operation :initform nil)))
  -
  -#|
  -(defclass wl-region ()
  -  ((->region :accessor ->region :initarg :->region :initform nil)
  -   (rects :accessor rects :initarg :rects :initform nil)))
  -|#
   
   (defclass isurface ()
     ((x :accessor x :initarg :x :initform 0.0)
  
positive.code:   (let ((client (find-if (lambda (client)
  			   (cffi:pointer-eq (->client client) client-ptr))
  			 *clients*)))
      ;;(format t "GET-CLIENT! Client found: ~A~%" client)
      (if client
  	client
  	(let ((new-client (make-instance 'wl-client :->client client-ptr)))
  
negative.code:   (wl-resource-get-version (->resource resource)))
  
  (defmacro def-wl-callback (name (client resource &rest args) &body body)
    (let ((client-ptr (gensym "CLIENT-PTR"))
  	(resource-ptr (gensym "RESOURCE-PTR")))
      `(cffi:defcallback ,name :void ((,client-ptr :pointer) (,resource-ptr :pointer) ,@args)
         (let* ((,client (get-client ,client-ptr))
  	      (,resource (find-resource ,client (wl-resource-get-user-data ,resource-ptr))))
  	 ,@body))))
  
  (defmacro def-wl-bind (name (client &rest args) &body body)
    (let ((client-ptr (gensym "RESOURCE-PTR")))
      `(cffi:defcallback ,name :void ((,client-ptr :pointer) ,@args)
         (let* ((,client (get-client ,client-ptr)))
  	 ,@body))))
  
  (defmacro def-wl-delete (name (resource) &body body)
    (let ((resource-ptr (gensym "RESOURCE-PTR")))
      `(cffi:defcallback ,name :void ((,resource-ptr :pointer))
         (let* ((,resource (find-resource-all ,resource-ptr)))
  	 ,@body))))
  