[Geany-Devel] New plugin loader mechanisms

Matthew Brush mbrush at xxxxx
Thu Mar 26 00:27:07 UTC 2015


On 15-03-25 04:22 PM, Thomas Martitz wrote:
> Am 18.03.2015 um 22:55 schrieb Matthew Brush:
>> On 15-03-18 09:42 AM, Thomas Martitz wrote:
>>>
>>> tl;dr <-
>>> Key functions
>>>
>>> gboolean geany_load_module(GeanyPlugin *, GModule *)
>>
>> What is the GModule* for? Is it a .dll that Geany opened on behalf of
>> the plugin based on selection in Plugin Manager?
>
> That's the function exported by native (C/C++) plugins that want to
> register as plugins with Geany. With my proposal that's the only
> function of a plugin that Geany gets through g_module_open(). Since this
> only applies to native shared libraries, the corresponding GModule is
> passed.
>
> This function is similar to libpeas' peas_register_types().
>

Is it where "resident" plugins should register their GTypes similar to Peas?

The main reason I asked about it is because it seems to have the same 
call time, argument and similar return semantics as the existing GModule 
hook `g_module_check_init()`. I get that it passes the plugin struct 
too, and has a more useful name, mostly I was just curious about when to 
use which one.

What is the expected use of the GModule parameter? I'm curious if it's 
useful at all, or just exposing the loader's externals, and maybe 
whether if it's only for special use-case, that it might be better to 
just use `g_module_open(NULL)` in those place(s).

Cheers,
Matthew Brush


More information about the Devel mailing list