example-02-application.scm 608 B

123456789101112131415161718192021
  1. (import
  2. (prefix (gi) gi:))
  3. (gi:use-typelibs ("Gio" "2.0"))
  4. ;; Create a new empty <GApplication> using 'make' setting the
  5. ;; application-id parameter
  6. (gi:write (gi:make <GApplication> #:application-id "org.test.test"))
  7. (newline)
  8. ;; Create a new <GApplication> using a constructor procedure
  9. (define ga
  10. (application:new "org.test.test2"
  11. (list->application-flags '(handles-open))))
  12. ;; Modify the flags parameter of <GApplication> via the set-flags
  13. ;; method
  14. (set-flags ga (list->application-flags '(non-unique)))
  15. ;; Query if it is running
  16. (gi:write (get-is-busy? ga))
  17. (newline)
  18. (gi:quit)