[gtk-cffi-cvs] CVS gtk-cffi/gio
CVS User rklochkov
rklochkov at common-lisp.net
Sun Feb 12 17:29:41 UTC 2012
Update of /project/gtk-cffi/cvsroot/gtk-cffi/gio
In directory tiger.common-lisp.net:/tmp/cvs-serv24265/gio
Modified Files:
action-group.lisp application.lisp loadlib.lisp
Log Message:
Changed from cffi to cffi-objects
Dropped GTK-STRING
--- /project/gtk-cffi/cvsroot/gtk-cffi/gio/action-group.lisp 2012/01/25 19:15:08 1.1
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gio/action-group.lisp 2012/02/12 17:29:41 1.2
@@ -10,10 +10,16 @@
(defclass action-group (object) ())
(deffuns action-group
- (has-action :boolean (action-name gtk-string))
+ (has-action :boolean (action-name :string))
(list-actions (string-list :free t))
- (:get action-enabled :boolean (action-name gtk-string)))
-; (:get action-parameter-type variant-type (action-name gtk-string))
-; (:get action-state-type variant-type (action-name gtk-string)))
+ (:get action-enabled :boolean (action-name :string))
+ (:get action-parameter-type variant-type (action-name :string))
+ (:get action-state-type variant-type (action-name :string))
+ (:get action-state-hint variant (action-name :string))
+ (:get action-state variant (action-name :string))
+ (change-action-state :void (action-name :string) (value variant))
+ (activate-action :void (action-name :string) (parameter variant)))
+
+
\ No newline at end of file
--- /project/gtk-cffi/cvsroot/gtk-cffi/gio/application.lisp 2012/01/21 18:37:52 1.1
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gio/application.lisp 2012/02/12 17:29:41 1.2
@@ -7,5 +7,40 @@
(in-package :gio-cffi)
-(defclass application (g-object simple-action-group) ())
+(defclass application (g-object action-group) ())
+(defbitfield application-flags
+ :none :is-service :is-launcher :handles-open :handles-command-line
+ :send-environment :non-unique)
+
+(defcfun g-application-new :pointer
+ (application-id :string) (flags application-flags))
+
+(defslots application
+ application-id :string
+ inactivity-timeout :uint
+ flags application-flags)
+
+(deffuns application
+ (:set action-group pobject)
+ (:get is-registered :boolean)
+ (:get is-remote :boolean)
+ (hold :void)
+ (release :void)
+ (activate :void))
+
+(defcfun g-application-run :void (application pobject)
+ (argc :int) (argv :pointer))
+
+(defgeneric run (application &key params &allow-other-keys)
+ (:method ((application application) &key args)
+ (if args
+ (with-foreign-object (ptr :string (length args))
+ (iter
+ (for i from 0)
+ (for arg in args)
+ (setf (mem-aref ptr :string i) arg))
+ (g-application-run application (length args) ptr))
+ (g-application-run application 0 (null-pointer)))))
+
+; (register :boolean
--- /project/gtk-cffi/cvsroot/gtk-cffi/gio/loadlib.lisp 2012/01/25 19:15:08 1.1
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gio/loadlib.lisp 2012/02/12 17:29:41 1.2
@@ -1,8 +1,7 @@
(in-package #:gio-cffi)
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (define-foreign-library :gio
- (:unix "libgio-2.0.so")
- (:windows "libgio-2.0-0.dll"))
+(define-foreign-library :gio
+ (:unix "libgio-2.0.so")
+ (:windows "libgio-2.0-0.dll"))
- (load-foreign-library :gio))
\ No newline at end of file
+(use-foreign-library :gio)
\ No newline at end of file
More information about the gtk-cffi-cvs
mailing list