Re: [Vala] How to use [ModuleInit] and GTypeModule?



في ج، 17-02-2012 عند 07:33 +0800 ، كتب PCMan:
The sample here did not mention GTypeModule and did not contain
[ModuleInit], either.
https://live.gnome.org/Vala/TypeModules

Yes, this page doesn't talk about GTypeModule, it did in the distant
past, but no longer. See an old version here:
https://live.gnome.org/action/recall/Vala/TypeModules?action=recall&rev=5

Though its title is TypeModules, it did not show how to use GTypeModule.
I tried to google for some exmples and found that three is an undocumented
attribute [ModuleInit].
http://swik.net/GNOME/Planet+GNOME/Abderrahim+Kitouni:+Writing+Anjuta+plugins+in+Vala
How to use this correctly? Or should it be used?

It depends on what you want to do: if you want to be able to load
plugins then it is probably better to use libpeas (but you can use
GModule and GTypeModule directly if you want), if on the other hand you
only want to write a plugin, it should be enough to annotate the
function that is called by the plugin loader with [ModuleInit].

HTH,
Abderrahim




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