illume2 thing... refactoring the code here. use at your own risk!

SVN revision: 41883
devs/princeamd/enlightenment-0.17-elive
Carsten Haitzler 14 years ago
parent 08a169c696
commit 0b404ef163
  1. 2
      configure.ac
  2. 2
      src/modules/Makefile.am
  3. 7
      src/modules/illume2/.cvsignore
  4. 35
      src/modules/illume2/Makefile.am
  5. BIN
      src/modules/illume2/e-module-illume2.edj
  6. 1101
      src/modules/illume2/e_kbd.c
  7. 53
      src/modules/illume2/e_kbd.h
  8. 471
      src/modules/illume2/e_mod_layout.c
  9. 55
      src/modules/illume2/e_mod_layout.h
  10. 139
      src/modules/illume2/e_mod_layout_illume.c
  11. 7
      src/modules/illume2/e_mod_layout_illume.h
  12. 41
      src/modules/illume2/e_mod_main.c
  13. 10
      src/modules/illume2/e_mod_main.h
  14. 6
      src/modules/illume2/module.desktop.in
  15. 21
      x-ui.sh

@ -555,6 +555,8 @@ 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/module.desktop
src/modules/syscon/Makefile
src/modules/syscon/module.desktop
src/modules/everything/Makefile

@ -239,7 +239,7 @@ SUBDIRS += connman
endif
if USE_MODULE_ILLUME
SUBDIRS += illume
SUBDIRS += illume illume2
endif
if USE_MODULE_SYSCON

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

@ -0,0 +1,35 @@
MAINTAINERCLEANFILES = Makefile.in
MODULE = illume2
# 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_srcdir)/src/lib \
-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_layout_illume.c \
e_mod_layout_illume.h \
e_kbd.h \
e_kbd.c
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)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,53 @@
#ifndef E_KBD_H
#define E_KBD_H
typedef struct _E_Kbd E_Kbd;
#define E_KBD_TYPE 0xE1b0988
typedef enum _E_Kbd_Layout
{
E_KBD_LAYOUT_NONE,
E_KBD_LAYOUT_DEFAULT,
E_KBD_LAYOUT_ALPHA,
E_KBD_LAYOUT_NUMERIC,
E_KBD_LAYOUT_PIN,
E_KBD_LAYOUT_PHONE_NUMBER,
E_KBD_LAYOUT_HEX,
E_KBD_LAYOUT_TERMINAL,
E_KBD_LAYOUT_PASSWORD
} E_Kbd_Layout;
struct _E_Kbd
{
E_Object e_obj_inherit;
E_Win *win;
E_Border *border;
Ecore_Timer *delay_hide;
Ecore_Animator *animator;
Eina_List *waiting_borders;
E_Kbd_Layout layout;
double start, len;
int h;
int adjust_start, adjust, adjust_end;
unsigned char visible : 1;
unsigned char actually_visible : 1;
unsigned char disabled : 1; // if we have a real kbd plugged in
unsigned char fullscreen : 1;
};
EAPI int e_kbd_init(E_Module *m);
EAPI int e_kbd_shutdown(void);
EAPI E_Kbd *e_kbd_new(E_Zone *zone, const char *themedir, const char *syskbds, const char *sysdicts);
EAPI void e_kbd_enable(E_Kbd *kbd);
EAPI void e_kbd_disable(E_Kbd *kbd);
EAPI void e_kbd_show(E_Kbd *kbd);
EAPI void e_kbd_layout_set(E_Kbd *kbd, E_Kbd_Layout layout);
EAPI void e_kbd_hide(E_Kbd *kbd);
EAPI void e_kbd_safe_app_region_get(E_Zone *zone, int *x, int *y, int *w, int *h);
EAPI void e_kbd_fullscreen_set(E_Zone *zone, int fullscreen);
#endif

@ -0,0 +1,471 @@
#include "e.h"
#include "e_mod_main.h"
#include "e_mod_layout.h"
#include "e_mod_layout_illume.h"
// internal calls
static void _e_mod_layout_cb_hook_container_layout(void *data, E_Container *con);
static void _e_mod_layout_cb_hook_post_fetch(void *data, E_Border *bd);
static void _e_mod_layout_cb_hook_post_border_assign(void *data, E_Border *bd);
static void _e_mod_layout_cb_hook_end(void *data, E_Border *bd);
static int _cb_event_border_add(void *data, int type, void *event);
static int _cb_event_border_remove(void *data, int type, void *event);
static int _cb_event_border_focus_in(void *data, int type, void *event);
static int _cb_event_border_focus_out(void *data, int type, void *event);
static int _cb_event_border_show(void *data, int type, void *event);
static int _cb_event_border_hide(void *data, int type, void *event);
static int _cb_event_zone_move_resize(void *data, int type, void *event);
// state
static E_Border_Hook *hook1 = NULL;
static E_Border_Hook *hook2 = NULL;
static E_Border_Hook *hook3 = NULL;
static E_Border_Hook *hook4 = NULL;
static Eina_List *handlers = NULL;
void
e_mod_layout_init(E_Module *m)
{
Eina_List *l;
E_Manager *man;
hook1 = e_border_hook_add(E_BORDER_HOOK_EVAL_POST_FETCH,
_e_mod_layout_cb_hook_post_fetch, NULL);
hook2 = e_border_hook_add(E_BORDER_HOOK_EVAL_POST_BORDER_ASSIGN,
_e_mod_layout_cb_hook_post_border_assign, NULL);
hook3 = e_border_hook_add(E_BORDER_HOOK_EVAL_END,
_e_mod_layout_cb_hook_end, NULL);
hook4 = e_border_hook_add(E_BORDER_HOOK_CONTAINER_LAYOUT,
_e_mod_layout_cb_hook_container_layout, NULL);
handlers = eina_list_append
(handlers, ecore_event_handler_add
(E_EVENT_BORDER_ADD, _cb_event_border_add, NULL));
handlers = eina_list_append
(handlers, ecore_event_handler_add
(E_EVENT_BORDER_REMOVE, _cb_event_border_remove, NULL));
handlers = eina_list_append
(handlers, ecore_event_handler_add
(E_EVENT_BORDER_FOCUS_IN, _cb_event_border_focus_in, NULL));
handlers = eina_list_append
(handlers, ecore_event_handler_add
(E_EVENT_BORDER_FOCUS_OUT, _cb_event_border_focus_out, NULL));
handlers = eina_list_append
(handlers, ecore_event_handler_add
(E_EVENT_BORDER_SHOW, _cb_event_border_show, NULL));
handlers = eina_list_append
(handlers, ecore_event_handler_add
(E_EVENT_BORDER_HIDE, _cb_event_border_hide, NULL));
handlers = eina_list_append
(handlers, ecore_event_handler_add
(E_EVENT_ZONE_MOVE_RESIZE, _cb_event_zone_move_resize, NULL));
illume_layout_illume_init();
}
void
e_mod_layout_shutdown(void)
{
Ecore_Event_Handler *handle;
illume_layout_illume_shutdown();
if (hook1) e_border_hook_del(hook1);
if (hook2) e_border_hook_del(hook2);
if (hook3) e_border_hook_del(hook3);
if (hook4) e_border_hook_del(hook4);
hook1 = NULL;
hook2 = NULL;
hook3 = NULL;
hook4 = NULL;
EINA_LIST_FREE(handlers, handle) ecore_event_handler_del(handle);
}
//////////////////////////////////////////////////////////////////////////////
// :: Convenience routines to make it easy to write layout logic code ::
static Eina_List *modes = NULL;
static const Illume_Layout_Mode *mode = NULL;
void
illume_layout_mode_register(const Illume_Layout_Mode *laymode)
{
if (!modes) mode = laymode;
modes = eina_list_append(modes, laymode);
}
void
illume_layout_mode_unregister(const Illume_Layout_Mode *laymode)
{
if (mode == laymode) mode = NULL;
modes = eina_list_remove(modes, laymode);
}
//////////////////////////////////////////////////////////////////////////////
// :: Convenience routines to make it easy to write layout logic code ::
// activate a window - meant for main app and home app windows
void
illume_border_activate(E_Border *bd)
{
e_desk_show(bd->desk);
e_border_uniconify(bd);
e_border_raise(bd);
e_border_show(bd);
e_border_focus_set(bd, 1, 1);
}
// activate a window that isnt meant to get the focus - like panels, kbd etc.
void
illume_border_show(E_Border *bd)
{
e_desk_show(bd->desk);
e_border_uniconify(bd);
e_border_raise(bd);
e_border_show(bd);
}
// get a window away from being visile (but maintain it)
void
illume_border_deactivate(E_Border *bd)
{
e_border_iconify(bd);
}
// get window info - is this one a dialog?
Eina_Bool
illume_border_is_dialog(E_Border *bd)
{
int isdialog = 0, i;
if (bd->client.icccm.transient_for != 0)
isdialog = 1;
if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DIALOG)
{
isdialog = 1;
if (bd->client.netwm.extra_types)
{
for (i = 0; i < bd->client.netwm.extra_types_num; i++)
{
if (bd->client.netwm.extra_types[i] ==
ECORE_X_WINDOW_TYPE_UNKNOWN) continue;
if ((bd->client.netwm.extra_types[i] !=
ECORE_X_WINDOW_TYPE_DIALOG) &&
(bd->client.netwm.extra_types[i] !=
ECORE_X_WINDOW_TYPE_SPLASH))
{
return 0;
}
}
}
}
return isdialog;
}
// get window info - is this a vkbd window
Eina_Bool
illume_border_is_keyboard(E_Border *bd)
{
if ((bd->client.vkbd.vkbd) || /* explicit hint that its a virtual keyboard */
/* legacy */
( /* trap the matchbox qwerty and multitap kbd's */
(((bd->client.icccm.title) && (!strcmp(bd->client.icccm.title, "Keyboard"))) ||
((bd->client.icccm.name) && ((!strcmp(bd->client.icccm.name, "multitap-pad")))))
&& (bd->client.netwm.state.skip_taskbar)
&& (bd->client.netwm.state.skip_pager)
)
)
return 1;
return 0;
}
// get window info - is it a bottom app panel window (eg qtopia softmenu)
Eina_Bool
illume_border_is_bottom_panel(E_Border *bd)
{
if ((bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DOCK) ||
(bd->client.qtopia.soft_menu))
return 1;
return 0;
}
// get window info - is it a top shelf window
Eina_Bool
illume_border_is_top_shelf(E_Border *bd)
{
if ((bd->client.icccm.name) &&
(strstr(bd->client.icccm.name, "xfce4-panel")))
return 1;
// FIXME: detect
return 0;
}
// get window info - is it a mini app window
Eina_Bool
illume_border_is_mini_app(E_Border *bd)
{
// FIXME: detect
return 0;
}
// get window info - is it a notification window
Eina_Bool
illume_border_is_notification(E_Border *bd)
{
// FIXME: detect
return 0;
}
// get window info - is it a home window
Eina_Bool
illume_border_is_home(E_Border *bd)
{
// FIXME: detect
return 0;
}
// get window info - is it side pane (left) window
Eina_Bool
illume_border_is_side_pane_left(E_Border *bd)
{
// FIXME: detect
return 0;
}
// get window info - is it side pane (right) window
Eina_Bool
illume_border_is_side_pane_right(E_Border *bd)
{
// FIXME: detect
return 0;
}
// get window info - is it overlay window (eg expose display of windows etc.)
Eina_Bool
illume_border_is_overlay(E_Border *bd)
{
// FIXME: detect
return 0;
}
void
illume_border_slide_to(E_Border *bd, int x, int y, Illume_Anim_Class aclass)
{
// FIXME: do
// 1. if an existing slide exists, use is current offset x,y as current border pos, new x,y as new pos and start slide again
}
void
illume_border_min_get(E_Border *bd, int *mw, int *mh)
{
if (mw)
{
if (bd->client.icccm.base_w > bd->client.icccm.min_w)
*mw = bd->client.icccm.base_w;
else
*mw = bd->client.icccm.min_w;
}
if (mh)
{
if (bd->client.icccm.base_w > bd->client.icccm.min_h)
*mh = bd->client.icccm.base_h;
else
*mh = bd->client.icccm.min_h;
}
}
static void
_e_mod_layout_cb_hook_container_layout(void *data, E_Container *con)
{
Eina_List *l;
E_Zone *zone;
EINA_LIST_FOREACH(con->zones, l, zone)
{
if ((mode) && (mode->funcs.zone_layout))
mode->funcs.zone_layout(zone);
}
}
static void
_e_mod_layout_cb_hook_post_fetch(void *data, E_Border *bd)
{
if (bd->stolen) return;
if (bd->new_client)
{
if (bd->remember)
{
if (bd->bordername)
{
eina_stringshare_del(bd->bordername);
bd->bordername = NULL;
bd->client.border.changed = 1;
}
e_remember_unuse(bd->remember);
bd->remember = NULL;
}
eina_stringshare_replace(&bd->bordername, "borderless");
bd->client.border.changed = 1;
bd->client.e.state.centered = 0;
}
}
static void
_e_mod_layout_cb_hook_post_border_assign(void *data, E_Border *bd)
{
int zx, zy, zw, zh, pbx, pby, pbw, pbh;
if (bd->stolen) return;
pbx = bd->x; pby = bd->y; pbw = bd->w; pbh = bd->h;
zx = bd->zone->x; zy = bd->zone->y; zw = bd->zone->w; zh = bd->zone->h;
bd->placed = 1;
bd->client.e.state.centered = 0;
if (!((bd->need_fullscreen) || (bd->fullscreen)))
{
/*
bd->x = zx; bd->y = zy; bd->w = zw; bd->h = zh;
bd->client.w = bd->w; bd->client.h = bd->h;
if ((pbx != bd->x) || (pby != bd->y) ||
(pbw != bd->w) || (pbh != bd->h))
{
bd->changed = 1;
bd->changes.pos = 1;
bd->changes.size = 1;
}
*/
}
else
{
/*
bd->x = zx; bd->y = zy; bd->w = zw; bd->h = zh;
bd->client.w = bd->w; bd->client.h = bd->h;
if ((pbx != bd->x) || (pby != bd->y) ||
(pbw != bd->w) || (pbh != bd->h))
{
if (bd->internal_ecore_evas)
ecore_evas_managed_move(bd->internal_ecore_evas,
bd->x + bd->fx.x + bd->client_inset.l,
bd->y + bd->fx.y + bd->client_inset.t);
ecore_x_icccm_move_resize_send
(bd->client.win,
bd->x + bd->fx.x + bd->client_inset.l,
bd->y + bd->fx.y + bd->client_inset.t,
bd->client.w,
bd->client.h);
bd->changed = 1;
bd->changes.pos = 1;
bd->changes.size = 1;
}
*/
}
if (bd->remember)
{
e_remember_unuse(bd->remember);
bd->remember = NULL;
}
bd->lock_border = 1;
bd->lock_client_location = 1;
bd->lock_client_size = 1;
bd->lock_client_desk = 1;
bd->lock_client_sticky = 1;
bd->lock_client_shade = 1;
bd->lock_client_maximize = 1;
bd->lock_user_location = 1;
bd->lock_user_size = 1;
bd->lock_user_sticky = 1;
}
static void
_e_mod_layout_cb_hook_end(void *data, E_Border *bd)
{
}
static int
_cb_event_border_add(void *data, int type, void *event)
{
E_Event_Border_Add *ev;
E_Border *bd;
ev = event;
if (ev->border->stolen) return 1;
bd = ev->border;
if ((mode) && (mode->funcs.border_add))
mode->funcs.border_add(bd);
return 1;
}
static int
_cb_event_border_remove(void *data, int type, void *event)
{
E_Event_Border_Remove *ev;
E_Border *bd;
ev = event;
if (ev->border->stolen) return 1;
bd = ev->border;
if ((mode) && (mode->funcs.border_del))
mode->funcs.border_del(bd);
return 1;
}
static int
_cb_event_border_focus_in(void *data, int type, void *event)
{
E_Event_Border_Focus_In *ev;
E_Border *bd;
ev = event;
if (ev->border->stolen) return 1;
bd = ev->border;
if ((mode) && (mode->funcs.border_focus_in))
mode->funcs.border_focus_in(bd);
return 1;
}
static int
_cb_event_border_focus_out(void *data, int type, void *event)
{
E_Event_Border_Focus_Out *ev;
E_Border *bd;
ev = event;
if (ev->border->stolen) return 1;
bd = ev->border;
if ((mode) && (mode->funcs.border_focus_out))
mode->funcs.border_focus_out(bd);
return 1;
}
static int
_cb_event_border_show(void *data, int type, void *event)
{
E_Event_Border_Show *ev;
ev = event;
if (ev->border->stolen) return 1;
return 1;
}
static int
_cb_event_border_hide(void *data, int type, void *event)
{
E_Event_Border_Hide *ev;
ev = event;
if (ev->border->stolen) return 1;
return 1;
}
static int
_cb_event_zone_move_resize(void *data, int type, void *event)
{
E_Event_Zone_Move_Resize *ev;
ev = event;
if ((mode) && (mode->funcs.zone_move_resize))
mode->funcs.zone_move_resize(ev->zone);
return 1;
}

@ -0,0 +1,55 @@
#ifndef E_MOD_LAYOUT_H
#define E_MOD_LAYOUT_H
void e_mod_layout_init(E_Module *m);
void e_mod_layout_shutdown(void);
typedef enum _Illume_Anim_Class
{
ILLUME_ANIM_APP,
ILLUME_ANIM_KEYBOARD,
ILLUME_ANIM_SHELF,
ILLUME_ANIM_DIALOG,
ILLUME_ANIM_OTHER
} Illume_Anim_Class;
typedef struct _Illume_Layout_Mode Illume_Layout_Mode;
struct _Illume_Layout_Mode
{
const char *name;
const char *label;
// may need more things later, but name + label will do for now
struct {
// ---
void (*border_add) (E_Border *bd);
void (*border_del) (E_Border *bd);
void (*border_focus_in) (E_Border *bd);
void (*border_focus_out) (E_Border *bd);
// ---
void (*zone_layout) (E_Zone *zone);
void (*zone_move_resize) (E_Zone *zone);
// --- add more below (activate callback, and more)
} funcs;
};
void illume_layout_mode_register(const Illume_Layout_Mode *laymode);
void illume_layout_mode_unregister(const Illume_Layout_Mode *laymode);
void illume_border_activate(E_Border *bd);
void illume_border_show(E_Border *bd);
void illume_border_deactivate(E_Border *bd);
Eina_Bool illume_border_is_dialog(E_Border *bd);
Eina_Bool illume_border_is_keyboard(E_Border *bd);
Eina_Bool illume_border_is_bottom_panel(E_Border *bd);
Eina_Bool illume_border_is_top_shelf(E_Border *bd);
Eina_Bool illume_border_is_mini_app(E_Border *bd);
Eina_Bool illume_border_is_notification(E_Border *bd);
Eina_Bool illume_border_is_home(E_Border *bd);
Eina_Bool illume_border_is_side_pane_left(E_Border *bd);
Eina_Bool illume_border_is_side_pane_right(E_Border *bd);
Eina_Bool illume_border_is_overlay(E_Border *bd);
void illume_border_slide_to(E_Border *bd, int x, int y, Illume_Anim_Class aclass);
void illume_border_min_get(E_Border *bd, int *mw, int *mh);
#endif

@ -0,0 +1,139 @@
#include "e.h"
#include "e_mod_main.h"
#include "e_mod_layout.h"
#include "e_mod_layout_illume.h"
static void
_border_add(E_Border *bd)
{ // handle a border being added
}
static void
_border_del(E_Border *bd)
{ // handle a border being deleted
}
static void
_border_focus_in(E_Border *bd)
{ // do something if focus enters a window
}
static void
_border_focus_out(E_Border *bd)
{ // do something if the rfocus exits a window
}
static void
_zone_layout(E_Zone *z)
{ // borders are in re-layout stage. this is where you move/resize them
Eina_List *l, *borders;
E_Border *bd;
// data for state
int shelfsize = 0;
int kbdsize = 0;
int panelsize = 0;
// phase 1. loop through borders to figure out sizes of things
borders = e_border_client_list();
EINA_LIST_FOREACH(borders, l, bd)
{
int mw, mh;
if (bd->zone != z) continue;
if (bd->new_client) continue;
if (!bd->visible) continue;
illume_border_min_get(bd, &mw, &mh);
if (illume_border_is_top_shelf(bd))
{
if (shelfsize < mh) shelfsize = mh;
}
else if (illume_border_is_bottom_panel(bd))
{
if (panelsize < mh) panelsize = mh;
}
else if (illume_border_is_keyboard(bd))
{
if (kbdsize < mh) kbdsize = mh;
}
}
// actually apply the sizing, positioning and layering too
borders = e_border_client_list();
EINA_LIST_FOREACH(borders, l, bd)
{
int mw, mh;
if (bd->zone != z) continue;
if (bd->new_client) continue;
if (!bd->visible) continue;
illume_border_min_get(bd, &mw, &mh);
if (illume_border_is_top_shelf(bd))
{
e_border_move_resize(bd, z->x, z->y, z->w, shelfsize);
if (bd->layer != 200) e_border_layer_set(bd, 200);
}
else if (illume_border_is_bottom_panel(bd))
{
e_border_move_resize(bd, z->x, z->y + z->h - panelsize, z->w, panelsize);
if (bd->layer != 100) e_border_layer_set(bd, 100);
}
else if (illume_border_is_keyboard(bd))
{
e_border_move_resize(bd, z->x, z->y + z->h - kbdsize, z->w, kbdsize);
if (bd->layer != 150) e_border_layer_set(bd, 150);
}
else if (illume_border_is_home(bd))
{
e_border_move_resize(bd, z->x, z->y, z->w, z->h);
if (bd->layer != 50) e_border_layer_set(bd, 50);
}
else if (illume_border_is_dialog(bd))
{
if (mh > z->h) mh = z->h;
e_border_move_resize(bd, z->x, z->y + ((z->h - mh) / 2), z->w, mh);
if (bd->layer != 120) e_border_layer_set(bd, 120);
}
else
{
e_border_move_resize(bd, z->x, z->y + shelfsize, z->w, z->h - shelfsize - kbdsize);
if (bd->layer != 100) e_border_layer_set(bd, 100);
}
}
}
static void
_zone_move_resize(E_Zone *z)
{ // the zone was moved or resized - re-configure all windows in this zone
_zone_layout(z);
}
//////////////////////////////////////////////////////////////////////////////
const Illume_Layout_Mode laymode =
{
"illume", "Illume", // FIXME: translatable?
// ---
_border_add,
_border_del,
_border_focus_in,
_border_focus_out,
// ---
_zone_layout,
_zone_move_resize,
// ---
};
//////////////////////////////////////////////////////////////////////////////
void
illume_layout_illume_init(void)
{
illume_layout_mode_register(&laymode);
}
//////////////////////////////////////////////////////////////////////////////
void
illume_layout_illume_shutdown(void)
{
illume_layout_mode_unregister(&laymode);
}
//////////////////////////////////////////////////////////////////////////////

@ -0,0 +1,7 @@
#ifndef E_MOD_LAYOUT_ILLUME_H
#define E_MOD_LAYOUT_ILLUME_H
void illume_layout_illume_init(void);
void illume_layout_illume_shutdown(void);
#endif

@ -0,0 +1,41 @@
#include "e.h"
#include "e_kbd.h"
#include "e_mod_main.h"
#include "e_mod_layout.h"
/* this is needed to advertise a label for the module IN the code (not just
* the .desktop file) but more specifically the api version it was compiled
* for so E can skip modules that are compiled for an incorrect API version
* safely) */
EAPI E_Module_Api e_modapi =
{
E_MODULE_API_VERSION, "Illume2"
};
/* called first thing when E inits the module */
EAPI void *
e_modapi_init(E_Module *m)
{
/* set up the virtual keyboard */
// e_kbd_init(m);
e_mod_layout_init(m);
return m; /* return NULL on failure, anything else on success. the pointer
* returned will be set as m->data for convenience tracking */
}
/* called on module shutdown - should clean up EVERYTHING or we leak */
EAPI int
e_modapi_shutdown(E_Module *m)
{
e_mod_layout_shutdown();
// e_kbd_shutdown();
return 1; /* 1 for success, 0 for failure */
}
/* called by E when it thinks this module shoudl go save any config it has */
EAPI int
e_modapi_save(E_Module *m)
{
return 1; /* 1 for success, 0 for failure */
}

@ -0,0 +1,10 @@
#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

@ -0,0 +1,6 @@
[Desktop Entry]
Type=Link
Name=Illume2
Icon=e-module-illume2
X-Enlightenment-ModuleType=system
Comment=<title>Illume2 for Embedded</title>

@ -1,22 +1,27 @@
#!/bin/sh
#Xephyr :1 -noreset -ac -br -dpi 142 -screen 240x320x16 &
#Xephyr :1 -noreset -ac -br -dpi 142 -screen 320x240x16 &
#Xephyr :1 -noreset -ac -br -dpi 186 -screen 272x480x16 &
#Xephyr :1 -noreset -ac -br -dpi 186 -screen 480x272x16 &
#Xephyr :1 -noreset -ac -br -dpi 181 -screen 320x320x16 &
Xephyr :1 -noreset -ac -br -dpi 183 -screen 320x480x16 &
#Xephyr :1 -noreset -ac -br -dpi 183 -screen 480x320x16 &
#Xephyr :1 -noreset -ac -br -dpi 183 -screen 480x800x16 &
#Xephyr :1 -noreset -ac -br -dpi 183 -screen 800x480x16 &
#Xephyr :1 -noreset -ac -br -dpi 284 -screen 480x640x16 &
Xephyr :1 -noreset -ac -br -dpi 284 -screen 480x640 &
#Xephyr :1 -noreset -ac -br -dpi 284 -screen 640x480x16 &
#Xephyr :1 -noreset -ac -br -dpi 284 -screen 480x640 &
#Xephyr :1 -noreset -ac -br -dpi 284 -screen 640x480 &
#Xephyr :1 -noreset -ac -br -dpi 181 -screen 320x320x16 &
#Xephyr :1 -noreset -ac -br -dpi 181 -screen 320x320 &
#Xephyr :1 -noreset -ac -br -dpi 186 -screen 272x480x16 &
#Xephyr :1 -noreset -ac -br -dpi 186 -screen 272x480 &
#Xephyr :1 -noreset -ac -br -dpi 142 -screen 240x320x16 &
#Xephyr :1 -noreset -ac -br -dpi 142 -screen 240x320 &
sleep 1
export DISPLAY=:1
unset E_RESTART E_START E_IPC_SOCKET E_START_TIME
#E_CONF_PROFILE=default ltrace enlightenment_start
#E_CONF_PROFILE=default enlightenment_start
unset E_RESTART E_START E_IPC_SOCKET E_START_TIME E_CONF_PROFILE
enlightenment_start \
-no-precache \
-i-really-know-what-i-am-doing-and-accept-full-responsibility-for-it \
-profile illume
-profile illume2

Loading…
Cancel
Save