Have you looked the gtkdoc that's generated from the new interfaces?

What should I look for exactly? My main worry is

typedef struct
{
	gboolean (*autocomplete_provided)(GeanyDocument *doc, gpointer data);
	void (*autocomplete_perform)(GeanyDocument *doc, gboolean force, gpointer data);
	gboolean (*calltips_provided)(GeanyDocument *doc, gpointer data);
	void (*calltips_show)(GeanyDocument *doc, gboolean force, gpointer data);
	gboolean (*goto_provided)(GeanyDocument *doc, gpointer data);
	gboolean (*goto_perform)(GeanyDocument *doc, gint pos, gboolean definition, gpointer data);
	gboolean (*symbol_highlight_provided)(GeanyDocument *doc, gpointer data);
} PluginExtension;

which in C you would use this way:

static gboolean autocomplete_provided(GeanyDocument *doc, gpointer user_data)
{
}

static void autocomplete_perform(GeanyDocument *doc, gboolean force, gpointer user_data)
{
}

static PluginExtension extension = {
	.autocomplete_provided = autocomplete_provided,
	.autocomplete_perform = autocomplete_perform
};

void plugin_init(G_GNUC_UNUSED GeanyData * data)
{
	plugin_extension_register(&extension, 100, NULL);
}

PluginExtension can also be allocated dynamically which would probably be necessary for other languages. Is such an interface OK for other languages?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/3910/c2173988731@github.com>