--- /dev/null
+NULL =
+
+check-gtktemplate: $(top_builddir)/compiler/valac
+ G_DEBUG=fatal-warnings $(top_builddir)/compiler/valac \
+ -C \
+ --vapidir $(top_srcdir)/vapi \
+ --pkg gtk+-3.0 \
+ --gresources $(srcdir)/gtktemplate.gresource.xml \
+ $(srcdir)/gtktemplate.vala; \
+ rm -f gtktemplate.c
+
+check: check-gtktemplate
+
+EXTRA_DIST = \
+ gtktemplate.gresource.xml \
+ gtktemplate.ui \
+ gtktemplate.vala \
+ $(NULL)
+
+CLEANFILES = \
+ gtktemplate.c \
+ $(NULL)
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
+<interface>
+ <requires lib="gtk+" version="3.10"/>
+ <template class="GtkTemplateTest" parent="GtkApplicationWindow">
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">GtkTemplate</property>
+ <property name="default_width">300</property>
+ <property name="default_height">200</property>
+ <property name="show_menubar">False</property>
+ <child type="titlebar">
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkButton" id="button0">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked" handler="on_clicked_cb" swapped="yes"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="activate" handler="on_activate_cb" swapped="yes"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface>
--- /dev/null
+[GtkTemplate (ui = "/org/example/gtktemplate.ui")]
+public class GtkTemplate : Gtk.ApplicationWindow {
+ [GtkChild]
+ public Gtk.Button button0;
+
+ [GtkChild (internal = true)]
+ public Gtk.Button button1;
+
+ [GtkCallback]
+ void on_clicked_cb (Gtk.Button button) {
+ }
+
+ [GtkCallback (name = "on_activate_cb")]
+ void on_something_cb (Gtk.Button button) {
+ }
+}