|
@ -1,22 +0,0 @@
|
|||
.icons
|
||||
evas-config
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
config.status
|
||||
config.log
|
||||
config.cache
|
||||
configure
|
||||
stamp-h
|
||||
stamp-h.in
|
||||
config.sub
|
||||
config.guess
|
||||
libtool
|
||||
config.h
|
||||
ltmain.sh
|
||||
ltconfig
|
||||
config.h.in
|
||||
libltdl
|
||||
install-sh
|
||||
missing
|
||||
mkinstalldirs
|
|
@ -1 +0,0 @@
|
|||
The Rasterman (Carsten Haitzler) <raster@rasterman.com, raster@valinux.com>
|
|
@ -1,20 +0,0 @@
|
|||
Copyright (C) 2000 Carsten Haitzler and various contributors (see AUTHORS)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies of the Software, its documentation and marketing & publicity
|
||||
materials, and acknowledgment shall be given in the documentation, materials
|
||||
and software packages that this Software was used.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,42 +0,0 @@
|
|||
Q: Why is EVAS faster with software acceleration than than when I run it
|
||||
with hardware acceleration switched on?
|
||||
|
||||
A: When run with hardware acceleration EVAS uses the GL libraries on your
|
||||
system; this means that if you have Mesa installed then EVAS will use
|
||||
the Mesa GL liberties. Mesa however only provides software acceleration
|
||||
and therefore will run slow compared to EVASs in-built software mode. If
|
||||
you have a video card that supports hardware acceleration then you should
|
||||
attempt to get the manufacturers own GL drivers for your computer and
|
||||
install them making sure that none of the Mesa libraries are left behind
|
||||
and that where needed sym-links are made to the real drivers.
|
||||
|
||||
Q: Why is 'program x' which uses EVAS so slow?
|
||||
|
||||
A: See last question. The chance is that the program is trying to use
|
||||
hardware acceleration by default and that you have Mesa GL libraries
|
||||
installed on your system. If you don't have acceleration on your video
|
||||
card then you should search for a way to switch to software acceleration
|
||||
in the program.
|
||||
|
||||
Q: Is there a packaged version of SGI's GLU Implementation for my computer
|
||||
anywhere?
|
||||
|
||||
A: At present SGI's GLU Implementation is available only in the form of a
|
||||
Redhat package from http://www.mesa3d.org/downloads/sgi.html. You should
|
||||
download this package and convert it to whatever distribution you are
|
||||
on using "alien".
|
||||
|
||||
Q: Why is my CPU usage at 100% when I use a program running EVAS?
|
||||
|
||||
A: When used in software mode, EVAS will use a lot of CPU. In hardware
|
||||
mode however it depends on your OpenGL drivers. What a lot of drivers
|
||||
do is limit buffer buffer swaps to vertical blanking gaps only. This
|
||||
means that the buffers wont be swapped until the vertical blanking gap
|
||||
is reached, however since there is no method of using interrupts under
|
||||
Linux/X the GL drivers have to poll in a tight loop waiting for the gap.
|
||||
Also if the GL libs are accessing the GFX hardware directory then if the
|
||||
hardware is busy then the app will sit and poll registers until the
|
||||
hardware is ready. It's basically down to your OpenGL drivers. It's worth
|
||||
noting as well that your CPU will be high whenever you run evas_test as
|
||||
it is pushing your system to try and achieve the highest frame rate it
|
||||
can, a situation that most software using EVAS will never be in.
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
|
||||
# A list of all the files in the current directory which can be regenerated
|
||||
MAINTAINERCLEANFILES = INSTALL Makefile.in aclocal.m4 config.guess \
|
||||
config.h.in config.sub configure install-sh \
|
||||
ltconfig ltmain.sh missing mkinstalldirs \
|
||||
stamp-h.in
|
||||
|
||||
SUBDIRS = src test doc debian
|
||||
|
||||
bin_SCRIPTS = evas-config
|
||||
|
||||
EXTRA_DIST = README AUTHORS COPYING evas.spec evas.m4 FAQ-EVAS
|
||||
|
||||
m4datadir = @aclocaldir@
|
||||
m4data_DATA = evas.m4
|
|
@ -1,104 +0,0 @@
|
|||
-------------------------------------------------------------------------------
|
||||
E V A S - 0.6.0
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
This is the ``E Canvas'' - a rip off of some of the other canvas's floating
|
||||
about - Tk and gnome too. it's at the Xlib level. it's intended to be
|
||||
accelerated by hardware or highly optimised software where possible. It is
|
||||
intended to be simple and allow for the building of interfaces ontop of it.
|
||||
|
||||
What you NEED:
|
||||
* Imlib2 1.0.3 or higher (and development headers)
|
||||
* Freetype 1.1, 1.2 or 1.3 - NOT 2.0 and development headers
|
||||
* X11R6 and development headersand libraries
|
||||
|
||||
If you want hardware acceleration to be available:
|
||||
* OpenGL 1.0 and headers, with hardware accel support and an Xserver with
|
||||
that too - your milage will vary (Xfree86 4.0 with DRI or Nvidia drivers for
|
||||
example). make sure you dont have mutliepl libGL's and multiple GL headers
|
||||
on your system. Rememebr most GL drivers are buggy and you will experience
|
||||
problems. See your driver maintainers for these :)
|
||||
|
||||
if you got this from cvs do:
|
||||
./autogen.sh
|
||||
|
||||
otherwise do:
|
||||
./configure
|
||||
|
||||
then to compile:
|
||||
make
|
||||
|
||||
if you wish to install (as root):
|
||||
make install
|
||||
|
||||
in the test directory you will find a test program:
|
||||
|
||||
cd test
|
||||
./evas_test
|
||||
|
||||
This is an overall demo of what Evas can do. You can select the rendering mode
|
||||
on the left by simply clicking it. Just sit back, watch and relax.
|
||||
|
||||
There is also
|
||||
|
||||
./evas_test_old
|
||||
|
||||
this will by default try the software engine - if you don't have a fast cpu
|
||||
it will be slow. You can try the other engines:
|
||||
./evas_test_old -m x11
|
||||
./evas_test_old -m soft -s 0
|
||||
./evas_test_old -m hard
|
||||
|
||||
x11 is the X11 pixmap engine. -s 0 turns off ``dithering'' and smooth shading
|
||||
for image objects here for better speed. hard is the opengl hardware 3D
|
||||
engine. Note that if you do NOT have real hardware accelerated GL it will be
|
||||
SLOOOOOOOOOOOOOW - VERY slow. Much slower than software. Also Mesa 3.2 and
|
||||
below has known bugs that cause a segv. It's been fixed in Mesa 3.3.
|
||||
|
||||
If evas didn't find OpenGL it will have built a software only engine so you
|
||||
don't need to try hardware since this will fall back to software mode
|
||||
automatically.
|
||||
|
||||
There is a new evas_test program being written too - it's in progress, so
|
||||
wait for it to be complete.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
MORE DETAILED DESCRIPTION:
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Evas? Canvas? What? OK.. you're baffled as to what that stuff is. Time to
|
||||
explain.
|
||||
|
||||
A canvas is a high-level rendering engine. Instead of a program having to
|
||||
handle exposes or updates then redraw bit by bit (draw line, draw box,
|
||||
paste image etc.) after having figured out what has changed and what need to
|
||||
be re-rendered - what data loaded in maps to what... then finally order the
|
||||
draw in the right way to optimize it - a canvas provides a high-level API to
|
||||
this kind of thing and handles all the smarts inside.
|
||||
|
||||
The result is an application creates an Evas & attaches that evas to a window.
|
||||
Now it just creates objects - create an image object, a text object, a line
|
||||
object, a rectangle object etc. It just moves and resizes these objects around
|
||||
by calling routines in Evas - Evas handles redrawing, scaling, ordering the
|
||||
draws to account for layers, clipping objects out that don't exist in the
|
||||
visible Evas area etc. All the application need do is call evas_redraw when
|
||||
it becomes idle to have the evas redraw what has changed.
|
||||
|
||||
This means less headache for the application programmer. Now why do this as
|
||||
a whole new library? Well - because the library can render the Evas as fast
|
||||
as possible. It uses Imlib2 to do the grunt work of loading images - and
|
||||
beyond that it can currently use either imlib2, OpenGL or X11 to render to the
|
||||
Evas - if you have decent hardware that's supported by OpenGL you will see
|
||||
in the area of 10-50 times (in future even higher) speedups in rendering
|
||||
using the GL backend instead of the Imlib2 one (even though Imlib2 is a
|
||||
highly optimized software rendering engine). The good thing here is that the
|
||||
application can choose what system to use. If that system isn't available or
|
||||
Evas didn't compile with it, it will fall back to the nearest approximation
|
||||
(it will ALWAYS have Imlib2 and X11 rendering backends - Imlib2 being able to
|
||||
actually alpha blend, but X11 keeping the rendering server-side with pixmaps
|
||||
and clip masks) so this means a highly optimized rendering subsystem to build
|
||||
more complex things ontop of.
|
||||
|
||||
As it stands right now the API is still under construction - don't bank on it
|
||||
remaining 100% stable. The backend of evas currently seems to have no bugs or
|
||||
leaks that I know of, so feel free to punish it.
|
|
@ -1,3 +0,0 @@
|
|||
#undef HAVE_GL
|
||||
#undef HAVE_GLU
|
||||
#undef HAVE_RENDER
|
|
@ -1,39 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
abort () {
|
||||
echo "$1 not found or command failed. Aborting!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
THEDIR="`pwd`"
|
||||
cd "$srcdir"
|
||||
DIE=0
|
||||
|
||||
set -x
|
||||
aclocal || abort "aclocal"
|
||||
libtoolize --ltdl --force --copy || abort "libtoolize"
|
||||
autoheader || abort "autoheader"
|
||||
automake --foreign --add-missing || abort "automake"
|
||||
autoconf || abort "autoconf"
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
|
||||
cd "$THEDIR"
|
||||
|
||||
$srcdir/configure "$@" || abort "configure"
|
||||
|
||||
set +x
|
||||
|
||||
echo "Now type:"
|
||||
echo
|
||||
echo "make"
|
||||
echo "make install"
|
||||
echo
|
||||
echo "have fun."
|
||||
|
|
@ -1,288 +0,0 @@
|
|||
# SETUP
|
||||
AC_INIT(src/Evas.h)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(evas, 0.6.0)
|
||||
|
||||
IMLIB2_CONFIG_IN_PATH=xyes
|
||||
AC_PROGRAM_CHECK(IMLIB2_CONFIG_IN_PATH, imlib2-config, xyes, xno)
|
||||
if test $IMLIB2_CONFIG_IN_PATH = xno; then
|
||||
echo "ERROR:"
|
||||
echo "The imlib2-config development script was not found in your execute"
|
||||
echo "path. This may mean one of several things"
|
||||
echo "1. You may not have installed the Imlib2-devel (or Imlib2-dev)"
|
||||
echo " packages."
|
||||
echo "2. You may have Imlib2 installed somewhere not covered by your path."
|
||||
echo ""
|
||||
echo "If this is the case make sure you have the packages installed, AND"
|
||||
echo "that the imlib2-config script is in your execute path (see your"
|
||||
echo "shell's manual page on setting the \$PATH environment variable)."
|
||||
AC_MSG_ERROR([Fatal Error: no imlib2-config detected.])
|
||||
exit;
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(ttf,
|
||||
[ --with-ttf=DIR use DIR where freetype was installed (eg /opt/freetype)],
|
||||
[
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include";
|
||||
LDFLAGS="$LDFLAGS -L$withval/lib";
|
||||
LIBS_TTF="-L"$withval"/lib"
|
||||
])
|
||||
|
||||
gl=yes
|
||||
AC_ARG_ENABLE(gl,
|
||||
[ --disable-gl disable building with opengl support],
|
||||
[
|
||||
if test x$enableval = xyes; then
|
||||
gl=yes
|
||||
else
|
||||
gl=no
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(gl,
|
||||
[ --with-gl=DIR use DIR where opengl was installed (eg /usr/X11R6)],
|
||||
[
|
||||
if test x$gl = xyes; then
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include";
|
||||
LDFLAGS="$LDFLAGS -L$withval/lib";
|
||||
LIBS_GL="-L"$withval"/lib"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AM_WITH_DMALLOC
|
||||
AC_C_CONST
|
||||
AM_ENABLE_SHARED
|
||||
AM_PROG_LIBTOOL
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
if test X"$enable_shared" = Xyes; then
|
||||
DLLDFLAGS=-export-dynamic
|
||||
AC_SUBST(DLLDFLAGS)
|
||||
fi
|
||||
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
if test "x$x_includes" = "x"; then
|
||||
x_includes="/usr/include"
|
||||
fi
|
||||
|
||||
x_cflags="$X_CFLAGS"
|
||||
x_ldflags="$X_LDFLAGS"
|
||||
x_libs="$X_LIBS $X_EXTRA_LIBS -lX11"
|
||||
|
||||
AC_CHECK_LIB(
|
||||
X11,
|
||||
XOpenDisplay,
|
||||
x_libs="$x_libs",
|
||||
AC_MSG_ERROR([ERROR: libX11 not found.]); exit,
|
||||
$X_LDFLAGS $X_EXTRA_LIBS $X_LIBS
|
||||
)
|
||||
AC_CHECK_LIB(
|
||||
Xext,
|
||||
XShmAttach,
|
||||
x_libs="-lXext $x_libs",
|
||||
AC_CHECK_LIB(
|
||||
XextSam,
|
||||
XShmAttach,
|
||||
x_libs="-lXextSam -lXext $x_libs",
|
||||
AC_MSG_ERROR([ERROR: XShm not found.]); exit,
|
||||
$x_libs),
|
||||
$x_libs)
|
||||
AC_CHECK_LIB(
|
||||
Xext,
|
||||
XShapeCombineMask,
|
||||
x_libs="-lXext $x_libs",
|
||||
AC_MSG_ERROR([ERROR: XShape not found.]); exit,
|
||||
$x_libs)
|
||||
|
||||
x_libs="$x_libs -lX11"
|
||||
|
||||
AC_CHECK_LIB(
|
||||
Xrender,
|
||||
XRenderCreatePicture,
|
||||
[
|
||||
x_libs=" -lXrender -lXext $x_libs";
|
||||
AC_DEFINE(HAVE_RENDER)
|
||||
],
|
||||
[],
|
||||
$x_libs)
|
||||
|
||||
AC_CHECK_LIB(
|
||||
ttf,
|
||||
TT_Init_FreeType,
|
||||
TTF_LIBS="-lttf "$LIBS_TTF,
|
||||
[
|
||||
echo "ERROR: Evas needs a system with libttf.so (TrueType Font Library)"
|
||||
echo "You can obtain it from:"
|
||||
echo "ftp://ftp.enlightenment.org/pub/enlightenment/"
|
||||
echo "You can also obtain it from:"
|
||||
echo "http://www.freetype.org/"
|
||||
echo "You can obtain some truetype fonts from:"
|
||||
echo "http://voyager.cns.ohiou.edu/~sadkins/web_library/fonts/font_archive/"
|
||||
echo ""
|
||||
AC_MSG_ERROR([Fatal Error: no FreeType detected.])
|
||||
],
|
||||
$LIBS_TTF -lm)
|
||||
|
||||
AC_CHECK_HEADERS(freetype.h freetype/freetype.h freetype1/freetype/freetype.h,[ break] , )
|
||||
AC_CHECK_HEADER(freetype.h, [ ftype=yes ], [ ftype=no ])
|
||||
AC_CHECK_HEADER(freetype/freetype.h, [ ftype_ftype=yes ], [ ftype_ftype=no ])
|
||||
AC_CHECK_HEADER(freetype1/freetype/freetype.h, [ ftype1_ftype=yes ], [ ftype1_ftype=no ])
|
||||
|
||||
if test x$ftype = xno; then
|
||||
if test x$ftype_ftype = xno; then
|
||||
if test x$ftype1_ftype = xno; then
|
||||
|
||||
echo ""
|
||||
echo "ERROR: freetype.h not found in freetype.h or freetype/freetype.h include"
|
||||
echo "paths. (ie /usr/include, /usr/local/include etc.). You need the freetype"
|
||||
echo "header files to build Evas. This may mean you have to install the"
|
||||
echo "freetype-devel packages for your distribution or if all else fails"
|
||||
echo "find the source for freetype and install that somewhere where Evas"
|
||||
echo "can find the header files."
|
||||
echo ""
|
||||
echo "You can obtain it from:"
|
||||
echo "ftp://ftp.enlightenment.org/pub/enlightenment/"
|
||||
echo "You can also obtain it from:"
|
||||
echo "http://www.freetype.org/"
|
||||
echo "You can obtain some truetype fonts from:"
|
||||
echo "http://voyager.cns.ohiou.edu/~sadkins/web_library/fonts/font_archive/"
|
||||
echo ""
|
||||
AC_MSG_ERROR([Fatal Error: no FreeType header files detected.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
ttf_includes="$CPPFLAGS"
|
||||
ttf_libs="$LIBS_TTF -lm -lttf"
|
||||
|
||||
if test x$gl = xyes ; then
|
||||
gl_includes=""
|
||||
PREV_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=$CPPFLAGS" -I/usr/include -I/usr/local/include "$x_cflags
|
||||
|
||||
header_gl_h=xno
|
||||
header_glu_h=xno
|
||||
AC_TRY_CPP(
|
||||
[
|
||||
#include <GL/gl.h>
|
||||
],
|
||||
[
|
||||
echo "checking for GL/gl.h... yes";
|
||||
gl_includes=$CPPFLAGS;
|
||||
header_gl_h=xyes;
|
||||
]
|
||||
,
|
||||
[
|
||||
echo "checking for GL/gl.h... no";
|
||||
header_gl_h=xno;
|
||||
])
|
||||
|
||||
if test $header_gl_h = xyes; then
|
||||
AC_TRY_CPP(
|
||||
[
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
],
|
||||
[
|
||||
echo "checking for GL/glu.h... yes";
|
||||
glu_includes=$CPPFLAGS;
|
||||
header_glu_h=xyes;
|
||||
]
|
||||
,
|
||||
[
|
||||
echo "checking for GL/glu.h... no";
|
||||
header_glu_h=xno;
|
||||
])
|
||||
fi
|
||||
|
||||
have_gl=no
|
||||
have_glu=no
|
||||
|
||||
if test $header_gl_h = xyes; then
|
||||
AC_CHECK_LIB(
|
||||
GL,
|
||||
glBindTexture,
|
||||
have_gl=yes,
|
||||
[],
|
||||
-L/usr/local/lib -lGL $x_libs $x_ldflags $x_cflags $LIBS_GL -lm)
|
||||
fi
|
||||
if test "x$have_gl" = "xyes"; then
|
||||
gl_includes=$gl_includes
|
||||
gl_ldflags="$gl_ldflags -L/usr/local/lib -lGL $x_libs $x_ldflags $x_cflags $LIBS_GL -lm";
|
||||
gl_libs=$gl_libs" -lGL"
|
||||
AC_DEFINE(HAVE_GL)
|
||||
fi
|
||||
|
||||
if test $header_glu_h = xyes; then
|
||||
AC_CHECK_LIB(
|
||||
GLU,
|
||||
gluBuild2DMipmaps,
|
||||
have_glu=yes,
|
||||
echo "WARNING:.......";
|
||||
echo "no libGLU was found. This means filtered (anti-aliased) scaling down";
|
||||
echo "of images will be disabled.";
|
||||
echo "Please read the config.log file for more information as to why this library";
|
||||
echo "was not found.";
|
||||
,
|
||||
$gl_ldflags -lGL -lGLU)
|
||||
AC_CHECK_LIB(
|
||||
GLU,
|
||||
gluTessBeginPolygon,
|
||||
have_glu=yes,
|
||||
echo "";
|
||||
echo "ERROR: evas needs a system with libGLU 1.3";
|
||||
echo "You can obtain it from:";
|
||||
echo "http://www.mesa3d.org/downloads/sgi.html";
|
||||
echo "You will need to obtain the SGI'd libGLU.";
|
||||
echo "debian: download the rpm and use alien to convert it";
|
||||
echo "";
|
||||
have_glu = no;
|
||||
,
|
||||
$gl_ldflags -lGL -lGLU)
|
||||
fi
|
||||
|
||||
if test have_gl = no; then
|
||||
echo "WARNING:......."
|
||||
echo "no OpenGL libraries / headers found. This means no GL support will be"
|
||||
echo "built into Evas. Ifapplications request 3D Hardware rendering from"
|
||||
echo "evas, they will be forcibly moved back to using software alpha"
|
||||
echo "rendering."
|
||||
echo "Please read the config.log file for more information as to why this library"
|
||||
echo "was not found."
|
||||
fi
|
||||
fi
|
||||
CPPFLAGS=$PREV_CPPFLAGS
|
||||
|
||||
imlib2_includes=`imlib2-config --cflags`
|
||||
imlib2_libs=`imlib2-config --libs`
|
||||
|
||||
AC_SUBST(x_cflags)
|
||||
AC_SUBST(x_includes)
|
||||
AC_SUBST(x_ldflags)
|
||||
AC_SUBST(x_libs)
|
||||
AC_SUBST(gl_includes)
|
||||
AC_SUBST(gl_ldflags)
|
||||
AC_SUBST(gl_libs)
|
||||
AC_SUBST(imlib2_includes)
|
||||
AC_SUBST(imlib2_libs)
|
||||
AC_SUBST(ttf_includes)
|
||||
AC_SUBST(ttf_libs)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
test/Makefile
|
||||
test/img/Makefile
|
||||
test/fnt/Makefile
|
||||
evas-config
|
||||
doc/Makefile
|
||||
debian/Makefile
|
||||
], [
|
||||
chmod +x evas-config
|
||||
])
|
|
@ -1,306 +0,0 @@
|
|||
# SETUP
|
||||
AC_INIT(src/Evas.h)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(evas, 0.6.0)
|
||||
|
||||
IMLIB2_CONFIG_IN_PATH=xyes
|
||||
AC_PROGRAM_CHECK(IMLIB2_CONFIG_IN_PATH, imlib2-config, xyes, xno)
|
||||
if test $IMLIB2_CONFIG_IN_PATH = xno; then
|
||||
echo "ERROR:"
|
||||
echo "The imlib2-config development script was not found in your execute"
|
||||
echo "path. This may mean one of several things"
|
||||
echo "1. You may not have installed the Imlib2-devel (or Imlib2-dev)"
|
||||
echo " packages."
|
||||
echo "2. You may have Imlib2 installed somewhere not covered by your path."
|
||||
echo ""
|
||||
echo "If this is the case make sure you have the packages installed, AND"
|
||||
echo "that the imlib2-config script is in your execute path (see your"
|
||||
echo "shell's manual page on setting the \$PATH environment variable)."
|
||||
AC_MSG_ERROR([Fatal Error: no imlib2-config detected.])
|
||||
exit;
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(ttf,
|
||||
[ --with-ttf=DIR use DIR where freetype was installed (eg /opt/freetype)],
|
||||
[
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include";
|
||||
LDFLAGS="$LDFLAGS -L$withval/lib";
|
||||
LIBS_TTF="-L"$withval"/lib"
|
||||
])
|
||||
|
||||
aclocal_usr=yes
|
||||
AC_ARG_ENABLE(aclocal_usr,
|
||||
[ --disable-aclocal_usr disable evas forcibly puting evas.m4 in /usr/aclocal and use prefix instead],
|
||||
[
|
||||
if test x$enableval = xyes; then
|
||||
aclocal_usr=yes
|
||||
else
|
||||
aclocal_usr=no
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
gl=yes
|
||||
AC_ARG_ENABLE(gl,
|
||||
[ --disable-gl disable building with opengl support],
|
||||
[
|
||||
if test x$enableval = xyes; then
|
||||
gl=yes
|
||||
else
|
||||
gl=no
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(gl,
|
||||
[ --with-gl=DIR use DIR where opengl was installed (eg /usr/X11R6)],
|
||||
[
|
||||
if test x$gl = xyes; then
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include";
|
||||
LDFLAGS="$LDFLAGS -L$withval/lib";
|
||||
LIBS_GL="-L"$withval"/lib"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AM_WITH_DMALLOC
|
||||
AC_C_CONST
|
||||
AM_ENABLE_SHARED
|
||||
AM_PROG_LIBTOOL
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
if test X"$enable_shared" = Xyes; then
|
||||
DLLDFLAGS=-export-dynamic
|
||||
AC_SUBST(DLLDFLAGS)
|
||||
fi
|
||||
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
if test "x$x_includes" = "x"; then
|
||||
x_includes="/usr/include"
|
||||
fi
|
||||
|
||||
x_cflags="$X_CFLAGS"
|
||||
x_ldflags="$X_LDFLAGS"
|
||||
x_libs="$X_LIBS $X_EXTRA_LIBS -lX11"
|
||||
|
||||
AC_CHECK_LIB(
|
||||
X11,
|
||||
XOpenDisplay,
|
||||
x_libs="$x_libs",
|
||||
AC_MSG_ERROR([ERROR: libX11 not found.]); exit,
|
||||
$X_LDFLAGS $X_EXTRA_LIBS $X_LIBS
|
||||
)
|
||||
AC_CHECK_LIB(
|
||||
Xext,
|
||||
XShmAttach,
|
||||
x_libs="-lXext $x_libs",
|
||||
AC_CHECK_LIB(
|
||||
XextSam,
|
||||
XShmAttach,
|
||||
x_libs="-lXextSam -lXext $x_libs",
|
||||
AC_MSG_ERROR([ERROR: XShm not found.]); exit,
|
||||
$x_libs),
|
||||
$x_libs)
|
||||
AC_CHECK_LIB(
|
||||
Xext,
|
||||
XShapeCombineMask,
|
||||
x_libs="-lXext $x_libs",
|
||||
AC_MSG_ERROR([ERROR: XShape not found.]); exit,
|
||||
$x_libs)
|
||||
|
||||
x_libs="$x_libs -lX11"
|
||||
|
||||
AC_CHECK_LIB(
|
||||
Xrender,
|
||||
XRenderCreatePicture,
|
||||
[
|
||||
x_libs=" -lXrender -lXext $x_libs";
|
||||
AC_DEFINE(HAVE_RENDER)
|
||||
],
|
||||
[],
|
||||
$x_libs)
|
||||
|
||||
AC_CHECK_LIB(
|
||||
ttf,
|
||||
TT_Init_FreeType,
|
||||
TTF_LIBS="-lttf "$LIBS_TTF,
|
||||
[
|
||||
echo "ERROR: Evas needs a system with libttf.so (TrueType Font Library)"
|
||||
echo "You can obtain it from:"
|
||||
echo "ftp://ftp.enlightenment.org/pub/enlightenment/"
|
||||
echo "You can also obtain it from:"
|
||||
echo "http://www.freetype.org/"
|
||||
echo "You can obtain some truetype fonts from:"
|
||||
echo "http://voyager.cns.ohiou.edu/~sadkins/web_library/fonts/font_archive/"
|
||||
echo ""
|
||||
AC_MSG_ERROR([Fatal Error: no FreeType detected.])
|
||||
],
|
||||
$LIBS_TTF -lm)
|
||||
|
||||
AC_CHECK_HEADERS(freetype.h freetype/freetype.h freetype1/freetype/freetype.h, [ break ], )
|
||||
AC_CHECK_HEADER(freetype.h, [ ftype=yes ], [ ftype=no ])
|
||||
AC_CHECK_HEADER(freetype/freetype.h, [ ftype_ftype=yes ], [ ftype_ftype=no ])
|
||||
AC_CHECK_HEADER(freetype1/freetype/freetype.h, [ ftype1_ftype=yes ], [ ftype1_ftype=no ])
|
||||
if test x$ftype = xno; then
|
||||
if test x$ftype_ftype = xno; then
|
||||
if test x$ftype1_ftype = xno; then
|
||||
echo ""
|
||||
echo "ERROR: freetype.h not found in freetype.h or freetype/freetype.h include"
|
||||
echo "paths. (ie /usr/include, /usr/local/include etc.). You need the freetype"
|
||||
echo "header files to build Evas. This may mean you have to install the"
|
||||
echo "freetype-devel packages for your distribution or if all else fails"
|
||||
echo "find the source for freetype and install that somewhere where Evas"
|
||||
echo "can find the header files."
|
||||
echo ""
|
||||
echo "You can obtain it from:"
|
||||
echo "ftp://ftp.enlightenment.org/pub/enlightenment/"
|
||||
echo "You can also obtain it from:"
|
||||
echo "http://www.freetype.org/"
|
||||
echo "You can obtain some truetype fonts from:"
|
||||
echo "http://voyager.cns.ohiou.edu/~sadkins/web_library/fonts/font_archive/"
|
||||
echo ""
|
||||
AC_MSG_ERROR([Fatal Error: no FreeType header files detected.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
ttf_includes="$CPPFLAGS"
|
||||
ttf_libs="$LIBS_TTF -lm -lttf"
|
||||
|
||||
if test x$gl = xyes ; then
|
||||
gl_includes=""
|
||||
PREV_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=$CPPFLAGS" -I/usr/include -I/usr/local/include "$x_cflags
|
||||
|
||||
header_gl_h=xno
|
||||
header_glu_h=xno
|
||||
AC_TRY_CPP(
|
||||
[
|
||||
#include <GL/gl.h>
|
||||
],
|
||||
[
|
||||
echo "checking for GL/gl.h... yes";
|
||||
gl_includes=$CPPFLAGS;
|
||||
header_gl_h=xyes;
|
||||
]
|
||||
,
|
||||
[
|
||||
echo "checking for GL/gl.h... no";
|
||||
header_gl_h=xno;
|
||||
])
|
||||
|
||||
if test $header_gl_h = xyes; then
|
||||
AC_TRY_CPP(
|
||||
[
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
],
|
||||
[
|
||||
echo "checking for GL/glu.h... yes";
|
||||
glu_includes=$CPPFLAGS;
|
||||
header_glu_h=xyes;
|
||||
]
|
||||
,
|
||||
[
|
||||
echo "checking for GL/glu.h... no";
|
||||
header_glu_h=xno;
|
||||
])
|
||||
fi
|
||||
|
||||
have_gl=no
|
||||
have_glu=no
|
||||
|
||||
if test $header_gl_h = xyes; then
|
||||
AC_CHECK_LIB(
|
||||
GL,
|
||||
glBindTexture,
|
||||
have_gl=yes,
|
||||
[],
|
||||
-L/usr/local/lib -lGL $x_libs $x_ldflags $x_cflags $LIBS_GL -lm)
|
||||
fi
|
||||
if test "x$have_gl" = "xyes"; then
|
||||
gl_includes=$gl_includes
|
||||
gl_ldflags="$gl_ldflags -L/usr/local/lib -lGL $x_libs $x_ldflags $x_cflags $LIBS_GL -lm";
|
||||
gl_libs=$gl_libs" -lGL"
|
||||
AC_DEFINE(HAVE_GL)
|
||||
fi
|
||||
|
||||
if test $header_glu_h = xyes; then
|
||||
AC_CHECK_LIB(
|
||||
GLU,
|
||||
gluBuild2DMipmaps,
|
||||
have_glu=yes,
|
||||
echo "WARNING:.......";
|
||||
echo "no libGLU was found. This means filtered (anti-aliased) scaling down";
|
||||
echo "of images will be disabled.";
|
||||
echo "Please read the config.log file for more information as to why this library";
|
||||
echo "was not found.";
|
||||
,
|
||||
$gl_ldflags -lGL -lGLU)
|
||||
AC_CHECK_LIB(
|
||||
GLU,
|
||||
gluTessBeginPolygon,
|
||||
have_glu=yes,
|
||||
echo "";
|
||||
echo "ERROR: evas needs a system with libGLU 1.3";
|
||||
echo "You can obtain it from:";
|
||||
echo "http://www.mesa3d.org/downloads/sgi.html";
|
||||
echo "You will need to obtain the SGI'd libGLU.";
|
||||
echo "debian: download the rpm and use alien to convert it";
|
||||
echo "";
|
||||
have_glu=no;
|
||||
,
|
||||
$gl_ldflags -lGL -lGLU)
|
||||
fi
|
||||
|
||||
if test have_gl = no; then
|
||||
echo "WARNING:......."
|
||||
echo "no OpenGL libraries / headers found. This means no GL support will be"
|
||||
echo "built into Evas. Ifapplications request 3D Hardware rendering from"
|
||||
echo "evas, they will be forcibly moved back to using software alpha"
|
||||
echo "rendering."
|
||||
echo "Please read the config.log file for more information as to why this library"
|
||||
echo "was not found."
|
||||
fi
|
||||
fi
|
||||
CPPFLAGS=$PREV_CPPFLAGS
|
||||
|
||||
imlib2_includes=`imlib2-config --cflags`
|
||||
imlib2_libs=`imlib2-config --libs`
|
||||
|
||||
AC_SUBST(x_cflags)
|
||||
AC_SUBST(x_includes)
|
||||
AC_SUBST(x_ldflags)
|
||||
AC_SUBST(x_libs)
|
||||
AC_SUBST(gl_includes)
|
||||
AC_SUBST(gl_ldflags)
|
||||
AC_SUBST(gl_libs)
|
||||
AC_SUBST(imlib2_includes)
|
||||
AC_SUBST(imlib2_libs)
|
||||
AC_SUBST(ttf_includes)
|
||||
AC_SUBST(ttf_libs)
|
||||
|
||||
aclocaldir=$datadir"/aclocal"
|
||||
if test X"$aclocal_usr" = Xyes; then
|
||||
aclocaldir="/usr/share/aclocal"
|
||||
fi
|
||||
|
||||
AC_SUBST(aclocaldir)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
test/Makefile
|
||||
test/img/Makefile
|
||||
test/fnt/Makefile
|
||||
evas-config
|
||||
doc/Makefile
|
||||
debian/Makefile
|
||||
], [
|
||||
chmod +x evas-config
|
||||
])
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,11 +0,0 @@
|
|||
EXTRA_DIST = \
|
||||
changelog \
|
||||
control \
|
||||
copyright \
|
||||
libevas-dev.files \
|
||||
libevas-sample.dirs \
|
||||
libevas-sample.files \
|
||||
libevas.dirs \
|
||||
libevas.files \
|
||||
libevas0.postinst \
|
||||
rules
|
|
@ -1,5 +0,0 @@
|
|||
evas (0.6.0-0cvs2001103001) unstable; urgency=low
|
||||
|
||||
* a CVS release
|
||||
|
||||
-- Laurence J. Lane <ljlane@debian.org> Tue, 30 Oct 2001 13:03:50 +0000
|
|
@ -1,48 +0,0 @@
|
|||
Source: evas
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Maintainer: Laurence J. Lane <ljlane@debian.org>
|
||||
Build-Depends: xlibs-dev, xlibmesa-dev, libttf-dev, libimlib2-dev, debhelper (>=2.0)
|
||||
Standards-Version: 3.5.6.0
|
||||
|
||||
Package: libevas0
|
||||
Section: libs
|
||||
Architecture: any
|
||||
Suggests: evas-demo
|
||||
Depends: ${shlibs:Depends}
|
||||
Description: enlightenment advanced canvas library
|
||||
Evas is an advanced canvas library, providing three backends for
|
||||
rendering: X11 (without some features like alpha-blending), imlib2, or
|
||||
OpenGL (hardware accelerated). Due to its simple API, evas can be
|
||||
developed with rapidly, and cleanly.
|
||||
Install evas if you want to develop applications against the only
|
||||
hardware-accelerated canvas library, or if you want to try out the
|
||||
applications under development.
|
||||
|
||||
Package: libevas0-dev
|
||||
Section: devel
|
||||
Architecture: any
|
||||
Depends: libevas0 (= ${Source-Version}), libc6-dev
|
||||
Description: development files for libevas
|
||||
Headers and static libraries required to develop against evas.
|
||||
|
||||
Package: evas-doc
|
||||
Section: doc
|
||||
Architecture: all
|
||||
Depends:
|
||||
Description: TFM for evas
|
||||
The evas application programming interface documentation is presented
|
||||
in pdf and sdw format.
|
||||
|
||||
Package: evas-demo
|
||||
Section: graphics
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}
|
||||
Description: evas library demo
|
||||
Evas is an advanced canvas library, providing three backends for
|
||||
rendering: X11 (without some features like alpha-blending), imlib2, or
|
||||
OpenGL (hardware accelerated). Due to its simple API, evas can be
|
||||
developed with rapidly, and cleanly.
|
||||
Install evas if you want to develop applications against the only
|
||||
hardware-accelerated canvas library, or if you want to try out the
|
||||
applications under development.
|
|
@ -1,27 +0,0 @@
|
|||
This package was debianized by Laurence J. Lane <ljlane@debian.org> on
|
||||
Sat, 28 Oct 2000 17:56:46 -0400.
|
||||
|
||||
The source code was downloaded from:
|
||||
|
||||
http://download.sourceforge.net/enlightenment/evas-0.5.0.tar.gz
|
||||
|
||||
Copyright (C) 2000 Carsten Haitzler and various contributors (see AUTHORS)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies of the Software, its documentation and marketing & publicity
|
||||
materials, and acknowledgment shall be given in the documentation, materials
|
||||
and software packages that this Software was used.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,78 +0,0 @@
|
|||
.\" This -*- nroff -*- file has been generated from
|
||||
.\" DocBook SGML with docbook-to-man on Debian GNU/Linux.
|
||||
...\"
|
||||
...\" transcript compatibility for postscript use.
|
||||
...\"
|
||||
...\" synopsis: .P! <file.ps>
|
||||
...\"
|
||||
.de P!
|
||||
\\&.
|
||||
.fl \" force out current output buffer
|
||||
\\!%PB
|
||||
\\!/showpage{}def
|
||||
...\" the following is from Ken Flowers -- it prevents dictionary overflows
|
||||
\\!/tempdict 200 dict def tempdict begin
|
||||
.fl \" prolog
|
||||
.sy cat \\$1\" bring in postscript file
|
||||
...\" the following line matches the tempdict above
|
||||
\\!end % tempdict %
|
||||
\\!PE
|
||||
\\!.
|
||||
.sp \\$2u \" move below the image
|
||||
..
|
||||
.de pF
|
||||
.ie \\*(f1 .ds f1 \\n(.f
|
||||
.el .ie \\*(f2 .ds f2 \\n(.f
|
||||
.el .ie \\*(f3 .ds f3 \\n(.f
|
||||
.el .ie \\*(f4 .ds f4 \\n(.f
|
||||
.el .tm ? font overflow
|
||||
.ft \\$1
|
||||
..
|
||||
.de fP
|
||||
.ie !\\*(f4 \{\
|
||||
. ft \\*(f4
|
||||
. ds f4\"
|
||||
' br \}
|
||||
.el .ie !\\*(f3 \{\
|
||||
. ft \\*(f3
|
||||
. ds f3\"
|
||||
' br \}
|
||||
.el .ie !\\*(f2 \{\
|
||||
. ft \\*(f2
|
||||
. ds f2\"
|
||||
' br \}
|
||||
.el .ie !\\*(f1 \{\
|
||||
. ft \\*(f1
|
||||
. ds f1\"
|
||||
' br \}
|
||||
.el .tm ? font underflow
|
||||
..
|
||||
.ds f1\"
|
||||
.ds f2\"
|
||||
.ds f3\"
|
||||
.ds f4\"
|
||||
'\" t
|
||||
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
|
||||
.TH "evas-config" "3"
|
||||
.SH "NAME"
|
||||
evas-config \(em evas library build dependecies
|
||||
.SH "SYNOPSIS"
|
||||
.PP
|
||||
\fBevas-config\fP
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
This manual page documents briefly the
|
||||
\fBevas-config\fP command.
|
||||
.PP
|
||||
This manual page was written for the \fBDebian GNU/Linux\fP distribution
|
||||
because the original program does not have a manual page.
|
||||
|
||||
.PP
|
||||
\fBevas-config\fP is a program used to provide info
|
||||
libs and cflags parameters required to build appications that use the evas
|
||||
library.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
This manual page was written by Laurence J. Lane (ljlane@debian.org) for
|
||||
the \fBDebian GNU/Linux\fP system (but may be used by others).
|
||||
...\" created by instant / docbook-to-man, Mon 28 May 2001, 15:04
|
|
@ -1,78 +0,0 @@
|
|||
.\" This -*- nroff -*- file has been generated from
|
||||
.\" DocBook SGML with docbook-to-man on Debian GNU/Linux.
|
||||
...\"
|
||||
...\" transcript compatibility for postscript use.
|
||||
...\"
|
||||
...\" synopsis: .P! <file.ps>
|
||||
...\"
|
||||
.de P!
|
||||
\\&.
|
||||
.fl \" force out current output buffer
|
||||
\\!%PB
|
||||
\\!/showpage{}def
|
||||
...\" the following is from Ken Flowers -- it prevents dictionary overflows
|
||||
\\!/tempdict 200 dict def tempdict begin
|
||||
.fl \" prolog
|
||||
.sy cat \\$1\" bring in postscript file
|
||||
...\" the following line matches the tempdict above
|
||||
\\!end % tempdict %
|
||||
\\!PE
|
||||
\\!.
|
||||
.sp \\$2u \" move below the image
|
||||
..
|
||||
.de pF
|
||||
.ie \\*(f1 .ds f1 \\n(.f
|
||||
.el .ie \\*(f2 .ds f2 \\n(.f
|
||||
.el .ie \\*(f3 .ds f3 \\n(.f
|
||||
.el .ie \\*(f4 .ds f4 \\n(.f
|
||||
.el .tm ? font overflow
|
||||
.ft \\$1
|
||||
..
|
||||
.de fP
|
||||
.ie !\\*(f4 \{\
|
||||
. ft \\*(f4
|
||||
. ds f4\"
|
||||
' br \}
|
||||
.el .ie !\\*(f3 \{\
|
||||
. ft \\*(f3
|
||||
. ds f3\"
|
||||
' br \}
|
||||
.el .ie !\\*(f2 \{\
|
||||
. ft \\*(f2
|
||||
. ds f2\"
|
||||
' br \}
|
||||
.el .ie !\\*(f1 \{\
|
||||
. ft \\*(f1
|
||||
. ds f1\"
|
||||
' br \}
|
||||
.el .tm ? font underflow
|
||||
..
|
||||
.ds f1\"
|
||||
.ds f2\"
|
||||
.ds f3\"
|
||||
.ds f4\"
|
||||
'\" t
|
||||
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
|
||||
.TH "evas_test" "1"
|
||||
.SH "NAME"
|
||||
evas_test \(em evas library demonstartion program
|
||||
.SH "SYNOPSIS"
|
||||
.PP
|
||||
\fBevas_test\fP
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
This manual page documents briefly the
|
||||
\fBevas_test\fP command.
|
||||
.PP
|
||||
This manual page was written for the \fBDebian GNU/Linux\fP distribution
|
||||
because the original program does not have a manual page.
|
||||
|
||||
.PP
|
||||
\fBevas_test\fP and \fBevas_test_old\fP are programs that demonstrate the capabilites of evas, the enlightenment
|
||||
canvasing library. run "evas_test_old -h" for a description of command
|
||||
line options.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
This manual page was written by Laurence J. Lane (ljlane@debian.org) for
|
||||
the \fBDebian GNU/Linux\fP system (but may be used by others).
|
||||
...\" created by instant / docbook-to-man, Mon 28 May 2001, 15:04
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
if test "$1" = "configure"; then
|
||||
ldconfig
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
#!/usr/bin/make -f
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# GNU copyright 1997 by Joey Hess.
|
||||
|
||||
export DH_COMPAT=3
|
||||
export DH_OPTIONS
|
||||
|
||||
INSTALL = /usr/bin/install -p
|
||||
BUILDDIR = debian/build
|
||||
package = libevas0
|
||||
CONFIGURE_OPTS = --datadir=/usr/share --prefix=/usr
|
||||
|
||||
configure: $(BUILDDIR)/configure-stamp
|
||||
$(BUILDDIR)/configure-stamp:
|
||||
$(INSTALL) -d $(BUILDDIR)
|
||||
cd $(BUILDDIR); datadir=/usr/share $(CURDIR)/autogen.sh $(CONFIGURE_OPTS)
|
||||
touch $@
|
||||
|
||||
build: configure $(BUILDDIR)/build-stamp
|
||||
$(BUILDDIR)/build-stamp:
|
||||
dh_testdir
|
||||
$(MAKE) -C $(BUILDDIR)
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
-$(MAKE) distclean
|
||||
-rm -rf $(BUILDDIR)
|
||||
dh_clean
|
||||
|
||||
install: DH_OPTIONS=
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
|
||||
$(MAKE) install -C $(BUILDDIR) DESTDIR=$(CURDIR)/debian/$(package)/
|
||||
|
||||
$(INSTALL) -d debian/$(package)-dev/usr/lib
|
||||
$(INSTALL) -d debian/$(package)-dev/usr/bin
|
||||
$(INSTALL) -d debian/$(package)-dev/usr/share
|
||||
$(INSTALL) -d debian/evas-doc/usr/share/doc/evas-doc/
|
||||
$(INSTALL) -d debian/evas-demo/usr/bin
|
||||
|
||||
rm -rvf debian/$(package)/usr/share/evas/doc/
|
||||
#mv debian/$(package)/usr/share/aclocal debian/$(package)-dev/usr/share/
|
||||
$(INSTALL) -D debian/$(package)/@aclocaldir@/evas.m4 debian/$(package)-dev/usr/share/aclocal/evas.m4
|
||||
rm -rf debian/$(package)/@aclocaldir@/
|
||||
mv debian/$(package)/usr/share debian/evas-demo/usr
|
||||
|
||||
mv debian/$(package)/usr/include debian/$(package)-dev/usr
|
||||
mv debian/$(package)/usr/lib/*.so debian/$(package)-dev/usr/lib/
|
||||
mv debian/$(package)/usr/lib/*.la debian/$(package)-dev/usr/lib/
|
||||
mv debian/$(package)/usr/lib/*.a debian/$(package)-dev/usr/lib/
|
||||
mv debian/$(package)/usr/bin/evas-config debian/$(package)-dev/usr/bin/
|
||||
mv debian/$(package)/usr/bin/evas_test* debian/evas-demo/usr/bin/
|
||||
|
||||
|
||||
$(INSTALL) -m0644 doc/*.pdf doc/*.sdw debian/evas-doc/usr/share/doc/evas-doc
|
||||
|
||||
$(INSTALL) -d debian/evas-demo/usr/share/man/man1
|
||||
$(INSTALL) debian/evas_test.1 debian/evas-demo/usr/share/man/man1/
|
||||
$(INSTALL) -d debian/$(package)-dev/usr/share/man/man3
|
||||
$(INSTALL) debian/evas-config.3 debian/$(package)-dev/usr/share/man/man3/
|
||||
cd debian/evas-demo/usr/share/man/man1; ln -s evas_test.1.gz evas_test_old.1.gz
|
||||
|
||||
rm -rvf debian/evas-demo/usr/share/evas/evas/doc
|
||||
|
||||
binary-indep: DH_OPTIONS=-i
|
||||
binary-indep: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installdocs AUTHORS README
|
||||
dh_installchangelogs
|
||||
dh_compress -Xpdf -Xsdw
|
||||
dh_fixperms
|
||||
dh_installdeb
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary-arch: DH_OPTIONS=-a
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installdocs AUTHORS README
|
||||
dh_installmenu
|
||||
dh_installchangelogs
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
dh_installdeb
|
||||
dh_makeshlibs
|
||||
dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
|
||||
stuff:
|
||||
docbook-to-man evas_test.1.sgml > evas_test.1
|
||||
docbook-to-man evas-config.3.sgml > evas-config.3
|
||||
|
||||
.PHONY: build clean binary-indep binary-arch binary install
|
|
@ -1,2 +0,0 @@
|
|||
Makefile.in
|
||||
Makefile
|
|
@ -1,5 +0,0 @@
|
|||
EXTRA_DIST = \
|
||||
evas.sdw evas.pdf
|
||||
evasdir = $(datadir)/evas/doc
|
||||
evas_DATA = \
|
||||
evas.sdw evas.pdf
|
|
@ -1,59 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
exec_prefix_set=no
|
||||
|
||||
usage="\
|
||||
Usage: evas-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo "${usage}" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) optarg= ;;
|
||||
esac
|
||||
|
||||
case $1 in
|
||||
--prefix=*)
|
||||
prefix=$optarg
|
||||
if test $exec_prefix_set = no ; then
|
||||
exec_prefix=$optarg
|
||||
fi
|
||||
;;
|
||||
--prefix)
|
||||
echo $prefix
|
||||
;;
|
||||
--exec-prefix=*)
|
||||
exec_prefix=$optarg
|
||||
exec_prefix_set=yes
|
||||
;;
|
||||
--exec-prefix)
|
||||
echo $exec_prefix
|
||||
;;
|
||||
--version)
|
||||
echo @VERSION@
|
||||
;;
|
||||
--cflags)
|
||||
if test @includedir@ != /usr/include ; then
|
||||
includes=-I@includedir@
|
||||
fi
|
||||
echo $includes @x_cflags@ @gl_includes@ @imlib2_includes@
|
||||
;;
|
||||
--libs)
|
||||
libdirs=-L@libdir@
|
||||
echo $libdirs -levas @gl_ldflags@ @gl_libs@ @LDFLAGS@ @x_libs@ @x_ldflags@ @imlib2_libs@
|
||||
;;
|
||||
*)
|
||||
echo "${usage}" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
exit 0
|
|
@ -1,198 +0,0 @@
|
|||
# Configure paths for Evas
|
||||
# Conrad Parker 2001-01-23
|
||||
# blatantly ripped from gtk.m4, Owen Taylor 97-11-3
|
||||
|
||||
dnl AM_PATH_EVAS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||
dnl Test for Evas, and define EVAS_CFLAGS and EVAS_LIBS
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_EVAS,
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the evas-config script
|
||||
dnl
|
||||
AC_ARG_WITH(evas-prefix,[ --with-evas-prefix=PFX Prefix where Evas is installed (optional)],
|
||||
evas_config_prefix="$withval", evas_config_prefix="")
|
||||
AC_ARG_WITH(evas-exec-prefix,[ --with-evas-exec-prefix=PFX Exec prefix where Evas is installed (optional)],
|
||||
evas_config_exec_prefix="$withval", evas_config_exec_prefix="")
|
||||
AC_ARG_ENABLE(evastest, [ --disable-evastest Do not try to compile and run a test Evas program],
|
||||
, enable_evastest=yes)
|
||||
|
||||
if test x$evas_config_exec_prefix != x ; then
|
||||
evas_config_args="$evas_config_args --exec-prefix=$evas_config_exec_prefix"
|
||||
if test x${EVAS_CONFIG+set} != xset ; then
|
||||
EVAS_CONFIG=$evas_config_exec_prefix/bin/evas-config
|
||||
fi
|
||||
fi
|
||||
if test x$evas_config_prefix != x ; then
|
||||
evas_config_args="$evas_config_args --prefix=$evas_config_prefix"
|
||||
if test x${EVAS_CONFIG+set} != xset ; then
|
||||
EVAS_CONFIG=$evas_config_prefix/bin/evas-config
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(EVAS_CONFIG, evas-config, no)
|
||||
min_evas_version=ifelse([$1], ,0.0.3,$1)
|
||||
AC_MSG_CHECKING(for Evas - version >= $min_evas_version)
|
||||
no_evas=""
|
||||
if test "$EVAS_CONFIG" = "no" ; then
|
||||
no_evas=yes
|
||||
else
|
||||
EVAS_CFLAGS=`$EVAS_CONFIG $evas_config_args --cflags`
|
||||
EVAS_LIBS=`$EVAS_CONFIG $evas_config_args --libs`
|
||||
evas_config_major_version=`$EVAS_CONFIG $evas_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
evas_config_minor_version=`$EVAS_CONFIG $evas_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
evas_config_micro_version=`$EVAS_CONFIG $evas_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Evas cannot currently report its own version ; version info is not
|
||||
dnl given in Evas.h
|
||||
dnl Thus, the "enable_evastest" stuff is currently disabled, enable once
|
||||
dnl you can determine the currently installed version by querying Evas[.h]
|
||||
dnl
|
||||
dnl K. 2001-01-23
|
||||
dnl **********************************************************************
|
||||
|
||||
dnl if test "x$enable_evastest" = "xyes" ; then
|
||||
dnl ac_save_CFLAGS="$CFLAGS"
|
||||
dnl ac_save_LIBS="$LIBS"
|
||||
dnl CFLAGS="$CFLAGS $EVAS_CFLAGS"
|
||||
dnl LIBS="$EVAS_LIBS $LIBS"
|
||||
dnl dnl
|
||||
dnl dnl Now check if the installed Evas is sufficiently new. (Also sanity
|
||||
dnl dnl checks the results of evas-config to some extent
|
||||
dnl dnl
|
||||
dnl rm -f conf.evastest
|
||||
dnl AC_TRY_RUN([
|
||||
dnl #include <Evas.h>
|
||||
dnl #include <stdio.h>
|
||||
dnl #include <stdlib.h>
|
||||
dnl
|
||||
dnl int
|
||||
dnl main ()
|
||||
dnl {
|
||||
dnl int major, minor, micro;
|
||||
dnl char *tmp_version;
|
||||
dnl
|
||||
dnl system ("touch conf.evastest");
|
||||
dnl
|
||||
dnl /* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
dnl tmp_version = g_strdup("$min_evas_version");
|
||||
dnl if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
dnl printf("%s, bad version string\n", "$min_evas_version");
|
||||
dnl exit(1);
|
||||
dnl }
|
||||
dnl
|
||||
dnl if ((evas_major_version != $evas_config_major_version) ||
|
||||
dnl (evas_minor_version != $evas_config_minor_version) ||
|
||||
dnl (evas_micro_version != $evas_config_micro_version))
|
||||
dnl {
|
||||
dnl printf("\n*** 'evas-config --version' returned %d.%d.%d, but Evas (%d.%d.%d)\n",
|
||||
dnl $evas_config_major_version, $evas_config_minor_version, $evas_config_micro_version,
|
||||
dnl evas_major_version, evas_minor_version, evas_micro_version);
|
||||
dnl printf ("*** was found! If evas-config was correct, then it is best\n");
|
||||
dnl printf ("*** to remove the old version of Evas. You may also be able to fix the error\n");
|
||||
dnl printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
||||
dnl printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||
dnl printf("*** required on your system.\n");
|
||||
dnl printf("*** If evas-config was wrong, set the environment variable EVAS_CONFIG\n");
|
||||
dnl printf("*** to point to the correct copy of evas-config, and remove the file config.cache\n");
|
||||
dnl printf("*** before re-running configure\n");
|
||||
dnl }
|
||||
dnl #if defined (EVAS_MAJOR_VERSION) && defined (EVAS_MINOR_VERSION) && defined (EVAS_MICRO_VERSION)
|
||||
dnl else if ((evas_major_version != EVAS_MAJOR_VERSION) ||
|
||||
dnl (evas_minor_version != EVAS_MINOR_VERSION) ||
|
||||
dnl (evas_micro_version != EVAS_MICRO_VERSION))
|
||||
dnl {
|
||||
dnl printf("*** Evas header files (version %d.%d.%d) do not match\n",
|
||||
dnl EVAS_MAJOR_VERSION, EVAS_MINOR_VERSION, EVAS_MICRO_VERSION);
|
||||
dnl printf("*** library (version %d.%d.%d)\n",
|
||||
dnl evas_major_version, evas_minor_version, evas_micro_version);
|
||||
dnl }
|
||||
dnl #endif /* defined (EVAS_MAJOR_VERSION) ... */
|
||||
dnl else
|
||||
dnl {
|
||||
dnl if ((evas_major_version > major) ||
|
||||
dnl ((evas_major_version == major) && (evas_minor_version > minor)) ||
|
||||
dnl ((evas_major_version == major) && (evas_minor_version == minor) && (evas_micro_version >= micro)))
|
||||
dnl {
|
||||
dnl return 0;
|
||||
dnl }
|
||||
dnl else
|
||||
dnl {
|
||||
dnl printf("\n*** An old version of Evas (%d.%d.%d) was found.\n",
|
||||
dnl evas_major_version, evas_minor_version, evas_micro_version);
|
||||
dnl printf("*** You need a version of Evas newer than %d.%d.%d. The latest version of\n",
|
||||
dnl major, minor, micro);
|
||||
dnl printf("*** Evas is always available from ftp://ftp.enlightenment.org.\n");
|
||||
dnl printf("***\n");
|
||||
dnl printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||
dnl printf("*** probably means that the wrong copy of the evas-config shell script is\n");
|
||||
dnl printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||
dnl printf("*** of Evas, but you can also set the EVAS_CONFIG environment to point to the\n");
|
||||
dnl printf("*** correct copy of evas-config. (In this case, you will have to\n");
|
||||
dnl printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
||||
dnl printf("*** so that the correct libraries are found at run-time))\n");
|
||||
dnl }
|
||||
dnl }
|
||||
dnl return 1;
|
||||
dnl }
|
||||
dnl ],, no_evas=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
dnl CFLAGS="$ac_save_CFLAGS"
|
||||
dnl LIBS="$ac_save_LIBS"
|
||||
dnl fi
|
||||
dnl **********************************************************************
|
||||
|
||||
fi
|
||||
if test "x$no_evas" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$EVAS_CONFIG" = "no" ; then
|
||||
echo "*** The evas-config script installed by Evas could not be found"
|
||||
echo "*** If Evas was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the EVAS_CONFIG environment variable to the"
|
||||
echo "*** full path to evas-config."
|
||||
else
|
||||
if test -f conf.evastest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run Evas test program, checking why..."
|
||||
CFLAGS="$CFLAGS $EVAS_CFLAGS"
|
||||
LIBS="$LIBS $EVAS_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <Evas.h>
|
||||
#include <stdio.h>
|
||||
], [ return ((evas_major_version) || (evas_minor_version) || (evas_micro_version)); ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding Evas or finding the wrong"
|
||||
echo "*** version of Evas. If it is not finding Evas, you'll need to set your"
|
||||
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||
echo "*** is required on your system"
|
||||
echo "***"
|
||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
||||
echo "***"
|
||||
echo "*** If you have a RedHat 5.0 system, you should remove the Evas package that"
|
||||
echo "*** came with the system with the command"
|
||||
echo "***"
|
||||
echo "*** rpm --erase --nodeps evas evas-devel" ],
|
||||
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occured. This usually means Evas was incorrectly installed"
|
||||
echo "*** or that you have moved Evas since it was installed. In the latter case, you"
|
||||
echo "*** may want to edit the evas-config script: $EVAS_CONFIG" ])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
EVAS_CFLAGS=""
|
||||
EVAS_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(EVAS_CFLAGS)
|
||||
AC_SUBST(EVAS_LIBS)
|
||||
rm -f conf.evastest
|
||||
])
|
|
@ -1,79 +0,0 @@
|
|||
# this is NOT relocatable, unless you alter the patch!
|
||||
%define name evas
|
||||
%define ver 0.6.0
|
||||
%define rel 1
|
||||
%define prefix /usr
|
||||
|
||||
# NB: Raster and I talked about it, and heh says evas_test shouldn't be in
|
||||
# the rpms, since it's not geared at all towards end users. I'm commenting
|
||||
# out and withholding the patch to honor that..
|
||||
|
||||
Summary: Enlightened Canvas Library
|
||||
Name: %{name}
|
||||
Version: %{ver}
|
||||
Release: %{rel}
|
||||
Copyright: BSD
|
||||
Group: User Interface/X
|
||||
URL: http://www.enlightenment.org/
|
||||
Packager: Term <kempler@utdallas.edu>
|
||||
Vendor: The Enlightenment Development Team <e-develop@enlightenment.org>
|
||||
Source: ftp://ftp.enlightenment.org/enlightenment/%{name}-%{ver}.tar.gz
|
||||
BuildRoot: /var/tmp/%{name}-root
|
||||
Requires: imlib2 >= 1.0.4
|
||||
|
||||
%description
|
||||
Evas is an advanced canvas library, providing three backends for
|
||||
rendering: X11 (without some features like alpha-blending), imlib2, or
|
||||
OpenGL (hardware accelerated). Due to its simple API, evas can be
|
||||
developed with rapidly, and cleanly.
|
||||
|
||||
Install evas if you want to develop applications against the only
|
||||
hardware-accelerated canvas library, or if you want to try out the
|
||||
applications under development.
|
||||
|
||||
%package devel
|
||||
Summary: Enlightened Canvas Library headers and development libraries.
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{ver}
|
||||
|
||||
%description devel
|
||||
Evas development headers and libraries.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
if [ -e ./configure ]
|
||||
then
|
||||
./configure --prefix=%{prefix}
|
||||
else
|
||||
./autogen.sh --prefix=%{prefix}
|
||||
fi
|
||||
make
|
||||
|
||||
%install
|
||||
make prefix=$RPM_BUILD_ROOT%{prefix} install
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{prefix}/lib/libevas.so.*
|
||||
%{prefix}/bin/evas_*
|
||||
%{prefix}/share/evas/fnt
|
||||
%{prefix}/share/evas/img
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{prefix}/lib/libevas.so
|
||||
%{prefix}/lib/libevas.*a
|
||||
%{prefix}/include/Evas.h
|
||||
%{prefix}/bin/evas-config
|
||||
%{prefix}/share/evas/doc
|
|
@ -1,8 +0,0 @@
|
|||
.icons
|
||||
Makefile
|
||||
Makefile.in
|
||||
.libs
|
||||
.deps
|
||||
libevas.la
|
||||
evas_main.lo
|
||||
*.lo
|
|
@ -1,257 +0,0 @@
|
|||
#ifndef _EVAS_H
|
||||
#define _EVAS_H 1
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <Imlib2.h>
|
||||
|
||||
/* types */
|
||||
#ifndef _EVAS_PRIVATE_H
|
||||
typedef void * Evas;
|
||||
typedef void * Evas_Gradient;
|
||||
typedef void * Evas_Object;
|
||||
#endif
|
||||
typedef struct _Evas_List * Evas_List;
|
||||
typedef struct _Evas_Point * Evas_Point;
|
||||
|
||||
/* public structs */
|
||||
struct _Evas_Point
|
||||
{
|
||||
double x, y;
|
||||
};
|
||||
|
||||
struct _Evas_List
|
||||
{
|
||||
Evas_List prev, next;
|
||||
void *data;
|
||||
/* private members - DONT TOUCH */
|
||||
Evas_List last;
|
||||
};
|
||||
|
||||
/* enums */
|
||||
#define RENDER_METHOD_COUNT 5
|
||||
enum _Evas_Render_Method
|
||||
{
|
||||
RENDER_METHOD_ALPHA_SOFTWARE, /* imlib2 rendering to any drawable */
|
||||
RENDER_METHOD_BASIC_HARDWARE, /* X11 pixmap rendering to any drawable */
|
||||
RENDER_METHOD_3D_HARDWARE, /* oepngl rendering to windows only */
|
||||
RENDER_METHOD_ALPHA_HARDWARE, /* unimplimented */
|
||||
RENDER_METHOD_IMAGE /* imlib2 rendering to imlib image target */
|
||||
};
|
||||
|
||||
enum _Evas_Callback_Type
|
||||
{
|
||||
CALLBACK_MOUSE_IN,
|
||||
CALLBACK_MOUSE_OUT,
|
||||
CALLBACK_MOUSE_DOWN,
|
||||
CALLBACK_MOUSE_UP,
|
||||
CALLBACK_MOUSE_MOVE,
|
||||
CALLBACK_FREE
|
||||
};
|
||||
|
||||
enum _Evas_Image_Format
|
||||
{
|
||||
IMAGE_FORMAT_BGRA,
|
||||
IMAGE_FORMAT_ARGB,
|
||||
IMAGE_FORMAT_RGB,
|
||||
IMAGE_FORMAT_GRAY
|
||||
};
|
||||
|
||||
/* enum types */
|
||||
typedef enum _Evas_Callback_Type Evas_Callback_Type;
|
||||
typedef enum _Evas_Image_Format Evas_Image_Format;
|
||||
typedef enum _Evas_Render_Method Evas_Render_Method;
|
||||
|
||||
/* functions */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* create and destroy */
|
||||
Evas evas_new_all(Display *display, Window parent_window,
|
||||
int x, int y, int w, int h,
|
||||
Evas_Render_Method render_method,
|
||||
int colors, int font_cache, int image_cache,
|
||||
char *font_dir);
|
||||
Window evas_get_window(Evas e);
|
||||
Display *evas_get_display(Evas e);
|
||||
Visual *evas_get_visual(Evas e);
|
||||
Colormap evas_get_colormap(Evas e);
|
||||
int evas_get_colors(Evas e);
|
||||
Imlib_Image evas_get_image(Evas e);
|
||||
Evas_Render_Method evas_get_output_method(Evas e);
|
||||
Evas evas_new(void);
|
||||
void evas_free(Evas e);
|
||||
|
||||
/* for exposes or forced redraws (relative to output drawable) */
|
||||
void evas_update_rect(Evas e, int x, int y, int w, int h);
|
||||
/* for when the evas isnt fully visible you can clip out rects that are */
|
||||
/* full obscured rects of the evas (ie windows ontop) */
|
||||
void evas_add_obscured_rect(Evas e, int x, int y, int w, int h);
|
||||
void evas_clear_obscured_rects(Evas e);
|
||||
|
||||
/* drawing */
|
||||
Imlib_Updates evas_render_updates(Evas e);
|
||||
void evas_render(Evas e);
|
||||
|
||||
/* query for settings to use */
|
||||
Visual *evas_get_optimal_visual(Evas e, Display *disp);
|
||||
Colormap evas_get_optimal_colormap(Evas e, Display *disp);
|
||||
void evas_get_drawable_size(Evas e, int *w, int *h);
|
||||
void evas_get_viewport(Evas e, double *x, double *y, double *w, double *h);
|
||||
|
||||
/* the output settings */
|
||||
void evas_set_output(Evas e, Display *disp, Drawable d, Visual *v, Colormap c);
|
||||
void evas_set_output_image(Evas e, Imlib_Image image);
|
||||
void evas_set_output_colors(Evas e, int colors);
|
||||
void evas_set_output_size(Evas e, int w, int h);
|
||||
void evas_set_output_viewport(Evas e, double x, double y, double w, double h);
|
||||
void evas_set_output_method(Evas e, Evas_Render_Method method);
|
||||
void evas_set_scale_smoothness(Evas e, int smooth);
|
||||
|
||||
/* clipping - for now you can only use rectangles as clip objects */
|
||||
void evas_set_clip(Evas e, Evas_Object o, Evas_Object clip);
|
||||
void evas_unset_clip(Evas e, Evas_Object o);
|
||||
Evas_Object evas_get_clip_object(Evas e, Evas_Object o);
|
||||
Evas_List evas_get_clip_list(Evas e, Evas_Object o);
|
||||
|
||||
/* deleting objects */
|
||||
void evas_del_object(Evas e, Evas_Object o);
|
||||
|
||||
/* adding objects */
|
||||
Evas_Object evas_add_image_from_file(Evas e, const char *file);
|
||||
Evas_Object evas_add_image_from_data(Evas e, void *data, Evas_Image_Format format, int w, int h);
|
||||
Evas_Object evas_add_text(Evas e, char *font, int size, char *text);
|
||||
Evas_Object evas_add_rectangle(Evas e);
|
||||
Evas_Object evas_add_line(Evas e);
|
||||
Evas_Object evas_add_gradient_box(Evas e);
|
||||
Evas_Object evas_add_poly(Evas e);
|
||||
|
||||
/* set object settings */
|
||||
void evas_set_image_file(Evas e, Evas_Object o, const char *file);
|
||||
void evas_set_image_data(Evas e, Evas_Object o, void *data, Evas_Image_Format format, int w, int h);
|
||||
void evas_set_image_fill(Evas e, Evas_Object o, double x, double y, double w, double h);
|
||||
void evas_set_image_border(Evas e, Evas_Object o, int l, int r, int t, int b);
|
||||
void evas_set_color(Evas e, Evas_Object o, int r, int g, int b, int a);
|
||||
void evas_set_text(Evas e, Evas_Object o, char *text);
|
||||
void evas_set_font(Evas e, Evas_Object o, char *font, int size);
|
||||
void evas_set_gradient(Evas e, Evas_Object o, Evas_Gradient grad);
|
||||
void evas_set_angle(Evas e, Evas_Object o, double angle);
|
||||
void evas_set_zoom_scale(Evas e, Evas_Object o, int scale);
|
||||
void evas_set_line_xy(Evas e, Evas_Object o, double x1, double y1, double x2, double y2);
|
||||
void evas_set_pass_events(Evas e, Evas_Object o, int pass_events);
|
||||
void evas_add_point(Evas e, Evas_Object o, double x, double y);
|
||||
void evas_clear_points(Evas e, Evas_Object o);
|
||||
|
||||
/* cache settings for performance */
|
||||
void evas_set_font_cache(Evas e, int size);
|
||||
int evas_get_font_cache(Evas e);
|
||||
void evas_flush_font_cache(Evas e);
|
||||
void evas_set_image_cache(Evas e, int size);
|
||||
int evas_get_image_cache(Evas e);
|
||||
void evas_flush_image_cache(Evas e);
|
||||
|
||||
/* font path */
|
||||
void evas_font_add_path(Evas e, char *path);
|
||||
void evas_font_del_path(Evas e, char *path);
|
||||
|
||||
/* layer stacking for object */
|
||||
void evas_set_layer(Evas e, Evas_Object o, int l);
|
||||
int evas_get_layer(Evas e, Evas_Object o);
|
||||
/* ** ** not implimented yet ** ** */void evas_set_layer_store(Evas e, int l, int store);
|
||||
|
||||
/* gradient creating / deletion / modification */
|
||||
Evas_Gradient evas_gradient_new(void);
|
||||
void evas_gradient_free(Evas_Gradient grad);
|
||||
void evas_gradient_add_color(Evas_Gradient grad, int r, int g, int b, int a, int dist);
|
||||
|
||||
/* stacking within a layer */
|
||||
void evas_raise(Evas e, Evas_Object o);
|
||||
void evas_lower(Evas e, Evas_Object o);
|
||||
void evas_stack_above(Evas e, Evas_Object o, Evas_Object above);
|
||||
void evas_stack_below(Evas e, Evas_Object o, Evas_Object below);
|
||||
|
||||
/* object geometry */
|
||||
void evas_move(Evas e, Evas_Object o, double x, double y);
|
||||
void evas_resize(Evas e, Evas_Object o, double w, double h);
|
||||
void evas_get_geometry(Evas e, Evas_Object o, double *x, double *y, double *w, double *h);
|
||||
|
||||
/* object query */
|
||||
Evas_List evas_objects_in_rect(Evas e, double x, double y, double w, double h);
|
||||
Evas_List evas_objects_at_position(Evas e, double x, double y);
|
||||
Evas_Object evas_object_in_rect(Evas e, double x, double y, double w, double h);
|
||||
Evas_Object evas_object_at_position(Evas e, double x, double y);
|
||||
Evas_Object evas_object_get_named(Evas e, char *name);
|
||||
void evas_object_set_name(Evas e, Evas_Object o, char *name);
|
||||
char *evas_object_get_name(Evas e, Evas_Object o);
|
||||
Evas_List evas_get_points(Evas e, Evas_Object o);
|
||||
|
||||
/* object visibility */
|
||||
void evas_show(Evas e, Evas_Object o);
|
||||
void evas_hide(Evas e, Evas_Object o);
|
||||
|
||||
/* image query ops */
|
||||
int evas_get_image_alpha(Evas e, Evas_Object o);
|
||||
void evas_get_image_size(Evas e, Evas_Object o, int *w, int *h);
|
||||
void evas_get_image_border(Evas e, Evas_Object o, int *l, int *r, int *t, int *b);
|
||||
Imlib_Load_Error evas_get_image_load_error(Evas e, Evas_Object o);
|
||||
|
||||
/* coordinate space transforms */
|
||||
int evas_world_x_to_screen(Evas e, double x);
|
||||
int evas_world_y_to_screen(Evas e, double y);
|
||||
double evas_screen_x_to_world(Evas e, int x);
|
||||
double evas_screen_y_to_world(Evas e, int y);
|
||||
|
||||
/* text query ops */
|
||||
char *evas_get_text_string(Evas e, Evas_Object o);
|
||||
char *evas_get_text_font(Evas e, Evas_Object o);
|
||||
int evas_get_text_size(Evas e, Evas_Object o);
|
||||
double evas_get_text_width(Evas e, Evas_Object o);
|
||||
double evas_get_text_height(Evas e, Evas_Object o);
|
||||
int evas_text_at_position(Evas e, Evas_Object o, double x, double y, double *char_x, double *char_y, double *char_w, double *char_h);
|
||||
void evas_text_at(Evas e, Evas_Object o, int index, double *char_x, double *char_y, double *char_w, double *char_h);
|
||||
void evas_text_get_ascent_descent(Evas e, Evas_Object o, double *ascent, double *descent);
|
||||
void evas_text_get_max_ascent_descent(Evas e, Evas_Object o, double *ascent, double *descent);
|
||||
void evas_text_get_advance(Evas e, Evas_Object o, double *h_advance, double *v_advance);
|
||||
double evas_text_get_inset(Evas e, Evas_Object o);
|
||||
|
||||
/* object query ops */
|
||||
void evas_get_color(Evas e, Evas_Object o, int *r, int *g, int *b, int *a);
|
||||
Evas_Object evas_get_object_under_mouse(Evas e);
|
||||
|
||||
/* data attachment ops */
|
||||
void evas_put_data(Evas e, Evas_Object o, char *key, void *data);
|
||||
void *evas_get_data(Evas e, Evas_Object o, char *key);
|
||||
void *evas_remove_data(Evas e, Evas_Object o, char *key);
|
||||
|
||||
/* events */
|
||||
void evas_event_button_down(Evas e, int x, int y, int b);
|
||||
void evas_event_button_up(Evas e, int x, int y, int b);
|
||||
void evas_event_move(Evas e, int x, int y);
|
||||
void evas_event_enter(Evas e);
|
||||
void evas_event_leave(Evas e);
|
||||
int evas_pointer_in(Evas e);
|
||||
void evas_pointer_pos(Evas e, int *x, int *y);
|
||||
int evas_pointer_buttons(Evas e);
|
||||
void evas_pointer_ungrab(Evas e);
|
||||
|
||||
/* callbacks */
|
||||
void evas_callback_add(Evas e, Evas_Object o, Evas_Callback_Type callback, void (*func) (void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y), void *data);
|
||||
void evas_callback_del(Evas e, Evas_Object o, Evas_Callback_Type callback);
|
||||
|
||||
/* list ops */
|
||||
Evas_List evas_list_append(Evas_List list, void *data);
|
||||
Evas_List evas_list_prepend(Evas_List list, void *data);
|
||||
Evas_List evas_list_append_relative(Evas_List list, void *data, void *relative);
|
||||
Evas_List evas_list_prepend_relative(Evas_List list, void *data, void *relative);
|
||||
Evas_List evas_list_remove(Evas_List list, void *data);
|
||||
Evas_List evas_list_remove_list(Evas_List list, Evas_List remove_list);
|
||||
void * evas_list_find(Evas_List list, void *data);
|
||||
Evas_List evas_list_free(Evas_List list);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,326 +0,0 @@
|
|||
#ifndef _EVAS_PRIVATE_H
|
||||
#define _EVAS_PRIVATE_H 1
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <Imlib2.h>
|
||||
#ifdef WITH_DMALLOC
|
||||
#include <dmalloc.h>
|
||||
#endif
|
||||
|
||||
typedef struct _Evas * Evas;
|
||||
typedef struct _Evas_Gradient * Evas_Gradient;
|
||||
typedef struct _Evas_Object_Any * Evas_Object;
|
||||
typedef struct _Evas_Object_Any * Evas_Object_Any;
|
||||
typedef struct _Evas_Render_Data Evas_Render_Data;
|
||||
typedef struct _Evas_Data * Evas_Data;
|
||||
typedef struct _Evas_Layer * Evas_Layer;
|
||||
typedef struct _Evas_Color_Point * Evas_Color_Point;
|
||||
typedef struct _Evas_Callback * Evas_Callback;
|
||||
typedef struct _Evas_Rectangle * Evas_Rectangle;
|
||||
typedef struct _Evas_Object_Image * Evas_Object_Image;
|
||||
typedef struct _Evas_Object_Text * Evas_Object_Text;
|
||||
typedef struct _Evas_Object_Rectangle * Evas_Object_Rectangle;
|
||||
typedef struct _Evas_Object_Line * Evas_Object_Line;
|
||||
typedef struct _Evas_Object_Gradient_Box * Evas_Object_Gradient_Box;
|
||||
typedef struct _Evas_Object_Poly * Evas_Object_Poly;
|
||||
|
||||
#define OBJECT_IMAGE 1230
|
||||
#define OBJECT_TEXT 1231
|
||||
#define OBJECT_RECTANGLE 1232
|
||||
#define OBJECT_LINE 1233
|
||||
#define OBJECT_GRADIENT_BOX 1234
|
||||
#define OBJECT_POLYGON 1235
|
||||
|
||||
#define IF_OBJ(_o, _t) if (((Evas_Object)_o)->type != _t)
|
||||
|
||||
#define INTERSECTS(x, y, w, h, xx, yy, ww, hh) \
|
||||
((x < (xx + ww)) && \
|
||||
(y < (yy + hh)) && \
|
||||
((x + w) > xx) && \
|
||||
((y + h) > yy))
|
||||
|
||||
#define CLIP_TO(_x, _y, _w, _h, _cx, _cy, _cw, _ch) \
|
||||
{ \
|
||||
if (INTERSECTS(_x, _y, _w, _h, _cx, _cy, _cw, _ch)) \
|
||||
{ \
|
||||
if (_x < _cx) \
|
||||
{ \
|
||||
_w += _x - _cx; \
|
||||
_x = _cx; \
|
||||
if (_w < 0) _w = 0; \
|
||||
} \
|
||||
if ((_x + _w) > (_cx + _cw)) \
|
||||
_w = _cx + _cw - _x; \
|
||||
if (_y < _cy) \
|
||||
{ \
|
||||
_h += _y - _cy; \
|
||||
_y = _cy; \
|
||||
if (_h < 0) _h = 0; \
|
||||
} \
|
||||
if ((_y + _h) > (_cy + _ch)) \
|
||||
_h = _cy + _ch - _y; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_w = 0; _h = 0; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
#include "Evas.h"
|
||||
struct _Evas_Render_Data
|
||||
{
|
||||
int *method[RENDER_METHOD_COUNT];
|
||||
};
|
||||
|
||||
struct _Evas
|
||||
{
|
||||
struct {
|
||||
Display *display;
|
||||
Drawable drawable;
|
||||
Visual *visual;
|
||||
Colormap colormap;
|
||||
unsigned char created_window;
|
||||
unsigned char screen;
|
||||
unsigned short colors;
|
||||
Imlib_Image image;
|
||||
|
||||
unsigned short drawable_width, drawable_height;
|
||||
|
||||
struct {
|
||||
double x, y, w, h;
|
||||
} __attribute__ ((packed)) viewport;
|
||||
|
||||
struct {
|
||||
double mult_x, mult_y;
|
||||
} __attribute__ ((packed)) val_cache;
|
||||
|
||||
Evas_Render_Method render_method;
|
||||
|
||||
Evas_Render_Data renderer_data;
|
||||
|
||||
}
|
||||
__attribute__ ((packed)) current,
|
||||
__attribute__ ((packed)) previous;
|
||||
|
||||
struct {
|
||||
unsigned char in;
|
||||
int x, y;
|
||||
int buttons;
|
||||
Evas_Object object, button_object;
|
||||
} __attribute__ ((packed)) mouse;
|
||||
|
||||
|
||||
void (*evas_renderer_data_free) (Evas _e);
|
||||
|
||||
unsigned char changed;
|
||||
|
||||
Evas_List layers;
|
||||
Imlib_Updates updates;
|
||||
Imlib_Updates obscures;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct _Evas_Color_Point
|
||||
{
|
||||
unsigned char r, g, b, a;
|
||||
int distance;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct _Evas_Gradient
|
||||
{
|
||||
Evas_List color_points;
|
||||
int references;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct _Evas_Rectangle
|
||||
{
|
||||
int x, y, w, h;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct _Evas_Data
|
||||
{
|
||||
char *key;
|
||||
void *data;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct _Evas_Layer
|
||||
{
|
||||
int layer;
|
||||
Evas_List objects;
|
||||
|
||||
struct {
|
||||
unsigned char store;
|
||||
} __attribute__ ((packed)) current, __attribute__ ((packed)) previous;
|
||||
|
||||
Evas_Render_Data renderer_data;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct _Evas_Callback
|
||||
{
|
||||
Evas_Callback_Type type;
|
||||
void *data;
|
||||
void (*callback) (void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y);
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct _Evas_Object_Any
|
||||
{
|
||||
unsigned char marker;
|
||||
unsigned char changed;
|
||||
unsigned short type;
|
||||
struct {
|
||||
double x, y, w, h;
|
||||
unsigned char zoomscale;
|
||||
int layer;
|
||||
unsigned char visible;
|
||||
unsigned char stacking;
|
||||
}
|
||||
__attribute__ ((packed)) current,
|
||||
__attribute__ ((packed)) previous;
|
||||
|
||||
unsigned char delete_me;
|
||||
|
||||
unsigned char pass_events;
|
||||
|
||||
void (*object_free) (Evas_Object _o);
|
||||
void (*object_renderer_data_free) (Evas _e, Evas_Object _o);
|
||||
|
||||
Evas_List callbacks;
|
||||
Evas_List data;
|
||||
|
||||
struct {
|
||||
Evas_List list;
|
||||
Evas_Object object;
|
||||
unsigned char changed;
|
||||
} __attribute__ ((packed)) clip;
|
||||
|
||||
Evas_Render_Data renderer_data;
|
||||
|
||||
char *name;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct _Evas_Object_Image
|
||||
{
|
||||
struct _Evas_Object_Any object;
|
||||
struct {
|
||||
char *file;
|
||||
unsigned char new_data;
|
||||
unsigned char scale;
|
||||
unsigned char alpha;
|
||||
struct {
|
||||
unsigned short w, h;
|
||||
} __attribute__ ((packed)) image;
|
||||
struct {
|
||||
double x, y, w, h;
|
||||
} __attribute__ ((packed)) fill;
|
||||
struct {
|
||||
unsigned short l, r, t, b;
|
||||
} __attribute__ ((packed)) border;
|
||||
struct {
|
||||
unsigned char r, g, b, a;
|
||||
} __attribute__ ((packed)) color;
|
||||
} current, previous;
|
||||
Imlib_Load_Error load_error;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct _Evas_Object_Text
|
||||
{
|
||||
struct _Evas_Object_Any object;
|
||||
struct {
|
||||
char *text;
|
||||
char *font;
|
||||
unsigned short size;
|
||||
struct {
|
||||
int w, h;
|
||||
} __attribute__ ((packed)) string;
|
||||
unsigned char r, g, b, a;
|
||||
}
|
||||
__attribute__ ((packed)) current,
|
||||
__attribute__ ((packed)) previous;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct _Evas_Object_Rectangle
|
||||
{
|
||||
struct _Evas_Object_Any object;
|
||||
struct {
|
||||
unsigned char r, g, b, a;
|
||||
}
|
||||
__attribute__ ((packed)) current,
|
||||
__attribute__ ((packed)) previous;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct _Evas_Object_Line
|
||||
{
|
||||
struct _Evas_Object_Any object;
|
||||
struct {
|
||||
double x1, y1, x2, y2;
|
||||
unsigned char r, g, b, a;
|
||||
}
|
||||
__attribute__ ((packed)) current,
|
||||
__attribute__ ((packed)) previous;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct _Evas_Object_Gradient_Box
|
||||
{
|
||||
struct _Evas_Object_Any object;
|
||||
struct {
|
||||
Evas_Gradient gradient;
|
||||
unsigned char new_gradient;
|
||||
double angle;
|
||||
}
|
||||
__attribute__ ((packed)) current,
|
||||
__attribute__ ((packed)) previous;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct _Evas_Object_Poly
|
||||
{
|
||||
struct _Evas_Object_Any object;
|
||||
struct {
|
||||
unsigned char r, g, b, a;
|
||||
Evas_List points;
|
||||
}
|
||||
__attribute__ ((packed)) current,
|
||||
__attribute__ ((packed)) previous;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
static void
|
||||
_evas_get_current_clipped_geometry(Evas e, Evas_Object o, double *x, double *y, double *w, double *h)
|
||||
{
|
||||
if (!o->current.visible)
|
||||
{
|
||||
*x = 0.0;
|
||||
*y = 0.0;
|
||||
*w = 0.0;
|
||||
*h = 0.0;
|
||||
return;
|
||||
}
|
||||
if (o->clip.object)
|
||||
_evas_get_current_clipped_geometry(e, o->clip.object, x, y, w, h);
|
||||
CLIP_TO(*x, *y, *w, *h,
|
||||
o->current.x, o->current.y, o->current.w, o->current.h);
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_get_previous_clipped_geometry(Evas e, Evas_Object o, double *x, double *y, double *w, double *h)
|
||||
{
|
||||
if (!o->previous.visible)
|
||||
{
|
||||
*x = 0.0;
|
||||
*y = 0.0;
|
||||
*w = 0.0;
|
||||
*h = 0.0;
|
||||
return;
|
||||
}
|
||||
if (o->clip.object)
|
||||
_evas_get_current_clipped_geometry(e, o->clip.object, x, y, w, h);
|
||||
CLIP_TO(*x, *y, *w, *h,
|
||||
o->previous.x, o->previous.y, o->previous.w, o->previous.h);
|
||||
}
|
||||
|
||||
/* If it seems to be a string, try destringing it */
|
||||
#define TO_OBJECT(e, obj) \
|
||||
((obj) && ((char *)(obj))[0] \
|
||||
? evas_object_get_named((e), (char *)(obj)) \
|
||||
: (obj))
|
||||
#endif
|
||||
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
|
||||
# A list of all the files in the current directory which can be regenerated
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
LIBS_X = @x_ldflags@ @x_libs@
|
||||
LIBS_IMLIB2 = @imlib2_libs@
|
||||
#LIBS_DB = -ledb
|
||||
LIBS_GL = @gl_ldflags@ @gl_libs@
|
||||
LIBS_TTF = @ttf_libs@
|
||||
LIBS_EXTRA = -L/usr/local/lib
|
||||
|
||||
CFLAGS_X = @x_cflags@
|
||||
CFLAGS_IMLIB2 = @imlib2_includes@
|
||||
#CFLAGS_DB =
|
||||
CFLAGS_GL = @gl_includes@
|
||||
CFLAGS_TTF = @ttf_includes@
|
||||
CFLAGS_EXTRA = -I$(includedir) -I$(top_srcdir) -I/usr/local/include
|
||||
|
||||
LIBS_ALL = $(LIBS_X) $(LIBS_IMLIB2) $(LIBS_GL) $(LIBS_TTF) $(LIBS_EXTRA)
|
||||
CFLAGS_ALL = $(CFLAGS_X) $(CFLAGS_IMLIB2) $(CFLAGS_GL) $(CFLAGS_TTF) $(CFLAGS_EXTRA)
|
||||
|
||||
INCLUDES = $(CFLAGS_ALL) \
|
||||
-DLIBDIR=\"$(libdir)\" \
|
||||
-DBINDIR=\"$(bindir)\" \
|
||||
-DDATADIR=\"$(datadir)\"
|
||||
|
||||
lib_LTLIBRARIES = libevas.la
|
||||
include_HEADERS = \
|
||||
Evas.h
|
||||
|
||||
libevas_la_SOURCES = \
|
||||
evas_callbacks.c \
|
||||
evas_events.c \
|
||||
evas_fileless_image.c \
|
||||
evas_gl_routines.c \
|
||||
evas_gradient.c \
|
||||
evas_image.c \
|
||||
evas_image_routines.c \
|
||||
evas_imlib_routines.c \
|
||||
evas_line.c \
|
||||
evas_list.c \
|
||||
evas_misc.c \
|
||||
evas_object.c \
|
||||
evas_poly.c \
|
||||
evas_rectangle.c \
|
||||
evas_render.c \
|
||||
evas_text.c \
|
||||
evas_gl_routines.h \
|
||||
evas_x11_routines.c \
|
||||
evas_fileless_image.h \
|
||||
evas_image_routines.h \
|
||||
evas_imlib_routines.h \
|
||||
evas_x11_routines.h \
|
||||
evas_render_routines.c \
|
||||
evas_render_routines.h \
|
||||
Evas.h \
|
||||
Evas_private.h
|
||||
|
||||
libevas_la_LIBADD = $(LIBS_ALL)
|
||||
libevas_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
libevas_la_LDFLAGS = -version-info 6:0:6
|
|
@ -1,76 +0,0 @@
|
|||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
void
|
||||
_evas_callback_call(Evas e, Evas_Object o, Evas_Callback_Type callback,
|
||||
int b, int x, int y)
|
||||
{
|
||||
Evas_List l;
|
||||
static in_cb = 0;
|
||||
|
||||
if(!o) return;
|
||||
if (in_cb) return;
|
||||
in_cb = 1;
|
||||
if (o->callbacks)
|
||||
{
|
||||
for (l = o->callbacks; l; l = l->next)
|
||||
{
|
||||
Evas_Callback cb;
|
||||
|
||||
cb = l->data;
|
||||
if (cb->type == callback)
|
||||
cb->callback(cb->data, e, o, b, x, y);
|
||||
}
|
||||
}
|
||||
in_cb = 0;
|
||||
}
|
||||
|
||||
/* callbacks */
|
||||
void
|
||||
evas_callback_add(Evas e, Evas_Object o, Evas_Callback_Type callback, void (*func) (void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y), void *data)
|
||||
|
||||
{
|
||||
Evas_Callback cb;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
cb = malloc(sizeof(struct _Evas_Callback));
|
||||
cb->type = callback;
|
||||
cb->data = data;
|
||||
cb->callback = func;
|
||||
o->callbacks = evas_list_append(o->callbacks, cb);
|
||||
}
|
||||
|
||||
void
|
||||
evas_callback_del(Evas e, Evas_Object o, Evas_Callback_Type callback)
|
||||
{
|
||||
Evas_List l;
|
||||
int have_cb;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
have_cb = 1;
|
||||
while (have_cb)
|
||||
{
|
||||
have_cb = 0;
|
||||
for (l = o->callbacks; l; l = l->next)
|
||||
{
|
||||
Evas_Callback cb;
|
||||
|
||||
cb = l->data;
|
||||
if (cb->type == callback)
|
||||
{
|
||||
o->callbacks = evas_list_remove(o->callbacks, cb);
|
||||
free(cb);
|
||||
have_cb = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,178 +0,0 @@
|
|||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
Evas_Object
|
||||
_evas_highest_object_at_point(Evas e, int x, int y)
|
||||
{
|
||||
double cx, cy;
|
||||
|
||||
cx = evas_screen_x_to_world(e, x);
|
||||
cy = evas_screen_y_to_world(e, y);
|
||||
return evas_object_at_position(e, cx, cy);
|
||||
}
|
||||
|
||||
Evas_List
|
||||
_evas_objects_at_point(Evas e, int x, int y)
|
||||
{
|
||||
double cx, cy;
|
||||
|
||||
cx = evas_screen_x_to_world(e, x);
|
||||
cy = evas_screen_y_to_world(e, y);
|
||||
return evas_objects_at_position(e, cx, cy);
|
||||
}
|
||||
|
||||
/* events */
|
||||
void
|
||||
evas_event_button_down(Evas e, int x, int y, int b)
|
||||
{
|
||||
Evas_Object o;
|
||||
|
||||
if (!e) return;
|
||||
if ((b < 1) || (b > 32)) return;
|
||||
if (!e->mouse.buttons)
|
||||
{
|
||||
o = _evas_highest_object_at_point(e, x, y);
|
||||
e->mouse.button_object = o;
|
||||
}
|
||||
e->mouse.buttons |= (1 << (b - 1));
|
||||
e->mouse.x = x;
|
||||
e->mouse.y = y;
|
||||
if (e->mouse.button_object)
|
||||
_evas_callback_call(e, e->mouse.button_object, CALLBACK_MOUSE_DOWN,
|
||||
b, x, y);
|
||||
}
|
||||
|
||||
void
|
||||
evas_event_button_up(Evas e, int x, int y, int b)
|
||||
{
|
||||
Evas_Object o;
|
||||
|
||||
if (!e) return;
|
||||
if ((b < 1) || (b > 32)) return;
|
||||
e->mouse.buttons &= ~(1 << (b - 1));
|
||||
e->mouse.x = x;
|
||||
e->mouse.y = y;
|
||||
if (e->mouse.button_object)
|
||||
_evas_callback_call(e, e->mouse.button_object, CALLBACK_MOUSE_UP,
|
||||
b, x, y);
|
||||
else if (e->mouse.object)
|
||||
_evas_callback_call(e, e->mouse.object, CALLBACK_MOUSE_UP,
|
||||
b, x, y);
|
||||
if (!e->mouse.buttons)
|
||||
{
|
||||
if ((e->mouse.button_object) &&
|
||||
(e->mouse.object != e->mouse.button_object))
|
||||
_evas_callback_call(e, e->mouse.button_object, CALLBACK_MOUSE_OUT,
|
||||
e->mouse.buttons, x, y);
|
||||
e->mouse.button_object = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
evas_event_move(Evas e, int x, int y)
|
||||
{
|
||||
Evas_Object o;
|
||||
|
||||
if (!e) return;
|
||||
o = _evas_highest_object_at_point(e, x, y);
|
||||
if (o != e->mouse.object)
|
||||
{
|
||||
if (e->mouse.object)
|
||||
{
|
||||
if (!e->mouse.button_object)
|
||||
{
|
||||
_evas_callback_call(e, e->mouse.object, CALLBACK_MOUSE_MOVE,
|
||||
e->mouse.buttons, e->mouse.x, e->mouse.y);
|
||||
_evas_callback_call(e, e->mouse.object, CALLBACK_MOUSE_OUT,
|
||||
e->mouse.buttons, e->mouse.x, e->mouse.y);
|
||||
}
|
||||
else
|
||||
_evas_callback_call(e, e->mouse.button_object, CALLBACK_MOUSE_MOVE,
|
||||
e->mouse.buttons, e->mouse.x, e->mouse.y);
|
||||
}
|
||||
e->mouse.x = x;
|
||||
e->mouse.y = y;
|
||||
e->mouse.object = o;
|
||||
if (e->mouse.object)
|
||||
{
|
||||
if (!e->mouse.button_object)
|
||||
{
|
||||
_evas_callback_call(e, e->mouse.object, CALLBACK_MOUSE_IN,
|
||||
e->mouse.buttons, e->mouse.x, e->mouse.y);
|
||||
_evas_callback_call(e, e->mouse.object, CALLBACK_MOUSE_MOVE,
|
||||
e->mouse.buttons, e->mouse.x, e->mouse.y);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
e->mouse.x = x;
|
||||
e->mouse.y = y;
|
||||
if (e->mouse.button_object)
|
||||
_evas_callback_call(e, e->mouse.button_object, CALLBACK_MOUSE_MOVE,
|
||||
e->mouse.buttons, e->mouse.x, e->mouse.y);
|
||||
else if (e->mouse.object)
|
||||
_evas_callback_call(e, e->mouse.object, CALLBACK_MOUSE_MOVE,
|
||||
e->mouse.buttons, e->mouse.x, e->mouse.y);
|
||||
}
|
||||
|
||||
void
|
||||
evas_event_enter(Evas e)
|
||||
{
|
||||
if (!e) return;
|
||||
e->mouse.in = 1;
|
||||
}
|
||||
|
||||
void
|
||||
evas_event_leave(Evas e)
|
||||
{
|
||||
if (!e) return;
|
||||
e->mouse.in = 0;
|
||||
if ((e->mouse.object) && (!e->mouse.button_object))
|
||||
{
|
||||
_evas_callback_call(e, e->mouse.object, CALLBACK_MOUSE_MOVE,
|
||||
e->mouse.buttons, e->mouse.x, e->mouse.y);
|
||||
_evas_callback_call(e, e->mouse.object, CALLBACK_MOUSE_OUT,
|
||||
e->mouse.buttons, e->mouse.x, e->mouse.y);
|
||||
e->mouse.object = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_get_object_under_mouse(Evas e)
|
||||
{
|
||||
if (!e) return NULL;
|
||||
return _evas_highest_object_at_point(e, e->mouse.x, e->mouse.y);
|
||||
}
|
||||
|
||||
int
|
||||
evas_pointer_in(Evas e)
|
||||
{
|
||||
if (!e) return 0;
|
||||
return e->mouse.in;
|
||||
}
|
||||
|
||||
void
|
||||
evas_pointer_pos(Evas e, int *x, int *y)
|
||||
{
|
||||
if (!e) return;
|
||||
if (x) *x = e->mouse.x;
|
||||
if (y) *y = e->mouse.y;
|
||||
}
|
||||
|
||||
int
|
||||
evas_pointer_buttons(Evas e)
|
||||
{
|
||||
if (!e) return 0;
|
||||
return e->mouse.buttons;
|
||||
}
|
||||
|
||||
void
|
||||
evas_pointer_ungrab(Evas e)
|
||||
{
|
||||
e->mouse.buttons = 0;
|
||||
e->mouse.button_object = NULL;
|
||||
}
|
|
@ -1,118 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include "evas_fileless_image.h"
|
||||
|
||||
//#define MYDEBUG 1
|
||||
|
||||
|
||||
Evas_List fileless_images = NULL;
|
||||
|
||||
char* _evas_generate_filename(void){
|
||||
|
||||
char buf[100];
|
||||
char *p;
|
||||
int i,j;
|
||||
|
||||
struct timeval tv;
|
||||
|
||||
gettimeofday(&tv,NULL);
|
||||
srand(tv.tv_usec);
|
||||
i = rand();
|
||||
srand(tv.tv_sec);
|
||||
j = rand();
|
||||
sprintf(buf, "s%d%d.mem", i, j);
|
||||
p = (char*)malloc(strlen(buf)+1);
|
||||
strcpy(p, buf);
|
||||
#ifdef MYDEBUG
|
||||
fprintf(stderr,"fli: generated: %s\n", p);
|
||||
#endif
|
||||
return p;
|
||||
}
|
||||
|
||||
void _evas_add_fileless_image(Imlib_Image im, char* file){
|
||||
|
||||
Evas_Fileless_Image *fli;
|
||||
Imlib_Image prev_im;
|
||||
|
||||
if(!file) return;
|
||||
|
||||
fli = (Evas_Fileless_Image*)malloc(sizeof(Evas_Fileless_Image));
|
||||
fli->file = (char*)malloc(strlen(file)+1);
|
||||
strcpy(fli->file, file);
|
||||
prev_im = imlib_context_get_image();
|
||||
imlib_context_set_image(im);
|
||||
fli->im = imlib_clone_image();
|
||||
imlib_context_set_image(prev_im);
|
||||
|
||||
fileless_images = evas_list_append(fileless_images,(void*)fli);
|
||||
#ifdef MYDEBUG
|
||||
fprintf(stderr,"fli: added: %s\n", file);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void _evas_remove_fileless_image(char*file){
|
||||
Evas_List l;
|
||||
Imlib_Image prev_im;
|
||||
|
||||
if(!file) return;
|
||||
|
||||
for( l = fileless_images; l ; l = l -> next ){
|
||||
Evas_Fileless_Image *fli;
|
||||
fli = l->data;
|
||||
if(!strcmp(fli->file, file)){
|
||||
free(fli->file);
|
||||
prev_im = imlib_context_get_image();
|
||||
imlib_context_set_image(fli->im);
|
||||
imlib_free_image();
|
||||
imlib_context_set_image(prev_im);
|
||||
fileless_images = evas_list_remove(fileless_images, fli);
|
||||
#ifdef MYDEBUG
|
||||
fprintf(stderr,"fli: removed: %s\n", file);
|
||||
#endif
|
||||
free(fli);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Imlib_Image _evas_find_fileless_image(char*file){
|
||||
Evas_List l;
|
||||
Imlib_Image prev_im, res_im = NULL;
|
||||
|
||||
if(!file) return;
|
||||
|
||||
for( l = fileless_images ; l ; l = l -> next ){
|
||||
Evas_Fileless_Image *fli;
|
||||
fli = l -> data;
|
||||
if(!strcmp(fli->file, file)){
|
||||
prev_im = imlib_context_get_image();
|
||||
imlib_context_set_image(fli->im);
|
||||
res_im = imlib_clone_image();
|
||||
#ifdef MYDEBUG
|
||||
fprintf(stderr, "fli: found: %s\n", file);
|
||||
#endif
|
||||
imlib_context_set_image(prev_im);
|
||||
}
|
||||
}
|
||||
|
||||
return res_im;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#include "Evas.h"
|
||||
|
||||
typedef struct _Evas_Fileless_Image Evas_Fileless_Image;
|
||||
|
||||
struct _Evas_Fileless_Image{
|
||||
char *file;
|
||||
Imlib_Image im;
|
||||
};
|
||||
|
||||
Imlib_Image _evas_find_fileless_image(char*file);
|
||||
char* _evas_generate_filename(void);
|
||||
void _evas_add_fileless_image(Imlib_Image im, char*file);
|
||||
void _evas_remove_fileless_image(char*file);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,276 +0,0 @@
|
|||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_GL
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#ifdef HAVE_GLU
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
#else
|
||||
typedef int GLXContext;
|
||||
typedef int GLuint;
|
||||
#endif
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xmu/StdCmap.h>
|
||||
|
||||
#ifdef HAVE_FREETYPE1_FREETYPE_FREETYPE_H
|
||||
#include <freetype1/freetype/freetype.h>
|
||||
#else
|
||||
#ifdef HAVE_FREETYPE_FREETYPE_H
|
||||
#include <freetype/freetype.h>
|
||||
#else
|
||||
#include <freetype.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
|
||||
typedef struct _evas_gl_image Evas_GL_Image;
|
||||
typedef struct _evas_gl_font Evas_GL_Font;
|
||||
typedef struct _evas_gl_gradient Evas_GL_Graident;
|
||||
|
||||
typedef struct _evas_gl_font_texture Evas_GL_Font_Texture;
|
||||
typedef struct _evas_gl_glpyh_texture Evas_GL_Glyph_Texture;
|
||||
typedef struct _evas_gl_glyph Evas_GL_Glyph;
|
||||
typedef struct _evas_gl_gradient_texture Evas_GL_Graident_Texture;
|
||||
typedef struct _evas_gl_window Evas_GL_Window;
|
||||
typedef struct _evas_gl_context Evas_GL_Context;
|
||||
typedef struct _evas_gl_rect Evas_GL_Rect;
|
||||
typedef struct _evas_gl_texture Evas_GL_Texture;
|
||||
typedef struct _evas_gl_texmesh Evas_GL_Texmesh;
|
||||
|
||||
struct _evas_gl_window
|
||||
{
|
||||
Display *disp;
|
||||
Window win;
|
||||
Window root;
|
||||
int screen;
|
||||
Evas_GL_Context *context;
|
||||
Evas_List updates;
|
||||
int w, h;
|
||||
};
|
||||
|
||||
struct _evas_gl_context
|
||||
{
|
||||
Display *disp;
|
||||
int screen;
|
||||
GLXContext context;
|
||||
Window win;
|
||||
Window root;
|
||||
XVisualInfo *visualinfo;
|
||||
Visual *visual;
|
||||
Colormap colormap;
|
||||
int dither;
|
||||
int blend;
|
||||
int texture;
|
||||
DATA32 color;
|
||||
struct {
|
||||
int active;
|
||||
int x, y, w, h;
|
||||
} clip;
|
||||
#ifdef HAVE_GL
|
||||
GLenum read_buf;
|
||||
GLenum write_buf;
|
||||
#endif
|
||||
Evas_GL_Texture *bound_texture;
|
||||
|
||||
int max_texture_depth;
|
||||
int max_texture_size;
|
||||
};
|
||||
|
||||
struct _evas_gl_rect
|
||||
{
|
||||
int x, y, w, h;
|
||||
};
|
||||
|
||||
struct _evas_gl_texture
|
||||
{
|
||||
int w, h;
|
||||
#ifdef HAVE_GL
|
||||
GLuint texture;
|
||||
#endif
|
||||
int smooth;
|
||||
};
|
||||
|
||||
struct _evas_gl_texmesh
|
||||
{
|
||||
struct {
|
||||
int x, y;
|
||||
int x_edge, y_edge;
|
||||
int x_left, y_left;
|
||||
} tiles;
|
||||
Evas_GL_Texture **textures;
|
||||
Evas_GL_Window *window;
|
||||
Evas_GL_Context *context;
|
||||
};
|
||||
|
||||
struct _evas_gl_image
|
||||
{
|
||||
char *file;
|
||||
Imlib_Image im;
|
||||
int w, h;
|
||||
struct {
|
||||
int l, r, t, b;
|
||||
} border;
|
||||
int has_alpha;
|
||||
Evas_List textures;
|
||||
int references;
|
||||
};
|
||||
|
||||
struct _evas_gl_gradient_texture
|
||||
{
|
||||
Evas_GL_Window *window;
|
||||
Evas_GL_Context *context;
|
||||
Evas_GL_Texture *texture;
|
||||
};
|
||||
|
||||
struct _evas_gl_gradient
|
||||
{
|
||||
Imlib_Color_Range col_range;
|
||||
Evas_List textures;
|
||||
};
|
||||
|
||||
struct _evas_gl_glpyh_texture
|
||||
{
|
||||
struct {
|
||||
double x1, x2, y1, y2;
|
||||
} tex;
|
||||
Evas_GL_Window *window;
|
||||
Evas_GL_Context *context;
|
||||
Evas_GL_Texture *texture;
|
||||
};
|
||||
|
||||
struct _evas_gl_glyph
|
||||
{
|
||||
int glyph_id;
|
||||
TT_Glyph glyph;
|
||||
|
||||
TT_Glyph_Metrics metrics;
|
||||
|
||||
Evas_GL_Glyph_Texture *texture;
|
||||
|
||||
struct {
|
||||
double x1, x2, y1, y2;
|
||||
} tex;
|
||||
|
||||
Evas_List textures;
|
||||
};
|
||||
|
||||
struct _evas_gl_font_texture
|
||||
{
|
||||
struct {
|
||||
int x, y;
|
||||
int row_h;
|
||||
} cursor;
|
||||
Evas_GL_Window *window;
|
||||
Evas_GL_Context *context;
|
||||
Evas_GL_Texture *texture;
|
||||
};
|
||||
|
||||
struct _evas_gl_font
|
||||
{
|
||||
char *font;
|
||||
int size;
|
||||
|
||||
TT_Engine engine;
|
||||
TT_Face face;
|
||||
TT_Instance instance;
|
||||
TT_Face_Properties properties;
|
||||
TT_CharMap char_map;
|
||||
TT_Instance_Metrics metrics;
|
||||
|
||||
Evas_List glyphs[256];
|
||||
|
||||
Evas_List textures;
|
||||
|
||||
int ascent;
|
||||
int descent;
|
||||
int max_descent;
|
||||
int max_ascent;
|
||||
|
||||
int references;
|
||||
};
|
||||
|
||||
/***************/
|
||||
/* image stuff */
|
||||
/***************/
|
||||
Evas_GL_Image *__evas_gl_image_new_from_file(Display *disp, char *file);
|
||||
void __evas_gl_image_free(Evas_GL_Image *im);
|
||||
void __evas_gl_image_cache_empty(Display *disp);
|
||||
void __evas_gl_image_cache_set_size(Display *disp, int size);
|
||||
int __evas_gl_image_cache_get_size(Display *disp);
|
||||
int __evas_gl_image_get_width(Evas_GL_Image *im);
|
||||
int __evas_gl_image_get_height(Evas_GL_Image *im);
|
||||
void __evas_gl_image_set_borders(Evas_GL_Image *im, int left, int right, int top, int bottom);
|
||||
void __evas_gl_image_set_smooth_scaling(int on);
|
||||
void __evas_gl_image_draw(Evas_GL_Image *im, Display *disp, Imlib_Image dstim, Window w, int win_w, int win_h, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int cr, int cg, int cb, int ca);
|
||||
|
||||
/********/
|
||||
/* text */
|
||||
/********/
|
||||
Evas_GL_Font *__evas_gl_text_font_new(Display *disp, char *font, int size);
|
||||
void __evas_gl_text_font_free(Evas_GL_Font *fn);
|
||||
int __evas_gl_text_font_get_ascent(Evas_GL_Font *fn);
|
||||
int __evas_gl_text_font_get_descent(Evas_GL_Font *fn);
|
||||
int __evas_gl_text_font_get_max_ascent(Evas_GL_Font *fn);
|
||||
int __evas_gl_text_font_get_max_descent(Evas_GL_Font *fn);
|
||||
void __evas_gl_text_font_get_advances(Evas_GL_Font *fn, char *text, int *advance_horiz, int *advance_vert);
|
||||
int __evas_gl_text_font_get_first_inset(Evas_GL_Font *fn, char *text);
|
||||
void __evas_gl_text_font_add_path(char *path);
|
||||
void __evas_gl_text_font_del_path(char *path);
|
||||
char **__evas_gl_text_font_list_paths(int *count);
|
||||
void __evas_gl_text_cache_empty(Display *disp);
|
||||
void __evas_gl_text_cache_set_size(Display *disp, int size);
|
||||
int __evas_gl_text_cache_get_size(Display *disp);
|
||||
void __evas_gl_text_get_size(Evas_GL_Font *fn, char *text, int *w, int *h);
|
||||
int __evas_gl_text_get_character_at_pos(Evas_GL_Font *fn, char *text, int x, int y, int *cx, int *cy, int *cw, int *ch);
|
||||
void __evas_gl_text_get_character_number(Evas_GL_Font *fn, char *text, int num, int *cx, int *cy, int *cw, int *ch);
|
||||
void __evas_gl_text_draw(Evas_GL_Font *fn, Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, char *text, int r, int g, int b, int a);
|
||||
|
||||
/**************/
|
||||
/* rectangles */
|
||||
/**************/
|
||||
void __evas_gl_rectangle_draw(Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, int w, int h, int r, int g, int b, int a);
|
||||
|
||||
/*********/
|
||||
/* lines */
|
||||
/*********/
|
||||
void __evas_gl_line_draw(Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x1, int y1, int x2, int y2, int r, int g, int b, int a);
|
||||
|
||||
/*************/
|
||||
/* gradients */
|
||||
/*************/
|
||||
Evas_GL_Graident *__evas_gl_gradient_new(Display *disp);
|
||||
void __evas_gl_gradient_free(Evas_GL_Graident *gr);
|
||||
void __evas_gl_gradient_color_add(Evas_GL_Graident *gr, int r, int g, int b, int a, int dist);
|
||||
void __evas_gl_gradient_draw(Evas_GL_Graident *gr, Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, int w, int h, double angle);
|
||||
|
||||
/************/
|
||||
/* polygons */
|
||||
/************/
|
||||
void __evas_gl_poly_draw (Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, Evas_List points, int r, int g, int b, int a);
|
||||
|
||||
/***********/
|
||||
/* drawing */
|
||||
/***********/
|
||||
void __evas_gl_set_clip_rect(int on, int x, int y, int w, int h, int r, int g, int b, int a);
|
||||
void __evas_gl_init(Display *disp, int screen, int colors);
|
||||
void __evas_gl_set_vis_cmap(Visual *vis, Colormap cmap);
|
||||
int __evas_gl_capable(Display *disp);
|
||||
void __evas_gl_flush_draw(Display *disp, Imlib_Image dstim, Window win);
|
||||
void __evas_gl_sync(Display *disp);
|
||||
Visual *__evas_gl_get_visual(Display *disp, int screen);
|
||||
XVisualInfo *__evas_gl_get_visual_info(Display *disp, int screen);
|
||||
Colormap __evas_gl_get_colormap(Display *disp, int screen);
|
||||
void __evas_gl_draw_add_rect(Display *disp, Imlib_Image dstim, Window win, int x, int y, int w, int h);
|
|
@ -1,292 +0,0 @@
|
|||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include "evas_gl_routines.h"
|
||||
#include "evas_imlib_routines.h"
|
||||
#include "evas_image_routines.h"
|
||||
#include "evas_x11_routines.h"
|
||||
#include "evas_render_routines.h"
|
||||
|
||||
static void
|
||||
_evas_free_gradient_box(Evas_Object o)
|
||||
{
|
||||
Evas_Object_Gradient_Box oo;
|
||||
|
||||
IF_OBJ(o, OBJECT_GRADIENT_BOX) return;
|
||||
oo = o;
|
||||
if (oo->current.gradient) evas_gradient_free(oo->current.gradient);
|
||||
free(o);
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_free_gradient_box_renderer_data(Evas e, Evas_Object o)
|
||||
{
|
||||
Evas_Object_Gradient_Box oo;
|
||||
|
||||
oo= o;
|
||||
switch (e->current.render_method)
|
||||
{
|
||||
case RENDER_METHOD_ALPHA_SOFTWARE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_imlib_gradient_free(o->renderer_data.method[e->current.render_method]);
|
||||
break;
|
||||
case RENDER_METHOD_BASIC_HARDWARE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_x11_gradient_free(o->renderer_data.method[e->current.render_method]);
|
||||
break;
|
||||
case RENDER_METHOD_3D_HARDWARE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_gl_gradient_free(o->renderer_data.method[e->current.render_method]);
|
||||
break;
|
||||
case RENDER_METHOD_ALPHA_HARDWARE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_render_gradient_free(o->renderer_data.method[e->current.render_method]);
|
||||
break;
|
||||
case RENDER_METHOD_IMAGE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_image_gradient_free(o->renderer_data.method[e->current.render_method]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_add_gradient_box(Evas e)
|
||||
{
|
||||
Evas_Object_Gradient_Box oo;
|
||||
Evas_Object_Any o;
|
||||
Evas_List l;
|
||||
Evas_Layer layer;
|
||||
|
||||
if (!e) return NULL;
|
||||
o = oo = malloc(sizeof(struct _Evas_Object_Gradient_Box));
|
||||
memset(o, 0, sizeof(struct _Evas_Object_Gradient_Box));
|
||||
o->type = OBJECT_GRADIENT_BOX;
|
||||
o->object_free = _evas_free_gradient_box;
|
||||
o->object_renderer_data_free = _evas_free_gradient_box_renderer_data;
|
||||
|
||||
o->current.x = 0;
|
||||
o->current.y = 0;
|
||||
o->current.w = 1;
|
||||
o->current.h = 1;
|
||||
|
||||
oo->current.angle = 0.0;
|
||||
|
||||
for (l = e->layers; l; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
if (layer->layer == o->current.layer)
|
||||
{
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
return o;
|
||||
}
|
||||
if (layer->layer > o->current.layer)
|
||||
{
|
||||
Evas_Layer layer_new;
|
||||
|
||||
layer_new = malloc(sizeof(struct _Evas_Layer));
|
||||
memset(layer_new, 0, sizeof(struct _Evas_Layer));
|
||||
e->layers = evas_list_prepend_relative(e->layers, layer_new, layer);
|
||||
layer_new->objects = evas_list_append(layer_new->objects, o);
|
||||
layer_new->layer = o->current.layer;
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
layer = malloc(sizeof(struct _Evas_Layer));
|
||||
memset(layer, 0, sizeof(struct _Evas_Layer));
|
||||
e->layers = evas_list_append(e->layers, layer);
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_gradient(Evas e, Evas_Object o, Evas_Gradient grad)
|
||||
{
|
||||
Evas_Object_Gradient_Box oo;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
if (!grad) return;
|
||||
IF_OBJ(o, OBJECT_GRADIENT_BOX) return;
|
||||
oo = o;
|
||||
grad->references++;
|
||||
if (oo->current.gradient) evas_gradient_free(oo->current.gradient);
|
||||
oo->current.gradient = grad;
|
||||
switch (e->current.render_method)
|
||||
{
|
||||
case RENDER_METHOD_ALPHA_SOFTWARE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_imlib_gradient_free(o->renderer_data.method[e->current.render_method]);
|
||||
{
|
||||
Evas_Imlib_Graident *g;
|
||||
Evas_List l;
|
||||
|
||||
g = __evas_imlib_gradient_new(e->current.display);
|
||||
o->renderer_data.method[e->current.render_method] = g;
|
||||
for (l = grad->color_points; l; l = l->next)
|
||||
{
|
||||
Evas_Color_Point col;
|
||||
|
||||
col= l->data;
|
||||
__evas_imlib_gradient_color_add(g, col->r, col->g, col->b,
|
||||
col->a, col->distance);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RENDER_METHOD_BASIC_HARDWARE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_x11_gradient_free(o->renderer_data.method[e->current.render_method]);
|
||||
{
|
||||
Evas_X11_Graident *g;
|
||||
Evas_List l;
|
||||
|
||||
g = __evas_x11_gradient_new(e->current.display);
|
||||
o->renderer_data.method[e->current.render_method] = g;
|
||||
for (l = grad->color_points; l; l = l->next)
|
||||
{
|
||||
Evas_Color_Point col;
|
||||
|
||||
col= l->data;
|
||||
__evas_x11_gradient_color_add(g, col->r, col->g, col->b,
|
||||
col->a, col->distance);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RENDER_METHOD_3D_HARDWARE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_gl_gradient_free(o->renderer_data.method[e->current.render_method]);
|
||||
{
|
||||
Evas_GL_Graident *g;
|
||||
Evas_List l;
|
||||
|
||||
g = __evas_gl_gradient_new(e->current.display);
|
||||
o->renderer_data.method[e->current.render_method] = g;
|
||||
for (l = grad->color_points; l; l = l->next)
|
||||
{
|
||||
Evas_Color_Point col;
|
||||
|
||||
col= l->data;
|
||||
__evas_gl_gradient_color_add(g, col->r, col->g, col->b,
|
||||
col->a, col->distance);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RENDER_METHOD_ALPHA_HARDWARE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_render_gradient_free(o->renderer_data.method[e->current.render_method]);
|
||||
{
|
||||
Evas_Image_Graident *g;
|
||||
Evas_List l;
|
||||
|
||||
g = __evas_render_gradient_new(e->current.display);
|
||||
o->renderer_data.method[e->current.render_method] = g;
|
||||
for (l = grad->color_points; l; l = l->next)
|
||||
{
|
||||
Evas_Color_Point col;
|
||||
|
||||
col= l->data;
|
||||
__evas_render_gradient_color_add(g, col->r, col->g, col->b,
|
||||
col->a, col->distance);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RENDER_METHOD_IMAGE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_image_gradient_free(o->renderer_data.method[e->current.render_method]);
|
||||
{
|
||||
Evas_Image_Graident *g;
|
||||
Evas_List l;
|
||||
|
||||
g = __evas_image_gradient_new(e->current.display);
|
||||
o->renderer_data.method[e->current.render_method] = g;
|
||||
for (l = grad->color_points; l; l = l->next)
|
||||
{
|
||||
Evas_Color_Point col;
|
||||
|
||||
col= l->data;
|
||||
__evas_image_gradient_color_add(g, col->r, col->g, col->b,
|
||||
col->a, col->distance);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
oo->current.new_gradient = 1;
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
}
|
||||
|
||||
/* gradient creating / deletion / modification */
|
||||
Evas_Gradient
|
||||
evas_gradient_new(void)
|
||||
{
|
||||
Evas_Gradient gr;
|
||||
|
||||
gr = malloc(sizeof(struct _Evas_Gradient));
|
||||
gr->color_points = NULL;
|
||||
gr->references = 1;
|
||||
return gr;
|
||||
}
|
||||
|
||||
void
|
||||
evas_gradient_free(Evas_Gradient grad)
|
||||
{
|
||||
Evas_List l;
|
||||
|
||||
if (!grad) return;
|
||||
grad->references--;
|
||||
if (grad->references > 0) return;
|
||||
if (grad->color_points)
|
||||
{
|
||||
for (l = grad->color_points; l; l = l->next)
|
||||
free(l->data);
|
||||
evas_list_free(grad->color_points);
|
||||
}
|
||||
free(grad);
|
||||
}
|
||||
|
||||
void
|
||||
evas_gradient_add_color(Evas_Gradient grad, int r, int g, int b, int a, int dist)
|
||||
{
|
||||
Evas_Color_Point col;
|
||||
|
||||
if (!grad) return;
|
||||
col = malloc(sizeof(struct _Evas_Color_Point));
|
||||
col->r = r;
|
||||
col->g = g;
|
||||
col->b = b;
|
||||
col->a = a;
|
||||
col->distance = dist;
|
||||
grad->color_points = evas_list_append(grad->color_points, col);
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_angle(Evas e, Evas_Object o, double angle)
|
||||
{
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
switch (o->type)
|
||||
{
|
||||
case OBJECT_GRADIENT_BOX:
|
||||
{
|
||||
Evas_Object_Gradient_Box oo;
|
||||
|
||||
oo = (Evas_Object_Gradient_Box)o;
|
||||
oo->current.angle = angle;
|
||||
}
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
|
@ -1,593 +0,0 @@
|
|||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
static void
|
||||
_evas_free_image(Evas_Object o)
|
||||
{
|
||||
Evas_Object_Image oo;
|
||||
|
||||
IF_OBJ(o, OBJECT_IMAGE) return;
|
||||
oo = o;
|
||||
if (oo->current.file) _evas_remove_fileless_image(oo->current.file);
|
||||
if (oo->current.file) free(oo->current.file);
|
||||
free(o);
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_free_image_renderer_data(Evas e, Evas_Object o)
|
||||
{
|
||||
switch (e->current.render_method)
|
||||
{
|
||||
case RENDER_METHOD_ALPHA_SOFTWARE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_imlib_image_free((void *)o->renderer_data.method[e->current.render_method]);
|
||||
break;
|
||||
case RENDER_METHOD_BASIC_HARDWARE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_x11_image_free((void *)o->renderer_data.method[e->current.render_method]);
|
||||
break;
|
||||
case RENDER_METHOD_3D_HARDWARE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_gl_image_free((void *)o->renderer_data.method[e->current.render_method]);
|
||||
break;
|
||||
case RENDER_METHOD_ALPHA_HARDWARE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_render_image_free((void *)o->renderer_data.method[e->current.render_method]);
|
||||
break;
|
||||
case RENDER_METHOD_IMAGE:
|
||||
if (o->renderer_data.method[e->current.render_method])
|
||||
__evas_image_image_free((void *)o->renderer_data.method[e->current.render_method]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
o->renderer_data.method[e->current.render_method] = NULL;
|
||||
}
|
||||
|
||||
/* adding objects */
|
||||
Evas_Object
|
||||
evas_add_image_from_file(Evas e, const char *file)
|
||||
{
|
||||
Evas_Object_Image oo;
|
||||
Evas_Object_Any o;
|
||||
Evas_List l;
|
||||
Evas_Layer layer;
|
||||
|
||||
if (!e) return NULL;
|
||||
o = oo = malloc(sizeof(struct _Evas_Object_Image));
|
||||
memset(o, 0, sizeof(struct _Evas_Object_Image));
|
||||
o->type = OBJECT_IMAGE;
|
||||
o->object_free = _evas_free_image;
|
||||
o->object_renderer_data_free = _evas_free_image_renderer_data;
|
||||
|
||||
oo->load_error = IMLIB_LOAD_ERROR_NONE;
|
||||
|
||||
if (file)
|
||||
{
|
||||
char *tmp_name, *name, *dot;
|
||||
|
||||
oo->current.file = malloc(strlen(file) + 1);
|
||||
strcpy(oo->current.file, file);
|
||||
|
||||
name = strrchr(oo->current.file, '/');
|
||||
if (!name) name = oo->current.file;
|
||||
else name++;
|
||||
|
||||
tmp_name = malloc(strlen(name) + 1);
|
||||
strcpy(tmp_name, name);
|
||||
dot = strchr(tmp_name, '.');
|
||||
if (dot) *dot = '\0';
|
||||
evas_object_set_name(e, o, tmp_name);
|
||||
if (dot) *dot = '.';
|
||||
free(tmp_name);
|
||||
|
||||
{
|
||||
Imlib_Image im;
|
||||
|
||||
im = imlib_load_image_with_error_return(file, &(oo->load_error));
|
||||
if (im)
|
||||
{
|
||||
imlib_context_set_image(im);
|
||||
oo->current.image.w = imlib_image_get_width();
|
||||
oo->current.image.h = imlib_image_get_height();
|
||||
oo->current.alpha = imlib_image_has_alpha();
|
||||
imlib_free_image();
|
||||
}
|
||||
else
|
||||
{
|
||||
oo->current.alpha = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
oo->current.fill.x = 0;
|
||||
oo->current.fill.y = 0;
|
||||
oo->current.fill.w = (double)oo->current.image.w;
|
||||
oo->current.fill.h = (double)oo->current.image.h;
|
||||
oo->current.color.r = 255;
|
||||
oo->current.color.g = 255;
|
||||
oo->current.color.b = 255;
|
||||
oo->current.color.a = 255;
|
||||
o->current.x = 0;
|
||||
o->current.y = 0;
|
||||
o->current.w = (double)oo->current.image.w;
|
||||
o->current.h = (double)oo->current.image.h;
|
||||
|
||||
for (l = e->layers; l; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
if (layer->layer == o->current.layer)
|
||||
{
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
return o;
|
||||
}
|
||||
if (layer->layer > o->current.layer)
|
||||
{
|
||||
Evas_Layer layer_new;
|
||||
|
||||
layer_new = malloc(sizeof(struct _Evas_Layer));
|
||||
memset(layer_new, 0, sizeof(struct _Evas_Layer));
|
||||
e->layers = evas_list_prepend_relative(e->layers, layer_new, layer);
|
||||
layer_new->objects = evas_list_append(layer_new->objects, o);
|
||||
layer_new->layer = o->current.layer;
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
layer = malloc(sizeof(struct _Evas_Layer));
|
||||
memset(layer, 0, sizeof(struct _Evas_Layer));
|
||||
e->layers = evas_list_append(e->layers, layer);
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_add_image_from_data(Evas e, void *data, Evas_Image_Format format, int w, int h)
|
||||
{
|
||||
Evas_Object_Image oo;
|
||||
Evas_Object_Any o;
|
||||
Evas_List l;
|
||||
Evas_Layer layer;
|
||||
|
||||
if (!e) return NULL;
|
||||
o = oo = malloc(sizeof(struct _Evas_Object_Image));
|
||||
memset(o, 0, sizeof(struct _Evas_Object_Image));
|
||||
o->type = OBJECT_IMAGE;
|
||||
o->object_free = _evas_free_image;
|
||||
o->object_renderer_data_free = _evas_free_image_renderer_data;
|
||||
|
||||
oo->load_error = IMLIB_LOAD_ERROR_NONE;
|
||||
|
||||
if (data)
|
||||
{
|
||||
oo->current.file = _evas_generate_filename();
|
||||
{
|
||||
Imlib_Image im;
|
||||
|
||||
im = imlib_create_image(w,h);
|
||||
if (im)
|
||||
{
|
||||
DATA32 *p;
|
||||
unsigned char *p1, *p2;
|
||||
int i, j, k;
|
||||
|
||||
imlib_context_set_image(im);
|
||||
if((format==IMAGE_FORMAT_ARGB)||(format==IMAGE_FORMAT_ARGB))
|
||||
imlib_image_set_has_alpha(1);
|
||||
imlib_image_clear();
|
||||
p = imlib_image_get_data();
|
||||
p2 = (unsigned char*)p;
|
||||
p1 = (unsigned char*)data;
|
||||
|
||||
if(format==IMAGE_FORMAT_ARGB)memcpy(p, data, w*h*4);
|
||||
|
||||
for(i=0; i<w*h;i++){
|
||||
switch(format){
|
||||
case IMAGE_FORMAT_BGRA:
|
||||
j = i*4;
|
||||
p2[j+3]=p1[j];
|
||||
p2[j+2]=p1[j+1];
|
||||
p2[j+1]=p1[j+2];
|
||||
p2[j]=p1[j+3];
|
||||
break;
|
||||
case IMAGE_FORMAT_ARGB: break;
|
||||
case IMAGE_FORMAT_RGB:
|
||||
j = i*4;
|
||||
k = i*3;
|
||||
p2[j+3] = 255;
|
||||
p2[j+2] = p1[k+2];
|
||||
p2[j+1] = p1[k+1];
|
||||
p2[j] = p1[k];
|
||||
break;
|
||||
case IMAGE_FORMAT_GRAY:
|
||||
j = i*4;
|
||||
p2[j+3] = 255;
|
||||
p2[j+2] = p1[i];
|
||||
p2[j+1] = p1[i];
|
||||
p2[j] = p1[i];
|
||||
break;
|
||||
default:;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
imlib_image_put_back_data(p);
|
||||
_evas_add_fileless_image(im,oo->current.file);
|
||||
|
||||
oo->current.image.w = imlib_image_get_width();
|
||||
oo->current.image.h = imlib_image_get_height();
|
||||
oo->current.alpha = imlib_image_has_alpha();
|
||||
imlib_free_image();
|
||||
}
|
||||
else
|
||||
{
|
||||
oo->current.alpha = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
oo->current.fill.x = 0;
|
||||
oo->current.fill.y = 0;
|
||||
oo->current.fill.w = (double)oo->current.image.w;
|
||||
oo->current.fill.h = (double)oo->current.image.h;
|
||||
oo->current.color.r = 255;
|
||||
oo->current.color.g = 255;
|
||||
oo->current.color.b = 255;
|
||||
oo->current.color.a = 255;
|
||||
o->current.x = 0;
|
||||
o->current.y = 0;
|
||||
o->current.w = (double)oo->current.image.w;
|
||||
o->current.h = (double)oo->current.image.h;
|
||||
|
||||
for (l = e->layers; l; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
if (layer->layer == o->current.layer)
|
||||
{
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
return o;
|
||||
}
|
||||
if (layer->layer > o->current.layer)
|
||||
{
|
||||
Evas_Layer layer_new;
|
||||
|
||||
layer_new = malloc(sizeof(struct _Evas_Layer));
|
||||
memset(layer_new, 0, sizeof(struct _Evas_Layer));
|
||||
e->layers = evas_list_prepend_relative(e->layers, layer_new, layer);
|
||||
layer_new->objects = evas_list_append(layer_new->objects, o);
|
||||
layer_new->layer = o->current.layer;
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
layer = malloc(sizeof(struct _Evas_Layer));
|
||||
memset(layer, 0, sizeof(struct _Evas_Layer));
|
||||
e->layers = evas_list_append(e->layers, layer);
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
/* set object settings */
|
||||
void
|
||||
evas_set_image_file(Evas e, Evas_Object o, const char *file)
|
||||
{
|
||||
Evas_Object_Image oo;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
IF_OBJ(o, OBJECT_IMAGE) return;
|
||||
oo = o;
|
||||
if (((oo->current.file) && (file) && (strcmp(file, oo->current.file))) ||
|
||||
((!oo->current.file) && (file)) ||
|
||||
(oo->current.image.w == 0) ||
|
||||
(oo->current.image.h == 0)
|
||||
)
|
||||
{
|
||||
char *tmp_name, *name, *dot;
|
||||
|
||||
_evas_free_image_renderer_data(e, o);
|
||||
if (oo->current.file)
|
||||
free(oo->current.file);
|
||||
oo->previous.file = NULL;
|
||||
oo->current.file = malloc(strlen(file) + 1);
|
||||
strcpy(oo->current.file, file);
|
||||
|
||||
name = strrchr(oo->current.file, '/');
|
||||
if (!name) name = oo->current.file;
|
||||
else name++;
|
||||
|
||||
tmp_name = malloc(strlen(name) + 1);
|
||||
strcpy(tmp_name, name);
|
||||
dot = strchr(tmp_name, '.');
|
||||
if (dot) *dot = '\0';
|
||||
evas_object_set_name(e, o, tmp_name);
|
||||
if (dot) *dot = '.';
|
||||
free(tmp_name);
|
||||
|
||||
{
|
||||
Imlib_Image im;
|
||||
|
||||
im = imlib_load_image_with_error_return(file, &oo->load_error);
|
||||
if (im)
|
||||
{
|
||||
imlib_context_set_image(im);
|
||||
oo->current.image.w = imlib_image_get_width();
|
||||
oo->current.image.h = imlib_image_get_height();
|
||||
oo->current.alpha = imlib_image_has_alpha();
|
||||
imlib_free_image();
|
||||
evas_resize(e, o,
|
||||
(double)oo->current.image.w,
|
||||
(double)oo->current.image.h);
|
||||
oo->current.fill.x = 0;
|
||||
oo->current.fill.y = 0;
|
||||
oo->current.fill.w = (double)oo->current.image.w;
|
||||
oo->current.fill.h = (double)oo->current.image.h;
|
||||
}
|
||||
else
|
||||
{
|
||||
oo->current.image.w = 0;
|
||||
oo->current.image.h = 0;
|
||||
evas_resize(e, o,
|
||||
(double)oo->current.image.w,
|
||||
(double)oo->current.image.h);
|
||||
oo->current.fill.x = 0;
|
||||
oo->current.fill.y = 0;
|
||||
oo->current.fill.w = (double)oo->current.image.w;
|
||||
oo->current.fill.h = (double)oo->current.image.h;
|
||||
oo->current.alpha = 1;
|
||||
}
|
||||
}
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
}
|
||||
else if (!file)
|
||||
{
|
||||
if (oo->current.file)
|
||||
free(oo->current.file);
|
||||
oo->previous.file = NULL;
|
||||
oo->current.file = NULL;
|
||||
oo->current.image.w = 0;
|
||||
oo->current.image.h = 0;
|
||||
oo->current.alpha = 1;
|
||||
evas_resize(e, o,
|
||||
(double)oo->current.image.w,
|
||||
(double)oo->current.image.h);
|
||||
oo->current.fill.x = 0;
|
||||
oo->current.fill.y = 0;
|
||||
oo->current.fill.w = (double)oo->current.image.w;
|
||||
oo->current.fill.h = (double)oo->current.image.h;
|
||||
oo->load_error = IMLIB_LOAD_ERROR_NONE;
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_image_data(Evas e, Evas_Object o, void *data, Evas_Image_Format format, int w, int h)
|
||||
{
|
||||
Evas_Object_Image oo;
|
||||
|
||||
if (!e) return;
|
||||
if (!o) return;
|
||||
IF_OBJ(o, OBJECT_IMAGE) return;
|
||||
oo = o;
|
||||
if (data)
|
||||
{
|
||||
_evas_free_image_renderer_data(e, o);
|
||||
if (oo->current.file) _evas_remove_fileless_image(oo->current.file);
|
||||
if (oo->current.file) free(oo->current.file);
|
||||
|
||||
oo->previous.file = NULL;
|
||||
oo->current.file = _evas_generate_filename();
|
||||
{
|
||||
Imlib_Image im;
|
||||
|
||||
im = imlib_create_image(w,h);
|
||||
if (im)
|
||||
{
|
||||
DATA32 *p;
|
||||
unsigned char *p1, *p2;
|
||||
int i, j, k;
|
||||
|
||||
imlib_context_set_image(im);
|
||||
|
||||
if((format==IMAGE_FORMAT_ARGB)||(format==IMAGE_FORMAT_ARGB))
|
||||
imlib_image_set_has_alpha(1);
|
||||
imlib_image_clear();
|
||||
p = imlib_image_get_data();
|
||||
p2 = (unsigned char*)p;
|
||||
p1 = (unsigned char*)data;
|
||||
|
||||
if(format==IMAGE_FORMAT_ARGB)memcpy(p, data, w*h*4);
|
||||
|
||||
for(i=0; i<w*h;i++){
|
||||
switch(format){
|
||||
case IMAGE_FORMAT_BGRA:
|
||||
j = i*4;
|
||||
p2[j+3]=p1[j];
|
||||
p2[j+2]=p1[j+1];
|
||||
p2[j+1]=p1[j+2];
|
||||
p2[j]=p1[j+3];
|
||||
break;
|
||||
case IMAGE_FORMAT_ARGB: break;
|
||||
case IMAGE_FORMAT_RGB:
|
||||
j = i*4;
|
||||
k = i*3;
|
||||
p2[j+3] = 255;
|
||||
p2[j+2] = p1[k+2];
|
||||
p2[j+1] = p1[k+1];
|
||||
p2[j] = p1[k];
|
||||
break;
|
||||
case IMAGE_FORMAT_GRAY:
|
||||
j = i*4;
|
||||
p2[j+3] = 255;
|
||||
p2[j+2] = p1[i];
|
||||
p2[j+1] = p1[i];
|
||||
p2[j] = p1[i];
|
||||
break;
|
||||
default:;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
imlib_image_put_back_data(p);
|
||||
_evas_add_fileless_image(im,oo->current.file);
|
||||
|
||||
|
||||
oo->current.image.w = imlib_image_get_width();
|
||||
oo->current.image.h = imlib_image_get_height();
|
||||
oo->current.alpha = imlib_image_has_alpha();
|
||||
imlib_free_image();
|
||||
evas_resize(e, o,
|
||||
(double)oo->current.image.w,
|
||||
(double)oo->current.image.h);
|
||||
oo->current.fill.x = 0;
|
||||
oo->current.fill.y = 0;
|
||||
oo->current.fill.w = (double)oo->current.image.w;
|
||||
oo->current.fill.h = (double)oo->current.image.h;
|
||||
}
|
||||
else
|
||||
{
|
||||
oo->current.image.w = 0;
|
||||
oo->current.image.h = 0;
|
||||
evas_resize(e, o,
|
||||
(double)oo->current.image.w,
|
||||
(double)oo->current.image.h);
|
||||
oo->current.fill.x = 0;
|
||||
oo->current.fill.y = 0;
|
||||
oo->current.fill.w = (double)oo->current.image.w;
|
||||
oo->current.fill.h = (double)oo->current.image.h;
|
||||
oo->current.alpha = 1;
|
||||
}
|
||||
}
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
}
|
||||
else if (!data)
|
||||
{
|
||||
if (oo->current.file)
|
||||
free(oo->current.file);
|
||||
oo->previous.file = NULL;
|
||||
oo->current.file = NULL;
|
||||
oo->current.image.w = 0;
|
||||
oo->current.image.h = 0;
|
||||
oo->current.alpha = 1;
|
||||
evas_resize(e, o,
|
||||
(double)oo->current.image.w,
|
||||
(double)oo->current.image.h);
|
||||
oo->current.fill.x = 0;
|
||||
oo->current.fill.y = 0;
|
||||
oo->current.fill.w = (double)oo->current.image.w;
|
||||
oo->current.fill.h = (double)oo->current.image.h;
|
||||
oo->load_error = IMLIB_LOAD_ERROR_NONE;
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_image_fill(Evas e, Evas_Object o, double x, double y, double w, double h)
|
||||
{
|
||||
Evas_Object_Image oo;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
IF_OBJ(o, OBJECT_IMAGE) return;
|
||||
oo = o;
|
||||
oo->current.fill.x = x;
|
||||
oo->current.fill.y = y;
|
||||
oo->current.fill.w = w;
|
||||
oo->current.fill.h = h;
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
}
|
||||
|
||||
/* image query ops */
|
||||
int
|
||||
evas_get_image_alpha(Evas e, Evas_Object o)
|
||||
{
|
||||
Evas_Object_Image oo;
|
||||
|
||||
if (!e) return 0;
|
||||
if (!o) return 0;
|
||||
IF_OBJ(o, OBJECT_IMAGE) return 0;
|
||||
oo = o;
|
||||
return oo->current.alpha;
|
||||
}
|
||||
|
||||
void
|
||||
evas_get_image_size(Evas e, Evas_Object o, int *w, int *h)
|
||||
{
|
||||
Evas_Object_Image oo;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
IF_OBJ(o, OBJECT_IMAGE) return;
|
||||
oo = o;
|
||||
if (w) *w = oo->current.image.w;
|
||||
if (h) *h = oo->current.image.h;
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_image_border(Evas e, Evas_Object o, int l, int r, int t, int b)
|
||||
{
|
||||
Evas_Object_Image oo;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
IF_OBJ(o, OBJECT_IMAGE) return;
|
||||
oo = o;
|
||||
if (l < 0) l = 0;
|
||||
if (r < 0) r = 0;
|
||||
if (t < 0) t = 0;
|
||||
if (b < 0) b = 0;
|
||||
oo->current.border.l = l;
|
||||
oo->current.border.r = r;
|
||||
oo->current.border.t = t;
|
||||
oo->current.border.b = b;
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
}
|
||||
|
||||
void
|
||||
evas_get_image_border(Evas e, Evas_Object o, int *l, int *r, int *t, int *b)
|
||||
{
|
||||
Evas_Object_Image oo;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
IF_OBJ(o, OBJECT_IMAGE) return;
|
||||
oo = o;
|
||||
if (l) *l = oo->current.border.l;
|
||||
if (r) *r = oo->current.border.r;
|
||||
if (t) *t = oo->current.border.t;
|
||||
if (b) *b = oo->current.border.b;
|
||||
}
|
||||
|
||||
Imlib_Load_Error
|
||||
evas_get_image_load_error(Evas e, Evas_Object o)
|
||||
{
|
||||
Evas_Object_Image oo;
|
||||
|
||||
if (!e) return IMLIB_LOAD_ERROR_NONE;
|
||||
if (!o) return IMLIB_LOAD_ERROR_NONE;
|
||||
IF_OBJ(o, OBJECT_IMAGE) return IMLIB_LOAD_ERROR_NONE;
|
||||
oo = o;
|
||||
|
||||
return oo->load_error;
|
||||
}
|
|
@ -1,132 +0,0 @@
|
|||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include <Imlib2.h>
|
||||
|
||||
#ifndef SPANS_COMMON
|
||||
# define SPANS_COMMON(x1, w1, x2, w2) \
|
||||
(!((((x2) + (w2)) <= (x1)) || ((x2) >= ((x1) + (w1)))))
|
||||
#define RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) \
|
||||
((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh))))
|
||||
#endif
|
||||
|
||||
typedef void Evas_Image_Image;
|
||||
typedef void Evas_Image_Font;
|
||||
|
||||
typedef struct _evas_image_drawable Evas_Image_Drawable;
|
||||
typedef struct _evas_image_update Evas_Image_Update;
|
||||
typedef struct _evas_image_color Evas_Image_Color;
|
||||
typedef struct _evas_image_gradient Evas_Image_Graident;
|
||||
|
||||
struct _evas_image_drawable
|
||||
{
|
||||
Imlib_Image im;
|
||||
Evas_List tmp_images;
|
||||
};
|
||||
|
||||
struct _evas_image_update
|
||||
{
|
||||
Imlib_Image image;
|
||||
int x, y, w, h;
|
||||
};
|
||||
|
||||
struct _evas_image_color
|
||||
{
|
||||
int r, g, b, a;
|
||||
int dist;
|
||||
};
|
||||
|
||||
struct _evas_image_gradient
|
||||
{
|
||||
Evas_List colors;
|
||||
};
|
||||
|
||||
/***************/
|
||||
/* image stuff */
|
||||
/***************/
|
||||
Evas_Image_Image *__evas_image_image_new_from_file(Display *disp, char *file);
|
||||
void __evas_image_image_free(Evas_Image_Image *im);
|
||||
void __evas_image_image_cache_empty(Display *disp);
|
||||
void __evas_image_image_cache_set_size(Display *disp, int size);
|
||||
int __evas_image_image_cache_get_size(Display *disp);
|
||||
int __evas_image_image_get_width(Evas_Image_Image *im);
|
||||
int __evas_image_image_get_height(Evas_Image_Image *im);
|
||||
void __evas_image_image_set_borders(Evas_Image_Image *im, int left, int right, int top, int bottom);
|
||||
void __evas_image_image_set_smooth_scaling(int on);
|
||||
void __evas_image_image_draw(Evas_Image_Image *im, Display *disp, Imlib_Image dstim, Window w, int win_w, int win_h, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int cr, int cg, int cb, int ca);
|
||||
|
||||
/********/
|
||||
/* text */
|
||||
/********/
|
||||
Evas_Image_Font *__evas_image_text_font_new(Display *disp, char *font, int size);
|
||||
void __evas_image_text_font_free(Evas_Image_Font *fn);
|
||||
int __evas_image_text_font_get_ascent(Evas_Image_Font *fn);
|
||||
int __evas_image_text_font_get_descent(Evas_Image_Font *fn);
|
||||
int __evas_image_text_font_get_max_ascent(Evas_Image_Font *fn);
|
||||
int __evas_image_text_font_get_max_descent(Evas_Image_Font *fn);
|
||||
void __evas_image_text_font_get_advances(Evas_Image_Font *fn, char *text, int *advance_horiz, int *advance_vert);
|
||||
int __evas_image_text_font_get_first_inset(Evas_Image_Font *fn, char *text);
|
||||
void __evas_image_text_font_add_path(char *path);
|
||||
void __evas_image_text_font_del_path(char *path);
|
||||
char **__evas_image_text_font_list_paths(int *count);
|
||||
void __evas_image_text_cache_empty(Display *disp);
|
||||
void __evas_image_text_cache_set_size(Display *disp, int size);
|
||||
int __evas_image_text_cache_get_size(Display *disp);
|
||||
void __evas_image_text_get_size(Evas_Image_Font *fn, char *text, int *w, int *h);
|
||||
int __evas_image_text_get_character_at_pos(Evas_Image_Font *fn, char *text, int x, int y, int *cx, int *cy, int *cw, int *ch);
|
||||
void __evas_image_text_get_character_number(Evas_Image_Font *fn, char *text, int num, int *cx, int *cy, int *cw, int *ch);
|
||||
void __evas_image_text_draw(Evas_Image_Font *fn, Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, char *text, int r, int g, int b, int a);
|
||||
|
||||
/**************/
|
||||
/* rectangles */
|
||||
/**************/
|
||||
|
||||
void __evas_image_rectangle_draw(Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, int w, int h, int r, int g, int b, int a);
|
||||
|
||||
/*********/
|
||||
/* lines */
|
||||
/*********/
|
||||
|
||||
void __evas_image_line_draw(Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x1, int y1, int x2, int y2, int r, int g, int b, int a);
|
||||
|
||||
/*************/
|
||||
/* gradients */
|
||||
/*************/
|
||||
Evas_Image_Graident *__evas_image_gradient_new(Display *disp);
|
||||
void __evas_image_gradient_free(Evas_Image_Graident *gr);
|
||||
void __evas_image_gradient_color_add(Evas_Image_Graident *gr, int r, int g, int b, int a, int dist);
|
||||
void __evas_image_gradient_draw(Evas_Image_Graident *gr, Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, int w, int h, double angle);
|
||||
|
||||
/************/
|
||||
/* polygons */
|
||||
/************/
|
||||
void __evas_image_poly_draw (Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, Evas_List points, int r, int g, int b, int a);
|
||||
|
||||
/***********/
|
||||
/* drawing */
|
||||
/***********/
|
||||
void __evas_image_set_clip_rect(int on, int x, int y, int w, int h, int r, int g, int b, int a);
|
||||
void __evas_image_init(Display *disp, int screen, int colors);
|
||||
void __evas_image_set_vis_cmap(Visual *vis, Colormap cmap);
|
||||
int __evas_image_capable(Display *disp);
|
||||
void __evas_image_flush_draw(Display *disp, Imlib_Image dstim, Window win);
|
||||
void __evas_image_sync(Display *disp);
|
||||
Visual *__evas_image_get_visual(Display *disp, int screen);
|
||||
XVisualInfo *__evas_image_get_visual_info(Display *disp, int screen);
|
||||
Colormap __evas_image_get_colormap(Display *disp, int screen);
|
||||
void __evas_image_draw_add_rect(Display *disp, Imlib_Image dstim, Window win, int x, int y, int w, int h);
|
||||
|
|
@ -1,146 +0,0 @@
|
|||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include <Imlib2.h>
|
||||
|
||||
#ifndef SPANS_COMMON
|
||||
# define SPANS_COMMON(x1, w1, x2, w2) \
|
||||
(!((((x2) + (w2)) <= (x1)) || ((x2) >= ((x1) + (w1)))))
|
||||
#define RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) \
|
||||
((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh))))
|
||||
#endif
|
||||
|
||||
typedef void Evas_Imlib_Font;
|
||||
|
||||
typedef struct _evas_imlib_image Evas_Imlib_Image;
|
||||
typedef struct _evas_imlib_drawable Evas_Imlib_Drawable;
|
||||
typedef struct _evas_imlib_update Evas_Imlib_Update;
|
||||
typedef struct _evas_imlib_color Evas_Imlib_Color;
|
||||
typedef struct _evas_imlib_gradient Evas_Imlib_Graident;
|
||||
|
||||
struct _evas_imlib_image
|
||||
{
|
||||
char *file;
|
||||
Imlib_Image image;
|
||||
struct {
|
||||
int aa;
|
||||
int w, h;
|
||||
Imlib_Image image;
|
||||
int usage;
|
||||
} scaled;
|
||||
int references;
|
||||
};
|
||||
|
||||
struct _evas_imlib_drawable
|
||||
{
|
||||
Display *disp;
|
||||
Window win;
|
||||
Evas_List tmp_images;
|
||||
};
|
||||
|
||||
struct _evas_imlib_update
|
||||
{
|
||||
Imlib_Image image;
|
||||
int x, y, w, h;
|
||||
};
|
||||
|
||||
struct _evas_imlib_color
|
||||
{
|
||||
int r, g, b, a;
|
||||
int dist;
|
||||
};
|
||||
|
||||
struct _evas_imlib_gradient
|
||||
{
|
||||
Evas_List colors;
|
||||
};
|
||||
|
||||
/***************/
|
||||
/* image stuff */
|
||||
/***************/
|
||||
Evas_Imlib_Image *__evas_imlib_image_new_from_file(Display *disp, char *file);
|
||||
void __evas_imlib_image_free(Evas_Imlib_Image *im);
|
||||
void __evas_imlib_image_cache_empty(Display *disp);
|
||||
void __evas_imlib_image_cache_set_size(Display *disp, int size);
|
||||
int __evas_imlib_image_cache_get_size(Display *disp);
|
||||
int __evas_imlib_image_get_width(Evas_Imlib_Image *im);
|
||||
int __evas_imlib_image_get_height(Evas_Imlib_Image *im);
|
||||
void __evas_imlib_image_set_borders(Evas_Imlib_Image *im, int left, int right, int top, int bottom);
|
||||
void __evas_imlib_image_set_smooth_scaling(int on);
|
||||
void __evas_imlib_image_draw(Evas_Imlib_Image *im, Display *disp, Imlib_Image dstim, Window w, int win_w, int win_h, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int cr, int cg, int cb, int ca);
|
||||
|
||||
/********/
|
||||
/* text */
|
||||
/********/
|
||||
Evas_Imlib_Font *__evas_imlib_text_font_new(Display *disp, char *font, int size);
|
||||
void __evas_imlib_text_font_free(Evas_Imlib_Font *fn);
|
||||
int __evas_imlib_text_font_get_ascent(Evas_Imlib_Font *fn);
|
||||
int __evas_imlib_text_font_get_descent(Evas_Imlib_Font *fn);
|
||||
int __evas_imlib_text_font_get_max_ascent(Evas_Imlib_Font *fn);
|
||||
int __evas_imlib_text_font_get_max_descent(Evas_Imlib_Font *fn);
|
||||
void __evas_imlib_text_font_get_advances(Evas_Imlib_Font *fn, char *text, int *advance_horiz, int *advance_vert);
|
||||
int __evas_imlib_text_font_get_first_inset(Evas_Imlib_Font *fn, char *text);
|
||||
void __evas_imlib_text_font_add_path(char *path);
|
||||
void __evas_imlib_text_font_del_path(char *path);
|
||||
char **__evas_imlib_text_font_list_paths(int *count);
|
||||
void __evas_imlib_text_cache_empty(Display *disp);
|
||||
void __evas_imlib_text_cache_set_size(Display *disp, int size);
|
||||
int __evas_imlib_text_cache_get_size(Display *disp);
|
||||
void __evas_imlib_text_get_size(Evas_Imlib_Font *fn, char *text, int *w, int *h);
|
||||
int __evas_imlib_text_get_character_at_pos(Evas_Imlib_Font *fn, char *text, int x, int y, int *cx, int *cy, int *cw, int *ch);
|
||||
void __evas_imlib_text_get_character_number(Evas_Imlib_Font *fn, char *text, int num, int *cx, int *cy, int *cw, int *ch);
|
||||
void __evas_imlib_text_draw(Evas_Imlib_Font *fn, Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, char *text, int r, int g, int b, int a);
|
||||
|
||||
/**************/
|
||||
/* rectangles */
|
||||
/**************/
|
||||
|
||||
void __evas_imlib_rectangle_draw(Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, int w, int h, int r, int g, int b, int a);
|
||||
|
||||
/*********/
|
||||
/* lines */
|
||||
/*********/
|
||||
|
||||
void __evas_imlib_line_draw(Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x1, int y1, int x2, int y2, int r, int g, int b, int a);
|
||||
|
||||
/*************/
|
||||
/* gradients */
|
||||
/*************/
|
||||
Evas_Imlib_Graident *__evas_imlib_gradient_new(Display *disp);
|
||||
void __evas_imlib_gradient_free(Evas_Imlib_Graident *gr);
|
||||
void __evas_imlib_gradient_color_add(Evas_Imlib_Graident *gr, int r, int g, int b, int a, int dist);
|
||||
void __evas_imlib_gradient_draw(Evas_Imlib_Graident *gr, Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, int w, int h, double angle);
|
||||
|
||||
/************/
|
||||
/* polygons */
|
||||
/************/
|
||||
void __evas_imlib_poly_draw (Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, Evas_List points, int r, int g, int b, int a);
|
||||
|
||||
/***********/
|
||||
/* drawing */
|
||||
/***********/
|
||||
void __evas_imlib_set_clip_rect(int on, int x, int y, int w, int h, int r, int g, int b, int a);
|
||||
void __evas_imlib_init(Display *disp, int screen, int colors);
|
||||
void __evas_imlib_set_vis_cmap(Visual *vis, Colormap cmap);
|
||||
int __evas_imlib_capable(Display *disp);
|
||||
void __evas_imlib_flush_draw(Display *disp, Imlib_Image dstim, Window win);
|
||||
void __evas_imlib_sync(Display *disp);
|
||||
Visual *__evas_imlib_get_visual(Display *disp, int screen);
|
||||
XVisualInfo *__evas_imlib_get_visual_info(Display *disp, int screen);
|
||||
Colormap __evas_imlib_get_colormap(Display *disp, int screen);
|
||||
void __evas_imlib_draw_add_rect(Display *disp, Imlib_Image dstim, Window win, int x, int y, int w, int h);
|
||||
|
|
@ -1,136 +0,0 @@
|
|||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
static void
|
||||
_evas_free_line(Evas_Object o)
|
||||
{
|
||||
Evas_Object_Line oo;
|
||||
|
||||
IF_OBJ(o, OBJECT_LINE) return;
|
||||
oo = o;
|
||||
free(o);
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_free_line_renderer_data(Evas e, Evas_Object o)
|
||||
{
|
||||
switch (e->current.render_method)
|
||||
{
|
||||
case RENDER_METHOD_ALPHA_SOFTWARE:
|
||||
break;
|
||||
case RENDER_METHOD_BASIC_HARDWARE:
|
||||
break;
|
||||
case RENDER_METHOD_3D_HARDWARE:
|
||||
break;
|
||||
case RENDER_METHOD_ALPHA_HARDWARE:
|
||||
break;
|
||||
case RENDER_METHOD_IMAGE:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_add_line(Evas e)
|
||||
{
|
||||
Evas_Object_Line oo;
|
||||
Evas_Object_Any o;
|
||||
Evas_List l;
|
||||
Evas_Layer layer;
|
||||
|
||||
if (!e) return NULL;
|
||||
o = oo = malloc(sizeof(struct _Evas_Object_Line));
|
||||
memset(o, 0, sizeof(struct _Evas_Object_Line));
|
||||
o->type = OBJECT_LINE;
|
||||
o->object_free = _evas_free_line;
|
||||
o->object_renderer_data_free = _evas_free_line_renderer_data;
|
||||
|
||||
oo->current.x1 = 0;
|
||||
oo->current.y1 = 0;
|
||||
oo->current.x2 = 0;
|
||||
oo->current.y2 = 0;
|
||||
|
||||
o->current.x = 0;
|
||||
o->current.y = 0;
|
||||
o->current.w = 1;
|
||||
o->current.h = 1;
|
||||
|
||||
for (l = e->layers; l; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
if (layer->layer == o->current.layer)
|
||||
{
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
return o;
|
||||
}
|
||||
if (layer->layer > o->current.layer)
|
||||
{
|
||||
Evas_Layer layer_new;
|
||||
|
||||
layer_new = malloc(sizeof(struct _Evas_Layer));
|
||||
memset(layer_new, 0, sizeof(struct _Evas_Layer));
|
||||
e->layers = evas_list_prepend_relative(e->layers, layer_new, layer);
|
||||
layer_new->objects = evas_list_append(layer_new->objects, o);
|
||||
layer_new->layer = o->current.layer;
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
layer = malloc(sizeof(struct _Evas_Layer));
|
||||
memset(layer, 0, sizeof(struct _Evas_Layer));
|
||||
e->layers = evas_list_append(e->layers, layer);
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_line_xy(Evas e, Evas_Object o, double x1, double y1, double x2, double y2)
|
||||
{
|
||||
Evas_Object_Line oo;
|
||||
int event_update = 0;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
IF_OBJ(o, OBJECT_LINE) return;
|
||||
oo = (Evas_Object_Line)o;
|
||||
if ((o->current.visible) &&
|
||||
(_evas_point_in_object(e, o, e->mouse.x, e->mouse.y)))
|
||||
event_update = 1;
|
||||
oo->current.x1 = x1;
|
||||
oo->current.y1 = y1;
|
||||
oo->current.x2 = x2;
|
||||
oo->current.y2 = y2;
|
||||
if (x1 < x2)
|
||||
{
|
||||
o->current.x = x1;
|
||||
o->current.w = (x2 - x1) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
o->current.x = x2;
|
||||
o->current.w = (x1 - x2) + 1;
|
||||
}
|
||||
if (y1 < y2)
|
||||
{
|
||||
o->current.y = y1;
|
||||
o->current.h = (y2 - y1) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
o->current.y = y2;
|
||||
o->current.h = (y1 - y2) + 1;
|
||||
}
|
||||
if ((o->current.visible) &&
|
||||
((_evas_point_in_object(e, o, e->mouse.x, e->mouse.y)) ||
|
||||
(event_update)))
|
||||
evas_event_move(e, e->mouse.x, e->mouse.y);
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
}
|
|
@ -1,222 +0,0 @@
|
|||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
/* list ops */
|
||||
Evas_List
|
||||
evas_list_append(Evas_List list, void *data)
|
||||
{
|
||||
Evas_List l, new_l;
|
||||
|
||||
new_l = malloc(sizeof(struct _Evas_List));
|
||||
new_l->next = NULL;
|
||||
new_l->prev = NULL;
|
||||
new_l->data = data;
|
||||
if (!list)
|
||||
{
|
||||
new_l->last = new_l;
|
||||
return new_l;
|
||||
}
|
||||
if (list->last)
|
||||
{
|
||||
l = list->last;
|
||||
l->next = new_l;
|
||||
new_l->prev = l;
|
||||
list->last = new_l;
|
||||
return list;
|
||||
}
|
||||
else
|
||||
|
||||
{
|
||||
for (l = list; l; l = l->next)
|
||||
{
|
||||
if (!l->next)
|
||||
{
|
||||
l->next = new_l;
|
||||
new_l->prev = l;
|
||||
list->last = new_l;
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
Evas_List
|
||||
evas_list_prepend(Evas_List list, void *data)
|
||||
{
|
||||
Evas_List new_l;
|
||||
|
||||
new_l = malloc(sizeof(struct _Evas_List));
|
||||
new_l->next = NULL;
|
||||
new_l->prev = NULL;
|
||||
new_l->data = data;
|
||||
if (!list)
|
||||
{
|
||||
new_l->last = new_l;
|
||||
return new_l;
|
||||
}
|
||||
new_l->next = list;
|
||||
list->prev = new_l;
|
||||
new_l->last = list->last;
|
||||
list->last = NULL;
|
||||
return new_l;
|
||||
}
|
||||
|
||||
Evas_List
|
||||
evas_list_append_relative(Evas_List list, void *data, void *relative)
|
||||
{
|
||||
Evas_List l;
|
||||
|
||||
for (l = list; l; l = l->next)
|
||||
{
|
||||
if (l->data == relative)
|
||||
{
|
||||
Evas_List new_l;
|
||||
|
||||
new_l = malloc(sizeof(struct _Evas_List));
|
||||
new_l->next = NULL;
|
||||
new_l->prev = NULL;
|
||||
new_l->data = data;
|
||||
if (l->next)
|
||||
{
|
||||
new_l->next = l->next;
|
||||
l->next->prev = new_l;
|
||||
}
|
||||
l->next = new_l;
|
||||
new_l->prev = l;
|
||||
if (!new_l->next)
|
||||
list->last = new_l;
|
||||
return list;
|
||||
}
|
||||
}
|
||||
return evas_list_append(list, data);
|
||||
}
|
||||
|
||||
Evas_List
|
||||
evas_list_prepend_relative(Evas_List list, void *data, void *relative)
|
||||
{
|
||||
Evas_List l;
|
||||
|
||||
for (l = list; l; l = l->next)
|
||||
{
|
||||
if (l->data == relative)
|
||||
{
|
||||
Evas_List new_l;
|
||||
|
||||
new_l = malloc(sizeof(struct _Evas_List));
|
||||
new_l->next = NULL;
|
||||
new_l->prev = NULL;
|
||||
new_l->data = data;
|
||||
new_l->prev = l->prev;
|
||||
new_l->next = l;
|
||||
if (l->prev)
|
||||
l->prev->next = new_l;
|
||||
l->prev = new_l;
|
||||
if (new_l->prev)
|
||||
{
|
||||
if (!new_l->next)
|
||||
list->last = new_l;
|
||||
return list;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!new_l->next)
|
||||
new_l->last = new_l;
|
||||
else
|
||||
{
|
||||
new_l->last = list->last;
|
||||
list->last = NULL;
|
||||
}
|
||||
return new_l;
|
||||
}
|
||||
}
|
||||
}
|
||||
return evas_list_prepend(list, data);
|
||||
}
|
||||
|
||||
Evas_List
|
||||
evas_list_remove(Evas_List list, void *data)
|
||||
{
|
||||
Evas_List l, return_l;
|
||||
|
||||
for (l = list; l; l = l->next)
|
||||
{
|
||||
if (l->data == data)
|
||||
{
|
||||
if (l->next)
|
||||
l->next->prev = l->prev;
|
||||
if (l->prev)
|
||||
{
|
||||
l->prev->next = l->next;
|
||||
return_l = list;
|
||||
}
|
||||
else
|
||||
{
|
||||
return_l = l->next;
|
||||
if (return_l)
|
||||
return_l->last = list->last;
|
||||
}
|
||||
if (l == list->last)
|
||||
list->last = l->prev;
|
||||
free(l);
|
||||
return return_l;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
Evas_List
|
||||
evas_list_remove_list(Evas_List list, Evas_List remove_list)
|
||||
{
|
||||
Evas_List return_l;
|
||||
|
||||
if (!remove_list) return list;
|
||||
if (remove_list->next)
|
||||
remove_list->next->prev = remove_list->prev;
|
||||
if (remove_list->prev)
|
||||
{
|
||||
remove_list->prev->next = remove_list->next;
|
||||
return_l = list;
|
||||
}
|
||||
else
|
||||
{
|
||||
return_l = remove_list->next;
|
||||
if (return_l)
|
||||
return_l->last = list->last;
|
||||
}
|
||||
if (remove_list == list->last)
|
||||
list->last = remove_list->prev;
|
||||
free(remove_list);
|
||||
return return_l;
|
||||
}
|
||||
|
||||
void *
|
||||
evas_list_find(Evas_List list, void *data)
|
||||
{
|
||||
Evas_List l;
|
||||
|
||||
for (l = list; l; l = l->next)
|
||||
{
|
||||
if (l->data == data) return data;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Evas_List
|
||||
evas_list_free(Evas_List list)
|
||||
{
|
||||
Evas_List l, free_l;
|
||||
|
||||
for (l = list; l;)
|
||||
{
|
||||
free_l = l;
|
||||
l = l->next;
|
||||
free(free_l);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -1,654 +0,0 @@
|
|||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include "evas_gl_routines.h"
|
||||
#include "evas_imlib_routines.h"
|
||||
#include "evas_image_routines.h"
|
||||
#include "evas_x11_routines.h"
|
||||
#include "evas_render_routines.h"
|
||||
|
||||
void _evas_layer_free(Evas e, Evas_Layer layer);
|
||||
|
||||
Evas
|
||||
evas_new_all(Display *display, Window parent_window,
|
||||
int x, int y, int w, int h,
|
||||
Evas_Render_Method render_method,
|
||||
int colors, int font_cache, int image_cache,
|
||||
char *font_dir)
|
||||
{
|
||||
Evas e;
|
||||
Window window;
|
||||
XSetWindowAttributes att;
|
||||
Visual *visual;
|
||||
Colormap colormap;
|
||||
|
||||
e = evas_new();
|
||||
evas_set_output_method(e, render_method);
|
||||
evas_set_output_colors(e, colors);
|
||||
visual = evas_get_optimal_visual(e, display);
|
||||
colormap = evas_get_optimal_colormap(e, display);
|
||||
att.background_pixmap = None;
|
||||
att.colormap = colormap;
|
||||
att.border_pixel = 0;
|
||||
att.event_mask = 0;
|
||||
window = XCreateWindow(display,
|
||||
parent_window,
|
||||
x, y, w, h, 0,
|
||||
imlib_get_visual_depth(display, visual),
|
||||
InputOutput,
|
||||
visual,
|
||||
CWColormap | CWBorderPixel | CWEventMask | CWBackPixmap,
|
||||
&att);
|
||||
e->current.created_window = window;
|
||||
if (font_dir) evas_font_add_path(e, font_dir);
|
||||
evas_set_output(e, display, window, visual, colormap);
|
||||
evas_set_output_size(e, w, h);
|
||||
evas_set_output_viewport(e, 0, 0, w, h);
|
||||
evas_set_font_cache(e, font_cache);
|
||||
evas_set_image_cache(e, image_cache);
|
||||
evas_event_leave(e);
|
||||
return e;
|
||||
}
|
||||
|
||||
Window
|
||||
evas_get_window(Evas e)
|
||||
{
|
||||
if (!e) return 0;
|
||||
return e->current.drawable;
|
||||
}
|
||||
|
||||
Display *
|
||||
evas_get_display(Evas e)
|
||||
{
|
||||
if (!e) return NULL;
|
||||
return e->current.display;
|
||||
}
|
||||
|
||||
Visual *
|
||||
evas_get_visual(Evas e)
|
||||
{
|
||||
if (!e) return NULL;
|
||||
return e->current.visual;
|
||||
}
|
||||
|
||||
Colormap
|
||||
evas_get_colormap(Evas e)
|
||||
{
|
||||
if (!e) return 0;
|
||||
return e->current.colormap;
|
||||
}
|
||||
|
||||
int
|
||||
evas_get_colors(Evas e)
|
||||
{
|
||||
if (!e) return 0;
|
||||
return e->current.colors;
|
||||
}
|
||||
|
||||
Imlib_Image
|
||||
evas_get_image(Evas e)
|
||||
{
|
||||
if (!e) return NULL;
|
||||
return e->current.image;
|
||||
}
|
||||
|
||||
Evas_Render_Method
|
||||
evas_get_output_method(Evas e)
|
||||
{
|
||||
if (!e) return RENDER_METHOD_ALPHA_SOFTWARE;
|
||||
return e->current.render_method;
|
||||
}
|
||||
|
||||
Evas
|
||||
evas_new(void)
|
||||
{
|
||||
Evas e;
|
||||
|
||||
e = malloc(sizeof(struct _Evas));
|
||||
memset(e, 0, sizeof(struct _Evas));
|
||||
e->current.viewport.x = 0.0;
|
||||
e->current.viewport.y = 0.0;
|
||||
e->current.viewport.w = 1.0;
|
||||
e->current.viewport.h = 1.0;
|
||||
e->previous.viewport.x = 0.0;
|
||||
e->previous.viewport.y = 0.0;
|
||||
e->previous.viewport.w = 1.0;
|
||||
e->previous.viewport.h = 1.0;
|
||||
e->current.drawable_width = 1;
|
||||
e->current.drawable_height = 1;
|
||||
e->previous.drawable_width = 1;
|
||||
e->previous.drawable_height = 1;
|
||||
e->current.render_method = RENDER_METHOD_ALPHA_SOFTWARE;
|
||||
e->current.colors = 216;
|
||||
e->current.val_cache.mult_x = (double)e->current.drawable_width / e->current.viewport.w;
|
||||
e->current.val_cache.mult_y = (double)e->current.drawable_height / e->current.viewport.h;
|
||||
return e;
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_x_err(Display *display, XErrorEvent *ev)
|
||||
{
|
||||
display = NULL;
|
||||
ev = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
evas_free(Evas e)
|
||||
{
|
||||
Evas_List l;
|
||||
|
||||
if (!e) return;
|
||||
if ((e->current.display) &&
|
||||
(e->current.created_window))
|
||||
{
|
||||
XErrorHandler prev_handler;
|
||||
|
||||
prev_handler = XSetErrorHandler((XErrorHandler)_evas_x_err);
|
||||
XDestroyWindow(e->current.display, e->current.created_window);
|
||||
XSync(e->current.display, False);
|
||||
XSetErrorHandler(prev_handler);
|
||||
}
|
||||
for (l = e->layers; l; l = l->next)
|
||||
{
|
||||
Evas_Layer layer;
|
||||
|
||||
layer = l->data;
|
||||
_evas_layer_free(e, layer);
|
||||
}
|
||||
if (e->layers) evas_list_free(e->layers);
|
||||
if (e->updates) imlib_updates_free(e->updates);
|
||||
if (e->obscures) imlib_updates_free(e->obscures);
|
||||
free(e);
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_color(Evas e, Evas_Object o, int r, int g, int b, int a)
|
||||
{
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
if (r < 0) r = 0;
|
||||
else if (r > 255) r = 255;
|
||||
if (g < 0) g = 0;
|
||||
else if (g > 255) g = 255;
|
||||
if (b < 0) b = 0;
|
||||
else if (b > 255) b = 255;
|
||||
if (a < 0) a = 0;
|
||||
else if (a > 255) a = 255;
|
||||
switch (o->type)
|
||||
{
|
||||
case OBJECT_IMAGE:
|
||||
{
|
||||
Evas_Object_Image oo;
|
||||
|
||||
oo = (Evas_Object_Image)o;
|
||||
oo->current.color.r = r;
|
||||
oo->current.color.g = g;
|
||||
oo->current.color.b = b;
|
||||
oo->current.color.a = a;
|
||||
}
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
break;
|
||||
case OBJECT_TEXT:
|
||||
{
|
||||
Evas_Object_Text oo;
|
||||
|
||||
oo = (Evas_Object_Text)o;
|
||||
oo->current.r = r;
|
||||
oo->current.g = g;
|
||||
oo->current.b = b;
|
||||
oo->current.a = a;
|
||||
}
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
break;
|
||||
case OBJECT_RECTANGLE:
|
||||
{
|
||||
Evas_Object_Rectangle oo;
|
||||
|
||||
oo = (Evas_Object_Rectangle)o;
|
||||
oo->current.r = r;
|
||||
oo->current.g = g;
|
||||
oo->current.b = b;
|
||||
oo->current.a = a;
|
||||
}
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
break;
|
||||
case OBJECT_LINE:
|
||||
{
|
||||
Evas_Object_Line oo;
|
||||
|
||||
oo = (Evas_Object_Line)o;
|
||||
oo->current.r = r;
|
||||
oo->current.g = g;
|
||||
oo->current.b = b;
|
||||
oo->current.a = a;
|
||||
}
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
break;
|
||||
case OBJECT_POLYGON:
|
||||
{
|
||||
Evas_Object_Poly oo;
|
||||
|
||||
oo = (Evas_Object_Poly)o;
|
||||
oo->current.r = r;
|
||||
oo->current.g = g;
|
||||
oo->current.b = b;
|
||||
oo->current.a = a;
|
||||
}
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
evas_get_color(Evas e, Evas_Object o, int *r, int *g, int *b, int *a)
|
||||
{
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
switch (o->type)
|
||||
{
|
||||
case OBJECT_IMAGE:
|
||||
{
|
||||
Evas_Object_Image oo;
|
||||
|
||||
oo = (Evas_Object_Image)o;
|
||||
if (r) *r = oo->current.color.r;
|
||||
if (g) *g = oo->current.color.g;
|
||||
if (b) *b = oo->current.color.b;
|
||||
if (a) *a = oo->current.color.a;
|
||||
}
|
||||
break;
|
||||
case OBJECT_TEXT:
|
||||
{
|
||||
Evas_Object_Text oo;
|
||||
|
||||
oo = (Evas_Object_Text)o;
|
||||
if (r) *r = oo->current.r;
|
||||
if (g) *g = oo->current.g;
|
||||
if (b) *b = oo->current.b;
|
||||
if (a) *a = oo->current.a;
|
||||
}
|
||||
break;
|
||||
case OBJECT_RECTANGLE:
|
||||
{
|
||||
Evas_Object_Rectangle oo;
|
||||
|
||||
oo = (Evas_Object_Rectangle)o;
|
||||
if (r) *r = oo->current.r;
|
||||
if (g) *g = oo->current.g;
|
||||
if (b) *b = oo->current.b;
|
||||
if (a) *a = oo->current.a;
|
||||
}
|
||||
break;
|
||||
case OBJECT_LINE:
|
||||
{
|
||||
Evas_Object_Line oo;
|
||||
|
||||
oo = (Evas_Object_Line)o;
|
||||
if (r) *r = oo->current.r;
|
||||
if (g) *g = oo->current.g;
|
||||
if (b) *b = oo->current.b;
|
||||
if (a) *a = oo->current.a;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_zoom_scale(Evas e, Evas_Object o, int scale)
|
||||
{
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
o->current.zoomscale = scale;
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_pass_events(Evas e, Evas_Object o, int pass_events)
|
||||
{
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
o->pass_events = 1;
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_font_cache(Evas e, int size)
|
||||
{
|
||||
if (!e) return;
|
||||
switch (e->current.render_method)
|
||||
{
|
||||
case RENDER_METHOD_ALPHA_SOFTWARE:
|
||||
__evas_imlib_text_cache_set_size(e->current.display, size);
|
||||
break;
|
||||
case RENDER_METHOD_BASIC_HARDWARE:
|
||||
__evas_x11_text_cache_set_size(e->current.display, size);
|
||||
break;
|
||||
case RENDER_METHOD_3D_HARDWARE:
|
||||
__evas_gl_text_cache_set_size(e->current.display, size);
|
||||
break;
|
||||
case RENDER_METHOD_ALPHA_HARDWARE:
|
||||
__evas_render_text_cache_set_size(e->current.display, size);
|
||||
break;
|
||||
case RENDER_METHOD_IMAGE:
|
||||
__evas_image_text_cache_set_size(e->current.display, size);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
evas_get_font_cache(Evas e)
|
||||
{
|
||||
if (!e) return 0;
|
||||
switch (e->current.render_method)
|
||||
{
|
||||
case RENDER_METHOD_ALPHA_SOFTWARE:
|
||||
return __evas_imlib_text_cache_get_size(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_BASIC_HARDWARE:
|
||||
return __evas_x11_text_cache_get_size(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_3D_HARDWARE:
|
||||
return __evas_gl_text_cache_get_size(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_ALPHA_HARDWARE:
|
||||
return __evas_render_text_cache_get_size(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_IMAGE:
|
||||
return __evas_image_text_cache_get_size(e->current.display);
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
evas_flush_font_cache(Evas e)
|
||||
{
|
||||
if (!e) return;
|
||||
switch (e->current.render_method)
|
||||
{
|
||||
case RENDER_METHOD_ALPHA_SOFTWARE:
|
||||
__evas_imlib_text_cache_empty(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_BASIC_HARDWARE:
|
||||
__evas_x11_text_cache_empty(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_3D_HARDWARE:
|
||||
__evas_gl_text_cache_empty(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_ALPHA_HARDWARE:
|
||||
__evas_render_text_cache_empty(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_IMAGE:
|
||||
__evas_image_text_cache_empty(e->current.display);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_image_cache(Evas e, int size)
|
||||
{
|
||||
if (!e) return;
|
||||
switch (e->current.render_method)
|
||||
{
|
||||
case RENDER_METHOD_ALPHA_SOFTWARE:
|
||||
__evas_imlib_image_cache_set_size(e->current.display, size);
|
||||
break;
|
||||
case RENDER_METHOD_BASIC_HARDWARE:
|
||||
__evas_x11_image_cache_set_size(e->current.display, size);
|
||||
break;
|
||||
case RENDER_METHOD_3D_HARDWARE:
|
||||
__evas_gl_image_cache_set_size(e->current.display, size);
|
||||
break;
|
||||
case RENDER_METHOD_ALPHA_HARDWARE:
|
||||
__evas_render_image_cache_set_size(e->current.display, size);
|
||||
break;
|
||||
case RENDER_METHOD_IMAGE:
|
||||
__evas_image_image_cache_set_size(e->current.display, size);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
evas_get_image_cache(Evas e)
|
||||
{
|
||||
if (!e) return 0;
|
||||
switch (e->current.render_method)
|
||||
{
|
||||
case RENDER_METHOD_ALPHA_SOFTWARE:
|
||||
return __evas_imlib_image_cache_get_size(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_BASIC_HARDWARE:
|
||||
return __evas_x11_image_cache_get_size(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_3D_HARDWARE:
|
||||
return __evas_gl_image_cache_get_size(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_ALPHA_HARDWARE:
|
||||
return __evas_render_image_cache_get_size(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_IMAGE:
|
||||
return __evas_image_image_cache_get_size(e->current.display);
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
evas_flush_image_cache(Evas e)
|
||||
{
|
||||
if (!e) return;
|
||||
switch (e->current.render_method)
|
||||
{
|
||||
case RENDER_METHOD_ALPHA_SOFTWARE:
|
||||
__evas_imlib_image_cache_empty(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_BASIC_HARDWARE:
|
||||
__evas_x11_image_cache_empty(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_3D_HARDWARE:
|
||||
__evas_gl_image_cache_empty(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_ALPHA_HARDWARE:
|
||||
__evas_render_image_cache_empty(e->current.display);
|
||||
break;
|
||||
case RENDER_METHOD_IMAGE:
|
||||
__evas_image_image_cache_empty(e->current.display);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
evas_font_add_path(Evas e, char *path)
|
||||
{
|
||||
if (!e) return;
|
||||
if (!path) return;
|
||||
evas_font_del_path(e, path);
|
||||
switch (e->current.render_method)
|
||||
{
|
||||
case RENDER_METHOD_ALPHA_SOFTWARE:
|
||||
__evas_imlib_text_font_add_path(path);
|
||||
break;
|
||||
case RENDER_METHOD_BASIC_HARDWARE:
|
||||
__evas_x11_text_font_add_path(path);
|
||||
break;
|
||||
case RENDER_METHOD_3D_HARDWARE:
|
||||
__evas_gl_text_font_add_path(path);
|
||||
break;
|
||||
case RENDER_METHOD_ALPHA_HARDWARE:
|
||||
__evas_render_text_font_add_path(path);
|
||||
break;
|
||||
case RENDER_METHOD_IMAGE:
|
||||
__evas_image_text_font_add_path(path);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
evas_font_del_path(Evas e, char *path)
|
||||
{
|
||||
if (!e) return;
|
||||
if (!path) return;
|
||||
switch (e->current.render_method)
|
||||
{
|
||||
case RENDER_METHOD_ALPHA_SOFTWARE:
|
||||
__evas_imlib_text_font_del_path(path);
|
||||
break;
|
||||
case RENDER_METHOD_BASIC_HARDWARE:
|
||||
__evas_x11_text_font_del_path(path);
|
||||
break;
|
||||
case RENDER_METHOD_3D_HARDWARE:
|
||||
__evas_gl_text_font_del_path(path);
|
||||
break;
|
||||
case RENDER_METHOD_ALPHA_HARDWARE:
|
||||
__evas_render_text_font_del_path(path);
|
||||
break;
|
||||
case RENDER_METHOD_IMAGE:
|
||||
__evas_image_text_font_del_path(path);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
evas_put_data(Evas e, Evas_Object o, char *key, void *data)
|
||||
{
|
||||
Evas_Data d;
|
||||
Evas_List l;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
if (!key) return;
|
||||
for (l = o->data; l; l = l->next)
|
||||
{
|
||||
Evas_Data d;
|
||||
|
||||
d = l->data;
|
||||
if (!strcmp(d->key, key))
|
||||
{
|
||||
d->data = data;
|
||||
return;
|
||||
}
|
||||
}
|
||||
d = malloc(sizeof(struct _Evas_Data));
|
||||
d->key = malloc(strlen(key) + 1);
|
||||
strcpy(d->key, key);
|
||||
d->data = data;
|
||||
o->data = evas_list_prepend(o->data, d);
|
||||
}
|
||||
|
||||
void *
|
||||
evas_get_data(Evas e, Evas_Object o, char *key)
|
||||
{
|
||||
Evas_List l;
|
||||
|
||||
if (!e) return NULL;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return NULL;
|
||||
if (!key) return NULL;
|
||||
for (l = o->data; l; l = l->next)
|
||||
{
|
||||
Evas_Data d;
|
||||
|
||||
d = l->data;
|
||||
if (!strcmp(d->key, key)) return d->data;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void *
|
||||
evas_remove_data(Evas e, Evas_Object o, char *key)
|
||||
{
|
||||
Evas_List l;
|
||||
|
||||
if (!e) return NULL;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return NULL;
|
||||
if (!key) return NULL;
|
||||
for (l = o->data; l; l = l->next)
|
||||
{
|
||||
Evas_Data d;
|
||||
|
||||
d = l->data;
|
||||
if (!strcmp(d->key, key))
|
||||
{
|
||||
void *data;
|
||||
|
||||
o->data = evas_list_remove(o->data, l->data);
|
||||
data = d->data;
|
||||
free(d->key);
|
||||
free(d);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int
|
||||
evas_world_x_to_screen(Evas e, double x)
|
||||
{
|
||||
if (!e) return 0;
|
||||
return (int)((x - e->current.viewport.x) * e->current.val_cache.mult_x);
|
||||
}
|
||||
|
||||
int
|
||||
evas_world_y_to_screen(Evas e, double y)
|
||||
{
|
||||
if (!e) return 0;
|
||||
return (int)((y - e->current.viewport.y) * e->current.val_cache.mult_y);
|
||||
}
|
||||
|
||||
double
|
||||
evas_screen_x_to_world(Evas e, int x)
|
||||
{
|
||||
if (!e) return 0;
|
||||
return (double)((double)x / e->current.val_cache.mult_x)
|
||||
+ e->current.viewport.x;
|
||||
}
|
||||
|
||||
double
|
||||
evas_screen_y_to_world(Evas e, int y)
|
||||
{
|
||||
if (!e) return 0;
|
||||
return (double)((double)y / e->current.val_cache.mult_y)
|
||||
+ e->current.viewport.y;
|
||||
}
|
|
@ -1,699 +0,0 @@
|
|||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#define SPANS_COMMON(x1, w1, x2, w2) \
|
||||
(!((((x2) + (w2)) <= (x1)) || ((x2) >= ((x1) + (w1)))))
|
||||
#define RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) \
|
||||
((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh))))
|
||||
|
||||
Evas_Layer
|
||||
_evas_get_object_layer(Evas e, Evas_Object o)
|
||||
{
|
||||
Evas_List l;
|
||||
|
||||
for (l = e->layers; l; l = l->next)
|
||||
{
|
||||
Evas_Layer layer;
|
||||
|
||||
layer = l->data;
|
||||
if (layer->layer == o->current.layer) return layer;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
_evas_remove_data(Evas e, Evas_Object o)
|
||||
{
|
||||
Evas_List l;
|
||||
|
||||
if (o->data)
|
||||
{
|
||||
for (l = o->data; l; l = l->next)
|
||||
{
|
||||
Evas_Data d;
|
||||
|
||||
d = l->data;
|
||||
if (d->key)
|
||||
free(d->key);
|
||||
free(d);
|
||||
}
|
||||
evas_list_free(o->data);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_evas_remove_callbacks(Evas e, Evas_Object o)
|
||||
{
|
||||
Evas_List l;
|
||||
|
||||
if (o->callbacks)
|
||||
{
|
||||
for (l = o->callbacks; l; l = l->next)
|
||||
{
|
||||
Evas_Callback cb;
|
||||
|
||||
cb = l->data;
|
||||
free(cb);
|
||||
}
|
||||
evas_list_free(o->callbacks);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_evas_real_del_object(Evas e, Evas_Object o)
|
||||
{
|
||||
Evas_List l;
|
||||
|
||||
for (l = e->layers; l; l = l->next)
|
||||
{
|
||||
Evas_Layer layer;
|
||||
|
||||
layer = l->data;
|
||||
if (layer->layer == o->current.layer)
|
||||
{
|
||||
layer->objects = evas_list_remove(layer->objects, o);
|
||||
_evas_callback_call(e, o, CALLBACK_FREE, 0, 0, 0);
|
||||
if (e->mouse.object == o) e->mouse.object = NULL;
|
||||
if (e->mouse.button_object == o) e->mouse.button_object = NULL;
|
||||
_evas_remove_callbacks(e, o);
|
||||
_evas_remove_data(e, o);
|
||||
if (o->name) free(o->name);
|
||||
o->object_renderer_data_free(e, o);
|
||||
o->object_free(o);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_evas_layer_free(Evas e, Evas_Layer layer)
|
||||
{
|
||||
if (layer->objects)
|
||||
{
|
||||
Evas_List l;
|
||||
|
||||
for (l = layer->objects; l; l = l->next)
|
||||
{
|
||||
Evas_Object o;
|
||||
|
||||
o = l->data;
|
||||
_evas_callback_call(e, o, CALLBACK_FREE, 0, 0, 0);
|
||||
_evas_cleanup_clip(e, o);
|
||||
if (e->mouse.object == o) e->mouse.object = NULL;
|
||||
if (e->mouse.button_object == o) e->mouse.button_object = NULL;
|
||||
_evas_remove_callbacks(e, o);
|
||||
_evas_remove_data(e, o);
|
||||
o->object_renderer_data_free(e, o);
|
||||
o->object_free(o);
|
||||
}
|
||||
evas_list_free(layer->objects);
|
||||
}
|
||||
free(layer);
|
||||
}
|
||||
|
||||
void
|
||||
_evas_cleanup_clip(Evas e, Evas_Object o)
|
||||
{
|
||||
if (o->clip.list)
|
||||
{
|
||||
Evas_List l;
|
||||
|
||||
for (l = o->clip.list; l; l = l->next)
|
||||
{
|
||||
Evas_Object o2;
|
||||
|
||||
o2 = l->data;
|
||||
o2->clip.object = NULL;
|
||||
o2->clip.changed = 1;
|
||||
o2->changed = 1;
|
||||
e->changed = 1;
|
||||
}
|
||||
evas_list_free(o->clip.list);
|
||||
o->clip.list = NULL;
|
||||
}
|
||||
if (o->clip.object)
|
||||
o->clip.object->clip.list = evas_list_remove(o->clip.object->clip.list, o);
|
||||
}
|
||||
|
||||
int
|
||||
_evas_point_in_object(Evas e, Evas_Object o, int x, int y)
|
||||
{
|
||||
double cx, cy;
|
||||
double ox, oy, ow, oh;
|
||||
|
||||
if (o->delete_me) return 0;
|
||||
cx = evas_screen_x_to_world(e, x);
|
||||
cy = evas_screen_x_to_world(e, y);
|
||||
ox = o->current.x; oy = o->current.y;
|
||||
ow = o->current.w; oh = o->current.h;
|
||||
_evas_get_current_clipped_geometry(e, o, &ox, &oy, &ow, &oh);
|
||||
if ((cx >= ox) && (cx < (ox + ow)) && (cy >= oy) && (cy < (oy + oh)))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_clip(Evas e, Evas_Object o, Evas_Object clip)
|
||||
{
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
if (!clip) return;
|
||||
|
||||
if (o->clip.object == clip) return;
|
||||
e->changed = 1;
|
||||
o->changed = 1;
|
||||
o->clip.changed = 1;
|
||||
if (o->clip.object)
|
||||
o->clip.object->clip.list = evas_list_remove(o->clip.object->clip.list, o);
|
||||
o->clip.object = clip;
|
||||
clip->clip.list = evas_list_prepend(clip->clip.list, o);
|
||||
}
|
||||
|
||||
void
|
||||
evas_unset_clip(Evas e, Evas_Object o)
|
||||
{
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
|
||||
if (o->clip.object)
|
||||
{
|
||||
e->changed = 1;
|
||||
o->changed = 1;
|
||||
o->clip.changed = 1;
|
||||
o->clip.object->clip.list = evas_list_remove(o->clip.object->clip.list, o);
|
||||
o->clip.object = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_get_clip_object(Evas e, Evas_Object o)
|
||||
{
|
||||
if (!e) return NULL;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return NULL;
|
||||
|
||||
return o->clip.object;
|
||||
}
|
||||
|
||||
Evas_List
|
||||
evas_get_clip_list(Evas e, Evas_Object o)
|
||||
{
|
||||
if (!e) return NULL;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return NULL;
|
||||
|
||||
return o->clip.list;
|
||||
}
|
||||
|
||||
/* deleting objects */
|
||||
void
|
||||
evas_del_object(Evas e, Evas_Object o)
|
||||
{
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
_evas_cleanup_clip(e, o);
|
||||
e->changed = 1;
|
||||
evas_hide(e, o);
|
||||
o->delete_me = 1;
|
||||
}
|
||||
|
||||
/* layer stacking for object */
|
||||
void
|
||||
evas_set_layer(Evas e, Evas_Object o, int layer_num)
|
||||
{
|
||||
Evas_Layer layer;
|
||||
Evas_List l;
|
||||
int removed;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
if (layer_num == o->current.layer) return;
|
||||
removed = 0;
|
||||
for (l = e->layers; l; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
if (layer->layer == o->current.layer)
|
||||
{
|
||||
layer->objects = evas_list_remove(layer->objects, o);
|
||||
removed = 1;
|
||||
if (!layer->objects)
|
||||
{
|
||||
e->layers = evas_list_remove(e->layers, layer);
|
||||
_evas_layer_free(e, layer);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!removed) return;
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
o->current.layer = layer_num;
|
||||
|
||||
for (l = e->layers; l; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
if (layer->layer == o->current.layer)
|
||||
{
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
if ((o->current.visible) &&
|
||||
(_evas_point_in_object(e, o, e->mouse.x, e->mouse.y)))
|
||||
evas_event_move(e, e->mouse.x, e->mouse.y);
|
||||
return;
|
||||
}
|
||||
if (layer->layer > o->current.layer)
|
||||
{
|
||||
Evas_Layer layer_new;
|
||||
|
||||
layer_new = malloc(sizeof(struct _Evas_Layer));
|
||||
memset(layer_new, 0, sizeof(struct _Evas_Layer));
|
||||
e->layers = evas_list_prepend_relative(e->layers, layer_new, layer);
|
||||
layer_new->objects = evas_list_append(layer_new->objects, o);
|
||||
layer_new->layer = o->current.layer;
|
||||
if ((o->current.visible) &&
|
||||
(_evas_point_in_object(e, o, e->mouse.x, e->mouse.y)))
|
||||
evas_event_move(e, e->mouse.x, e->mouse.y);
|
||||
return;
|
||||
}
|
||||
}
|
||||
layer = malloc(sizeof(struct _Evas_Layer));
|
||||
memset(layer, 0, sizeof(struct _Evas_Layer));
|
||||
e->layers = evas_list_append(e->layers, layer);
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
layer->layer = o->current.layer;
|
||||
if ((o->current.visible) &&
|
||||
(_evas_point_in_object(e, o, e->mouse.x, e->mouse.y)))
|
||||
evas_event_move(e, e->mouse.x, e->mouse.y);
|
||||
}
|
||||
|
||||
int
|
||||
evas_get_layer(Evas e, Evas_Object o)
|
||||
{
|
||||
Evas_Layer layer;
|
||||
Evas_List l;
|
||||
int removed;
|
||||
|
||||
if (!e) return 0;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return 0;
|
||||
return o->current.layer;
|
||||
}
|
||||
|
||||
void
|
||||
evas_set_layer_store(Evas e, int l, int store)
|
||||
{
|
||||
if (!e) return;
|
||||
/* FIXME: find layer and set store flag */
|
||||
/* e->changed = 1; */
|
||||
}
|
||||
|
||||
Evas_List
|
||||
evas_objects_in_rect(Evas e, double x, double y, double w, double h)
|
||||
{
|
||||
Evas_List l, ll, objs;
|
||||
Evas_Layer layer;
|
||||
|
||||
if (!e) return NULL;
|
||||
if (w < 0) w = 0;
|
||||
if (h < 0) h = 0;
|
||||
objs = NULL;
|
||||
for (l = e->layers; l ; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
|
||||
for (ll = layer->objects; ll; ll = ll->next)
|
||||
{
|
||||
Evas_Object ob;
|
||||
|
||||
ob = ll->data;
|
||||
if ((ob->current.visible) && (!ob->pass_events) && (!ob->delete_me) && (!ob->clip.list))
|
||||
{
|
||||
double ox, oy, ow, oh;
|
||||
|
||||
ox = ob->current.x; oy = ob->current.y;
|
||||
ow = ob->current.w; oh = ob->current.h;
|
||||
_evas_get_current_clipped_geometry(e, ob, &ox, &oy, &ow, &oh);
|
||||
if (RECTS_INTERSECT(x, y, w, h, ox, oy, ow, oh))
|
||||
objs = evas_list_prepend(objs, ll->data);
|
||||
}
|
||||
}
|
||||
}
|
||||
return objs;
|
||||
}
|
||||
|
||||
Evas_List
|
||||
evas_objects_at_position(Evas e, double x, double y)
|
||||
{
|
||||
Evas_List l, ll, objs;
|
||||
Evas_Layer layer;
|
||||
|
||||
if (!e) return NULL;
|
||||
objs = NULL;
|
||||
for (l = e->layers; l ; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
|
||||
for (ll = layer->objects; ll; ll = ll->next)
|
||||
{
|
||||
Evas_Object ob;
|
||||
|
||||
ob = ll->data;
|
||||
if ((ob->current.visible) && (!ob->pass_events) && (!ob->delete_me) && (!ob->clip.list))
|
||||
{
|
||||
double ox, oy, ow, oh;
|
||||
|
||||
ox = ob->current.x; oy = ob->current.y;
|
||||
ow = ob->current.w; oh = ob->current.h;
|
||||
_evas_get_current_clipped_geometry(e, ob, &ox, &oy, &ow, &oh);
|
||||
if (RECTS_INTERSECT(x, y, 1, 1, ox, oy, ow, oh))
|
||||
objs = evas_list_prepend(objs, ll->data);
|
||||
}
|
||||
}
|
||||
}
|
||||
return objs;
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_object_in_rect(Evas e, double x, double y, double w, double h)
|
||||
{
|
||||
Evas_List l, ll;
|
||||
Evas_Layer layer;
|
||||
Evas_Object o;
|
||||
|
||||
if (!e) return NULL;
|
||||
o = NULL;
|
||||
for (l = e->layers; l ; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
|
||||
for (ll = layer->objects; ll; ll = ll->next)
|
||||
{
|
||||
Evas_Object ob;
|
||||
|
||||
ob = ll->data;
|
||||
if ((ob->current.visible) && (!ob->pass_events) && (!ob->delete_me) && (!ob->clip.list))
|
||||
{
|
||||
double ox, oy, ow, oh;
|
||||
|
||||
ox = ob->current.x; oy = ob->current.y;
|
||||
ow = ob->current.w; oh = ob->current.h;
|
||||
_evas_get_current_clipped_geometry(e, ob, &ox, &oy, &ow, &oh);
|
||||
if (RECTS_INTERSECT(x, y, w, h, ox, oy, ow, oh))
|
||||
o = ob;
|
||||
}
|
||||
}
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_object_at_position(Evas e, double x, double y)
|
||||
{
|
||||
Evas_List l, ll;
|
||||
Evas_Layer layer;
|
||||
Evas_Object o;
|
||||
|
||||
if (!e) return NULL;
|
||||
o = NULL;
|
||||
for (l = e->layers; l ; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
|
||||
for (ll = layer->objects; ll; ll = ll->next)
|
||||
{
|
||||
Evas_Object ob;
|
||||
|
||||
ob = ll->data;
|
||||
if ((ob->current.visible) && (!ob->pass_events) && (!ob->delete_me) && (!ob->clip.list))
|
||||
{
|
||||
double ox, oy, ow, oh;
|
||||
|
||||
ox = ob->current.x; oy = ob->current.y;
|
||||
ow = ob->current.w; oh = ob->current.h;
|
||||
_evas_get_current_clipped_geometry(e, ob, &ox, &oy, &ow, &oh);
|
||||
if (RECTS_INTERSECT(x, y, 1.0, 1.0, ox, oy, ow, oh))
|
||||
o = ob;
|
||||
}
|
||||
}
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
/* stacking within a layer */
|
||||
void
|
||||
evas_raise(Evas e, Evas_Object o)
|
||||
{
|
||||
Evas_Layer layer;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
layer = _evas_get_object_layer(e, o);
|
||||
if (layer)
|
||||
{
|
||||
o->current.stacking = 1;
|
||||
layer->objects = evas_list_remove(layer->objects, o);
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
if ((o->current.visible) &&
|
||||
(_evas_point_in_object(e, o, e->mouse.x, e->mouse.y)))
|
||||
evas_event_move(e, e->mouse.x, e->mouse.y);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
evas_lower(Evas e, Evas_Object o)
|
||||
{
|
||||
Evas_Layer layer;
|
||||
|
||||
if (!e) return;
|
||||
if (!o) return;
|
||||
layer = _evas_get_object_layer(e, o);
|
||||
if (layer)
|
||||
{
|
||||
o->current.stacking = 1;
|
||||
layer->objects = evas_list_remove(layer->objects, o);
|
||||
layer->objects = evas_list_prepend(layer->objects, o);
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
if ((o->current.visible) &&
|
||||
(_evas_point_in_object(e, o, e->mouse.x, e->mouse.y)))
|
||||
evas_event_move(e, e->mouse.x, e->mouse.y);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
evas_stack_above(Evas e, Evas_Object o, Evas_Object above)
|
||||
{
|
||||
Evas_Layer layer;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
layer = _evas_get_object_layer(e, o);
|
||||
if (layer)
|
||||
{
|
||||
o->current.stacking = 1;
|
||||
layer->objects = evas_list_remove(layer->objects, o);
|
||||
layer->objects = evas_list_append_relative(layer->objects, o, above);
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
if ((o->current.visible) &&
|
||||
(_evas_point_in_object(e, o, e->mouse.x, e->mouse.y)))
|
||||
evas_event_move(e, e->mouse.x, e->mouse.y);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
evas_stack_below(Evas e, Evas_Object o, Evas_Object below)
|
||||
{
|
||||
Evas_Layer layer;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
layer = _evas_get_object_layer(e, o);
|
||||
if (layer)
|
||||
{
|
||||
o->current.stacking = 1;
|
||||
layer->objects = evas_list_remove(layer->objects, o);
|
||||
layer->objects = evas_list_prepend_relative(layer->objects, o, below);
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
if ((o->current.visible) &&
|
||||
(_evas_point_in_object(e, o, e->mouse.x, e->mouse.y)))
|
||||
evas_event_move(e, e->mouse.x, e->mouse.y);
|
||||
}
|
||||
}
|
||||
|
||||
/* object geoemtry */
|
||||
void
|
||||
evas_move(Evas e, Evas_Object o, double x, double y)
|
||||
{
|
||||
int event_update = 0;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
if ((o->type == OBJECT_LINE)) return;
|
||||
if ((x == o->current.x) && (y == o->current.y)) return;
|
||||
if ((o->current.visible) &&
|
||||
(_evas_point_in_object(e, o, e->mouse.x, e->mouse.y)))
|
||||
event_update = 1;
|
||||
if ((o->type == OBJECT_POLYGON))
|
||||
{
|
||||
Evas_Object_Poly oo;
|
||||
Evas_List l;
|
||||
Evas_Point p;
|
||||
double dx, dy;
|
||||
|
||||
dx = x - o->current.x;
|
||||
dy = y - o->current.y;
|
||||
o->current.x = x;
|
||||
o->current.y = y;
|
||||
oo = o;
|
||||
for (l = oo->current.points; l; l = l->next)
|
||||
{
|
||||
p = l->data;
|
||||
p->x += dx;
|
||||
p->y += dy;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
o->current.x = x;
|
||||
o->current.y = y;
|
||||
}
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
if ((o->current.visible) &&
|
||||
((_evas_point_in_object(e, o, e->mouse.x, e->mouse.y)) ||
|
||||
(event_update)))
|
||||
evas_event_move(e, e->mouse.x, e->mouse.y);
|
||||
}
|
||||
|
||||
void
|
||||
evas_resize(Evas e, Evas_Object o, double w, double h)
|
||||
{
|
||||
int event_update = 0;
|
||||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
if ((o->type == OBJECT_LINE)) return;
|
||||
if ((o->type == OBJECT_TEXT)) return;
|
||||
if ((o->type == OBJECT_POLYGON)) return;
|
||||
if (w < 0) w = 0;
|
||||
if (h < 0) h = 0;
|
||||
if ((w == o->current.w) && (h == o->current.h)) return;
|
||||
if ((o->current.visible) &&
|
||||
(_evas_point_in_object(e, o, e->mouse.x, e->mouse.y)))
|
||||
event_update = 1;
|
||||
o->current.w = w;
|
||||
o->current.h = h;
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
if ((o->current.visible) &&
|
||||
((_evas_point_in_object(e, o, e->mouse.x, e->mouse.y)) ||
|
||||
(event_update)))
|
||||
evas_event_move(e, e->mouse.x, e->mouse.y);
|
||||
}
|
||||
|
||||
void
|
||||
evas_get_geometry(Evas e, Evas_Object o, double *x, double *y, double *w, double *h)
|
||||
{
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
if (x) *x = o->current.x;
|
||||
if (y) *y = o->current.y;
|
||||
if (w) *w = o->current.w;
|
||||
if (h) *h = o->current.h;
|
||||
e->changed = 1;
|
||||
}
|
||||
|
||||
/* object visibility */
|
||||
void
|
||||
evas_show(Evas e, Evas_Object o)
|
||||
{
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
o->current.visible = 1;
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
if (_evas_point_in_object(e, o, e->mouse.x, e->mouse.y))
|
||||
evas_event_move(e, e->mouse.x, e->mouse.y);
|
||||
}
|
||||
|
||||
void
|
||||
evas_hide(Evas e, Evas_Object o)
|
||||
{
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
o->current.visible = 0;
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
if (_evas_point_in_object(e, o, e->mouse.x, e->mouse.y))
|
||||
evas_event_move(e, e->mouse.x, e->mouse.y);
|
||||
if (e->mouse.object == o) e->mouse.object = NULL;
|
||||
if (e->mouse.button_object == o) e->mouse.button_object = NULL;
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_object_get_named(Evas e, char *name)
|
||||
{
|
||||
Evas_List l, ll;
|
||||
Evas_Layer layer;
|
||||
Evas_Object o;
|
||||
|
||||
if (!e) return NULL;
|
||||
if (!name) return NULL;
|
||||
for (l = e->layers; l ; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
|
||||
for (ll = layer->objects; ll; ll = ll->next)
|
||||
{
|
||||
o = ll->data;
|
||||
if (!o->delete_me)
|
||||
{
|
||||
if ((o->name) && (!strcmp(name, o->name))) return o;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
evas_object_set_name(Evas e, Evas_Object o, char *name)
|
||||
{
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
if (o->name) free(o->name);
|
||||
o->name = NULL;
|
||||
if (name)
|
||||
{
|
||||
o->name = malloc(strlen(name) + 1);
|
||||
strcpy(o->name, name);
|
||||
}
|
||||
}
|
||||
|
||||
char *
|
||||
evas_object_get_name(Evas e, Evas_Object o)
|
||||
{
|
||||
if (!e) return NULL;
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return NULL;
|
||||
return o->name;
|
||||
}
|
|
@ -1,171 +0,0 @@
|
|||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
static void
|
||||
_evas_free_poly(Evas_Object o)
|
||||
{
|
||||
Evas_Object_Poly oo;
|
||||
Evas_List l;
|
||||
Evas_Point p;
|
||||
|
||||
IF_OBJ(o, OBJECT_POLYGON) return;
|
||||
oo = o;
|
||||
for (l = oo->current.points; l; l = l->next)
|
||||
{
|
||||
p = l->data;
|
||||
free(p);
|
||||
}
|
||||
evas_list_free(oo->current.points);
|
||||
free(o);
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_free_poly_renderer_data(Evas e, Evas_Object o)
|
||||
{
|
||||
switch (e->current.render_method)
|
||||
{
|
||||
case RENDER_METHOD_ALPHA_SOFTWARE:
|
||||
break;
|
||||
case RENDER_METHOD_BASIC_HARDWARE:
|
||||
break;
|
||||
case RENDER_METHOD_3D_HARDWARE:
|
||||
break;
|
||||
case RENDER_METHOD_ALPHA_HARDWARE:
|
||||
break;
|
||||
case RENDER_METHOD_IMAGE:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* adding objects */
|
||||
Evas_Object
|
||||
evas_add_poly(Evas e)
|
||||
{
|
||||
Evas_Object_Poly oo;
|
||||
Evas_Object_Any o;
|
||||
Evas_List l;
|
||||
Evas_Layer layer;
|
||||
|
||||
if (!e) return NULL;
|
||||
o = oo = malloc(sizeof(struct _Evas_Object_Poly));
|
||||
memset(o, 0, sizeof(struct _Evas_Object_Poly));
|
||||
o->type = OBJECT_POLYGON;
|
||||
o->object_free = _evas_free_poly;
|
||||
o->object_renderer_data_free = _evas_free_poly_renderer_data;
|
||||
|
||||
o->current.x = 0;
|
||||
o->current.y = 0;
|
||||
o->current.w = 0;
|
||||
o->current.h = 0;
|
||||
|
||||
for (l = e->layers; l; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
if (layer->layer == o->current.layer)
|
||||
{
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
return o;
|
||||
}
|
||||
if (layer->layer > o->current.layer)
|
||||
{
|
||||
Evas_Layer layer_new;
|
||||
|
||||
layer_new = malloc(sizeof(struct _Evas_Layer));
|
||||
memset(layer_new, 0, sizeof(struct _Evas_Layer));
|
||||
e->layers = evas_list_prepend_relative(e->layers, layer_new, layer);
|
||||
layer_new->objects = evas_list_append(layer_new->objects, o);
|
||||
layer_new->layer = o->current.layer;
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
layer = malloc(sizeof(struct _Evas_Layer));
|
||||
memset(layer, 0, sizeof(struct _Evas_Layer));
|
||||
e->layers = evas_list_append(e->layers, layer);
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
/* modifying object */
|
||||
void
|
||||
evas_clear_points(Evas e, Evas_Object o)
|
||||
{
|
||||
Evas_Point p;
|
||||
Evas_Object_Poly oo;
|
||||
Evas_List l;
|
||||
|
||||
IF_OBJ(o, OBJECT_POLYGON) return;
|
||||
oo = o;
|
||||
if (oo->current.points)
|
||||
{
|
||||
for (l = oo->current.points; l; l = l->next)
|
||||
{
|
||||
p = l->data;
|
||||
free(p);
|
||||
}
|
||||
evas_list_free(oo->current.points);
|
||||
oo->current.points = NULL;
|
||||
o->current.w = 0;
|
||||
o->current.h = 0;
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
}
|
||||
}
|
||||
|
||||
Evas_List
|
||||
evas_get_points(Evas e, Evas_Object o)
|
||||
{
|
||||
Evas_Object_Poly oo;
|
||||
|
||||
IF_OBJ(o, OBJECT_POLYGON) return NULL;
|
||||
oo = o;
|
||||
return oo->current.points;
|
||||
}
|
||||
|
||||
void
|
||||
evas_add_point(Evas e, Evas_Object o, double x, double y)
|
||||
{
|
||||
Evas_Point p;
|
||||
Evas_Object_Poly oo;
|
||||
|
||||
o = TO_OBJECT(e, o);
|
||||
IF_OBJ(o, OBJECT_POLYGON) return;
|
||||
oo = o;
|
||||
p = malloc(sizeof(struct _Evas_Point));
|
||||
p->x = x;
|
||||
p->y = y;
|
||||
oo->previous.points = NULL;
|
||||
if (!oo->current.points)
|
||||
{
|
||||
oo->current.points = evas_list_append(oo->current.points, p);
|
||||
o->current.x = x;
|
||||
o->current.y = y;
|
||||
o->current.w = 1;
|
||||
o->current.h = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
oo->current.points = evas_list_append(oo->current.points, p);
|
||||
if (x > (o->current.x + o->current.w)) o->current.w = x - o->current.x + 1;
|
||||
else if (x < o->current.x)
|
||||
{
|
||||
o->current.w += o->current.x - x;
|
||||
o->current.x = x;
|
||||
}
|
||||
if (y > (o->current.y + o->current.h)) o->current.h = y - o->current.y + 1;
|
||||
else if (y < o->current.y)
|
||||
{
|
||||
o->current.h += o->current.y - y;
|
||||
o->current.y = y;
|
||||
}
|
||||
}
|
||||
o->changed = 1;
|
||||
e->changed = 1;
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
static void
|
||||
_evas_free_rectangle(Evas_Object o)
|
||||
{
|
||||
Evas_Object_Rectangle oo;
|
||||
|
||||
IF_OBJ(o, OBJECT_RECTANGLE) return;
|
||||
oo = o;
|
||||
free(o);
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_free_rectangle_renderer_data(Evas e, Evas_Object o)
|
||||
{
|
||||
switch (e->current.render_method)
|
||||
{
|
||||
case RENDER_METHOD_ALPHA_SOFTWARE:
|
||||
break;
|
||||
case RENDER_METHOD_BASIC_HARDWARE:
|
||||
break;
|
||||
case RENDER_METHOD_3D_HARDWARE:
|
||||
break;
|
||||
case RENDER_METHOD_ALPHA_HARDWARE:
|
||||
break;
|
||||
case RENDER_METHOD_IMAGE:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
evas_add_rectangle(Evas e)
|
||||
{
|
||||
Evas_Object_Rectangle oo;
|
||||
Evas_Object_Any o;
|
||||
Evas_List l;
|
||||
Evas_Layer layer;
|
||||
|
||||
if (!e) return NULL;
|
||||
o = oo = malloc(sizeof(struct _Evas_Object_Rectangle));
|
||||
memset(o, 0, sizeof(struct _Evas_Object_Rectangle));
|
||||
o->type = OBJECT_RECTANGLE;
|
||||
o->object_free = _evas_free_rectangle;
|
||||
o->object_renderer_data_free = _evas_free_rectangle_renderer_data;
|
||||
|
||||
o->current.x = 0;
|
||||
o->current.y = 0;
|
||||
o->current.w = 1;
|
||||
o->current.h = 1;
|
||||
|
||||
for (l = e->layers; l; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
if (layer->layer == o->current.layer)
|
||||
{
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
return o;
|
||||
}
|
||||
if (layer->layer > o->current.layer)
|
||||
{
|
||||
Evas_Layer layer_new;
|
||||
|
||||
layer_new = malloc(sizeof(struct _Evas_Layer));
|
||||
memset(layer_new, 0, sizeof(struct _Evas_Layer));
|
||||
e->layers = evas_list_prepend_relative(e->layers, layer_new, layer);
|
||||
layer_new->objects = evas_list_append(layer_new->objects, o);
|
||||
layer_new->layer = o->current.layer;
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
layer = malloc(sizeof(struct _Evas_Layer));
|
||||
memset(layer, 0, sizeof(struct _Evas_Layer));
|
||||
e->layers = evas_list_append(e->layers, layer);
|
||||
layer->objects = evas_list_append(layer->objects, o);
|
||||
|
||||
return o;
|
||||
}
|
|
@ -1,156 +0,0 @@
|
|||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/extensions/XShm.h>
|
||||
|
||||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <Imlib2.h>
|
||||
|
||||
#ifdef HAVE_RENDER
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#else
|
||||
typedef Pixmap Picture;
|
||||
#endif
|
||||
|
||||
#ifndef SPANS_COMMON
|
||||
# define SPANS_COMMON(x1, w1, x2, w2) \
|
||||
(!((((x2) + (w2)) <= (x1)) || ((x2) >= ((x1) + (w1)))))
|
||||
#define RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) \
|
||||
((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh))))
|
||||
#endif
|
||||
|
||||
typedef struct _evas_render_image Evas_Render_Image;
|
||||
typedef void Evas_Render_Font;
|
||||
typedef void Evas_Render_Graident;
|
||||
|
||||
struct _evas_render_image
|
||||
{
|
||||
char *file;
|
||||
Imlib_Image image;
|
||||
int references;
|
||||
int w, h;
|
||||
Display *disp;
|
||||
struct {
|
||||
int w, h;
|
||||
struct
|
||||
{
|
||||
int l, r, t, b;
|
||||
} border;
|
||||
int smooth;
|
||||
int pr, pg, pb, pa;
|
||||
} current;
|
||||
Picture pic;
|
||||
Pixmap pmap;
|
||||
int has_alpha;
|
||||
};
|
||||
|
||||
typedef struct _evas_render_drawable Evas_Render_Drawable;
|
||||
typedef struct _evas_render_update Evas_Render_Update;
|
||||
|
||||
struct _evas_render_drawable
|
||||
{
|
||||
Display *disp;
|
||||
Window win;
|
||||
Evas_List tmp_images;
|
||||
};
|
||||
|
||||
struct _evas_render_update
|
||||
{
|
||||
Display *disp;
|
||||
Drawable drawable;
|
||||
Picture pic;
|
||||
Pixmap pmap;
|
||||
int x, y, w, h;
|
||||
};
|
||||
|
||||
/***************/
|
||||
/* image stuff */
|
||||
/***************/
|
||||
Evas_Render_Image *__evas_render_image_new_from_file(Display *disp, char *file);
|
||||
void __evas_render_image_free(Evas_Render_Image *im);
|
||||
void __evas_render_image_cache_empty(Display *disp);
|
||||
void __evas_render_image_cache_set_size(Display *disp, int size);
|
||||
int __evas_render_image_cache_get_size(Display *disp);
|
||||
int __evas_render_image_get_width(Evas_Render_Image *im);
|
||||
int __evas_render_image_get_height(Evas_Render_Image *im);
|
||||
void __evas_render_image_set_borders(Evas_Render_Image *im, int left, int right, int top, int bottom);
|
||||
void __evas_render_image_set_smooth_scaling(int on);
|
||||
void __evas_render_image_draw(Evas_Render_Image *im, Display *disp, Imlib_Image dstim, Window w, int win_w, int win_h, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int cr, int cg, int cb, int ca);
|
||||
|
||||
/********/
|
||||
/* text */
|
||||
/********/
|
||||
Evas_Render_Font *__evas_render_text_font_new(Display *disp, char *font, int size);
|
||||
void __evas_render_text_font_free(Evas_Render_Font *fn);
|
||||
int __evas_render_text_font_get_ascent(Evas_Render_Font *fn);
|
||||
int __evas_render_text_font_get_descent(Evas_Render_Font *fn);
|
||||
int __evas_render_text_font_get_max_ascent(Evas_Render_Font *fn);
|
||||
int __evas_render_text_font_get_max_descent(Evas_Render_Font *fn);
|
||||
void __evas_render_text_font_get_advances(Evas_Render_Font *fn, char *text, int *advance_horiz, int *advance_vert);
|
||||
int __evas_render_text_font_get_first_inset(Evas_Render_Font *fn, char *text);
|
||||
void __evas_render_text_font_add_path(char *path);
|
||||
void __evas_render_text_font_del_path(char *path);
|
||||
char **__evas_render_text_font_list_paths(int *count);
|
||||
void __evas_render_text_cache_empty(Display *disp);
|
||||
void __evas_render_text_cache_set_size(Display *disp, int size);
|
||||
int __evas_render_text_cache_get_size(Display *disp);
|
||||
void __evas_render_text_get_size(Evas_Render_Font *fn, char *text, int *w, int *h);
|
||||
int __evas_render_text_get_character_at_pos(Evas_Render_Font *fn, char *text, int x, int y, int *cx, int *cy, int *cw, int *ch);
|
||||
void __evas_render_text_get_character_number(Evas_Render_Font *fn, char *text, int num, int *cx, int *cy, int *cw, int *ch);
|
||||
void __evas_render_text_draw(Evas_Render_Font *fn, Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, char *text, int r, int g, int b, int a);
|
||||
|
||||
/**************/
|
||||
/* rectangles */
|
||||
/**************/
|
||||
|
||||
void __evas_render_rectangle_draw(Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, int w, int h, int r, int g, int b, int a);
|
||||
|
||||
/*********/
|
||||
/* lines */
|
||||
/*********/
|
||||
|
||||
void __evas_render_line_draw(Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x1, int y1, int x2, int y2, int r, int g, int b, int a);
|
||||
|
||||
/*************/
|
||||
/* gradients */
|
||||
/*************/
|
||||
Evas_Render_Graident *__evas_render_gradient_new(Display *disp);
|
||||
void __evas_render_gradient_free(Evas_Render_Graident *gr);
|
||||
void __evas_render_gradient_color_add(Evas_Render_Graident *gr, int r, int g, int b, int a, int dist);
|
||||
void __evas_render_gradient_draw(Evas_Render_Graident *gr, Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, int w, int h, double angle);
|
||||
|
||||
/************/
|
||||
/* polygons */
|
||||
/************/
|
||||
void __evas_render_poly_draw (Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, Evas_List points, int r, int g, int b, int a);
|
||||
|
||||
/***********/
|
||||
/* drawing */
|
||||
/***********/
|
||||
void __evas_render_set_clip_rect(int on, int x, int y, int w, int h, int r, int g, int b, int a);
|
||||
void __evas_render_init(Display *disp, int screen, int colors);
|
||||
void __evas_render_set_vis_cmap(Visual *vis, Colormap cmap);
|
||||
int __evas_render_capable(Display *disp);
|
||||
void __evas_render_flush_draw(Display *disp, Imlib_Image dstim, Window win);
|
||||
void __evas_render_sync(Display *disp);
|
||||
Visual *__evas_render_get_visual(Display *disp, int screen);
|
||||
XVisualInfo *__evas_render_get_visual_info(Display *disp, int screen);
|
||||
Colormap __evas_render_get_colormap(Display *disp, int screen);
|
||||
void __evas_render_draw_add_rect(Display *disp, Imlib_Image dstim, Window win, int x, int y, int w, int h);
|
||||
|
|
@ -1,198 +0,0 @@
|
|||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#ifdef HAVE_FREETYPE1_FREETYPE_FREETYPE_H
|
||||
#include <freetype1/freetype/freetype.h>
|
||||
#else
|
||||
# ifdef HAVE_FREETYPE_FREETYPE_H
|
||||
#include <freetype/freetype.h>
|
||||
#else
|
||||
#include <freetype.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "Evas_private.h"
|
||||
#include "Evas.h"
|
||||
|
||||
#include <Imlib2.h>
|
||||
|
||||
#ifndef SPANS_COMMON
|
||||
#define SPANS_COMMON(x1, w1, x2, w2) \
|
||||
(!((((x2) + (w2)) <= (x1)) || ((x2) >= ((x1) + (w1)))))
|
||||
#define RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) \
|
||||
((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh))))
|
||||
#endif
|
||||
|
||||
typedef struct _evas_x11_image Evas_X11_Image;
|
||||
typedef struct _evas_x11_font Evas_X11_Font;
|
||||
typedef struct _evas_x11_gradient Evas_X11_Graident;
|
||||
typedef struct _evas_x11_color Evas_X11_Color;
|
||||
typedef struct _evas_x11_glyph Evas_X11_Glyph;
|
||||
|
||||
typedef struct _evas_x11_drawable Evas_X11_Drawable;
|
||||
typedef struct _evas_x11_update Evas_X11_Update;
|
||||
|
||||
struct _evas_x11_drawable
|
||||
{
|
||||
Display *disp;
|
||||
Window win;
|
||||
GC gc;
|
||||
int depth;
|
||||
Evas_List tmp_images;
|
||||
};
|
||||
|
||||
struct _evas_x11_update
|
||||
{
|
||||
Pixmap p;
|
||||
int x, y, w, h;
|
||||
};
|
||||
|
||||
struct _evas_x11_image
|
||||
{
|
||||
GC gc;
|
||||
Display *disp;
|
||||
Window win;
|
||||
int pw, ph, pr, pg, pb, pa;
|
||||
Pixmap pmap;
|
||||
Pixmap mask;
|
||||
int w, h;
|
||||
int has_alpha;
|
||||
char *file;
|
||||
Imlib_Image image;
|
||||
int references;
|
||||
};
|
||||
|
||||
struct _evas_x11_glyph
|
||||
{
|
||||
int glyph_id;
|
||||
TT_Glyph glyph;
|
||||
|
||||
TT_Glyph_Metrics metrics;
|
||||
|
||||
int pw, ph;
|
||||
Pixmap pmap;
|
||||
};
|
||||
|
||||
struct _evas_x11_font
|
||||
{
|
||||
char *font;
|
||||
int size;
|
||||
|
||||
Display *disp;
|
||||
|
||||
TT_Engine engine;
|
||||
TT_Face face;
|
||||
TT_Instance instance;
|
||||
TT_Face_Properties properties;
|
||||
TT_CharMap char_map;
|
||||
TT_Instance_Metrics metrics;
|
||||
|
||||
Evas_List glyphs[256];
|
||||
|
||||
int ascent;
|
||||
int descent;
|
||||
int max_descent;
|
||||
int max_ascent;
|
||||
|
||||
int mem_use;
|
||||
|
||||
int references;
|
||||
};
|
||||
|
||||
struct _evas_x11_gradient
|
||||
{
|
||||
Evas_List colors;
|
||||
};
|
||||
|
||||
struct _evas_x11_color
|
||||
{
|
||||
int r, g, b, a;
|
||||
int dist;
|
||||
};
|
||||
|
||||
/***************/
|
||||
/* image stuff */
|
||||
/***************/
|
||||
Evas_X11_Image *__evas_x11_image_new_from_file(Display *disp, char *file);
|
||||
void __evas_x11_image_free(Evas_X11_Image *im);
|
||||
void __evas_x11_image_cache_empty(Display *disp);
|
||||
void __evas_x11_image_cache_set_size(Display *disp, int size);
|
||||
int __evas_x11_image_cache_get_size(Display *disp);
|
||||
int __evas_x11_image_get_width(Evas_X11_Image *im);
|
||||
int __evas_x11_image_get_height(Evas_X11_Image *im);
|
||||
void __evas_x11_image_set_borders(Evas_X11_Image *im, int left, int right, int top, int bottom);
|
||||
void __evas_x11_image_set_smooth_scaling(int on);
|
||||
void __evas_x11_image_draw(Evas_X11_Image *im, Display *disp, Imlib_Image dstim, Window w, int win_w, int win_h, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int cr, int cg, int cb, int ca);
|
||||
|
||||
/********/
|
||||
/* text */
|
||||
/********/
|
||||
Evas_X11_Font *__evas_x11_text_font_new(Display *disp, char *font, int size);
|
||||
void __evas_x11_text_font_free(Evas_X11_Font *fn);
|
||||
int __evas_x11_text_font_get_ascent(Evas_X11_Font *fn);
|
||||
int __evas_x11_text_font_get_descent(Evas_X11_Font *fn);
|
||||
int __evas_x11_text_font_get_max_ascent(Evas_X11_Font *fn);
|
||||
int __evas_x11_text_font_get_max_descent(Evas_X11_Font *fn);
|
||||
void __evas_x11_text_font_get_advances(Evas_X11_Font *fn, char *text, int *advance_horiz, int *advance_vert);
|
||||
int __evas_x11_text_font_get_first_inset(Evas_X11_Font *fn, char *text);
|
||||
void __evas_x11_text_font_add_path(char *path);
|
||||
void __evas_x11_text_font_del_path(char *path);
|
||||
char **__evas_x11_text_font_list_paths(int *count);
|
||||
void __evas_x11_text_cache_empty(Display *disp);
|
||||
void __evas_x11_text_cache_set_size(Display *disp, int size);
|
||||
int __evas_x11_text_cache_get_size(Display *disp);
|
||||
void __evas_x11_text_get_size(Evas_X11_Font *fn, char *text, int *w, int *h);
|
||||
int __evas_x11_text_get_character_at_pos(Evas_X11_Font *fn, char *text, int x, int y, int *cx, int *cy, int *cw, int *ch);
|
||||
void __evas_x11_text_get_character_number(Evas_X11_Font *fn, char *text, int num, int *cx, int *cy, int *cw, int *ch);
|
||||
void __evas_x11_text_draw(Evas_X11_Font *fn, Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, char *text, int r, int g, int b, int a);
|
||||
|
||||
/**************/
|
||||
/* rectangles */
|
||||
/**************/
|
||||
|
||||
void __evas_x11_rectangle_draw(Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, int w, int h, int r, int g, int b, int a);
|
||||
|
||||
/*********/
|
||||
/* lines */
|
||||
/*********/
|
||||
|
||||
void __evas_x11_line_draw(Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x1, int y1, int x2, int y2, int r, int g, int b, int a);
|
||||
|
||||
/*************/
|
||||
/* gradients */
|
||||
/*************/
|
||||
Evas_X11_Graident *__evas_x11_gradient_new(Display *disp);
|
||||
void __evas_x11_gradient_free(Evas_X11_Graident *gr);
|
||||
void __evas_x11_gradient_color_add(Evas_X11_Graident *gr, int r, int g, int b, int a, int dist);
|
||||
void __evas_x11_gradient_draw(Evas_X11_Graident *gr, Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, int x, int y, int w, int h, double angle);
|
||||
|
||||
/************/
|
||||
/* polygons */
|
||||
/************/
|
||||
void __evas_x11_poly_draw (Display *disp, Imlib_Image dstim, Window win, int win_w, int win_h, Evas_List points, int r, int g, int b, int a);
|
||||
|
||||
/***********/
|
||||
/* drawing */
|
||||
/***********/
|
||||
void __evas_x11_set_clip_rect(int on, int x, int y, int w, int h, int r, int g, int b, int a);
|
||||
void __evas_x11_init(Display *disp, int screen, int colors);
|
||||
void __evas_x11_set_vis_cmap(Visual *vis, Colormap cmap);
|
||||
int __evas_x11_capable(Display *disp);
|
||||
void __evas_x11_flush_draw(Display *disp, Imlib_Image dstim, Window win);
|
||||
void __evas_x11_sync(Display *disp);
|
||||
Visual *__evas_x11_get_visual(Display *disp, int screen);
|
||||
XVisualInfo *__evas_x11_get_visual_info(Display *disp, int screen);
|
||||
Colormap __evas_x11_get_colormap(Display *disp, int screen);
|
||||
void __evas_x11_draw_add_rect(Display *disp, Imlib_Image dstim, Window win, int x, int y, int w, int h);
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
.icons
|
||||
Makefile
|
||||
Makefile.in
|
||||
evas_test
|
||||
evas_test_old
|
||||
.libs
|
||||
.deps
|
|
@ -1,29 +0,0 @@
|
|||
CFLAGS_X = @x_cflags@
|
||||
CFLAGS_EXTRA = -I$(includedir) -I$(top_srcdir) -I$(top_srcdir)/src -I/usr/local/include
|
||||
|
||||
CFLAGS_ALL = $(CFLAGS_X) $(CFLAGS_EXTRA)
|
||||
|
||||
SUBDIRS = fnt img
|
||||
|
||||
INCLUDES = $(CFLAGS_ALL) \
|
||||
-DLIBDIR=\"$(libdir)\" \
|
||||
-DBINDIR=\"$(bindir)\" \
|
||||
-DDATADIR=\"$(datadir)\"
|
||||
|
||||
bin_PROGRAMS = evas_test evas_test_old
|
||||
|
||||
evas_test_DEPENDENCIES = $(top_builddir)/src/libevas.la
|
||||
|
||||
evas_test_SOURCES = evas_test.c
|
||||
|
||||
evas_test_LDFLAGS = -static
|
||||
|
||||
evas_test_LDADD = $(top_builddir)/src/libevas.la
|
||||
|
||||
evas_test_old_DEPENDENCIES = $(top_builddir)/src/libevas.la
|
||||
|
||||
evas_test_old_SOURCES = evas_test_old.c
|
||||
|
||||
evas_test_old_LDFLAGS = -static
|
||||
|
||||
evas_test_old_LDADD = $(top_builddir)/src/libevas.la
|
|
@ -1,436 +0,0 @@
|
|||
#include "../src/Evas.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <math.h>
|
||||
|
||||
#define IMGDIR DATADIR"/evas/img/"
|
||||
#define FNTDIR DATADIR"/evas/fnt/"
|
||||
|
||||
double get_time(void);
|
||||
|
||||
double
|
||||
get_time(void)
|
||||
{
|
||||
struct timeval timev;
|
||||
|
||||
gettimeofday(&timev, NULL);
|
||||
return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000);
|
||||
}
|
||||
|
||||
|
||||
/* callbacks for logo object */
|
||||
|
||||
void
|
||||
mouse_down (void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y)
|
||||
{
|
||||
evas_put_data(_e, _o, "clicked", (void *)1);
|
||||
evas_put_data(_e, _o, "x", (void *)_x);
|
||||
evas_put_data(_e, _o, "y", (void *)_y);
|
||||
evas_set_layer(_e, _o, 200);
|
||||
}
|
||||
|
||||
void
|
||||
mouse_up (void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y)
|
||||
{
|
||||
evas_remove_data(_e, _o, "clicked");
|
||||
evas_set_layer(_e, _o, 50);
|
||||
}
|
||||
|
||||
void
|
||||
mouse_move (void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y)
|
||||
{
|
||||
if (evas_get_data(_e, _o, "clicked"))
|
||||
{
|
||||
double ox, oy;
|
||||
int x, y;
|
||||
|
||||
evas_get_geometry(_e, _o, &ox, &oy, NULL, NULL);
|
||||
x = evas_get_data(_e, _o, "x");
|
||||
y = evas_get_data(_e, _o, "y");
|
||||
evas_put_data(_e, _o, "x", (void *)_x);
|
||||
evas_put_data(_e, _o, "y", (void *)_y);
|
||||
evas_move(_e, _o, ox + _x - x, oy + _y - y);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
mouse_in (void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
mouse_out (void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y)
|
||||
{
|
||||
}
|
||||
|
||||
/* done with callbacks */
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
Imlib_Image buffer = NULL;
|
||||
Display *d;
|
||||
Visual *vis;
|
||||
Colormap cmap;
|
||||
Window win;
|
||||
int win_w, win_h;
|
||||
int i, a, w, h, m;
|
||||
Evas e;
|
||||
Evas_Object o[128], o_rect, o_line, o_grad, o_fps, o_text, o_poly;
|
||||
Evas_Gradient grad;
|
||||
int down;
|
||||
double t0, t1, t2;
|
||||
char *save_file = NULL;
|
||||
char *imgs[8] =
|
||||
{
|
||||
IMGDIR"mush.png",
|
||||
IMGDIR"book.png",
|
||||
IMGDIR"bulb.png",
|
||||
IMGDIR"term.png",
|
||||
IMGDIR"calc.png",
|
||||
IMGDIR"worlds.png",
|
||||
IMGDIR"spider.png",
|
||||
IMGDIR"mouse.png"
|
||||
};
|
||||
|
||||
win_w = 640; win_h = 480;
|
||||
e = evas_new();
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
if ((!strcmp(argv[i], "-x")) && (i < (argc - 1)))
|
||||
{
|
||||
i++;
|
||||
win_w = atoi(argv[i]);
|
||||
}
|
||||
else if ((!strcmp(argv[i], "-y")) && (i < (argc - 1)))
|
||||
{
|
||||
i++;
|
||||
win_h = atoi(argv[i]);
|
||||
}
|
||||
else if ((!strcmp(argv[i], "-m")) && (i < (argc - 1)))
|
||||
{
|
||||
i++;
|
||||
if (!strcmp(argv[i], "x11"))
|
||||
evas_set_output_method(e, RENDER_METHOD_BASIC_HARDWARE);
|
||||
else if (!strcmp(argv[i], "render"))
|
||||
evas_set_output_method(e, RENDER_METHOD_ALPHA_HARDWARE);
|
||||
else if (!strcmp(argv[i], "soft"))
|
||||
evas_set_output_method(e, RENDER_METHOD_ALPHA_SOFTWARE);
|
||||
else if (!strcmp(argv[i], "hard"))
|
||||
evas_set_output_method(e, RENDER_METHOD_3D_HARDWARE);
|
||||
else if (!strcmp(argv[i], "buf"))
|
||||
{
|
||||
DATA32 *data;
|
||||
|
||||
buffer = imlib_create_image(win_w, win_h);
|
||||
imlib_context_set_image(buffer);
|
||||
evas_set_output_method(e, RENDER_METHOD_IMAGE);
|
||||
evas_set_output_image(e, buffer);
|
||||
}
|
||||
}
|
||||
else if ((!strcmp(argv[i], "-c")) && (i < (argc - 1)))
|
||||
{
|
||||
i++;
|
||||
evas_set_output_colors(e, atoi(argv[i]));
|
||||
}
|
||||
else if ((!strcmp(argv[i], "-s")) && (i < (argc - 1)))
|
||||
{
|
||||
i++;
|
||||
evas_set_scale_smoothness(e, atoi(argv[i]));
|
||||
}
|
||||
else if ((!strcmp(argv[i], "-v")) && (i < (argc - 1)))
|
||||
{
|
||||
i++;
|
||||
save_file = argv[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Usage:\n");
|
||||
printf(" %s [options]\n", argv[0]);
|
||||
printf("Where options is one or more of:\n");
|
||||
printf(" -x width - width of window in pixels\n");
|
||||
printf(" -y height - height of window in pixels\n");
|
||||
printf(" -m [x11 | soft | hard | buf] - rendering mode\n");
|
||||
printf(" -c colors - maximum colors allocated\n");
|
||||
printf(" -s [1 | 0] - smooth scaling / rendering\n");
|
||||
printf(" -v file.png - save buffer to file.png\n");
|
||||
printf("\n");
|
||||
printf("Examples:\n");
|
||||
printf(" %s -x 640 -y 480 -m soft - run test in 640x480 in software mode\n", argv[0]);
|
||||
printf(" %s -x 800 -y 600 -m x11 - run test in 800x600 in X11 mode\n", argv[0]);
|
||||
printf(" %s -x 1024 -y 768 -m hard - run test in 1024x768 in OpenGL mode\n", argv[0]);
|
||||
printf(" %s -x 640 -y 480 -m soft -s 0 - run test in 640x480 in software mode, no smooth scaling\n", argv[0]);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
d = XOpenDisplay(NULL);
|
||||
vis = evas_get_optimal_visual(e, d);
|
||||
cmap = evas_get_optimal_colormap(e, d);
|
||||
|
||||
{
|
||||
XSetWindowAttributes att;
|
||||
|
||||
att.colormap = cmap;
|
||||
att.border_pixel = 0;
|
||||
att.event_mask = 0;
|
||||
|
||||
win = XCreateWindow(d,
|
||||
RootWindow(d, DefaultScreen(d)),
|
||||
0, 0, win_w, win_h, 0,
|
||||
imlib_get_visual_depth(d, vis),
|
||||
InputOutput,
|
||||
vis,
|
||||
CWColormap | CWBorderPixel | CWEventMask,
|
||||
&att);
|
||||
XSelectInput(d, win, ButtonPressMask | ButtonReleaseMask |
|
||||
PointerMotionMask | ExposureMask);
|
||||
XMapWindow(d, win);
|
||||
XSync(d, False);
|
||||
}
|
||||
evas_font_add_path(e, FNTDIR);
|
||||
evas_set_output(e, d, win, vis, cmap);
|
||||
evas_set_output_size(e, win_w, win_h);
|
||||
evas_set_output_viewport(e, 0, 0, win_w, win_h);
|
||||
|
||||
evas_set_font_cache(e, 512 * 1024);
|
||||
evas_set_image_cache(e, 1 * 1024 * 1024);
|
||||
|
||||
o[0] = evas_add_image_from_file(e, IMGDIR"sky001.png");
|
||||
evas_show(e, o[0]);
|
||||
o[1] = evas_add_image_from_file(e, IMGDIR"logo001.png");
|
||||
evas_callback_add(e, o[1], CALLBACK_MOUSE_DOWN, mouse_down, NULL);
|
||||
evas_callback_add(e, o[1], CALLBACK_MOUSE_UP, mouse_up, NULL);
|
||||
evas_callback_add(e, o[1], CALLBACK_MOUSE_MOVE, mouse_move, NULL);
|
||||
evas_callback_add(e, o[1], CALLBACK_MOUSE_IN, mouse_in, NULL);
|
||||
evas_callback_add(e, o[1], CALLBACK_MOUSE_OUT, mouse_out, NULL);
|
||||
w /= 2;
|
||||
h /= 2;
|
||||
evas_show(e, o[1]);
|
||||
|
||||
o_rect = evas_add_rectangle(e);
|
||||
evas_show(e, o_rect);
|
||||
evas_move(e, o_rect, 100, 80);
|
||||
evas_resize(e, o_rect, 120, 120);
|
||||
evas_set_color(e, o_rect, rand()&0xff, rand()&0xff, rand()&0xff, 200);
|
||||
evas_set_layer(e, o_rect, 180);
|
||||
evas_callback_add(e, o_rect, CALLBACK_MOUSE_DOWN, mouse_down, NULL);
|
||||
evas_callback_add(e, o_rect, CALLBACK_MOUSE_UP, mouse_up, NULL);
|
||||
evas_callback_add(e, o_rect, CALLBACK_MOUSE_MOVE, mouse_move, NULL);
|
||||
evas_callback_add(e, o_rect, CALLBACK_MOUSE_IN, mouse_in, NULL);
|
||||
evas_callback_add(e, o_rect, CALLBACK_MOUSE_OUT, mouse_out, NULL);
|
||||
|
||||
o_rect = evas_add_rectangle(e);
|
||||
evas_show(e, o_rect);
|
||||
evas_move(e, o_rect, 200, 100);
|
||||
evas_resize(e, o_rect, 300, 200);
|
||||
evas_set_color(e, o_rect, rand()&0xff, rand()&0xff, rand()&0xff, 200);
|
||||
evas_set_layer(e, o_rect, 150);
|
||||
|
||||
for (i = 2 ; i < 120; i++)
|
||||
{
|
||||
o[i] = evas_add_image_from_file(e, IMGDIR"mush.png");
|
||||
evas_show(e, o[i]);
|
||||
evas_set_layer(e, o[i], 100);
|
||||
evas_callback_add(e, o[i], CALLBACK_MOUSE_DOWN, mouse_down, NULL);
|
||||
evas_callback_add(e, o[i], CALLBACK_MOUSE_UP, mouse_up, NULL);
|
||||
evas_callback_add(e, o[i], CALLBACK_MOUSE_MOVE, mouse_move, NULL);
|
||||
evas_callback_add(e, o[i], CALLBACK_MOUSE_IN, mouse_in, NULL);
|
||||
evas_callback_add(e, o[i], CALLBACK_MOUSE_OUT, mouse_out, NULL);
|
||||
evas_set_clip(e, o[i], o_rect);
|
||||
}
|
||||
for (i = 120; i < 128; i++)
|
||||
{
|
||||
o[i] = evas_add_text(e, "notepad", 16, imgs[i & 0x7]);
|
||||
evas_set_color(e, o[i], rand()&0xff, rand()&0xff, rand()&0xff, 255);
|
||||
evas_show(e, o[i]);
|
||||
evas_set_layer(e, o[i], 100);
|
||||
evas_callback_add(e, o[i], CALLBACK_MOUSE_DOWN, mouse_down, NULL);
|
||||
evas_callback_add(e, o[i], CALLBACK_MOUSE_UP, mouse_up, NULL);
|
||||
evas_callback_add(e, o[i], CALLBACK_MOUSE_MOVE, mouse_move, NULL);
|
||||
evas_callback_add(e, o[i], CALLBACK_MOUSE_IN, mouse_in, NULL);
|
||||
evas_callback_add(e, o[i], CALLBACK_MOUSE_OUT, mouse_out, NULL);
|
||||
}
|
||||
|
||||
o_poly = evas_add_poly(e);
|
||||
evas_show(e, o_poly);
|
||||
evas_add_point(e, o_poly, 100, 100);
|
||||
evas_add_point(e, o_poly, 200, 150);
|
||||
evas_add_point(e, o_poly, 300, 80);
|
||||
evas_add_point(e, o_poly, 500, 150);
|
||||
evas_add_point(e, o_poly, 200, 120);
|
||||
evas_add_point(e, o_poly, 55, 190);
|
||||
evas_add_point(e, o_poly, 130, 110);
|
||||
evas_set_color(e, o_poly, rand()&0xff, rand()&0xff, rand()&0xff, 180);
|
||||
evas_set_layer(e, o_poly, 150);
|
||||
evas_callback_add(e, o_poly, CALLBACK_MOUSE_DOWN, mouse_down, NULL);
|
||||
evas_callback_add(e, o_poly, CALLBACK_MOUSE_UP, mouse_up, NULL);
|
||||
evas_callback_add(e, o_poly, CALLBACK_MOUSE_MOVE, mouse_move, NULL);
|
||||
evas_callback_add(e, o_poly, CALLBACK_MOUSE_IN, mouse_in, NULL);
|
||||
evas_callback_add(e, o_poly, CALLBACK_MOUSE_OUT, mouse_out, NULL);
|
||||
|
||||
o_line = evas_add_line(e);
|
||||
evas_show(e, o_line);
|
||||
evas_set_line_xy(e, o_line, 10, 20, 100, 50);
|
||||
evas_set_color(e, o_line, rand()&0xff, rand()&0xff, rand()&0xff, 140);
|
||||
evas_set_layer(e, o_rect, 150);
|
||||
evas_callback_add(e, o_line, CALLBACK_MOUSE_DOWN, mouse_down, NULL);
|
||||
evas_callback_add(e, o_line, CALLBACK_MOUSE_UP, mouse_up, NULL);
|
||||
evas_callback_add(e, o_line, CALLBACK_MOUSE_MOVE, mouse_move, NULL);
|
||||
evas_callback_add(e, o_line, CALLBACK_MOUSE_IN, mouse_in, NULL);
|
||||
evas_callback_add(e, o_line, CALLBACK_MOUSE_OUT, mouse_out, NULL);
|
||||
|
||||
o_grad = evas_add_gradient_box(e);
|
||||
evas_show(e, o_grad);
|
||||
evas_move(e, o_grad, 300, 50);
|
||||
evas_resize(e, o_grad, 300, 300);
|
||||
evas_set_layer(e, o_grad, 150);
|
||||
grad = evas_gradient_new();
|
||||
evas_gradient_add_color(grad, 255, 255, 255, 255, 8);
|
||||
evas_gradient_add_color(grad, 255, 255, 0, 200, 8);
|
||||
evas_gradient_add_color(grad, 255, 0 , 0, 150, 8);
|
||||
evas_gradient_add_color(grad, 0 , 0 , 0, 0, 8);
|
||||
evas_set_gradient(e, o_grad, grad);
|
||||
evas_callback_add(e, o_grad, CALLBACK_MOUSE_DOWN, mouse_down, NULL);
|
||||
evas_callback_add(e, o_grad, CALLBACK_MOUSE_UP, mouse_up, NULL);
|
||||
evas_callback_add(e, o_grad, CALLBACK_MOUSE_MOVE, mouse_move, NULL);
|
||||
evas_callback_add(e, o_grad, CALLBACK_MOUSE_IN, mouse_in, NULL);
|
||||
evas_callback_add(e, o_grad, CALLBACK_MOUSE_OUT, mouse_out, NULL);
|
||||
/* evas_set_clip(e, o_grad, o_rect);*/
|
||||
|
||||
o_text = evas_add_text(e, "grunge", 14, "Click and Drag Objects...");
|
||||
evas_set_color(e, o_text, 0, 0, 0, 160);
|
||||
evas_move(e, o_text, 30, 60);
|
||||
evas_show(e, o_text);
|
||||
evas_set_layer(e, o_text, 200);
|
||||
evas_callback_add(e, o_text, CALLBACK_MOUSE_DOWN, mouse_down, NULL);
|
||||
evas_callback_add(e, o_text, CALLBACK_MOUSE_UP, mouse_up, NULL);
|
||||
evas_callback_add(e, o_text, CALLBACK_MOUSE_MOVE, mouse_move, NULL);
|
||||
evas_callback_add(e, o_text, CALLBACK_MOUSE_IN, mouse_in, NULL);
|
||||
evas_callback_add(e, o_text, CALLBACK_MOUSE_OUT, mouse_out, NULL);
|
||||
|
||||
o_fps = evas_add_text(e, "morpheus", 16, "FPS...");
|
||||
evas_set_color(e, o_fps, 255, 255, 255, 140);
|
||||
evas_move(e, o_fps, win_w, win_h);
|
||||
evas_show(e, o_fps);
|
||||
evas_set_layer(e, o_fps, 500);
|
||||
|
||||
evas_raise(e, o[1]);
|
||||
evas_move(e, o[0], 0, 0);
|
||||
evas_resize(e, o[0], win_w, win_h);
|
||||
evas_set_image_fill(e, o[0], 0, 0, win_w, win_h);
|
||||
a = 0;
|
||||
down = 0;
|
||||
t0 = t1 = get_time();
|
||||
m = 0;
|
||||
for (;;)
|
||||
{
|
||||
double x, y;
|
||||
XEvent ev;
|
||||
|
||||
while (XPending(d))
|
||||
/* do*/
|
||||
{
|
||||
XNextEvent(d, &ev);
|
||||
switch(ev.type)
|
||||
{
|
||||
case ButtonPress:
|
||||
{
|
||||
int button, mouse_x, mouse_y;
|
||||
|
||||
down = 1;
|
||||
button = ev.xbutton.button;
|
||||
mouse_x = ev.xbutton.x;
|
||||
mouse_y = ev.xbutton.y;
|
||||
evas_event_button_down(e, mouse_x, mouse_y, button);
|
||||
}
|
||||
break;
|
||||
case ButtonRelease:
|
||||
{
|
||||
int button, mouse_x, mouse_y;
|
||||
|
||||
down = 0;
|
||||
button = ev.xbutton.button;
|
||||
if (button == 3)
|
||||
{
|
||||
t2 = get_time() - t0;
|
||||
printf("Avg FPS: %3.3f\n", a / t2);
|
||||
evas_free(e);
|
||||
exit(0);
|
||||
}
|
||||
mouse_x = ev.xbutton.x;
|
||||
mouse_y = ev.xbutton.y;
|
||||
evas_event_button_up(e, mouse_x, mouse_y, button);
|
||||
}
|
||||
break;
|
||||
case MotionNotify:
|
||||
{
|
||||
int mouse_x, mouse_y;
|
||||
|
||||
mouse_x = ev.xmotion.x;
|
||||
mouse_y = ev.xmotion.y;
|
||||
evas_event_move(e, mouse_x, mouse_y);
|
||||
}
|
||||
break;
|
||||
case Expose:
|
||||
{
|
||||
evas_update_rect(e, ev.xexpose.x, ev.xexpose.y, ev.xexpose.width, ev.xexpose.height);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* while (XPending(d));*/
|
||||
for (i = 2; i < 128; i++)
|
||||
{
|
||||
int j, k;
|
||||
double ww, hh;
|
||||
|
||||
if (!evas_get_data(e, o[i], "clicked"))
|
||||
{
|
||||
j = (i * 50) + i;
|
||||
k = (i * -60) - (i * 2);
|
||||
x = (win_w + (cos((double)(a + j) * 2 * 3.141592654 / 1000) * (win_h - 100))) / 2;
|
||||
y = (win_h + (sin((double)(a + k) * 2 * 3.141592654 / 1000) * (win_h - 100))) / 2;
|
||||
if (i < 100)
|
||||
evas_set_image_file(e, o[i], imgs[(i) & 0x7]);
|
||||
evas_move(e, o[i], x, y);
|
||||
/*
|
||||
ww = ((1.2 + cos((double)(a + j + m) * 2 * 3.141592654 / 1000)) * 48);
|
||||
hh = ww;
|
||||
evas_resize(e, o[i], ww, hh);
|
||||
evas_set_image_fill(e, o[i], 0, 0, ww, hh);
|
||||
evas_set_color(e, o[i], 255, 255, 255,
|
||||
(((1.0 + cos((double)(a + j) * 2 * 3 * 3.141592654 / 1000)) / 2) * 255));
|
||||
*/
|
||||
}
|
||||
}
|
||||
evas_set_angle(e, o_grad, (double)a * 360 / 1000);
|
||||
evas_render(e);
|
||||
if ((save_file) && (buffer))
|
||||
{
|
||||
imlib_context_set_image(buffer);
|
||||
imlib_image_set_format("png");
|
||||
imlib_save_image(save_file);
|
||||
}
|
||||
a++;
|
||||
m++;
|
||||
if ((a % 25) == 0)
|
||||
{
|
||||
char buf[64];
|
||||
double gw, gh;
|
||||
|
||||
t2 = get_time() - t1;
|
||||
t1 = get_time();
|
||||
sprintf(buf, "FPS: %3.1f", 25 / t2);
|
||||
printf("%s\n", buf);
|
||||
evas_set_text(e, o_fps, buf);
|
||||
evas_get_geometry(e, o_fps, NULL, NULL, &gw, &gh);
|
||||
evas_move(e, o_fps, win_w - gw, win_h - gh);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
Makefile.in
|
||||
Makefile
|
|
@ -1,13 +0,0 @@
|
|||
EXTRA_DIST = \
|
||||
andover.ttf \
|
||||
cinema.ttf \
|
||||
grunge.ttf \
|
||||
morpheus.ttf \
|
||||
notepad.ttf
|
||||
evasdir = $(datadir)/evas/fnt
|
||||
evas_DATA = \
|
||||
andover.ttf \
|
||||
cinema.ttf \
|
||||
grunge.ttf \
|
||||
morpheus.ttf \
|
||||
notepad.ttf
|
|
@ -1,2 +0,0 @@
|
|||
Makefile.in
|
||||
Makefile
|
|
@ -1,111 +0,0 @@
|
|||
EXTRA_DIST = \
|
||||
book.png \
|
||||
bulb.png \
|
||||
calc.png \
|
||||
evas_icon.png \
|
||||
evas_test_alpha1.png \
|
||||
evas_test_alpha2.png \
|
||||
evas_test_anti_alias.png \
|
||||
evas_test_canvas.png \
|
||||
evas_test_cheese.png \
|
||||
evas_test_control_bg.png \
|
||||
evas_test_control_selection1.png \
|
||||
evas_test_control_selection2.png \
|
||||
evas_test_image_0.png \
|
||||
evas_test_image_1.png \
|
||||
evas_test_image_10.png \
|
||||
evas_test_image_11.png \
|
||||
evas_test_image_12.png \
|
||||
evas_test_image_13.png \
|
||||
evas_test_image_14.png \
|
||||
evas_test_image_15.png \
|
||||
evas_test_image_2.png \
|
||||
evas_test_image_3.png \
|
||||
evas_test_image_4.png \
|
||||
evas_test_image_5.png \
|
||||
evas_test_image_6.png \
|
||||
evas_test_image_7.png \
|
||||
evas_test_image_8.png \
|
||||
evas_test_image_9.png \
|
||||
evas_test_mmx.png \
|
||||
evas_test_pointer.png \
|
||||
evas_test_pointer_big.png \
|
||||
evas_test_view_bg.png \
|
||||
evas_test_view_bubble.png \
|
||||
evas_test_view_bubble_shadow.png \
|
||||
evas_test_view_logo.png \
|
||||
evas_test_view_logo_image.png \
|
||||
evas_test_view_logo_image_brush.png \
|
||||
evas_test_view_logo_image_paint.png \
|
||||
evas_test_view_logo_impress.png \
|
||||
evas_test_view_logo_shadow.png \
|
||||
evas_test_wonder_1.png \
|
||||
evas_test_wonder_2.png \
|
||||
evas_test_wonder_3.png \
|
||||
evas_test_wonder_4.png \
|
||||
evas_test_wonder_5.png \
|
||||
evas_test_wonder_6.png \
|
||||
evas_test_wonder_7.png \
|
||||
logo001.png \
|
||||
mouse.png \
|
||||
mush.png \
|
||||
sky001.png \
|
||||
spider.png \
|
||||
term.png \
|
||||
worlds.png
|
||||
evasdir = $(datadir)/evas/img
|
||||
evas_DATA = \
|
||||
book.png \
|
||||
bulb.png \
|
||||
calc.png \
|
||||
evas_icon.png \
|
||||
evas_test_alpha1.png \
|
||||
evas_test_alpha2.png \
|
||||
evas_test_anti_alias.png \
|
||||
evas_test_canvas.png \
|
||||
evas_test_cheese.png \
|
||||
evas_test_control_bg.png \
|
||||
evas_test_control_selection1.png \
|
||||
evas_test_control_selection2.png \
|
||||
evas_test_image_0.png \
|
||||
evas_test_image_1.png \
|
||||
evas_test_image_10.png \
|
||||
evas_test_image_11.png \
|
||||
evas_test_image_12.png \
|
||||
evas_test_image_13.png \
|
||||
evas_test_image_14.png \
|
||||
evas_test_image_15.png \
|
||||
evas_test_image_2.png \
|
||||
evas_test_image_3.png \
|
||||
evas_test_image_4.png \
|
||||
evas_test_image_5.png \
|
||||
evas_test_image_6.png \
|
||||
evas_test_image_7.png \
|
||||
evas_test_image_8.png \
|
||||
evas_test_image_9.png \
|
||||
evas_test_mmx.png \
|
||||
evas_test_pointer.png \
|
||||
evas_test_pointer_big.png \
|
||||
evas_test_view_bg.png \
|
||||
evas_test_view_bubble.png \
|
||||
evas_test_view_bubble_shadow.png \
|
||||
evas_test_view_logo.png \
|
||||
evas_test_view_logo_image.png \
|
||||
evas_test_view_logo_image_brush.png \
|
||||
evas_test_view_logo_image_paint.png \
|
||||
evas_test_view_logo_impress.png \
|
||||
evas_test_view_logo_shadow.png \
|
||||
evas_test_wonder_1.png \
|
||||
evas_test_wonder_2.png \
|
||||
evas_test_wonder_3.png \
|
||||
evas_test_wonder_4.png \
|
||||
evas_test_wonder_5.png \
|
||||
evas_test_wonder_6.png \
|
||||
evas_test_wonder_7.png \
|
||||
logo001.png \
|
||||
mouse.png \
|
||||
mush.png \
|
||||
sky001.png \
|
||||
spider.png \
|
||||
term.png \
|
||||
worlds.png
|
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 127 KiB |
Before Width: | Height: | Size: 142 KiB |
Before Width: | Height: | Size: 165 B |
Before Width: | Height: | Size: 189 B |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 23 KiB |