Add Blueprint support for action target types
I'd like to have support for action target types like the target="t"
(which stands for uint64
) in the following example:
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<menu id="menubar">
<section>
<item>
<attribute name="label" translatable="true">Use action with parameter type</attribute>
<attribute name="action">win.myaction</attribute>
<attribute name="target" type="t">0</attribute>
</item>
</section>
</menu>
</interface>
The feature doesn't seem to be well documented, but see https://gitlab.gnome.org/GNOME/gtk/blob/276afbca92507ffacf7139555ea909f8f59dcec8/gtk/gtkbuilder-menus.c#L160-L190 for the code in Gtk Builder.