aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2002-01-25 00:49:10 +0000
committerCarsten Haitzler <raster@rasterman.com>2002-01-25 00:49:10 +0000
commitfb466527e2fd00ab0476c1906de9fd28f72175e0 (patch)
tree2cc52266285375b4ca8a1f1db78454fd0575a9f1 /src
parent857704ec328a5bef9017287477c96aff0406db31 (diff)
downloadenlightenment-fb466527e2fd00ab0476c1906de9fd28f72175e0.tar.gz
enlightenment-fb466527e2fd00ab0476c1906de9fd28f72175e0.tar.xz
enlightenment-fb466527e2fd00ab0476c1906de9fd28f72175e0.zip
how about we build without ferite too? :)
SVN revision: 5857
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am6
-rw-r--r--src/border.c2
-rw-r--r--src/e_ferite.h13
-rw-r--r--src/epplet.c52
4 files changed, 62 insertions, 11 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index b9fa92dab..929a514f9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -11,8 +11,6 @@ INCLUDES = \
-I$(top_srcdir)/intl \
@evas_cflags@ @edb_cflags@ @ebits_cflags@ @ecore_cflags@ @efsd_cflags@ @ferite_cflags@ $(DEBUGFLAGS)
-bin_PROGRAMS = enlightenment e_ferite_gen_e.c
-
EXTRA_DIST = e_ferite.fec
if USE_FERITE
@@ -41,8 +39,12 @@ e_ferite_gen_e.c: e_ferite.fec
rm -f e_ferite_gen_*
$(FEBUILDER) -m e_ferite_gen -i e_ferite_register -d -c e_ferite.fec
+E_FERITE_GEN_E_C = e_ferite_gen_e.c
+
endif
+bin_PROGRAMS = enlightenment $(E_FERITE_GEN_E_C)
+
enlightenment_SOURCES = \
actions.h actions.c \
background.h background.c \
diff --git a/src/border.c b/src/border.c
index a9dc03828..67e5ce35e 100644
--- a/src/border.c
+++ b/src/border.c
@@ -2824,7 +2824,7 @@ e_border_raise_next(void)
/* Now find the next viewable border on the same desktop */
current = (E_Border *)next->data;
- while (next && !e_border_viewable(current))
+ while (next && (!e_border_viewable(current) || current->client.is_desktop))
{
next = next->next;
if (!next)
diff --git a/src/e_ferite.h b/src/e_ferite.h
index 2810af502..1b371b4b0 100644
--- a/src/e_ferite.h
+++ b/src/e_ferite.h
@@ -1,8 +1,21 @@
#ifndef E_FERITE_H
#define E_FERITE_H
+#ifdef USE_FERITE
+
#include <ferite.h>
+#else
+
+#define FeriteScript void
+#define FeriteNamespace void
+#define FeriteVariable void
+#define FeriteFunction void
+#define FeriteObject void
+#define FeriteNamespaceBucket void
+
+#endif
+
void e_ferite_init(void);
void e_ferite_deinit(void);
void e_ferite_run( char *script );
diff --git a/src/epplet.c b/src/epplet.c
index e486c984b..bf8c16b00 100644
--- a/src/epplet.c
+++ b/src/epplet.c
@@ -29,6 +29,7 @@ e_epplet_load_from_layout (E_View * v)
D_ENTER;
+#ifdef USE_FERITE
snprintf (buf, PATH_MAX, "%s/.e_epplets.bits.db", v->dir);
v->epplet_layout = ebits_load (buf);
if (!v->epplet_layout)
@@ -69,7 +70,8 @@ e_epplet_load_from_layout (E_View * v)
else
D ("Error: Can't find epplet `%s'\n", buf);
}
-
+#endif
+
D_RETURN;
}
@@ -84,6 +86,7 @@ e_epplet_get_context_from_script (FeriteScript * script)
D ("script address: %p\n", script);
+#ifdef USE_FERITE
for (l = views; l; l = l->next)
{
E_View *v;
@@ -102,6 +105,7 @@ e_epplet_get_context_from_script (FeriteScript * script)
D_RETURN_ (context);
}
}
+#endif
D_RETURN_ (NULL);
}
@@ -114,6 +118,7 @@ e_epplet_script_load (E_Epplet_Context * context, char *path)
D_ENTER;
+#ifdef USE_FERITE
D ("Ferite: Compiling epplet script `%s'\n", path);
script = ferite_script_compile (path);
@@ -131,6 +136,7 @@ e_epplet_script_load (E_Epplet_Context * context, char *path)
ferite_script_execute (script);
D ("Ferite: epplet executed.\n");
/*ferite_script_delete(script); */
+#endif
D_RETURN;
}
@@ -140,6 +146,7 @@ e_epplet_set_common_callbacks (E_Epplet * epp)
{
D ("setting callbacks\n");
+#ifdef USE_FERITE
if (!epp->bits)
{
D ("Error: no bits to set callbacks on\n");
@@ -183,6 +190,7 @@ e_epplet_set_common_callbacks (E_Epplet * epp)
CALLBACK_MOUSE_MOVE, e_epplet_mouse_move_cb,
epp);
+#endif
D ("callbacks set\n");
}
@@ -196,6 +204,7 @@ e_epplet_mouse_down_cb (void *_data, Ebits_Object _o,
D_ENTER;
+#ifdef USE_FERITE
epp = _data;
if (!strcmp (_c, "Title_Bar"))
@@ -257,7 +266,8 @@ e_epplet_mouse_down_cb (void *_data, Ebits_Object _o,
epp->offset.y = epp->current.y + epp->current.h - _y;
}
}
-
+#endif
+
D_RETURN;
}
@@ -272,6 +282,7 @@ e_epplet_mouse_up_cb (void *_data, Ebits_Object _o,
D_ENTER;
+#ifdef USE_FERITE
epp = _data;
if (!strcmp (_c, "Title_Bar"))
@@ -286,6 +297,7 @@ e_epplet_mouse_up_cb (void *_data, Ebits_Object _o,
epp->state.resizing.left = 0;
epp->state.resizing.right = 0;
}
+#endif
D_RETURN;
}
@@ -299,6 +311,7 @@ e_epplet_mouse_move_cb (void *_data, Ebits_Object _o,
D_ENTER;
+#ifdef USE_FERITE
epp = _data;
if (epp->state.moving)
@@ -391,6 +404,7 @@ e_epplet_mouse_move_cb (void *_data, Ebits_Object _o,
ebits_move (epp->bits, epp->current.x, epp->current.y);
}
+#endif
D_RETURN;
}
@@ -404,6 +418,7 @@ e_epplet_cb_new( FeriteScript *script, char *func_name, FeriteObject *data, Feri
D_ENTER;
+#ifdef USE_FERITE
cb = NEW(E_Epplet_CB_Info, 1);
ZERO(cb, E_Epplet_CB_Info, 1);
@@ -423,6 +438,7 @@ e_epplet_cb_new( FeriteScript *script, char *func_name, FeriteObject *data, Feri
}
cb->script = script;
}
+#endif
D_RETURN_(cb);
}
@@ -430,6 +446,7 @@ e_epplet_cb_new( FeriteScript *script, char *func_name, FeriteObject *data, Feri
void
e_epplet_cb_cleanup(E_Epplet_CB_Info *cb)
{
+#ifdef USE_FERITE
if (cb->data)
{
cb->data->refcount--;
@@ -440,8 +457,8 @@ e_epplet_cb_cleanup(E_Epplet_CB_Info *cb)
cb->data2->refcount--;
cb->data2 = NULL;
}
-
free(cb);
+#endif
}
void
@@ -454,6 +471,7 @@ e_epplet_bits_cb (void *_data, Ebits_Object _o,
D_ENTER;
+#ifdef USE_FERITE
cb = _data;
if (cb->script) {
@@ -469,6 +487,7 @@ e_epplet_bits_cb (void *_data, Ebits_Object _o,
D("ERROR: script does not exist\n");
}
/* e_epplet_cb_cleanup(cb); */
+#endif
D_RETURN;
}
@@ -482,6 +501,7 @@ e_epplet_evas_cb (void *_data, Evas _e, Evas_Object _o,
D_ENTER;
+#ifdef USE_FERITE
cb = _data;
D("d1: %s, d2: %s\n", cb->data->name, cb->data2->name);
@@ -500,6 +520,7 @@ e_epplet_evas_cb (void *_data, Evas _e, Evas_Object _o,
D("ERROR: script does not exist\n");
}
/* e_epplet_cb_cleanup(cb); */
+#endif
D_RETURN;
}
@@ -510,17 +531,19 @@ e_epplet_timer_func(int val, void *data)
FeriteVariable **params;
D_ENTER;
-// D("in timer func\n");
+
+#ifdef USE_FERITE
+/* D("in timer func\n"); */
cb = data;
if (cb->script) {
-// D("creating params\n");
+/* D("creating params\n"); */
params = __ferite_create_parameter_list_from_data( cb->script, "on",
cb->data, (float)val );
-// D("calling func\n");
+/* D("calling func\n"); */
__ferite_variable_destroy( cb->script, __ferite_call_function( cb->script, cb->func, params));
__ferite_delete_parameter_list( cb->script, params );
-// D("func called, params deleted\n");
+/* D("func called, params deleted\n"); */
}
else
{
@@ -528,17 +551,19 @@ e_epplet_timer_func(int val, void *data)
}
/* e_epplet_cb_cleanup(cb); */
+#endif
D_RETURN;
}
E_Epplet_Observer *
e_epplet_observer_new(FeriteScript *script, char *func_name, FeriteObject *data, char *event_type)
{
- E_Epplet_Observer *obs;
+ E_Epplet_Observer *obs = NULL;
FeriteNamespaceBucket *nsb;
D_ENTER;
+#ifdef USE_FERITE
obs = NEW(E_Epplet_Observer, 1);
memset(obs, 0, sizeof(E_Epplet_Observer));
@@ -573,13 +598,16 @@ e_epplet_observer_new(FeriteScript *script, char *func_name, FeriteObject *data,
}
}
D("returning, event: %i\n", E_OBSERVER(obs)->event);
+#endif
D_RETURN_(obs);
}
static void
e_epplet_observer_cleanup(E_Object *o)
{
+#ifdef USE_FERITE
/*FIXME: we need something here!!! Leeeeaky! */
+#endif
}
void
@@ -588,6 +616,7 @@ e_epplet_observer_register_desktops(E_Epplet_Observer *obs)
Evas_List l;
D_ENTER;
+#ifdef USE_FERITE
D("odeskregister, bserver func: %s\n", obs->func->name);
D("register each desktop in list\n");
for (l = e_desktops_get_desktops_list(); l; l = l->next)
@@ -597,6 +626,7 @@ e_epplet_observer_register_desktops(E_Epplet_Observer *obs)
e_observer_register_observee(E_OBSERVER(obs), E_OBSERVEE(d));
D("desktop registered\n")
}
+#endif
D_RETURN;
}
#if 0
@@ -606,6 +636,7 @@ e_epplet_observer_register_borders(E_Epplet_Observer *obs)
Evas_List l;
D_ENTER;
+#ifdef USE_FERITE
for (l = e_border_get_borders_list(); l; l = l->next)
{
E_Border *b = l->data;
@@ -613,6 +644,7 @@ e_epplet_observer_register_borders(E_Epplet_Observer *obs)
e_observer_register_observee(E_OBSERVER(obs), E_OBSERVEE(b));
D("desktop registered\n")
}
+#endif
D_RETURN;
}
#endif
@@ -626,6 +658,7 @@ e_epplet_desktop_observer_func(E_Observer *observer, E_Observee *observee, E_Eve
D_ENTER;
+#ifdef USE_FERITE
obs = (E_Epplet_Observer *)observer;
desk = (E_Desktop *)observee;
@@ -648,6 +681,7 @@ e_epplet_desktop_observer_func(E_Observer *observer, E_Observee *observee, E_Eve
{
D("ERROR: script does not exist\n");
}
+#endif
D_RETURN;
}
@@ -661,6 +695,7 @@ e_epplet_border_observer_func(E_Observer *observer, E_Observee *observee)
D_ENTER;
+#ifdef USE_FERITE
obs = (E_Epplet_Observer *)observer;
b = (E_Border *)observee;
@@ -683,6 +718,7 @@ e_epplet_border_observer_func(E_Observer *observer, E_Observee *observee)
{
D("ERROR: script does not exist\n");
}
+#endif
D_RETURN;
}
#endif