[Vala] glade widget bindings



This first-cut xslt will convert a glade file to a private.h file which defines a struct to hold each widget, as well as named index of each widget into that struct, with a view to automatic widget binding when the glade is loaded.

It also C-quotes the xml too.

Vala might include the header file thus:
[CCode (cheader_filename="phoneui.glade.h")]

The file is generated like this:
xsltproc --path /usr/share/xml/libglade ../widgets.xslt phoneui.glade > phoneui.glade.h

Comments?

Sam

Attachment: widgets.xslt
Description: application/xml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]