<!-- SPDX-License-Identifier: MIT OR LGPL-2.0-or-later -->
<!-- SPDX-FileCopyrightText: 2021 Andy Holmes <andyholmes@gnome.org> -->
<interface>
  <!-- Template

    * class: must be the `GTypeName` given in the class definition, or the
      class name prefixed with `Gjs_` if not given (eg `Gjs_ExampleWinow`)
    * parent: the GType name of the derived class

    -->
  <template class="ExampleWindow" parent="GtkWindow">
    <property name="default-width">480</property>
    <property name="default-height">320</property>
    <child>
      <object class="GtkBox" id="box">
        <property name="visible">True</property>
        <child>
          <object class="GtkButton" id="button">
            <property name="label">Button</property>
            <property name="halign">center</property>
            <property name="hexpand">True</property>
            <property name="valign">center</property>
            <property name="visible">True</property>

            <!-- Signals

              * name: the signal name
              * handler: the name of method on the subclass to call when emitted
              * swapped: must always be "no" in GJS applications
              * object: the object bound to `this` in the callback. This is
                usually the template class (eg. `ExampleClass`) but may also be
                an object ID (eg. `box` or `button`).

              -->
            <signal name="clicked"
                    handler="_onButtonClicked"
                    swapped="no"
                    object="ExampleWindow"/>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>
