gi: support GObject based struct