summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2004-06-24 06:11:36 +0000
committerCarsten Haitzler <raster@rasterman.com>2004-06-24 06:11:36 +0000
commitb97f6616289f206d70b8eb351ae0a1a6d013fcca (patch)
tree9626073ff66a2dbbdff68a6aa8248813008d976a
parent6b55e5b817bdac9e0c3456a94793d7357859ba87 (diff)
autofool cleanups... argh! i hate autofools!
SVN revision: 10574
Diffstat (limited to '')
-rwxr-xr-xlegacy/ecore/autogen.sh152
-rw-r--r--legacy/ecore/m4/ac_expand_dir.m414
-rw-r--r--legacy/ecore/m4/ac_path_generic.m4136
-rw-r--r--legacy/edje/src/lib/Makefile.am1
-rw-r--r--legacy/edje/src/lib/edje_container.c281
-rwxr-xr-xlegacy/emotion/autogen.sh142
-rw-r--r--legacy/emotion/m4/ac_expand_dir.m414
-rw-r--r--legacy/emotion/m4/ac_path_generic.m4136
-rw-r--r--legacy/emotion/src/lib/Emotion.h14
-rw-r--r--legacy/emotion/src/modules/Makefile.am4
-rw-r--r--legacy/emotion/src/modules/emotion_xine.c211
-rw-r--r--legacy/emotion/src/modules/emotion_xine.h8
-rw-r--r--legacy/emotion/src/modules/xine/Makefile.am4
13 files changed, 823 insertions, 294 deletions
diff --git a/legacy/ecore/autogen.sh b/legacy/ecore/autogen.sh
index 322c91908f..88ee7f3a0e 100755
--- a/legacy/ecore/autogen.sh
+++ b/legacy/ecore/autogen.sh
@@ -1,147 +1,13 @@
1#!/bin/sh 1#!/bin/sh
2# Run this to generate all the initial makefiles, etc.
3 2
4srcdir=`dirname $0` 3rm -rf autom4te.cache
5PKG_NAME="libecore" 4rm -f aclocal.m4
6 5
7DIE=0 6echo "Running aclocal..."; aclocal $ACLOCAL_FLAGS -I m4 \
7&& echo "Running autoheader..."; autoheader \
8&& echo "Running autoconf..."; autoconf \
9&& echo "Running libtoolize..."; libtoolize --automake \
10&& echo "Running automake..."; automake --add-missing --copy --gnu
8 11
9(autoconf --version) < /dev/null > /dev/null 2>&1 || { 12### If you want this, uncomment it.
10 echo 13./configure "$@"
11 echo "**Error**: You must have \`autoconf' installed to."
12 echo "Download the appropriate package for your distribution,"
13 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
14 DIE=1
15}
16
17(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
18 (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
19 echo
20 echo "**Error**: You must have \`libtool' installed."
21 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
22 echo "(or a newer version if it is available)"
23 DIE=1
24 }
25}
26
27grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
28 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
29 (gettext --version) < /dev/null > /dev/null 2>&1 || {
30 echo
31 echo "**Error**: You must have \`gettext' installed."
32 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
33 echo "(or a newer version if it is available)"
34 DIE=1
35 }
36}
37
38grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
39 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
40 (gettext --version) < /dev/null > /dev/null 2>&1 || {
41 echo
42 echo "**Error**: You must have \`gettext' installed."
43 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
44 echo "(or a newer version if it is available)"
45 DIE=1
46 }
47}
48
49(automake --version) < /dev/null > /dev/null 2>&1 || {
50 echo
51 echo "**Error**: You must have \`automake' installed."
52 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
53 echo "(or a newer version if it is available)"
54 DIE=1
55 NO_AUTOMAKE=yes
56}
57
58
59# if no automake, don't bother testing for aclocal
60test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
61 echo
62 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
63 echo "installed doesn't appear recent enough."
64 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
65 echo "(or a newer version if it is available)"
66 DIE=1
67}
68
69if test "$DIE" -eq 1; then
70 exit 1
71fi
72
73if test -z "$*"; then
74 echo "**Warning**: I am going to run \`configure' with no arguments."
75 echo "If you wish to pass any to it, please specify them on the"
76 echo \`$0\'" command line."
77 echo
78fi
79
80case $CC in
81xlc )
82 am_opt=--include-deps;;
83esac
84
85for coin in `find $srcdir -name configure.in -print`
86do
87 dr=`dirname $coin`
88 if test -f $dr/NO-AUTO-GEN; then
89 echo skipping $dr -- flagged as no auto-gen
90 else
91 echo processing $dr
92 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
93 ( cd $dr
94 aclocalinclude="$ACLOCAL_FLAGS"
95 for k in $macrodirs; do
96 if test -d $k; then
97 aclocalinclude="$aclocalinclude -I $k"
98 ##else
99 ## echo "**Warning**: No such directory \`$k'. Ignored."
100 fi
101 done
102 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
103 if grep "sed.*POTFILES" configure.in >/dev/null; then
104 : do nothing -- we still have an old unmodified configure.in
105 else
106 echo "Creating $dr/aclocal.m4 ..."
107 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
108 echo "Running gettextize... Ignore non-fatal messages."
109 echo "no" | gettextize --force --copy
110 echo "Making $dr/aclocal.m4 writable ..."
111 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
112 fi
113 fi
114 if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
115 echo "Creating $dr/aclocal.m4 ..."
116 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
117 echo "Running gettextize... Ignore non-fatal messages."
118 echo "no" | gettextize --force --copy
119 echo "Making $dr/aclocal.m4 writable ..."
120 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
121 fi
122 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
123 echo "Running libtoolize..."
124 libtoolize --force --copy
125 fi
126 echo "Running aclocal $aclocalinclude ..."
127 aclocal $aclocalinclude
128 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
129 echo "Running autoheader..."
130 autoheader
131 fi
132 echo "Running automake --gnu $am_opt ..."
133 automake --add-missing --gnu $am_opt
134 echo "Running autoconf ..."
135 autoconf
136 )
137 fi
138done
139
140#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
141
142if test x$NOCONFIGURE = x; then
143 echo Running $srcdir/configure $conf_flags "$@" ...
144 $srcdir/configure $conf_flags "$@"
145else
146 echo Skipping configure process.
147fi
diff --git a/legacy/ecore/m4/ac_expand_dir.m4 b/legacy/ecore/m4/ac_expand_dir.m4
new file mode 100644
index 0000000000..b5599a074d
--- /dev/null
+++ b/legacy/ecore/m4/ac_expand_dir.m4
@@ -0,0 +1,14 @@
1dnl AC_EXPAND_DIR(VARNAME, DIR)
2dnl expands occurrences of ${prefix} and ${exec_prefix} in the given DIR,
3dnl and assigns the resulting string to VARNAME
4dnl example: AC_DEFINE_DIR(DATADIR, "$datadir")
5dnl by Alexandre Oliva <oliva@dcc.unicamp.br>
6AC_DEFUN([AC_EXPAND_DIR], [
7 $1=$2
8 $1=`(
9 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
10 test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
11 eval echo \""[$]$1"\"
12 )`
13])
14
diff --git a/legacy/ecore/m4/ac_path_generic.m4 b/legacy/ecore/m4/ac_path_generic.m4
new file mode 100644
index 0000000000..27b55b3ff4
--- /dev/null
+++ b/legacy/ecore/m4/ac_path_generic.m4
@@ -0,0 +1,136 @@
1dnl @synopsis AC_PATH_GENERIC(LIBRARY [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
2dnl
3dnl Runs a LIBRARY-config script and defines LIBRARY_CFLAGS and LIBRARY_LIBS
4dnl
5dnl The script must support `--cflags' and `--libs' args.
6dnl If MINIMUM-VERSION is specified, the script must also support the
7dnl `--version' arg.
8dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given,
9dnl it must also support `--prefix' and `--exec-prefix'.
10dnl (In other words, it must be like gtk-config.)
11dnl
12dnl For example:
13dnl
14dnl AC_PATH_GENERIC(Foo, 1.0.0)
15dnl
16dnl would run `foo-config --version' and check that it is at least 1.0.0
17dnl
18dnl If so, the following would then be defined:
19dnl
20dnl FOO_CFLAGS to `foo-config --cflags`
21dnl FOO_LIBS to `foo-config --libs`
22dnl
23dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK)
24dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount)
25dnl
26dnl @author Angus Lees <gusl@cse.unsw.edu.au>
27
28AC_DEFUN([AC_PATH_GENERIC],
29[dnl
30dnl we're going to need uppercase, lowercase and user-friendly versions of the
31dnl string `LIBRARY'
32pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
33pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
34
35dnl
36dnl Get the cflags and libraries from the LIBRARY-config script
37dnl
38AC_ARG_WITH(DOWN-prefix,[ --with-]DOWN[-prefix=PFX Prefix where $1 is installed (optional)],
39 DOWN[]_config_prefix="$withval", DOWN[]_config_prefix="")
40AC_ARG_WITH(DOWN-exec-prefix,[ --with-]DOWN[-exec-prefix=PFX Exec prefix where $1 is installed (optional)],
41 DOWN[]_config_exec_prefix="$withval", DOWN[]_config_exec_prefix="")
42
43 if test x$DOWN[]_config_exec_prefix != x ; then
44 DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix"
45 if test x${UP[]_CONFIG+set} != xset ; then
46 UP[]_CONFIG=$DOWN[]_config_exec_prefix/bin/DOWN-config
47 fi
48 fi
49 if test x$DOWN[]_config_prefix != x ; then
50 DOWN[]_config_args="$DOWN[]_config_args --prefix=$DOWN[]_config_prefix"
51 if test x${UP[]_CONFIG+set} != xset ; then
52 UP[]_CONFIG=$DOWN[]_config_prefix/bin/DOWN-config
53 fi
54 fi
55
56 AC_PATH_PROG(UP[]_CONFIG, DOWN-config, no)
57 ifelse([$2], ,
58 AC_MSG_CHECKING(for $1),
59 AC_MSG_CHECKING(for $1 - version >= $2)
60 )
61 no_[]DOWN=""
62 if test "$UP[]_CONFIG" = "no" ; then
63 no_[]DOWN=yes
64 else
65 UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args --cflags`"
66 UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args --libs`"
67 ifelse([$2], , ,[
68 DOWN[]_config_major_version=`$UP[]_CONFIG $DOWN[]_config_args \
69 --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
70 DOWN[]_config_minor_version=`$UP[]_CONFIG $DOWN[]_config_args \
71 --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
72 DOWN[]_config_micro_version=`$UP[]_CONFIG $DOWN[]_config_args \
73 --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
74 DOWN[]_wanted_major_version="regexp($2, [\<\([0-9]*\)], [\1])"
75 DOWN[]_wanted_minor_version="regexp($2, [\<\([0-9]*\)\.\([0-9]*\)], [\2])"
76 DOWN[]_wanted_micro_version="regexp($2, [\<\([0-9]*\).\([0-9]*\).\([0-9]*\)], [\3])"
77
78 # Compare wanted version to what config script returned.
79 # If I knew what library was being run, i'd probably also compile
80 # a test program at this point (which also extracted and tested
81 # the version in some library-specific way)
82 if test "$DOWN[]_config_major_version" -lt \
83 "$DOWN[]_wanted_major_version" \
84 -o \( "$DOWN[]_config_major_version" -eq \
85 "$DOWN[]_wanted_major_version" \
86 -a "$DOWN[]_config_minor_version" -lt \
87 "$DOWN[]_wanted_minor_version" \) \
88 -o \( "$DOWN[]_config_major_version" -eq \
89 "$DOWN[]_wanted_major_version" \
90 -a "$DOWN[]_config_minor_version" -eq \
91 "$DOWN[]_wanted_minor_version" \
92 -a "$DOWN[]_config_micro_version" -lt \
93 "$DOWN[]_wanted_micro_version" \) ; then
94 # older version found
95 no_[]DOWN=yes
96 echo -n "*** An old version of $1 "
97 echo -n "($DOWN[]_config_major_version"
98 echo -n ".$DOWN[]_config_minor_version"
99 echo ".$DOWN[]_config_micro_version) was found."
100 echo -n "*** You need a version of $1 newer than "
101 echo -n "$DOWN[]_wanted_major_version"
102 echo -n ".$DOWN[]_wanted_minor_version"
103 echo ".$DOWN[]_wanted_micro_version."
104 echo "***"
105 echo "*** If you have already installed a sufficiently new version, this error"
106 echo "*** probably means that the wrong copy of the DOWN-config shell script is"
107 echo "*** being found. The easiest way to fix this is to remove the old version"
108 echo "*** of $1, but you can also set the UP[]_CONFIG environment to point to the"
109 echo "*** correct copy of DOWN-config. (In this case, you will have to"
110 echo "*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf"
111 echo "*** so that the correct libraries are found at run-time)"
112 fi
113 ])
114 fi
115 if test "x$no_[]DOWN" = x ; then
116 AC_MSG_RESULT(yes)
117 ifelse([$3], , :, [$3])
118 else
119 AC_MSG_RESULT(no)
120 if test "$UP[]_CONFIG" = "no" ; then
121 echo "*** The DOWN-config script installed by $1 could not be found"
122 echo "*** If $1 was installed in PREFIX, make sure PREFIX/bin is in"
123 echo "*** your path, or set the UP[]_CONFIG environment variable to the"
124 echo "*** full path to DOWN-config."
125 fi
126 UP[]_CFLAGS=""
127 UP[]_LIBS=""
128 ifelse([$4], , :, [$4])
129 fi
130 AC_SUBST(UP[]_CFLAGS)
131 AC_SUBST(UP[]_LIBS)
132
133 popdef([UP])
134 popdef([DOWN])
135])
136
diff --git a/legacy/edje/src/lib/Makefile.am b/legacy/edje/src/lib/Makefile.am
index e7815cdf98..c83f8b8cee 100644
--- a/legacy/edje/src/lib/Makefile.am
+++ b/legacy/edje/src/lib/Makefile.am
@@ -37,6 +37,7 @@ edje_smart.c \
37edje_text.c \ 37edje_text.c \
38edje_util.c \ 38edje_util.c \
39edje_var.c \ 39edje_var.c \
40edje_container.c \
40edje_private.h 41edje_private.h
41 42
42libedje_la_LIBADD = $(LDFLAGS) -lm @evas_libs@ @ecore_libs@ @eet_libs@ @embryo_libs@ 43libedje_la_LIBADD = $(LDFLAGS) -lm @evas_libs@ @ecore_libs@ @eet_libs@ @embryo_libs@
diff --git a/legacy/edje/src/lib/edje_container.c b/legacy/edje/src/lib/edje_container.c
new file mode 100644
index 0000000000..5a07a1d677
--- /dev/null
+++ b/legacy/edje/src/lib/edje_container.c
@@ -0,0 +1,281 @@
1#include "Edje.h"
2#include "edje_private.h"
3
4#define E_SMART_OBJ_GET(smart, o, type) \
5 { \
6 char *_e_smart_str; \
7 \
8 if (!o) return; \
9 smart = evas_object_smart_data_get(o); \
10 if (!smart) return; \
11 _e_smart_str = (char *)evas_object_type_get(o); \
12 if (!_e_smart_str) return; \
13 if (strcmp(_e_smart_str, type)) return; \
14 }
15
16#define E_SMART_OBJ_GET_RETURN(smart, o, type, ret) \
17 { \
18 char *_e_smart_str; \
19 \
20 if (!o) return ret; \
21 smart = evas_object_smart_data_get(o); \
22 if (!smart) return ret; \
23 _e_smart_str = (char *)evas_object_type_get(o); \
24 if (!_e_smart_str) return ret; \
25 if (strcmp(_e_smart_str, type)) return ret; \
26 }
27
28#define E_OBJ_NAME "edje_container_object"
29
30typedef struct _Smart_Data Smart_Data;
31typedef struct _Smart_Item Smart_Item;
32typedef struct _Smart_Column Smart_Column;
33
34struct _Smart_Data
35{
36 int layout;
37 Evas_List *children;
38 struct {
39 int w, h;
40 } min, max;
41};
42
43struct _Smart_Item
44{
45 Evas_Object *container;
46 Evas_Object *obj;
47};
48
49struct _Smart_Column
50{
51 int min, max;
52};
53
54#define EDJE_LAYOUT_NONE 0
55
56/* the following are "linear" layout systems */
57
58/* H & V LIST pack all items at their minimum size - no expanding in the lists
59 * direction (lets say height), BUT all items are expanded to fill the "width"
60 * of the list. if an item is too small to fit the width, the list object will
61 * call a "min_size_change" callback indicating to the parent/swallower that
62 * the parent should revise its use/view of this object. this is intended for
63 * large lists of items - like a list of files, or titles etc. this allows
64 * for each item to have multiple columns. each column may be any size, with
65 * the minimu size being the sum of all minimum column widths. as more items
66 * are added column widths may be adjusted and all items told of this
67 * adjustment
68 */
69#define EDJE_LAYOUT_VLIST 2
70#define EDJE_LAYOUT_HLIST 1
71/* H & V BOX pack items and may or may not expand an item in any direction and
72 * may align an item smaller than its allocated space in a certain way. they
73 * dont know about columns etc. like lists.
74 */
75#define EDJE_LAYOUT_VBOX 4
76#define EDJE_LAYOUT_HBOX 3
77/* H & V flow are like "file manager" views you see in explorer etc. wehere
78 * items "line wrap" as they go along horizontally (or vertizally) as needed
79 */
80#define EDJE_LAYOUT_VFLOW 6
81#define EDJE_LAYOUT_HFLOW 5
82
83/* the following are "2 dimensional" layout systems */
84
85/* tables are full 2-dimensional layouts which dont really have append and
86 * prepend semantics... this will need working on later for 2d layouts
87 */
88#define EDJE_LAYOUT_TABLE 7
89#define EDJE_LAYOUT_COUNT 8
90
91static void _smart_init(void);
92static void _smart_add(Evas_Object * obj);
93static void _smart_del(Evas_Object * obj);
94static void _smart_layer_set(Evas_Object * obj, int layer);
95static void _smart_raise(Evas_Object * obj);
96static void _smart_lower(Evas_Object * obj);
97static void _smart_stack_above(Evas_Object * obj, Evas_Object * above);
98static void _smart_stack_below(Evas_Object * obj, Evas_Object * below);
99static void _smart_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y);
100static void _smart_resize(Evas_Object * obj, Evas_Coord w, Evas_Coord h);
101static void _smart_show(Evas_Object * obj);
102static void _smart_hide(Evas_Object * obj);
103static void _smart_color_set(Evas_Object * obj, int r, int g, int b, int a);
104static void _smart_clip_set(Evas_Object * obj, Evas_Object * clip);
105static void _smart_clip_unset(Evas_Object * obj);
106
107static Evas_Smart *smart = NULL;
108
109Evas_Object *
110_edje_container_object_add(Evas *evas)
111{
112 _smart_init();
113 return evas_object_smart_add(evas, smart);
114}
115
116/*******************************************/
117/* Internal smart object required routines */
118/*******************************************/
119static void
120_smart_init(void)
121{
122 if (smart) return;
123 smart = evas_smart_new(E_OBJ_NAME,
124 _smart_add,
125 _smart_del,
126 _smart_layer_set,
127 _smart_raise,
128 _smart_lower,
129 _smart_stack_above,
130 _smart_stack_below,
131 _smart_move,
132 _smart_resize,
133 _smart_show,
134 _smart_hide,
135 _smart_color_set,
136 _smart_clip_set,
137 _smart_clip_unset,
138 NULL);
139}
140
141static void
142_smart_add(Evas_Object *obj)
143{
144 Smart_Data *sd;
145
146 sd = calloc(1, sizeof(Smart_Data));
147 if (!sd) return;
148// evas_object_smart_member_add(sd->obj, obj);
149 evas_object_smart_data_set(obj, sd);
150}
151
152static void
153_smart_del(Evas_Object *obj)
154{
155 Smart_Data *sd;
156
157 sd = evas_object_smart_data_get(obj);
158 if (!sd) return;
159// evas_object_del(sd->obj);
160 free(sd);
161}
162
163static void
164_smart_layer_set(Evas_Object *obj, int layer)
165{
166 Smart_Data *sd;
167
168 sd = evas_object_smart_data_get(obj);
169 if (!sd) return;
170// evas_object_layer_set(sd->obj, layer);
171}
172
173static void
174_smart_raise(Evas_Object *obj)
175{
176 Smart_Data *sd;
177
178 sd = evas_object_smart_data_get(obj);
179 if (!sd) return;
180// evas_object_raise(sd->obj);
181}
182
183static void
184_smart_lower(Evas_Object *obj)
185{
186 Smart_Data *sd;
187
188 sd = evas_object_smart_data_get(obj);
189 if (!sd) return;
190// evas_object_lower(sd->obj);
191}
192
193static void
194_smart_stack_above(Evas_Object *obj, Evas_Object *above)
195{
196 Smart_Data *sd;
197
198 sd = evas_object_smart_data_get(obj);
199 if (!sd) return;
200// evas_object_stack_above(sd->obj, above);
201}
202
203static void
204_smart_stack_below(Evas_Object *obj, Evas_Object *below)
205{
206 Smart_Data *sd;
207
208 sd = evas_object_smart_data_get(obj);
209 if (!sd) return;
210// evas_object_stack_below(sd->obj, below);
211}
212
213static void
214_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
215{
216 Smart_Data *sd;
217
218 sd = evas_object_smart_data_get(obj);
219 if (!sd) return;
220// evas_object_move(sd->obj, x, y);
221}
222
223static void
224_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
225{
226 Smart_Data *sd;
227
228 sd = evas_object_smart_data_get(obj);
229 if (!sd) return;
230// evas_object_resize(sd->obj, w, h);
231}
232
233static void
234_smart_show(Evas_Object *obj)
235{
236 Smart_Data *sd;
237
238 sd = evas_object_smart_data_get(obj);
239 if (!sd) return;
240// evas_object_show(sd->obj);
241}
242
243static void
244_smart_hide(Evas_Object *obj)
245{
246 Smart_Data *sd;
247
248 sd = evas_object_smart_data_get(obj);
249 if (!sd) return;
250// evas_object_hide(sd->obj);
251}
252
253static void
254_smart_color_set(Evas_Object *obj, int r, int g, int b, int a)
255{
256 Smart_Data *sd;
257
258 sd = evas_object_smart_data_get(obj);
259 if (!sd) return;
260// evas_object_color_set(sd->obj, r, g, b, a);
261}
262
263static void
264_smart_clip_set(Evas_Object *obj, Evas_Object *clip)
265{
266 Smart_Data *sd;
267
268 sd = evas_object_smart_data_get(obj);
269 if (!sd) return;
270// evas_object_clip_set(sd->obj, clip);
271}
272
273static void
274_smart_clip_unset(Evas_Object *obj)
275{
276 Smart_Data *sd;
277
278 sd = evas_object_smart_data_get(obj);
279 if (!sd) return;
280// evas_object_clip_unset(sd->obj);
281}
diff --git a/legacy/emotion/autogen.sh b/legacy/emotion/autogen.sh
index 778fc5b1d9..88ee7f3a0e 100755
--- a/legacy/emotion/autogen.sh
+++ b/legacy/emotion/autogen.sh
@@ -1,137 +1,13 @@
1#!/bin/sh 1#!/bin/sh
2# Run this to generate all the initial makefiles, etc.
3 2
4srcdir=`dirname $0` 3rm -rf autom4te.cache
5PKG_NAME="the package." 4rm -f aclocal.m4
6 5
7DIE=0 6echo "Running aclocal..."; aclocal $ACLOCAL_FLAGS -I m4 \
7&& echo "Running autoheader..."; autoheader \
8&& echo "Running autoconf..."; autoconf \
9&& echo "Running libtoolize..."; libtoolize --automake \
10&& echo "Running automake..."; automake --add-missing --copy --gnu
8 11
9(autoconf --version) < /dev/null > /dev/null 2>&1 || { 12### If you want this, uncomment it.
10 echo 13./configure "$@"
11 echo "**Error**: You must have \`autoconf' installed to."
12 echo "Download the appropriate package for your distribution,"
13 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
14 DIE=1
15}
16
17(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
18 (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
19 echo
20 echo "**Error**: You must have \`libtool' installed."
21 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
22 echo "(or a newer version if it is available)"
23 DIE=1
24 }
25}
26
27grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
28 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
29 (gettext --version) < /dev/null > /dev/null 2>&1 || {
30 echo
31 echo "**Error**: You must have \`gettext' installed."
32 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
33 echo "(or a newer version if it is available)"
34 DIE=1
35 }
36}
37
38(automake --version) < /dev/null > /dev/null 2>&1 || {
39 echo
40 echo "**Error**: You must have \`automake' installed."
41 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
42 echo "(or a newer version if it is available)"
43 DIE=1
44 NO_AUTOMAKE=yes
45}
46
47
48# if no automake, don't bother testing for aclocal
49test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
50 echo
51 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
52 echo "installed doesn't appear recent enough."
53 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
54 echo "(or a newer version if it is available)"
55 DIE=1
56}
57
58if test "$DIE" -eq 1; then
59 exit 1
60fi
61
62if test -z "$*"; then
63 echo "**Warning**: I am going to run \`configure' with no arguments."
64 echo "If you wish to pass any to it, please specify them on the"
65 echo \`$0\'" command line."
66 echo
67fi
68
69case $CC in
70xlc )
71 am_opt=--include-deps;;
72esac
73
74for coin in `find $srcdir -name configure.in -print`
75do
76 dr=`dirname $coin`
77 if test -f $dr/NO-AUTO-GEN; then
78 echo skipping $dr -- flagged as no auto-gen
79 else
80 echo processing $dr
81 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
82 ( cd $dr
83 aclocalinclude="$ACLOCAL_FLAGS"
84 for k in $macrodirs; do
85 if test -d $k; then
86 aclocalinclude="$aclocalinclude -I $k"
87 ##else
88 ## echo "**Warning**: No such directory \`$k'. Ignored."
89 fi
90 done
91 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
92 if grep "sed.*POTFILES" configure.in >/dev/null; then
93 : do nothing -- we still have an old unmodified configure.in
94 else
95 echo "Creating $dr/aclocal.m4 ..."
96 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
97 echo "Running gettextize... Ignore non-fatal messages."
98 echo "no" | gettextize --force --copy
99 echo "Making $dr/aclocal.m4 writable ..."
100 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
101 fi
102 fi
103 if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
104 echo "Creating $dr/aclocal.m4 ..."
105 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
106 echo "Running gettextize... Ignore non-fatal messages."
107 echo "no" | gettextize --force --copy
108 echo "Making $dr/aclocal.m4 writable ..."
109 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
110 fi
111 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
112 echo "Running libtoolize..."
113 libtoolize --force --copy
114 fi
115 echo "Running aclocal $aclocalinclude ..."
116 aclocal $aclocalinclude
117 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
118 echo "Running autoheader..."
119 autoheader
120 fi
121 echo "Running automake --gnu $am_opt ..."
122 automake --add-missing --gnu $am_opt
123 echo "Running autoconf ..."
124 autoconf
125 )
126 fi
127done
128
129#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
130
131if test x$NOCONFIGURE = x; then
132 echo Running $srcdir/configure $conf_flags "$@" ...
133 $srcdir/configure $conf_flags "$@" \
134 && echo Now type \`make\' to compile $PKG_NAME
135else
136 echo Skipping configure process.
137fi
diff --git a/legacy/emotion/m4/ac_expand_dir.m4 b/legacy/emotion/m4/ac_expand_dir.m4
new file mode 100644
index 0000000000..b5599a074d
--- /dev/null
+++ b/legacy/emotion/m4/ac_expand_dir.m4
@@ -0,0 +1,14 @@
1dnl AC_EXPAND_DIR(VARNAME, DIR)
2dnl expands occurrences of ${prefix} and ${exec_prefix} in the given DIR,
3dnl and assigns the resulting string to VARNAME
4dnl example: AC_DEFINE_DIR(DATADIR, "$datadir")
5dnl by Alexandre Oliva <oliva@dcc.unicamp.br>
6AC_DEFUN([AC_EXPAND_DIR], [
7 $1=$2
8 $1=`(
9 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
10 test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
11 eval echo \""[$]$1"\"
12 )`
13])
14
diff --git a/legacy/emotion/m4/ac_path_generic.m4 b/legacy/emotion/m4/ac_path_generic.m4
new file mode 100644
index 0000000000..27b55b3ff4
--- /dev/null
+++ b/legacy/emotion/m4/ac_path_generic.m4
@@ -0,0 +1,136 @@
1dnl @synopsis AC_PATH_GENERIC(LIBRARY [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
2dnl
3dnl Runs a LIBRARY-config script and defines LIBRARY_CFLAGS and LIBRARY_LIBS
4dnl
5dnl The script must support `--cflags' and `--libs' args.
6dnl If MINIMUM-VERSION is specified, the script must also support the
7dnl `--version' arg.
8dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given,
9dnl it must also support `--prefix' and `--exec-prefix'.
10dnl (In other words, it must be like gtk-config.)
11dnl
12dnl For example:
13dnl
14dnl AC_PATH_GENERIC(Foo, 1.0.0)
15dnl
16dnl would run `foo-config --version' and check that it is at least 1.0.0
17dnl
18dnl If so, the following would then be defined:
19dnl
20dnl FOO_CFLAGS to `foo-config --cflags`
21dnl FOO_LIBS to `foo-config --libs`
22dnl
23dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK)
24dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount)
25dnl
26dnl @author Angus Lees <gusl@cse.unsw.edu.au>
27
28AC_DEFUN([AC_PATH_GENERIC],
29[dnl
30dnl we're going to need uppercase, lowercase and user-friendly versions of the
31dnl string `LIBRARY'
32pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
33pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
34
35dnl
36dnl Get the cflags and libraries from the LIBRARY-config script
37dnl
38AC_ARG_WITH(DOWN-prefix,[ --with-]DOWN[-prefix=PFX Prefix where $1 is installed (optional)],
39 DOWN[]_config_prefix="$withval", DOWN[]_config_prefix="")
40AC_ARG_WITH(DOWN-exec-prefix,[ --with-]DOWN[-exec-prefix=PFX Exec prefix where $1 is installed (optional)],
41 DOWN[]_config_exec_prefix="$withval", DOWN[]_config_exec_prefix="")
42
43 if test x$DOWN[]_config_exec_prefix != x ; then
44 DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix"
45 if test x${UP[]_CONFIG+set} != xset ; then
46 UP[]_CONFIG=$DOWN[]_config_exec_prefix/bin/DOWN-config
47 fi
48 fi
49 if test x$DOWN[]_config_prefix != x ; then
50 DOWN[]_config_args="$DOWN[]_config_args --prefix=$DOWN[]_config_prefix"
51 if test x${UP[]_CONFIG+set} != xset ; then
52 UP[]_CONFIG=$DOWN[]_config_prefix/bin/DOWN-config
53 fi
54 fi
55
56 AC_PATH_PROG(UP[]_CONFIG, DOWN-config, no)
57 ifelse([$2], ,
58 AC_MSG_CHECKING(for $1),
59 AC_MSG_CHECKING(for $1 - version >= $2)
60 )
61 no_[]DOWN=""
62 if test "$UP[]_CONFIG" = "no" ; then
63 no_[]DOWN=yes
64 else
65 UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args --cflags`"
66 UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args --libs`"
67 ifelse([$2], , ,[
68 DOWN[]_config_major_version=`$UP[]_CONFIG $DOWN[]_config_args \
69 --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
70 DOWN[]_config_minor_version=`$UP[]_CONFIG $DOWN[]_config_args \
71 --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
72 DOWN[]_config_micro_version=`$UP[]_CONFIG $DOWN[]_config_args \
73 --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
74 DOWN[]_wanted_major_version="regexp($2, [\<\([0-9]*\)], [\1])"
75 DOWN[]_wanted_minor_version="regexp($2, [\<\([0-9]*\)\.\([0-9]*\)], [\2])"
76 DOWN[]_wanted_micro_version="regexp($2, [\<\([0-9]*\).\([0-9]*\).\([0-9]*\)], [\3])"
77
78 # Compare wanted version to what config script returned.
79 # If I knew what library was being run, i'd probably also compile
80 # a test program at this point (which also extracted and tested
81 # the version in some library-specific way)
82 if test "$DOWN[]_config_major_version" -lt \
83 "$DOWN[]_wanted_major_version" \
84 -o \( "$DOWN[]_config_major_version" -eq \
85 "$DOWN[]_wanted_major_version" \
86 -a "$DOWN[]_config_minor_version" -lt \
87 "$DOWN[]_wanted_minor_version" \) \
88 -o \( "$DOWN[]_config_major_version" -eq \
89 "$DOWN[]_wanted_major_version" \
90 -a "$DOWN[]_config_minor_version" -eq \
91 "$DOWN[]_wanted_minor_version" \
92 -a "$DOWN[]_config_micro_version" -lt \
93 "$DOWN[]_wanted_micro_version" \) ; then
94 # older version found
95 no_[]DOWN=yes
96 echo -n "*** An old version of $1 "
97 echo -n "($DOWN[]_config_major_version"
98 echo -n ".$DOWN[]_config_minor_version"
99 echo ".$DOWN[]_config_micro_version) was found."
100 echo -n "*** You need a version of $1 newer than "
101 echo -n "$DOWN[]_wanted_major_version"
102 echo -n ".$DOWN[]_wanted_minor_version"
103 echo ".$DOWN[]_wanted_micro_version."
104 echo "***"
105 echo "*** If you have already installed a sufficiently new version, this error"
106 echo "*** probably means that the wrong copy of the DOWN-config shell script is"
107 echo "*** being found. The easiest way to fix this is to remove the old version"
108 echo "*** of $1, but you can also set the UP[]_CONFIG environment to point to the"
109 echo "*** correct copy of DOWN-config. (In this case, you will have to"
110 echo "*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf"
111 echo "*** so that the correct libraries are found at run-time)"
112 fi
113 ])
114 fi
115 if test "x$no_[]DOWN" = x ; then
116 AC_MSG_RESULT(yes)
117 ifelse([$3], , :, [$3])
118 else
119 AC_MSG_RESULT(no)
120 if test "$UP[]_CONFIG" = "no" ; then
121 echo "*** The DOWN-config script installed by $1 could not be found"
122 echo "*** If $1 was installed in PREFIX, make sure PREFIX/bin is in"
123 echo "*** your path, or set the UP[]_CONFIG environment variable to the"
124 echo "*** full path to DOWN-config."
125 fi
126 UP[]_CFLAGS=""
127 UP[]_LIBS=""
128 ifelse([$4], , :, [$4])
129 fi
130 AC_SUBST(UP[]_CFLAGS)
131 AC_SUBST(UP[]_LIBS)
132
133 popdef([UP])
134 popdef([DOWN])
135])
136
diff --git a/legacy/emotion/src/lib/Emotion.h b/legacy/emotion/src/lib/Emotion.h
index c621554581..94043103c7 100644
--- a/legacy/emotion/src/lib/Emotion.h
+++ b/legacy/emotion/src/lib/Emotion.h
@@ -6,13 +6,13 @@
6 6
7enum _Emotion_Event 7enum _Emotion_Event
8{ 8{
9 EMOTION_EVENT_MENU1, 9 EMOTION_EVENT_MENU1, // Escape Menu
10 EMOTION_EVENT_MENU2, 10 EMOTION_EVENT_MENU2, // Title Menu
11 EMOTION_EVENT_MENU3, 11 EMOTION_EVENT_MENU3, // Root Menu
12 EMOTION_EVENT_MENU4, 12 EMOTION_EVENT_MENU4, // Subpicture Menu
13 EMOTION_EVENT_MENU5, 13 EMOTION_EVENT_MENU5, // Audio Menu
14 EMOTION_EVENT_MENU6, 14 EMOTION_EVENT_MENU6, // Angle Menu
15 EMOTION_EVENT_MENU7, 15 EMOTION_EVENT_MENU7, // Part Menu
16 EMOTION_EVENT_UP, 16 EMOTION_EVENT_UP,
17 EMOTION_EVENT_DOWN, 17 EMOTION_EVENT_DOWN,
18 EMOTION_EVENT_LEFT, 18 EMOTION_EVENT_LEFT,
diff --git a/legacy/emotion/src/modules/Makefile.am b/legacy/emotion/src/modules/Makefile.am
index e5ee9f85c8..9403be3b1f 100644
--- a/legacy/emotion/src/modules/Makefile.am
+++ b/legacy/emotion/src/modules/Makefile.am
@@ -2,7 +2,7 @@
2 2
3SUBDIRS = xine 3SUBDIRS = xine
4 4
5AUTOMAKE_OPTIONS = 1.4 foreign 5#AUTOMAKE_OPTIONS = 1.4 foreign
6 6
7MAINTAINERCLEANFILES = Makefile.in 7MAINTAINERCLEANFILES = Makefile.in
8 8
@@ -22,6 +22,6 @@ emotion_xine.h
22emotion_decoder_xine_la_LIBADD = @my_libs@ @xine_libs@ 22emotion_decoder_xine_la_LIBADD = @my_libs@ @xine_libs@
23emotion_decoder_xine_la_LDFLAGS = \ 23emotion_decoder_xine_la_LDFLAGS = \
24$(LDFLAGS) \ 24$(LDFLAGS) \
25-no-undefined -module -avoid-version \ 25-module -avoid-version \
26-L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs 26-L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
27emotion_decoder_xine_la_DEPENDENCIES = $(top_builddir)/config.h 27emotion_decoder_xine_la_DEPENDENCIES = $(top_builddir)/config.h
diff --git a/legacy/emotion/src/modules/emotion_xine.c b/legacy/emotion/src/modules/emotion_xine.c
index f3b2f08cdf..4044ef531c 100644
--- a/legacy/emotion/src/modules/emotion_xine.c
+++ b/legacy/emotion/src/modules/emotion_xine.c
@@ -10,6 +10,9 @@ static int init_count = 0;
10static int fd_read = -1; 10static int fd_read = -1;
11static int fd_write = -1; 11static int fd_write = -1;
12Ecore_Fd_Handler *fd_handler = NULL; 12Ecore_Fd_Handler *fd_handler = NULL;
13static int fd_ev_read = -1;
14static int fd_ev_write = -1;
15Ecore_Fd_Handler *fd_ev_handler = NULL;
13static xine_t *decoder = NULL; 16static xine_t *decoder = NULL;
14 17
15static int em_init(void); 18static int em_init(void);
@@ -59,9 +62,11 @@ static void em_speed_set(void *ef, double speed);
59static double em_speed_get(void *ef); 62static double em_speed_get(void *ef);
60static int em_eject(void *ef); 63static int em_eject(void *ef);
61 64
62static void *_em_seek (void *par); 65static void *_em_seek (void *par);
63static int _em_fd_active(void *data, Ecore_Fd_Handler *fdh); 66static int _em_fd_active (void *data, Ecore_Fd_Handler *fdh);
64static int _em_timer (void *data); 67static void _em_event (void *data, const xine_event_t *event);
68static int _em_fd_ev_active(void *data, Ecore_Fd_Handler *fdh);
69static int _em_timer (void *data);
65 70
66static int 71static int
67em_init(void) 72em_init(void)
@@ -100,6 +105,23 @@ em_init(void)
100 ecore_main_fd_handler_active_set(fd_handler, ECORE_FD_READ); 105 ecore_main_fd_handler_active_set(fd_handler, ECORE_FD_READ);
101 } 106 }
102 } 107 }
108 {
109 int fds[2];
110
111 if (pipe(fds) == 0)
112 {
113 fd_ev_read = fds[0];
114 fd_ev_write = fds[1];
115 fcntl(fd_ev_read, F_SETFL, O_NONBLOCK);
116 fd_ev_handler = ecore_main_fd_handler_add(fd_ev_read,
117 ECORE_FD_READ,
118 _em_fd_ev_active,
119 decoder,
120 NULL,
121 NULL);
122 ecore_main_fd_handler_active_set(fd_ev_handler, ECORE_FD_READ);
123 }
124 }
103 } 125 }
104 return init_count; 126 return init_count;
105} 127}
@@ -115,11 +137,17 @@ em_shutdown(void)
115 ecore_main_fd_handler_del(fd_handler); 137 ecore_main_fd_handler_del(fd_handler);
116 close(fd_write); 138 close(fd_write);
117 close(fd_read); 139 close(fd_read);
140 ecore_main_fd_handler_del(fd_ev_handler);
141 close(fd_ev_write);
142 close(fd_ev_read);
118 143
119 decoder = NULL; 144 decoder = NULL;
120 fd_handler = NULL; 145 fd_handler = NULL;
121 fd_read = -1; 146 fd_read = -1;
122 fd_write = -1; 147 fd_write = -1;
148 fd_ev_handler = NULL;
149 fd_ev_read = -1;
150 fd_ev_write = -1;
123 } 151 }
124 return 0; 152 return 0;
125} 153}
@@ -218,10 +246,29 @@ em_file_open(const char *file, Evas_Object *obj)
218 } 246 }
219 if (1) 247 if (1)
220 { 248 {
249 xine_mrl_t **mrls;
250 int mrls_num;
251
252 mrls = xine_get_browse_mrls(decoder, "dvd", "dvd://", &mrls_num);
253 printf("mrls = %p\n", mrls);
254 if (mrls)
255 {
256 int i;
257
258 for (i = 0; i < mrls_num; i++)
259 {
260 printf("MRL: origin \"%s\" mrl \"%s\" link \"%s\" type %x size %i\n",
261 mrls[i]->origin, mrls[i]->mrl, mrls[i]->link,
262 (int)mrls[i]->type, (int)mrls[i]->size);
263 }
264 }
265 }
266 if (1)
267 {
221 char **auto_play_mrls; 268 char **auto_play_mrls;
222 int auto_play_num; 269 int auto_play_num;
223 270
224 auto_play_mrls = xine_get_autoplay_mrls(decoder, "cdda", &auto_play_num); 271 auto_play_mrls = xine_get_autoplay_mrls(decoder, "dvd", &auto_play_num);
225 printf("auto_play_mrls = %p\n", auto_play_mrls); 272 printf("auto_play_mrls = %p\n", auto_play_mrls);
226 if (auto_play_mrls) 273 if (auto_play_mrls)
227 { 274 {
@@ -232,13 +279,19 @@ em_file_open(const char *file, Evas_Object *obj)
232 } 279 }
233 } 280 }
234 ev->video = xine_open_video_driver(decoder, "emotion", XINE_VISUAL_TYPE_NONE, ev); 281 ev->video = xine_open_video_driver(decoder, "emotion", XINE_VISUAL_TYPE_NONE, ev);
235 ev->audio = xine_open_audio_driver(decoder, "oss", ev); 282 ev->audio = xine_open_audio_driver(decoder, "oss", ev);
283// ev->audio = xine_open_audio_driver(decoder, "alsa", ev);
284// ev->audio = xine_open_audio_driver(decoder, "arts", ev);
285// ev->audio = xine_open_audio_driver(decoder, "esd", ev);
236 ev->stream = xine_stream_new(decoder, ev->audio, ev->video); 286 ev->stream = xine_stream_new(decoder, ev->audio, ev->video);
287 ev->queue = xine_event_new_queue(ev->stream);
288 xine_event_create_listener_thread(ev->queue, _em_event, ev);
237 if (!xine_open(ev->stream, file)) 289 if (!xine_open(ev->stream, file))
238 { 290 {
239 xine_dispose(ev->stream); 291 xine_dispose(ev->stream);
240 if (ev->video) xine_close_video_driver(decoder, ev->video); 292 if (ev->video) xine_close_video_driver(decoder, ev->video);
241 if (ev->audio) xine_close_audio_driver(decoder, ev->audio); 293 if (ev->audio) xine_close_audio_driver(decoder, ev->audio);
294 xine_event_dispose_queue(ev->queue);
242 free(ev); 295 free(ev);
243 return NULL; 296 return NULL;
244 } 297 }
@@ -270,6 +323,7 @@ em_file_close(void *ef)
270 xine_stop(ev->stream); 323 xine_stop(ev->stream);
271 xine_close(ev->stream); 324 xine_close(ev->stream);
272 xine_dispose(ev->stream); 325 xine_dispose(ev->stream);
326 xine_event_dispose_queue(ev->queue);
273 if (ev->video) xine_close_video_driver(decoder, ev->video); 327 if (ev->video) xine_close_video_driver(decoder, ev->video);
274 if (ev->audio) xine_close_audio_driver(decoder, ev->audio); 328 if (ev->audio) xine_close_audio_driver(decoder, ev->audio);
275 if (ev->timer) ecore_timer_del(ev->timer); 329 if (ev->timer) ecore_timer_del(ev->timer);
@@ -906,9 +960,9 @@ _em_fd_active(void *data, Ecore_Fd_Handler *fdh)
906 int length_time = 0; 960 int length_time = 0;
907 961
908 fd = ecore_main_fd_handler_fd_get(fdh); 962 fd = ecore_main_fd_handler_fd_get(fdh);
909 while ((len = read(fd, &buf, sizeof(void *))) > 0) 963 while ((len = read(fd, &buf, sizeof(buf))) > 0)
910 { 964 {
911 if (len == sizeof(void *)) 965 if (len == sizeof(buf))
912 { 966 {
913 fr = buf; 967 fr = buf;
914 ev = _emotion_video_get(fr->obj); 968 ev = _emotion_video_get(fr->obj);
@@ -948,6 +1002,149 @@ _em_fd_active(void *data, Ecore_Fd_Handler *fdh)
948 } 1002 }
949} 1003}
950 1004
1005static void
1006_em_event(void *data, const xine_event_t *event)
1007{
1008 void *buf[2];
1009 Emotion_Xine_Event *new_ev;
1010
1011 new_ev = calloc(1, sizeof(Emotion_Xine_Event));
1012 if (!new_ev) return;
1013 new_ev->type = event->type;
1014 if (event->data)
1015 {
1016 new_ev->xine_event = malloc(event->data_length);
1017 if (!new_ev->xine_event)
1018 {
1019 free(new_ev);
1020 return;
1021 }
1022 memcpy(new_ev->xine_event, event->data, event->data_length);
1023 }
1024 buf[0] = data;
1025 buf[1] = new_ev;
1026 write(fd_ev_write, buf, sizeof(buf));
1027}
1028
1029static int
1030_em_fd_ev_active(void *data, Ecore_Fd_Handler *fdh)
1031{
1032 int fd, len;
1033 void *buf[2];
1034
1035 fd = ecore_main_fd_handler_fd_get(fdh);
1036 while ((len = read(fd, buf, sizeof(buf))) > 0)
1037 {
1038 if (len == sizeof(buf))
1039 {
1040 Emotion_Xine_Video *ev;
1041 Emotion_Xine_Event *eev;
1042
1043 printf("event from xine...\n");
1044 ev = buf[0];
1045 eev = buf[1];
1046 switch (eev->type)
1047 {
1048 case XINE_EVENT_UI_PLAYBACK_FINISHED:
1049 {
1050 printf("EV: Playback finished\n");
1051 /* no data in this event */
1052 }
1053 break;
1054 case XINE_EVENT_UI_CHANNELS_CHANGED:
1055 {
1056 printf("EV: Channels changed\n");
1057 /* no data in this event */
1058 }
1059 break;
1060 case XINE_EVENT_UI_SET_TITLE:
1061 {
1062 xine_ui_data_t *ev;
1063
1064 ev = eev->xine_event;
1065 printf("EV: New Title \"%s\"\n", ev->str);
1066 // title is ev->str
1067 }
1068 break;
1069 case XINE_EVENT_UI_MESSAGE:
1070 {
1071 xine_ui_message_data_t *ev;
1072
1073 ev = eev->xine_event;
1074 printf("EV: UI Message\n");
1075 // ev->type = error type(XINE_MSG_NO_ERROR, XINE_MSG_GENERAL_WARNING, XINE_MSG_UNKNOWN_HOST etc.)
1076 // ev->messages is a list of messages DOUBLE null terminated
1077 }
1078 break;
1079 case XINE_EVENT_AUDIO_LEVEL:
1080 {
1081 xine_audio_level_data_t *ev;
1082
1083 ev = eev->xine_event;
1084 printf("EV: Audio Level\n");
1085 // ev->left (0->100)
1086 // ev->right
1087 // ev->mute
1088 }
1089 break;
1090 case XINE_EVENT_PROGRESS:
1091 {
1092 xine_progress_data_t *ev;
1093
1094 ev = eev->xine_event;
1095 printf("EV: Progress \"%s\" %i%%\n", ev->description, ev->percent);
1096 // ev->description is text
1097 // ev->percent is a percentage marker (0-100)
1098 }
1099 break;
1100 case XINE_EVENT_MRL_REFERENCE:
1101 {
1102 xine_mrl_reference_data_t *ev;
1103
1104 ev = eev->xine_event;
1105 printf("EV: MRL Ref to \"%s\"\n", ev->mrl);
1106 // ev->alternative alternative playlist no
1107 // ev->mrl is the mrl
1108 }
1109 break;
1110 case XINE_EVENT_UI_NUM_BUTTONS:
1111 {
1112 xine_ui_data_t *ev;
1113
1114 ev = eev->xine_event;
1115 printf("EV: Num buttons %i\n", ev->num_buttons);
1116 // ev->num_buttons indicates how many buttons in the spu
1117 }
1118 break;
1119 case XINE_EVENT_SPU_BUTTON:
1120 {
1121 xine_spu_button_t *ev;
1122
1123 ev = eev->xine_event;
1124 printf("EV: Button enter? [%i] %i\n", ev->direction, ev->button);
1125 // ev->direction 1 = enter, 0 = leave
1126 // ev->button button number entered/left
1127 }
1128 break;
1129 case XINE_EVENT_DROPPED_FRAMES:
1130 {
1131 xine_dropped_frames_t *ev;
1132
1133 ev = eev->xine_event;
1134 printf("EV: Dropped Frames (skipped %i) (discarded %i)\n", ev->skipped_frames, ev->discarded_frames);
1135 // ev->skipped_frames = % frames skipped * 10
1136 // ev->discarded_frames = % frames skipped * 10
1137 }
1138 break;
1139 default:
1140 return;
1141 }
1142 if (eev->xine_event) free(eev->xine_event);
1143 free(eev);
1144 }
1145 }
1146}
1147
951static int 1148static int
952_em_timer(void *data) 1149_em_timer(void *data)
953{ 1150{
diff --git a/legacy/emotion/src/modules/emotion_xine.h b/legacy/emotion/src/modules/emotion_xine.h
index 0a819fc9b5..e7ff00e89d 100644
--- a/legacy/emotion/src/modules/emotion_xine.h
+++ b/legacy/emotion/src/modules/emotion_xine.h
@@ -5,12 +5,14 @@
5 5
6typedef struct _Emotion_Xine_Video Emotion_Xine_Video; 6typedef struct _Emotion_Xine_Video Emotion_Xine_Video;
7typedef struct _Emotion_Xine_Video_Frame Emotion_Xine_Video_Frame; 7typedef struct _Emotion_Xine_Video_Frame Emotion_Xine_Video_Frame;
8typedef struct _Emotion_Xine_Event Emotion_Xine_Event;
8 9
9struct _Emotion_Xine_Video 10struct _Emotion_Xine_Video
10{ 11{
11 xine_video_port_t *video; 12 xine_video_port_t *video;
12 xine_audio_port_t *audio; 13 xine_audio_port_t *audio;
13 xine_stream_t *stream; 14 xine_stream_t *stream;
15 xine_event_queue_t *queue;
14 int fd; 16 int fd;
15 double len; 17 double len;
16 double pos; 18 double pos;
@@ -42,6 +44,12 @@ struct _Emotion_Xine_Video_Frame
42 void *frame; 44 void *frame;
43}; 45};
44 46
47struct _Emotion_Xine_Event
48{
49 int type;
50 char *xine_event;
51};
52
45Emotion_Video_Module *module_open (void); 53Emotion_Video_Module *module_open (void);
46void module_close(Emotion_Video_Module *module); 54void module_close(Emotion_Video_Module *module);
47 55
diff --git a/legacy/emotion/src/modules/xine/Makefile.am b/legacy/emotion/src/modules/xine/Makefile.am
index 9edd65b333..d249514df4 100644
--- a/legacy/emotion/src/modules/xine/Makefile.am
+++ b/legacy/emotion/src/modules/xine/Makefile.am
@@ -1,6 +1,6 @@
1## Process this file with automake to produce Makefile.in 1## Process this file with automake to produce Makefile.in
2 2
3AUTOMAKE_OPTIONS = 1.4 foreign 3#AUTOMAKE_OPTIONS = 1.4 foreign
4 4
5MAINTAINERCLEANFILES = Makefile.in 5MAINTAINERCLEANFILES = Makefile.in
6 6
@@ -20,6 +20,6 @@ emotion_xine_vo_out.c
20xineplug_vo_out_emotion_la_LIBADD = @xine_libs@ 20xineplug_vo_out_emotion_la_LIBADD = @xine_libs@
21xineplug_vo_out_emotion_la_LDFLAGS = \ 21xineplug_vo_out_emotion_la_LDFLAGS = \
22$(LDFLAGS) \ 22$(LDFLAGS) \
23-no-undefined -module -avoid-version \ 23-module -avoid-version \
24-L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs 24-L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
25xineplug_vo_out_emotion_la_DEPENDENCIES = $(top_builddir)/config.h 25xineplug_vo_out_emotion_la_DEPENDENCIES = $(top_builddir)/config.h