summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Janetzek <hannes.janetzek@gmail.com>2010-04-10 20:05:57 +0000
committerHannes Janetzek <hannes.janetzek@gmail.com>2010-04-10 20:05:57 +0000
commitc9c75b2420f7dde577db42a33bf66f34f3063e63 (patch)
treef8b182c9db4cb424ed2c8585a194d5cdceb0301f
parent6b520fb445ff112543e8dabd6268e6013d44c26f (diff)
downloadenlightenment-c9c75b2420f7dde577db42a33bf66f34f3063e63.tar.gz
'everything'
- everything plugins are now e-modules. SVN revision: 47895
-rw-r--r--config/standard/e.src56
-rw-r--r--configure.ac24
-rw-r--r--src/modules/Makefile.am33
-rw-r--r--src/modules/everything-apps/Makefile.am30
-rw-r--r--src/modules/everything-apps/e-module.edjbin0 -> 18521 bytes
-rw-r--r--src/modules/everything-apps/e_mod_main.c (renamed from src/modules/everything/sources/evry_plug_apps.c)218
-rw-r--r--src/modules/everything-apps/e_mod_main.h13
-rw-r--r--src/modules/everything-apps/module.desktop.in5
-rw-r--r--src/modules/everything-aspell/Makefile.am30
-rw-r--r--src/modules/everything-aspell/Makefile.in771
-rw-r--r--src/modules/everything-aspell/e-module.edjbin0 -> 18521 bytes
-rw-r--r--src/modules/everything-aspell/e_mod_main.c (renamed from src/modules/everything/sources/evry_plug_aspell.c)90
-rw-r--r--src/modules/everything-aspell/e_mod_main.h13
-rw-r--r--src/modules/everything-aspell/module.desktop.in6
-rw-r--r--src/modules/everything-calc/Makefile.am30
-rw-r--r--src/modules/everything-calc/e-module.edjbin0 -> 18521 bytes
-rw-r--r--src/modules/everything-calc/e_mod_main.c (renamed from src/modules/everything/sources/evry_plug_calc.c)60
-rw-r--r--src/modules/everything-calc/e_mod_main.h13
-rw-r--r--src/modules/everything-calc/module.desktop.in6
-rw-r--r--src/modules/everything-files/Makefile.am30
-rw-r--r--src/modules/everything-files/e-module.edjbin0 -> 18521 bytes
-rw-r--r--src/modules/everything-files/e_mod_main.c (renamed from src/modules/everything/sources/evry_plug_dir_browse.c)84
-rw-r--r--src/modules/everything-files/e_mod_main.h13
-rw-r--r--src/modules/everything-files/evry_plug.c529
-rw-r--r--src/modules/everything-files/module.desktop.in5
-rw-r--r--src/modules/everything-settings/Makefile.am30
-rw-r--r--src/modules/everything-settings/e-module.edjbin0 -> 18521 bytes
-rw-r--r--src/modules/everything-settings/e_mod_main.c (renamed from src/modules/everything/sources/evry_plug_config.c)61
-rw-r--r--src/modules/everything-settings/e_mod_main.h13
-rw-r--r--src/modules/everything-settings/module.desktop.in6
-rw-r--r--src/modules/everything-wallpaper/Makefile.am30
-rw-r--r--src/modules/everything-wallpaper/e-module.edjbin0 -> 18521 bytes
-rw-r--r--src/modules/everything-wallpaper/e_mod_main.c (renamed from src/modules/everything/actions/evry_plug_wallpaper.c)66
-rw-r--r--src/modules/everything-wallpaper/e_mod_main.h13
-rw-r--r--src/modules/everything-wallpaper/module.desktop.in6
-rw-r--r--src/modules/everything-windows/Makefile.am30
-rw-r--r--src/modules/everything-windows/e-module.edjbin0 -> 18521 bytes
-rw-r--r--src/modules/everything-windows/e_mod_main.c570
-rw-r--r--src/modules/everything-windows/e_mod_main.h13
-rw-r--r--src/modules/everything-windows/module.desktop.in6
-rw-r--r--src/modules/everything/Evry.h79
-rw-r--r--src/modules/everything/Makefile.am18
-rw-r--r--src/modules/everything/actions/Makefile.am34
-rw-r--r--src/modules/everything/actions/evry_plug_border_act.c279
-rw-r--r--src/modules/everything/actions/evry_plug_clipboard.c52
-rw-r--r--src/modules/everything/e_mod_main.c91
-rw-r--r--src/modules/everything/e_mod_main.h90
-rw-r--r--src/modules/everything/evry_history.c8
-rw-r--r--src/modules/everything/sources/Makefile.am64
-rw-r--r--src/modules/everything/sources/evry_plug_border.c260
-rw-r--r--src/modules/everything/sources/evry_plug_text.c60
-rw-r--r--src/modules/everything/views/Makefile.am36
-rw-r--r--src/modules/everything/views/evry_plug_preview.c266
-rw-r--r--src/modules/everything/views/evry_plug_view_help.c139
-rw-r--r--src/modules/everything/views/evry_plug_view_thumb.c1087
55 files changed, 2899 insertions, 2567 deletions
diff --git a/config/standard/e.src b/config/standard/e.src
index aad481a1fb..96237e08bc 100644
--- a/config/standard/e.src
+++ b/config/standard/e.src
@@ -476,6 +476,62 @@ group "E_Config" struct {
group "E_Config_Module" struct {
value "name" string: "everything";
value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: -1000;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "everything-files";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "everything-apps";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "everything-calc";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "everything-aspell";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "everything-wallpaper";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "everything-settings";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "everything-windows";
+ value "enabled" uchar: 1;
value "delayed" uchar: 1;
value "priority" int: 0;
}
diff --git a/configure.ac b/configure.ac
index 8b975dd138..9a61d6bc85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -532,6 +532,13 @@ AC_E_OPTIONAL_MODULE([illume], true)
AC_E_OPTIONAL_MODULE([illume2], true)
AC_E_OPTIONAL_MODULE([syscon], true)
AC_E_OPTIONAL_MODULE([everything], true)
+AC_E_OPTIONAL_MODULE([everything-files], true)
+AC_E_OPTIONAL_MODULE([everything-apps], true)
+AC_E_OPTIONAL_MODULE([everything-calc], true)
+AC_E_OPTIONAL_MODULE([everything-aspell], true)
+AC_E_OPTIONAL_MODULE([everything-wallpaper], true)
+AC_E_OPTIONAL_MODULE([everything-settings], true)
+AC_E_OPTIONAL_MODULE([everything-windows], true)
AC_E_OPTIONAL_MODULE([systray], true)
AC_E_OPTIONAL_MODULE([comp], true)
@@ -697,11 +704,22 @@ src/modules/illume2/policies/illume/Makefile
src/modules/syscon/Makefile
src/modules/syscon/module.desktop
src/modules/everything/Makefile
-src/modules/everything/sources/Makefile
-src/modules/everything/actions/Makefile
-src/modules/everything/views/Makefile
src/modules/everything/module.desktop
src/modules/everything/everything.pc
+src/modules/everything-files/Makefile
+src/modules/everything-files/module.desktop
+src/modules/everything-apps/Makefile
+src/modules/everything-apps/module.desktop
+src/modules/everything-windows/Makefile
+src/modules/everything-windows/module.desktop
+src/modules/everything-settings/Makefile
+src/modules/everything-settings/module.desktop
+src/modules/everything-calc/Makefile
+src/modules/everything-calc/module.desktop
+src/modules/everything-aspell/Makefile
+src/modules/everything-aspell/module.desktop
+src/modules/everything-wallpaper/Makefile
+src/modules/everything-wallpaper/module.desktop
src/modules/systray/Makefile
src/modules/systray/module.desktop
src/modules/comp/Makefile
diff --git a/src/modules/Makefile.am b/src/modules/Makefile.am
index 44dba2c261..98bdcd5d33 100644
--- a/src/modules/Makefile.am
+++ b/src/modules/Makefile.am
@@ -258,6 +258,38 @@ if USE_MODULE_EVERYTHING
SUBDIRS += everything
endif
+if USE_MODULE_EVERYTHING_FILES
+SUBDIRS += everything-files
+endif
+
+if USE_MODULE_EVERYTHING_APPS
+SUBDIRS += everything-apps
+endif
+
+if USE_MODULE_EVERYTHING_FILES
+SUBDIRS += everything-calc
+endif
+
+if USE_MODULE_EVERYTHING_ASPELL
+SUBDIRS += everything-aspell
+endif
+
+if USE_MODULE_EVERYTHING_SETTINGS
+SUBDIRS += everything-settings
+endif
+
+if USE_MODULE_EVERYTHING_WALLPAPER
+SUBDIRS += everything-wallpaper
+endif
+
+if USE_MODULE_EVERYTHING_CALC
+SUBDIRS += everything-calc
+endif
+
+if USE_MODULE_EVERYTHING_CALC
+SUBDIRS += everything-windows
+endif
+
if USE_MODULE_SYSTRAY
SUBDIRS += systray
endif
@@ -342,6 +374,7 @@ illume-kbd-toggle \
illume-mode-toggle \
syscon \
everything \
+everything-files \
systray \
comp \
ofono
diff --git a/src/modules/everything-apps/Makefile.am b/src/modules/everything-apps/Makefile.am
new file mode 100644
index 0000000000..3372b3e805
--- /dev/null
+++ b/src/modules/everything-apps/Makefile.am
@@ -0,0 +1,30 @@
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = everything-apps
+
+# data files for the module
+filesdir = $(libdir)/enlightenment/modules/$(MODULE)
+files_DATA = \
+e-module.edj module.desktop
+
+EXTRA_DIST = $(files_DATA)
+
+# the module .so file
+INCLUDES = -I. \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
+ -I$(top_srcdir)/src/bin \
+ -I$(top_srcdir)/src/lib \
+ -I$(top_srcdir)/src/modules \
+ -I$(top_srcdir)/src/modules/everything \
+ @e_cflags@
+pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
+pkg_LTLIBRARIES = module.la
+module_la_SOURCES = e_mod_main.c \
+ e_mod_main.h
+
+module_la_LIBADD = @e_libs@ @dlopen_libs@
+module_la_LDFLAGS = -module -avoid-version
+module_la_DEPENDENCIES = $(top_builddir)/config.h
+
+uninstall:
+ rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)
diff --git a/src/modules/everything-apps/e-module.edj b/src/modules/everything-apps/e-module.edj
new file mode 100644
index 0000000000..e7f2d592d1
--- /dev/null
+++ b/src/modules/everything-apps/e-module.edj
Binary files differ
diff --git a/src/modules/everything/sources/evry_plug_apps.c b/src/modules/everything-apps/e_mod_main.c
index 6b81dee34b..91f962a500 100644
--- a/src/modules/everything/sources/evry_plug_apps.c
+++ b/src/modules/everything-apps/e_mod_main.c
@@ -1,5 +1,9 @@
-#include "e_mod_main.h"
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+#include "Evry.h"
+#include "e_mod_main.h"
typedef struct _Plugin Plugin;
@@ -290,13 +294,13 @@ _item_add(Plugin *p, Efreet_Desktop *desktop, char *file, int match)
if (desktop)
{
- evry_item_new(EVRY_ITEM(app), EVRY_PLUGIN(p), desktop->name, _item_free);
- EVRY_ITEM(app)->id = eina_stringshare_add(desktop->exec);
+ evry_item_new(EVRY_ITEM(app), EVRY_PLUGIN(p), desktop->name, _item_free);
+ EVRY_ITEM(app)->id = eina_stringshare_add(desktop->exec);
}
else
{
- evry_item_new(EVRY_ITEM(app), EVRY_PLUGIN(p), file, _item_free);
- EVRY_ITEM(app)->id = eina_stringshare_add(file);
+ evry_item_new(EVRY_ITEM(app), EVRY_PLUGIN(p), file, _item_free);
+ EVRY_ITEM(app)->id = eina_stringshare_add(file);
}
app->desktop = desktop;
@@ -390,37 +394,37 @@ _cb_sort(const void *data1, const void *data2)
static Eina_Bool
_hist_items_add_cb(const Eina_Hash *hash, const void *key, void *data, void *fdata)
{
- History_Entry *he = data;
- History_Item *hi;
- Plugin *p = fdata;
- Efreet_Desktop *d;
- Eina_List *l;
- Evry_Item_App *app;
-
- EINA_LIST_FOREACH(he->items, l, hi)
- {
- if (hi->plugin != p->base.name)
- continue;
-
- if ((d = efreet_util_desktop_exec_find(key)))
- {
- app = _item_add(p, d, NULL, 1);
- }
- else
- {
- app = _item_add(p, NULL, (char *) key, 1);
- if (app && app->desktop)
- efreet_desktop_ref(app->desktop);
- }
+ History_Entry *he = data;
+ History_Item *hi;
+ Plugin *p = fdata;
+ Efreet_Desktop *d;
+ Eina_List *l;
+ Evry_Item_App *app;
+
+ EINA_LIST_FOREACH(he->items, l, hi)
+ {
+ if (hi->plugin != p->base.name)
+ continue;
+
+ if ((d = efreet_util_desktop_exec_find(key)))
+ {
+ app = _item_add(p, d, NULL, 1);
+ }
+ else
+ {
+ app = _item_add(p, NULL, (char *) key, 1);
+ if (app && app->desktop)
+ efreet_desktop_ref(app->desktop);
+ }
- if (app && app->desktop)
- {
- p->apps_hist = eina_list_append(p->apps_hist, app->desktop);
- }
-
- if (app) break;
- }
- return EINA_TRUE;
+ if (app && app->desktop)
+ {
+ p->apps_hist = eina_list_append(p->apps_hist, app->desktop);
+ }
+
+ if (app) break;
+ }
+ return EINA_TRUE;
}
static int
@@ -731,7 +735,7 @@ _new_app_action(Evry_Action *act)
//#define TIME_FACTOR(_now) (1.0 - (evry_hist->begin / _now)) / 1000000000000000.0
static Eina_Bool
-_init(void)
+module_init(void)
{
if (!evry_api_version_check(EVRY_API_VERSION))
return EINA_FALSE;
@@ -785,56 +789,56 @@ _init(void)
evry_action_register(act5, 5);
/*
- Eina_List *l, *ll;
- const char *file, *name;
- History_Entry *he;
- History_Item *hi;
- name = EVRY_PLUGIN(p1)->name;
- double t;
- int found = 0;
-
- evry_history_load();
+ Eina_List *l, *ll;
+ const char *file, *name;
+ History_Entry *he;
+ History_Item *hi;
+ name = EVRY_PLUGIN(p1)->name;
+ double t;
+ int found = 0;
+
+ evry_history_load();
- EINA_LIST_FOREACH(e_exehist_list_get(), l, file)
+ EINA_LIST_FOREACH(e_exehist_list_get(), l, file)
{
- t = e_exehist_newest_run_get(file);
- he = eina_hash_find(evry_hist->subjects, file);
+ t = e_exehist_newest_run_get(file);
+ he = eina_hash_find(evry_hist->subjects, file);
- if (!he)
- {
- he = E_NEW(History_Entry, 1);
- eina_hash_add(evry_hist->subjects, file, he);
- }
- else
- {
- EINA_LIST_FOREACH(he->items, ll, hi)
- {
- if (hi->plugin != name) continue;
+ if (!he)
+ {
+ he = E_NEW(History_Entry, 1);
+ eina_hash_add(evry_hist->subjects, file, he);
+ }
+ else
+ {
+ EINA_LIST_FOREACH(he->items, ll, hi)
+ {
+ if (hi->plugin != name) continue;
- if (t > hi->last_used - 1.0)
- {
- hi->last_used = t;
- hi->usage += TIME_FACTOR(hi->last_used);
- hi->count = e_exehist_popularity_get(file);
- }
- found = 1;
- break;
- }
+ if (t > hi->last_used - 1.0)
+ {
+ hi->last_used = t;
+ hi->usage += TIME_FACTOR(hi->last_used);
+ hi->count = e_exehist_popularity_get(file);
+ }
+ found = 1;
+ break;
+ }
- }
+ }
- if (!found)
- {
- hi = E_NEW(History_Item, 1);
- hi->plugin = eina_stringshare_ref(name);
- hi->last_used = t;
- hi->count = e_exehist_popularity_get(file);
- hi->usage += TIME_FACTOR(hi->last_used);
- he->items = eina_list_append(he->items, hi);
- }
- found = 0;
+ if (!found)
+ {
+ hi = E_NEW(History_Item, 1);
+ hi->plugin = eina_stringshare_ref(name);
+ hi->last_used = t;
+ hi->count = e_exehist_popularity_get(file);
+ hi->usage += TIME_FACTOR(hi->last_used);
+ he->items = eina_list_append(he->items, hi);
}
- evry_history_unload();
+ found = 0;
+ }
+ evry_history_unload();
*/
/* taken from e_exebuf.c */
exelist_exe_edd = E_CONFIG_DD_NEW("E_Exe", E_Exe);
@@ -855,7 +859,7 @@ _init(void)
}
static void
-_shutdown(void)
+module_shutdown(void)
{
EVRY_PLUGIN_FREE(p1);
EVRY_PLUGIN_FREE(p2);
@@ -871,10 +875,6 @@ _shutdown(void)
E_CONFIG_DD_FREE(exelist_exe_edd);
}
-EINA_MODULE_INIT(_init);
-EINA_MODULE_SHUTDOWN(_shutdown);
-
-
/* taken from e_exebuf.c */
static int
_scan_idler(void *data)
@@ -990,3 +990,53 @@ _scan_idler(void *data)
/* we have mroe scannign to do */
return 1;
}
+
+/***************************************************************************/
+/**/
+/* actual module specifics */
+
+static E_Module *module = NULL;
+static Eina_Bool active = EINA_FALSE;
+
+/***************************************************************************/
+/**/
+/* module setup */
+EAPI E_Module_Api e_modapi =
+{
+ E_MODULE_API_VERSION,
+ "everything-apps"
+};
+
+EAPI void *
+e_modapi_init(E_Module *m)
+{
+ module = m;
+
+ if (e_datastore_get("everything_loaded"))
+ active = module_init();
+
+ e_module_delayed_set(m, 1);
+
+ return m;
+}
+
+EAPI int
+e_modapi_shutdown(E_Module *m)
+{
+ if (active && e_datastore_get("everything_loaded"))
+ module_shutdown();
+
+ module = NULL;
+
+ return 1;
+}
+
+EAPI int
+e_modapi_save(E_Module *m)
+{
+ return 1;
+}
+
+/**/
+/***************************************************************************/
+
diff --git a/src/modules/everything-apps/e_mod_main.h b/src/modules/everything-apps/e_mod_main.h
new file mode 100644
index 0000000000..2eb60362ec
--- /dev/null
+++ b/src/modules/everything-apps/e_mod_main.h
@@ -0,0 +1,13 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+#ifndef E_MOD_MAIN_H
+#define E_MOD_MAIN_H
+
+EAPI extern E_Module_Api e_modapi;
+
+EAPI void *e_modapi_init (E_Module *m);
+EAPI int e_modapi_shutdown (E_Module *m);
+EAPI int e_modapi_save (E_Module *m);
+
+#endif
diff --git a/src/modules/everything-apps/module.desktop.in b/src/modules/everything-apps/module.desktop.in
new file mode 100644
index 0000000000..cd5330c13e
--- /dev/null
+++ b/src/modules/everything-apps/module.desktop.in
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Type=Link
+Name=Everything Applications
+Icon=e-module
+X-Enlightenment-ModuleType=system
diff --git a/src/modules/everything-aspell/Makefile.am b/src/modules/everything-aspell/Makefile.am
new file mode 100644
index 0000000000..1b121c84fd
--- /dev/null
+++ b/src/modules/everything-aspell/Makefile.am
@@ -0,0 +1,30 @@
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = everything-aspell
+
+# data files for the module
+filesdir = $(libdir)/enlightenment/modules/$(MODULE)
+files_DATA = \
+e-module.edj module.desktop
+
+EXTRA_DIST = $(files_DATA)
+
+# the module .so file
+INCLUDES = -I. \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
+ -I$(top_srcdir)/src/bin \
+ -I$(top_srcdir)/src/lib \
+ -I$(top_srcdir)/src/modules \
+ -I$(top_srcdir)/src/modules/everything \
+ @e_cflags@
+pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
+pkg_LTLIBRARIES = module.la
+module_la_SOURCES = e_mod_main.c \
+ e_mod_main.h
+
+module_la_LIBADD = @e_libs@ @dlopen_libs@
+module_la_LDFLAGS = -module -avoid-version
+module_la_DEPENDENCIES = $(top_builddir)/config.h
+
+uninstall:
+ rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)
diff --git a/src/modules/everything-aspell/Makefile.in b/src/modules/everything-aspell/Makefile.in
new file mode 100644
index 0000000000..c8d020d1bc
--- /dev/null
+++ b/src/modules/everything-aspell/Makefile.in
@@ -0,0 +1,771 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/modules/everything-aspell
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/module.desktop.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ac-plugins.m4 \
+ $(top_srcdir)/m4/ac_attribute.m4 \
+ $(top_srcdir)/m4/efl_doxygen.m4 \
+ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/isc-posix.m4 \
+ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = module.desktop
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(filesdir)"
+LTLIBRARIES = $(pkg_LTLIBRARIES)
+am_module_la_OBJECTS = e_mod_main.lo
+module_la_OBJECTS = $(am_module_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(module_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(module_la_SOURCES)
+DIST_SOURCES = $(module_la_SOURCES)
+DATA = $(files_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALL_LINGUAS = @ALL_LINGUAS@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+ALSA_VERSION = @ALSA_VERSION@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BATTERY_CFLAGS = @BATTERY_CFLAGS@
+BATTERY_LDFLAGS = @BATTERY_LDFLAGS@
+BATTERY_LIBS = @BATTERY_LIBS@
+BATTERY_VERSION = @BATTERY_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+EBLUEZ_CFLAGS = @EBLUEZ_CFLAGS@
+EBLUEZ_LIBS = @EBLUEZ_LIBS@
+EBLUEZ_VERSION = @EBLUEZ_VERSION@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ECONNMAN_CFLAGS = @ECONNMAN_CFLAGS@
+ECONNMAN_LIBS = @ECONNMAN_LIBS@
+ECONNMAN_VERSION = @ECONNMAN_VERSION@
+ECORE_IMF_CFLAGS = @ECORE_IMF_CFLAGS@
+ECORE_IMF_LIBS = @ECORE_IMF_LIBS@
+ECORE_IMF_VERSION = @ECORE_IMF_VERSION@
+EDJE_DEF = @EDJE_DEF@
+EET_CFLAGS = @EET_CFLAGS@
+EET_LIBS = @EET_LIBS@
+EGREP = @EGREP@
+EOFONO_CFLAGS = @EOFONO_CFLAGS@
+EOFONO_LIBS = @EOFONO_LIBS@
+EOFONO_VERSION = @EOFONO_VERSION@
+EXCHANGE_CFLAGS = @EXCHANGE_CFLAGS@
+EXCHANGE_LIBS = @EXCHANGE_LIBS@
+EXCHANGE_VERSION = @EXCHANGE_VERSION@
+EXEEXT = @EXEEXT@
+E_CFLAGS = @E_CFLAGS@
+E_FM_CFLAGS = @E_FM_CFLAGS@
+E_FM_LIBS = @E_FM_LIBS@
+E_FM_OPEN_CFLAGS = @E_FM_OPEN_CFLAGS@
+E_FM_OPEN_LIBS = @E_FM_OPEN_LIBS@
+E_FM_OP_CFLAGS = @E_FM_OP_CFLAGS@
+E_FM_OP_LIBS = @E_FM_OP_LIBS@
+E_IMC_CFLAGS = @E_IMC_CFLAGS@
+E_IMC_LIBS = @E_IMC_LIBS@
+E_INIT_CFLAGS = @E_INIT_CFLAGS@
+E_INIT_LIBS = @E_INIT_LIBS@
+E_LIBS = @E_LIBS@
+E_REMOTE_CFLAGS = @E_REMOTE_CFLAGS@
+E_REMOTE_LIBS = @E_REMOTE_LIBS@
+E_SYS_CFLAGS = @E_SYS_CFLAGS@
+E_SYS_LIBS = @E_SYS_LIBS@
+E_THUMB_CFLAGS = @E_THUMB_CFLAGS@
+E_THUMB_LIBS = @E_THUMB_LIBS@
+FGREP = @FGREP@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_ALSA = @HAVE_ALSA@
+HAVE_BATTERY = @HAVE_BATTERY@
+HAVE_EBLUEZ = @HAVE_EBLUEZ@
+HAVE_ECONNMAN = @HAVE_ECONNMAN@
+HAVE_ECORE_IMF = @HAVE_ECORE_IMF@
+HAVE_EOFONO = @HAVE_EOFONO@
+HAVE_EXCHANGE = @HAVE_EXCHANGE@
+HAVE_TEMPERATURE = @HAVE_TEMPERATURE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALE_DIR = @LOCALE_DIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MODULE_ARCH = @MODULE_ARCH@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BIN_DIR = @PACKAGE_BIN_DIR@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_DATA_DIR = @PACKAGE_DATA_DIR@
+PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_SYSCONF_DIR = @PACKAGE_SYSCONF_DIR@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SOUND_CFLAGS = @SOUND_CFLAGS@
+SOUND_LIBS = @SOUND_LIBS@
+STRIP = @STRIP@
+TEMPERATURE_CFLAGS = @TEMPERATURE_CFLAGS@
+TEMPERATURE_LIBS = @TEMPERATURE_LIBS@
+TEMPERATURE_VERSION = @TEMPERATURE_VERSION@
+USE_MODULE_BATTERY = @USE_MODULE_BATTERY@
+USE_MODULE_BLUEZ = @USE_MODULE_BLUEZ@
+USE_MODULE_CLOCK = @USE_MODULE_CLOCK@
+USE_MODULE_COMP = @USE_MODULE_COMP@
+USE_MODULE_CONF = @USE_MODULE_CONF@
+USE_MODULE_CONF_APPLICATIONS = @USE_MODULE_CONF_APPLICATIONS@
+USE_MODULE_CONF_BORDERS = @USE_MODULE_CONF_BORDERS@
+USE_MODULE_CONF_CLIENTLIST = @USE_MODULE_CONF_CLIENTLIST@
+USE_MODULE_CONF_COLORS = @USE_MODULE_CONF_COLORS@
+USE_MODULE_CONF_DESK = @USE_MODULE_CONF_DESK@
+USE_MODULE_CONF_DESKLOCK = @USE_MODULE_CONF_DESKLOCK@
+USE_MODULE_CONF_DESKS = @USE_MODULE_CONF_DESKS@
+USE_MODULE_CONF_DIALOGS = @USE_MODULE_CONF_DIALOGS@
+USE_MODULE_CONF_DISPLAY = @USE_MODULE_CONF_DISPLAY@
+USE_MODULE_CONF_DPMS = @USE_MODULE_CONF_DPMS@
+USE_MODULE_CONF_EDGEBINDINGS = @USE_MODULE_CONF_EDGEBINDINGS@
+USE_MODULE_CONF_ENGINE = @USE_MODULE_CONF_ENGINE@
+USE_MODULE_CONF_EXEBUF = @USE_MODULE_CONF_EXEBUF@
+USE_MODULE_CONF_FONTS = @USE_MODULE_CONF_FONTS@
+USE_MODULE_CONF_ICON_THEME = @USE_MODULE_CONF_ICON_THEME@
+USE_MODULE_CONF_IMC = @USE_MODULE_CONF_IMC@
+USE_MODULE_CONF_INTERACTION = @USE_MODULE_CONF_INTERACTION@
+USE_MODULE_CONF_INTL = @USE_MODULE_CONF_INTL@
+USE_MODULE_CONF_KEYBINDINGS = @USE_MODULE_CONF_KEYBINDINGS@
+USE_MODULE_CONF_MENUS = @USE_MODULE_CONF_MENUS@
+USE_MODULE_CONF_MIME = @USE_MODULE_CONF_MIME@
+USE_MODULE_CONF_MOUSE = @USE_MODULE_CONF_MOUSE@
+USE_MODULE_CONF_MOUSEBINDINGS = @USE_MODULE_CONF_MOUSEBINDINGS@
+USE_MODULE_CONF_MOUSE_CURSOR = @USE_MODULE_CONF_MOUSE_CURSOR@
+USE_MODULE_CONF_PATHS = @USE_MODULE_CONF_PATHS@
+USE_MODULE_CONF_PERFORMANCE = @USE_MODULE_CONF_PERFORMANCE@
+USE_MODULE_CONF_PROFILES = @USE_MODULE_CONF_PROFILES@
+USE_MODULE_CONF_SCALE = @USE_MODULE_CONF_SCALE@
+USE_MODULE_CONF_SCREENSAVER = @USE_MODULE_CONF_SCREENSAVER@
+USE_MODULE_CONF_SHELVES = @USE_MODULE_CONF_SHELVES@
+USE_MODULE_CONF_STARTUP = @USE_MODULE_CONF_STARTUP@
+USE_MODULE_CONF_THEME = @USE_MODULE_CONF_THEME@
+USE_MODULE_CONF_TRANSITIONS = @USE_MODULE_CONF_TRANSITIONS@
+USE_MODULE_CONF_WALLPAPER = @USE_MODULE_CONF_WALLPAPER@
+USE_MODULE_CONF_WALLPAPER2 = @USE_MODULE_CONF_WALLPAPER2@
+USE_MODULE_CONF_WINDOW_DISPLAY = @USE_MODULE_CONF_WINDOW_DISPLAY@
+USE_MODULE_CONF_WINDOW_FOCUS = @USE_MODULE_CONF_WINDOW_FOCUS@
+USE_MODULE_CONF_WINDOW_MANIPULATION = @USE_MODULE_CONF_WINDOW_MANIPULATION@
+USE_MODULE_CONF_WINDOW_REMEMBERS = @USE_MODULE_CONF_WINDOW_REMEMBERS@
+USE_MODULE_CONF_WINLIST = @USE_MODULE_CONF_WINLIST@
+USE_MODULE_CONNMAN = @USE_MODULE_CONNMAN@
+USE_MODULE_CPUFREQ = @USE_MODULE_CPUFREQ@
+USE_MODULE_DROPSHADOW = @USE_MODULE_DROPSHADOW@
+USE_MODULE_EVERYTHING = @USE_MODULE_EVERYTHING@
+USE_MODULE_EVERYTHING_APPS = @USE_MODULE_EVERYTHING_APPS@
+USE_MODULE_EVERYTHING_ASPELL = @USE_MODULE_EVERYTHING_ASPELL@
+USE_MODULE_EVERYTHING_CALC = @USE_MODULE_EVERYTHING_CALC@
+USE_MODULE_EVERYTHING_FILES = @USE_MODULE_EVERYTHING_FILES@
+USE_MODULE_EVERYTHING_SETTINGS = @USE_MODULE_EVERYTHING_SETTINGS@
+USE_MODULE_EVERYTHING_WALLPAPER = @USE_MODULE_EVERYTHING_WALLPAPER@
+USE_MODULE_EVERYTHING_WINDOWS = @USE_MODULE_EVERYTHING_WINDOWS@
+USE_MODULE_EXEBUF = @USE_MODULE_EXEBUF@
+USE_MODULE_FILEMAN = @USE_MODULE_FILEMAN@
+USE_MODULE_FILEMAN_OPINFO = @USE_MODULE_FILEMAN_OPINFO@
+USE_MODULE_GADMAN = @USE_MODULE_GADMAN@
+USE_MODULE_IBAR = @USE_MODULE_IBAR@
+USE_MODULE_IBOX = @USE_MODULE_IBOX@
+USE_MODULE_ILLUME = @USE_MODULE_ILLUME@
+USE_MODULE_ILLUME2 = @USE_MODULE_ILLUME2@
+USE_MODULE_MIXER = @USE_MODULE_MIXER@
+USE_MODULE_MSGBUS = @USE_MODULE_MSGBUS@
+USE_MODULE_OFONO = @USE_MODULE_OFONO@
+USE_MODULE_PAGER = @USE_MODULE_PAGER@
+USE_MODULE_START = @USE_MODULE_START@
+USE_MODULE_SYSCON = @USE_MODULE_SYSCON@
+USE_MODULE_SYSTRAY = @USE_MODULE_SYSTRAY@
+USE_MODULE_TEMPERATURE = @USE_MODULE_TEMPERATURE@
+USE_MODULE_WINLIST = @USE_MODULE_WINLIST@
+USE_MODULE_WIZARD = @USE_MODULE_WIZARD@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+cf_cflags = @cf_cflags@
+cf_libs = @cf_libs@
+datadir = @datadir@
+datarootdir = @datarootdir@
+dlopen_libs = @dlopen_libs@
+docdir = @docdir@
+dvidir = @dvidir@
+e_cflags = @e_cflags@
+e_configflags = @e_configflags@
+e_libs = @e_libs@
+edje_cc = @edje_cc@
+eet_eet = @eet_eet@
+efl_doxygen = @efl_doxygen@
+efl_have_doxygen = @efl_have_doxygen@
+exec_prefix = @exec_prefix@
+fnmatch_libs = @fnmatch_libs@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+release = @release@
+requirements_e = @requirements_e@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+x_cflags = @x_cflags@
+x_libs = @x_libs@
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = everything-aspell
+
+# data files for the module
+filesdir = $(libdir)/enlightenment/modules/$(MODULE)
+files_DATA = \
+e-module.edj module.desktop
+
+EXTRA_DIST = $(files_DATA)
+
+# the module .so file
+INCLUDES = -I. \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
+ -I$(top_srcdir)/src/bin \
+ -I$(top_srcdir)/src/lib \
+ -I$(top_srcdir)/src/modules \
+ -I$(top_srcdir)/src/modules/everything \
+ @e_cflags@
+
+pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
+pkg_LTLIBRARIES = module.la
+module_la_SOURCES = e_mod_main.c \
+ e_mod_main.h
+
+module_la_LIBADD = @e_libs@ @dlopen_libs@
+module_la_LDFLAGS = -module -avoid-version
+module_la_DEPENDENCIES = $(top_builddir)/config.h
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/everything-aspell/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/modules/everything-aspell/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+module.desktop: $(top_builddir)/config.status $(srcdir)/module.desktop.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)"
+ @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \
+ }
+
+uninstall-pkgLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \
+ done
+
+clean-pkgLTLIBRARIES:
+ -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES)
+ @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(module_la_LINK) -rpath $(pkgdir) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e_mod_main.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-filesDATA: $(files_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(filesdir)" || $(MKDIR_P) "$(DESTDIR)$(filesdir)"
+ @list='$(files_DATA)'; test -n "$(filesdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filesdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(filesdir)" || exit $$?; \
+ done
+
+uninstall-filesDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(files_DATA)'; test -n "$(filesdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(filesdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(filesdir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(filesdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-filesDATA install-pkgLTLIBRARIES
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-filesDATA uninstall-pkgLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-pkgLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-filesDATA \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-filesDATA \
+ uninstall-pkgLTLIBRARIES
+
+
+uninstall:
+ rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/modules/everything-aspell/e-module.edj b/src/modules/everything-aspell/e-module.edj
new file mode 100644
index 0000000000..e7f2d592d1
--- /dev/null
+++ b/src/modules/everything-aspell/e-module.edj
Binary files differ
diff --git a/src/modules/everything/sources/evry_plug_aspell.c b/src/modules/everything-aspell/e_mod_main.c
index 9f0d285782..62e8bb3158 100644
--- a/src/modules/everything/sources/evry_plug_aspell.c
+++ b/src/modules/everything-aspell/e_mod_main.c
@@ -1,4 +1,9 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+
#include "Evry.h"
+#include "e_mod_main.h"
#include <ctype.h>
static const char TRIGGER[] = "aspell ";
@@ -9,16 +14,16 @@ typedef struct _Plugin Plugin;
struct _Plugin
{
- Evry_Plugin base;
- struct
- {
- Ecore_Event_Handler *data;
- Ecore_Event_Handler *del;
- } handler;
- Ecore_Exe *exe;
- const char *lang;
- const char *input;
- Eina_Bool is_first;
+ Evry_Plugin base;
+ struct
+ {
+ Ecore_Event_Handler *data;
+ Ecore_Event_Handler *del;
+ } handler;
+ Ecore_Exe *exe;
+ const char *lang;
+ const char *input;
+ Eina_Bool is_first;
};
static Plugin *plugin = NULL;
@@ -288,11 +293,11 @@ _cleanup(Evry_Plugin *plugin)
EVRY_PLUGIN_ITEMS_FREE(p)
- if (p->handler.data)
- {
- ecore_event_handler_del(p->handler.data);
- p->handler.data = NULL;
- }
+ if (p->handler.data)
+ {
+ ecore_event_handler_del(p->handler.data);
+ p->handler.data = NULL;
+ }
if (p->handler.del)
{
ecore_event_handler_del(p->handler.del);
@@ -317,7 +322,7 @@ _cleanup(Evry_Plugin *plugin)
}
static Eina_Bool
-_init(void)
+module_init(void)
{
Plugin *p;
@@ -338,10 +343,57 @@ _init(void)
}
static void
-_shutdown(void)
+module_shutdown(void)
{
EVRY_PLUGIN_FREE(plugin);
}
-EINA_MODULE_INIT(_init);
-EINA_MODULE_SHUTDOWN(_shutdown);
+/***************************************************************************/
+/**/
+/* actual module specifics */
+
+static E_Module *module = NULL;
+static Eina_Bool active = EINA_FALSE;
+
+/***************************************************************************/
+/**/
+/* module setup */
+EAPI E_Module_Api e_modapi =
+{
+ E_MODULE_API_VERSION,
+ "everything-aspell"
+};
+
+EAPI void *
+e_modapi_init(E_Module *m)
+{
+ module = m;
+
+ if (e_datastore_get("everything_loaded"))
+ active = module_init();
+
+ e_module_delayed_set(m, 1);
+
+ return m;
+}
+
+EAPI int
+e_modapi_shutdown(E_Module *m)
+{
+ if (active && e_datastore_get("everything_loaded"))
+ module_shutdown();
+
+ module = NULL;
+
+ return 1;
+}
+
+EAPI int
+e_modapi_save(E_Module *m)
+{
+ return 1;
+}
+
+/**/
+/***************************************************************************/
+
diff --git a/src/modules/everything-aspell/e_mod_main.h b/src/modules/everything-aspell/e_mod_main.h
new file mode 100644
index 0000000000..2eb60362ec
--- /dev/null
+++ b/src/modules/everything-aspell/e_mod_main.h
@@ -0,0 +1,13 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+#ifndef E_MOD_MAIN_H
+#define E_MOD_MAIN_H
+
+EAPI extern E_Module_Api e_modapi;
+
+EAPI void *e_modapi_init (E_Module *m);
+EAPI int e_modapi_shutdown (E_Module *m);
+EAPI int e_modapi_save (E_Module *m);
+
+#endif
diff --git a/src/modules/everything-aspell/module.desktop.in b/src/modules/everything-aspell/module.desktop.in
new file mode 100644
index 0000000000..25f48c355c
--- /dev/null
+++ b/src/modules/everything-aspell/module.desktop.in
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Type=Link
+Name=Everything Aspell
+Icon=e-module
+X-Enlightenment-ModuleType=system
+Comment=Aspell Frontend, use 'aspell ' as trigger \ No newline at end of file
diff --git a/src/modules/everything-calc/Makefile.am b/src/modules/everything-calc/Makefile.am
new file mode 100644
index 0000000000..207bb31454
--- /dev/null
+++ b/src/modules/everything-calc/Makefile.am
@@ -0,0 +1,30 @@
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = everything-calc
+
+# data files for the module
+filesdir = $(libdir)/enlightenment/modules/$(MODULE)
+files_DATA = \
+e-module.edj module.desktop
+
+EXTRA_DIST = $(files_DATA)
+
+# the module .so file
+INCLUDES = -I. \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
+ -I$(top_srcdir)/src/bin \
+ -I$(top_srcdir)/src/lib \
+ -I$(top_srcdir)/src/modules \
+ -I$(top_srcdir)/src/modules/everything \
+ @e_cflags@
+pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
+pkg_LTLIBRARIES = module.la
+module_la_SOURCES = e_mod_main.c \
+ e_mod_main.h
+
+module_la_LIBADD = @e_libs@ @dlopen_libs@
+module_la_LDFLAGS = -module -avoid-version
+module_la_DEPENDENCIES = $(top_builddir)/config.h
+
+uninstall:
+ rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)
diff --git a/src/modules/everything-calc/e-module.edj b/src/modules/everything-calc/e-module.edj
new file mode 100644
index 0000000000..e7f2d592d1
--- /dev/null
+++ b/src/modules/everything-calc/e-module.edj
Binary files differ
diff --git a/src/modules/everything/sources/evry_plug_calc.c b/src/modules/everything-calc/e_mod_main.c
index bf2fc45aad..6c9449d844 100644
--- a/src/modules/everything/sources/evry_plug_calc.c
+++ b/src/modules/everything-calc/e_mod_main.c
@@ -1,4 +1,9 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+
#include "Evry.h"
+#include "e_mod_main.h"
// TODO - show error when input not parseable
static int _cb_data(void *data, int type, void *event);
@@ -219,7 +224,7 @@ _cb_del(void *data __UNUSED__, int type __UNUSED__, void *event)
}
static Eina_Bool
-_init(void)
+module_init(void)
{
if (!evry_api_version_check(EVRY_API_VERSION))
return EINA_FALSE;
@@ -235,7 +240,7 @@ _init(void)
}
static void
-_shutdown(void)
+module_shutdown(void)
{
char *result;
@@ -246,5 +251,52 @@ _shutdown(void)
}
-EINA_MODULE_INIT(_init);
-EINA_MODULE_SHUTDOWN(_shutdown);
+/***************************************************************************/
+/**/
+/* actual module specifics */
+
+static E_Module *module = NULL;
+static Eina_Bool active = EINA_FALSE;
+
+/***************************************************************************/
+/**/
+/* module setup */
+EAPI E_Module_Api e_modapi =
+{
+ E_MODULE_API_VERSION,
+ "everything-calc"
+};
+
+EAPI void *
+e_modapi_init(E_Module *m)
+{
+ module = m;
+
+ if (e_datastore_get("everything_loaded"))
+ active = module_init();
+
+ e_module_delayed_set(m, 1);
+
+ return m;
+}
+
+EAPI int
+e_modapi_shutdown(E_Module *m)
+{
+ if (active && e_datastore_get("everything_loaded"))
+ module_shutdown();
+
+ module = NULL;
+
+ return 1;
+}
+
+EAPI int
+e_modapi_save(E_Module *m)
+{
+ return 1;
+}
+
+/**/
+/***************************************************************************/
+
diff --git a/src/modules/everything-calc/e_mod_main.h b/src/modules/everything-calc/e_mod_main.h
new file mode 100644
index 0000000000..2eb60362ec
--- /dev/null
+++ b/src/modules/everything-calc/e_mod_main.h
@@ -0,0 +1,13 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+#ifndef E_MOD_MAIN_H
+#define E_MOD_MAIN_H
+
+EAPI extern E_Module_Api e_modapi;
+
+EAPI void *e_modapi_init (E_Module *m);
+EAPI int e_modapi_shutdown (E_Module *m);
+EAPI int e_modapi_save (E_Module *m);
+
+#endif
diff --git a/src/modules/everything-calc/module.desktop.in b/src/modules/everything-calc/module.desktop.in
new file mode 100644
index 0000000000..e130470a2f
--- /dev/null
+++ b/src/modules/everything-calc/module.desktop.in
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Type=Link
+Name=Everything Calculator
+Icon=e-module
+X-Enlightenment-ModuleType=system
+Comment=Frontend for bc. Use '=' as trigger. \ No newline at end of file
diff --git a/src/modules/everything-files/Makefile.am b/src/modules/everything-files/Makefile.am
new file mode 100644
index 0000000000..8e2f188ed7
--- /dev/null
+++ b/src/modules/everything-files/Makefile.am
@@ -0,0 +1,30 @@
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = everything-files
+
+# data files for the module
+filesdir = $(libdir)/enlightenment/modules/$(MODULE)
+files_DATA = \
+e-module.edj module.desktop
+
+EXTRA_DIST = $(files_DATA)
+
+# the module .so file
+INCLUDES = -I. \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
+ -I$(top_srcdir)/src/bin \
+ -I$(top_srcdir)/src/lib \
+ -I$(top_srcdir)/src/modules \
+ -I$(top_srcdir)/src/modules/everything \
+ @e_cflags@
+pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
+pkg_LTLIBRARIES = module.la
+module_la_SOURCES = e_mod_main.c \
+ e_mod_main.h
+
+module_la_LIBADD = @e_libs@ @dlopen_libs@
+module_la_LDFLAGS = -module -avoid-version
+module_la_DEPENDENCIES = $(top_builddir)/config.h
+
+uninstall:
+ rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)
diff --git a/src/modules/everything-files/e-module.edj b/src/modules/everything-files/e-module.edj
new file mode 100644
index 0000000000..e7f2d592d1
--- /dev/null
+++ b/src/modules/everything-files/e-module.edj
Binary files differ
diff --git a/src/modules/everything/sources/evry_plug_dir_browse.c b/src/modules/everything-files/e_mod_main.c
index 3507f9140b..01b85ee888 100644
--- a/src/modules/everything/sources/evry_plug_dir_browse.c
+++ b/src/modules/everything-files/e_mod_main.c
@@ -1,3 +1,8 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+
+#include "Evry.h"
#include "e_mod_main.h"
#define MAX_ITEMS 100
@@ -36,9 +41,6 @@ static Evry_Plugin *p2 = NULL;
static Evry_Action *act1 = NULL;
static Evry_Action *act2 = NULL;
-/* static long thread_cnt = 0;
- * static long thread_last = 0; */
-
static const char *mime_folder;
@@ -244,11 +246,9 @@ _scan_end_func(void *data)
static void
_read_directory(Plugin *p)
{
- /* thread_last = ++thread_cnt; */
-
Data *d = E_NEW(Data, 1);
d->plugin = p;
- /* d->id = thread_cnt; */
+
p->thread = ecore_thread_run(_scan_func, _scan_end_func, _scan_cancel_func, d);
}
@@ -291,14 +291,8 @@ _cleanup(Evry_Plugin *plugin)
Evry_Item_File *file;
- /* if a thread for this plugin returns
- it will free its data if its id is smaller
- than thread_last */
- /* thread_last = ++thread_cnt; */
-
if (p->thread)
- {
-
+ {
ecore_thread_cancel(p->thread);
}
else
@@ -492,7 +486,7 @@ _open_term_action(Evry_Action *act)
}
static Eina_Bool
-_init(void)
+module_init(void)
{
if (!evry_api_version_check(EVRY_API_VERSION))
return EINA_FALSE;
@@ -509,16 +503,13 @@ _init(void)
evry_plugin_register(p2, 1);
act1 = evry_action_new("Open Folder (EFM)", "FILE", NULL, NULL, "folder-open",
- _open_folder_action, _open_folder_check, NULL, NULL, NULL);
+ _open_folder_action, _open_folder_check, NULL, NULL, NULL);
evry_action_register(act1, 0);
act2 = evry_action_new("Open Terminal here", "FILE", NULL, NULL,
- "system-run",
- _open_term_action, NULL, NULL, NULL, NULL);
+ "system-run",
+ _open_term_action, NULL, NULL, NULL, NULL);
evry_action_register(act2, 2);
-
-
-
mime_folder = eina_stringshare_add("inode/directory");
@@ -526,7 +517,7 @@ _init(void)
}
static void
-_shutdown(void)
+module_shutdown(void)
{
EVRY_PLUGIN_FREE(p1);
EVRY_PLUGIN_FREE(p2);
@@ -537,5 +528,52 @@ _shutdown(void)
evry_action_free(act2);
}
-EINA_MODULE_INIT(_init);
-EINA_MODULE_SHUTDOWN(_shutdown);
+/***************************************************************************/
+/**/
+/* actual module specifics */
+
+static E_Module *module = NULL;
+static Eina_Bool active = EINA_FALSE;
+
+/***************************************************************************/
+/**/
+/* module setup */
+EAPI E_Module_Api e_modapi =
+{
+ E_MODULE_API_VERSION,
+ "everything-files"
+};
+
+EAPI void *
+e_modapi_init(E_Module *m)
+{
+ module = m;
+
+ if (e_datastore_get("everything_loaded"))
+ active = module_init();
+
+ e_module_delayed_set(m, 1);
+
+ return m;
+}
+
+EAPI int
+e_modapi_shutdown(E_Module *m)
+{
+ if (active && e_datastore_get("everything_loaded"))
+ module_shutdown();
+
+ module = NULL;
+
+ return 1;
+}
+
+EAPI int
+e_modapi_save(E_Module *m)
+{
+ return 1;
+}
+
+/**/
+/***************************************************************************/
+
diff --git a/src/modules/everything-files/e_mod_main.h b/src/modules/everything-files/e_mod_main.h
new file mode 100644
index 0000000000..2eb60362ec
--- /dev/null
+++ b/src/modules/everything-files/e_mod_main.h
@@ -0,0 +1,13 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+#ifndef E_MOD_MAIN_H
+#define E_MOD_MAIN_H
+
+EAPI extern E_Module_Api e_modapi;
+
+EAPI void *e_modapi_init (E_Module *m);
+EAPI int e_modapi_shutdown (E_Module *m);
+EAPI int e_modapi_save (E_Module *m);
+
+#endif
diff --git a/src/modules/everything-files/evry_plug.c b/src/modules/everything-files/evry_plug.c
new file mode 100644
index 0000000000..6fdf8ce5b4
--- /dev/null
+++ b/src/modules/everything-files/evry_plug.c
@@ -0,0 +1,529 @@
+#include "Evry.h"
+#include "e_mod_main.h"
+
+#define MAX_ITEMS 100
+#define TERM_ACTION_DIR "%s"
+
+typedef struct _Plugin Plugin;
+typedef struct _Data Data;
+
+struct _Plugin
+{
+ Evry_Plugin base;
+
+ const char *directory;
+ /* all files of directory */
+ Eina_List *files;
+ /* current list of files */
+ Eina_List *cur;
+ Eina_Bool command;
+
+ const char *input;
+
+ Ecore_Thread *thread;
+};
+
+struct _Data
+{
+ Plugin *plugin;
+ long id;
+ int level;
+ int cnt;
+ Eina_List *files;
+};
+
+static Evry_Plugin *p1 = NULL;
+static Evry_Plugin *p2 = NULL;
+static Evry_Action *act1 = NULL;
+static Evry_Action *act2 = NULL;
+
+static const char *mime_folder;
+
+
+static void
+_item_fill(Evry_Item_File *file)
+{
+ const char *mime;
+
+ if (file->mime) return;
+
+ if ((mime = efreet_mime_type_get(file->path)))
+ {
+ file->mime = eina_stringshare_add(mime);
+ EVRY_ITEM(file)->context = eina_stringshare_ref(file->mime);
+
+ if ((!strcmp(mime, "inode/directory")) ||
+ (!strcmp(mime, "inode/mount-point")))
+ EVRY_ITEM(file)->browseable = EINA_TRUE;
+
+ return;
+ }
+
+ file->mime = eina_stringshare_add("None");
+}
+
+static int
+_cb_sort(const void *data1, const void *data2)
+{
+ const Evry_Item *it1 = data1;
+ const Evry_Item *it2 = data2;
+
+ if (it1->browseable && !it2->browseable)
+ return -1;
+
+ if (!it1->browseable && it2->browseable)
+ return 1;
+
+ if (it1->fuzzy_match && it2->fuzzy_match)
+ if (it1->fuzzy_match - it2->fuzzy_match)
+ return (it1->fuzzy_match - it2->fuzzy_match);
+
+ return strcasecmp(it1->label, it2->label);
+}
+
+static void
+_item_free(Evry_Item *it)
+{
+ ITEM_FILE(file, it);
+ if (file->path) eina_stringshare_del(file->path);
+ if (file->mime) eina_stringshare_del(file->mime);
+
+ E_FREE(file);
+}
+
+static void
+_scan_func(void *data)
+{
+ Data *d = data;
+ Plugin *p = d->plugin;
+ Eina_List *files;
+ char *filename;
+ Evry_Item_File *file;
+ char buf[4096];
+
+ files = ecore_file_ls(p->directory);
+
+ EINA_LIST_FREE(files, filename)
+ {
+ if (filename[0] == '.')
+ {
+ free(filename);
+ continue;
+ }
+
+ file = E_NEW(Evry_Item_File, 1);
+ if (!file)
+ {
+ free(filename);
+ continue;
+ }
+
+ evry_item_new(EVRY_ITEM(file), EVRY_PLUGIN(p), NULL, _item_free);
+
+ EVRY_ITEM(file)->data = filename;
+
+ snprintf(buf, sizeof(buf), "%s/%s", p->directory, filename);
+ file->path = strdup(buf);
+
+ if (ecore_file_is_dir(file->path))
+ EVRY_ITEM(file)->browseable = EINA_TRUE;
+
+ d->files = eina_list_append(d->files, file);
+ }
+}
+
+static int
+_append_file(Plugin *p, Evry_Item_File *file)
+{
+ int match;
+
+ if (p->input && (match = evry_fuzzy_match(EVRY_ITEM(file)->label, p->input)))
+ {
+ EVRY_ITEM(file)->fuzzy_match = match;
+ EVRY_PLUGIN_ITEM_APPEND(p, file);
+ return 1;
+ }
+ else if (!p->input)
+ {
+ EVRY_PLUGIN_ITEM_APPEND(p, file);
+ return 1;
+ }
+
+ return 0;
+}
+
+static const char *
+_item_id(const char *path)
+{
+ const char *s1, *s2, *s3;
+ s1 = s2 = s3 = path;
+
+ while (s1 && ++s1 && (s1 = strchr(s1, '/')))
+ {
+ s3 = s2;
+ s2 = s1;
+ }
+
+ return s3;
+}
+static void
+_scan_cancel_func(void *data)
+{
+ Data *d = data;
+ Plugin *p = d->plugin;
+ int cnt = 0;
+ Evry_Item *item;
+ char *filename, *path;
+ Evry_Item_File *file;
+
+ EINA_LIST_FREE(d->files, item)
+ {
+ filename = item->data;
+ free(filename);
+ evry_item_free(item);
+ }
+ E_FREE(d);
+
+ if (p->directory)
+ eina_stringshare_del(p->directory);
+
+ EINA_LIST_FREE(p->files, file)
+ evry_item_free(EVRY_ITEM(file));
+
+ EVRY_PLUGIN_ITEMS_CLEAR(p);
+
+ E_FREE(p);
+}
+
+static void
+_scan_end_func(void *data)
+{
+ Data *d = data;
+ Plugin *p = d->plugin;
+ int cnt = 0;
+ Evry_Item *item;
+ char *filename, *path;
+
+ p->thread = NULL;
+
+ EINA_LIST_FREE(d->files, item)
+ {
+ ITEM_FILE(file, item);
+
+ filename = item->data;
+ path = (char *) file->path;
+ file->path = eina_stringshare_add(path);
+ item->id = eina_stringshare_add(_item_id(path));
+ item->label = eina_stringshare_add(filename);
+ free(filename);
+ free(path);
+
+ p->files = eina_list_append(p->files, file);
+
+ if (item->browseable)
+ {
+ file->mime = eina_stringshare_ref(mime_folder);
+ EVRY_ITEM(file)->context = eina_stringshare_ref(file->mime);
+ }
+
+ if (p->command || cnt >= MAX_ITEMS) continue;
+ cnt += _append_file(p, file);
+ }
+
+ if (!p->command)
+ {
+ EVRY_PLUGIN_ITEMS_SORT(p, _cb_sort);
+ evry_plugin_async_update(EVRY_PLUGIN(p), EVRY_ASYNC_UPDATE_ADD);
+ }
+
+ E_FREE(d);
+}
+
+static void
+_read_directory(Plugin *p)
+{
+ Data *d = E_NEW(Data, 1);
+ d->plugin = p;
+
+ p->thread = ecore_thread_run(_scan_func, _scan_end_func, _scan_cancel_func, d);
+}
+
+static Evry_Plugin *
+_begin(Evry_Plugin *plugin, const Evry_Item *it)
+{
+ Plugin *p = NULL;
+
+ /* is FILE ? */
+ if (it && (it->plugin->type_out == plugin->type_in))
+ {
+ ITEM_FILE(file, it);
+
+ if (!file->path || !ecore_file_is_dir(file->path))
+ return NULL;
+
+ p = E_NEW(Plugin, 1);
+ p->base = *plugin;
+ p->base.items = NULL;
+
+ p->directory = eina_stringshare_add(file->path);
+ }
+ else
+ {
+ p = E_NEW(Plugin, 1);
+ p->base = *plugin;
+ p->base.items = NULL;
+ p->directory = eina_stringshare_add(e_user_homedir_get());
+ }
+
+ _read_directory(p);
+
+ return EVRY_PLUGIN(p);
+}
+
+static void
+_cleanup(Evry_Plugin *plugin)
+{
+ PLUGIN(p, plugin);
+
+ Evry_Item_File *file;
+
+ if (p->thread)
+ {
+ ecore_thread_cancel(p->thread);
+ }
+ else
+ {
+ if (p->directory)
+ eina_stringshare_del(p->directory);
+
+ EINA_LIST_FREE(p->files, file)
+ evry_item_free(EVRY_ITEM(file));
+
+ EVRY_PLUGIN_ITEMS_CLEAR(p);
+
+ E_FREE(p);
+ }
+}
+
+static void
+_folder_item_add(Plugin *p, const char *path)
+{
+ Evry_Item_File *file = E_NEW(Evry_Item_File, 1);
+
+ if (!file) return;
+
+ evry_item_new(EVRY_ITEM(file), EVRY_PLUGIN(p), path, _item_free);
+ file->path = eina_stringshare_add(path);
+ file->mime = eina_stringshare_ref(mime_folder);
+ EVRY_ITEM(file)->browseable = EINA_TRUE;
+ EVRY_PLUGIN_ITEM_APPEND(p, file);
+}
+
+static int
+_fetch(Evry_Plugin *plugin, const char *input)
+{
+ PLUGIN(p, plugin);
+ Evry_Item_File *file;
+ Eina_List *l;
+ int cnt = 0;
+
+ if (!p->command)
+ EVRY_PLUGIN_ITEMS_CLEAR(p);
+
+ p->input = input;
+
+ /* input is command ? */
+ if (input)
+ {
+ if (!strncmp(input, "/", 1))
+ {
+ if (p->command) return 1;
+
+ _folder_item_add(p, "/");
+ p->command = EINA_TRUE;
+ return 1;
+ }
+ else if (!strncmp(input, "..", 2))
+ {
+ char *end;
+ char dir[4096];
+ char *tmp;
+ int prio = 0;
+
+ if (p->command) return 1;
+ if (strncmp(p->directory, "/", 1)) return 0;
+ if (!strcmp(p->directory, "/")) return 0;
+
+ snprintf(dir, 4096, "%s", p->directory);
+ end = strrchr(dir, '/');
+
+ while (end != dir)
+ {
+ tmp = strdup(dir);
+ snprintf(dir, (end - dir) + 1, "%s", tmp);
+
+ _folder_item_add(p, dir);
+
+ end = strrchr(dir, '/');
+ free(tmp);
+ prio--;
+ }
+
+ _folder_item_add(p, "/");
+
+ p->command = EINA_TRUE;
+ return 1;
+ }
+ }
+
+ if (p->command)
+ {
+ p->command = EINA_FALSE;
+ EVRY_PLUGIN_ITEMS_FREE(p);
+ }
+
+ EINA_LIST_FOREACH(p->files, l, file)
+ {
+ if (cnt >= MAX_ITEMS);
+ cnt += _append_file(p, file);
+ }
+
+ if (!EVRY_PLUGIN(p)->items)
+ return 0;
+
+ EVRY_PLUGIN_ITEMS_SORT(p, _cb_sort);
+
+ return 1;
+}
+
+static Evas_Object *
+_icon_get(Evry_Plugin *p __UNUSED__, const Evry_Item *it, Evas *e)
+{
+ Evas_Object *o = NULL;
+ ITEM_FILE(file, it);
+
+ if (!file->mime)
+ _item_fill(file);
+
+ if (!file->mime) return NULL;
+
+ if (it->browseable)
+ o = evry_icon_theme_get("folder", e);
+ else
+ o = evry_icon_mime_get(file->mime, e);
+
+ return o;
+}
+
+
+static int
+_open_folder_check(Evry_Action *act __UNUSED__, const Evry_Item *it)
+{
+ return (it->browseable && e_action_find("fileman"));
+}
+
+static int
+_open_folder_action(Evry_Action *act)
+{
+ E_Action *action = e_action_find("fileman");
+ char *path;
+ Eina_List *m;
+
+ if (!action) return 0;
+
+ m = e_manager_list();
+
+ ITEM_FILE(file, act->item1);
+
+ if (!act->item1->browseable)
+ {
+ path = ecore_file_dir_get(file->path);
+ if (!path) return 0;
+ action->func.go(E_OBJECT(m->data), path);
+ free(path);
+ }
+ else
+ {
+ action->func.go(E_OBJECT(m->data), file->path);
+ }
+
+ return 1;
+}
+
+/* static int
+ * _open_term_action(Evry_Action *act)
+ * {
+ * ITEM_FILE(file, act->item1);
+ * Evry_Item_App *tmp;
+ * char cwd[4096];
+ * char *dir;
+ * int ret = 0;
+ *
+ * if (act->item1->browseable)
+ * dir = strdup(file->path);
+ * else
+ * dir = ecore_file_dir_get(file->path);
+ *
+ * if (dir)
+ * {
+ * getcwd(cwd, sizeof(cwd));
+ * chdir(dir);
+ *
+ * tmp = E_NEW(Evry_Item_App, 1);
+ * tmp->file = evry_conf->cmd_terminal;
+ *
+ * ret = evry_util_exec_app(EVRY_ITEM(tmp), NULL);
+ * E_FREE(tmp);
+ * E_FREE(dir);
+ * chdir(cwd);
+ * }
+ *
+ * return ret;
+ * } */
+
+Eina_Bool
+module_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);
+
+ p2 = evry_plugin_new(NULL, "Files", type_object, "FILE", "FILE", 0, NULL, NULL,
+ _begin, _cleanup, _fetch, NULL, _icon_get,
+ NULL, NULL);
+
+ evry_plugin_register(p1, 3);
+ evry_plugin_register(p2, 1);
+
+ act1 = evry_action_new("Open Folder (EFM)", "FILE", NULL, NULL, "folder-open",
+ _open_folder_action, _open_folder_check, NULL, NULL, NULL);
+ evry_action_register(act1, 0);
+
+ /* act2 = evry_action_new("Open Terminal here", "FILE", NULL, NULL,
+ * "system-run",
+ * _open_term_action, NULL, NULL, NULL, NULL);
+ * evry_action_register(act2, 2); */
+
+
+
+
+ mime_folder = eina_stringshare_add("inode/directory");
+
+ return EINA_TRUE;
+}
+
+void
+module_shutdown(void)
+{
+ EVRY_PLUGIN_FREE(p1);
+ EVRY_PLUGIN_FREE(p2);
+
+ eina_stringshare_del(mime_folder);
+
+ evry_action_free(act1);
+ evry_action_free(act2);
+}
+
diff --git a/src/modules/everything-files/module.desktop.in b/src/modules/everything-files/module.desktop.in
new file mode 100644
index 0000000000..5ea31f7d20
--- /dev/null
+++ b/src/modules/everything-files/module.desktop.in
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Type=Link
+Name=Everything Files
+Icon=e-module
+X-Enlightenment-ModuleType=system
diff --git a/src/modules/everything-settings/Makefile.am b/src/modules/everything-settings/Makefile.am
new file mode 100644
index 0000000000..7f60e7d978
--- /dev/null
+++ b/src/modules/everything-settings/Makefile.am
@@ -0,0 +1,30 @@
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = everything-settings
+
+# data files for the module
+filesdir = $(libdir)/enlightenment/modules/$(MODULE)
+files_DATA = \
+e-module.edj module.desktop
+
+EXTRA_DIST = $(files_DATA)
+
+# the module .so file
+INCLUDES = -I. \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
+ -I$(top_srcdir)/src/bin \
+ -I$(top_srcdir)/src/lib \
+ -I$(top_srcdir)/src/modules \
+ -I$(top_srcdir)/src/modules/everything \
+ @e_cflags@
+pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
+pkg_LTLIBRARIES = module.la
+module_la_SOURCES = e_mod_main.c \
+ e_mod_main.h
+
+module_la_LIBADD = @e_libs@ @dlopen_libs@
+module_la_LDFLAGS = -module -avoid-version
+module_la_DEPENDENCIES = $(top_builddir)/config.h
+
+uninstall:
+ rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)
diff --git a/src/modules/everything-settings/e-module.edj b/src/modules/everything-settings/e-module.edj
new file mode 100644
index 0000000000..e7f2d592d1
--- /dev/null
+++ b/src/modules/everything-settings/e-module.edj
Binary files differ
diff --git a/src/modules/everything/sources/evry_plug_config.c b/src/modules/everything-settings/e_mod_main.c
index 4392815109..afb0e39d09 100644
--- a/src/modules/everything/sources/evry_plug_config.c
+++ b/src/modules/everything-settings/e_mod_main.c
@@ -1,4 +1,9 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+
#include "Evry.h"
+#include "e_mod_main.h"
static Evry_Plugin *p;
static Evry_Action *act;
@@ -113,7 +118,7 @@ _action(Evry_Action *act)
}
static Eina_Bool
-_init(void)
+module_init(void)
{
if (!evry_api_version_check(EVRY_API_VERSION))
return EINA_FALSE;
@@ -132,12 +137,60 @@ _init(void)
}
static void
-_shutdown(void)
+module_shutdown(void)
{
EVRY_PLUGIN_FREE(p);
evry_action_free(act);
}
-EINA_MODULE_INIT(_init);
-EINA_MODULE_SHUTDOWN(_shutdown);
+
+/***************************************************************************/
+/**/
+/* actual module specifics */
+
+static E_Module *module = NULL;
+static Eina_Bool active = EINA_FALSE;
+
+/***************************************************************************/
+/**/
+/* module setup */
+EAPI E_Module_Api e_modapi =
+{
+ E_MODULE_API_VERSION,
+ "everything-settings"
+};
+
+EAPI void *
+e_modapi_init(E_Module *m)
+{
+ module = m;
+
+ if (e_datastore_get("everything_loaded"))
+ active = module_init();
+
+ e_module_delayed_set(m, 1);
+
+ return m;
+}
+
+EAPI int
+e_modapi_shutdown(E_Module *m)
+{
+ if (active && e_datastore_get("everything_loaded"))
+ module_shutdown();
+
+ module = NULL;
+
+ return 1;
+}
+
+EAPI int
+e_modapi_save(E_Module *m)
+{
+ return 1;
+}
+
+/**/
+/***************************************************************************/
+
diff --git a/src/modules/everything-settings/e_mod_main.h b/src/modules/everything-settings/e_mod_main.h
new file mode 100644
index 0000000000..2eb60362ec
--- /dev/null
+++ b/src/modules/everything-settings/e_mod_main.h
@@ -0,0 +1,13 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+#ifndef E_MOD_MAIN_H
+#define E_MOD_MAIN_H
+
+EAPI extern E_Module_Api e_modapi;
+
+EAPI void *e_modapi_init (E_Module *m);
+EAPI int e_modapi_shutdown (E_Module *m);
+EAPI int e_modapi_save (E_Module *m);
+
+#endif
diff --git a/src/modules/everything-settings/module.desktop.in b/src/modules/everything-settings/module.desktop.in
new file mode 100644
index 0000000000..c734e2d653
--- /dev/null
+++ b/src/modules/everything-settings/module.desktop.in
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Type=Link
+Name=Everything Settings
+Icon=e-module
+X-Enlightenment-ModuleType=system
+Comment=Quickly open e17 settings dialogs. \ No newline at end of file
diff --git a/src/modules/everything-wallpaper/Makefile.am b/src/modules/everything-wallpaper/Makefile.am
new file mode 100644
index 0000000000..acbe3c152a
--- /dev/null
+++ b/src/modules/everything-wallpaper/Makefile.am
@@ -0,0 +1,30 @@
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = everything-wallpaper
+
+# data files for the module
+filesdir = $(libdir)/enlightenment/modules/$(MODULE)
+files_DATA = \
+e-module.edj module.desktop
+
+EXTRA_DIST = $(files_DATA)
+
+# the module .so file
+INCLUDES = -I. \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
+ -I$(top_srcdir)/src/bin \
+ -I$(top_srcdir)/src/lib \
+ -I$(top_srcdir)/src/modules \
+ -I$(top_srcdir)/src/modules/everything \
+ @e_cflags@
+pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
+pkg_LTLIBRARIES = module.la
+module_la_SOURCES = e_mod_main.c \
+ e_mod_main.h
+
+module_la_LIBADD = @e_libs@ @dlopen_libs@
+module_la_LDFLAGS = -module -avoid-version
+module_la_DEPENDENCIES = $(top_builddir)/config.h
+
+uninstall:
+ rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)
diff --git a/src/modules/everything-wallpaper/e-module.edj b/src/modules/everything-wallpaper/e-module.edj
new file mode 100644
index 0000000000..e7f2d592d1
--- /dev/null
+++ b/src/modules/everything-wallpaper/e-module.edj
Binary files differ
diff --git a/src/modules/everything/actions/evry_plug_wallpaper.c b/src/modules/everything-wallpaper/e_mod_main.c
index 9d629fa986..927d45ecc1 100644
--- a/src/modules/everything/actions/evry_plug_wallpaper.c
+++ b/src/modules/everything-wallpaper/e_mod_main.c
@@ -1,4 +1,9 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+
#include "Evry.h"
+#include "e_mod_main.h"
#define IMPORT_STRETCH 0
#define IMPORT_TILE 1
@@ -195,7 +200,7 @@ _action(Evry_Plugin *plugin, const Evry_Item *item)
}
static Eina_Bool
-_init(void)
+module_init(void)
{
if (!evry_api_version_check(EVRY_API_VERSION))
return EINA_FALSE;
@@ -206,13 +211,12 @@ _init(void)
NULL, NULL);
evry_plugin_register(plugin, 10);
-
return EINA_TRUE;
}
static void
-_shutdown(void)
+module_shutdown(void)
{
EVRY_PLUGIN_FREE(plugin);
@@ -224,12 +228,6 @@ _shutdown(void)
}
}
-
-EINA_MODULE_INIT(_init);
-EINA_MODULE_SHUTDOWN(_shutdown);
-
-
-
/* taken from e_int_config_wallpaper_import.c */
static void
_import_edj_gen(Import *import)
@@ -449,3 +447,53 @@ _import_cb_edje_cc_exit(void *data, int type, void *event)
return 0;
}
+
+/***************************************************************************/
+/**/
+/* actual module specifics */
+
+static E_Module *module = NULL;
+static Eina_Bool active = EINA_FALSE;
+
+/***************************************************************************/
+/**/
+/* module setup */
+EAPI E_Module_Api e_modapi =
+{
+ E_MODULE_API_VERSION,
+ "everything-wallpaper"
+};
+
+EAPI void *
+e_modapi_init(E_Module *m)
+{
+ module = m;
+
+ if (e_datastore_get("everything_loaded"))
+ active = module_init();
+
+ e_module_delayed_set(m, 1);
+
+ return m;
+}
+
+EAPI int
+e_modapi_shutdown(E_Module *m)
+{
+ if (active && e_datastore_get("everything_loaded"))
+ module_shutdown();
+
+ module = NULL;
+
+ return 1;
+}
+
+EAPI int
+e_modapi_save(E_Module *m)
+{
+ return 1;
+}
+
+/**/
+/***************************************************************************/
+
diff --git a/src/modules/everything-wallpaper/e_mod_main.h b/src/modules/everything-wallpaper/e_mod_main.h
new file mode 100644
index 0000000000..2eb60362ec
--- /dev/null
+++ b/src/modules/everything-wallpaper/e_mod_main.h
@@ -0,0 +1,13 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+#ifndef E_MOD_MAIN_H
+#define E_MOD_MAIN_H
+
+EAPI extern E_Module_Api e_modapi;
+
+EAPI void *e_modapi_init (E_Module *m);
+EAPI int e_modapi_shutdown (E_Module *m);
+EAPI int e_modapi_save (E_Module *m);
+
+#endif
diff --git a/src/modules/everything-wallpaper/module.desktop.in b/src/modules/everything-wallpaper/module.desktop.in
new file mode 100644
index 0000000000..cd26bbf578
--- /dev/null
+++ b/src/modules/everything-wallpaper/module.desktop.in
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Type=Link
+Name=Everything Wallpaper
+Icon=e-module
+X-Enlightenment-ModuleType=system
+Comment=Provides action to set image as wallpaper. \ No newline at end of file
diff --git a/src/modules/everything-windows/Makefile.am b/src/modules/everything-windows/Makefile.am
new file mode 100644
index 0000000000..eae69fc202
--- /dev/null
+++ b/src/modules/everything-windows/Makefile.am
@@ -0,0 +1,30 @@
+MAINTAINERCLEANFILES = Makefile.in
+MODULE = everything-windows
+
+# data files for the module
+filesdir = $(libdir)/enlightenment/modules/$(MODULE)
+files_DATA = \
+e-module.edj module.desktop
+
+EXTRA_DIST = $(files_DATA)
+
+# the module .so file
+INCLUDES = -I. \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
+ -I$(top_srcdir)/src/bin \
+ -I$(top_srcdir)/src/lib \
+ -I$(top_srcdir)/src/modules \
+ -I$(top_srcdir)/src/modules/everything \
+ @e_cflags@
+pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
+pkg_LTLIBRARIES = module.la
+module_la_SOURCES = e_mod_main.c \
+ e_mod_main.h
+
+module_la_LIBADD = @e_libs@ @dlopen_libs@
+module_la_LDFLAGS = -module -avoid-version
+module_la_DEPENDENCIES = $(top_builddir)/config.h
+
+uninstall:
+ rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)
diff --git a/src/modules/everything-windows/e-module.edj b/src/modules/everything-windows/e-module.edj
new file mode 100644
index 0000000000..e7f2d592d1
--- /dev/null
+++ b/src/modules/everything-windows/e-module.edj
Binary files differ
diff --git a/src/modules/everything-windows/e_mod_main.c b/src/modules/everything-windows/e_mod_main.c
new file mode 100644
index 0000000000..bf397d7647
--- /dev/null
+++ b/src/modules/everything-windows/e_mod_main.c
@@ -0,0 +1,570 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+
+#include "Evry.h"
+#include "e_mod_main.h"
+
+static Evry_Plugin *plugin;
+static Eina_List *handlers = NULL;
+static Eina_Hash *border_hash = NULL;
+
+static int
+_cb_border_remove(void *data, int type, void *event)
+{
+ E_Event_Border_Remove *ev = event;
+ Evry_Item *it;
+ Evry_Plugin *p = data;
+
+ it = eina_hash_find(border_hash, &(ev->border));
+
+ if (!it) return 1;
+
+ p->items = eina_list_remove(p->items, it);
+ eina_hash_del_by_key(border_hash, &(ev->border));
+
+ evry_plugin_async_update(p, EVRY_ASYNC_UPDATE_ADD);
+
+ return 1;
+}
+
+static void _hash_free(void *data)
+{
+ Evry_Item *it = data;
+
+ evry_item_free(it);
+}
+
+static Evry_Plugin *
+_begin(Evry_Plugin *p, const Evry_Item *it)
+{
+ handlers = eina_list_append
+ (handlers, ecore_event_handler_add
+ (E_EVENT_BORDER_REMOVE, _cb_border_remove, p));
+
+ border_hash = eina_hash_pointer_new(_hash_free);
+
+ return p;
+}
+
+static void
+_cleanup(Evry_Plugin *p)
+{
+ Ecore_Event_Handler *h;
+
+ EINA_LIST_FREE(handlers, h)
+ ecore_event_handler_del(h);
+
+ if (border_hash) eina_hash_free(border_hash);
+ border_hash = NULL;
+
+ EVRY_PLUGIN_ITEMS_CLEAR(p);
+}
+
+static void
+_item_free(Evry_Item *it)
+{
+ if (it->data)
+ e_object_unref(E_OBJECT(it->data));
+
+ E_FREE(it);
+}
+
+static void
+_item_add(Evry_Plugin *p, E_Border *bd, int match, int *prio)
+{
+ Evry_Item *it = NULL;
+
+ if ((it = eina_hash_find(border_hash, &bd)))
+ {
+ it->priority = *prio;
+ EVRY_PLUGIN_ITEM_APPEND(p, it);
+ it->fuzzy_match = match;
+ *prio += 1;
+ return;
+ }
+
+ it = evry_item_new(NULL, p, e_border_name_get(bd), _item_free);
+
+ e_object_ref(E_OBJECT(bd));
+ it->data = bd;
+ it->fuzzy_match = match;
+ it->priority = *prio;
+ it->transient = EINA_TRUE;
+ it->id = eina_stringshare_add(e_util_winid_str_get(bd->win));
+
+ *prio += 1;
+
+ eina_hash_add(border_hash, &bd, it);
+
+ EVRY_PLUGIN_ITEM_APPEND(p, it);
+}
+
+static int
+_cb_sort(const void *data1, const void *data2)
+{
+ const Evry_Item *it1 = data1;
+ const Evry_Item *it2 = data2;
+
+ if (it1->fuzzy_match - it2->fuzzy_match)
+ return (it1->fuzzy_match - it2->fuzzy_match);
+
+ return (it1->priority - it2->priority);
+}
+
+static int
+_fetch(Evry_Plugin *p, const char *input)
+{
+ E_Zone *zone;
+ E_Border *bd;
+ Eina_List *l;
+ int prio = 0;
+ int m1, m2;
+
+ EVRY_PLUGIN_ITEMS_CLEAR(p);
+
+ zone = e_util_zone_current_get(e_manager_current_get());
+
+ EINA_LIST_FOREACH(e_border_focus_stack_get(), l, bd)
+ {
+ if (zone == bd->zone)
+ {
+ if (!input)
+ _item_add(p, bd, 0, &prio);
+ else
+ {
+ m1 = evry_fuzzy_match(e_border_name_get(bd), input);
+
+ if (bd->client.icccm.name)
+ {
+ m2 = evry_fuzzy_match(bd->client.icccm.name, input);
+ if (!m1 || (m2 && m2 < m1))
+ m1 = m2;
+ }
+
+ if (bd->desktop)
+ {
+ m2 = evry_fuzzy_match(bd->desktop->name, input);
+ if (!m1 || (m2 && m2 < m1))
+ m1 = m2;
+ }
+
+ if (m1)
+ _item_add(p, bd, m1, &prio);
+ }
+ }
+ }
+
+ if (!p->items) return 0;
+
+ EVRY_PLUGIN_ITEMS_SORT(p, _cb_sort);
+
+ return 1;
+}
+
+static Evas_Object *
+_item_icon_get(Evry_Plugin *p __UNUSED__, const Evry_Item *it, Evas *e)
+{
+ Evas_Object *o = NULL;
+ E_Border *bd = it->data;
+
+ if (bd->internal)
+ {
+ o = edje_object_add(e);
+ if (!bd->internal_icon)
+ e_util_edje_icon_set(o, "enlightenment/e");
+ else
+ {
+ if (!bd->internal_icon_key)
+ {
+ char *ext;
+ ext = strrchr(bd->internal_icon, '.');
+ if ((ext) && ((!strcmp(ext, ".edj"))))
+ {
+ if (!edje_object_file_set(o, bd->internal_icon, "icon"))
+ e_util_edje_icon_set(o, "enlightenment/e");
+ }
+ else if (ext)
+ {
+ evas_object_del(o);
+ o = e_icon_add(e);
+ e_icon_file_set(o, bd->internal_icon);
+ }
+ else
+ {
+ if (!e_util_edje_icon_set(o, bd->internal_icon))
+ e_util_edje_icon_set(o, "enlightenment/e");
+ }
+ }
+ else
+ {
+ edje_object_file_set(o, bd->internal_icon,
+ bd->internal_icon_key);
+ }
+ }
+ return o;
+ }
+
+ if (!o && bd->desktop)
+ o = e_util_desktop_icon_add(bd->desktop, 128, e);
+
+ if (!o && bd->client.netwm.icons)
+ {
+ int i, size, tmp, found = 0;
+ o = e_icon_add(e);
+
+ size = bd->client.netwm.icons[0].width;
+
+ for (i = 1; i < bd->client.netwm.num_icons; i++)
+ {
+ if ((tmp = bd->client.netwm.icons[i].width) > size)
+ {
+ size = tmp;
+ found = i;
+ }
+ }
+
+ e_icon_data_set(o, bd->client.netwm.icons[found].data,
+ bd->client.netwm.icons[found].width,
+ bd->client.netwm.icons[found].height);
+ e_icon_alpha_set(o, 1);
+ return o;
+ }
+
+ if (!o)
+ o = e_border_icon_add(bd, e);
+
+ return o;
+}
+
+
+/********* border actions ********/
+
+typedef struct _Inst Inst;
+struct _Inst
+{
+ E_Border *border;
+};
+
+static Evry_Plugin *plugin2 = NULL;
+static Inst *inst = NULL;
+static Evry_Action *act = NULL;
+
+static void
+_act_cb_border_switch_to(E_Border *bd)
+{
+ E_Zone *zone;
+
+ zone = e_util_zone_current_get(e_manager_current_get());
+
+ if (bd->desk != (e_desk_current_get(zone)))
+ e_desk_show(bd->desk);
+
+ if (bd->shaded)
+ e_border_unshade(bd, E_DIRECTION_UP);
+
+ if (bd->iconic)
+ e_border_uniconify(bd);
+ else
+ e_border_raise(bd);
+
+ /* e_border_focus_set(bd, 1, 1); */
+ e_border_focus_set_with_pointer(bd);
+}
+
+static void
+_act_cb_border_to_desktop(E_Border *bd)
+{
+ E_Zone *zone;
+ E_Desk *desk;
+ zone = e_util_zone_current_get(e_manager_current_get());
+ desk = e_desk_current_get(zone);
+
+ e_border_desk_set(bd, desk);
+
+ if (bd->shaded)
+ e_border_unshade(bd, E_DIRECTION_UP);
+
+ if (bd->iconic)
+ e_border_uniconify(bd);
+ else
+ e_border_raise(bd);
+
+ /* e_border_focus_set(bd, 1, 1); */
+ e_border_focus_set_with_pointer(bd);
+}
+
+static void
+_act_cb_border_fullscreen(E_Border *bd)
+{
+ if (!bd->fullscreen)
+ e_border_fullscreen(bd, E_FULLSCREEN_RESIZE);
+ else
+ e_border_unfullscreen(bd);
+}
+
+static void
+_act_cb_border_close(E_Border *bd)
+{
+ if (!bd->lock_close) e_border_act_close_begin(bd);
+}
+
+static void
+_act_cb_border_minimize(E_Border *bd)
+{
+ if (!bd->lock_user_iconify) e_border_iconify(bd);
+}
+
+static void
+_act_cb_border_unminimize(E_Border *bd)
+{
+ if (!bd->lock_user_iconify) e_border_uniconify(bd);
+}
+
+
+static Evry_Plugin *
+_act_begin(Evry_Plugin *p __UNUSED__, const Evry_Item *item)
+{
+ E_Border *bd;
+
+ bd = item->data;
+ /* e_object_ref(E_OBJECT(bd)); */
+ inst->border = bd;
+
+ return p;
+}
+
+static int
+_act_cb_sort(const void *data1, const void *data2)
+{
+ const Evry_Item *it1 = data1;
+ const Evry_Item *it2 = data2;
+
+ return (it1->fuzzy_match - it2->fuzzy_match);
+}
+
+static void
+_act_item_add(Evry_Plugin *p, const char *label, void (*action_cb) (E_Border *bd), const char *icon, const char *input)
+{
+ Evry_Item *it;
+ int match = 1;
+
+ if (input)
+ match = evry_fuzzy_match(label, input);
+
+ if (!match) return;
+
+ it = evry_item_new(NULL, p, label, NULL);
+ it->icon = eina_stringshare_add(icon);
+ it->data = action_cb;
+ it->fuzzy_match = match;
+
+ p->items = eina_list_prepend(p->items, it);
+}
+
+static void
+_act_cleanup(Evry_Plugin *p)
+{
+ EVRY_PLUGIN_ITEMS_FREE(p);
+}
+
+static int
+_act_fetch(Evry_Plugin *p, const char *input)
+{
+ E_Zone *zone;
+ E_Desk *desk;
+
+ zone = e_util_zone_current_get(e_manager_current_get());
+ desk = e_desk_current_get(zone);
+
+ _cleanup(p);
+
+ _act_item_add(p, _("Switch to Window"),
+ _act_cb_border_switch_to,
+ "go-next", input);
+
+ if (desk != inst->border->desk)
+ _act_item_add(p, _("Send to Deskop"),
+ _act_cb_border_to_desktop,
+ "go-previous", input);
+
+ if (inst->border->iconic)
+ _act_item_add(p, _("Uniconify"),
+ _act_cb_border_unminimize,
+ "window-minimize", input);
+ else
+ _act_item_add(p, _("Iconify"),
+ _act_cb_border_minimize,
+ "window-minimize", input);
+
+ if (!inst->border->fullscreen)
+ _act_item_add(p, _("Fullscreen"),
+ _act_cb_border_fullscreen,
+ "view-fullscreen", input);
+ else
+ _act_item_add(p, _("Unfullscreen"),
+ _act_cb_border_fullscreen,
+ "view-restore", input);
+
+ _act_item_add(p, _("Close"),
+ _act_cb_border_close,
+ "window-close", input);
+
+ if (!p->items) return 0;
+
+ EVRY_PLUGIN_ITEMS_SORT(p, _act_cb_sort);
+
+ return 1;
+}
+
+static int
+_act_action(Evry_Plugin *p __UNUSED__, const Evry_Item *item)
+{
+ void (*border_action) (E_Border *bd);
+ border_action = item->data;
+ border_action(inst->border);
+
+ return EVRY_ACTION_FINISHED;
+}
+
+static Evas_Object *
+_act_item_icon_get(Evry_Plugin *p __UNUSED__, const Evry_Item *it, Evas *e)
+{
+ Evas_Object *o;
+
+ o = evry_icon_theme_get(it->icon, e);
+
+ return o;
+}
+
+
+static int
+_exec_border_check_item(Evry_Action *act __UNUSED__, const Evry_Item *it)
+{
+ E_Border *bd = it->data;
+ E_OBJECT_CHECK_RETURN(bd, 0);
+ E_OBJECT_TYPE_CHECK_RETURN(bd, E_BORDER_TYPE, 0);
+
+ if ((bd->desktop && bd->desktop->exec) &&
+ ((strstr(bd->desktop->exec, "%u")) ||
+ (strstr(bd->desktop->exec, "%U")) ||
+ (strstr(bd->desktop->exec, "%f")) ||
+ (strstr(bd->desktop->exec, "%F"))))
+ return 1;
+
+ return 0;
+}
+
+static int
+_exec_border_action(Evry_Action *act)
+{
+ return evry_util_exec_app(act->item1, act->item2);
+}
+
+static int
+_exec_border_intercept(Evry_Action *act)
+{
+ Evry_Item_App *app = E_NEW(Evry_Item_App, 1);
+ E_Border *bd = act->item1->data;
+
+ app->desktop = bd->desktop;
+ act->item1 = EVRY_ITEM(app);
+
+ return 1;
+}
+
+
+static void
+_exec_border_cleanup(Evry_Action *act)
+{
+ ITEM_APP(app, act->item1);
+ E_FREE(app);
+}
+
+
+
+static Eina_Bool
+module_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);
+
+ evry_plugin_register(plugin, 2);
+
+ plugin2 = evry_plugin_new(NULL, "Window Action", type_action, "BORDER", NULL, 0, NULL, NULL,
+ _act_begin, _act_cleanup, _act_fetch, _act_action, _act_item_icon_get, NULL, NULL);
+
+ evry_plugin_register(plugin2, 1);
+ inst = E_NEW(Inst, 1);
+
+ act = evry_action_new("Open File...", "BORDER", "FILE", "APPLICATION",
+ "everything-launch",
+ _exec_border_action, _exec_border_check_item,
+ _exec_border_cleanup, _exec_border_intercept, NULL);
+ evry_action_register(act, 10);
+
+ return EINA_TRUE;
+}
+
+static void
+module_shutdown(void)
+{
+ EVRY_PLUGIN_FREE(plugin);
+ EVRY_PLUGIN_FREE(plugin2);
+ E_FREE(inst);
+
+ evry_action_free(act);
+}
+
+/***************************************************************************/
+/**/
+/* actual module specifics */
+
+static E_Module *module = NULL;
+static Eina_Bool active = EINA_FALSE;
+
+/***************************************************************************/
+/**/
+/* module setup */
+EAPI E_Module_Api e_modapi =
+{
+ E_MODULE_API_VERSION,
+ "everything-windows"
+};
+
+EAPI void *
+e_modapi_init(E_Module *m)
+{
+ module = m;
+
+ if (e_datastore_get("everything_loaded"))
+ active = module_init();
+
+ e_module_delayed_set(m, 1);
+
+ return m;
+}
+
+EAPI int
+e_modapi_shutdown(E_Module *m)
+{
+ if (active && e_datastore_get("everything_loaded"))
+ module_shutdown();
+
+ module = NULL;
+
+ return 1;
+}
+
+EAPI int
+e_modapi_save(E_Module *m)
+{
+ return 1;
+}
+
+/**/
+/***************************************************************************/
+
diff --git a/src/modules/everything-windows/e_mod_main.h b/src/modules/everything-windows/e_mod_main.h
new file mode 100644
index 0000000000..2eb60362ec
--- /dev/null
+++ b/src/modules/everything-windows/e_mod_main.h
@@ -0,0 +1,13 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+#ifndef E_MOD_MAIN_H
+#define E_MOD_MAIN_H
+
+EAPI extern E_Module_Api e_modapi;
+
+EAPI void *e_modapi_init (E_Module *m);
+EAPI int e_modapi_shutdown (E_Module *m);
+EAPI int e_modapi_save (E_Module *m);
+
+#endif
diff --git a/src/modules/everything-windows/module.desktop.in b/src/modules/everything-windows/module.desktop.in
new file mode 100644
index 0000000000..b6250a9093
--- /dev/null
+++ b/src/modules/everything-windows/module.desktop.in
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Type=Link
+Name=Everything Windows
+Icon=e-module
+X-Enlightenment-ModuleType=system
+Comment=Window actions \ No newline at end of file
diff --git a/src/modules/everything/Evry.h b/src/modules/everything/Evry.h
index f60bb6efdd..b1cc691107 100644
--- a/src/modules/everything/Evry.h
+++ b/src/modules/everything/Evry.h
@@ -38,6 +38,10 @@ typedef struct _Evry_Action Evry_Action;
typedef struct _Evry_State Evry_State;
typedef struct _Evry_View Evry_View;
typedef struct _Plugin_Config Plugin_Config;
+typedef struct _History Evry_History;
+typedef struct _History_Entry History_Entry;
+typedef struct _History_Item History_Item;
+typedef struct _Config Evry_Config;
#define EVRY_ITEM(_item) ((Evry_Item *)_item)
#define EVRY_PLUGIN(_plugin) ((Evry_Plugin *) _plugin)
@@ -218,6 +222,49 @@ struct _Evry_State
Evry_View *view;
};
+struct _Config
+{
+ int version;
+ /* position */
+ double rel_x, rel_y;
+ /* size */
+ int width, height;
+
+ Eina_List *modules;
+
+ /* generic plugin config */
+ Eina_List *conf_subjects;
+ Eina_List *conf_actions;
+ Eina_List *conf_objects;
+ Eina_List *conf_views;
+
+ int scroll_animate;
+ double scroll_speed;
+
+ int hide_input;
+ int hide_list;
+
+ int quick_nav;
+
+ const char *cmd_terminal;
+ const char *cmd_sudo;
+
+ int view_mode;
+ int view_zoom;
+
+ int history_sort_mode;
+
+ /* use up/down keys for prev/next in thumb view */
+ int cycle_mode;
+
+ /* not saved data */
+ Eina_List *plugins;
+ Eina_List *actions;
+ Eina_List *views;
+
+ int min_w, min_h;
+};
+
struct _Evry_View
{
Evry_View *id;
@@ -262,6 +309,30 @@ struct _Evry_Action
int priority;
};
+struct _History_Entry
+{
+ Eina_List *items;
+};
+
+struct _History
+{
+ int version;
+ Eina_Hash *subjects;
+ Eina_Hash *actions;
+ double begin;
+};
+
+struct _History_Item
+{
+ const char *plugin;
+ const char *context;
+ const char *input;
+ double last_used;
+ double usage;
+ int count;
+ int transient;
+};
+
/* evry.c */
EAPI void evry_item_select(const Evry_State *s, Evry_Item *it);
EAPI void evry_item_mark(const Evry_State *state, Evry_Item *it, Eina_Bool mark);
@@ -291,6 +362,11 @@ EAPI void evry_action_unregister(Evry_Action *act);
EAPI void evry_view_register(Evry_View *view, int priority);
EAPI void evry_view_unregister(Evry_View *view);
+EAPI void evry_history_load(void);
+EAPI void evry_history_unload(void);
+EAPI void evry_history_add(Eina_Hash *hist, Evry_State *s, const char *ctxt);
+EAPI int evry_history_item_usage_set(Eina_Hash *hist, Evry_Item *it, const char *input, const char *ctxt);
+
EAPI Evry_Plugin *evry_plugin_new(Evry_Plugin *base, const char *name, int type,
const char *type_in, const char *type_out,
int async_fetch, const char *icon, const char *trigger,
@@ -329,4 +405,7 @@ extern EAPI int EVRY_EVENT_ITEM_SELECT;
extern EAPI int EVRY_EVENT_ITEM_CHANGED;
extern EAPI int EVRY_EVENT_ITEMS_UPDATE;
+EAPI extern Evry_History *evry_hist;
+EAPI extern Evry_Config *evry_conf;
+
#endif
diff --git a/src/modules/everything/Makefile.am b/src/modules/everything/Makefile.am
index 697d175dac..fab59638c0 100644
--- a/src/modules/everything/Makefile.am
+++ b/src/modules/everything/Makefile.am
@@ -1,8 +1,6 @@
MAINTAINERCLEANFILES = Makefile.in everything.pc
MODULE = everything
-SUBDIRS = . sources actions views
-
# data files for the module
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
files_DATA = \
@@ -21,7 +19,7 @@ INCLUDES = -I. \
pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
-noinst_LTLIBRARIES = libfoo.la
+# noinst_LTLIBRARIES = libfoo.la
EVRYHEADERS = Evry.h
@@ -34,7 +32,11 @@ module_la_SOURCES = $(EVRYHEADERS) \
evry_history.c \
evry_plug_aggregator.c \
evry_plug_actions.c \
- evry_view_plugin_tabs.c
+ evry_view_plugin_tabs.c \
+ evry_plug_view_thumb.c \
+ evry_plug_preview.c \
+ evry_plug_view_help.c \
+ evry_plug_clipboard.c
module_la_LIBADD = @e_libs@ @dlopen_libs@
module_la_LDFLAGS = -module -avoid-version
@@ -43,10 +45,10 @@ module_la_DEPENDENCIES = $(top_builddir)/config.h
installed_headersdir = $(prefix)/include/@PACKAGE@
installed_headers_DATA = $(EVRYHEADERS)
-libfoo_la_SOURCES = evry.c e_mod_main.h evry_util.c evry_config.c evry_history.c evry_view_plugin_tabs.c
-libfoo_la_LIBADD = @e_libs@ @dlopen_libs@
-libfoo_la_LDFLAGS = -avoid-version
-libfoo_la_DEPENDENCIES = $(top_builddir)/config.h
+# libfoo_la_SOURCES = evry.c e_mod_main.h evry_util.c evry_config.c evry_history.c evry_view_plugin_tabs.c
+# libfoo_la_LIBADD = @e_libs@ @dlopen_libs@
+# libfoo_la_LDFLAGS = -avoid-version
+# libfoo_la_DEPENDENCIES = $(top_builddir)/config.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = everything.pc
diff --git a/src/modules/everything/actions/Makefile.am b/src/modules/everything/actions/Makefile.am
deleted file mode 100644
index 17eb3d7599..0000000000
--- a/src/modules/everything/actions/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-MODULE = everything
-
-# the module .so file
-INCLUDES = -I.. \
- -I$(top_srcdir) \
- -I$(top_srcdir)/src/modules/$(MODULE) \
- -I$(top_srcdir)/src/bin \
- -I$(top_srcdir)/src/lib \
- -I$(top_srcdir)/src/modules \
- @e_cflags@
-
-plugindir = $(libdir)/enlightenment/modules/$(MODULE)/plugins/core/$(MODULE_ARCH)
-
-evry_plug_border_actdir = $(plugindir)
-evry_plug_border_act_LTLIBRARIES = evry_plug_border_act.la
-evry_plug_border_act_la_SOURCES = evry_plug_border_act.c
-evry_plug_border_act_la_LIBADD = @e_libs@ ../libfoo.la
-evry_plug_border_act_la_LDFLAGS = -module -avoid-version
-evry_plug_border_act_la_LIBTOOLFLAGS = --tag=disable-static
-
-evry_plug_clipboarddir = $(plugindir)
-evry_plug_clipboard_LTLIBRARIES = evry_plug_clipboard.la
-evry_plug_clipboard_la_SOURCES = evry_plug_clipboard.c
-evry_plug_clipboard_la_LIBADD = @e_libs@ ../libfoo.la
-evry_plug_clipboard_la_LDFLAGS = -module -avoid-version
-evry_plug_clipboard_la_LIBTOOLFLAGS = --tag=disable-static
-
-evry_plug_wallpaperdir = $(plugindir)
-evry_plug_wallpaper_LTLIBRARIES = evry_plug_wallpaper.la
-evry_plug_wallpaper_la_SOURCES = evry_plug_wallpaper.c
-evry_plug_wallpaper_la_LIBADD = @e_libs@ ../libfoo.la
-evry_plug_wallpaper_la_LDFLAGS = -module -avoid-version
-evry_plug_wallpaper_la_LIBTOOLFLAGS = --tag=disable-static
diff --git a/src/modules/everything/actions/evry_plug_border_act.c b/src/modules/everything/actions/evry_plug_border_act.c
deleted file mode 100644
index 12a8b4b34f..0000000000
--- a/src/modules/everything/actions/evry_plug_border_act.c
+++ /dev/null
@@ -1,279 +0,0 @@
-#include "Evry.h"
-
-
-typedef struct _Inst Inst;
-
-struct _Inst
-{
- E_Border *border;
-};
-
-static Evry_Plugin *plugin = NULL;
-static Inst *inst = NULL;
-static Evry_Action *act = NULL;
-
-static void
-_act_cb_border_switch_to(E_Border *bd)
-{
- E_Zone *zone;
-
- zone = e_util_zone_current_get(e_manager_current_get());
-
- if (bd->desk != (e_desk_current_get(zone)))
- e_desk_show(bd->desk);
-
- if (bd->shaded)
- e_border_unshade(bd, E_DIRECTION_UP);
-
- if (bd->iconic)
- e_border_uniconify(bd);
- else
- e_border_raise(bd);
-
- /* e_border_focus_set(bd, 1, 1); */
- e_border_focus_set_with_pointer(bd);
-}
-
-static void
-_act_cb_border_to_desktop(E_Border *bd)
-{
- E_Zone *zone;
- E_Desk *desk;
- zone = e_util_zone_current_get(e_manager_current_get());
- desk = e_desk_current_get(zone);
-
- e_border_desk_set(bd, desk);
-
- if (bd->shaded)
- e_border_unshade(bd, E_DIRECTION_UP);
-
- if (bd->iconic)
- e_border_uniconify(bd);
- else
- e_border_raise(bd);
-
- /* e_border_focus_set(bd, 1, 1); */
- e_border_focus_set_with_pointer(bd);
-}
-
-static void
-_act_cb_border_fullscreen(E_Border *bd)
-{
- if (!bd->fullscreen)
- e_border_fullscreen(bd, E_FULLSCREEN_RESIZE);
- else
- e_border_unfullscreen(bd);
-}
-
-static void
-_act_cb_border_close(E_Border *bd)
-{
- if (!bd->lock_close) e_border_act_close_begin(bd);
-}
-
-static void
-_act_cb_border_minimize(E_Border *bd)
-{
- if (!bd->lock_user_iconify) e_border_iconify(bd);
-}
-
-static void
-_act_cb_border_unminimize(E_Border *bd)
-{
- if (!bd->lock_user_iconify) e_border_uniconify(bd);
-}
-
-static Evry_Plugin *
-_begin(Evry_Plugin *p __UNUSED__, const Evry_Item *item)
-{
- E_Border *bd;
-
- bd = item->data;
- /* e_object_ref(E_OBJECT(bd)); */
- inst->border = bd;
-
- return p;
-}
-
-static int
-_cb_sort(const void *data1, const void *data2)
-{
- const Evry_Item *it1 = data1;
- const Evry_Item *it2 = data2;
-
- return (it1->fuzzy_match - it2->fuzzy_match);
-}
-
-static void
-_item_add(Evry_Plugin *p, const char *label, void (*action_cb) (E_Border *bd), const char *icon, const char *input)
-{
- Evry_Item *it;
- int match = 1;
-
- if (input)
- match = evry_fuzzy_match(label, input);
-
- if (!match) return;
-
- it = evry_item_new(NULL, p, label, NULL);
- it->icon = eina_stringshare_add(icon);
- it->data = action_cb;
- it->fuzzy_match = match;
-
- p->items = eina_list_prepend(p->items, it);
-}
-
-static void
-_cleanup(Evry_Plugin *p)
-{
- EVRY_PLUGIN_ITEMS_FREE(p);
-}
-
-static int
-_fetch(Evry_Plugin *p, const char *input)
-{
- E_Zone *zone;
- E_Desk *desk;
-
- zone = e_util_zone_current_get(e_manager_current_get());
- desk = e_desk_current_get(zone);
-
- _cleanup(p);
-
- _item_add(p, _("Switch to Window"),
- _act_cb_border_switch_to,
- "go-next", input);
-
- if (desk != inst->border->desk)
- _item_add(p, _("Send to Deskop"),
- _act_cb_border_to_desktop,
- "go-previous", input);
-
- if (inst->border->iconic)
- _item_add(p, _("Uniconify"),
- _act_cb_border_unminimize,
- "window-minimize", input);
- else
- _item_add(p, _("Iconify"),
- _act_cb_border_minimize,
- "window-minimize", input);
-
- if (!inst->border->fullscreen)
- _item_add(p, _("Fullscreen"),
- _act_cb_border_fullscreen,
- "view-fullscreen", input);
- else
- _item_add(p, _("Unfullscreen"),
- _act_cb_border_fullscreen,
- "view-restore", input);
-
- _item_add(p, _("Close"),
- _act_cb_border_close,
- "window-close", input);
-
- if (!p->items) return 0;
-
- EVRY_PLUGIN_ITEMS_SORT(p, _cb_sort);
-
- return 1;
-}
-
-static int
-_action(Evry_Plugin *p __UNUSED__, const Evry_Item *item)
-{
- void (*border_action) (E_Border *bd);
- border_action = item->data;
- border_action(inst->border);
-
- return EVRY_ACTION_FINISHED;
-}
-
-static Evas_Object *
-_item_icon_get(Evry_Plugin *p __UNUSED__, const Evry_Item *it, Evas *e)
-{
- Evas_Object *o;
-
- o = evry_icon_theme_get(it->icon, e);
-
- return o;
-}
-
-
-static int
-_exec_border_check_item(Evry_Action *act __UNUSED__, const Evry_Item *it)
-{
- E_Border *bd = it->data;
- E_OBJECT_CHECK_RETURN(bd, 0);
- E_OBJECT_TYPE_CHECK_RETURN(bd, E_BORDER_TYPE, 0);
-
- if ((bd->desktop && bd->desktop->exec) &&
- ((strstr(bd->desktop->exec, "%u")) ||
- (strstr(bd->desktop->exec, "%U")) ||
- (strstr(bd->desktop->exec, "%f")) ||
- (strstr(bd->desktop->exec, "%F"))))
- return 1;
-
- return 0;
-}
-
-static int
-_exec_border_action(Evry_Action *act)
-{
- return evry_util_exec_app(act->item1, act->item2);
-}
-
-static int
-_exec_border_intercept(Evry_Action *act)
-{
- Evry_Item_App *app = E_NEW(Evry_Item_App, 1);
- E_Border *bd = act->item1->data;
-
- app->desktop = bd->desktop;
- act->item1 = EVRY_ITEM(app);
-
- return 1;
-}
-
-
-static void
-_exec_border_cleanup(Evry_Action *act)
-{
- ITEM_APP(app, act->item1);
- E_FREE(app);
-}
-
-
-
-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);
-
- evry_plugin_register(plugin, 1);
- inst = E_NEW(Inst, 1);
-
- act = evry_action_new("Open File...", "BORDER", "FILE", "APPLICATION",
- "everything-launch",
- _exec_border_action, _exec_border_check_item,
- _exec_border_cleanup, _exec_border_intercept, NULL);
- evry_action_register(act, 10);
-
- return EINA_TRUE;
-}
-
-static void
-_shutdown(void)
-{
- EVRY_PLUGIN_FREE(plugin);
- E_FREE(inst);
-
- evry_action_free(act);
-}
-
-
-EINA_MODULE_INIT(_init);
-EINA_MODULE_SHUTDOWN(_shutdown);
diff --git a/src/modules/everything/actions/evry_plug_clipboard.c b/src/modules/everything/actions/evry_plug_clipboard.c
deleted file mode 100644
index 1ecd412901..0000000000
--- a/src/modules/everything/actions/evry_plug_clipboard.c
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "Evry.h"
-
-
-static Evry_Action *act;
-static Ecore_X_Window clipboard_win = 0;
-
-static int
-_action(Evry_Action *act)
-{
- const Evry_Item *it = act->item1;
-
- ecore_x_selection_primary_set(clipboard_win, it->label, strlen(it->label));
- ecore_x_selection_clipboard_set(clipboard_win, it->label, strlen(it->label));
-
- return 1;
-}
-
-static int
-_check_item(Evry_Action *act __UNUSED__, const Evry_Item *it)
-{
- return (it && it->label && (strlen(it->label) > 0));
-}
-
-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;
-
- act = evry_action_new("Copy to Clipboard", "TEXT", NULL, NULL, "edit-copy",
- _action, _check_item, NULL, NULL, NULL);
-
- evry_action_register(act, 10);
-
- clipboard_win = win;
-
- return EINA_TRUE;
-}
-
-static void
-_shutdown(void)
-{
- ecore_x_window_free(clipboard_win);
- evry_action_free(act);
-}
-
-EINA_MODULE_INIT(_init);
-EINA_MODULE_SHUTDOWN(_shutdown);
-
diff --git a/src/modules/everything/e_mod_main.c b/src/modules/everything/e_mod_main.c
index 7e7811547b..adb383288f 100644
--- a/src/modules/everything/e_mod_main.c
+++ b/src/modules/everything/e_mod_main.c
@@ -9,6 +9,9 @@
#include "e_mod_main.h"
+/* #undef DBG
+ * #define DBG(...) ERR(__VA_ARGS__) */
+
#define CONFIG_VERSION 7
/* actual module specifics */
@@ -22,14 +25,14 @@ static void _config_free(void);
static E_Int_Menu_Augmentation *maug = NULL;
static E_Action *act = NULL;
-static Eina_Array *plugins = NULL;
+/* static Eina_Array *plugins = NULL; */
static E_Config_DD *conf_edd = NULL;
static E_Config_DD *conf_item_edd = NULL;
EAPI int _e_module_evry_log_dom = -1;
-EAPI Config *evry_conf = NULL;
+EAPI Evry_Config *evry_conf = NULL;
EAPI int EVRY_EVENT_ITEM_SELECT;
EAPI int EVRY_EVENT_ITEM_CHANGED;
@@ -42,19 +45,6 @@ EAPI E_Module_Api e_modapi =
"Everything"
};
-static Eina_Bool list_cb(Eina_Module *m, void *data)
-{
- int err;
-
- if ((err = eina_module_load(m)))
- {
- return EINA_TRUE;
- }
-
- ERR("loading failed (%d), %s", err, eina_module_file_get(m));
- return EINA_FALSE;
-}
-
EAPI void *
e_modapi_init(E_Module *m)
{
@@ -78,34 +68,11 @@ e_modapi_init(E_Module *m)
_config_init();
evry_history_init();
-
- snprintf(dir, sizeof(dir), "%s/enlightenment/modules/everything/plugins",
- e_prefix_lib_get());
- files = ecore_file_ls(dir);
- EINA_LIST_FREE(files, file)
- {
- snprintf(buf, sizeof(buf), "%s/%s/%s", dir, file, MODULE_ARCH);
-
- if (ecore_file_is_dir(buf))
- plugins = eina_module_list_get(plugins, buf, 1, &list_cb, NULL);
-
- free(file);
- }
-
- snprintf(dir, sizeof(dir), "%s/.e/e/modules/everything/plugins",
- e_user_homedir_get());
- files = ecore_file_ls(dir);
-
- EINA_LIST_FREE(files, file)
- {
- snprintf(buf, sizeof(buf), "%s/%s/%s", dir, file, MODULE_ARCH);
-
- if (ecore_file_is_dir(buf))
- plugins = eina_module_list_get(plugins, buf, 1, &list_cb, NULL);
-
- free(file);
- }
+ view_thumb_init();
+ view_preview_init();
+ view_help_init();
+ evry_plug_clipboard_init();
/* add module supplied action */
act = e_action_add("everything");
@@ -137,8 +104,13 @@ e_modapi_init(E_Module *m)
if (!EVRY_EVENT_ITEM_CHANGED)
EVRY_EVENT_ITEM_CHANGED = ecore_event_type_new();
- e_module_delayed_set(m, 1);
+ e_module_delayed_set(m, 0);
+
+ /* make sure module is loaded before others */
+ e_module_priority_set(m, -1000);
+ e_datastore_set("everything_loaded", "");
+
return m;
}
@@ -162,14 +134,12 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
e_action_del("everything");
}
- if (plugins)
- {
- eina_module_list_free(plugins);
- eina_array_free(plugins);
- plugins = NULL;
- }
-
+ view_thumb_shutdown();
+ view_preview_shutdown();
+ view_help_shutdown();
+ evry_plug_clipboard_shutdown();
+
while ((cfd = e_config_dialog_get("E", "_config_everything_dialog")))
e_object_del(E_OBJECT(cfd));
@@ -182,6 +152,9 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
/* Clean EET */
E_CONFIG_DD_FREE(conf_item_edd);
E_CONFIG_DD_FREE(conf_edd);
+
+ e_datastore_del("everything_loaded");
+
return 1;
}
@@ -210,9 +183,9 @@ _config_init()
#undef T
#undef D
-#define T Config
+#define T Evry_Config
#define D conf_edd
- conf_edd = E_CONFIG_DD_NEW("Config", Config);
+ conf_edd = E_CONFIG_DD_NEW("Config", Evry_Config);
E_CONFIG_VAL(D, T, version, INT);
E_CONFIG_VAL(D, T, width, INT);
E_CONFIG_VAL(D, T, height, INT);
@@ -245,7 +218,7 @@ _config_init()
if (!evry_conf)
{
- evry_conf = E_NEW(Config, 1);
+ evry_conf = E_NEW(Evry_Config, 1);
evry_conf->version = CONFIG_VERSION;
evry_conf->rel_x = 0.5;
evry_conf->rel_y = 0.33;
@@ -368,8 +341,6 @@ _e_mod_menu_add(void *data __UNUSED__, E_Menu *m)
}
-
-
EAPI int evry_api_version_check(int version)
{
if (EVRY_API_VERSION == version)
@@ -423,6 +394,8 @@ evry_plugin_new(Evry_Plugin *base, const char *name, int type,
p->config_apply = config_apply;
p->aggregate = EINA_TRUE;
p->async_fetch = EINA_FALSE;
+
+ DBG("%s", p->name);
return p;
}
@@ -432,6 +405,8 @@ evry_plugin_free(Evry_Plugin *p, int free_pointer)
{
evry_plugin_unregister(p);
+ DBG("%s", p->name);
+
if (p->name) eina_stringshare_del(p->name);
if (p->type_in) eina_stringshare_del(p->type_in);
if (p->type_out) eina_stringshare_del(p->type_out);
@@ -462,6 +437,8 @@ evry_action_new(const char *name, const char *type_in1, const char *type_in2,
act->cleanup = cleanup;
act->icon = (icon ? eina_stringshare_add(icon) : NULL);
+ DBG("%s", name);
+
return act;
}
@@ -487,6 +464,8 @@ evry_plugin_register(Evry_Plugin *p, int priority)
Eina_List *l, *confs = NULL;
Plugin_Config *pc;
+ DBG("%s", p->name);
+
evry_conf->plugins = eina_list_append(evry_conf->plugins, p);
if (p->type == type_subject)
@@ -539,6 +518,8 @@ evry_plugin_register(Evry_Plugin *p, int priority)
void
evry_plugin_unregister(Evry_Plugin *p)
{
+ DBG("%s", p->name);
+
evry_conf->plugins = eina_list_remove(evry_conf->plugins, p);
if (p->type == type_subject)
diff --git a/src/modules/everything/e_mod_main.h b/src/modules/everything/e_mod_main.h
index 96489e22ab..ed543e69a6 100644
--- a/src/modules/everything/e_mod_main.h
+++ b/src/modules/everything/e_mod_main.h
@@ -4,80 +4,9 @@
#define E_MOD_MAIN_H
-typedef struct _Config Config;
typedef struct _Evry_Selector Evry_Selector;
typedef struct _Tab_View Tab_View;
-typedef struct _History History;
-typedef struct _History_Entry History_Entry;
-typedef struct _History_Item History_Item;
-struct _Config
-{
- int version;
- /* position */
- double rel_x, rel_y;
- /* size */
- int width, height;
-
- /* generic plugin config */
- Eina_List *conf_subjects;
- Eina_List *conf_actions;
- Eina_List *conf_objects;
- Eina_List *conf_views;
-
- int scroll_animate;
- double scroll_speed;
-
- int hide_input;
- int hide_list;
-
- int quick_nav;
-
- const char *cmd_terminal;
- const char *cmd_sudo;
-
- int view_mode;
- int view_zoom;
-
- int history_sort_mode;
-
- /* use up/down keys for prev/next in thumb view */
- int cycle_mode;
-
- /* not saved data */
- Eina_List *plugins;
- Eina_List *actions;
- Eina_List *views;
-
- int min_w, min_h;
-};
-
-
-
-struct _History_Item
-{
- const char *plugin;
- const char *context;
- const char *input;
- double last_used;
- double usage;
- int count;
- int transient;
-};
-
-struct _History_Entry
-{
- Eina_List *items;
-};
-
-struct _History
-{
- int version;
- Eina_Hash *subjects;
- Eina_Hash *actions;
- double begin;
-};
-
struct _Evry_Selector
{
@@ -137,6 +66,18 @@ EAPI E_Config_Dialog *evry_config_dialog(E_Container *con, const char *params);
EAPI Tab_View *evry_tab_view_new(const Evry_State *s, Evas *e);
EAPI void evry_tab_view_free(Tab_View *v);
+Eina_Bool view_thumb_init(void);
+void view_thumb_shutdown(void);
+
+Eina_Bool view_help_init(void);
+void view_help_shutdown(void);
+
+Eina_Bool view_preview_init(void);
+void view_preview_shutdown(void);
+
+Eina_Bool evry_plug_clipboard_init(void);
+void evry_plug_clipboard_shutdown(void);
+
int evry_init(void);
int evry_shutdown(void);
int evry_show(E_Zone *zone, const char *params);
@@ -150,16 +91,11 @@ EAPI void evry_plug_actions_free(Evry_Plugin *plugin);
void evry_history_init(void);
void evry_history_free(void);
-EAPI void evry_history_load(void);
-EAPI void evry_history_unload(void);
-EAPI void evry_history_add(Eina_Hash *hist, Evry_State *s, const char *ctxt);
-EAPI int evry_history_item_usage_set(Eina_Hash *hist, Evry_Item *it, const char *input, const char *ctxt);
EAPI int evry_browse_item(Evry_Selector *sel);
void evry_browse_back(Evry_Selector *sel);
-EAPI extern Config *evry_conf;
-EAPI extern History *evry_hist;
extern Evry_Selector **selectors;
extern const char *action_selector;
+
#endif
diff --git a/src/modules/everything/evry_history.c b/src/modules/everything/evry_history.c
index 4bb602218a..99bcc6a945 100644
--- a/src/modules/everything/evry_history.c
+++ b/src/modules/everything/evry_history.c
@@ -20,7 +20,7 @@ static E_Config_DD *hist_entry_edd = NULL;
static E_Config_DD *hist_item_edd = NULL;
static E_Config_DD *hist_edd = NULL;
-History *evry_hist = NULL;
+Evry_History *evry_hist = NULL;
void
evry_history_init(void)
@@ -45,8 +45,8 @@ evry_history_init(void)
E_CONFIG_LIST(D, T, items, hist_item_edd);
#undef T
#undef D
- hist_edd = E_CONFIG_DD_NEW("History", History);
-#define T History
+ hist_edd = E_CONFIG_DD_NEW("History", Evry_History);
+#define T Evry_History
#define D hist_edd
E_CONFIG_VAL(D, T, version, INT);
E_CONFIG_VAL(D, T, begin, DOUBLE);
@@ -177,7 +177,7 @@ evry_history_load(void)
if (!evry_hist)
{
- evry_hist = E_NEW(History, 1);
+ evry_hist = E_NEW(Evry_History, 1);
evry_hist->version = HISTORY_VERSION;
evry_hist->begin = ecore_time_get();
}
diff --git a/src/modules/everything/sources/Makefile.am b/src/modules/everything/sources/Makefile.am
deleted file mode 100644
index f9d2bfb85f..0000000000
--- a/src/modules/everything/sources/Makefile.am
+++ /dev/null
@@ -1,64 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-MODULE = everything
-
-# the module .so file
-INCLUDES = -I.. \
- -I$(top_srcdir) \
- -I$(top_srcdir)/src/modules/$(MODULE) \
- -I$(top_srcdir)/src/bin \
- -I$(top_srcdir)/src/lib \
- -I$(top_srcdir)/src/modules \
- @e_cflags@
-
-plugindir = $(libdir)/enlightenment/modules/$(MODULE)/plugins/core/$(MODULE_ARCH)
-
-evry_plug_appsdir = $(plugindir)
-evry_plug_apps_LTLIBRARIES = evry_plug_apps.la
-evry_plug_apps_la_SOURCES = evry_plug_apps.c
-evry_plug_apps_la_LIBADD = @e_libs@ ../libfoo.la
-evry_plug_apps_la_LDFLAGS = -module -avoid-version
-evry_plug_apps_la_LIBTOOLFLAGS = --tag=disable-static
-
-evry_plug_borderdir = $(plugindir)
-evry_plug_border_LTLIBRARIES = evry_plug_border.la
-evry_plug_border_la_SOURCES = evry_plug_border.c
-evry_plug_border_la_LIBADD = @e_libs@ ../libfoo.la
-evry_plug_border_la_LDFLAGS = -module -avoid-version
-evry_plug_border_la_LIBTOOLFLAGS = --tag=disable-static
-
-evry_plug_dir_browsedir = $(plugindir)
-evry_plug_dir_browse_LTLIBRARIES = evry_plug_dir_browse.la
-evry_plug_dir_browse_la_SOURCES = evry_plug_dir_browse.c
-evry_plug_dir_browse_la_LIBADD = @e_libs@ ../libfoo.la
-evry_plug_dir_browse_la_LDFLAGS = -module -avoid-version
-evry_plug_dir_browse_la_LIBTOOLFLAGS = --tag=disable-static
-
-evry_plug_calcdir = $(plugindir)
-evry_plug_calc_LTLIBRARIES = evry_plug_calc.la
-evry_plug_calc_la_SOURCES = evry_plug_calc.c
-evry_plug_calc_la_LIBADD = @e_libs@ ../libfoo.la
-evry_plug_calc_la_LDFLAGS = -module -avoid-version
-evry_plug_calc_la_LIBTOOLFLAGS = --tag=disable-static
-
-evry_plug_configdir = $(plugindir)
-evry_plug_config_LTLIBRARIES = evry_plug_config.la
-evry_plug_config_la_SOURCES = evry_plug_config.c
-evry_plug_config_la_LIBADD = @e_libs@ ../libfoo.la
-evry_plug_config_la_LDFLAGS = -module -avoid-version
-evry_plug_config_la_LIBTOOLFLAGS = --tag=disable-static
-
-evry_plug_aspelldir = $(plugindir)
-evry_plug_aspell_LTLIBRARIES = evry_plug_aspell.la
-evry_plug_aspell_la_SOURCES = evry_plug_aspell.c
-evry_plug_aspell_la_LIBADD = @e_libs@ ../libfoo.la
-evry_plug_aspell_la_LDFLAGS = -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 = -module -avoid-version
-evry_plug_text_la_LIBTOOLFLAGS = --tag=disable-static
-
-
diff --git a/src/modules/everything/sources/evry_plug_border.c b/src/modules/everything/sources/evry_plug_border.c
deleted file mode 100644
index 20a3141a30..0000000000
--- a/src/modules/everything/sources/evry_plug_border.c
+++ /dev/null
@@ -1,260 +0,0 @@
-#include "e.h"
-#include "e_mod_main.h"
-
-static Evry_Plugin *plugin;
-static Eina_List *handlers = NULL;
-static Eina_Hash *border_hash = NULL;
-
-static int
-_cb_border_remove(void *data, int type, void *event)
-{
- E_Event_Border_Remove *ev = event;
- Evry_Item *it;
- Evry_Plugin *p = data;
-
- it = eina_hash_find(border_hash, &(ev->border));
-
- if (!it) return 1;
-
- p->items = eina_list_remove(p->items, it);
- eina_hash_del_by_key(border_hash, &(ev->border));
-
- evry_plugin_async_update(p, EVRY_ASYNC_UPDATE_ADD);
-
- return 1;
-}
-
-static void _hash_free(void *data)
-{
- Evry_Item *it = data;
-
- evry_item_free(it);
-}
-
-static Evry_Plugin *
-_begin(Evry_Plugin *p, const Evry_Item *it)
-{
- handlers = eina_list_append
- (handlers, ecore_event_handler_add
- (E_EVENT_BORDER_REMOVE, _cb_border_remove, p));
-
- border_hash = eina_hash_pointer_new(_hash_free);
-
- return p;
-}
-
-static void
-_cleanup(Evry_Plugin *p)
-{
- Ecore_Event_Handler *h;
-
- EINA_LIST_FREE(handlers, h)
- ecore_event_handler_del(h);
-
- if (border_hash) eina_hash_free(border_hash);
- border_hash = NULL;
-
- EVRY_PLUGIN_ITEMS_CLEAR(p);
-}
-
-static void
-_item_free(Evry_Item *it)
-{
- if (it->data)
- e_object_unref(E_OBJECT(it->data));
-
- E_FREE(it);
-}
-
-static void
-_item_add(Evry_Plugin *p, E_Border *bd, int match, int *prio)
-{
- Evry_Item *it = NULL;
-
- if ((it = eina_hash_find(border_hash, &bd)))
- {
- it->priority = *prio;
- EVRY_PLUGIN_ITEM_APPEND(p, it);
- it->fuzzy_match = match;
- *prio += 1;
- return;
- }
-
- it = evry_item_new(NULL, p, e_border_name_get(bd), _item_free);
-
- e_object_ref(E_OBJECT(bd));
- it->data = bd;
- it->fuzzy_match = match;
- it->priority = *prio;
- it->transient = EINA_TRUE;
- it->id = eina_stringshare_add(e_util_winid_str_get(bd->win));
-
- *prio += 1;
-
- eina_hash_add(border_hash, &bd, it);
-
- EVRY_PLUGIN_ITEM_APPEND(p, it);
-}
-
-static int
-_cb_sort(const void *data1, const void *data2)
-{
- const Evry_Item *it1 = data1;
- const Evry_Item *it2 = data2;
-
- if (it1->fuzzy_match - it2->fuzzy_match)
- return (it1->fuzzy_match - it2->fuzzy_match);
-
- return (it1->priority - it2->priority);
-}
-
-static int
-_fetch(Evry_Plugin *p, const char *input)
-{
- E_Zone *zone;
- E_Border *bd;
- Eina_List *l;
- int prio = 0;
- int m1, m2;
-
- EVRY_PLUGIN_ITEMS_CLEAR(p);
-
- zone = e_util_zone_current_get(e_manager_current_get());
-
- EINA_LIST_FOREACH(e_border_focus_stack_get(), l, bd)
- {
- if (zone == bd->zone)
- {
- if (!input)
- _item_add(p, bd, 0, &prio);
- else
- {
- m1 = evry_fuzzy_match(e_border_name_get(bd), input);
-
- if (bd->client.icccm.name)
- {
- m2 = evry_fuzzy_match(bd->client.icccm.name, input);
- if (!m1 || (m2 && m2 < m1))
- m1 = m2;
- }
-
- if (bd->desktop)
- {
- m2 = evry_fuzzy_match(bd->desktop->name, input);
- if (!m1 || (m2 && m2 < m1))
- m1 = m2;
- }
-
- if (m1)
- _item_add(p, bd, m1, &prio);
- }
- }
- }
-
- if (!p->items) return 0;
-
- EVRY_PLUGIN_ITEMS_SORT(p, _cb_sort);
-
- return 1;
-}
-
-static Evas_Object *
-_item_icon_get(Evry_Plugin *p __UNUSED__, const Evry_Item *it, Evas *e)
-{
- Evas_Object *o = NULL;
- E_Border *bd = it->data;
-
- if (bd->internal)
- {
- o = edje_object_add(e);
- if (!bd->internal_icon)
- e_util_edje_icon_set(o, "enlightenment/e");
- else
- {
- if (!bd->internal_icon_key)
- {
- char *ext;
- ext = strrchr(bd->internal_icon, '.');
- if ((ext) && ((!strcmp(ext, ".edj"))))
- {
- if (!edje_object_file_set(o, bd->internal_icon, "icon"))
- e_util_edje_icon_set(o, "enlightenment/e");
- }
- else if (ext)
- {
- evas_object_del(o);
- o = e_icon_add(e);
- e_icon_file_set(o, bd->internal_icon);
- }
- else
- {
- if (!e_util_edje_icon_set(o, bd->internal_icon))
- e_util_edje_icon_set(o, "enlightenment/e");
- }
- }
- else
- {
- edje_object_file_set(o, bd->internal_icon,
- bd->internal_icon_key);
- }
- }
- return o;
- }
-
- if (!o && bd->desktop)
- o = e_util_desktop_icon_add(bd->desktop, 128, e);
-
- if (!o && bd->client.netwm.icons)
- {
- int i, size, tmp, found = 0;
- o = e_icon_add(e);
-
- size = bd->client.netwm.icons[0].width;
-
- for (i = 1; i < bd->client.netwm.num_icons; i++)
- {
- if ((tmp = bd->client.netwm.icons[i].width) > size)
- {
- size = tmp;
- found = i;
- }
- }
-
- e_icon_data_set(o, bd->client.netwm.icons[found].data,
- bd->client.netwm.icons[found].width,
- bd->client.netwm.icons[found].height);
- e_icon_alpha_set(o, 1);
- return o;
- }
-
- if (!o)
- o = e_border_icon_add(bd, e);
-
- return o;
-}
-
-
-
-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);
-
- evry_plugin_register(plugin, 2);
-
- return EINA_TRUE;
-}
-
-static void
-_shutdown(void)
-{
- EVRY_PLUGIN_FREE(plugin);
-}
-
-
-EINA_MODULE_INIT(_init);
-EINA_MODULE_SHUTDOWN(_shutdown);
diff --git a/src/modules/everything/sources/evry_plug_text.c b/src/modules/everything/sources/evry_plug_text.c
deleted file mode 100644
index 74b6e0117e..0000000000
--- a/src/modules/everything/sources/evry_plug_text.c
+++ /dev/null
@@ -1,60 +0,0 @@
-#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);
-
- if (input)
- {
- it = evry_item_new(NULL, p, input, NULL);
- it->fuzzy_match = 9999;
- EVRY_PLUGIN_ITEM_APPEND(p, it);
-
- return 1;
- }
-
- return 0;
-}
-
-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);
-
- p2 = evry_plugin_new(NULL, "Text", type_object, NULL, "TEXT", 1, "accessories-text-editor", NULL,
- NULL, _cleanup, _fetch, NULL, NULL, NULL, NULL);
-
- evry_plugin_register(p1, 100);
- evry_plugin_register(p2, 100);
-
- return EINA_TRUE;
-}
-
-static void
-_shutdown(void)
-{
- EVRY_PLUGIN_FREE(p1);
- EVRY_PLUGIN_FREE(p2);
-}
-
-
-EINA_MODULE_INIT(_init);
-EINA_MODULE_SHUTDOWN(_shutdown);
diff --git a/src/modules/everything/views/Makefile.am b/src/modules/everything/views/Makefile.am
deleted file mode 100644
index a6a736330f..0000000000
--- a/src/modules/everything/views/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-MODULE = everything
-
-# the module .so file
-INCLUDES = -I.. \
- -I$(top_srcdir) \
- -I$(top_srcdir)/src/modules/$(MODULE) \
- -I$(top_srcdir)/src/bin \
- -I$(top_srcdir)/src/lib \
- -I$(top_srcdir)/src/modules \
- @e_cflags@
-
-plugindir = $(libdir)/enlightenment/modules/$(MODULE)/plugins/core/$(MODULE_ARCH)
-
-evry_plug_previewdir = $(plugindir)
-evry_plug_preview_LTLIBRARIES = evry_plug_preview.la
-evry_plug_preview_la_SOURCES = evry_plug_preview.c
-evry_plug_preview_la_LIBADD = @e_libs@ ../libfoo.la
-evry_plug_preview_la_LDFLAGS = -module -avoid-version
-evry_plug_preview_la_LIBTOOLFLAGS = --tag=disable-static
-
-evry_plug_view_helpdir = $(plugindir)
-evry_plug_view_help_LTLIBRARIES = evry_plug_view_help.la
-evry_plug_view_help_la_SOURCES = evry_plug_view_help.c
-evry_plug_view_help_la_LIBADD = @e_libs@ ../libfoo.la
-evry_plug_view_help_la_LDFLAGS = -module -avoid-version
-evry_plug_view_help_la_LIBTOOLFLAGS = --tag=disable-static
-
-evry_plug_view_thumbdir = $(plugindir)
-evry_plug_view_thumb_LTLIBRARIES = evry_plug_view_thumb.la
-evry_plug_view_thumb_la_SOURCES = evry_plug_view_thumb.c
-evry_plug_view_thumb_la_LIBADD = @e_libs@ ../libfoo.la
-evry_plug_view_thumb_la_LDFLAGS = -module -avoid-version
-evry_plug_view_thumb_la_LIBTOOLFLAGS = --tag=disable-static
-
-
diff --git a/src/modules/everything/views/evry_plug_preview.c b/src/modules/everything/views/evry_plug_preview.c
deleted file mode 100644
index 1a66718857..0000000000
--- a/src/modules/everything/views/evry_plug_preview.c
+++ /dev/null
@@ -1,266 +0,0 @@
-#include "Evry.h"
-
-typedef struct _Image_View Image_View;
-
-
-struct _Image_View
-{
- Evry_View view;
- Evas *evas;
-
- const Evry_State *state;
-
- Evas_Object *o_main;
-
- Eina_List *items;
- Evas_Object *o_thumb[4];
-};
-
-
-static Evry_View *view = NULL;
-static const char *view_types = NULL;
-
-static int
-_check_item(const Evry_Item *it)
-{
- if (!it || it->plugin->type_out != view_types) return 0;
-
- ITEM_FILE(file, it);
-
- if (!file->path || !file->mime) return 0;
-
- if (!strncmp(file->mime, "image/", 6))
- return 1;
-
- return 0;
-}
-
-static void
-_cb_preview_thumb_gen(void *data, Evas_Object *obj, void *event_info)
-{
- Evas_Coord w, h;
- Image_View *v = data;
-
- e_icon_size_get(v->o_thumb[1], &w, &h);
- edje_extern_object_min_size_set(v->o_thumb[1], w, h);
- edje_object_part_swallow(v->o_main, "e.swallow.icon2", v->o_thumb[1]);
- evas_object_show(v->o_thumb[1]);
-}
-
-void
-_show_item(Image_View *v, const Evry_Item_File *file, int dir)
-{
- int w, h;
-
- if (v->o_thumb[1 + dir])
- {
- e_thumb_icon_end(v->o_thumb[1+dir]);
- edje_object_part_unswallow(v->o_main, v->o_thumb[1+dir]);
- evas_object_hide(v->o_thumb[1+dir]);
- evas_object_del(v->o_thumb[1+dir]);
- }
-
- if (dir && v->o_thumb[1])
- {
- edje_object_part_unswallow(v->o_main, v->o_thumb[1]);
-
- if (dir > 0)
- {
- v->o_thumb[2] = v->o_thumb[1];
- edje_object_part_swallow(v->o_main, "e.swallow.icon1", v->o_thumb[2]);
- }
- else
- {
- v->o_thumb[0] = v->o_thumb[1];
- edje_object_part_swallow(v->o_main, "e.swallow.icon3", v->o_thumb[0]);
- }
- }
-
- v->o_thumb[1] = e_thumb_icon_add(v->evas);
- e_thumb_icon_file_set(v->o_thumb[1], file->path, NULL);
- evas_object_smart_callback_add(v->o_thumb[1], "e_thumb_gen", _cb_preview_thumb_gen, v);
- edje_object_part_geometry_get(v->o_main, "e.swallow.icon2", NULL, NULL, &w, &h);
- e_thumb_icon_size_set(v->o_thumb[1], w, h);
- e_thumb_icon_begin(v->o_thumb[1]);
-
- if (dir)
- {
- if (dir > 0)
- edje_object_signal_emit(v->o_main, "e,signal,slide_left", "e");
- else
- edje_object_signal_emit(v->o_main, "e,signal,slide_right", "e");
- }
-}
-
-static int
-_cb_key_down(Evry_View *view, const Ecore_Event_Key *ev)
-{
- Image_View *v = (Image_View *) view;
-
- Eina_List *l;
- Evry_Item_File *file = NULL;
-
- ITEM_FILE(cur_item, v->state->cur_item);
-
- if (!strcmp(ev->key, "Down"))
- {
- if (!v->items) return 1;
-
- l = eina_list_data_find_list(v->items, cur_item);
-
- if (l && l->next)
- file = l->next->data;
- else
- file = v->items->data;
-
- if (file && (file != cur_item))
- {
- _show_item(v, file, 1);
- evry_item_select(v->state, EVRY_ITEM(file));
- }
- return 1;
- }
- else if (!strcmp(ev->key, "Up"))
- {
- if (!v->items) return 1;
-
- l = eina_list_data_find_list(v->items, cur_item);
-
- if (l && l->prev)
- file = l->prev->data;
- else
- file = eina_list_last(v->items)->data;
-
- if (file && (file != cur_item))
- {
- _show_item(v, file, -1);
- evry_item_select(v->state, EVRY_ITEM(file));
- }
- return 1;
- }
-
- return 0;
-}
-
-static void
-_view_clear(Evry_View *view)
-{
- Image_View *v = (Image_View *) view;
-
- if (v->o_thumb[0]) evas_object_del(v->o_thumb[0]);
- v->o_thumb[0] = NULL;
- if (v->o_thumb[1]) evas_object_del(v->o_thumb[1]);
- v->o_thumb[1] = NULL;
- if (v->o_thumb[2]) evas_object_del(v->o_thumb[2]);
- v->o_thumb[2] = NULL;
- if (v->items) eina_list_free(v->items);
- v->items = NULL;
-}
-
-static Eina_List *
-_get_list(const Evry_State *s)
-{
- Eina_List *l, *items = NULL;
- Evry_Item *it;
-
- EINA_LIST_FOREACH(s->plugin->items, l, it)
- if (_check_item(it))
- items = eina_list_append(items, it);
-
- return items;
-}
-
-static int
-_view_update(Evry_View *view)
-{
- Image_View *v = (Image_View *) view;
- Evry_Item_File *file;
- Evry_Item *selected = v->state->cur_item;
-
- v->items = _get_list(v->state);
- if (!v->items) return 0;
-
- file = eina_list_data_find(v->items, selected);
- if (!file)
- {
- file = v->items->data;
- evry_item_select(v->state, EVRY_ITEM(file));
- }
-
- _show_item(v, file, 0);
-
- return 1;
-}
-
-static Evry_View *
-_view_create(Evry_View *view, const Evry_State *s, const Evas_Object *swallow)
-{
- Image_View *v;
- int w, h, x, y;
-
- if (!s->plugin)
- return NULL;
-
- if (!_get_list(s))
- return NULL;
-
- v = E_NEW(Image_View, 1);
- v->view = *view;
- v->state = s;
- v->evas = evas_object_evas_get(swallow);
- v->o_main = edje_object_add(v->evas);
- e_theme_edje_object_set(v->o_main, "base/theme/everything",
- "e/modules/everything/preview");
-
- edje_object_part_geometry_get(swallow, "e.swallow.list", &x, &y, &w, &h);
- edje_extern_object_min_size_set(v->o_main, w * 3, 100);
- evas_object_resize(v->o_main, w * 3, h);
-
- EVRY_VIEW(v)->o_list = v->o_main;
-
- return EVRY_VIEW(v);
-}
-
-static void
-_view_destroy(Evry_View *view)
-{
- Image_View *v = (Image_View *) view;
-
- _view_clear(view);
- evas_object_del(v->o_main);
-
- E_FREE(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 = "Image Viewer";
- view->create = &_view_create;
- view->destroy = &_view_destroy;
- view->update = &_view_update;
- view->clear = &_view_clear;
- view->cb_key_down = &_cb_key_down;
- evry_view_register(view, 3);
-
- view_types = eina_stringshare_add("FILE");
-
- return EINA_TRUE;
-}
-
-static void
-_shutdown(void)
-{
- eina_stringshare_del(view_types);
- evry_view_unregister(view);
- E_FREE(view);
-}
-
-
-EINA_MODULE_INIT(_init);
-EINA_MODULE_SHUTDOWN(_shutdown);
diff --git a/src/modules/everything/views/evry_plug_view_help.c b/src/modules/everything/views/evry_plug_view_help.c
deleted file mode 100644
index 4c453d5ef1..0000000000
--- a/src/modules/everything/views/evry_plug_view_help.c
+++ /dev/null
@@ -1,139 +0,0 @@
-#include "Evry.h"
-
-static Evry_View *view;
-static Evas_Object *o_text = NULL;
-
-static void
-_view_clear(Evry_View *v)
-{
- v->active = 0;
- evas_object_del(v->o_list);
- evas_object_del(o_text);
- o_text = NULL;
-}
-
-
-static int
-_view_update(Evry_View *v)
-{
- return 1;
-}
-
-static int
-_cb_key_down(Evry_View *v, const Ecore_Event_Key *ev)
-{
- Evas_Object *o;
- double align;
- int h;
-
- if (!strcmp(ev->key, "Down"))
- {
- o = v->o_list;
- evas_object_geometry_get(o, NULL, NULL, NULL, &h);
- e_box_align_get(o, NULL, &align);
-
- align = align - (double)10/(double)h;
- if (align < 0.0) align = 0.0;
-
- e_box_align_set(v->o_list, 0.5, align);
-
- return 1;
- }
- else if (!strcmp(ev->key, "Up"))
- {
- o = v->o_list;
- evas_object_geometry_get(o, NULL, NULL, NULL, &h);
- e_box_align_get(o, NULL, &align);
-
- align = align + (double)10/(double)h;
- if (align > 1.0) align = 1.0;
-
- e_box_align_set(v->o_list, 0.5, align);
- return 1;
- }
-
- return 0;
-}
-
-static Evry_View *
-_view_create(Evry_View *v, const Evry_State *s, const Evas_Object *swallow)
-{
- Evas_Object *o;
- int mw, mh;
-
- char *text =
- "<title><b>Welcome!</b></title>"
- "Ok, here comes the explanation of <hilight>everything</hilight>...<br>"
- "Just type a few letters of the thing you are looking for. <br>"
- "Use cursor <hilight>&lt;up/down&gt;</hilight> to choose from the list of things.<br>"
- "Press <hilight>&lt;tab&gt;</hilight> to select "
- "an action, then press <hilight>&lt;return&gt;</hilight>.<br>"
- /* "You might want to know <br>some mo keybinding to ease your experience though.<br>" */
- "<hilight>&lt;space&gt;&lt;?&gt;</hilight> show this page<br>"
- "<hilight>&lt;ctrl+letter&gt;</hilight> jump to plugin beginning with 'letter'<br>"
- "<hilight>&lt;ctrl+left/right&gt;</hilight>"
- "cycle through plugins<br>"
- "<hilight>&lt;ctrl+1&gt;</hilight> "
- "choose a different view (e.g. for images)<br>";
-
- if (v->active) return v;
-
- o = e_box_add(evas_object_evas_get(swallow));
- e_box_orientation_set(o, 0);
- e_box_align_set(o, 0.5, 1.0);
- v->o_list = o;
- e_box_freeze(v->o_list);
- o = edje_object_add(evas_object_evas_get(swallow));
- e_theme_edje_object_set(o, "base/theme/widgets",
- "e/widgets/textblock");
-
- edje_object_part_text_set(o, "e.textblock.text", text);
- e_box_pack_start(v->o_list, o);
- edje_object_size_min_calc(o, &mw, &mh);
- e_box_pack_options_set(o, 1, 0, 1, 0, 0.5, 0.5, mw, mh + 200, 999, 999);
- e_box_thaw(v->o_list);
- evas_object_show(o);
- o_text = o;
-
- v->active = 1;
-
- return v;
-}
-
-static void
-_view_destroy(Evry_View *v)
-{
- v->active = 0;
-}
-
-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";
- view->create = &_view_create;
- view->destroy = &_view_destroy;
- view->update = &_view_update;
- view->clear = &_view_clear;
- view->cb_key_down = &_cb_key_down;
- view->trigger = "?";
- /* view->types = "NONE"; */
- evry_view_register(view, 2);
-
- return EINA_TRUE;
-}
-
-static void
-_shutdown(void)
-{
- evry_view_unregister(view);
- E_FREE(view);
-}
-
-
-EINA_MODULE_INIT(_init);
-EINA_MODULE_SHUTDOWN(_shutdown);
diff --git a/src/modules/everything/views/evry_plug_view_thumb.c b/src/modules/everything/views/evry_plug_view_thumb.c
deleted file mode 100644
index e5c4afab23..0000000000
--- a/src/modules/everything/views/evry_plug_view_thumb.c
+++ /dev/null
@@ -1,1087 +0,0 @@
-#include "e_mod_main.h"
-
-typedef struct _View View;
-typedef struct _Smart_Data Smart_Data;
-typedef struct _Item Item;
-
-struct _View
-{
- Evry_View view;
- Tab_View *tabs;
-
- const Evry_State *state;
- const Evry_Plugin *plugin;
-
- Evas *evas;
- Evas_Object *bg, *sframe, *span;
- int iw, ih;
- int zoom;
- int list_mode;
-
- Eina_List *handlers;
-};
-
-/* smart object based on wallpaper module */
-struct _Smart_Data
-{
- View *view;
- Eina_List *items;
- Item *cur_item;
- Ecore_Idle_Enterer *idle_enter;
- Ecore_Idle_Enterer *thumb_idler;
- Ecore_Idle_Enterer *update_idler;
- Ecore_Animator *animator;
- Evas_Coord x, y, w, h;
- Evas_Coord cx, cy, cw, ch;
- Evas_Coord sx, sy;
- double selmove;
- Eina_Bool update : 1;
- Eina_Bool switch_mode : 1;
- Eina_List *queue;
-};
-
-struct _Item
-{
- Evry_Item *item;
- Evas_Object *obj;
- Evas_Coord x, y, w, h;
- Evas_Object *frame, *image, *thumb;
- Eina_Bool selected : 1;
- Eina_Bool have_thumb : 1;
- Eina_Bool do_thumb : 1;
- Eina_Bool get_thumb : 1;
- Eina_Bool showing : 1;
- Eina_Bool visible : 1;
- Eina_Bool changed : 1;
- int pos;
-};
-
-static View *view = NULL;
-static const char *view_types = NULL;
-
-static void
-_thumb_gen(void *data, Evas_Object *obj, void *event_info)
-{
- Evas_Coord w, h;
- Item *it = data;
-
- if (!it->frame) return;
-
- e_icon_size_get(it->thumb, &w, &h);
- edje_extern_object_aspect_set(it->thumb, EDJE_ASPECT_CONTROL_BOTH, w, h);
- edje_object_part_swallow(it->frame, "e.swallow.thumb", it->thumb);
- evas_object_show(it->thumb);
- it->have_thumb = EINA_TRUE;
- it->do_thumb = EINA_FALSE;
-
- if (it->image) evas_object_del(it->image);
- it->image = NULL;
-
-}
-
-static int
-_check_item(const Evry_Item *it)
-{
- if (it->plugin->type_out != view_types) return 0;
-
- ITEM_FILE(file, it);
-
- if (!file->path || !file->mime) return 0;
-
- if (!strncmp(file->mime, "image/", 6))
- return 1;
-
- return 0;
-}
-
-static int
-_thumb_idler(void *data)
-{
- Smart_Data *sd = data;
- Eina_List *l, *ll;
- Item *it;
-
- EINA_LIST_FOREACH_SAFE(sd->queue, l, ll, it)
- {
- if (!it->image && !it->have_thumb &&
- sd->view->state->plugin &&
- sd->view->state->plugin->icon_get)
- {
- it->image = sd->view->state->plugin->icon_get
- (it->item->plugin, it->item, sd->view->evas);
-
- if (it->image)
- {
- edje_object_part_swallow(it->frame, "e.swallow.icon", it->image);
- evas_object_show(it->image);
- }
-
- /* dirbrowse fetches the mimetype for icon_get */
- if (!it->get_thumb && _check_item(it->item))
- it->get_thumb = EINA_TRUE;
- }
-
- if (it->get_thumb && !it->thumb && !(it->have_thumb || it->do_thumb))
- {
- it->thumb = e_thumb_icon_add(sd->view->evas);
-
- ITEM_FILE(file, it->item);
-
- evas_object_smart_callback_add(it->thumb, "e_thumb_gen", _thumb_gen, it);
-
- e_thumb_icon_file_set(it->thumb, file->path, NULL);
- e_thumb_icon_size_set(it->thumb, it->w, it->h);
- e_thumb_icon_begin(it->thumb);
- it->do_thumb = EINA_TRUE;
- }
-
- sd->queue = eina_list_remove_list(sd->queue, l);
- e_util_wakeup();
- return 1;
- }
-
- sd->thumb_idler = NULL;
-
- return 0;
-}
-
-static int
-_e_smart_reconfigure_do(void *data)
-{
- Evas_Object *obj = data;
- Smart_Data *sd = evas_object_smart_data_get(obj);
- Eina_List *l;
- Item *it;
- int iw, redo = 0, changed = 0;
- static int recursion = 0;
- Evas_Coord x, y, xx, yy, ww, hh, mw, mh, ox = 0, oy = 0;
- Evas_Coord aspect_w, aspect_h;
-
- if (!sd) return 0;
- if (sd->cx > (sd->cw - sd->w)) sd->cx = sd->cw - sd->w;
- if (sd->cy > (sd->ch - sd->h)) sd->cy = sd->ch - sd->h;
- if (sd->cx < 0) sd->cx = 0;
- if (sd->cy < 0) sd->cy = 0;
-
- aspect_w = sd->w;
- aspect_h = sd->h;
-
- if (sd->view->list_mode)
- {
- iw = sd->w;
- }
- else if (sd->view->zoom == 0)
- {
- int cnt = eina_list_count(sd->items);
-
- aspect_w *= 3;
- aspect_w /= 4;
-
- if (cnt < 3)
- iw = (double)sd->w / 2.5;
- else if (cnt < 7)
- iw = sd->w / 3;
- else
- iw = sd->w / 4;
- }
- else if (sd->view->zoom == 1)
- {
- aspect_w *= 2;
- aspect_w /= 3;
- iw = sd->w / 3;
- }
- else /* if (sd->zoom == 2) */
- {
- iw = sd->w;
- }
-
- if (aspect_w <= 0) aspect_w = 1;
- if (aspect_h <= 0) aspect_h = 1;
-
- x = 0;
- y = 0;
- ww = iw;
- if (sd->view->list_mode)
- hh = 32;
- else
- hh = (aspect_h * iw) / (aspect_w);
-
- mw = mh = 0;
- EINA_LIST_FOREACH(sd->items, l, it)
- {
- if (x > (sd->w - ww))
- {
- x = 0;
- y += hh;
- }
-
- it->x = x;
- it->y = y;
- it->w = ww;
- it->h = hh;
-
- if ((x + ww) > mw) mw = x + ww;
- if ((y + hh) > mh) mh = y + hh;
- x += ww;
- }
-
- if ((mw != sd->cw) || (mh != sd->ch))
- {
- sd->cw = mw;
- sd->ch = mh;
- if (sd->cx > (sd->cw - sd->w))
- {
- sd->cx = sd->cw - sd->w;
- redo = 1;
- }
- if (sd->cy > (sd->ch - sd->h))
- {
- sd->cy = sd->ch - sd->h;
- redo = 1;
- }
- if (sd->cx < 0)
- {
- sd->cx = 0;
- redo = 1;
- }
- if (sd->cy < 0)
- {
- sd->cy = 0;
- redo = 1;
- }
- if (redo)
- {
- recursion = 1;
- _e_smart_reconfigure_do(obj);
- recursion = 0;
- }
- changed = 1;
- }
-
- if (sd->switch_mode)
- {
- if (changed)
- evas_object_smart_callback_call(obj, "changed", NULL);
-
- sd->update = EINA_TRUE;
- sd->switch_mode = EINA_FALSE;
-
- if (recursion == 0)
- sd->idle_enter = NULL;
- return 0;
- }
-
- if (!sd->view->list_mode)
- {
- if (sd->w > sd->cw) ox = (sd->w - sd->cw) / 2;
- if (sd->h > sd->ch) oy = (sd->h - sd->ch) / 2;
- }
-
- EINA_LIST_FOREACH(sd->items, l, it)
- {
- xx = sd->x - sd->cx + it->x + ox;
- yy = sd->y - sd->cy + it->y + oy;
-
- if (E_INTERSECTS(xx, yy, it->w, it->h, 0, sd->y - (it->h*4),
- sd->x + sd->w, sd->y + sd->h + it->h*8))
- {
- if (!it->visible)
- {
- if (!it->frame)
- {
- it->frame = edje_object_add(sd->view->evas);
- if (sd->view->list_mode)
- e_theme_edje_object_set(it->frame, "base/theme/widgets",
- "e/modules/everything/thumbview/item/list");
- else
- e_theme_edje_object_set(it->frame, "base/theme/widgets",
- "e/modules/everything/thumbview/item/thumb");
-
- evas_object_smart_member_add(it->frame, obj);
- evas_object_clip_set(it->frame, evas_object_clip_get(obj));
- }
-
- edje_object_part_text_set(it->frame, "e.text.label", it->item->label);
- evas_object_show(it->frame);
-
- if (it->changed)
- edje_object_signal_emit(it->frame, "e,action,thumb,show_delayed", "e");
- else
- edje_object_signal_emit(it->frame, "e,action,thumb,show", "e");
-
- if (it->item->browseable)
- edje_object_signal_emit(it->frame, "e,state,browseable", "e");
-
- it->visible = EINA_TRUE;
- }
-
- if (!eina_list_data_find(sd->queue, it))
- {
- sd->queue = eina_list_append(sd->queue, it);
- }
-
- evas_object_move(it->frame, xx, yy);
- evas_object_resize(it->frame, it->w, it->h);
-
- /* if (sd->update || it->changed)
- * {
- * if (it->selected && sd->view->zoom < 2)
- * edje_object_signal_emit(it->frame, "e,state,selected", "e");
- * else
- * edje_object_signal_emit(it->frame, "e,state,unselected", "e");
- * } */
- }
- else if (it->visible)
- {
- sd->queue = eina_list_remove(sd->queue, it);
- if (it->do_thumb) e_thumb_icon_end(it->thumb);
- if (it->thumb) evas_object_del(it->thumb);
- if (it->image) evas_object_del(it->image);
- if (it->frame) evas_object_del(it->frame);
-
- it->thumb = NULL;
- it->image = NULL;
- it->frame = NULL;
-
- it->have_thumb = EINA_FALSE;
- it->do_thumb = EINA_FALSE;
- it->visible = EINA_FALSE;
- }
- it->changed = EINA_FALSE;
- }
-
- if (changed)
- evas_object_smart_callback_call(obj, "changed", NULL);
-
- if (!sd->thumb_idler)
- sd->thumb_idler = ecore_idle_enterer_before_add(_thumb_idler, sd);
-
- sd->update = EINA_TRUE;
-
- if (recursion == 0)
- sd->idle_enter = NULL;
- return 0;
-}
-
-static void
-_e_smart_reconfigure(Evas_Object *obj)
-{
- Smart_Data *sd = evas_object_smart_data_get(obj);
-
- if (sd->idle_enter) return;
- sd->idle_enter = ecore_idle_enterer_before_add(_e_smart_reconfigure_do, obj);
-}
-
-static void
-_e_smart_add(Evas_Object *obj)
-{
- Smart_Data *sd = calloc(1, sizeof(Smart_Data));
- if (!sd) return;
- sd->x = sd->y = sd->w = sd->h = 0;
- sd->sx = sd->sy = -1;
- evas_object_smart_data_set(obj, sd);
-}
-
-static void
-_e_smart_del(Evas_Object *obj)
-{
- Smart_Data *sd = evas_object_smart_data_get(obj);
- Item *it;
-
- if (sd->idle_enter)
- ecore_idle_enterer_del(sd->idle_enter);
- if (sd->thumb_idler)
- ecore_idle_enterer_del(sd->thumb_idler);
-
- // sd->view is just referenced
- // sd->child_obj is unused
- EINA_LIST_FREE(sd->items, it)
- {
- if (it->do_thumb) e_thumb_icon_end(it->thumb);
- if (it->thumb) evas_object_del(it->thumb);
- if (it->frame) evas_object_del(it->frame);
- if (it->image) evas_object_del(it->image);
- evry_item_free(it->item);
- free(it);
- }
- free(sd);
- evas_object_smart_data_set(obj, NULL);
-}
-
-static void
-_e_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
-{
- Smart_Data *sd = evas_object_smart_data_get(obj);
- sd->x = x;
- sd->y = y;
- _e_smart_reconfigure(obj);
-}
-
-static void
-_e_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
-{
- Smart_Data *sd = evas_object_smart_data_get(obj);
- sd->w = w;
- sd->h = h;
- _e_smart_reconfigure(obj);
- evas_object_smart_callback_call(obj, "changed", NULL);
-}
-
-static void
-_e_smart_show(Evas_Object *obj){}
-
-static void
-_e_smart_hide(Evas_Object *obj){}
-
-static void
-_e_smart_color_set(Evas_Object *obj, int r, int g, int b, int a){}
-
-static void
-_e_smart_clip_set(Evas_Object *obj, Evas_Object * clip){}
-
-static void
-_e_smart_clip_unset(Evas_Object *obj){}
-
-static Evas_Object *
-_pan_add(Evas *evas)
-{
- static Evas_Smart *smart = NULL;
- static const Evas_Smart_Class sc =
- {
- "wp_pan",
- EVAS_SMART_CLASS_VERSION,
- _e_smart_add,
- _e_smart_del,
- _e_smart_move,
- _e_smart_resize,
- _e_smart_show,
- _e_smart_hide,
- _e_smart_color_set,
- _e_smart_clip_set,
- _e_smart_clip_unset,
- NULL,
- NULL,
- NULL,
- NULL
- };
- smart = evas_smart_class_new(&sc);
- return evas_object_smart_add(evas, smart);
-}
-
-static void
-_pan_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
-{
- Smart_Data *sd = evas_object_smart_data_get(obj);
- if (x > (sd->cw - sd->w)) x = sd->cw - sd->w;
- if (y > (sd->ch - sd->h)) y = sd->ch - sd->h;
- if (x < 0) x = 0;
- if (y < 0) y = 0;
- if ((sd->cx == x) && (sd->cy == y)) return;
- sd->cx = x;
- sd->cy = y;
- _e_smart_reconfigure(obj);
-}
-
-static void
-_pan_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)
-{
- Smart_Data *sd = evas_object_smart_data_get(obj);
- if (x) *x = sd->cx;
- if (y) *y = sd->cy;
-}
-
-static void
-_pan_max_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)
-{
- Smart_Data *sd = evas_object_smart_data_get(obj);
- if (x)
- {
- if (sd->w < sd->cw) *x = sd->cw - sd->w;
- else *x = 0;
- }
- if (y)
- {
- if (sd->h < sd->ch) *y = sd->ch - sd->h;
- else *y = 0;
- }
-}
-
-static void
-_pan_child_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
-{
- Smart_Data *sd = evas_object_smart_data_get(obj);
- if (w) *w = sd->cw;
- if (h) *h = sd->ch;
-}
-
-static void
-_pan_view_set(Evas_Object *obj, View *view)
-{
- Smart_Data *sd = evas_object_smart_data_get(obj);
- sd->view = view;
-}
-
-static Item *
-_pan_item_add(Evas_Object *obj, Evry_Item *item)
-{
- Smart_Data *sd = evas_object_smart_data_get(obj);
- Item *it;
-
- it = E_NEW(Item, 1);
- if (!it) return NULL;
-
- sd->items = eina_list_append(sd->items, it);
- it->obj = obj;
- it->item = item;
- it->changed = EINA_TRUE;
-
- if (_check_item(item))
- it->get_thumb = EINA_TRUE;
-
- evry_item_ref(item);
-
- _e_smart_reconfigure(obj);
-
- return it;
-}
-
-static void
-_pan_item_remove(Evas_Object *obj, Item *it)
-{
- Smart_Data *sd = evas_object_smart_data_get(obj);
-
- sd->items = eina_list_remove(sd->items, it);
- if (it->do_thumb) e_thumb_icon_end(it->thumb);
- if (it->thumb) evas_object_del(it->thumb);
- if (it->frame) evas_object_del(it->frame);
- if (it->image) evas_object_del(it->image);
-
- sd->queue = eina_list_remove(sd->queue, it);
-
- evry_item_free(it->item);
- E_FREE(it);
-
- _e_smart_reconfigure(obj);
-}
-
-static void
-_pan_item_select(Evas_Object *obj, Item *it)
-{
- Smart_Data *sd = evas_object_smart_data_get(obj);
- int align = -1;
-
- if (sd->cur_item)
- {
- sd->cur_item->selected = EINA_FALSE;
- edje_object_signal_emit(sd->cur_item->frame, "e,state,unselected", "e");
- }
-
- if (it)
- {
- sd->update = EINA_FALSE;
-
- sd->cur_item = it;
- sd->cur_item->selected = EINA_TRUE;
-
- if (sd->view->list_mode)
- align = it->y - (double)it->y / (double)sd->ch * (sd->h - it->h);
- else if ((it->y + it->h) - sd->cy > sd->h)
- align = it->y - (2 - sd->view->zoom) * it->h;
- else if (it->y < sd->cy)
- align = it->y;
-
- if (align >= 0)
- e_scrollframe_child_pos_set(sd->view->sframe, 0, align);
-
- if (sd->view->zoom < 2)
- edje_object_signal_emit(sd->cur_item->frame, "e,state,selected", "e");
-
- if (sd->idle_enter) ecore_idle_enterer_del(sd->idle_enter);
- sd->idle_enter = ecore_idle_enterer_before_add(_e_smart_reconfigure_do, obj);
- }
-}
-
-static void
-_clear_items(Evas_Object *obj)
-{
- Smart_Data *sd = evas_object_smart_data_get(obj);
- Eina_List *l;
- Item *it;
-
- EINA_LIST_FOREACH(sd->items, l, it)
- {
- if (it->do_thumb)
- e_thumb_icon_end(it->thumb);
- if (it->frame) evas_object_del(it->frame);
- if (it->image) evas_object_del(it->image);
- if (it->thumb) evas_object_del(it->thumb);
- it->frame = NULL;
- it->image = NULL;
- it->thumb = NULL;
- it->have_thumb = EINA_FALSE;
- it->do_thumb = EINA_FALSE;
- it->visible = EINA_FALSE;
- }
-
- if (sd->queue)
- eina_list_free(sd->queue);
- sd->queue = NULL;
-
- if (sd->thumb_idler)
- ecore_idle_enterer_del(sd->thumb_idler);
- sd->thumb_idler = NULL;
-}
-
-static void
-_view_clear(Evry_View *view)
-{
- View *v = (View*) view;
- Smart_Data *sd = evas_object_smart_data_get(v->span);
- Item *it;
-
- _clear_items(v->span);
-
- EINA_LIST_FREE(sd->items, it)
- {
- evry_item_free(it->item);
- E_FREE(it);
- }
-
- if (sd->idle_enter) ecore_idle_enterer_del(sd->idle_enter);
- sd->idle_enter = ecore_idle_enterer_before_add(_e_smart_reconfigure_do, v->span);
-
- v->tabs->clear(v->tabs);
-}
-
-static int
-_sort_cb(const void *data1, const void *data2)
-{
- const Item *it1 = data1;
- const Item *it2 = data2;
-
- return it1->pos - it2->pos;
-}
-
-static int
-_update_frame(Evas_Object *obj)
-{
- Smart_Data *sd = evas_object_smart_data_get(obj);
- //sd->switch_mode = EINA_TRUE;
- _e_smart_reconfigure_do(obj);
- //sd->switch_mode = EINA_FALSE;
- _pan_item_select(obj, sd->cur_item);
-
- return 0;
-}
-
-static int
-_view_update(Evry_View *view)
-{
- VIEW(v, view);
- Smart_Data *sd = evas_object_smart_data_get(v->span);
- Item *v_it;
- Evry_Item *p_it;
- Eina_List *l, *ll, *p_items, *v_remove = NULL, *v_items = NULL;
- int pos, last_pos, last_vis = 0, first_vis = 0;
- Eina_Bool update = EINA_FALSE;
-
- if (!v->state->plugin)
- {
- _view_clear(view);
- return 1;
- }
-
- p_items = v->state->plugin->items;
-
- /* go through current view items */
- EINA_LIST_FOREACH(sd->items, l, v_it)
- {
- last_pos = v_it->pos;
- v_it->pos = 0;
- pos = 1;
-
- /* go through plugins current items */
- EINA_LIST_FOREACH(p_items, ll, p_it)
- {
- if (v_it->item == p_it)
- {
- if (pos != last_pos)
- v_it->changed = EINA_TRUE;
-
- v_it->pos = pos;
-
- /* set selected state -> TODO remove*/
- /* if (p_it == v->state->cur_item) */
- if (p_it->selected)
- {
- sd->cur_item = v_it;
- v_it->selected = EINA_TRUE;
- }
- else
- {
- v_it->selected = EINA_FALSE;
- edje_object_signal_emit(v_it->frame, "e,state,unselected", "e");
- }
-
- break;
- }
- pos++;
- }
-
- if (v_it->visible)
- {
- if (!first_vis)
- first_vis = v_it->pos;
- last_vis = v_it->pos;
- }
-
- /* view item is in list of current items */
- if (v_it->pos)
- {
- v_items = eina_list_append(v_items, v_it->item);
-
- if (_check_item(v_it->item))
- v_it->get_thumb = EINA_TRUE;
-
- if (v_it->visible && v_it->changed)
- update = EINA_TRUE;
- }
- else
- {
- if (v_it->visible) update = EINA_TRUE;
- v_remove = eina_list_append(v_remove, v_it);
- }
- }
-
- EINA_LIST_FREE(v_remove, v_it)
- _pan_item_remove(v->span, v_it);
-
- /* go through plugins current items */
- pos = 1;
- EINA_LIST_FOREACH(p_items, l, p_it)
- {
- /* item is not already in view */
- if (!eina_list_data_find_list(v_items, p_it))
- {
- v_it = _pan_item_add(v->span, p_it);
-
- if (!v_it) continue;
-
- v_it->pos = pos;
-
- /* TODO no needed */
- /* if (p_it == v->state->cur_item) */
- if (p_it->selected)
- {
- sd->cur_item = v_it;
- v_it->selected = EINA_TRUE;
- }
-
- if (pos > first_vis && pos < last_vis)
- update = EINA_TRUE;
- }
- pos++;
- }
-
- sd->items = eina_list_sort(sd->items, eina_list_count(sd->items), _sort_cb);
-
- if (update || !last_vis || v->plugin != v->state->plugin)
- {
- v->plugin = v->state->plugin;
-
- sd->update = EINA_TRUE;
- _update_frame(v->span);
- }
-
- if (v_items) eina_list_free(v_items);
-
- v->tabs->update(v->tabs);
-
- sd->update_idler = NULL;
-
- return 0;
-}
-
-static int
-_cb_key_down(Evry_View *view, const Ecore_Event_Key *ev)
-{
- View *v = (View *) view;
- Smart_Data *sd = evas_object_smart_data_get(v->span);
- Eina_List *l = NULL, *ll;
- Item *it = NULL;
-
- if (!v->state->plugin)
- return 0;
-
- if ((ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) &&
- (!strcmp(ev->key, "2")))
- {
- v->list_mode = v->list_mode ? EINA_FALSE : EINA_TRUE;
- v->zoom = 0;
- _clear_items(v->span);
- _update_frame(v->span);
- goto end;
- }
- else if ((ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) &&
- ((!strcmp(ev->key, "plus")) ||
- (!strcmp(ev->key, "3"))))
- {
- v->zoom++;
- if (v->zoom > 2) v->zoom = 0;
- if (v->zoom == 2)
- _clear_items(v->span);
-
- _update_frame(v->span);
- goto end;
- }
-
- if (v->tabs->key_down(v->tabs, ev))
- {
- _view_update(view);
- return 1;
- }
-
- if (sd->items)
- l = eina_list_data_find_list(sd->items, sd->cur_item);
-
- if (!v->list_mode && !evry_conf->cycle_mode)
- {
- if (!strcmp(ev->key, "Right"))
- {
- if (l && l->next)
- it = l->next->data;
-
- if (it)
- {
- _pan_item_select(v->span, it);
- evry_item_select(v->state, it->item);
- }
- goto end;
- }
- else if (!strcmp(ev->key, "Left"))
- {
- if (!sd->items) return 1;
-
- if (l && l->prev)
- it = l->prev->data;
-
- if (it)
- {
- _pan_item_select(v->span, it);
- evry_item_select(v->state, it->item);
- }
- goto end;
- }
- }
- if (!strcmp(ev->key, "Down"))
- {
- if (!sd->items) return 1;
-
- if (!evry_conf->cycle_mode)
- {
- EINA_LIST_FOREACH(l, ll, it)
- {
- if (it->y > sd->cur_item->y &&
- it->x >= sd->cur_item->x)
- break;
- }
- }
-
- if (!it && l && l->next)
- it = l->next->data;
-
- if (it)
- {
- _pan_item_select(v->span, it);
- evry_item_select(v->state, it->item);
- }
- goto end;
- }
- else if (!strcmp(ev->key, "Up"))
- {
- if (!sd->items) return 1;
-
- if (!evry_conf->cycle_mode)
- {
- for(ll = l; ll; ll = ll->prev)
- {
- it = ll->data;
-
- if (it->y < sd->cur_item->y &&
- it->x <= sd->cur_item->x)
- break;
- }
- }
-
- if (!it && l && l->prev)
- it = l->prev->data;
-
- if (it)
- {
- _pan_item_select(v->span, it);
- evry_item_select(v->state, it->item);
- }
- goto end;
- }
- else if (!strcmp(ev->key, "Return"))
- {
- if (!v->list_mode)
- {
- if (evry_browse_item(NULL))
- goto end;
- }
- }
-
- return 0;
-
- end:
- return 1;
-}
-
-static int
-_cb_item_changed(void *data, int type, void *event)
-{
- Evry_Event_Item_Changed *ev = event;
- View *v = data;
- Eina_List *l;
- Item *it;
- Smart_Data *sd = evas_object_smart_data_get(v->span);
-
- if (!sd) return 0;
-
- EINA_LIST_FOREACH(sd->items, l, it)
- if (it->item == ev->item)
- {
- if (!it->visible) break;
-
- edje_object_part_text_set(it->frame, "e.text.label", it->item->label);
-
- if (it->do_thumb) e_thumb_icon_end(it->thumb);
- if (it->thumb) evas_object_del(it->thumb);
- if (it->image) evas_object_del(it->image);
-
- it->thumb = NULL;
- it->image = NULL;
-
- it->have_thumb = EINA_FALSE;
- it->do_thumb = EINA_FALSE;
-
- if (!eina_list_data_find(sd->queue, it))
- sd->queue = eina_list_append(sd->queue, it);
-
- if (!sd->thumb_idler)
- sd->thumb_idler = ecore_idle_enterer_before_add(_thumb_idler, sd);
- }
-
- return 1;
-}
-
-static Evry_View *
-_view_create(Evry_View *view, const Evry_State *s, const Evas_Object *swallow)
-{
- VIEW(parent, view);
-
- View *v;
- Ecore_Event_Handler *h;
-
- if (!s->plugin)
- return NULL;
-
- v = E_NEW(View, 1);
- v->view = *view;
- v->state = s;
- v->evas = evas_object_evas_get(swallow);
-
- if (parent->list_mode < 0)
- v->list_mode = evry_conf->view_mode ? 0 : 1;
- else
- v->list_mode = parent->list_mode;
-
- v->zoom = parent->zoom;
-
- v->bg = edje_object_add(v->evas);
- e_theme_edje_object_set(v->bg, "base/theme/widgets",
- "e/modules/everything/thumbview/main/window");
- // scrolled thumbs
- v->span = _pan_add(v->evas);
- _pan_view_set(v->span, v);
-
- // the scrollframe holding the scrolled thumbs
- v->sframe = e_scrollframe_add(v->evas);
- e_scrollframe_custom_theme_set(v->sframe, "base/theme/widgets",
- "e/modules/everything/thumbview/main/scrollframe");
- e_scrollframe_extern_pan_set(v->sframe, v->span,
- _pan_set, _pan_get, _pan_max_get,
- _pan_child_size_get);
- edje_object_part_swallow(v->bg, "e.swallow.list", v->sframe);
- evas_object_show(v->sframe);
- evas_object_show(v->span);
-
- EVRY_VIEW(v)->o_list = v->bg;
-
- v->tabs = evry_tab_view_new(s, v->evas);
- v->view.o_bar = v->tabs->o_tabs;
-
- h = ecore_event_handler_add(EVRY_EVENT_ITEM_CHANGED, _cb_item_changed, v);
- v->handlers = eina_list_append(v->handlers, h);
-
- return EVRY_VIEW(v);
-}
-
-static void
-_view_destroy(Evry_View *view)
-{
- VIEW(v, view);
-
- Ecore_Event_Handler *h;
-
- evas_object_del(v->bg);
- evas_object_del(v->sframe);
- evas_object_del(v->span);
-
- evry_tab_view_free(v->tabs);
-
- EINA_LIST_FREE(v->handlers, h)
- ecore_event_handler_del(h);
-
- E_FREE(v);
-}
-
-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);
- v->view.name = "Icon View";
- v->view.create = &_view_create;
- v->view.destroy = &_view_destroy;
- v->view.update = &_view_update;
- v->view.clear = &_view_clear;
- v->view.cb_key_down = &_cb_key_down;
- v->list_mode = -1;
-
- evry_view_register(EVRY_VIEW(v), 1);
-
- view = v;
-
- view_types = eina_stringshare_add("FILE");
-
- return EINA_TRUE;
-}
-
-static void
-_shutdown(void)
-{
- eina_stringshare_del(view_types);
- evry_view_unregister(EVRY_VIEW(view));
- E_FREE(view);
-}
-
-
-EINA_MODULE_INIT(_init);
-EINA_MODULE_SHUTDOWN(_shutdown);
-