chiark / gitweb /
Pixmap API updated
authorespen <espen>
Wed, 7 Jun 2006 13:17:24 +0000 (13:17 +0000)
committerespen <espen>
Wed, 7 Jun 2006 13:17:24 +0000 (13:17 +0000)
gdk/gdk.lisp

index 19d49d158de915573223f11d47b29db8fc3c06aa..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.29 2006-04-26 15:01:05 espen Exp $
+;; $Id: gdk.lisp,v 1.30 2006-06-07 13:17:24 espen Exp $
 
 
 (in-package "GDK")
@@ -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