forked from enlightenment/enlightenment
parent
0c3b9e3100
commit
b7d24f25cc
|
@ -3,6 +3,9 @@
|
|||
|
||||
#include "e.h"
|
||||
|
||||
#define EVRY_API_VERSION 1
|
||||
|
||||
|
||||
#define EVRY_ACTION_OTHER 0
|
||||
#define EVRY_ACTION_FINISHED 1
|
||||
#define EVRY_ACTION_CONTINUE 2
|
||||
|
@ -313,6 +316,8 @@ EAPI Evry_Action *evry_action_new(const char *name, const char *type_in1,
|
|||
|
||||
EAPI void evry_action_free(Evry_Action *act);
|
||||
|
||||
EAPI int evry_api_version_check(int version);
|
||||
|
||||
typedef struct _Evry_Event_Item_Changed Evry_Event_Item_Changed;
|
||||
|
||||
struct _Evry_Event_Item_Changed
|
||||
|
|
|
@ -247,6 +247,9 @@ _exec_border_cleanup(Evry_Action *act)
|
|||
static Eina_Bool
|
||||
_init(void)
|
||||
{
|
||||
if (!evry_api_version_check(EVRY_API_VERSION))
|
||||
return EINA_FALSE;
|
||||
|
||||
plugin = evry_plugin_new(NULL, "Window Action", type_action, "BORDER", NULL, 0, NULL, NULL,
|
||||
_begin, _cleanup, _fetch, _action, _item_icon_get, NULL, NULL);
|
||||
|
||||
|
|
|
@ -24,6 +24,9 @@ _check_item(Evry_Action *act __UNUSED__, const Evry_Item *it)
|
|||
static Eina_Bool
|
||||
_init(void)
|
||||
{
|
||||
if (!evry_api_version_check(EVRY_API_VERSION))
|
||||
return EINA_FALSE;
|
||||
|
||||
Ecore_X_Window win = ecore_x_window_new(0, 0, 0, 1, 1);
|
||||
if (!win) return EINA_FALSE;
|
||||
|
||||
|
|
|
@ -197,6 +197,9 @@ _action(Evry_Plugin *plugin, const Evry_Item *item)
|
|||
static Eina_Bool
|
||||
_init(void)
|
||||
{
|
||||
if (!evry_api_version_check(EVRY_API_VERSION))
|
||||
return EINA_FALSE;
|
||||
|
||||
plugin = evry_plugin_new(NULL, "Wallpaper", type_action, "FILE", "",
|
||||
0, "preferences-desktop-wallpaper", NULL,
|
||||
_begin, _cleanup, _fetch, _action, _icon_get,
|
||||
|
|
|
@ -370,6 +370,18 @@ _e_mod_menu_add(void *data __UNUSED__, E_Menu *m)
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
EAPI int evry_api_version_check(int version)
|
||||
{
|
||||
if (EVRY_API_VERSION == version)
|
||||
return 1;
|
||||
|
||||
ERR("module API is %d, required is %d", version, EVRY_API_VERSION);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
_evry_cb_plugin_sort(const void *data1, const void *data2)
|
||||
{
|
||||
|
@ -469,6 +481,8 @@ evry_action_free(Evry_Action *act)
|
|||
E_FREE(act);
|
||||
}
|
||||
|
||||
|
||||
/* TODO make int return */
|
||||
void
|
||||
evry_plugin_register(Evry_Plugin *p, int priority)
|
||||
{
|
||||
|
@ -496,6 +510,7 @@ evry_plugin_register(Evry_Plugin *p, int priority)
|
|||
pc->priority = priority ? priority : 100;;
|
||||
|
||||
confs = eina_list_append(confs, pc);
|
||||
/* return NULL */
|
||||
}
|
||||
|
||||
/* if (plugin->trigger && !pc->trigger)
|
||||
|
|
|
@ -719,6 +719,9 @@ _new_app_action(Evry_Action *act)
|
|||
static Eina_Bool
|
||||
_init(void)
|
||||
{
|
||||
if (!evry_api_version_check(EVRY_API_VERSION))
|
||||
return EINA_FALSE;
|
||||
|
||||
p1 = E_NEW(Plugin, 1);
|
||||
evry_plugin_new(EVRY_PLUGIN(p1), "Applications", type_subject, "", "APPLICATION", 0, NULL, NULL,
|
||||
_begin, _cleanup, _fetch, NULL, _icon_get, NULL, NULL);
|
||||
|
|
|
@ -321,6 +321,9 @@ _init(void)
|
|||
{
|
||||
Plugin *p;
|
||||
|
||||
if (!evry_api_version_check(EVRY_API_VERSION))
|
||||
return EINA_FALSE;
|
||||
|
||||
p = E_NEW(Plugin, 1);
|
||||
evry_plugin_new(EVRY_PLUGIN(p), "Spell Checker", type_subject, "", "TEXT", 1,
|
||||
"accessories-dictionary", TRIGGER,
|
||||
|
|
|
@ -237,6 +237,9 @@ _item_icon_get(Evry_Plugin *p __UNUSED__, const Evry_Item *it, Evas *e)
|
|||
static Eina_Bool
|
||||
_init(void)
|
||||
{
|
||||
if (!evry_api_version_check(EVRY_API_VERSION))
|
||||
return EINA_FALSE;
|
||||
|
||||
plugin = evry_plugin_new(NULL, "Windows", type_subject, NULL, "BORDER", 0, NULL, NULL,
|
||||
_begin, _cleanup, _fetch, NULL, _item_icon_get, NULL, NULL);
|
||||
|
||||
|
|
|
@ -221,6 +221,9 @@ _cb_del(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|||
static Eina_Bool
|
||||
_init(void)
|
||||
{
|
||||
if (!evry_api_version_check(EVRY_API_VERSION))
|
||||
return EINA_FALSE;
|
||||
|
||||
p1 = evry_plugin_new(NULL, "Calculator", type_subject, NULL, "TEXT", 1, "accessories-calculator", "=",
|
||||
_begin, _cleanup, _fetch, _action, NULL, NULL, NULL);
|
||||
|
||||
|
|
|
@ -115,6 +115,9 @@ _action(Evry_Action *act)
|
|||
static Eina_Bool
|
||||
_init(void)
|
||||
{
|
||||
if (!evry_api_version_check(EVRY_API_VERSION))
|
||||
return EINA_FALSE;
|
||||
|
||||
p = evry_plugin_new(NULL, "Settings", type_subject, NULL, "E_SETTINGS", 0, NULL, NULL,
|
||||
NULL, _cleanup, _fetch, NULL, _item_icon_get, NULL, NULL);
|
||||
|
||||
|
|
|
@ -466,6 +466,9 @@ _open_term_action(Evry_Action *act)
|
|||
static Eina_Bool
|
||||
_init(void)
|
||||
{
|
||||
if (!evry_api_version_check(EVRY_API_VERSION))
|
||||
return EINA_FALSE;
|
||||
|
||||
p1 = evry_plugin_new(NULL, "Files", type_subject, "FILE", "FILE", 0, NULL, NULL,
|
||||
_begin, _cleanup, _fetch, NULL, _icon_get,
|
||||
NULL, NULL);
|
||||
|
|
|
@ -33,6 +33,9 @@ _fetch(Evry_Plugin *p, const char *input)
|
|||
static Eina_Bool
|
||||
_init(void)
|
||||
{
|
||||
if (!evry_api_version_check(EVRY_API_VERSION))
|
||||
return EINA_FALSE;
|
||||
|
||||
p1 = evry_plugin_new(NULL, "Text", type_subject, NULL, "TEXT", 1, "accessories-text-editor", NULL,
|
||||
NULL, _cleanup, _fetch, NULL, NULL, NULL, NULL);
|
||||
|
||||
|
|
|
@ -235,6 +235,9 @@ _view_destroy(Evry_View *view)
|
|||
static Eina_Bool
|
||||
_init(void)
|
||||
{
|
||||
if (!evry_api_version_check(EVRY_API_VERSION))
|
||||
return EINA_FALSE;
|
||||
|
||||
view = E_NEW(Evry_View, 1);
|
||||
view->id = view;
|
||||
view->name = "Image Viewer";
|
||||
|
|
|
@ -109,6 +109,9 @@ _view_destroy(Evry_View *v)
|
|||
static Eina_Bool
|
||||
_init(void)
|
||||
{
|
||||
if (!evry_api_version_check(EVRY_API_VERSION))
|
||||
return EINA_FALSE;
|
||||
|
||||
view = E_NEW(Evry_View, 1);
|
||||
view->id = view;
|
||||
view->name = "Help";
|
||||
|
|
|
@ -1044,6 +1044,9 @@ _view_destroy(Evry_View *view)
|
|||
static Eina_Bool
|
||||
_init(void)
|
||||
{
|
||||
if (!evry_api_version_check(EVRY_API_VERSION))
|
||||
return EINA_FALSE;
|
||||
|
||||
View *v = E_NEW(View, 1);
|
||||
|
||||
v->view.id = EVRY_VIEW(v);
|
||||
|
|
Loading…
Reference in New Issue