From: Dmitry Kalyanov Date: Wed, 25 Feb 2009 12:16:18 +0000 (+0300) Subject: Added g-quark X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=a32d3e1739ea14be23e0ebeb7c5a8b70b9cf4122;p=cl-gtk2.git Added g-quark --- diff --git a/glib/glib.asd b/glib/glib.asd index fba497c..5612f1b 100644 --- a/glib/glib.asd +++ b/glib/glib.asd @@ -6,6 +6,7 @@ (:file "glib.glist") (:file "glib.gstrv") (:file "glib.string") + (:file "glib.quark") (:file "gobject.package") (:file "gobject.structs") (:file "gobject.type") diff --git a/glib/glib.lisp b/glib/glib.lisp index 64415f4..f3788d6 100644 --- a/glib/glib.lisp +++ b/glib/glib.lisp @@ -14,7 +14,8 @@ #:g-malloc #:g-strdup #:g-string - #:gslist)) + #:gslist + #:g-quark)) (in-package :glib) diff --git a/glib/glib.quark.lisp b/glib/glib.quark.lisp new file mode 100644 index 0000000..ba1488b --- /dev/null +++ b/glib/glib.quark.lisp @@ -0,0 +1,20 @@ +(in-package :glib) + +(defctype quark-value-type :uint32) + +(defcfun g-quark-from-string quark-value-type + (string :string)) + +(defcfun g-quark-to-string :string + (quark quark-value-type)) + +(define-foreign-type quark-type () + () + (:actual-type quark-value-type) + (:simple-parser g-quark)) + +(defmethod translate-to-foreign (value (type quark-type)) + (g-quark-from-string value)) + +(defmethod translate-from-foreign (value (type quark-type)) + (g-quark-to-string value)) \ No newline at end of file