X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=gdk%2Fgdk.functions.lisp;h=4acadaf9323931b7b9a5e3aa0a23d61f138c9ed2;hb=5fe17678137c04ece910ae65a35ee58a0c7761c7;hp=96a5bf1aa4c1870d0968ebe27972648793907024;hpb=2194eebc575bb8086bb20ee75bde4488e4a67fda;p=cl-gtk2.git diff --git a/gdk/gdk.functions.lisp b/gdk/gdk.functions.lisp index 96a5bf1..4acadaf 100644 --- a/gdk/gdk.functions.lisp +++ b/gdk/gdk.functions.lisp @@ -26,7 +26,7 @@ (defcfun gdk-gc-set-rgb-fg-color :void (gc (g-object graphics-context)) - (color (g-boxed-ptr color))) + (color (g-boxed-foreign color))) (defcfun gdk-drawable-get-size :void (drawable (g-object drawable)) @@ -53,4 +53,42 @@ (defcfun gdk-atom-intern gdk-atom (name :string) - (only-if-exists :boolean)) \ No newline at end of file + (only-if-exists :boolean)) + +(export 'drawable-size) + +(defcfun gdk-pixbuf-get-from-drawable (g-object pixbuf) + (dest (g-object pixbuf)) + (src (g-object drawable)) + (colormap :pointer) + (src-x :int) + (src-y :int) + (dest-x :int) + (dest-y :int) + (width :int) + (height :int)) + +(defun pixbuf-get-from-drawable (pixbuf drawable &key (src-x 0) (src-y 0) (dest-x 0) (dest-y 0) (width -1) (height -1)) + (gdk-pixbuf-get-from-drawable pixbuf drawable (null-pointer) src-x src-y dest-x dest-y width height)) + +(export 'pixbuf-get-from-drawable) + +(defcfun gdk-pixbuf-savev :boolean + (pixbuf (g-object pixbuf)) + (filename :string) + (type :string) + (option-keys (:pointer (:pointer :char))) + (option-values (:pointer (:pointer :char))) + (error :pointer)) + +(defun pixbuf-save (pixbuf filename type) + (gdk-pixbuf-savev pixbuf + (etypecase filename + (string filename) + (pathname (namestring filename))) + type + (null-pointer) + (null-pointer) + (null-pointer))) + +(export 'pixbuf-save)