chiark / gitweb /
Pixmap API updated
[clg] / gdk / gdk.lisp
index c17ab6ad010e82c73c60071fb007826ce9f8b7ca..3d1ffe346c36eb3eaa85dc2357cb556b7c561bdc 100644 (file)
@@ -20,7 +20,7 @@
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: gdk.lisp,v 1.28 2006-04-25 22:27:13 espen Exp $
+;; $Id: gdk.lisp,v 1.30 2006-06-07 13:17:24 espen Exp $
 
 
 (in-package "GDK")
@@ -436,7 +436,7 @@ (defmethod allocate-foreign ((cursor cursor) &key source mask fg bg
 (defun ensure-cursor (cursor &rest args)
   (if (typep cursor 'cursor)
       cursor
-    (apply #'make-instance 'cursor :type cursor args)))
+    (apply #'make-instance 'cursor :source cursor args)))
 
 (defbinding %cursor-new-for-display () pointer
   (display display)
@@ -463,12 +463,19 @@ (defbinding %cursor-unref () nil
 
 ;;; Pixmaps
 
-(defbinding pixmap-new (width height depth &key window) pixmap
+(defbinding %pixmap-new () pointer
+  (window (or null window))
   (width int)
   (height int)
-  (depth int)
-  (window (or null window)))
-                                       
+  (depth int))
+
+(defmethod allocate-foreign ((pximap pixmap) &key width height depth window)
+  (%pixmap-new window width height depth))
+
+(defun pixmap-new (width height depth &key window)
+  (warn "PIXMAP-NEW is deprecated, use (make-instance 'pixmap ...) instead")
+  (make-instance 'pixmap :width width :height height :depth depth :window window))
+
 (defbinding %pixmap-colormap-create-from-xpm () pixmap
   (window (or null window))
   (colormap (or null colormap))
@@ -483,6 +490,7 @@ (defbinding %pixmap-colormap-create-from-xpm-d () pixmap
   (color (or null color))
   (data (vector string)))
 
+;; Deprecated, use pixbufs instead
 (defun pixmap-create (source &key color window colormap)
   (let ((window
         (if (not (or window colormap))
@@ -497,9 +505,10 @@ (defun pixmap-create (source &key color window colormap)
       (values pixmap mask))))
 
 
-
 ;;; Color
 
+(defbinding colormap-get-system () colormap)
+
 (defbinding %color-copy () pointer
   (location pointer))
 
@@ -545,7 +554,7 @@ (defun ensure-color (color)
 
 
   
-;;; Drawable -- all the draw- functions are dprecated and will be
+;;; Drawable -- all the draw- functions are deprecated and will be
 ;;; removed, use cairo for drawing instead.
 
 (defbinding drawable-get-size () nil