From: Dmitry Kalyanov Date: Sun, 11 Oct 2009 18:06:30 +0000 (+0400) Subject: Finish bindings to GtkHsv X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=cd303b627b059813a74a85ed614486fe64ef7d51;p=cl-gtk2.git Finish bindings to GtkHsv --- diff --git a/api.ods b/api.ods index 2d12a77..e74910c 100644 Binary files a/api.ods and b/api.ods differ diff --git a/bugs/issue-81334381f6a1febaf00a4374413bb963a3338708.yaml b/bugs/issue-81334381f6a1febaf00a4374413bb963a3338708.yaml index 2c41c99..7234f63 100644 --- a/bugs/issue-81334381f6a1febaf00a4374413bb963a3338708.yaml +++ b/bugs/issue-81334381f6a1febaf00a4374413bb963a3338708.yaml @@ -5,8 +5,8 @@ type: :task component: cl-gtk2 release: "0.1" reporter: Kalyanov Dmitry -status: :unstarted -disposition: +status: :closed +disposition: :fixed creation_time: 2009-10-02 23:20:29.355658 Z references: [] @@ -16,3 +16,7 @@ log_events: - Kalyanov Dmitry - created - "" +- - 2009-10-11 18:02:21.852740 Z + - Kalyanov Dmitry + - closed with disposition fixed + - "" diff --git a/gtk/gtk.objects.lisp b/gtk/gtk.objects.lisp index 6ae54f6..1516e70 100644 --- a/gtk/gtk.objects.lisp +++ b/gtk/gtk.objects.lisp @@ -157,3 +157,78 @@ (height :int :initform 0)) (export (boxed-related-symbols 'allocation)) + +(defcfun (h-s-v-set-color "gtk_hsv_set_color") :void + (h-s-v (g-object h-s-v)) + (h :double) + (s :double) + (v :double)) + +(export 'h-s-v-set-color) + +(defcfun gtk-hsv-get-color :void + (h-s-v (g-object h-s-v)) + (h (:pointer :double)) + (s (:pointer :double)) + (v (:pointer :double))) + +(defun h-s-v-get-color (h-s-v) + (with-foreign-objects ((h :double) (s :double) (v :double)) + (gtk-hsv-get-color h-s-v h s v) + (values (mem-ref h :double) (mem-ref s :double) (mem-ref v :double)))) + +(export 'h-s-v-get-color) + +(defcfun (h-s-v-set-metrics "gtk_hsv_set_metrics") :void + (h-s-v (g-object h-s-v)) + (size :int) + (ring-width :int)) + +(export 'h-s-v-set-metrics) + +(defcfun gtk-hsv-get-metrics :void + (h-s-v (g-object h-s-v)) + (size (:pointer :int)) + (ring-width (:pointer :int))) + +(defun h-s-v-get-metrics (h-s-v) + (with-foreign-objects ((size :int) (ring-width :int)) + (gtk-hsv-get-metrics h-s-v size ring-width) + (values (mem-ref size :int) (mem-ref ring-width :int)))) + +(export 'h-s-v-get-metrics) + +(defcfun (h-s-v-is-adjusting "gtk_hsv_is_adjusting") :boolean + (h-s-v (g-object h-s-v))) + +(export 'h-s-v-is-adjusting) + +(defcfun gtk-hsv-to-rgb :void + (h :double) + (s :double) + (v :double) + (r (:pointer :double)) + (g (:pointer :double)) + (b (:pointer :double))) + +(defun h-s-v-to-r-g-b (h s v) + (with-foreign-objects ((r :double) (g :double) (b :double)) + (gtk-hsv-to-rgb h s v r g b) + (values (mem-ref r :double) (mem-ref g :double) (mem-ref b :double)))) + +(export 'h-s-v-to-r-g-b) + +(defcfun gtk-rgb-to-hsv :void + (r :double) + (g :double) + (b :double) + (h (:pointer :double)) + (s (:pointer :double)) + (v (:pointer :double))) + +(defun r-g-b-to-h-s-v (r g b) + (with-foreign-objects ((h :double) (s :double) (v :double)) + (gtk-rgb-to-hsv r g b h s v) + (values (mem-ref h :double) (mem-ref s :double) (mem-ref v :double)))) + +(export 'r-g-b-to-h-s-v)