;; -*-theme-d-*-

;; Copyright (C) 2025 Tommi Höynälänmaa

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

;; You can redistribute and/or modify this file under the terms of the
;; GNU 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
;; General Public License for more details.

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


(define-interface (intr-gtk4-examples calc2 plugin-ui)


  (import (standard-library core))

  (import (intr-gtk4-examples calc2 plugin-model)
          (intr-gtk4-examples calc2 _intr-imports))


  (define-foreign-goops-class <plugin-root-dialog>
    (target-name <plugin-root-dialog>)
    (superclass <gtk-window>)
    (slots
     (dropdown-index <gtk-drop-down> module module has-init-value pure-ref)
     (button-conf <gtk-button> module module has-init-value pure-ref)
     (button-ok <gtk-button> module module has-init-value pure-ref)))


  (define-foreign-goops-class <plugin-dialog>
    (target-name <plugin-dialog>)
    (superclass <gtk-window>)
    (slots
     (dropdown-plugin <gtk-drop-down> module module has-init-value pure-ref)
     (entry-proc <gtk-entry> module module has-init-value pure-ref)
     (entry-nargs <gtk-entry> module module has-init-value pure-ref)
     (stringlist-plugin <gtk-string-list> module module has-init-value
                        pure-ref)
     (buffer-proc <gtk-entry-buffer> module module has-init-value pure-ref)
     (buffer-nargs <gtk-entry-buffer> module module has-init-value pure-ref)
     (checkbutton-normal-var <gtk-check-button> module module
                             has-init-value pure-ref)
     (checkbutton-ngp <gtk-check-button> module module
                      has-init-value pure-ref)
     (checkbutton-vgp <gtk-check-button> module module
                      has-init-value pure-ref)
     (button-ok <gtk-button> module module has-init-value pure-ref)
     (button-cancel <gtk-button> module module has-init-value pure-ref)))


  (declare-simple-method open-plugin-root-dialog
    (<plugin-model> <gtk-window>) <none> nonpure)


  (declare-simple-method report-load-config-error
    (<object> <gtk-application> (:procedure () <none> nonpure))
    <none> nonpure)


  (declare-simple-method report-save-config-error
    (<object> <gtk-application> (:procedure () <none> nonpure))
    <none> nonpure))


