[Geany-Devel] My non-C plugin roadmap

Lex Trotman elextr at xxxxx
Mon Mar 30 11:16:21 UTC 2015


Ok, this explains some of what I was asking on the other thread, so
now I can ask the more specific questions below that are the key
points in the confusion.

> with my new loader (no pluxies) it goes like this, and this is *very*
> similar to git master.
>> user opens PM dialog
> 1 Geany calls load_all_plugins(), which calls load_plugins_from_path($path)
> 2 for each $file in $path, Geany checks if the extension is G_MODULE_SUFFIX,
> and calls plugin_new($file, ...)
> 3 plugin_new() calls the plugins's  geany_load_module() (if new-style
> plugin, calls version_check, set_info() for old-style ones)
> 4 geany_load_module() is implemented by the plugin, and registers itself
> with geany_plugin_register()
> < geany_plugin_register() adds the plugin to the plugin list, so that the PM
> can sort and show it
> Now, with pluxies, it is completely the same except for:
> 2* for each $file in $path, Geany calls is_plugin($file)

What is is_plugin()? If its a function in Geany how does it get to
know about new types of plugins without being hard coded?

> which matches
> additional file extensions (as provided by pluxies), it also calls the
> probe() hook to resolve ambiguous files (e.g. .so files, they can be core or
> libpeas plugins)

I'm guessing probe() is a function that looks for something in the .so
that distinguishes if its new or old loader, but what about others?

> 3* plugin_new() calls the load() hook registered by pluxies for the given
> extension. for standard plugins (without proxy) there is a predefined
> plugin_load_so() funtion that gets called instead.

How does the load hook get defined for new types of plugins?

> 4* The load-hook calls geany_plugin_register(), here Geany core and proxies
> work the same way

Where is the geany_plugin_register() defined for a plugin written in a
language that isn't C/C++/Vala that can produce a .so file?

> I designed it such, that the difference between standard plugins and proxied
> plugins is all contained in the load hook. The rest of Geany does not know
> about the difference. This ensures proxied plugins are first class citizens.

Thats the correct target I agree, I just don't understand the design
details yet.


More information about the Devel mailing list