Skip to content

Instantly share code, notes, and snippets.

@jasom
Created July 10, 2014 21:39
Show Gist options
  • Save jasom/4cb6f25060fbad96ec08 to your computer and use it in GitHub Desktop.
Save jasom/4cb6f25060fbad96ec08 to your computer and use it in GitHub Desktop.
non-working geany plugin
#include <geany/geanyplugin.h>
GeanyPlugin *geany_plugin;
GeanyData *geany_data;
GeanyFunctions *geany_functions;
PLUGIN_VERSION_CHECK(211)
PLUGIN_SET_INFO("HelloWorld", "Just another tool to say hello world",
"1.0", "John Doe <john.doe@example.org>");
static GtkWidget *main_menu_item = NULL;
static gboolean notify_cb(GObject obj, GeanyEditor *ed, SCNotification *nt, gpointer user_data);
PluginCallback plugin_callbacks[] =
{
{"editor_notify", (GCallback)&notify_cb, TRUE,NULL},
{NULL,NULL,FALSE,NULL}
};
static gboolean notify_cb(GObject obj, GeanyEditor *ed, SCNotification *nt, gpointer user_data)
{
fprintf(stderr,"Code: %d\n",nt->nmhdr.code);
return FALSE;
}
void plugin_init(GeanyData *data)
{
return;
}
void plugin_cleanup(void)
{
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment