remove old illume module

SVN revision: 59933
This commit is contained in:
Carsten Haitzler 2011-06-04 00:06:13 +00:00
parent 596e5212dd
commit 072ffb5662
84 changed files with 1 additions and 119125 deletions

View File

@ -1,5 +1,5 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = default standard minimalist scaleable netbook illume illume-home
SUBDIRS = default standard minimalist scaleable netbook illume
EET_EET = @eet_eet@

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -705,7 +705,6 @@ AC_E_OPTIONAL_MODULE([mixer], true, [CHECK_MODULE_MIXER])
AC_E_OPTIONAL_MODULE([connman], true, [CHECK_MODULE_CONNMAN])
AC_E_OPTIONAL_MODULE([bluez], true, [CHECK_MODULE_BLUEZ])
AC_E_OPTIONAL_MODULE([ofono], true, [CHECK_MODULE_OFONO])
AC_E_OPTIONAL_MODULE([illume], true)
AC_E_OPTIONAL_MODULE([illume2], true)
AC_E_OPTIONAL_MODULE([syscon], true)
AC_E_OPTIONAL_MODULE([everything], true)
@ -819,10 +818,6 @@ src/modules/bluez/Makefile
src/modules/bluez/module.desktop
src/modules/ofono/Makefile
src/modules/ofono/module.desktop
src/modules/illume/Makefile
src/modules/illume/module.desktop
src/modules/illume/keyboards/Makefile
src/modules/illume/dicts/Makefile
src/modules/illume2/Makefile
src/modules/illume2/doc/illume.dox
src/modules/illume2/doc/Makefile
@ -895,7 +890,6 @@ config/minimalist/Makefile
config/scaleable/Makefile
config/netbook/Makefile
config/illume/Makefile
config/illume-home/Makefile
$po_makefile_in
])

View File

@ -138,10 +138,6 @@ if USE_MODULE_BLUEZ
SUBDIRS += bluez
endif
if USE_MODULE_ILLUME
SUBDIRS += illume
endif
if USE_MODULE_ILLUME2
SUBDIRS += \
illume2 \

View File

@ -1,7 +0,0 @@
module.la
*.lo
Makefile.in
Makefile
.libs
.deps
module.desktop

View File

@ -1,81 +0,0 @@
MAINTAINERCLEANFILES = Makefile.in
MODULE = illume
SUBDIRS = keyboards dicts
# data files for the module
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
files_DATA = \
e-module-$(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_builddir)/src/bin \
-I$(top_srcdir)/src/modules \
@e_cflags@
pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
module_la_SOURCES = e_mod_main.c \
e_mod_main.h \
e_mod_layout.h \
e_mod_layout.c \
e_mod_win.h \
e_mod_win.c \
e_kbd.h \
e_kbd.c \
e_slipshelf.h \
e_slipshelf.c \
e_slipwin.h \
e_slipwin.c \
e_mod_gad_wifi.c \
e_mod_gad_wifi.h \
e_mod_gad_gsm.c \
e_mod_gad_gsm.h \
e_mod_gad_usb.c \
e_mod_gad_usb.h \
e_mod_gad_bluetooth.c \
e_mod_gad_bluetooth.h \
e_pwr.c \
e_pwr.h \
e_busywin.h \
e_busywin.c \
e_cfg.h \
e_cfg.c \
e_winilist.c \
e_winilist.h \
e_simplelock.c \
e_simplelock.h \
e_kbd_send.c \
e_kbd_send.h \
e_kbd_int.c \
e_kbd_int.h \
e_kbd_buf.c \
e_kbd_buf.h \
e_kbd_dict.c \
e_kbd_dict.h \
e_flaunch.c \
e_flaunch.h \
e_busycover.c \
e_busycover.h \
e_appwin.c \
e_appwin.h \
e_syswin.c \
e_syswin.h
module_la_LIBADD = @e_libs@ @dlopen_libs@
module_la_LDFLAGS = -module -avoid-version
module_la_DEPENDENCIES = $(top_builddir)/config.h
wifigetdir = $(pkgdir)
wifiget_PROGRAMS = wifiget
wifiget_SOURCES = wifiget.c
wifiget_LDFLAGS =
uninstall:
rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +0,0 @@
MAINTAINERCLEANFILES = Makefile.in
MODULE = illume
filesdir = $(libdir)/enlightenment/modules/$(MODULE)/dicts
files_DATA = \
English_(US).dic \
English_(US)_Small.dic
EXTRA_DIST = $(files_DATA)

View File

@ -1,427 +0,0 @@
#include "e.h"
#include "e_appwin.h"
// FIXME: stolen from slipwin. this is meant to be an "app control menu" that
// is always availabel by some key binding. this menu should have:
//
// close app
// kill app
// home
// shutdown
// suspend
// config
//
// maybe a list of extras?
typedef struct _Win_Entry Win_Entry;
struct _Win_Entry
{
E_Appwin *appwin;
E_Border *border;
Evas_Object *icon;
};
EAPI int E_EVENT_APPWIN_DEL = 0;
/* internal calls */
E_Appwin *_e_appwin_new(E_Zone *zone, const char *themedir);
static void _e_appwin_free(E_Appwin *ess);
static Eina_Bool _e_appwin_cb_animate(void *data);
static void _e_appwin_slide(E_Appwin *ess, int out, double len);
static Eina_Bool _e_appwin_cb_mouse_up(void *data, int type, void *event);
//static Eina_Bool _e_appwin_cb_zone_move_resize(void *data, int type, void *event);
//static Eina_Bool _e_appwin_cb_zone_del(void *data, int type, void *event);
//static void _e_appwin_event_simple_free(void *data, void *ev);
static void _e_appwin_object_del_attach(void *o);
static void _e_appwin_cb_item_sel(void *data);
static Evas_Object *_theme_obj_new(Evas *e, const char *custom_dir, const char *group);
/* state */
static Eina_List *appwins = NULL;
/* called from the module core */
EAPI int
e_appwin_init(void)
{
E_EVENT_APPWIN_DEL = ecore_event_type_new();
return 1;
}
EAPI int
e_appwin_shutdown(void)
{
return 1;
}
EAPI E_Appwin *
e_appwin_new(E_Zone *zone, const char *themedir)
{
E_Appwin *esw;
Evas_Coord mw, mh;
int x, y;
Evas_Object *o;
esw = E_OBJECT_ALLOC(E_Appwin, E_APPWIN_TYPE, _e_appwin_free);
if (!esw) return NULL;
esw->zone = zone;
if (themedir) esw->themedir = eina_stringshare_add(themedir);
esw->clickwin = ecore_x_window_input_new(zone->container->win,
zone->x, zone->y, zone->w, zone->h);
esw->popup = e_popup_new(esw->zone, -1, -1, 1, 1);
ecore_x_window_configure(esw->clickwin,
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING|ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
0, 0, 0, 0, 0,
esw->popup->evas_win,
ECORE_X_WINDOW_STACK_BELOW);
e_popup_layer_set(esw->popup, 220);
esw->base_obj = _theme_obj_new(esw->popup->evas,
esw->themedir,
"e/modules/appwin/base/default");
esw->focused_border = e_border_focused_get();
edje_object_size_min_calc(esw->base_obj, &mw, &mh);
o = e_widget_ilist_add(esw->popup->evas, 32 * e_scale, 32 * e_scale, NULL);
esw->ilist_obj = o;
e_widget_ilist_selector_set(o, 1);
edje_object_part_swallow(esw->base_obj, "e.swallow.content", o);
evas_object_show(o);
x = zone->x;
y = zone->y + zone->h;
mw = zone->w;
mh = 300;
e_popup_move_resize(esw->popup, x, y, mw, mh);
evas_object_resize(esw->base_obj, esw->popup->w, esw->popup->h);
e_popup_edje_bg_object_set(esw->popup, esw->base_obj);
evas_object_show(esw->base_obj);
e_popup_show(esw->popup);
appwins = eina_list_append(appwins, esw);
esw->handlers = eina_list_append
(esw->handlers,
ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP,
_e_appwin_cb_mouse_up, esw));
e_object_del_attach_func_set(E_OBJECT(esw), _e_appwin_object_del_attach);
return esw;
}
EAPI void
e_appwin_show(E_Appwin *esw)
{
Evas_Coord mw, mh;
Eina_List *borders, *l;
Win_Entry *ent;
int i, selnum;
E_OBJECT_CHECK(esw);
E_OBJECT_TYPE_CHECK(esw, E_APPWIN_TYPE);
while (esw->borders)
{
ent = esw->borders->data;
evas_object_del(ent->icon);
e_object_unref(E_OBJECT(ent->border));
esw->borders = eina_list_remove_list(esw->borders, esw->borders);
free(ent);
}
e_widget_ilist_freeze(esw->ilist_obj);
e_widget_ilist_clear(esw->ilist_obj);
e_widget_ilist_thaw(esw->ilist_obj);
borders = e_border_client_list();
selnum = -1;
e_widget_ilist_freeze(esw->ilist_obj);
for (i = 0, l = borders; l; l = l->next)
{
E_Border *bd;
Evas_Object *ic;
const char *title;
bd = l->data;
if (e_object_is_del(E_OBJECT(bd))) continue;
if ((!bd->client.icccm.accepts_focus) &&
(!bd->client.icccm.take_focus)) continue;
if (bd->client.netwm.state.skip_taskbar) continue;
if (bd->user_skip_winlist) continue;
e_object_ref(E_OBJECT(bd));
title = "???";
if (bd->client.netwm.name) title = bd->client.netwm.name;
else if (bd->client.icccm.title) title = bd->client.icccm.title;
ic = e_border_icon_add(bd, esw->popup->evas);
ent = calloc(1, sizeof(Win_Entry));
ent->appwin = esw;
ent->border = bd;
ent->icon = ic;
esw->borders = eina_list_append(esw->borders, ent);
e_widget_ilist_append(esw->ilist_obj, ic, title, _e_appwin_cb_item_sel, ent, NULL);
if (bd == e_border_focused_get()) selnum = i;
i++;
}
e_widget_ilist_thaw(esw->ilist_obj);
if (selnum >= 0) e_widget_ilist_selected_set(esw->ilist_obj, selnum);
e_widget_ilist_go(esw->ilist_obj);
e_widget_ilist_preferred_size_get(esw->ilist_obj, &mw, &mh);
if (mh < (120 *e_scale)) mh = 120 * e_scale;
edje_extern_object_min_size_set(esw->ilist_obj, mw, mh);
edje_object_part_swallow(esw->base_obj, "e.swallow.content", esw->ilist_obj);
edje_object_size_min_calc(esw->base_obj, &mw, &mh);
edje_extern_object_min_size_set(esw->ilist_obj, 0, 0);
edje_object_part_swallow(esw->base_obj, "e.swallow.content", esw->ilist_obj);
mw = esw->zone->w;
if (mh > esw->zone->h) mh = esw->zone->h;
e_popup_resize(esw->popup, mw, mh);
evas_object_resize(esw->base_obj, esw->popup->w, esw->popup->h);
_e_appwin_slide(esw, 1, 1.0);
}
EAPI void
e_appwin_hide(E_Appwin *esw)
{
E_OBJECT_CHECK(esw);
E_OBJECT_TYPE_CHECK(esw, E_APPWIN_TYPE);
_e_appwin_slide(esw, 0, 1.0);
}
EAPI void
e_appwin_border_select_callback_set(E_Appwin *esw, void (*func) (void *data, E_Appwin *ess, E_Border *bd), void *data)
{
E_OBJECT_CHECK(esw);
E_OBJECT_TYPE_CHECK(esw, E_APPWIN_TYPE);
esw->callback.func = func;
esw->callback.data = data;
}
/* internal calls */
static void
_e_appwin_free(E_Appwin *esw)
{
Ecore_Event_Handler *handle;
appwins = eina_list_remove(appwins, esw);
EINA_LIST_FREE(esw->handlers, handle)
ecore_event_handler_del(handle);
if (esw->animator) ecore_animator_del(esw->animator);
if (esw->themedir) eina_stringshare_del(esw->themedir);
ecore_x_window_free(esw->clickwin);
e_object_del(E_OBJECT(esw->popup));
free(esw);
}
static Eina_Bool
_e_appwin_cb_animate(void *data)
{
E_Appwin *esw;
double t, v;
esw = data;
t = ecore_loop_time_get() - esw->start;
if (t > esw->len) t = esw->len;
v = t / esw->len;
v = 1.0 - v;
v = v * v * v * v;
v = 1.0 - v;
esw->adjust = (esw->adjust_target * v) + (esw->adjust_start * (1.0 - v));
e_popup_move(esw->popup,
esw->zone->x,
esw->zone->y + esw->zone->h - esw->adjust);
if (t == esw->len)
{
esw->animator = NULL;
if (esw->out)
edje_object_signal_emit(esw->base_obj, "e,state,out,end", "e");
else
{
edje_object_signal_emit(esw->base_obj, "e,state,in,end", "e");
while (esw->borders)
{
Win_Entry *ent;
ent = esw->borders->data;
evas_object_del(ent->icon);
e_object_unref(E_OBJECT(ent->border));
esw->borders = eina_list_remove_list(esw->borders, esw->borders);
free(ent);
}
e_widget_ilist_freeze(esw->ilist_obj);
e_widget_ilist_clear(esw->ilist_obj);
e_widget_ilist_thaw(esw->ilist_obj);
}
return ECORE_CALLBACK_CANCEL;
}
return ECORE_CALLBACK_RENEW;
}
static void
_e_appwin_slide(E_Appwin *esw, int out, double len)
{
if (out == esw->out) return;
if (len == 0.0) len = 0.000001; /* FIXME: handle len = 0.0 case */
if (!esw->animator)
esw->animator = ecore_animator_add(_e_appwin_cb_animate, esw);
esw->start = ecore_loop_time_get();
esw->len = len;
esw->out = out;
esw->adjust_start = esw->adjust;
if (esw->out) esw->adjust_target = esw->popup->h;
else esw->adjust_target = 0;
if (esw->out)
{
edje_object_signal_emit(esw->base_obj, "e,state,out,begin", "e");
ecore_x_window_configure(esw->clickwin,
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING|ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
0, 0, 0, 0, 0,
esw->popup->evas_win,
ECORE_X_WINDOW_STACK_BELOW);
ecore_x_window_show(esw->clickwin);
}
else
{
edje_object_signal_emit(esw->base_obj, "e,state,in,begin", "e");
ecore_x_window_hide(esw->clickwin);
}
}
static Eina_Bool
_e_appwin_cb_mouse_up(void *data, int type __UNUSED__, void *event)
{
Ecore_Event_Mouse_Button *ev;
E_Appwin *esw;
ev = event;
esw = data;
if (ev->window == esw->clickwin)
{
if (esw->out) _e_appwin_slide(esw, 0, 1.0);
else _e_appwin_slide(esw, 1, 1.0);
}
return ECORE_CALLBACK_PASS_ON;
}
/*
static Eina_Bool
_e_appwin_cb_zone_move_resize(void *data, int type __UNUSED__, void *event)
{
E_Event_Zone_Move_Resize *ev;
E_Appwin *esw;
ev = event;
esw = data;
if (esw->zone == ev->zone)
{
// FIXME: handle new size pants
}
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
_e_appwin_cb_zone_del(void *data, int type __UNUSED__, void *event)
{
E_Event_Zone_Del *ev;
E_Appwin *esw;
ev = event;
esw = data;
if (esw->zone == ev->zone)
{
e_object_del(E_OBJECT(esw));
}
return ECORE_CALLBACK_PASS_ON;
}
static void
_e_appwin_event_simple_free(void *data __UNUSED__, void *ev)
{
struct _E_Event_Appwin_Simple *e;
e = ev;
e_object_unref(E_OBJECT(e->appwin));
free(e);
}
*/
static void
_e_appwin_object_del_attach(void *o)
{
E_Appwin *esw;
// E_Event_Appwin_Del *ev;
if (e_object_is_del(E_OBJECT(o))) return;
esw = o;
while (esw->borders)
{
Win_Entry *ent;
ent = esw->borders->data;
evas_object_del(ent->icon);
e_object_unref(E_OBJECT(ent->border));
esw->borders = eina_list_remove_list(esw->borders, esw->borders);
free(ent);
}
/* ev = calloc(1, sizeof(E_Event_Appwin_Del)); */
/* ev->appwin = esw; */
/* e_object_ref(E_OBJECT(esw)); */
/* fprintf(stderr, "event add E_EVENT_APPWIN_DEL\n"); */
/* ecore_event_add(E_EVENT_APPWIN_DEL, ev, */
/* _e_appwin_event_simple_free, NULL); */
}
static void
_e_appwin_cb_item_sel(void *data)
{
Win_Entry *ent;
ent = data;
if (ent->appwin->callback.func)
ent->appwin->callback.func(ent->appwin->callback.data, ent->appwin, ent->border);
e_appwin_hide(ent->appwin);
}
static Evas_Object *
_theme_obj_new(Evas *e, const char *custom_dir, const char *group)
{
Evas_Object *o;
o = edje_object_add(e);
if (!e_theme_edje_object_set(o, "base/theme/modules/illume", group))
{
if (custom_dir)
{
char buf[PATH_MAX];
snprintf(buf, sizeof(buf), "%s/illume.edj", custom_dir);
if (edje_object_file_set(o, buf, group))
{
printf("OK FALLBACK %s\n", buf);
}
}
}
return o;
}

View File

@ -1,48 +0,0 @@
#ifndef E_APPWIN_H
#define E_APPWIN_H
typedef struct _E_Appwin E_Appwin;
typedef struct _E_Event_Appwin_Simple E_Event_Appwin_Del;
#define E_APPWIN_TYPE 0xE1b0983
struct _E_Appwin
{
E_Object e_obj_inherit;
E_Zone *zone;
E_Popup *popup;
Ecore_X_Window clickwin;
Evas_Object *base_obj;
Evas_Object *ilist_obj;
Eina_List *handlers;
E_Border *focused_border;
Eina_List *borders;
struct {
void (*func) (void *data, E_Appwin *ess, E_Border *bd);
void *data;
} callback;
const char *themedir;
Ecore_Animator *animator;
int adjust_start;
int adjust_target;
int adjust;
double start;
double len;
unsigned char out : 1;
};
struct _E_Event_Appwin_Simple
{
E_Appwin *appwin;
};
EAPI int e_appwin_init(void);
EAPI int e_appwin_shutdown(void);
EAPI E_Appwin *e_appwin_new(E_Zone *zone, const char *themedir);
EAPI void e_appwin_show(E_Appwin *esw);
EAPI void e_appwin_hide(E_Appwin *esw);
EAPI void e_appwin_border_select_callback_set(E_Appwin *esw, void (*func) (void *data, E_Appwin *ess, E_Border *bd), void *data);
extern EAPI int E_EVENT_APPWIN_DEL;
#endif

View File

@ -1,167 +0,0 @@
#include "e.h"
#include "e_busycover.h"
#include "e_cfg.h"
#include "e_slipshelf.h"
// FIXME: make code work - place busycover in safe area
// FIXME: make theme for it
/* internal calls */
E_Busycover *_e_busycover_new(E_Zone *zone, const char *themedir);
static void _e_busycover_free(E_Busycover *esw);
static Eina_Bool _e_busycover_cb_zone_move_resize(void *data, int type, void *event);
//static void _e_busycover_cb_item_sel(void *data, void *data2);
static Evas_Object *_theme_obj_new(Evas *e, const char *custom_dir, const char *group);
/* state */
static Eina_List *busycovers = NULL;
static void
_e_busycover_add_object(E_Busycover *esw)
{
int x, y, w, h;
esw->base_obj = _theme_obj_new(esw->zone->container->bg_evas,
esw->themedir,
"e/modules/busycover/default");
edje_object_part_text_set(esw->base_obj, "e.text.title", "LOADING");
e_slipshelf_safe_app_region_get(esw->zone, &x, &y, &w, &h);
evas_object_move(esw->base_obj, x, y);
evas_object_resize(esw->base_obj, w, h);
evas_object_layer_set(esw->base_obj, 100);
}
/* called from the module core */
EAPI int
e_busycover_init(void)
{
return 1;
}
EAPI int
e_busycover_shutdown(void)
{
return 1;
}
EAPI E_Busycover *
e_busycover_new(E_Zone *zone, const char *themedir)
{
E_Busycover *esw;
esw = E_OBJECT_ALLOC(E_Busycover, E_BUSYCOVER_TYPE, _e_busycover_free);
if (!esw) return NULL;
esw->zone = zone;
if (themedir) esw->themedir = eina_stringshare_add(themedir);
busycovers = eina_list_append(busycovers, esw);
esw->handlers = eina_list_append
(esw->handlers,
ecore_event_handler_add(E_EVENT_ZONE_MOVE_RESIZE,
_e_busycover_cb_zone_move_resize, esw));
return esw;
}
EAPI E_Busycover_Handle *
e_busycover_push(E_Busycover *esw, const char *message, const char *icon)
{
E_Busycover_Handle *h;
E_OBJECT_CHECK(esw);
E_OBJECT_TYPE_CHECK_RETURN(esw, E_BUSYCOVER_TYPE, NULL);
if (!esw->base_obj) _e_busycover_add_object(esw);
h = calloc(1, sizeof(E_Busycover_Handle));
h->busycover = esw;
if (message) h->message = eina_stringshare_add(message);
if (icon) h->icon = eina_stringshare_add(icon);
esw->handles = eina_list_prepend(esw->handles, h);
edje_object_part_text_set(esw->base_obj, "e.text.label", h->message);
/* FIXME: handle icon... */
evas_object_show(esw->base_obj);
return h;
}
EAPI void
e_busycover_pop(E_Busycover *esw, E_Busycover_Handle *handle)
{
E_OBJECT_CHECK(esw);
E_OBJECT_TYPE_CHECK(esw, E_BUSYCOVER_TYPE);
if (!eina_list_data_find(esw->handles, handle)) return;
esw->handles = eina_list_remove(esw->handles, handle);
if (handle->message) eina_stringshare_del(handle->message);
if (handle->icon) eina_stringshare_del(handle->icon);
free(handle);
if (esw->handles)
{
handle = esw->handles->data;
edje_object_part_text_set(esw->base_obj, "e.text.label",
handle->message);
}
else
{
evas_object_del(esw->base_obj);
esw->base_obj = NULL;
}
}
/* internal calls */
static void
_e_busycover_free(E_Busycover *esw)
{
Ecore_Event_Handler *handle;
if (esw->base_obj) evas_object_del(esw->base_obj);
busycovers = eina_list_remove(busycovers, esw);
EINA_LIST_FREE(esw->handlers, handle)
ecore_event_handler_del(handle);
if (esw->themedir) eina_stringshare_del(esw->themedir);
free(esw);
}
static Eina_Bool
_e_busycover_cb_zone_move_resize(void *data, int type __UNUSED__, void *event)
{
E_Event_Zone_Move_Resize *ev;
E_Busycover *esw;
ev = event;
esw = data;
if (esw->zone == ev->zone)
{
int x, y, w, h;
e_slipshelf_safe_app_region_get(esw->zone, &x, &y, &w, &h);
evas_object_move(esw->base_obj, x, y);
evas_object_resize(esw->base_obj, w, h);
}
return ECORE_CALLBACK_PASS_ON;
}
static Evas_Object *
_theme_obj_new(Evas *e, const char *custom_dir, const char *group)
{
Evas_Object *o;
o = edje_object_add(e);
if (!e_theme_edje_object_set(o, "base/theme/modules/illume", group))
{
if (custom_dir)
{
char buf[PATH_MAX];
snprintf(buf, sizeof(buf), "%s/illume.edj", custom_dir);
if (edje_object_file_set(o, buf, group))
{
printf("OK FALLBACK %s\n", buf);
}
}
}
return o;
}

View File

@ -1,38 +0,0 @@
#ifndef E_BUSYCOVER_H
#define E_BUSYCOVER_H
typedef struct _E_Busycover E_Busycover;
typedef struct _E_Busycover_Handle E_Busycover_Handle;
typedef struct _E_Event_Busycover_Simple E_Event_Busycover_Del;
#define E_BUSYCOVER_TYPE 0xE1b0782
struct _E_Busycover
{
E_Object e_obj_inherit;
E_Zone *zone;
Evas_Object *base_obj;
Eina_List *handlers;
const char *themedir;
Eina_List *handles;
};
struct _E_Busycover_Handle
{
E_Busycover *busycover;
const char *message;
const char *icon;
};
struct _E_Event_Busycover_Simple
{
E_Busycover *busycover;
};
EAPI int e_busycover_init(void);
EAPI int e_busycover_shutdown(void);
EAPI E_Busycover *e_busycover_new(E_Zone *zone, const char *themedir);
EAPI E_Busycover_Handle *e_busycover_push(E_Busycover *esw, const char *message, const char *icon);
EAPI void e_busycover_pop(E_Busycover *esw, E_Busycover_Handle *handle);
#endif

View File

@ -1,278 +0,0 @@
#include "e.h"
#include "e_busywin.h"
#include "e_cfg.h"
/* internal calls */
E_Busywin *_e_busywin_new(E_Zone *zone, const char *themedir);
static void _e_busywin_free(E_Busywin *esw);
static Eina_Bool _e_busywin_cb_animate(void *data);
static void _e_busywin_slide(E_Busywin *esw, int out, double len);
static Eina_Bool _e_busywin_cb_mouse_up(void *data, int type, void *event);
static Eina_Bool _e_busywin_cb_zone_move_resize(void *data, int type, void *event);
static Evas_Object *_theme_obj_new(Evas *e, const char *custom_dir, const char *group);
/* state */
static Eina_List *busywins = NULL;
/* called from the module core */
EAPI int
e_busywin_init(void)
{
return 1;
}
EAPI int
e_busywin_shutdown(void)
{
return 1;
}
EAPI E_Busywin *
e_busywin_new(E_Zone *zone, const char *themedir)
{
E_Busywin *esw;
Evas_Coord mw, mh;
int x, y;
esw = E_OBJECT_ALLOC(E_Busywin, E_BUSYWIN_TYPE, _e_busywin_free);
if (!esw) return NULL;
esw->zone = zone;
if (themedir) esw->themedir = eina_stringshare_add(themedir);
esw->clickwin = ecore_x_window_input_new(zone->container->win,
zone->x, zone->y, zone->w, zone->h);
esw->popup = e_popup_new(esw->zone, -1, -1, 1, 1);
ecore_x_window_configure(esw->clickwin,
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING|ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
0, 0, 0, 0, 0,
esw->popup->evas_win,
ECORE_X_WINDOW_STACK_BELOW);
e_popup_layer_set(esw->popup, 250);
esw->base_obj = _theme_obj_new(esw->popup->evas,
esw->themedir,
"e/modules/busywin/base/default");
edje_object_size_min_calc(esw->base_obj, &mw, &mh);
x = zone->x;
y = zone->y + zone->h;
mw = zone->w;
e_popup_move_resize(esw->popup, x, y, mw, mh);
evas_object_resize(esw->base_obj, esw->popup->w, esw->popup->h);
e_popup_edje_bg_object_set(esw->popup, esw->base_obj);
evas_object_show(esw->base_obj);
e_popup_show(esw->popup);
busywins = eina_list_append(busywins, esw);
esw->handlers = eina_list_append
(esw->handlers,
ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP,
_e_busywin_cb_mouse_up, esw));
esw->handlers = eina_list_append
(esw->handlers,
ecore_event_handler_add(E_EVENT_ZONE_MOVE_RESIZE,
_e_busywin_cb_zone_move_resize, esw));
return esw;
}
EAPI E_Busywin_Handle *
e_busywin_push(E_Busywin *esw, const char *message, const char *icon)
{
E_Busywin_Handle *h;
E_OBJECT_CHECK(esw);
E_OBJECT_TYPE_CHECK_RETURN(esw, E_BUSYWIN_TYPE, NULL);
h = calloc(1, sizeof(E_Busywin_Handle));
h->busywin = esw;
if (message) h->message = eina_stringshare_add(message);
if (icon) h->icon = eina_stringshare_add(icon);
esw->handles = eina_list_prepend(esw->handles, h);
edje_object_part_text_set(esw->base_obj, "e.text.label", h->message);
/* FIXME: handle icon... */
_e_busywin_slide(esw, 1, (double)illume_cfg->sliding.busywin.duration / 1000.0);
return h;
}
EAPI void
e_busywin_pop(E_Busywin *esw, E_Busywin_Handle *handle)
{
E_OBJECT_CHECK(esw);
E_OBJECT_TYPE_CHECK(esw, E_BUSYWIN_TYPE);
if (!eina_list_data_find(esw->handles, handle)) return;
esw->handles = eina_list_remove(esw->handles, handle);
if (handle->message) eina_stringshare_del(handle->message);
if (handle->icon) eina_stringshare_del(handle->icon);
free(handle);
if (esw->handles)
{
handle = esw->handles->data;
edje_object_part_text_set(esw->base_obj, "e.text.label",
handle->message);
}
else
{
_e_busywin_slide(esw, 0, (double)illume_cfg->sliding.busywin.duration / 1000.0);
}
}
/* internal calls */
static void
_e_busywin_free(E_Busywin *esw)
{
busywins = eina_list_remove(busywins, esw);
while (esw->handlers)
{
if (esw->handlers->data)
ecore_event_handler_del(esw->handlers->data);
esw->handlers = eina_list_remove_list(esw->handlers, esw->handlers);
}
if (esw->animator) ecore_animator_del(esw->animator);
if (esw->themedir) eina_stringshare_del(esw->themedir);
ecore_x_window_free(esw->clickwin);
e_object_del(E_OBJECT(esw->popup));
free(esw);
}
static Eina_Bool
_e_busywin_cb_animate(void *data)
{
E_Busywin *esw;
double t, v;
esw = data;
t = ecore_loop_time_get() - esw->start;
if (t > esw->len) t = esw->len;
if (esw->len > 0.0)
{
v = t / esw->len;
v = 1.0 - v;
v = v * v * v * v;
v = 1.0 - v;
}
else
{
t = esw->len;
v = 1.0;
}
esw->adjust = (esw->adjust_target * v) + (esw->adjust_start * (1.0 - v));
e_popup_move(esw->popup,
esw->zone->x,
esw->zone->y + esw->zone->h - esw->adjust);
if (t == esw->len)
{
esw->animator = NULL;
if (esw->out)
edje_object_signal_emit(esw->base_obj, "e,state,out,end", "e");
else
edje_object_signal_emit(esw->base_obj, "e,state,in,end", "e");
return ECORE_CALLBACK_CANCEL;
}
return ECORE_CALLBACK_RENEW;
}
static void
_e_busywin_slide(E_Busywin *esw, int out, double len)
{
if (out == esw->out) return;
esw->start = ecore_loop_time_get();
esw->len = len;
esw->out = out;
esw->adjust_start = esw->adjust;
if (esw->out) esw->adjust_target = esw->popup->h;
else esw->adjust_target = 0;
if (esw->out)
{
edje_object_signal_emit(esw->base_obj, "e,state,out,begin", "e");
ecore_x_window_configure(esw->clickwin,
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING|ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
0, 0, 0, 0, 0,
esw->popup->evas_win,
ECORE_X_WINDOW_STACK_BELOW);
// ecore_x_window_show(esw->clickwin);
}
else
{
edje_object_signal_emit(esw->base_obj, "e,state,in,begin", "e");
// ecore_x_window_hide(esw->clickwin);
}
if (len <= 0.0)
{
_e_busywin_cb_animate(esw);
return;
}
if (!esw->animator)
esw->animator = ecore_animator_add(_e_busywin_cb_animate, esw);
}
static Eina_Bool
_e_busywin_cb_mouse_up(void *data, int type __UNUSED__, void *event)
{
Ecore_Event_Mouse_Button *ev;
E_Busywin *esw;
ev = event;
esw = data;
if (ev->window == esw->clickwin)
{
if (esw->out) _e_busywin_slide(esw, 0, (double)illume_cfg->sliding.busywin.duration / 1000.0);
else _e_busywin_slide(esw, 1, (double)illume_cfg->sliding.busywin.duration / 1000.0);
}
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
_e_busywin_cb_zone_move_resize(void *data, int type __UNUSED__, void *event)
{
E_Event_Zone_Move_Resize *ev;
E_Busywin *esw;
ev = event;
esw = data;
if (esw->zone == ev->zone)
{
e_popup_move_resize(esw->popup,
esw->zone->x,
esw->zone->y + esw->zone->h - esw->adjust,
esw->zone->w, esw->popup->h);
evas_object_resize(esw->base_obj, esw->popup->w, esw->popup->h);
}
return ECORE_CALLBACK_PASS_ON;
}
static Evas_Object *
_theme_obj_new(Evas *e, const char *custom_dir, const char *group)
{
Evas_Object *o;
o = edje_object_add(e);
if (!e_theme_edje_object_set(o, "base/theme/modules/illume", group))
{
if (custom_dir)
{
char buf[PATH_MAX];
snprintf(buf, sizeof(buf), "%s/illume.edj", custom_dir);
if (edje_object_file_set(o, buf, group))
{
printf("OK FALLBACK %s\n", buf);
}
}
}
return o;
}

View File

@ -1,49 +0,0 @@
#ifndef E_BUSYWIN_H
#define E_BUSYWIN_H
typedef struct _E_Busywin E_Busywin;
typedef struct _E_Busywin_Handle E_Busywin_Handle;
typedef struct _E_Event_Busywin_Simple E_Event_Busywin_Del;
#define E_BUSYWIN_TYPE 0xE1b0976
struct _E_Busywin
{
E_Object e_obj_inherit;
E_Zone *zone;
E_Popup *popup;
Evas_Object *base_obj;
Eina_List *handlers;
const char *themedir;
Ecore_Animator *animator;
Eina_List *handles;
Ecore_X_Window clickwin;
int adjust_start;
int adjust_target;
int adjust;
double start;
double len;
unsigned char out : 1;
};
struct _E_Busywin_Handle
{
E_Busywin *busywin;
const char *message;
const char *icon;
};
struct _E_Event_Busywin_Simple
{
E_Busywin *busywin;
};
EAPI int e_busywin_init(void);
EAPI int e_busywin_shutdown(void);
EAPI E_Busywin *e_busywin_new(E_Zone *zone, const char *themedir);
EAPI E_Busywin_Handle *e_busywin_push(E_Busywin *esw, const char *message, const char *icon);
EAPI void e_busywin_pop(E_Busywin *esw, E_Busywin_Handle *handle);
extern EAPI int E_EVENT_BUSYWIN_DEL;
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,73 +0,0 @@
#ifndef E_CFG_H
#define E_CFG_H
#define ILLUME_CONFIG_MIN 3
#define ILLUME_CONFIG_MAJ 0
typedef struct _Illume_Cfg Illume_Cfg;
struct _Illume_Cfg
{
int config_version;
struct {
int mode;
int icon_size;
int single_click;
int single_click_delay;
} launcher;
struct {
int auto_suspend;
int auto_suspend_delay;
} power;
struct {
int cache_level; // DOME?
int fps;
} performance;
struct {
int main_gadget_size;
int extra_gagdet_size;
int style;
} slipshelf;
struct {
struct {
int duration;
} slipshelf, kbd, busywin, layout;
} sliding;
// FIXME: save/load these up minor version for this and init...
struct {
int use_internal;
const char *run_keyboard;
const char *dict;
double fuzz_mul; // NEW
int ignore_auto_kbd; // NEW
int ignore_auto_type; // NEW
int ignore_auto_lang; // NEW
int ignore_hardware_keyboards; // NEW
int force_no_dict; // NEW
const char *layout; // NEW
} kbd;
};
EAPI int e_cfg_init(E_Module *m);
EAPI int e_cfg_shutdown(void);
EAPI int e_cfg_save(void);
EAPI void e_cfg_launcher(E_Container *con, const char *params);
EAPI void e_cfg_power(E_Container *con, const char *params);
EAPI void e_cfg_animation(E_Container *con, const char *params);
EAPI void e_cfg_slipshelf(E_Container *con, const char *params);
EAPI void e_cfg_thumbscroll(E_Container *con, const char *params);
EAPI void e_cfg_fps(E_Container *con, const char *params);
EAPI void e_cfg_gadgets(E_Container *con, const char *params);
EAPI void e_cfg_keyboard(E_Container *con, const char *params);
extern EAPI Illume_Cfg *illume_cfg;
#endif

View File

@ -1,299 +0,0 @@
#include "e.h"
#include "e_flaunch.h"
#include "e_cfg.h"
static Evas_Object *_theme_obj_new(Evas *e, const char *custom_dir, const char *group);
static void
_e_flaunch_cb_button_select(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{
E_Flaunch_App *fla;
fla = data;
if (fla->callback.func) fla->callback.func((void *)fla->callback.data);
}
static E_Flaunch_App *
_e_fluanch_button_add(E_Flaunch *fl, const char *label, int expander, void (*func) (void *data), const void *data)
{
E_Flaunch_App *fla;
Evas_Object *o;
fla = E_NEW(E_Flaunch_App, 1);
if (!fla) return NULL;
if (expander)
o = _theme_obj_new(fl->zone->container->bg_evas,
fl->themedir,
"e/modules/flaunch/button/default");
else
o = _theme_obj_new(fl->zone->container->bg_evas,
fl->themedir,
"e/modules/flaunch/button/start");
edje_object_part_text_set(o, "e.text.label", label);
fla->flaunch = fl;
fla->obj = o;
fla->callback.func = func;
if (!data) data = fla;
fla->callback.data = data;
edje_object_signal_callback_add(o, "e,action,do,select", "",
_e_flaunch_cb_button_select, fla);
return fla;
}
static void
_e_flaunch_button_del(E_Flaunch_App *fla)
{
evas_object_del(fla->obj);
if (fla->desktop) eina_stringshare_del(fla->desktop);
free(fla);
}
static void
_e_fluanch_cb_app_button(void *data)
{
E_Flaunch_App *fla;
Efreet_Desktop *desktop;
fla = data;
if (!fla->desktop) return;
desktop = efreet_util_desktop_file_id_find(fla->desktop);
if (!desktop) return;
if (fla->flaunch->desktop_run_func) fla->flaunch->desktop_run_func(desktop);
efreet_desktop_free(desktop);
}
static E_Flaunch_App *
_e_flaunch_app_add(E_Flaunch *fl, const char *deskfile)
{
E_Flaunch_App *fla;
Efreet_Desktop *desktop;
const char *label = "";
desktop = efreet_util_desktop_file_id_find(deskfile);
if (desktop) label = desktop->name;
fla = _e_fluanch_button_add(fl, label, 1, _e_fluanch_cb_app_button, NULL);
if (deskfile) fla->desktop = eina_stringshare_add(deskfile);
fl->apps = eina_list_append(fl->apps, fla);
e_box_pack_end(fl->app_box_obj, fla->obj);
e_box_pack_options_set(fla->obj, 1, 1, 1, 1, 0.5, 0.5, 0, 0, 9999, 9999);
evas_object_show(fla->obj);
if (desktop) efreet_desktop_free(desktop);
return fla;
}
static void
_e_flaunch_apps_clear(E_Flaunch *fl)
{
E_Flaunch_App *fla;
EINA_LIST_FREE(fl->apps, fla)
_e_flaunch_button_del(fla);
}
static void
_e_flaunch_apps_populate(E_Flaunch *fl)
{
Eina_List *bar_desktops;
Eina_List *l;
int num = 0, max, count;
// FIXME: 3 should become config here
max = 10;
// for now just look for any apps in "category" 'Bar' and add the first 3
// FIXME: category should be configurable...
bar_desktops = efreet_util_desktop_category_list("System");
if (bar_desktops)
{
Efreet_Desktop *desktop;
printf("Have Desktops\n");
count = eina_list_count(bar_desktops);
if (count < max)
{
int i;
for (i = 0; i < (max - count) / 2; i++)
{
_e_flaunch_app_add(fl, "");
num++;
}
}
EINA_LIST_FOREACH(bar_desktops, l, desktop)
{
printf("Desktop: %s\n", desktop->name);
if (desktop->orig_path)
{
const char *dname;
dname = ecore_file_file_get(desktop->orig_path);
if (dname)
{
_e_flaunch_app_add(fl, dname);
num++;
}
}
if (num >= max) break;
}
EINA_LIST_FREE(bar_desktops, desktop)
efreet_desktop_free(desktop);
}
while (num < max)
{
_e_flaunch_app_add(fl, "");
num++;
}