autofool cleanups... argh! i hate autofools!
SVN revision: 10574
This commit is contained in:
parent
6b55e5b817
commit
b97f661628
|
@ -1,147 +1,13 @@
|
|||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
PKG_NAME="libecore"
|
||||
rm -rf autom4te.cache
|
||||
rm -f aclocal.m4
|
||||
|
||||
DIE=0
|
||||
echo "Running aclocal..."; aclocal $ACLOCAL_FLAGS -I m4 \
|
||||
&& echo "Running autoheader..."; autoheader \
|
||||
&& echo "Running autoconf..."; autoconf \
|
||||
&& echo "Running libtoolize..."; libtoolize --automake \
|
||||
&& echo "Running automake..."; automake --add-missing --copy --gnu
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`autoconf' installed to."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
|
||||
(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`libtool' installed."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
}
|
||||
|
||||
grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
|
||||
grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
|
||||
(gettext --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`gettext' installed."
|
||||
echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
}
|
||||
|
||||
grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
|
||||
grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
|
||||
(gettext --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`gettext' installed."
|
||||
echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
}
|
||||
|
||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`automake' installed."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
NO_AUTOMAKE=yes
|
||||
}
|
||||
|
||||
|
||||
# if no automake, don't bother testing for aclocal
|
||||
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
|
||||
echo "installed doesn't appear recent enough."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "**Warning**: I am going to run \`configure' with no arguments."
|
||||
echo "If you wish to pass any to it, please specify them on the"
|
||||
echo \`$0\'" command line."
|
||||
echo
|
||||
fi
|
||||
|
||||
case $CC in
|
||||
xlc )
|
||||
am_opt=--include-deps;;
|
||||
esac
|
||||
|
||||
for coin in `find $srcdir -name configure.in -print`
|
||||
do
|
||||
dr=`dirname $coin`
|
||||
if test -f $dr/NO-AUTO-GEN; then
|
||||
echo skipping $dr -- flagged as no auto-gen
|
||||
else
|
||||
echo processing $dr
|
||||
macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
|
||||
( cd $dr
|
||||
aclocalinclude="$ACLOCAL_FLAGS"
|
||||
for k in $macrodirs; do
|
||||
if test -d $k; then
|
||||
aclocalinclude="$aclocalinclude -I $k"
|
||||
##else
|
||||
## echo "**Warning**: No such directory \`$k'. Ignored."
|
||||
fi
|
||||
done
|
||||
if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
|
||||
if grep "sed.*POTFILES" configure.in >/dev/null; then
|
||||
: do nothing -- we still have an old unmodified configure.in
|
||||
else
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
echo "no" | gettextize --force --copy
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
fi
|
||||
if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
echo "no" | gettextize --force --copy
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
|
||||
echo "Running libtoolize..."
|
||||
libtoolize --force --copy
|
||||
fi
|
||||
echo "Running aclocal $aclocalinclude ..."
|
||||
aclocal $aclocalinclude
|
||||
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
|
||||
echo "Running autoheader..."
|
||||
autoheader
|
||||
fi
|
||||
echo "Running automake --gnu $am_opt ..."
|
||||
automake --add-missing --gnu $am_opt
|
||||
echo "Running autoconf ..."
|
||||
autoconf
|
||||
)
|
||||
fi
|
||||
done
|
||||
|
||||
#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
echo Running $srcdir/configure $conf_flags "$@" ...
|
||||
$srcdir/configure $conf_flags "$@"
|
||||
else
|
||||
echo Skipping configure process.
|
||||
fi
|
||||
### If you want this, uncomment it.
|
||||
./configure "$@"
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
dnl AC_EXPAND_DIR(VARNAME, DIR)
|
||||
dnl expands occurrences of ${prefix} and ${exec_prefix} in the given DIR,
|
||||
dnl and assigns the resulting string to VARNAME
|
||||
dnl example: AC_DEFINE_DIR(DATADIR, "$datadir")
|
||||
dnl by Alexandre Oliva <oliva@dcc.unicamp.br>
|
||||
AC_DEFUN([AC_EXPAND_DIR], [
|
||||
$1=$2
|
||||
$1=`(
|
||||
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
|
||||
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
|
||||
eval echo \""[$]$1"\"
|
||||
)`
|
||||
])
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
dnl @synopsis AC_PATH_GENERIC(LIBRARY [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl
|
||||
dnl Runs a LIBRARY-config script and defines LIBRARY_CFLAGS and LIBRARY_LIBS
|
||||
dnl
|
||||
dnl The script must support `--cflags' and `--libs' args.
|
||||
dnl If MINIMUM-VERSION is specified, the script must also support the
|
||||
dnl `--version' arg.
|
||||
dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given,
|
||||
dnl it must also support `--prefix' and `--exec-prefix'.
|
||||
dnl (In other words, it must be like gtk-config.)
|
||||
dnl
|
||||
dnl For example:
|
||||
dnl
|
||||
dnl AC_PATH_GENERIC(Foo, 1.0.0)
|
||||
dnl
|
||||
dnl would run `foo-config --version' and check that it is at least 1.0.0
|
||||
dnl
|
||||
dnl If so, the following would then be defined:
|
||||
dnl
|
||||
dnl FOO_CFLAGS to `foo-config --cflags`
|
||||
dnl FOO_LIBS to `foo-config --libs`
|
||||
dnl
|
||||
dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK)
|
||||
dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount)
|
||||
dnl
|
||||
dnl @author Angus Lees <gusl@cse.unsw.edu.au>
|
||||
|
||||
AC_DEFUN([AC_PATH_GENERIC],
|
||||
[dnl
|
||||
dnl we're going to need uppercase, lowercase and user-friendly versions of the
|
||||
dnl string `LIBRARY'
|
||||
pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
|
||||
pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
|
||||
|
||||
dnl
|
||||
dnl Get the cflags and libraries from the LIBRARY-config script
|
||||
dnl
|
||||
AC_ARG_WITH(DOWN-prefix,[ --with-]DOWN[-prefix=PFX Prefix where $1 is installed (optional)],
|
||||
DOWN[]_config_prefix="$withval", DOWN[]_config_prefix="")
|
||||
AC_ARG_WITH(DOWN-exec-prefix,[ --with-]DOWN[-exec-prefix=PFX Exec prefix where $1 is installed (optional)],
|
||||
DOWN[]_config_exec_prefix="$withval", DOWN[]_config_exec_prefix="")
|
||||
|
||||
if test x$DOWN[]_config_exec_prefix != x ; then
|
||||
DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix"
|
||||
if test x${UP[]_CONFIG+set} != xset ; then
|
||||
UP[]_CONFIG=$DOWN[]_config_exec_prefix/bin/DOWN-config
|
||||
fi
|
||||
fi
|
||||
if test x$DOWN[]_config_prefix != x ; then
|
||||
DOWN[]_config_args="$DOWN[]_config_args --prefix=$DOWN[]_config_prefix"
|
||||
if test x${UP[]_CONFIG+set} != xset ; then
|
||||
UP[]_CONFIG=$DOWN[]_config_prefix/bin/DOWN-config
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(UP[]_CONFIG, DOWN-config, no)
|
||||
ifelse([$2], ,
|
||||
AC_MSG_CHECKING(for $1),
|
||||
AC_MSG_CHECKING(for $1 - version >= $2)
|
||||
)
|
||||
no_[]DOWN=""
|
||||
if test "$UP[]_CONFIG" = "no" ; then
|
||||
no_[]DOWN=yes
|
||||
else
|
||||
UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args --cflags`"
|
||||
UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args --libs`"
|
||||
ifelse([$2], , ,[
|
||||
DOWN[]_config_major_version=`$UP[]_CONFIG $DOWN[]_config_args \
|
||||
--version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
DOWN[]_config_minor_version=`$UP[]_CONFIG $DOWN[]_config_args \
|
||||
--version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
DOWN[]_config_micro_version=`$UP[]_CONFIG $DOWN[]_config_args \
|
||||
--version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
DOWN[]_wanted_major_version="regexp($2, [\<\([0-9]*\)], [\1])"
|
||||
DOWN[]_wanted_minor_version="regexp($2, [\<\([0-9]*\)\.\([0-9]*\)], [\2])"
|
||||
DOWN[]_wanted_micro_version="regexp($2, [\<\([0-9]*\).\([0-9]*\).\([0-9]*\)], [\3])"
|
||||
|
||||
# Compare wanted version to what config script returned.
|
||||
# If I knew what library was being run, i'd probably also compile
|
||||
# a test program at this point (which also extracted and tested
|
||||
# the version in some library-specific way)
|
||||
if test "$DOWN[]_config_major_version" -lt \
|
||||
"$DOWN[]_wanted_major_version" \
|
||||
-o \( "$DOWN[]_config_major_version" -eq \
|
||||
"$DOWN[]_wanted_major_version" \
|
||||
-a "$DOWN[]_config_minor_version" -lt \
|
||||
"$DOWN[]_wanted_minor_version" \) \
|
||||
-o \( "$DOWN[]_config_major_version" -eq \
|
||||
"$DOWN[]_wanted_major_version" \
|
||||
-a "$DOWN[]_config_minor_version" -eq \
|
||||
"$DOWN[]_wanted_minor_version" \
|
||||
-a "$DOWN[]_config_micro_version" -lt \
|
||||
"$DOWN[]_wanted_micro_version" \) ; then
|
||||
# older version found
|
||||
no_[]DOWN=yes
|
||||
echo -n "*** An old version of $1 "
|
||||
echo -n "($DOWN[]_config_major_version"
|
||||
echo -n ".$DOWN[]_config_minor_version"
|
||||
echo ".$DOWN[]_config_micro_version) was found."
|
||||
echo -n "*** You need a version of $1 newer than "
|
||||
echo -n "$DOWN[]_wanted_major_version"
|
||||
echo -n ".$DOWN[]_wanted_minor_version"
|
||||
echo ".$DOWN[]_wanted_micro_version."
|
||||
echo "***"
|
||||
echo "*** If you have already installed a sufficiently new version, this error"
|
||||
echo "*** probably means that the wrong copy of the DOWN-config shell script is"
|
||||
echo "*** being found. The easiest way to fix this is to remove the old version"
|
||||
echo "*** of $1, but you can also set the UP[]_CONFIG environment to point to the"
|
||||
echo "*** correct copy of DOWN-config. (In this case, you will have to"
|
||||
echo "*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf"
|
||||
echo "*** so that the correct libraries are found at run-time)"
|
||||
fi
|
||||
])
|
||||
fi
|
||||
if test "x$no_[]DOWN" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$UP[]_CONFIG" = "no" ; then
|
||||
echo "*** The DOWN-config script installed by $1 could not be found"
|
||||
echo "*** If $1 was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the UP[]_CONFIG environment variable to the"
|
||||
echo "*** full path to DOWN-config."
|
||||
fi
|
||||
UP[]_CFLAGS=""
|
||||
UP[]_LIBS=""
|
||||
ifelse([$4], , :, [$4])
|
||||
fi
|
||||
AC_SUBST(UP[]_CFLAGS)
|
||||
AC_SUBST(UP[]_LIBS)
|
||||
|
||||
popdef([UP])
|
||||
popdef([DOWN])
|
||||
])
|
||||
|
|
@ -37,6 +37,7 @@ edje_smart.c \
|
|||
edje_text.c \
|
||||
edje_util.c \
|
||||
edje_var.c \
|
||||
edje_container.c \
|
||||
edje_private.h
|
||||
|
||||
libedje_la_LIBADD = $(LDFLAGS) -lm @evas_libs@ @ecore_libs@ @eet_libs@ @embryo_libs@
|
||||
|
|
|
@ -0,0 +1,281 @@
|
|||
#include "Edje.h"
|
||||
#include "edje_private.h"
|
||||
|
||||
#define E_SMART_OBJ_GET(smart, o, type) \
|
||||
{ \
|
||||
char *_e_smart_str; \
|
||||
\
|
||||
if (!o) return; \
|
||||
smart = evas_object_smart_data_get(o); \
|
||||
if (!smart) return; \
|
||||
_e_smart_str = (char *)evas_object_type_get(o); \
|
||||
if (!_e_smart_str) return; \
|
||||
if (strcmp(_e_smart_str, type)) return; \
|
||||
}
|
||||
|
||||
#define E_SMART_OBJ_GET_RETURN(smart, o, type, ret) \
|
||||
{ \
|
||||
char *_e_smart_str; \
|
||||
\
|
||||
if (!o) return ret; \
|
||||
smart = evas_object_smart_data_get(o); \
|
||||
if (!smart) return ret; \
|
||||
_e_smart_str = (char *)evas_object_type_get(o); \
|
||||
if (!_e_smart_str) return ret; \
|
||||
if (strcmp(_e_smart_str, type)) return ret; \
|
||||
}
|
||||
|
||||
#define E_OBJ_NAME "edje_container_object"
|
||||
|
||||
typedef struct _Smart_Data Smart_Data;
|
||||
typedef struct _Smart_Item Smart_Item;
|
||||
typedef struct _Smart_Column Smart_Column;
|
||||
|
||||
struct _Smart_Data
|
||||
{
|
||||
int layout;
|
||||
Evas_List *children;
|
||||
struct {
|
||||
int w, h;
|
||||
} min, max;
|
||||
};
|
||||
|
||||
struct _Smart_Item
|
||||
{
|
||||
Evas_Object *container;
|
||||
Evas_Object *obj;
|
||||
};
|
||||
|
||||
struct _Smart_Column
|
||||
{
|
||||
int min, max;
|
||||
};
|
||||
|
||||
#define EDJE_LAYOUT_NONE 0
|
||||
|
||||
/* the following are "linear" layout systems */
|
||||
|
||||
/* H & V LIST pack all items at their minimum size - no expanding in the lists
|
||||
* direction (lets say height), BUT all items are expanded to fill the "width"
|
||||
* of the list. if an item is too small to fit the width, the list object will
|
||||
* call a "min_size_change" callback indicating to the parent/swallower that
|
||||
* the parent should revise its use/view of this object. this is intended for
|
||||
* large lists of items - like a list of files, or titles etc. this allows
|
||||
* for each item to have multiple columns. each column may be any size, with
|
||||
* the minimu size being the sum of all minimum column widths. as more items
|
||||
* are added column widths may be adjusted and all items told of this
|
||||
* adjustment
|
||||
*/
|
||||
#define EDJE_LAYOUT_VLIST 2
|
||||
#define EDJE_LAYOUT_HLIST 1
|
||||
/* H & V BOX pack items and may or may not expand an item in any direction and
|
||||
* may align an item smaller than its allocated space in a certain way. they
|
||||
* dont know about columns etc. like lists.
|
||||
*/
|
||||
#define EDJE_LAYOUT_VBOX 4
|
||||
#define EDJE_LAYOUT_HBOX 3
|
||||
/* H & V flow are like "file manager" views you see in explorer etc. wehere
|
||||
* items "line wrap" as they go along horizontally (or vertizally) as needed
|
||||
*/
|
||||
#define EDJE_LAYOUT_VFLOW 6
|
||||
#define EDJE_LAYOUT_HFLOW 5
|
||||
|
||||
/* the following are "2 dimensional" layout systems */
|
||||
|
||||
/* tables are full 2-dimensional layouts which dont really have append and
|
||||
* prepend semantics... this will need working on later for 2d layouts
|
||||
*/
|
||||
#define EDJE_LAYOUT_TABLE 7
|
||||
#define EDJE_LAYOUT_COUNT 8
|
||||
|
||||
static void _smart_init(void);
|
||||
static void _smart_add(Evas_Object * obj);
|
||||
static void _smart_del(Evas_Object * obj);
|
||||
static void _smart_layer_set(Evas_Object * obj, int layer);
|
||||
static void _smart_raise(Evas_Object * obj);
|
||||
static void _smart_lower(Evas_Object * obj);
|
||||
static void _smart_stack_above(Evas_Object * obj, Evas_Object * above);
|
||||
static void _smart_stack_below(Evas_Object * obj, Evas_Object * below);
|
||||
static void _smart_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y);
|
||||
static void _smart_resize(Evas_Object * obj, Evas_Coord w, Evas_Coord h);
|
||||
static void _smart_show(Evas_Object * obj);
|
||||
static void _smart_hide(Evas_Object * obj);
|
||||
static void _smart_color_set(Evas_Object * obj, int r, int g, int b, int a);
|
||||
static void _smart_clip_set(Evas_Object * obj, Evas_Object * clip);
|
||||
static void _smart_clip_unset(Evas_Object * obj);
|
||||
|
||||
static Evas_Smart *smart = NULL;
|
||||
|
||||
Evas_Object *
|
||||
_edje_container_object_add(Evas *evas)
|
||||
{
|
||||
_smart_init();
|
||||
return evas_object_smart_add(evas, smart);
|
||||
}
|
||||
|
||||
/*******************************************/
|
||||
/* Internal smart object required routines */
|
||||
/*******************************************/
|
||||
static void
|
||||
_smart_init(void)
|
||||
{
|
||||
if (smart) return;
|
||||
smart = evas_smart_new(E_OBJ_NAME,
|
||||
_smart_add,
|
||||
_smart_del,
|
||||
_smart_layer_set,
|
||||
_smart_raise,
|
||||
_smart_lower,
|
||||
_smart_stack_above,
|
||||
_smart_stack_below,
|
||||
_smart_move,
|
||||
_smart_resize,
|
||||
_smart_show,
|
||||
_smart_hide,
|
||||
_smart_color_set,
|
||||
_smart_clip_set,
|
||||
_smart_clip_unset,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_add(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
sd = calloc(1, sizeof(Smart_Data));
|
||||
if (!sd) return;
|
||||
// evas_object_smart_member_add(sd->obj, obj);
|
||||
evas_object_smart_data_set(obj, sd);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_del(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_del(sd->obj);
|
||||
free(sd);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_layer_set(Evas_Object *obj, int layer)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_layer_set(sd->obj, layer);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_raise(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_raise(sd->obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_lower(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_lower(sd->obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_stack_above(Evas_Object *obj, Evas_Object *above)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_stack_above(sd->obj, above);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_stack_below(Evas_Object *obj, Evas_Object *below)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_stack_below(sd->obj, below);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_move(sd->obj, x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_resize(sd->obj, w, h);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_show(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_show(sd->obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_hide(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_hide(sd->obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_color_set(Evas_Object *obj, int r, int g, int b, int a)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_color_set(sd->obj, r, g, b, a);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_clip_set(Evas_Object *obj, Evas_Object *clip)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_clip_set(sd->obj, clip);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_clip_unset(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_clip_unset(sd->obj);
|
||||
}
|
|
@ -1,137 +1,13 @@
|
|||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
PKG_NAME="the package."
|
||||
rm -rf autom4te.cache
|
||||
rm -f aclocal.m4
|
||||
|
||||
DIE=0
|
||||
echo "Running aclocal..."; aclocal $ACLOCAL_FLAGS -I m4 \
|
||||
&& echo "Running autoheader..."; autoheader \
|
||||
&& echo "Running autoconf..."; autoconf \
|
||||
&& echo "Running libtoolize..."; libtoolize --automake \
|
||||
&& echo "Running automake..."; automake --add-missing --copy --gnu
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`autoconf' installed to."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
|
||||
(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`libtool' installed."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
}
|
||||
|
||||
grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
|
||||
grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
|
||||
(gettext --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`gettext' installed."
|
||||
echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
}
|
||||
|
||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`automake' installed."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
NO_AUTOMAKE=yes
|
||||
}
|
||||
|
||||
|
||||
# if no automake, don't bother testing for aclocal
|
||||
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
|
||||
echo "installed doesn't appear recent enough."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "**Warning**: I am going to run \`configure' with no arguments."
|
||||
echo "If you wish to pass any to it, please specify them on the"
|
||||
echo \`$0\'" command line."
|
||||
echo
|
||||
fi
|
||||
|
||||
case $CC in
|
||||
xlc )
|
||||
am_opt=--include-deps;;
|
||||
esac
|
||||
|
||||
for coin in `find $srcdir -name configure.in -print`
|
||||
do
|
||||
dr=`dirname $coin`
|
||||
if test -f $dr/NO-AUTO-GEN; then
|
||||
echo skipping $dr -- flagged as no auto-gen
|
||||
else
|
||||
echo processing $dr
|
||||
macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
|
||||
( cd $dr
|
||||
aclocalinclude="$ACLOCAL_FLAGS"
|
||||
for k in $macrodirs; do
|
||||
if test -d $k; then
|
||||
aclocalinclude="$aclocalinclude -I $k"
|
||||
##else
|
||||
## echo "**Warning**: No such directory \`$k'. Ignored."
|
||||
fi
|
||||
done
|
||||
if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
|
||||
if grep "sed.*POTFILES" configure.in >/dev/null; then
|
||||
: do nothing -- we still have an old unmodified configure.in
|
||||
else
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
echo "no" | gettextize --force --copy
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
fi
|
||||
if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
echo "no" | gettextize --force --copy
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
|
||||
echo "Running libtoolize..."
|
||||
libtoolize --force --copy
|
||||
fi
|
||||
echo "Running aclocal $aclocalinclude ..."
|
||||
aclocal $aclocalinclude
|
||||
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
|
||||
echo "Running autoheader..."
|
||||
autoheader
|
||||
fi
|
||||
echo "Running automake --gnu $am_opt ..."
|
||||
automake --add-missing --gnu $am_opt
|
||||
echo "Running autoconf ..."
|
||||
autoconf
|
||||
)
|
||||
fi
|
||||
done
|
||||
|
||||
#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
echo Running $srcdir/configure $conf_flags "$@" ...
|
||||
$srcdir/configure $conf_flags "$@" \
|
||||
&& echo Now type \`make\' to compile $PKG_NAME
|
||||
else
|
||||
echo Skipping configure process.
|
||||
fi
|
||||
### If you want this, uncomment it.
|
||||
./configure "$@"
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
dnl AC_EXPAND_DIR(VARNAME, DIR)
|
||||
dnl expands occurrences of ${prefix} and ${exec_prefix} in the given DIR,
|
||||
dnl and assigns the resulting string to VARNAME
|
||||
dnl example: AC_DEFINE_DIR(DATADIR, "$datadir")
|
||||
dnl by Alexandre Oliva <oliva@dcc.unicamp.br>
|
||||
AC_DEFUN([AC_EXPAND_DIR], [
|
||||
$1=$2
|
||||
$1=`(
|
||||
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
|
||||
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
|
||||
eval echo \""[$]$1"\"
|
||||
)`
|
||||
])
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
dnl @synopsis AC_PATH_GENERIC(LIBRARY [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl
|
||||
dnl Runs a LIBRARY-config script and defines LIBRARY_CFLAGS and LIBRARY_LIBS
|
||||
dnl
|
||||
dnl The script must support `--cflags' and `--libs' args.
|
||||
dnl If MINIMUM-VERSION is specified, the script must also support the
|
||||
dnl `--version' arg.
|
||||
dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given,
|
||||
dnl it must also support `--prefix' and `--exec-prefix'.
|
||||
dnl (In other words, it must be like gtk-config.)
|
||||
dnl
|
||||
dnl For example:
|
||||
dnl
|
||||
dnl AC_PATH_GENERIC(Foo, 1.0.0)
|
||||
dnl
|
||||
dnl would run `foo-config --version' and check that it is at least 1.0.0
|
||||
dnl
|
||||
dnl If so, the following would then be defined:
|
||||
dnl
|
||||
dnl FOO_CFLAGS to `foo-config --cflags`
|
||||
dnl FOO_LIBS to `foo-config --libs`
|
||||
dnl
|
||||
dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK)
|
||||
dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount)
|
||||
dnl
|
||||
dnl @author Angus Lees <gusl@cse.unsw.edu.au>
|
||||
|
||||
AC_DEFUN([AC_PATH_GENERIC],
|
||||
[dnl
|
||||
dnl we're going to need uppercase, lowercase and user-friendly versions of the
|
||||
dnl string `LIBRARY'
|
||||
pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
|
||||
pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
|
||||
|
||||
dnl
|
||||
dnl Get the cflags and libraries from the LIBRARY-config script
|
||||
dnl
|
||||
AC_ARG_WITH(DOWN-prefix,[ --with-]DOWN[-prefix=PFX Prefix where $1 is installed (optional)],
|
||||
DOWN[]_config_prefix="$withval", DOWN[]_config_prefix="")
|
||||
AC_ARG_WITH(DOWN-exec-prefix,[ --with-]DOWN[-exec-prefix=PFX Exec prefix where $1 is installed (optional)],
|
||||
DOWN[]_config_exec_prefix="$withval", DOWN[]_config_exec_prefix="")
|
||||
|
||||
if test x$DOWN[]_config_exec_prefix != x ; then
|
||||
DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix"
|
||||
if test x${UP[]_CONFIG+set} != xset ; then
|
||||
UP[]_CONFIG=$DOWN[]_config_exec_prefix/bin/DOWN-config
|
||||
fi
|
||||
fi
|
||||
if test x$DOWN[]_config_prefix != x ; then
|
||||
DOWN[]_config_args="$DOWN[]_config_args --prefix=$DOWN[]_config_prefix"
|
||||
if test x${UP[]_CONFIG+set} != xset ; then
|
||||
UP[]_CONFIG=$DOWN[]_config_prefix/bin/DOWN-config
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(UP[]_CONFIG, DOWN-config, no)
|
||||
ifelse([$2], ,
|
||||
AC_MSG_CHECKING(for $1),
|
||||
AC_MSG_CHECKING(for $1 - version >= $2)
|
||||
)
|
||||
no_[]DOWN=""
|
||||
if test "$UP[]_CONFIG" = "no" ; then
|
||||
no_[]DOWN=yes
|
||||
else
|
||||
UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args --cflags`"
|
||||
UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args --libs`"
|
||||
ifelse([$2], , ,[
|
||||
DOWN[]_config_major_version=`$UP[]_CONFIG $DOWN[]_config_args \
|
||||
--version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
DOWN[]_config_minor_version=`$UP[]_CONFIG $DOWN[]_config_args \
|
||||
--version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
DOWN[]_config_micro_version=`$UP[]_CONFIG $DOWN[]_config_args \
|
||||
--version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
DOWN[]_wanted_major_version="regexp($2, [\<\([0-9]*\)], [\1])"
|
||||
DOWN[]_wanted_minor_version="regexp($2, [\<\([0-9]*\)\.\([0-9]*\)], [\2])"
|
||||
DOWN[]_wanted_micro_version="regexp($2, [\<\([0-9]*\).\([0-9]*\).\([0-9]*\)], [\3])"
|
||||
|
||||
# Compare wanted version to what config script returned.
|
||||
# If I knew what library was being run, i'd probably also compile
|
||||
# a test program at this point (which also extracted and tested
|
||||
# the version in some library-specific way)
|
||||
if test "$DOWN[]_config_major_version" -lt \
|
||||
"$DOWN[]_wanted_major_version" \
|
||||
-o \( "$DOWN[]_config_major_version" -eq \
|
||||
"$DOWN[]_wanted_major_version" \
|
||||
-a "$DOWN[]_config_minor_version" -lt \
|
||||
"$DOWN[]_wanted_minor_version" \) \
|
||||
-o \( "$DOWN[]_config_major_version" -eq \
|
||||
"$DOWN[]_wanted_major_version" \
|
||||
-a "$DOWN[]_config_minor_version" -eq \
|
||||
"$DOWN[]_wanted_minor_version" \
|
||||
-a "$DOWN[]_config_micro_version" -lt \
|
||||
"$DOWN[]_wanted_micro_version" \) ; then
|
||||
# older version found
|
||||
no_[]DOWN=yes
|
||||
echo -n "*** An old version of $1 "
|
||||
echo -n "($DOWN[]_config_major_version"
|
||||
echo -n ".$DOWN[]_config_minor_version"
|
||||
echo ".$DOWN[]_config_micro_version) was found."
|
||||
echo -n "*** You need a version of $1 newer than "
|
||||
echo -n "$DOWN[]_wanted_major_version"
|
||||
echo -n ".$DOWN[]_wanted_minor_version"
|
||||
echo ".$DOWN[]_wanted_micro_version."
|
||||
echo "***"
|
||||
echo "*** If you have already installed a sufficiently new version, this error"
|
||||
echo "*** probably means that the wrong copy of the DOWN-config shell script is"
|
||||
echo "*** being found. The easiest way to fix this is to remove the old version"
|
||||
echo "*** of $1, but you can also set the UP[]_CONFIG environment to point to the"
|
||||
echo "*** correct copy of DOWN-config. (In this case, you will have to"
|
||||
echo "*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf"
|
||||
echo "*** so that the correct libraries are found at run-time)"
|
||||
fi
|
||||
])
|
||||
fi
|
||||
if test "x$no_[]DOWN" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$UP[]_CONFIG" = "no" ; then
|
||||
echo "*** The DOWN-config script installed by $1 could not be found"
|
||||
echo "*** If $1 was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the UP[]_CONFIG environment variable to the"
|
||||
echo "*** full path to DOWN-config."
|
||||
fi
|
||||
UP[]_CFLAGS=""
|
||||
UP[]_LIBS=""
|
||||
ifelse([$4], , :, [$4])
|
||||
fi
|
||||
AC_SUBST(UP[]_CFLAGS)
|
||||
AC_SUBST(UP[]_LIBS)
|
||||
|
||||
popdef([UP])
|
||||
popdef([DOWN])
|
||||
])
|
||||
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
enum _Emotion_Event
|
||||
{
|
||||
EMOTION_EVENT_MENU1,
|
||||
EMOTION_EVENT_MENU2,
|
||||
EMOTION_EVENT_MENU3,
|
||||
EMOTION_EVENT_MENU4,
|
||||
EMOTION_EVENT_MENU5,
|
||||
EMOTION_EVENT_MENU6,
|
||||
EMOTION_EVENT_MENU7,
|
||||
EMOTION_EVENT_MENU1, // Escape Menu
|
||||
EMOTION_EVENT_MENU2, // Title Menu
|
||||
EMOTION_EVENT_MENU3, // Root Menu
|
||||
EMOTION_EVENT_MENU4, // Subpicture Menu
|
||||
EMOTION_EVENT_MENU5, // Audio Menu
|
||||
EMOTION_EVENT_MENU6, // Angle Menu
|
||||
EMOTION_EVENT_MENU7, // Part Menu
|
||||
EMOTION_EVENT_UP,
|
||||
EMOTION_EVENT_DOWN,
|
||||
EMOTION_EVENT_LEFT,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
SUBDIRS = xine
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
#AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
|
@ -22,6 +22,6 @@ emotion_xine.h
|
|||
emotion_decoder_xine_la_LIBADD = @my_libs@ @xine_libs@
|
||||
emotion_decoder_xine_la_LDFLAGS = \
|
||||
$(LDFLAGS) \
|
||||
-no-undefined -module -avoid-version \
|
||||
-module -avoid-version \
|
||||
-L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
emotion_decoder_xine_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
|
|
@ -10,6 +10,9 @@ static int init_count = 0;
|
|||
static int fd_read = -1;
|
||||
static int fd_write = -1;
|
||||
Ecore_Fd_Handler *fd_handler = NULL;
|
||||
static int fd_ev_read = -1;
|
||||
static int fd_ev_write = -1;
|
||||
Ecore_Fd_Handler *fd_ev_handler = NULL;
|
||||
static xine_t *decoder = NULL;
|
||||
|
||||
static int em_init(void);
|
||||
|
@ -61,6 +64,8 @@ static int em_eject(void *ef);
|
|||
|
||||
static void *_em_seek (void *par);
|
||||
static int _em_fd_active (void *data, Ecore_Fd_Handler *fdh);
|
||||
static void _em_event (void *data, const xine_event_t *event);
|
||||
static int _em_fd_ev_active(void *data, Ecore_Fd_Handler *fdh);
|
||||
static int _em_timer (void *data);
|
||||
|
||||
static int
|
||||
|
@ -100,6 +105,23 @@ em_init(void)
|
|||
ecore_main_fd_handler_active_set(fd_handler, ECORE_FD_READ);
|
||||
}
|
||||
}
|
||||
{
|
||||
int fds[2];
|
||||
|
||||
if (pipe(fds) == 0)
|
||||
{
|
||||
fd_ev_read = fds[0];
|
||||
fd_ev_write = fds[1];
|
||||
fcntl(fd_ev_read, F_SETFL, O_NONBLOCK);
|
||||
fd_ev_handler = ecore_main_fd_handler_add(fd_ev_read,
|
||||
ECORE_FD_READ,
|
||||
_em_fd_ev_active,
|
||||
decoder,
|
||||
NULL,
|
||||
NULL);
|
||||
ecore_main_fd_handler_active_set(fd_ev_handler, ECORE_FD_READ);
|
||||
}
|
||||
}
|
||||
}
|
||||
return init_count;
|
||||
}
|
||||
|
@ -115,11 +137,17 @@ em_shutdown(void)
|
|||
ecore_main_fd_handler_del(fd_handler);
|
||||
close(fd_write);
|
||||
close(fd_read);
|
||||
ecore_main_fd_handler_del(fd_ev_handler);
|
||||
close(fd_ev_write);
|
||||
close(fd_ev_read);
|
||||
|
||||
decoder = NULL;
|
||||
fd_handler = NULL;
|
||||
fd_read = -1;
|
||||
fd_write = -1;
|
||||
fd_ev_handler = NULL;
|
||||
fd_ev_read = -1;
|
||||
fd_ev_write = -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -216,12 +244,31 @@ em_file_open(const char *file, Evas_Object *obj)
|
|||
xine_config_update_entry(decoder, &cf);
|
||||
}
|
||||
}
|
||||
if (1)
|
||||
{
|
||||
xine_mrl_t **mrls;
|
||||
int mrls_num;
|
||||
|
||||
mrls = xine_get_browse_mrls(decoder, "dvd", "dvd://", &mrls_num);
|
||||
printf("mrls = %p\n", mrls);
|
||||
if (mrls)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < mrls_num; i++)
|
||||
{
|
||||
printf("MRL: origin \"%s\" mrl \"%s\" link \"%s\" type %x size %i\n",
|
||||
mrls[i]->origin, mrls[i]->mrl, mrls[i]->link,
|
||||
(int)mrls[i]->type, (int)mrls[i]->size);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (1)
|
||||
{
|
||||
char **auto_play_mrls;
|
||||
int auto_play_num;
|
||||
|
||||
auto_play_mrls = xine_get_autoplay_mrls(decoder, "cdda", &auto_play_num);
|
||||
auto_play_mrls = xine_get_autoplay_mrls(decoder, "dvd", &auto_play_num);
|
||||
printf("auto_play_mrls = %p\n", auto_play_mrls);
|
||||
if (auto_play_mrls)
|
||||
{
|
||||
|
@ -233,12 +280,18 @@ em_file_open(const char *file, Evas_Object *obj)
|
|||
}
|
||||
ev->video = xine_open_video_driver(decoder, "emotion", XINE_VISUAL_TYPE_NONE, ev);
|
||||
ev->audio = xine_open_audio_driver(decoder, "oss", ev);
|
||||
// ev->audio = xine_open_audio_driver(decoder, "alsa", ev);
|
||||
// ev->audio = xine_open_audio_driver(decoder, "arts", ev);
|
||||
// ev->audio = xine_open_audio_driver(decoder, "esd", ev);
|
||||
ev->stream = xine_stream_new(decoder, ev->audio, ev->video);
|
||||
ev->queue = xine_event_new_queue(ev->stream);
|
||||
xine_event_create_listener_thread(ev->queue, _em_event, ev);
|
||||
if (!xine_open(ev->stream, file))
|
||||
{
|
||||
xine_dispose(ev->stream);
|
||||
if (ev->video) xine_close_video_driver(decoder, ev->video);
|
||||
if (ev->audio) xine_close_audio_driver(decoder, ev->audio);
|
||||
xine_event_dispose_queue(ev->queue);
|
||||
free(ev);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -270,6 +323,7 @@ em_file_close(void *ef)
|
|||
xine_stop(ev->stream);
|
||||
xine_close(ev->stream);
|
||||
xine_dispose(ev->stream);
|
||||
xine_event_dispose_queue(ev->queue);
|
||||
if (ev->video) xine_close_video_driver(decoder, ev->video);
|
||||
if (ev->audio) xine_close_audio_driver(decoder, ev->audio);
|
||||
if (ev->timer) ecore_timer_del(ev->timer);
|
||||
|
@ -906,9 +960,9 @@ _em_fd_active(void *data, Ecore_Fd_Handler *fdh)
|
|||
int length_time = 0;
|
||||
|
||||
fd = ecore_main_fd_handler_fd_get(fdh);
|
||||
while ((len = read(fd, &buf, sizeof(void *))) > 0)
|
||||
while ((len = read(fd, &buf, sizeof(buf))) > 0)
|
||||
{
|
||||
if (len == sizeof(void *))
|
||||
if (len == sizeof(buf))
|
||||
{
|
||||
fr = buf;
|
||||
ev = _emotion_video_get(fr->obj);
|
||||
|
@ -948,6 +1002,149 @@ _em_fd_active(void *data, Ecore_Fd_Handler *fdh)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_em_event(void *data, const xine_event_t *event)
|
||||
{
|
||||
void *buf[2];
|
||||
Emotion_Xine_Event *new_ev;
|
||||
|
||||
new_ev = calloc(1, sizeof(Emotion_Xine_Event));
|
||||
if (!new_ev) return;
|
||||
new_ev->type = event->type;
|
||||
if (event->data)
|
||||
{
|
||||
new_ev->xine_event = malloc(event->data_length);
|
||||
if (!new_ev->xine_event)
|
||||
{
|
||||
free(new_ev);
|
||||
return;
|
||||
}
|
||||
memcpy(new_ev->xine_event, event->data, event->data_length);
|
||||
}
|
||||
buf[0] = data;
|
||||
buf[1] = new_ev;
|
||||
write(fd_ev_write, buf, sizeof(buf));
|
||||
}
|
||||
|
||||
static int
|
||||
_em_fd_ev_active(void *data, Ecore_Fd_Handler *fdh)
|
||||
{
|
||||
int fd, len;
|
||||
void *buf[2];
|
||||
|
||||
fd = ecore_main_fd_handler_fd_get(fdh);
|
||||
while ((len = read(fd, buf, sizeof(buf))) > 0)
|
||||
{
|
||||
if (len == sizeof(buf))
|
||||
{
|
||||
Emotion_Xine_Video *ev;
|
||||
Emotion_Xine_Event *eev;
|
||||
|
||||
printf("event from xine...\n");
|
||||
ev = buf[0];
|
||||
eev = buf[1];
|
||||
switch (eev->type)
|
||||
{
|
||||
case XINE_EVENT_UI_PLAYBACK_FINISHED:
|
||||
{
|
||||
printf("EV: Playback finished\n");
|
||||
/* no data in this event */
|
||||
}
|
||||
break;
|
||||
case XINE_EVENT_UI_CHANNELS_CHANGED:
|
||||
{
|
||||
printf("EV: Channels changed\n");
|
||||
/* no data in this event */
|
||||
}
|
||||
break;
|
||||
case XINE_EVENT_UI_SET_TITLE:
|
||||
{
|
||||
xine_ui_data_t *ev;
|
||||
|
||||
ev = eev->xine_event;
|
||||
printf("EV: New Title \"%s\"\n", ev->str);
|
||||
// title is ev->str
|
||||
}
|
||||
break;
|
||||
case XINE_EVENT_UI_MESSAGE:
|
||||
{
|
||||
xine_ui_message_data_t *ev;
|
||||
|
||||
ev = eev->xine_event;
|
||||
printf("EV: UI Message\n");
|
||||
// ev->type = error type(XINE_MSG_NO_ERROR, XINE_MSG_GENERAL_WARNING, XINE_MSG_UNKNOWN_HOST etc.)
|
||||
// ev->messages is a list of messages DOUBLE null terminated
|
||||
}
|
||||
break;
|
||||
case XINE_EVENT_AUDIO_LEVEL:
|
||||
{
|
||||
xine_audio_level_data_t *ev;
|
||||
|
||||
ev = eev->xine_event;
|
||||
printf("EV: Audio Level\n");
|
||||
// ev->left (0->100)
|
||||
// ev->right
|
||||
// ev->mute
|
||||
}
|
||||
break;
|
||||
case XINE_EVENT_PROGRESS:
|
||||
{
|
||||
xine_progress_data_t *ev;
|
||||
|
||||
ev = eev->xine_event;
|
||||
printf("EV: Progress \"%s\" %i%%\n", ev->description, ev->percent);
|
||||
// ev->description is text
|
||||
// ev->percent is a percentage marker (0-100)
|
||||
}
|
||||
break;
|
||||
case XINE_EVENT_MRL_REFERENCE:
|
||||
{
|
||||
xine_mrl_reference_data_t *ev;
|
||||
|
||||
ev = eev->xine_event;
|
||||
printf("EV: MRL Ref to \"%s\"\n", ev->mrl);
|
||||
// ev->alternative alternative playlist no
|
||||
// ev->mrl is the mrl
|
||||
}
|
||||
break;
|
||||
case XINE_EVENT_UI_NUM_BUTTONS:
|
||||
{
|
||||
xine_ui_data_t *ev;
|
||||
|
||||
ev = eev->xine_event;
|
||||
printf("EV: Num buttons %i\n", ev->num_buttons);
|
||||
// ev->num_buttons indicates how many buttons in the spu
|
||||
}
|
||||
break;
|
||||
case XINE_EVENT_SPU_BUTTON:
|
||||
{
|
||||
xine_spu_button_t *ev;
|
||||
|
||||
ev = eev->xine_event;
|
||||
printf("EV: Button enter? [%i] %i\n", ev->direction, ev->button);
|
||||
// ev->direction 1 = enter, 0 = leave
|
||||
// ev->button button number entered/left
|
||||
}
|
||||
break;
|
||||
case XINE_EVENT_DROPPED_FRAMES:
|
||||
{
|
||||
xine_dropped_frames_t *ev;
|
||||
|
||||
ev = eev->xine_event;
|
||||
printf("EV: Dropped Frames (skipped %i) (discarded %i)\n", ev->skipped_frames, ev->discarded_frames);
|
||||
// ev->skipped_frames = % frames skipped * 10
|
||||
// ev->discarded_frames = % frames skipped * 10
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
if (eev->xine_event) free(eev->xine_event);
|
||||
free(eev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
_em_timer(void *data)
|
||||
{
|
||||
|
|
|
@ -5,12 +5,14 @@
|
|||
|
||||
typedef struct _Emotion_Xine_Video Emotion_Xine_Video;
|
||||
typedef struct _Emotion_Xine_Video_Frame Emotion_Xine_Video_Frame;
|
||||
typedef struct _Emotion_Xine_Event Emotion_Xine_Event;
|
||||
|
||||
struct _Emotion_Xine_Video
|
||||
{
|
||||
xine_video_port_t *video;
|
||||
xine_audio_port_t *audio;
|
||||
xine_stream_t *stream;
|
||||
xine_event_queue_t *queue;
|
||||
int fd;
|
||||
double len;
|
||||
double pos;
|
||||
|
@ -42,6 +44,12 @@ struct _Emotion_Xine_Video_Frame
|
|||
void *frame;
|
||||
};
|
||||
|
||||
struct _Emotion_Xine_Event
|
||||
{
|
||||
int type;
|
||||
char *xine_event;
|
||||
};
|
||||
|
||||
Emotion_Video_Module *module_open (void);
|
||||
void module_close(Emotion_Video_Module *module);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
#AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
|
@ -20,6 +20,6 @@ emotion_xine_vo_out.c
|
|||
xineplug_vo_out_emotion_la_LIBADD = @xine_libs@
|
||||
xineplug_vo_out_emotion_la_LDFLAGS = \
|
||||
$(LDFLAGS) \
|
||||
-no-undefined -module -avoid-version \
|
||||
-module -avoid-version \
|
||||
-L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
xineplug_vo_out_emotion_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
|
Loading…
Reference in New Issue