From: espen Date: Wed, 7 Jun 2006 13:17:24 +0000 (+0000) Subject: Pixmap API updated X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/commitdiff_plain/358bbd909c4ddbe95587fe15c30d74ed05a06567 Pixmap API updated --- diff --git a/gdk/gdk.lisp b/gdk/gdk.lisp index 19d49d1..3d1ffe3 100644 --- a/gdk/gdk.lisp +++ b/gdk/gdk.lisp @@ -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