
;; Copyright (C) 2020-2022, 2024 Tommi Höynälänmaa

;; This file is part of Theme-D-Golf.

;; You can redistribute and/or modify this file under the terms of the
;; GNU Lesser General Public License as published by the Free Software
;; Foundation, either version 3 of the License, or (at your option) any
;; later version.

;; This file is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; Lesser General Public License for more details.

;; You should have received a copy of the GNU Lesser General Public
;; License along with this program. If not, see
;; https://www.gnu.org/licenses/.


(define-interface (theme-d-intr support)

  (import (standard-library core))

  (define-foreign-prim-class <pointer>
    (member-pred pointer?))

  (define-foreign-goops-class <gobject>
    (target-name <gobject>))

  (define <g-object> <gobject>)

  ;; (define <g-param> <object>)

  (declare slot-set0! (:simple-proc (<object> <symbol> <object>) <none> nonpure))
  
  (define <signal-handler> (:procedure ((rest <object>)) <object> nonpure))
  
  (declare gtype-instance-signal-connect
    (:simple-proc (<gobject> <symbol> <signal-handler>) <none> nonpure))

  (declare g-irepository-require
    (:simple-proc (<string>) <none> nonpure))
  
  (declare gi-import-by-name
    (:simple-proc (<string> <string>) <none> nonpure))

  (declare gi-import
	   (:simple-proc (<string>) <none> nonpure))

  (define <g-type> <integer>)

  (declare symbol->g-type (:simple-proc (<symbol>) <g-type> pure))

  (declare g-set-prgname (:procedure (<string>) <none> nonpure)))

