[Github-comments] [geany] Proxy plugins (#629)

elextr notifications at xxxxx
Fri Sep 25 01:41:09 UTC 2015


> +
> +The next step is to actually register as a proxy plugin. This is done in demoproxy_init().
> +As previously mentioned, it needs a list of accepted file extensions and a set of callback
> +functions.
> +
> + at code{.c}
> +static gboolean demoproxy_init(GeanyPlugin *plugin, gpointer pdata)
> +{
> +	const gchar *extensions[] = { "ini", "px", NULL };
> +
> +	plugin->proxy_funcs->probe  = demoproxy_probe;
> +	plugin->proxy_funcs->load   = demoproxy_load;
> +	plugin->proxy_funcs->unload = demoproxy_unload;
> +
> +	return geany_plugin_register_proxy(plugin, extensions);
> +}

As discussed on IRC [here](http://irc.geany.org/logs/log_20150924.html), while I understand what @b4n means by the API is "funny" I don't think there is a better one that still meets at least some of simple, extendable, typesafe, so I would suggest to just leave it with the current proposal.

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/629/files#r40393400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20150924/71414f5e/attachment.html>


More information about the Github-comments mailing list