Enlightenment RELIES on lots of libraires that have been written. Ecore,
Ebits, Evas, Edb, Imlib2, Efsd just to mention a few. Especially Ebits,
-Ecore, Efsd and Evas change in CVS often - you will need the absolute latest
-of these if you wish Enlightenment 0.17 code to run properly or compile. If
-you update Enlightenment from CVS update these too to get any changes they
+Ecore, Efsd ferite, and Evas change in CVS often - you will need the absolute
+latest of these if you wish Enlightenment 0.17 code to run properly or compile.
+If you update Enlightenment from CVS update these too to get any changes they
have in their trees.
If you plan on working on the code... STOP! don't rush in and work on it -
efsd_libs=`efsd-config --libs`
efsd_cflags=`efsd-config --cflags`
+dnl Check for ferite.
+AC_ARG_WITH(ferite,
+ [ --with-ferite=DIR use ferite in <DIR>],
+ [CFLAGS="$CFLAGS -I$withval/include"
+ LIBS="-L$withval/lib $LIBS"])
+
+AC_PATH_GENERIC(ferite,, [
+ AC_SUBST(ferite_libs)
+ AC_SUBST(ferite_cflags)],
+ AC_MSG_ERROR(Cannot find ferite: Is ferite-config in path?))
+ferite_libs=`ferite-config --libs`
+ferite_cflags=`ferite-config --cflags`
+
+AC_PATH_PROG(FEBUILDER, builder,,)
+AC_SUBST(FEBUILDER)
+
AC_SUBST(CP_OPTIONS)
AC_CONFIG_FILES([
efsd_libs=`efsd-config --libs`
efsd_cflags=`efsd-config --cflags`
+dnl Check for ferite.
+AC_ARG_WITH(ferite,
+ [ --with-ferite=DIR use ferite in <DIR>],
+ [CFLAGS="$CFLAGS -I$withval/include"
+ LIBS="-L$withval/lib $LIBS"])
+
+AC_PATH_GENERIC(ferite,, [
+ AC_SUBST(ferite_libs)
+ AC_SUBST(ferite_cflags)],
+ AC_MSG_ERROR(Cannot find ferite: Is ferite-config in path?))
+ferite_libs=`ferite-config --libs`
+ferite_cflags=`ferite-config --cflags`
+
+AC_PATH_PROG(FEBUILDER, builder,,)
+AC_SUBST(FEBUILDER)
+
AC_SUBST(CP_OPTIONS)
AC_OUTPUT([
else if [ $1 = "separator" ]; then
edb_ed $DB add "/menu/"$MENUNUM"/"$ENTRYNUM"/separator" int 1
+
+
+ else if [ $1 = "script" ]; then
+ edb_ed $DB add "/menu/"$MENUNUM"/"$ENTRYNUM"/text" str "$2"
+ edb_ed $DB add "/menu/"$MENUNUM"/"$ENTRYNUM"/script" str "$3"
-
- fi; fi; fi; fi
+ fi; fi; fi; fi; fi
ENTRYNUM=$[ $ENTRYNUM + 1 ];
}
entry separator
entry text 'Network' 'sub' 1
entry text 'System' 'sub' 2
+entry script 'Exit' 'e.shutdown();'
end_menu
menu 1
entry text 'Reboot' 'sudo -S /sbin/shutdown -r now'
end_menu
+
finish
+2001-08-25 gettextize <bug-gnu-utils@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.10.39.
+
+2001-08-25 gettextize <bug-gnu-utils@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.10.39.
+
+2001-08-25 gettextize <bug-gnu-utils@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.10.39.
+
+2001-08-25 gettextize <bug-gnu-utils@gnu.org>
+
+ * Makefile.in.in: Upgrade to gettext-0.10.39.
+
2001-08-23 gettextize <bug-gnu-utils@gnu.org>
* Makefile.in.in: Upgrade to gettext-0.10.39.
Makefile
enlightenment
.libs
-.deps
\ No newline at end of file
+.deps
+e_ferite_gen_*
## Process this file with automake to produce Makefile.in
+CLEANFILES = e_ferite_gen_*
+
INCLUDES = \
-I$(top_srcdir)/intl \
- @evas_cflags@ @edb_cflags@ @ebits_cflags@ @ecore_cflags@ @efsd_cflags@
+ @evas_cflags@ @edb_cflags@ @ebits_cflags@ @ecore_cflags@ @efsd_cflags@ @ferite_cflags@
bin_PROGRAMS = enlightenment
desktops.h desktops.c \
entry.h entry.c \
exec.h exec.c \
+ e_ferite.h e_ferite.c \
+ e_ferite_gen_header.h e_ferite_gen_core.c \
+ e_ferite_gen_e.c \
+ e_ferite_gen_Window.c \
fs.h fs.c \
icccm.h icccm.c \
icons.c \
view.h view.c \
e.h
-enlightenment_LDADD = @evas_libs@ @edb_libs@ @ebits_libs@ @ecore_libs@ @efsd_libs@ -lm -lc -ldl $(INTLLIBS)
+enlightenment_LDADD = @evas_libs@ @edb_libs@ @ebits_libs@ @ecore_libs@ @efsd_libs@ @ferite_libs@ -lm -lc -ldl $(INTLLIBS)
+e_ferite_gen_core.c: e_ferite.fec
+ rm -f e_ferite_gen_* ; \
+ @FEBUILDER@ -m e_ferite_gen e_ferite.fec ; \
+ mv e_ferite_gen_core.c e_ferite_gen_core.c.old ; \
+ cat e_ferite_gen_core.c.old | sed -e "s/module_init/e_ferite_register/g" > e_ferite_gen_core.c ; \
+ rm e_ferite_gen_core.c.old
--- /dev/null
+#include "e_ferite.h"
+#include "e_ferite_gen_header.h"
+
+void e_ferite_init(void)
+{
+ printf( "Initialising ferite....\n" );
+ ferite_init( 0, NULL );
+}
+
+void e_ferite_deinit(void)
+{
+ printf( "Deinitialising ferite....\n" );
+ ferite_deinit();
+}
+
+int e_ferite_script_error( FeriteScript *script, char *errmsg, int val )
+{
+ fprintf( stderr, "e17: ferite error: %s\n", errmsg );
+ return 1;
+}
+
+int e_ferite_script_warning( FeriteScript *script, char *warnmsg )
+{
+ fprintf( stderr, "e17: ferite warning: %s\n", warnmsg );
+ return 1;
+}
+
+void e_ferite_run( char *txt )
+{
+ FeriteScript *script = NULL;
+
+ printf( "Compiling script `%s'\n", txt );
+ script = __ferite_compile_string( txt );
+ e_ferite_register( script, script->mainns );
+ script->error_cb = e_ferite_script_error;
+ script->warning_cb = e_ferite_script_warning;
+ printf( "Executing script.\n" );
+ ferite_script_execute( script );
+ printf( "Cleaning up.\n" );
+ ferite_script_delete( script );
+}
--- /dev/null
+%{
+
+ #include "Ecore.h"
+
+%}
+
+class Window {
+
+ function getName();
+ function getTitle();
+ function getClass();
+ function getX();
+ function getY();
+ function getWidth();
+ function getHeight();
+
+ function move( number x, number y );
+ function resize( number width, number height );
+
+ function show();
+ function hide();
+ function isVisible();
+
+ function shade();
+ function unshade();
+ function isShaded();
+
+ function iconify();
+ function uniconify();
+ function isIconic();
+
+ function isMapped();
+ function isTransient();
+ function isShaped();
+
+ function delete();
+ function kill();
+
+}
+
+namespace e {
+
+ function flipToDesktop( number desk );
+ function getDesktopCount();
+
+ function getWidth();
+ function getHeight();
+
+ // shutdown enlightenment
+ function shutdown()
+ %{
+ e_event_loop_quit();
+ %}
+}
--- /dev/null
+#ifndef E_FERITE_H
+#define E_FERITE_H
+
+#include <ferite.h>
+
+void e_ferite_init(void);
+void e_ferite_deinit(void);
+void e_ferite_run( char *script );
+void e_ferite_register( FeriteScript *script, FeriteNamespace *ns );
+int e_ferite_script_error( FeriteScript *script, char *errmsg, int val );
+int e_ferite_script_warning( FeriteScript *script, char *warnmsg );
+
+#endif /* E_FERITE_H */
#include "ipc.h"
#include "menu.h"
#include "view.h"
+#include "e_ferite.h"
#include <X11/Xproto.h>
#ifdef E_PROF
e_view_init();
e_entry_init();
e_keys_init();
+ e_ferite_init();
setup();
e_event_loop();
+ e_ferite_deinit();
+
return 0;
UN(argc);
UN(argv);
#include "menubuild.h"
#include "exec.h"
#include "util.h"
+#include "e_ferite.h"
Evas_List build_menus = NULL;
UN(mi);
}
+static void
+e_build_menu_cb_script(E_Menu *m, E_Menu_Item *mi, void *data)
+{
+ char *script;
+
+ script = data;
+ e_ferite_run(script);
+ return;
+ UN(m);
+ UN(mi);
+}
+
static void
e_build_menu_unbuild(E_Build_Menu *bm)
{
for (i2 = 0; i2 < num2; i2++)
{
E_Menu_Item *menuitem;
- char *text, *icon, *exe;
+ char *text, *icon, *exe, *script;
int ok, sub, sep;
sprintf(buf, "/menu/%i/%i/text", num, i2);
icon = e_db_str_get(db, buf);
sprintf(buf, "/menu/%i/%i/command", num, i2);
exe = e_db_str_get(db, buf);
+ sprintf(buf, "/menu/%i/%i/script", num, i2);
+ script = e_db_str_get(db, buf);
sprintf(buf, "/menu/%i/%i/submenu", num, i2);
ok = e_db_int_get(db, buf, &sub);
sep = 0;
e_menu_item_set_callback(menuitem, e_build_menu_cb_exec, exe);
bm->commands = evas_list_prepend(bm->commands, exe);
}
+ if( script )
+ {
+ e_menu_item_set_callback(menuitem, e_build_menu_cb_script, script);
+ bm->commands = evas_list_prepend(bm->commands, script);
+ }
e_menu_add_item(menu, menuitem);
}
bm->menus = evas_list_prepend(bm->menus, menu);
e_view_selection_update(v);
}
if( _b == 2 && ev->double_click )
- exit(0);
+ e_event_loop_quit();
UN(_e);
UN(_o);