awesome new plugin for everything. 'text' creates an item for the text you type (=

SVN revision: 45807
This commit is contained in:
Hannes Janetzek 2010-02-02 16:06:42 +00:00
parent be5679a2a2
commit e609c39dbc
2 changed files with 59 additions and 0 deletions

View File

@ -62,4 +62,11 @@ evry_plug_aspell_la_LIBADD = @e_libs@ ../libfoo.la
evry_plug_aspell_la_LDFLAGS = -no-undefined -module -avoid-version
evry_plug_aspell_la_LIBTOOLFLAGS = --tag=disable-static
evry_plug_textdir = $(plugindir)
evry_plug_text_LTLIBRARIES = evry_plug_text.la
evry_plug_text_la_SOURCES = evry_plug_text.c
evry_plug_text_la_LIBADD = @e_libs@ ../libfoo.la
evry_plug_text_la_LDFLAGS = -no-undefined -module -avoid-version
evry_plug_text_la_LIBTOOLFLAGS = --tag=disable-static

View File

@ -0,0 +1,52 @@
#include "Evry.h"
static Evry_Plugin *p1;
static Evry_Plugin *p2;
static void
_cleanup(Evry_Plugin *p)
{
EVRY_PLUGIN_ITEMS_FREE(p);
}
static int
_fetch(Evry_Plugin *p, const char *input)
{
Evry_Item *it;
EVRY_PLUGIN_ITEMS_FREE(p);
it = evry_item_new(NULL, p, input, NULL);
EVRY_PLUGIN_ITEM_APPEND(p, it);
return 1;
}
static Eina_Bool
_init(void)
{
p1 = evry_plugin_new(NULL, "Text", type_subject, NULL, "TEXT", 1, "accessories-editor", NULL,
NULL, _cleanup, _fetch, NULL, NULL, NULL, NULL);
p2 = evry_plugin_new(NULL, "Text", type_object, NULL, "TEXT", 1, "accessories-editor", NULL,
NULL, _cleanup, _fetch, NULL, NULL, NULL, NULL);
evry_plugin_register(p1, 10);
evry_plugin_register(p2, 10);
return EINA_TRUE;
}
static void
_shutdown(void)
{
EVRY_PLUGIN_FREE(p1);
EVRY_PLUGIN_FREE(p2);
}
EINA_MODULE_INIT(_init);
EINA_MODULE_SHUTDOWN(_shutdown);