Compare commits

..

3 Commits

Author SHA1 Message Date
Jean-Philippe Andre 2ca7eec032 UI main loop: Fix indentation 2014-10-22 16:08:24 +09:00
Jean-Philippe Andre 474cf5c88b Fix support of --count from command line
expedite would never exit after N loops
2014-10-22 15:59:03 +09:00
Cedric BAIL c6353fc5e1 fix wrong ordering of report. 2014-09-04 14:20:56 +02:00
142 changed files with 2682 additions and 5462 deletions

View File

@ -1,6 +0,0 @@
{
"project_id" : "expedite",
"projects" : "expedite",
"conduit_uri" : "https://phab.enlightenment.org/",
"phabricator.uri" : "https://phab.enlightenment.org/"
}

View File

@ -3,6 +3,6 @@ Tim Horton <hortont424@gmail.com>
Saumsung Electronics <tbd>
Samsung SAIT <tbd>
Bruno Tarquini <btarquini@gmail.com>
Hermet Park <hermetpark@gmail.com>
ChunEon Park (Hermet) <hermet@hermet.pe.kr>
Eduardo Lima (Etrunko) <eblima@gmail.com>
JaEun Choi <jaeun12.choi@samsung.com>

372
INSTALL
View File

@ -1,368 +1,14 @@
Installation Instructions
*************************
COMPILING and INSTALLING:
Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
Foundation, Inc.
If you got a official release tar archive do:
./configure
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
( otherwise if you got this from enlightenment cvs do: ./autogen.sh )
Basic Installation
==================
Then to compile:
make
Briefly, the shell command './configure && make && make install'
should configure, build, and install this package. The following
more-detailed instructions are generic; see the 'README' file for
instructions specific to this package. Some packages provide this
'INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
To install (run this as root, or the user who handles installs):
make install
The 'configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a 'Makefile' in each directory of the package.
It may also create one or more '.h' files containing system-dependent
definitions. Finally, it creates a shell script 'config.status' that
you can run in the future to recreate the current configuration, and a
file 'config.log' containing compiler output (useful mainly for
debugging 'configure').
It can also use an optional file (typically called 'config.cache' and
enabled with '--cache-file=config.cache' or simply '-C') that saves the
results of its tests to speed up reconfiguring. Caching is disabled by
default to prevent problems with accidental use of stale cache files.
If you need to do unusual things to compile the package, please try
to figure out how 'configure' could check whether to do them, and mail
diffs or instructions to the address given in the 'README' so they can
be considered for the next release. If you are using the cache, and at
some point 'config.cache' contains results you don't want to keep, you
may remove or edit it.
The file 'configure.ac' (or 'configure.in') is used to create
'configure' by a program called 'autoconf'. You need 'configure.ac' if
you want to change it or regenerate 'configure' using a newer version of
'autoconf'.
The simplest way to compile this package is:
1. 'cd' to the directory containing the package's source code and type
'./configure' to configure the package for your system.
Running 'configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type 'make' to compile the package.
3. Optionally, type 'make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
4. Type 'make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the 'make install' phase executed with root
privileges.
5. Optionally, type 'make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior 'make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing 'make clean'. To also remove the
files that 'configure' created (so you can compile the package for
a different kind of computer), type 'make distclean'. There is
also a 'make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type 'make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide 'make
distcheck', which can by used by developers to test that all other
targets like 'make install' and 'make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the 'configure' script does not know about. Run './configure --help'
for details on some of the pertinent environment variables.
You can give 'configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here is
an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU 'make'. 'cd' to the
directory where you want the object files and executables to go and run
the 'configure' script. 'configure' automatically checks for the source
code in the directory that 'configure' is in and in '..'. This is known
as a "VPATH" build.
With a non-GNU 'make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use 'make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple '-arch' options to the
compiler but only a single '-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the 'lipo' tool if you have problems.
Installation Names
==================
By default, 'make install' installs the package's commands under
'/usr/local/bin', include files under '/usr/local/include', etc. You
can specify an installation prefix other than '/usr/local' by giving
'configure' the option '--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like '--bindir=DIR' to specify different values for particular
kinds of files. Run 'configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the default
for these options is expressed in terms of '${prefix}', so that
specifying just '--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
correct locations to 'configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
'make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, 'make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
'${prefix}'. Any directories that were specified during 'configure',
but not in terms of '${prefix}', must each be overridden at install time
for the entire installation to be relocated. The approach of makefile
variable overrides for each directory variable is required by the GNU
Coding Standards, and ideally causes no recompilation. However, some
platforms have known limitations with the semantics of shared libraries
that end up requiring recompilation when using this method, particularly
noticeable in packages that use GNU Libtool.
The second method involves providing the 'DESTDIR' variable. For
example, 'make install DESTDIR=/alternate/directory' will prepend
'/alternate/directory' before all installation names. The approach of
'DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of '${prefix}'
at 'configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving 'configure' the
option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
Some packages pay attention to '--enable-FEATURE' options to
'configure', where FEATURE indicates an optional part of the package.
They may also pay attention to '--with-PACKAGE' options, where PACKAGE
is something like 'gnu-as' or 'x' (for the X Window System). The
'README' should mention any '--enable-' and '--with-' options that the
package recognizes.
For packages that use the X Window System, 'configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the 'configure' options '--x-includes=DIR' and
'--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of 'make' will be. For these packages, running './configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with 'make V=1'; while running './configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with 'make V=0'.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
HP-UX 'make' updates targets which have the same time stamps as their
prerequisites, which makes it generally unusable when shipped generated
files such as 'configure' are involved. Use GNU 'make' instead.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
workaround. If GNU CC is not installed, it is therefore recommended to
try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
in your 'PATH', put it _after_ '/usr/bin'.
On Haiku, software installed for all users goes in '/boot/common',
not '/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
There may be some features 'configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, 'configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
'--build=TYPE' option. TYPE can either be a short name for the system
type, such as 'sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file 'config.sub' for the possible values of each field. If
'config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option '--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with '--host=TYPE'.
Sharing Defaults
================
If you want to set default values for 'configure' scripts to share,
you can create a site shell script called 'config.site' that gives
default values for variables like 'CC', 'cache_file', and 'prefix'.
'configure' looks for 'PREFIX/share/config.site' if it exists, then
'PREFIX/etc/config.site' if it exists. Or, you can set the
'CONFIG_SITE' environment variable to the location of the site script.
A warning: not all 'configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to 'configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the 'configure' command line, using 'VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified 'gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
Autoconf limitation. Until the limitation is lifted, you can use this
workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
'configure' Invocation
======================
'configure' recognizes the following options to control how it
operates.
'--help'
'-h'
Print a summary of all of the options to 'configure', and exit.
'--help=short'
'--help=recursive'
Print a summary of the options unique to this package's
'configure', and exit. The 'short' variant lists options used only
in the top level, while the 'recursive' variant lists options also
present in any nested packages.
'--version'
'-V'
Print the version of Autoconf used to generate the 'configure'
script, and exit.
'--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally 'config.cache'. FILE defaults to '/dev/null' to
disable caching.
'--config-cache'
'-C'
Alias for '--cache-file=config.cache'.
'--quiet'
'--silent'
'-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to '/dev/null' (any error
messages will still be shown).
'--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
'configure' can determine that directory automatically.
'--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names:: for
more details, including other options available for fine-tuning the
installation locations.
'--no-create'
'-n'
Run the configure checks, but stop before creating any output
files.
'configure' also accepts some other, not widely useful, options. Run
'configure --help' for more details.
NOTE: You MUST make install Expedite for it to run properly.

View File

@ -3,14 +3,14 @@ dnl Process this file with autoconf to produce a configure script.
# get rid of that stupid cache mechanism
rm -f config.cache
AC_INIT([expedite], [1.23.0], [enlightenment-devel@lists.sourceforge.net])
AC_INIT([expedite], [1.7.99], [enlightenment-devel@lists.sourceforge.net])
AC_PREREQ([2.52])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([1.6 dist-xz])
AM_INIT_AUTOMAKE([1.6 dist-bzip2])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
PKG_PROG_PKG_CONFIG
@ -18,46 +18,97 @@ PKG_PROG_PKG_CONFIG
### Checks for programs
AC_ISC_POSIX
m4_ifdef([AC_PROG_OBJC],
[
AC_PROG_OBJC
_AM_DEPENDENCIES(OBJC)
],
[
AC_CHECK_TOOL([OBJC], [gcc])
AC_SUBST([OBJC])
AC_SUBST([OBJCFLAGS])
]
)
AC_PROG_CXX
AC_PROG_CC
LT_PROG_RC
### Checks for libraries
# Evil library for compilation on Windows
case "$host_os" in
mingw32*)
PKG_CHECK_MODULES([EVIL], [evil >= 1.7.99])
AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
;;
esac
# EFL dependencies
efl_version="1.23.0"
requirement_expedite=" \
eo >= ${efl_version} \
efl >= ${efl_version} \
eina >= ${efl_version} \
evas >= ${efl_version} \
eet >= ${efl_version} \
ecore-evas >= ${efl_version} \
ecore >= ${efl_version}"
AC_SUBST(requirement_expedite)
PKG_CHECK_MODULES([EFL], [${requirement_expedite}])
PKG_CHECK_MODULES([EFL], eina >= 1.7.99 eo >= 1.7.99 evas >= 1.7.99 eet >= 1.7.99 ecore-evas >= 1.7.99 ecore >= 1.7.99)
EFL_ENABLE_EO_API_SUPPORT
EFL_ENABLE_BETA_API_SUPPORT
### Checks for header files
### Checks for types
### Checks for structures
### Checks for compiler characteristics
AC_PROG_CC_C99
AC_HEADER_STDC
AC_C_CONST
AM_PROG_CC_C_O
AC_C___ATTRIBUTE__
if test "x${ac_cv_prog_cc_c99}" = "xno" ; then
AC_MSG_ERROR([expedite requires a c99-capable compiler])
WIN32_CFLAGS=""
case "$host_os" in
cegcc*)
WIN32_CFLAGS="-mwin32"
;;
esac
AC_SUBST(WIN32_CFLAGS)
EXPEDITE_CXXFLAGS=""
AC_LANG_PUSH([C++])
CXXFLAGS_save="${CXXFLAGS}"
CXXFLAGS="${CXXFLAGS} -fno-rtti -fno-exceptions"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[]])],
[have_cxx_flags="yes"],
[have_cxx_flags="no"])
AC_MSG_CHECKING([whether the compiler supports -fno-rtti -fno-exceptions])
AC_MSG_RESULT([${have_cxx_flags}])
CXXFLAGS="${CXXFLAGS_save}"
if test "x${have_cxx_flags}" = "xyes" ; then
EXPEDITE_CXXFLAGS="-fno-rtti -fno-exceptions"
fi
AC_LANG_POP([C++])
AC_SUBST(EXPEDITE_CXXFLAGS)
### Checks for linker characteristics
lt_enable_auto_import=""
case "$host_os" in
mingw* | cegcc*)
lt_enable_auto_import="-Wl,--enable-auto-import"
;;
esac
AC_SUBST(lt_enable_auto_import)
### Checks for library functions
AC_CHECK_FUNCS([sync])

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -55,7 +55,6 @@ data.png \
widgets.png \
e-logo-2.png \
e-logo-mask.png \
texture.png \
vector.png
texture.png
EXTRA_DIST = $(files_DATA)

View File

@ -1,61 +0,0 @@
files = [ 'Kochi.ttf',
'Vera.ttf',
'VeraBI.ttf',
'VeraBd.ttf',
'VeraIt.ttf',
'VeraMoBI.ttf',
'VeraMoBd.ttf',
'VeraMoIt.ttf',
'VeraMono.ttf',
'VeraSe.ttf',
'VeraSeBd.ttf',
'fonts.alias',
'fonts.dir',
'logo.png',
'e-logo.png',
'e.png',
'image.png',
'bar.png',
'frame.png',
'stretch.png',
'9patch_test.9.png',
'pan.png',
'tp.png',
'tp.yuv',
'icon_sel.png',
'text_sel.png',
'exit.png',
'watch.png',
'bug.png',
'bulb.png',
'camera.png',
'colorbox.png',
'error.png',
'flower.png',
'house.png',
'mushroom.png',
'pulse.png',
'typewriter.png',
'warning.png',
'im1.png',
'im2.png',
'cube1.png',
'cube2.png',
'cube3.png',
'cube4.png',
'cube5.png',
'cube6.png',
'text.png',
'rect.png',
'blend.png',
'map.png',
'3d.png',
'data.png',
'widgets.png',
'e-logo-2.png',
'e-logo-mask.png',
'texture.png',
'vector.png' ]
install_data(files, install_dir: join_paths(get_option('datadir'),
meson.project_name(), 'data'))

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -1,63 +0,0 @@
project('expedite', 'c',
version: '1.23.0',
default_options: ['c_std=gnu99'],
license: 'BSD')
cc = meson.get_compiler('c')
prefix = get_option('prefix')
add_global_arguments('-DHAVE_CONFIG_H=1', language: 'c')
config_data = configuration_data()
config_data.set('EFL_BETA_API_SUPPORT', 1)
config_data.set_quoted('PACKAGE_VERSION', meson.project_version())
config_data.set_quoted('PACKAGE', meson.project_name())
config_data.set_quoted('PACKAGE_BUGREPORT',
'enlightenment-devel@lists.sourceforge.net')
config_data.set_quoted('PACKAGE_NAME', meson.project_name())
config_data.set_quoted('PACKAGE_TARNAME', meson.project_name())
config_data.set_quoted('PACKAGE_URL',
'https://www.enlightenment.org/')
config_data.set_quoted('PACKAGE_BIN_DIR',
join_paths(prefix, get_option('bindir')))
config_data.set_quoted('PACKAGE_DATA_DIR',
join_paths(prefix, get_option('datadir'),
meson.project_name()))
config_data.set_quoted('PACKAGE_LIB_DIR',
join_paths(prefix, get_option('libdir')))
config_data.set_quoted('LOCALEDIR', join_paths(prefix, get_option('localedir')))
host_os = host_machine.system()
if host_os == 'linux'
config_data.set('_GNU_SOURCE', 1)
config_data.set('__EXTENSIONS__', 1)
config_data.set('_POSIX_PTHREAD_SEMANTICS', 1)
config_data.set('_TANDEM_SOURCE', 1)
config_data.set('_ALL_SOURCE', 1)
config_data.set('_POSIX_SOURCE', 1)
config_data.set('_POSIX_1_SOURCE', 1)
endif
efl_version = '1.23.0'
efl_deps = ['eina',
'eet',
'eo',
'efl',
'evas',
'ecore',
'ecore-evas',
'elementary']
expedite_dependencies = []
foreach efl_dep: efl_deps
dep = dependency(efl_dep, version: '>=' + efl_version)
expedite_dependencies += [dep]
endforeach
configure_file(output: 'config.h',
configuration: config_data)
config_dir = include_directories('.')
subdir('src/bin')
subdir('data')

View File

@ -6,7 +6,8 @@ AM_CPPFLAGS = \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
@EFL_CFLAGS@
@EFL_CFLAGS@ \
@EVIL_CFLAGS@
bin_PROGRAMS = expedite
bin_SCRIPTS = expedite-cmp
@ -49,8 +50,6 @@ image_blend_smooth_solid_same_scaled.c \
image_blend_border.c \
image_blend_solid_middle_border.c \
image_blend_solid_border.c \
image_blend_solid_stretch.c \
image_blend_solid_9patch.c \
image_blend_border_recolor.c \
image_map_rotate.c \
image_map_solid_rotate.c \
@ -87,7 +86,6 @@ textblock_basic.c \
textblock_intl.c \
textblock_auto_align.c \
textblock_text_append.c \
textblock_text_fill_format.c \
rect_blend.c \
rect_blend_pow2.c \
rect_solid.c \
@ -110,35 +108,33 @@ poly_blend.c \
proxy_image.c \
proxy_text_fixed.c \
proxy_text_random.c \
proxy_textblock.c \
proxy_image_clipped.c \
line_blend.c \
image_blend_many_smooth_same_scaled.c \
font_effect_blur_alpha.c \
font_effect_blur_color.c \
image_mask.c \
image_mask_2.c \
image_mask_3.c \
image_mask_4.c \
image_mask_5.c \
image_mask_6.c \
image_mask_7.c \
image_mask_8.c \
image_mask_9.c \
image_mask_10.c \
image_mask_11.c \
image_mask_12.c \
image_mask_13.c \
image_mask_clipped.c \
vg_basic_rect.c \
vg_basic_circle.c \
vg_basic_gradient.c \
vg_scaled.c \
snapshot_widgets_file_icons.c
# \
font_effect_blur_color.c
# \
# image_mask.c \
# image_mask_2.c \
# image_mask_3.c \
# image_mask_4.c \
# image_mask_5.c \
# image_mask_6.c \
# image_mask_7.c \
# image_mask_8.c \
# image_mask_9.c \
# image_mask_10.c \
# image_mask_11.c \
# image_mask_12.c \
# image_mask_13.c \
# image_mask_14.c \
# image_mask_15.c
expedite_LDADD = @EFL_LIBS@ -lm
expedite_CFLAGS = @WIN32_CFLAGS@
expedite_CXXFLAGS = @EXPEDITE_CXXFLAGS@
expedite_LDADD = @EFL_LIBS@ @EVIL_LIBS@ -lm
expedite_LDFLAGS = @lt_enable_auto_import@
.rc.lo:
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) $< -o $@
EXTRA_DIST = $(bin_SCRIPTS)

View File

@ -6,28 +6,32 @@ static void
_setup(void)
{
Evas_Object *o;
Evas_Textblock_Style *st;
o = efl_add(EFL_CANVAS_TEXTBLOCK_CLASS, evas);
efl_gfx_entity_position_set(o, EINA_POSITION2D(10, 40));
efl_gfx_entity_size_set(o, EINA_SIZE2D(win_w - 20, win_h - 50));
efl_gfx_entity_visible_set(o, EINA_TRUE);
efl_text_font_family_set(o, "Vera");
efl_text_font_size_set(o, 10);
efl_text_color_set(o, 0, 0, 0, 255);
efl_text_multiline_set(o, EINA_TRUE);
efl_text_horizontal_align_set(o, 0.5);
efl_text_wrap_set(o, EFL_TEXT_FORMAT_WRAP_WORD);
efl_text_markup_set
(o,
o = eo_add(EVAS_TEXTBLOCK_CLASS, evas);
eo_do(o, evas_obj_position_set(10, 40),
evas_obj_size_set(win_w - 20, win_h - 50),
evas_obj_visibility_set(EINA_TRUE));
st = evas_textblock_style_new();
evas_textblock_style_set
(st,
"DEFAULT='font=Vera font_size=8 align=left color=#000 wrap=word'"
"center='+ font=Vera font_size=10 align=center'"
"/center='- \n \n'"
"p='+ font=Vera font_size=10 align=left'"
"/p='- \n \n'"
);
eo_do(o, evas_obj_textblock_style_set(st),
evas_obj_textblock_clear(),
evas_obj_textblock_text_markup_set
("<center>"
"Enlightenment used to be a window manager project, but "
"since has changed a lot to become a miniature desktop and mobile "
"device environment all of its own. It is now made up of many "
"components (libraries and applications) that have specific uses. "
"It is very large, and so requires more testing and demonstration."
"</center>"
"</br>"
"<center>"
"Expedite is a full test suite for Evas, which is one of the "
"core components of the Enlightenment Foundation Libraries. Evas "
@ -35,8 +39,10 @@ _setup(void)
"render to many targets, including framebuffer, X11, OpenGL, memory, "
"DirectFB and other targets to boot. It handles high level graphic "
"layout descriptions that applications set up, dealing with the hard "
"work of doing the drawing for them.");
"work of doing the drawing for them."
"</center>"
));
evas_textblock_style_free(st);
o_text = o;
ui_fps(0.0);
}
@ -44,7 +50,7 @@ _setup(void)
static void
_cleanup(void)
{
efl_del(o_text);
eo_del(o_text);
o_text = NULL;
}
@ -55,7 +61,7 @@ _loop(double t EINA_UNUSED,
}
static void
_key(const char *key)
_key(char *key)
{
if ((!strcmp(key, "Escape")) || (!strcmp(key, "q")) || (!strcmp(key, "Q")))
{
@ -67,5 +73,6 @@ _key(const char *key)
void
about_start(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}

288
src/bin/engine_direct3d.cpp Normal file
View File

@ -0,0 +1,288 @@
#include "main.h"
#include <windowsx.h>
#include <Evas_Engine_Direct3D.h>
static HWND window;
static HINSTANCE instance;
static LRESULT CALLBACK
MainWndProc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
switch (uMsg)
{
case WM_CREATE:
return 0;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
case WM_CLOSE:
PostQuitMessage(0);
return 0;
case WM_PAINT: {
PAINTSTRUCT ps;
HDC hdc;
hdc = BeginPaint (window, &ps);
evas_damage_rectangle_add(evas,
ps.rcPaint.left, ps.rcPaint.top,
ps.rcPaint.right - ps.rcPaint.left,
ps.rcPaint.bottom - ps.rcPaint.top);
EndPaint(window, &ps);
return 0;
}
case WM_SIZING:
{
PRECT rect = (PRECT)lParam;
evas_output_viewport_set(evas, 0, 0,
rect->right - rect->left,
rect->bottom - rect->top);
evas_output_size_set(evas,
rect->right - rect->left,
rect->bottom - rect->top);
win_w = rect->right - rect->left;
win_h = rect->bottom - rect->top;
return 0;
}
case WM_RBUTTONDOWN:
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
evas_event_feed_mouse_down(evas, 3, EVAS_BUTTON_NONE, 0, NULL);
return 0;
case WM_LBUTTONDOWN:
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
evas_event_feed_mouse_down(evas, 1, EVAS_BUTTON_NONE, 0, NULL);
return 0;
case WM_LBUTTONUP:
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
evas_event_feed_mouse_up(evas, 1, EVAS_BUTTON_NONE, 0, NULL);
return 0;
case WM_RBUTTONUP:
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
evas_event_feed_mouse_up(evas, 3, EVAS_BUTTON_NONE, 0, NULL);
return 0;
case WM_MOUSEMOVE:
if (!evas_pointer_inside_get(evas)) evas_event_feed_mouse_in(evas, 0, NULL);
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
return 0;
case WM_MOUSELEAVE:
evas_event_feed_mouse_out(evas, 0, NULL);
return 0;
/* FIXME : can't find an event when the mouse is entering */
case WM_KEYDOWN:
case WM_SYSKEYDOWN: {
int key;
key = LOWORD(wParam);
if ((key == VK_SHIFT) ||
(key == VK_LSHIFT) ||
(key == VK_RSHIFT))
evas_key_modifier_on(evas, "Shift");
if ((key == VK_CONTROL) ||
(key == VK_LCONTROL) ||
(key == VK_RCONTROL))
evas_key_modifier_on(evas, "Control");
if ((key == VK_MENU) ||
(key == VK_LMENU) ||
(key == VK_RMENU))
evas_key_modifier_on(evas, "Alt");
if ((key == VK_LWIN) ||
(key == VK_RWIN))
evas_key_modifier_on(evas, "Super");
if (key == VK_CAPITAL)
{
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock"))
evas_key_lock_off(evas, "Caps_Lock");
else
evas_key_lock_on(evas, "Caps_Lock");
}
if (key == VK_NUMLOCK)
{
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Num_Lock"))
evas_key_lock_off(evas, "Num_Lock");
else
evas_key_lock_on(evas, "Num_Lock");
}
if (key == VK_SCROLL)
{
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Scroll_Lock"))
evas_key_lock_off(evas, "Scroll_Lock");
else
evas_key_lock_on(evas, "Scroll_Lock");
}
if (key == VK_ESCAPE)
evas_event_feed_key_down(evas, "Escape", "Escape", NULL, NULL, 0, NULL);
if (key == VK_RETURN)
evas_event_feed_key_down(evas, "Return", "Return", NULL, NULL, 0, NULL);
if (key == VK_LEFT)
evas_event_feed_key_down(evas, "Left", "Left", NULL, NULL, 0, NULL);
if (key == VK_RIGHT)
evas_event_feed_key_down(evas, "Right", "Right", NULL, NULL, 0, NULL);
if (key == 81)
evas_event_feed_key_down(evas, "Q", "Q", NULL, NULL, 0, NULL);
if (key == 113)
evas_event_feed_key_down(evas, "q", "q", NULL, NULL, 0, NULL);
return 0;
}
case WM_KEYUP:
case WM_SYSKEYUP: {
int key;
key = LOWORD(wParam);
if ((key == VK_SHIFT) ||
(key == VK_LSHIFT) ||
(key == VK_RSHIFT))
evas_key_modifier_off(evas, "Shift");
if ((key == VK_CONTROL) ||
(key == VK_LCONTROL) ||
(key == VK_RCONTROL))
evas_key_modifier_off(evas, "Control");
if ((key == VK_MENU) ||
(key == VK_LMENU) ||
(key == VK_RMENU))
evas_key_modifier_off(evas, "Alt");
if ((key == VK_LWIN) ||
(key == VK_RWIN))
evas_key_modifier_off(evas, "Super");
if (key == VK_ESCAPE)
evas_event_feed_key_up(evas, "Escape", "Escape", NULL, NULL, 0, NULL);
if (key == VK_RETURN)
evas_event_feed_key_up(evas, "Return", "Return", NULL, NULL, 0, NULL);
if (key == VK_LEFT)
evas_event_feed_key_up(evas, "Left", "Left", NULL, NULL, 0, NULL);
if (key == VK_RIGHT)
evas_event_feed_key_up(evas, "Right", "Right", NULL, NULL, 0, NULL);
if (key == 81)
evas_event_feed_key_up(evas, "Q", "Q", NULL, NULL, 0, NULL);
if (key == 113)
evas_event_feed_key_up(evas, "q", "q", NULL, NULL, 0, NULL);
return 0;
}
default:
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
}
Eina_Bool
engine_direct3d_args(const char *engine, int width, int height)
{
WNDCLASS wc;
RECT rect;
HDC dc;
MSG msg;
Evas_Engine_Info_Direct3D *einfo;
DWORD style;
int depth;
int i;
instance = GetModuleHandle(NULL);
if (!instance) return EINA_FALSE;
wc.style = 0;
wc.lpfnWndProc = MainWndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = instance;
wc.hIcon = LoadIcon (NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor (NULL, IDC_ARROW);
wc.hbrBackground = GetSysColorBrush(COLOR_BTNFACE);
wc.lpszMenuName = NULL;
wc.lpszClassName = "Evas_Direct3D_Test";
if(!RegisterClass(&wc))
goto free_library;
rect.left = 0;
rect.top = 0;
rect.right = width;
rect.bottom = height;
AdjustWindowRect (&rect, WS_OVERLAPPEDWINDOW | WS_SIZEBOX, FALSE);
window = CreateWindowEx(0,
"Evas_Direct3D_Test",
"Evas_Direct3D_Test",
WS_OVERLAPPEDWINDOW | WS_SIZEBOX,
CW_USEDEFAULT, CW_USEDEFAULT,
rect.right - rect.left, rect.bottom - rect.top,
NULL, NULL, instance, NULL);
if (!window)
goto unregister_class;
/* make the window non resizable */
style = GetWindowLong(window, GWL_STYLE);
style &= ~WS_THICKFRAME;
if (!SetWindowLong(window, GWL_STYLE, style))
goto unregister_class;
dc = GetDC(NULL);
if (!dc)
goto destroy_window;
depth = GetDeviceCaps(dc, BITSPIXEL);
ReleaseDC(NULL, dc);
evas_output_method_set(evas, evas_render_method_lookup("direct3d"));
einfo = (Evas_Engine_Info_Direct3D *)evas_engine_info_get(evas);
if (!einfo)
{
fprintf(stderr, "Evas does not support the Direct3D Engine\n");
goto destroy_window;
}
einfo->info.window = window;
einfo->info.depth = depth;
einfo->info.rotation = 0;
if (!evas_engine_info_set(evas, (Evas_Engine_Info *)einfo))
{
printf("Evas can not setup the informations of the Direct3D Engine\n");
goto destroy_window;
}
/* the second parameter is ignored, as it's the first call of ShowWindow */
ShowWindow(window, SW_SHOWDEFAULT);
UpdateWindow(window);
return EINA_TRUE;
destroy_window:
DestroyWindow(window);
unregister_class:
UnregisterClass("Evas_Direct3D_Test", instance);
free_library:
FreeLibrary(instance);
return EINA_FALSE;
}
void
engine_direct3d_loop(void)
{
MSG msg;
int res;
again:
if (!PeekMessage (&msg, window, 0, 0, PM_NOREMOVE))
return;
res = GetMessage (&msg, NULL, 0, 0);
TranslateMessage (&msg);
DispatchMessage (&msg);
goto again;
}
void
engine_direct3d_shutdown(void)
{
DestroyWindow(window);
UnregisterClass("Evas_Direct3D_Test", instance);
FreeLibrary(instance);
}

View File

@ -0,0 +1 @@
HI_RES_AWARE CEUX {1}

View File

@ -0,0 +1,291 @@
#include "main.h"
#include <windowsx.h>
#include <Evas_Engine_Software_DDraw.h>
static HWND window;
static HINSTANCE instance;
static LRESULT CALLBACK
MainWndProc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
switch (uMsg)
{
case WM_CREATE:
return 0;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
case WM_CLOSE:
PostQuitMessage(0);
return 0;
case WM_WINDOWPOSCHANGED: {
PAINTSTRUCT ps;
HDC hdc;
hdc = BeginPaint (window, &ps);
evas_damage_rectangle_add(evas,
ps.rcPaint.left, ps.rcPaint.top,
ps.rcPaint.right - ps.rcPaint.left,
ps.rcPaint.bottom - ps.rcPaint.top);
EndPaint(window, &ps);
return 0;
}
case WM_SIZING:
{
PRECT rect = (PRECT)lParam;
evas_output_viewport_set(evas, 0, 0,
rect->right - rect->left,
rect->bottom - rect->top);
evas_output_size_set(evas,
rect->right - rect->left,
rect->bottom - rect->top);
win_w = rect->right - rect->left;
win_h = rect->bottom - rect->top;
return 0;
}
case WM_RBUTTONDOWN:
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
evas_event_feed_mouse_down(evas, 3, EVAS_BUTTON_NONE, 0, NULL);
return 0;
case WM_LBUTTONDOWN:
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
evas_event_feed_mouse_down(evas, 1, EVAS_BUTTON_NONE, 0, NULL);
return 0;
case WM_LBUTTONUP:
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
evas_event_feed_mouse_up(evas, 1, EVAS_BUTTON_NONE, 0, NULL);
return 0;
case WM_RBUTTONUP:
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
evas_event_feed_mouse_up(evas, 3, EVAS_BUTTON_NONE, 0, NULL);
return 0;
case WM_MOUSEMOVE:
if (!evas_pointer_inside_get(evas)) evas_event_feed_mouse_in(evas, 0, NULL);
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
return 0;
case WM_MOUSELEAVE:
evas_event_feed_mouse_out(evas, 0, NULL);
return 0;
/* FIXME : can't find an event when the mouse is entering */
case WM_KEYDOWN:
case WM_SYSKEYDOWN: {
int key;
key = LOWORD(wParam);
if ((key == VK_SHIFT) ||
(key == VK_LSHIFT) ||
(key == VK_RSHIFT))
evas_key_modifier_on(evas, "Shift");
if ((key == VK_CONTROL) ||
(key == VK_LCONTROL) ||
(key == VK_RCONTROL))
evas_key_modifier_on(evas, "Control");
if ((key == VK_MENU) ||
(key == VK_LMENU) ||
(key == VK_RMENU))
evas_key_modifier_on(evas, "Alt");
if ((key == VK_LWIN) ||
(key == VK_RWIN))
evas_key_modifier_on(evas, "Super");
if (key == VK_CAPITAL)
{
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock"))
evas_key_lock_off(evas, "Caps_Lock");
else
evas_key_lock_on(evas, "Caps_Lock");
}
if (key == VK_NUMLOCK)
{
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Num_Lock"))
evas_key_lock_off(evas, "Num_Lock");
else
evas_key_lock_on(evas, "Num_Lock");
}
if (key == VK_SCROLL)
{
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Scroll_Lock"))
evas_key_lock_off(evas, "Scroll_Lock");
else
evas_key_lock_on(evas, "Scroll_Lock");
}
if (key == VK_ESCAPE)
evas_event_feed_key_down(evas, "Escape", "Escape", NULL, NULL, 0, NULL);
if (key == VK_RETURN)
evas_event_feed_key_down(evas, "Return", "Return", NULL, NULL, 0, NULL);
if (key == VK_LEFT)
evas_event_feed_key_down(evas, "Left", "Left", NULL, NULL, 0, NULL);
if (key == VK_RIGHT)
evas_event_feed_key_down(evas, "Right", "Right", NULL, NULL, 0, NULL);
if (key == 81)
evas_event_feed_key_down(evas, "Q", "Q", NULL, NULL, 0, NULL);
if (key == 113)
evas_event_feed_key_down(evas, "q", "q", NULL, NULL, 0, NULL);
return 0;
}
case WM_KEYUP:
case WM_SYSKEYUP: {
int key;
key = LOWORD(wParam);
if ((key == VK_SHIFT) ||
(key == VK_LSHIFT) ||
(key == VK_RSHIFT))
evas_key_modifier_off(evas, "Shift");
if ((key == VK_CONTROL) ||
(key == VK_LCONTROL) ||
(key == VK_RCONTROL))
evas_key_modifier_off(evas, "Control");
if ((key == VK_MENU) ||
(key == VK_LMENU) ||
(key == VK_RMENU))
evas_key_modifier_off(evas, "Alt");
if ((key == VK_LWIN) ||
(key == VK_RWIN))
evas_key_modifier_off(evas, "Super");
if (key == VK_ESCAPE)
evas_event_feed_key_up(evas, "Escape", "Escape", NULL, NULL, 0, NULL);
if (key == VK_RETURN)
evas_event_feed_key_up(evas, "Return", "Return", NULL, NULL, 0, NULL);
if (key == VK_LEFT)
evas_event_feed_key_up(evas, "Left", "Left", NULL, NULL, 0, NULL);
if (key == VK_RIGHT)
evas_event_feed_key_up(evas, "Right", "Right", NULL, NULL, 0, NULL);
if (key == 81)
evas_event_feed_key_up(evas, "Q", "Q", NULL, NULL, 0, NULL);
if (key == 113)
evas_event_feed_key_up(evas, "q", "q", NULL, NULL, 0, NULL);
return 0;
}
default:
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
}
Eina_Bool
engine_software_ddraw_args(const char *engine, int width, int height)
{
WNDCLASS wc;
RECT rect;
HDC dc;
Evas_Engine_Info_Software_DDraw *einfo;
DWORD style;
DWORD exstyle;
int depth;
int i;
instance = GetModuleHandle(NULL);
if (!instance) return 0;
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = MainWndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = instance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = GetSysColorBrush(COLOR_BTNFACE);
wc.lpszMenuName = NULL;
wc.lpszClassName = "Evas_Software_DDraw_Test";
if(!RegisterClass(&wc))
goto free_library;
style = WS_OVERLAPPEDWINDOW | WS_SIZEBOX;
exstyle = 0;
rect.left = 0;
rect.top = 0;
rect.right = width;
rect.bottom = height;
AdjustWindowRectEx (&rect, style, FALSE, exstyle);
window = CreateWindowEx(exstyle,
"Evas_Software_DDraw_Test",
"Evas_Software_DDraw_Test",
style,
CW_USEDEFAULT, CW_USEDEFAULT,
rect.right - rect.left, rect.bottom - rect.top,
NULL, NULL, instance, NULL);
if (!window)
goto unregister_class;
/* make the window non resizable */
style = GetWindowLong(window, GWL_STYLE);
style &= ~WS_THICKFRAME;
if (!SetWindowLong(window, GWL_STYLE, style))
goto destroy_window;
dc = GetDC(NULL);
if (!dc)
goto destroy_window;
depth = GetDeviceCaps(dc, BITSPIXEL);
ReleaseDC(NULL, dc);
evas_output_method_set(evas, evas_render_method_lookup("software_ddraw"));
einfo = (Evas_Engine_Info_Software_DDraw *)evas_engine_info_get(evas);
if (!einfo)
{
fprintf(stderr, "Evas does not support the Software DirectDraw Engine\n");
goto destroy_window;
}
einfo->info.window = window;
einfo->info.depth = depth;
einfo->info.rotation = 0;
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
{
printf("Evas can not setup the informations of the Software DirectDraw Engine\n");
goto destroy_window;
}
/* the second parameter is ignored, as it's the first call of ShowWindow */
ShowWindow(window, SW_SHOWDEFAULT);
UpdateWindow(window);
return 1;
destroy_window:
DestroyWindow(window);
unregister_class:
UnregisterClass("Evas_Software_DDraw_Test", instance);
free_library:
FreeLibrary(instance);
return 0;
}
void
engine_software_ddraw_loop(void)
{
MSG msg;
int res;
again:
if (!PeekMessage (&msg, window, 0, 0, PM_NOREMOVE))
return;
res = GetMessage (&msg, NULL, 0, 0);
TranslateMessage (&msg);
DispatchMessage (&msg);
goto again;
}
void
engine_software_ddraw_shutdown(void)
{
DestroyWindow(window);
UnregisterClass("Evas_Software_DDraw_Test", instance);
FreeLibrary(instance);
}

View File

@ -1,7 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
import sys
import os
import os.path
@ -58,16 +56,10 @@ tests = []
for f in files:
d = data[f] = {}
for row in csv.reader(open(f)):
if len(row) < 2:
continue
t = row[1].strip()
try:
val = float(row[0])
except ValueError:
continue
if f == ref_f:
tests.append(t)
d[t] = val
d[t] = float(row[0])
max_test_name = max(len(t), max_test_name)
def report_text():
@ -76,12 +68,12 @@ def report_text():
fmtsize = len(options.format % {"value": 12345.67, "percentual": 1234.56})
hdrfmt = "%%%d.%ds" % (fmtsize, fmtsize)
print(test_name_fmt % "\\", end=' ')
print("%7.7s" % (files[0][-7:],), end=' ')
print test_name_fmt % "\\",
print "%7.7s" % (files[0][-7:],),
for f in files[1:]:
n, e = os.path.splitext(f)
print(hdrfmt % n[-fmtsize:], end=' ')
print()
print hdrfmt % n[-fmtsize:],
print
if options.color and os.environ.get("TERM", "") in (
"xterm", "xterm-color", "rxvt", "rxvt-unicode", "screen",
@ -98,14 +90,14 @@ def report_text():
def print_row(test):
print(test_name_fmt % test, end=' ')
print test_name_fmt % test,
ref_val = data[ref_f][test]
print("%7.2f" % ref_val, end=' ')
print "%7.2f" % ref_val,
for f in others_f:
try:
val = data[f][test]
except KeyError:
print("-?????-", end=' ')
print "-?????-",
continue
percent = (val - ref_val) / ref_val
@ -119,9 +111,9 @@ def report_text():
fmt = options.format % {"value": val, "percentual": percent * 100}
if len(fmt) < fmtsize:
fmt = hdrfmt % fmt
print("%s%s%s" % (c, fmt, color_reset), end=' ')
print "%s%s%s" % (c, fmt, color_reset),
print()
print
for t in tests:
print_row(t)
@ -131,7 +123,7 @@ def report_html():
import time
fnames = [os.path.basename(f) for f in files]
print("""\
print """\
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -164,9 +156,9 @@ def report_html():
border-bottom: 1px dashed #ccc;
}
td.test-name, thead tr td { text-align: right; }\
""")
"""
if options.color:
print("""\
print """\
td.value-good { background-color: #aaffaa; }
td.value-bad { background-color: #ffaaaa; }
td.value-missing { background-color: #ffffaa; }
@ -176,9 +168,9 @@ def report_html():
background-color: #d9d9d9;
border-bottom: 1px dashed #ccc;
}
""")
"""
print("""
print """
</style>
<body>
<p>Comparison sheet for %(files)s, created at %(date)s.</p>
@ -188,17 +180,17 @@ def report_html():
<td>\\</td>\
""" % {"files": ", ".join(fnames),
"date": time.asctime(),
})
}
for f in fnames:
print("""\
print """\
<td>%s</td>\
""" % f)
print("""\
""" % f
print """\
</tr>
</thead>
<tbody>\
""")
"""
def print_row(test):
ref_val = data[ref_f][test]
@ -207,19 +199,19 @@ def report_html():
else:
extra_cls = ""
print("""\
print """\
<tr%s>
<td class="test-name">%s</td>
<td class="value-reference">%7.2f</td>\
""" % (extra_cls, test, ref_val))
""" % (extra_cls, test, ref_val)
for f in others_f:
try:
val = data[f][test]
except KeyError:
print("""\
print """\
<td class="value-missing">-?????-</td>\
""")
"""
continue
percent = (val - ref_val) / ref_val
@ -232,23 +224,23 @@ def report_html():
v = options.format % {"value": val, "percentual": percent * 100}
print("""\
print """\
<td class="value-%s">%s</td>\
""" % (c, v))
""" % (c, v)
print("""\
print """\
</tr>\
""")
"""
for t in tests:
print_row(t)
print("""\
print """\
</tbody>
</table>
</body>
</html>
""")
"""
if options.report == "text":
report_text()

View File

@ -1,5 +1,3 @@
#define EFL_GFX_FILTER_BETA
#undef FNAME
#undef NAME
#undef ICON
@ -52,15 +50,15 @@ static void _cleanup(void)
static void _loop(double t, int f)
{
char buf[256];
char *str = "padding_set({ %d });blur({%d,color=black });";
char *str = "padding_set(%d);blur(%d,color=black);";
sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1));
efl_gfx_filter_program_set(text, buf, "test");
eo_do(text, evas_obj_text_filter_program_set(buf));
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -92,7 +90,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -1,5 +1,3 @@
#define EFL_GFX_FILTER_BETA
#undef FNAME
#undef NAME
#undef ICON
@ -54,15 +52,15 @@ static void _cleanup(void)
static void _loop(double t, int f)
{
char buf[256];
char *str = "a = buffer({ 'rgba' }); padding_set({ %d }); blend({dst=a, color=darkblue});blur({%d,src=a});";
char *str = "buffer:a(rgba);padding_set(%d);blend(dst=a,color=darkblue);blur(%d,src=a);";
sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1));
efl_gfx_filter_program_set(text, buf, "test");
eo_do(text, evas_obj_text_filter_program_set(buf));
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -94,7 +92,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -23,11 +23,12 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("bar.png"), NULL);
efl_gfx_image_border_insets_set(o, 6, 6, 6, 6);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("bar.png"), NULL),
evas_obj_image_border_set(6, 6, 6, 6),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -36,7 +37,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -54,15 +55,16 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -94,7 +96,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -23,12 +23,13 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("pan.png"), NULL);
efl_gfx_color_set(o, 64, 64, 64, 255);
efl_gfx_image_border_insets_set(o, 3, 3, 3, 3);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("pan.png"), NULL),
evas_obj_color_set(64, 64, 64, 255),
evas_obj_image_border_set(3, 3, 3, 3),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -37,7 +38,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -55,15 +56,16 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -95,7 +97,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -25,15 +25,17 @@ static void _setup(void)
{
int a;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160));
a = 256 - (1 << ((rnd() % 8) + 1));
if (a < 128) a = 128;
efl_gfx_color_set(o, a, a, a, a);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_color_set(a, a, a, a),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -42,7 +44,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -58,13 +60,13 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -96,7 +98,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -24,14 +24,15 @@ static void _setup(void)
for (i = 0; i < OBNUM; i++)
{
int a;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
a = rnd()&0xff;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_color_set(o, a, a, a, a);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_color_set(a, a, a, a),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -40,7 +41,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -56,13 +57,13 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -94,7 +95,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -25,16 +25,17 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < MANYNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
n = rnd() % 100;
w = 3 + ((n * (60 - 3)) / 100);
h = 4 + ((n * (80 - 4)) / 100);
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 1);
efl_gfx_entity_size_set(o, EINA_SIZE2D(w, h));
efl_gfx_fill_set(o, EINA_RECT(0, 0, w, h));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_smooth_scale_set(1),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -43,7 +44,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < MANYNUM; i++) efl_del(o_images[i]);
for (i = 0; i < MANYNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -53,18 +54,18 @@ static void _loop(double t, int f)
Evas_Coord x, y, w, h;
for (i = 0; i < MANYNUM; i++)
{
exp_size_get(o_images[i], &w, &h);
eo_do(o_images[i], evas_obj_size_get(&w, &h));
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (win_w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (win_h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -96,7 +97,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -23,11 +23,12 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -36,7 +37,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -54,15 +55,16 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -94,7 +96,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -23,11 +23,12 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -36,7 +37,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -54,15 +55,16 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -94,7 +96,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -23,11 +23,12 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -36,7 +37,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -54,15 +55,16 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -94,7 +96,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -23,11 +23,12 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -36,7 +37,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -54,15 +55,16 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -94,7 +96,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -24,11 +24,11 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i < (OBNUM / 2))
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
eo_do(o, evas_obj_image_file_set(build_path("logo.png"), NULL));
}
else
{
@ -36,12 +36,14 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -50,7 +52,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -68,14 +70,14 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -107,7 +109,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -27,11 +27,11 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i < (OBNUM / 2))
{
efl_file_simple_load(o, PACKAGE_DATA_DIR"/data/logo.png", NULL);
eo_do(o, evas_obj_image_file_set(PACKAGE_DATA_DIR"/data/logo.png", NULL));
}
else
{
@ -39,12 +39,14 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, PACKAGE_DATA_DIR"/data/image.png", NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
eo_do(o,
evas_obj_image_file_set(PACKAGE_DATA_DIR"/data/image.png", NULL),
evas_obj_position_set(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -53,13 +55,12 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
static void _loop(double t, int f)
{
static int k = 0;
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
@ -69,18 +70,17 @@ static void _loop(double t, int f)
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
}
}
++k;
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -112,7 +112,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -27,11 +27,11 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i < (OBNUM / 2))
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
eo_do(o, evas_obj_image_file_set(build_path("logo.png"), NULL));
}
else
{
@ -39,12 +39,14 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -53,7 +55,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -71,14 +73,14 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -110,7 +112,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -27,11 +27,11 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i < (OBNUM / 2))
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
eo_do(o, evas_obj_image_file_set(build_path("logo.png"), NULL));
}
else
{
@ -39,12 +39,14 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -53,7 +55,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -71,14 +73,14 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -110,7 +112,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -24,11 +24,11 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i & 0x1)
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
eo_do(o, evas_obj_image_file_set(build_path("logo.png"), NULL));
}
else
{
@ -36,12 +36,14 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -50,7 +52,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -68,14 +70,14 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -107,7 +109,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -27,11 +27,11 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i & 0x1)
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
eo_do(o, evas_obj_image_file_set(build_path("logo.png"), NULL));
}
else
{
@ -39,12 +39,14 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -53,13 +55,12 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
static void _loop(double t, int f)
{
static int k = 0;
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
@ -69,18 +70,17 @@ static void _loop(double t, int f)
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
}
}
k++;
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -112,7 +112,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -27,11 +27,11 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i & 0x1)
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
eo_do(o, evas_obj_image_file_set(build_path("logo.png"), NULL));
}
else
{
@ -39,12 +39,14 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -53,7 +55,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -71,14 +73,14 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -110,7 +112,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -27,11 +27,11 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i & 0x1)
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
eo_do(o, evas_obj_image_file_set(build_path("logo.png"), NULL));
}
else
{
@ -39,12 +39,14 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -53,7 +55,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -71,14 +73,14 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -110,7 +112,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -24,11 +24,11 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i > (OBNUM / 2))
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
eo_do(o, evas_obj_image_file_set(build_path("logo.png"), NULL));
}
else
{
@ -36,12 +36,14 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -50,7 +52,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -68,14 +70,14 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -107,7 +109,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -27,11 +27,11 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i > (OBNUM / 2))
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
eo_do(o, evas_obj_image_file_set(build_path("logo.png"), NULL));
}
else
{
@ -39,12 +39,14 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -53,34 +55,32 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
static void _loop(double t, int f)
{
static int k = 0;
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
if (i < (OBNUM / 2))
if (i > (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
eo_do(o_images[i], evas_obj_position_set(x, y));
}
}
++k;
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -112,7 +112,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -27,11 +27,11 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i > (OBNUM / 2))
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
eo_do(o, evas_obj_image_file_set(build_path("logo.png"), NULL));
}
else
{
@ -39,12 +39,14 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -53,7 +55,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -71,14 +73,14 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -110,7 +112,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -27,11 +27,11 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i > (OBNUM / 2))
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
eo_do(o, evas_obj_image_file_set(build_path("logo.png"), NULL));
}
else
{
@ -39,12 +39,14 @@ static void _setup(void)
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_position_set(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -53,7 +55,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -71,14 +73,14 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -110,7 +112,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -23,11 +23,12 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 1);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_smooth_scale_set(1),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -36,7 +37,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -54,15 +55,16 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -94,7 +96,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -23,11 +23,12 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 1);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_smooth_scale_set(1),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -36,7 +37,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -54,15 +55,16 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -94,7 +96,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -23,11 +23,12 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 1);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_image_smooth_scale_set(1),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -36,7 +37,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -54,15 +55,16 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -94,7 +96,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -23,11 +23,12 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 1);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_image_smooth_scale_set(1),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -36,7 +37,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -54,15 +55,16 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -94,7 +96,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -1,103 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_blend_solid_9patch_start
#define NAME "Image Blend Solid 9patch"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("9patch_test.9.png"), NULL);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h, w0, h0;
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW))) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW))) * w0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -23,11 +23,12 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("frame.png"), NULL);
efl_gfx_image_border_insets_set(o, 8, 8, 8, 8);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("frame.png"), NULL),
evas_obj_image_border_set(8, 8, 8, 8),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -36,7 +37,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -54,15 +55,16 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -94,7 +96,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -25,15 +25,17 @@ static void _setup(void)
{
int a;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160));
a = 256 - (1 << ((rnd() % 8) + 1));
if (a < 128) a = 128;
efl_gfx_color_set(o, a, a, a, a);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_color_set(a, a, a, a),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -42,7 +44,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -58,13 +60,13 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -96,7 +98,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -25,14 +25,16 @@ static void _setup(void)
{
int a;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160));
a = rnd()&0xff;
efl_gfx_color_set(o, a, a, a, a);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_color_set(a, a, a, a),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -41,7 +43,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -57,13 +59,13 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -95,7 +97,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -23,12 +23,13 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("bar.png"), NULL);
efl_gfx_image_border_insets_set(o, 6, 6, 6, 6);
efl_gfx_image_center_fill_mode_set(o, EFL_GFX_CENTER_FILL_MODE_SOLID);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("bar.png"), NULL),
evas_obj_image_border_set(6, 6, 6, 6),
evas_obj_image_border_center_fill_set(EVAS_BORDER_FILL_SOLID),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -37,7 +38,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -55,15 +56,16 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -95,7 +97,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -23,14 +23,15 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_image_border_insets_set(o, 43, 48, 48, 83);
efl_gfx_image_center_fill_mode_set(o, EFL_GFX_CENTER_FILL_MODE_SOLID);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_image_border_set(43, 48, 48, 83),
evas_obj_image_border_center_fill_set(EVAS_BORDER_FILL_SOLID),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -39,7 +40,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -55,13 +56,13 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -93,7 +94,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -1,109 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_blend_solid_stretch_start
#define NAME "Image Blend Solid Stretch"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
// Each offset is relative to the last block
static const Efl_Gfx_Image_Stretch_Region hsz[] = { { 8, 8 }, { 16, 55 } };
static const Efl_Gfx_Image_Stretch_Region vsz[] = { { 8, 8 }, { 16, 12 } };
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("stretch.png"), NULL);
efl_gfx_image_stretch_region_set(o, EINA_C_ARRAY_ITERATOR_NEW(hsz),
EINA_C_ARRAY_ITERATOR_NEW(vsz));
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h, w0, h0;
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW))) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW))) * w0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -23,12 +23,13 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -37,7 +38,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -53,13 +54,13 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -91,7 +92,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -23,12 +23,13 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -37,7 +38,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -53,13 +54,13 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -91,7 +92,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -22,19 +22,21 @@ static void _setup(void)
{
Evas_Object *o;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[0] = o;
efl_file_simple_load(o, build_path("im1.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("im1.png"), NULL),
evas_obj_image_fill_set(0, 0, 720, 420),
evas_obj_size_set(720, 420),
evas_obj_visibility_set(EINA_TRUE));
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[1] = o;
efl_file_simple_load(o, build_path("im2.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("im2.png"), NULL),
evas_obj_image_fill_set(0, 0, 720, 420),
evas_obj_size_set(720, 420),
evas_obj_visibility_set(EINA_TRUE));
done = 0;
}
@ -43,7 +45,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < 2; i++) efl_del(o_images[i]);
for (i = 0; i < 2; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -53,12 +55,12 @@ static void _loop(double t, int f)
a = f & 0x1f;
a = ((a << 3) | (a >> 2)) & 0xff;
efl_gfx_color_set(o_images[1], a, a, a, a);
eo_do(o_images[1], evas_obj_color_set(a, a, a, a));
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -90,7 +92,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -20,21 +20,20 @@ static Evas_Object *o_images[1];
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
Eina_Slice sl;
sl.len = 640 * 480 * 4;
sl.mem = malloc(sl.len);
for (int i = 0; i < 1; i++)
for (i = 0; i < 1; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_gfx_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
efl_gfx_buffer_alpha_set(o, 0);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 640, 480));
efl_gfx_entity_size_set(o, EINA_SIZE2D(640, 480));
efl_gfx_entity_visible_set(o, EINA_TRUE);
efl_gfx_buffer_managed_set(o, &sl, EINA_SIZE2D(640, 480), 0, EFL_GFX_COLORSPACE_ARGB8888, 0);
eo_do(o,
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
evas_obj_image_colorspace_set(EVAS_COLORSPACE_ARGB8888),
evas_obj_image_size_set(640, 480),
evas_obj_image_alpha_set(0),
evas_obj_image_fill_set(0, 0, 640, 480),
evas_obj_size_set(640, 480),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -42,45 +41,31 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
for (int i = 0; i < 1; i++)
{
Evas_Object *o = o_images[i];
Eina_Slice sl = {};
sl = efl_gfx_buffer_managed_get(o, 0);
free((void *) sl.mem);
efl_del(o);
}
int i;
for (i = 0; i < 1; i++) eo_del(o_images[i]);
}
/* loop - do things */
static void _loop(double t, int f)
{
for (int i = 0; i < 1; i++)
int i, st;
Evas_Coord x, y, w, h;
for (i = 0; i < 1; i++)
{
Evas_Object *o = o_images[i];
unsigned int *data, *p;
Evas_Coord x, y, w, h;
Eina_Rw_Slice sl = {};
int st;
w = 640;
h = 480;
x = (win_w / 2) - (w / 2);
y = (win_h / 2) - (h / 2);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o, EINA_SIZE2D(w, h));
efl_gfx_fill_set(o, EINA_RECT(0, 0, w, h));
sl = efl_gfx_buffer_map(o, EFL_GFX_BUFFER_ACCESS_MODE_WRITE,
&EINA_RECT(0, 0, w, h), EFL_GFX_COLORSPACE_ARGB8888, 0, &st);
data = sl.mem;
if (!data)
{
fprintf(stderr, "ERROR: Failed to map image!\n");
continue;
}
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h),
data = evas_obj_image_data_get(1),
st = evas_obj_image_stride_get());
st = st >> 2;
p = sl.mem;
p = data;
for (y = 0; y < h; y++)
{
for (x = 0; x < w; x++)
@ -90,14 +75,15 @@ static void _loop(double t, int f)
}
p += (st - w);
}
efl_gfx_buffer_unmap(o, sl);
efl_gfx_buffer_update_add(o, &EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_image_data_set(data),
evas_obj_image_data_update_add( 0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -129,7 +115,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -20,21 +20,20 @@ static Evas_Object *o_images[1];
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
Eina_Slice sl;
sl.len = 640 * 480 * 4;
sl.mem = malloc(sl.len);
for (int i = 0; i < 1; i++)
for (i = 0; i < 1; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_gfx_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
efl_gfx_buffer_alpha_set(o, 1);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 640, 480));
efl_gfx_entity_size_set(o, EINA_SIZE2D(640, 480));
efl_gfx_entity_visible_set(o, EINA_TRUE);
efl_gfx_buffer_managed_set(o, &sl, EINA_SIZE2D(640, 480), 0, EFL_GFX_COLORSPACE_ARGB8888, 0);
eo_do(o,
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
evas_obj_image_colorspace_set(EVAS_COLORSPACE_ARGB8888),
evas_obj_image_size_set(640, 480),
evas_obj_image_alpha_set(1),
evas_obj_image_fill_set(0, 0, 640, 480),
evas_obj_size_set(640, 480),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -42,15 +41,8 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
for (int i = 0; i < 1; i++)
{
Evas_Object *o = o_images[i];
Eina_Slice sl = {};
sl = efl_gfx_buffer_managed_get(o, 0);
free((void *) sl.mem);
efl_del(o);
}
int i;
for (i = 0; i < 1; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -58,30 +50,22 @@ static void _loop(double t, int f)
{
int i, st;
Evas_Coord x, y, w, h;
for (i = 0; i < 1; i++)
{
Evas_Object *o = o_images[i];
unsigned int *p;
Eina_Rw_Slice sl = {};
unsigned int *data, *p;
int a, r, g, b;
w = 640;
h = 480;
x = (win_w / 2) - (w / 2);
y = (win_h / 2) - (h / 2);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o, EINA_SIZE2D(w, h));
efl_gfx_fill_set(o, EINA_RECT(0, 0, w, h));
sl = efl_gfx_buffer_map(o, EFL_GFX_BUFFER_ACCESS_MODE_WRITE,
&EINA_RECT(0, 0, w, h), EFL_GFX_COLORSPACE_ARGB8888, 0, &st);
if (!sl.mem)
{
fprintf(stderr, "ERROR: Failed to map image!\n");
continue;
}
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h),
data = evas_obj_image_data_get(1),
st = evas_obj_image_stride_get());
st = st >> 2;
p = sl.mem;
p = data;
for (y = 0; y < h; y++)
{
for (x = 0; x < w; x++)
@ -102,14 +86,15 @@ static void _loop(double t, int f)
}
p += (st - w);
}
efl_gfx_buffer_unmap(o, sl);
efl_gfx_buffer_update_add(o, &EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_image_data_set(data),
evas_obj_image_data_update_add( 0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -141,7 +126,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -16,34 +16,56 @@ static int done = 0;
/* private data */
static Evas_Object *o_images[1];
static Eina_Slice slice[3];
static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
/* setup */
static void _setup(void)
{
int i, y;
FILE *f;
for (int i = 0; i < 1; i++)
unsigned char **data, **lp;
Evas_Object *o;
for (i = 0; i < 1; i++)
{
Evas_Object *o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_gfx_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
efl_gfx_buffer_alpha_set(o, 0);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 640, 480));
efl_gfx_entity_size_set(o, EINA_SIZE2D(640, 480));
efl_gfx_entity_visible_set(o, EINA_TRUE);
slice[0].len = 640 * 480;
slice[1].len = 320 * 240;
slice[2].len = 320 * 240;
eo_do(o,
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL),
evas_obj_image_size_set(640, 480),
evas_obj_image_alpha_set(0),
evas_obj_image_fill_set(0, 0, 640, 480),
evas_obj_size_set(640, 480),
evas_obj_visibility_set(EINA_TRUE));
yp = malloc(640 * 480);
up = malloc(320 * 240);
vp = malloc(320 * 240);
f = fopen(build_path("tp.yuv"), "rb");
if (!f) continue;
for (int p = 0; p < 3; p++)
if (f)
{
slice[p].mem = malloc(slice[p].len);
fread((void *) slice[p].mem, slice[p].len, 1, f);
efl_gfx_buffer_managed_set(o, &slice[p], EINA_SIZE2D(640, 480), 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, p);
fread(yp, 640 * 480, 1, f);
fread(up, 320 * 240, 1, f);
fread(vp, 320 * 240, 1, f);
fclose(f);
}
fclose(f);
data = evas_object_image_data_get(o_images[i], 1);
lp = data;
for (y = 0; y < 480; y++)
{
*lp = yp + (y * 640);
lp++;
}
for (y = 0; y < 240; y++)
{
*lp = up + (y * 320);
lp++;
}
for (y = 0; y < 240; y++)
{
*lp = vp + (y * 320);
lp++;
}
eo_do(o_images[i], evas_obj_image_data_set(data));
}
done = 0;
}
@ -51,16 +73,11 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
for (int i = 0; i < 1; i++)
{
Evas_Object *o = o_images[i];
for (int p = 0; p < 3; p++)
{
efl_gfx_buffer_managed_set(o, NULL, EINA_SIZE2D(640, 480), 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, p);
free((void *) slice[p].mem);
}
efl_del(o);
}
int i;
for (i = 0; i < 1; i++) eo_del(o_images[i]);
free(yp);
free(up);
free(vp);
}
/* loop - do things */
@ -74,16 +91,17 @@ static void _loop(double t, int f)
h = 480;
x = (win_w / 2) - (w / 2);
y = (win_h / 2) - (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
efl_gfx_buffer_update_add(o_images[i], &EINA_RECT(0, 0, 640, 480));
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h),
evas_obj_image_data_update_add( 0, 0, 640, 480));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -115,7 +133,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -16,34 +16,57 @@ static int done = 0;
/* private data */
static Evas_Object *o_images[1];
static Eina_Slice slice[3];
static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
/* setup */
static void _setup(void)
{
int i, y;
FILE *f;
for (int i = 0; i < 1; i++)
unsigned char **data, **lp;
Evas_Object *o;
for (i = 0; i < 1; i++)
{
Evas_Object *o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_gfx_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
efl_gfx_buffer_alpha_set(o, 0);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 640, 480));
efl_gfx_entity_size_set(o, EINA_SIZE2D(640, 480));
efl_gfx_entity_visible_set(o, EINA_TRUE);
slice[0].len = 640 * 480;
slice[1].len = 320 * 240;
slice[2].len = 320 * 240;
eo_do(o,
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL),
evas_obj_image_size_set(640, 480),
evas_obj_image_alpha_set(0),
evas_obj_image_fill_set(0, 0, 640, 480),
evas_obj_size_set(640, 480),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
yp = malloc(640 * 480);
up = malloc(320 * 240);
vp = malloc(320 * 240);
f = fopen(build_path("tp.yuv"), "rb");
if (!f) continue;
for (int p = 0; p < 3; p++)
if (f)
{
slice[p].mem = malloc(slice[p].len);
fread((void *) slice[p].mem, slice[p].len, 1, f);
efl_gfx_buffer_managed_set(o, &slice[p], EINA_SIZE2D(640, 480), 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, p);
fread(yp, 640 * 480, 1, f);
fread(up, 320 * 240, 1, f);
fread(vp, 320 * 240, 1, f);
fclose(f);
}
fclose(f);
data = evas_object_image_data_get(o_images[i], 1);
lp = data;
for (y = 0; y < 480; y++)
{
*lp = yp + (y * 640);
lp++;
}
for (y = 0; y < 240; y++)
{
*lp = up + (y * 320);
lp++;
}
for (y = 0; y < 240; y++)
{
*lp = vp + (y * 320);
lp++;
}
eo_do(o_images[i], evas_obj_image_data_set(data));
}
done = 0;
}
@ -51,16 +74,11 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
for (int i = 0; i < 1; i++)
{
Evas_Object *o = o_images[i];
for (int p = 0; p < 3; p++)
{
efl_gfx_buffer_managed_set(o, NULL, EINA_SIZE2D(640, 480), 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, p);
free((void *) slice[p].mem);
}
efl_del(o);
}
int i;
for (i = 0; i < 1; i++) eo_del(o_images[i]);
free(yp);
free(up);
free(vp);
}
/* loop - do things */
@ -82,14 +100,15 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -121,7 +140,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -16,34 +16,56 @@ static int done = 0;
/* private data */
static Evas_Object *o_images[1];
static Eina_Slice slice[3];
static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
/* setup */
static void _setup(void)
{
int i, y;
FILE *f;
for (int i = 0; i < 1; i++)
unsigned char **data, **lp;
Evas_Object *o;
for (i = 0; i < 1; i++)
{
Evas_Object *o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_gfx_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
efl_gfx_buffer_alpha_set(o, 0);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 640, 480));
efl_gfx_entity_size_set(o, EINA_SIZE2D(640, 480));
efl_gfx_entity_visible_set(o, EINA_TRUE);
slice[0].len = 640 * 480;
slice[1].len = 320 * 240;
slice[2].len = 320 * 240;
eo_do(o,
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL),
evas_obj_image_size_set(640, 480),
evas_obj_image_alpha_set(0),
evas_obj_image_fill_set(0, 0, 640, 480),
evas_obj_size_set(640, 480),
evas_obj_visibility_set(EINA_TRUE));
yp = malloc(640 * 480);
up = malloc(320 * 240);
vp = malloc(320 * 240);
f = fopen(build_path("tp.yuv"), "rb");
if (!f) continue;
for (int p = 0; p < 3; p++)
if (f)
{
slice[p].mem = malloc(slice[p].len);
fread((void *) slice[p].mem, slice[p].len, 1, f);
efl_gfx_buffer_managed_set(o, &slice[p], EINA_SIZE2D(640, 480), 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, p);
fread(yp, 640 * 480, 1, f);
fread(up, 320 * 240, 1, f);
fread(vp, 320 * 240, 1, f);
fclose(f);
}
fclose(f);
data = evas_object_image_data_get(o_images[i], 1);
lp = data;
for (y = 0; y < 480; y++)
{
*lp = yp + (y * 640);
lp++;
}
for (y = 0; y < 240; y++)
{
*lp = up + (y * 320);
lp++;
}
for (y = 0; y < 240; y++)
{
*lp = vp + (y * 320);
lp++;
}
eo_do(o_images[i], evas_obj_image_data_set(data));
}
done = 0;
}
@ -51,16 +73,11 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
for (int i = 0; i < 1; i++)
{
Evas_Object *o = o_images[i];
for (int p = 0; p < 3; p++)
{
efl_gfx_buffer_managed_set(o, NULL, EINA_SIZE2D(640, 480), 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, p);
free((void *) slice[p].mem);
}
efl_del(o);
}
int i;
for (i = 0; i < 1; i++) eo_del(o_images[i]);
free(yp);
free(up);
free(vp);
}
/* loop - do things */
@ -81,14 +98,15 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -120,7 +138,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -16,40 +16,61 @@ static int done = 0;
/* private data */
static Evas_Object *o_images[1];
static Eina_Slice slice[3];
static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
/* setup */
static void _setup(void)
{
int stride;
int i, y;
FILE *f;
int w = 320 - 16;
for (int i = 0; i < 1; i++)
unsigned char **data, **lp;
Evas_Object *o;
for (i = 0; i < 1; i++)
{
Evas_Object *o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_gfx_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
efl_gfx_buffer_alpha_set(o, 0);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 640, 480));
efl_gfx_entity_size_set(o, EINA_SIZE2D(640, 480));
efl_gfx_entity_visible_set(o, EINA_TRUE);
// in this test, the stride is 640 but the width changes
slice[0].len = 640 * 480;
slice[1].len = 320 * 240;
slice[2].len = 320 * 240;
eo_do(o,
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL),
evas_obj_image_size_set(320, 480),
evas_obj_image_alpha_set(0),
evas_obj_image_fill_set(0, 0, 640, 480),
evas_obj_size_set(640, 480),
evas_obj_visibility_set(EINA_TRUE));
yp = malloc(640 * 480);
up = malloc(320 * 240);
vp = malloc(320 * 240);
f = fopen(build_path("tp.yuv"), "rb");
if (!f) continue;
stride = 640;
for (int p = 0; p < 3; p++)
if (f)
{
slice[p].mem = malloc(slice[p].len);
fread((void *) slice[p].mem, slice[p].len, 1, f);
efl_gfx_buffer_managed_set(o, &slice[p], EINA_SIZE2D(w, 480), stride,
EFL_GFX_COLORSPACE_YCBCR422P601_PL, p);
stride = 320;
fread(yp, 640 * 480, 1, f);
fread(up, 320 * 240, 1, f);
fread(vp, 320 * 240, 1, f);
fclose(f);
}
data = evas_object_image_data_get(o_images[i], 1);
if (data)
{
lp = data;
for (y = 0; y < 480; y++)
{
*lp = yp + (y * 640);
lp++;
}
for (y = 0; y < 240; y++)
{
*lp = up + (y * 320);
lp++;
}
for (y = 0; y < 240; y++)
{
*lp = vp + (y * 320);
lp++;
}
eo_do(o_images[i],
evas_obj_image_data_set(data),
evas_obj_image_data_update_add( 0, 0, 320, 480));
}
fclose(f);
}
done = 0;
}
@ -57,17 +78,11 @@ static void _setup(void)
/* cleanup */
static void _cleanup(void)
{
for (int i = 0; i < 1; i++)
{
Evas_Object *o = o_images[i];
for (int p = 0; p < 3; p++)
{
efl_gfx_buffer_managed_set(o, NULL, EINA_SIZE2D(640, 480), 0,
EFL_GFX_COLORSPACE_YCBCR422P601_PL, p);
free((void *) slice[p].mem);
}
efl_del(o);
}
int i;
for (i = 0; i < 1; i++) eo_del(o_images[i]);
free(yp);
free(up);
free(vp);
}
/* loop - do things */
@ -77,39 +92,53 @@ static void _loop(double t, int f)
Evas_Coord x, y, w, h;
for (i = 0; i < 1; i++)
{
Evas_Object *o = o_images[i];
Eina_Slice sl[3];
int stride;
for (int p = 0; p < 3; p++)
sl[p] = efl_gfx_buffer_managed_get(o, p);
unsigned char **data, **lp;
w = 640;
h = 480;
x = (win_w / 2) - (w / 2);
y = (win_h / 2) - (h / 2);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o, EINA_SIZE2D(w, h));
efl_gfx_fill_set(o, EINA_RECT(0, 0, w, h));
eo_do(o_images[i],
evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
// logic here differs a bit from old expedite
w = 320 - 16 + (f * 2) % 336;
if (w > 640) w = 320;
w = 320 - 16 + f;
if (w < 1) w = 1;
else if (w > 640) w = 640;
stride = 640;
for (int p = 0; p < 3; p++)
{
efl_gfx_buffer_managed_set(o, &sl[p], EINA_SIZE2D(w, 480), stride,
EFL_GFX_COLORSPACE_YCBCR422P601_PL, p);
stride = 320;
}
efl_gfx_buffer_update_add(o, &EINA_RECT(0, 0, w, 480));
w &= ~0x1;
eo_do(o_images[i], evas_obj_image_size_set(w, 480));
data = evas_object_image_data_get(o_images[i], 1);
if (data)
{
lp = data;
for (y = 0; y < 480; y++)
{
*lp = yp + (y * 640);
lp++;
}
for (y = 0; y < 240; y++)
{
*lp = up + (y * 320);
lp++;
}
for (y = 0; y < 240; y++)
{
*lp = vp + (y * 320);
lp++;
}
eo_do(o_images[i],
evas_obj_image_data_set(data),
evas_obj_image_data_update_add( 0, 0, w, 480));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -141,7 +170,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -54,14 +54,15 @@ _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
{
Evas_Object *o;
char buf[256];
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
c->side[i].o = o;
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
efl_file_simple_load(o, build_path(buf), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 256, 256));
efl_gfx_entity_size_set(o, EINA_SIZE2D(256, 256));
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path(buf), NULL),
evas_obj_image_fill_set(0, 0, 256, 256),
evas_obj_size_set(256, 256),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
POINT(0, 0, -w, -h, -d, 0, 0);
POINT(0, 1, w, -h, -d, 256, 0);
@ -130,13 +131,14 @@ _cube_pos(Cube *c,
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
if (evas_map_util_clockwise_get(m))
{
evas_object_map_enable_set(c->side[i].o, 1);
evas_object_map_set(c->side[i].o, m);
efl_gfx_entity_visible_set(c->side[i].o, EINA_TRUE);
eo_do(c->side[i].o,
evas_obj_map_enable_set(1),
evas_obj_map_set(m),
evas_obj_visibility_set(EINA_TRUE));
}
else
{
efl_gfx_entity_visible_set(c->side[i].o, EINA_FALSE);
eo_do(c->side[i].o, evas_obj_visibility_set(EINA_FALSE));
}
order[i] = i;
@ -161,9 +163,9 @@ _cube_pos(Cube *c,
}
while (!sorted);
efl_gfx_stack_raise_to_top(c->side[order[0]].o);
eo_do(c->side[order[0]].o, evas_obj_raise());
for (i = 1; i < 6; i++)
efl_gfx_stack_below(c->side[order[i]].o, c->side[order[i - 1]].o);
eo_do(c->side[order[i]].o, evas_obj_stack_below(c->side[order[i - 1]].o));
}
static void
@ -171,7 +173,7 @@ _cube_free(Cube *c)
{
int i;
for (i = 0; i < 6; i++) efl_del(c->side[i].o);
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
free(c);
}
@ -219,7 +221,7 @@ static void _loop(double t, int f)
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -251,7 +253,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -54,13 +54,14 @@ _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
{
Evas_Object *o;
char buf[256];
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
c->side[i].o = o;
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
efl_file_simple_load(o, build_path(buf), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 256, 256));
efl_gfx_entity_size_set(o, EINA_SIZE2D(256, 256));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path(buf), NULL),
evas_obj_image_fill_set(0, 0, 256, 256),
evas_obj_size_set(256, 256),
evas_obj_visibility_set(EINA_TRUE));
}
POINT(0, 0, -w, -h, -d, 0, 0);
POINT(0, 1, w, -h, -d, 256, 0);
@ -128,13 +129,14 @@ _cube_pos(Cube *c,
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
if (evas_map_util_clockwise_get(m))
{
evas_object_map_enable_set(c->side[i].o, 1);
evas_object_map_set(c->side[i].o, m);
efl_gfx_entity_visible_set(c->side[i].o, EINA_TRUE);
eo_do(c->side[i].o,
evas_obj_map_enable_set(1),
evas_obj_map_set(m),
evas_obj_visibility_set(EINA_TRUE));
}
else
{
efl_gfx_entity_visible_set(c->side[i].o, EINA_FALSE);
eo_do(c->side[i].o, evas_obj_visibility_set(EINA_FALSE));
}
order[i] = i;
@ -159,9 +161,9 @@ _cube_pos(Cube *c,
}
while (!sorted);
efl_gfx_stack_raise_to_top(c->side[order[0]].o);
eo_do(c->side[order[0]].o, evas_obj_raise());
for (i = 1; i < 6; i++)
efl_gfx_stack_below(c->side[order[i]].o, c->side[order[i - 1]].o);
eo_do(c->side[order[i]].o, evas_obj_stack_below(c->side[order[i - 1]].o));
}
static void
@ -169,7 +171,7 @@ _cube_free(Cube *c)
{
int i;
for (i = 0; i < 6; i++) efl_del(c->side[i].o);
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
free(c);
}
@ -217,7 +219,7 @@ static void _loop(double t, int f)
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -249,7 +251,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -54,14 +54,15 @@ _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
{
Evas_Object *o;
char buf[256];
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
c->side[i].o = o;
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
efl_file_simple_load(o, build_path(buf), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 256, 256));
efl_gfx_entity_size_set(o, EINA_SIZE2D(256, 256));
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path(buf), NULL),
evas_obj_image_fill_set(0, 0, 256, 256),
evas_obj_size_set(256, 256),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
POINT(0, 0, -w, -h, -d, 0, 0);
POINT(0, 1, w, -h, -d, 256, 0);
@ -128,8 +129,9 @@ _cube_pos(Cube *c,
255, 255, 255,
20, 20, 20);
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
evas_object_map_enable_set(c->side[i].o, 1);
evas_object_map_set(c->side[i].o, m);
eo_do(c->side[i].o,
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
order[i] = i;
for (j = 0; j < 4; j++)
@ -153,9 +155,9 @@ _cube_pos(Cube *c,
}
while (!sorted);
efl_gfx_stack_raise_to_top(c->side[order[0]].o);
eo_do(c->side[order[0]].o, evas_obj_raise());
for (i = 1; i < 6; i++)
efl_gfx_stack_below(c->side[order[i]].o, c->side[order[i - 1]].o);
eo_do(c->side[order[i]].o, evas_obj_stack_below(c->side[order[i - 1]].o));
}
static void
@ -163,7 +165,7 @@ _cube_free(Cube *c)
{
int i;
for (i = 0; i < 6; i++) efl_del(c->side[i].o);
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
free(c);
}
@ -211,7 +213,7 @@ static void _loop(double t, int f)
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -243,7 +245,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -54,13 +54,14 @@ _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
{
Evas_Object *o;
char buf[256];
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
c->side[i].o = o;
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
efl_file_simple_load(o, build_path(buf), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 256, 256));
efl_gfx_entity_size_set(o, EINA_SIZE2D(256, 256));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path(buf), NULL),
evas_obj_image_fill_set(0, 0, 256, 256),
evas_obj_size_set(256, 256),
evas_obj_visibility_set(EINA_TRUE));
}
POINT(0, 0, -w, -h, -d, 0, 0);
POINT(0, 1, w, -h, -d, 256, 0);
@ -126,8 +127,9 @@ _cube_pos(Cube *c,
255, 255, 255,
20, 20, 20);
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
evas_object_map_enable_set(c->side[i].o, 1);
evas_object_map_set(c->side[i].o, m);
eo_do(c->side[i].o,
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
order[i] = i;
for (j = 0; j < 4; j++)
@ -151,9 +153,9 @@ _cube_pos(Cube *c,
}
while (!sorted);
efl_gfx_stack_raise_to_top(c->side[order[0]].o);
eo_do(c->side[order[0]].o, evas_obj_raise());
for (i = 1; i < 6; i++)
efl_gfx_stack_below(c->side[order[i]].o, c->side[order[i - 1]].o);
eo_do(c->side[order[i]].o, evas_obj_stack_below(c->side[order[i - 1]].o));
}
static void
@ -161,7 +163,7 @@ _cube_free(Cube *c)
{
int i;
for (i = 0; i < 6; i++) efl_del(c->side[i].o);
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
free(c);
}
@ -209,7 +211,7 @@ static void _loop(double t, int f)
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -241,7 +243,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -54,14 +54,15 @@ _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
{
Evas_Object *o;
char buf[256];
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
c->side[i].o = o;
snprintf(buf, sizeof(buf), "im%i.png", (i % 2) + 1);
efl_file_simple_load(o, build_path(buf), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path(buf), NULL),
evas_obj_image_fill_set(0, 0, 720, 420),
evas_obj_size_set(720, 420),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
POINT(0, 0, -w, -h, -d, 0, 0);
POINT(0, 1, w, -h, -d, 720, 0);
@ -130,13 +131,14 @@ _cube_pos(Cube *c,
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -360, 720);
if (evas_map_util_clockwise_get(m))
{
evas_object_map_enable_set(c->side[i].o, 1);
evas_object_map_set(c->side[i].o, m);
efl_gfx_entity_visible_set(c->side[i].o, EINA_TRUE);
eo_do(c->side[i].o,
evas_obj_map_enable_set(1),
evas_obj_map_set(m),
evas_obj_visibility_set(EINA_TRUE));
}
else
{
efl_gfx_entity_visible_set(c->side[i].o, EINA_FALSE);
eo_do(c->side[i].o, evas_obj_visibility_set(EINA_FALSE));
}
order[i] = i;
@ -161,9 +163,9 @@ _cube_pos(Cube *c,
}
while (!sorted);
efl_gfx_stack_raise_to_top(c->side[order[0]].o);
eo_do(c->side[order[0]].o, evas_obj_raise());
for (i = 1; i < 6; i++)
efl_gfx_stack_below(c->side[order[i]].o, c->side[order[i - 1]].o);
eo_do(c->side[order[i]].o, evas_obj_stack_below(c->side[order[i - 1]].o));
}
static void
@ -171,7 +173,7 @@ _cube_free(Cube *c)
{
int i;
for (i = 0; i < 6; i++) efl_del(c->side[i].o);
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
free(c);
}
@ -199,7 +201,7 @@ static void _loop(double t, int f)
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -231,7 +233,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -54,14 +54,15 @@ _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
{
Evas_Object *o;
char buf[256];
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
c->side[i].o = o;
snprintf(buf, sizeof(buf), "im%i.png", (i % 2) + 1);
efl_file_simple_load(o, build_path(buf), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path(buf), NULL),
evas_obj_image_fill_set(0, 0, 720, 420),
evas_obj_size_set(720, 420),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
POINT(0, 0, -w, -h, -d, 0, 0);
POINT(0, 1, w, -h, -d, 720, 0);
@ -127,13 +128,14 @@ _cube_pos(Cube *c,
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -360, 720);
if (evas_map_util_clockwise_get(m))
{
evas_object_map_enable_set(c->side[i].o, 1);
evas_object_map_set(c->side[i].o, m);
efl_gfx_entity_visible_set(c->side[i].o, EINA_TRUE);
eo_do(c->side[i].o,
evas_obj_map_enable_set(1),
evas_obj_map_set(m),
evas_obj_visibility_set(EINA_TRUE));
}
else
{
efl_gfx_entity_visible_set(c->side[i].o, EINA_FALSE);
eo_do(c->side[i].o, evas_obj_visibility_set(EINA_FALSE));
}
order[i] = i;
@ -158,9 +160,9 @@ _cube_pos(Cube *c,
}
while (!sorted);
efl_gfx_stack_raise_to_top(c->side[order[0]].o);
eo_do(c->side[order[0]].o, evas_obj_raise());
for (i = 1; i < 6; i++)
efl_gfx_stack_below(c->side[order[i]].o, c->side[order[i - 1]].o);
eo_do(c->side[order[i]].o, evas_obj_stack_below(c->side[order[i - 1]].o));
}
static void
@ -168,7 +170,7 @@ _cube_free(Cube *c)
{
int i;
for (i = 0; i < 6; i++) efl_del(c->side[i].o);
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
free(c);
}
@ -196,7 +198,7 @@ static void _loop(double t, int f)
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -228,7 +230,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -29,23 +29,25 @@ static void _setup(void)
{
char buf[256];
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1);
efl_file_simple_load(o, build_path(buf), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 256, 256));
efl_gfx_entity_size_set(o, EINA_SIZE2D(256, 256));
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path(buf), NULL),
evas_obj_image_fill_set(0, 0, 256, 256),
evas_obj_size_set(256, 256),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_reflec[i] = o;
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1);
efl_file_simple_load(o, build_path(buf), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 256, 256));
efl_gfx_entity_size_set(o, EINA_SIZE2D(256, 256));
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path(buf), NULL),
evas_obj_image_fill_set(0, 0, 256, 256),
evas_obj_size_set(256, 256),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -56,8 +58,8 @@ static void _cleanup(void)
int i;
for (i = 0; i < CNUM; i++)
{
efl_del(o_images[i]);
efl_del(o_reflec[i]);
eo_del(o_images[i]);
eo_del(o_reflec[i]);
}
}
@ -128,13 +130,13 @@ static void _loop(double t, int f)
if (c <= 0)
{
efl_gfx_stack_raise_to_top(o_images[i]);
efl_gfx_stack_raise_to_top(o_reflec[i]);
eo_do(o_images[i], evas_obj_raise());
eo_do(o_reflec[i], evas_obj_raise());
}
else
{
efl_gfx_stack_lower_to_bottom(o_images[i]);
efl_gfx_stack_lower_to_bottom(o_reflec[i]);
eo_do(o_images[i], evas_obj_lower());
eo_do(o_reflec[i], evas_obj_lower());
}
evas_map_point_coord_set (m, 0, x, y, -z);
@ -157,8 +159,9 @@ static void _loop(double t, int f)
x + (w / 2), y + (h / 2), 0);
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512);
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
evas_map_point_coord_set (m, 0, x, yy, -z);
evas_map_point_image_uv_set(m, 0, 0, 256);
@ -180,15 +183,16 @@ static void _loop(double t, int f)
x + (w / 2), y + (h / 2), 0);
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512);
evas_object_map_enable_set(o_reflec[i], 1);
evas_object_map_set(o_reflec[i], m);
eo_do(o_reflec[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -220,7 +224,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -24,13 +24,14 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < (OBNUM / 2); i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -39,7 +40,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -68,14 +69,15 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -107,7 +109,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -24,13 +24,14 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < (OBNUM / 2); i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -39,7 +40,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -68,14 +69,15 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -107,7 +109,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -24,12 +24,13 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < (OBNUM / 2); i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -38,7 +39,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -66,14 +67,15 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -105,7 +107,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -24,12 +24,13 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < (OBNUM / 2); i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -38,7 +39,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -65,14 +66,15 @@ static void _loop(double t, int f)
evas_map_point_color_set(m, 3, 0, 0, 0, 0);
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -104,7 +106,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -24,13 +24,14 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < (OBNUM / 2); i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -39,7 +40,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -68,14 +69,15 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -107,7 +109,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -24,13 +24,14 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < (OBNUM / 2); i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -39,7 +40,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -68,14 +69,15 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -107,7 +109,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -24,12 +24,13 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < (OBNUM / 2); i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -38,7 +39,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -66,14 +67,15 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -105,7 +107,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -24,12 +24,13 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < (OBNUM / 2); i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -38,7 +39,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -66,14 +67,15 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -105,7 +107,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -24,13 +24,14 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < (OBNUM / 2); i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -39,7 +40,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -63,14 +64,15 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -102,7 +104,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -24,13 +24,14 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < (OBNUM / 2); i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_image_smooth_scale_set(0),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -39,7 +40,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -63,14 +64,15 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -102,7 +104,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -24,12 +24,12 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < (OBNUM / 2); i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o, evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -38,7 +38,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -61,14 +61,14 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i], evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -100,7 +100,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -24,12 +24,13 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < (OBNUM / 2); i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_image_file_set(build_path("image.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -38,7 +39,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -61,14 +62,15 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
eo_do(o_images[i],
evas_obj_map_enable_set(1),
evas_obj_map_set(m));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -100,7 +102,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
_setup();
ui_func_set(_key, _loop);
}
# endif
#endif

View File

@ -1,110 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask
#define NAME "Image Mask"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
for (i = 0; i < OBNUM; i+= 2)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i + 1] = o;
efl_file_simple_load(o, build_path("e-logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
evas_object_clip_set(o_images[i], o);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i+= 2)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_position_set(o_images[i + 1], EINA_POSITION2D(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -1,116 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_10
#define NAME "Image Mask 10"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[1];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_mask = o;
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
efl_gfx_entity_visible_set(o, EINA_TRUE);
for (i = 0; i < 1; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("texture.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, win_w * 4, win_h * 4));
efl_gfx_entity_size_set(o, EINA_SIZE2D(win_w * 4, win_h * 4));
evas_object_clip_set(o, o_mask);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < 1; i++) efl_del(o_images[i]);
efl_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
static Evas_Map *m = NULL;
Evas_Coord w, h;
if (!m) m = evas_map_new(4);
for (i = 0; i < 1; i++)
{
w = win_w * 4;
h = win_h * 4;
evas_map_util_points_populate_from_geometry(m,
-win_w, -win_h,
w, h, 0);
evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
evas_object_map_enable_set(o_images[i], 1);
evas_object_map_set(o_images[i], m);
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -1,122 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_11
#define NAME "Image Mask 11"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_mask = o;
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
efl_gfx_entity_visible_set(o, EINA_TRUE);
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
evas_object_clip_set(o, o_mask);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
efl_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
static Evas_Map *m = NULL;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
if (!m) m = evas_map_new(4);
evas_map_util_points_populate_from_geometry(m,
(win_w - 720) / 2,
(win_h - 420) / 2,
720, 420, 0);
evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
evas_object_map_enable_set(o_mask, 1);
evas_object_map_set(o_mask, m);
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -1,118 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_12
#define NAME "Image Mask 12"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_mask = o;
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
efl_gfx_entity_visible_set(o, EINA_TRUE);
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_image_smooth_scale_set(o, 1);
evas_object_clip_set(o, o_mask);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
efl_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h, w0, h0;
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -1,118 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_13
#define NAME "Image Mask 13"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_mask = o;
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
efl_gfx_entity_visible_set(o, EINA_TRUE);
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_image_smooth_scale_set(o, 0);
evas_object_clip_set(o, o_mask);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
efl_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h, w0, h0;
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -1,110 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_2
#define NAME "Image Mask 2"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
for (i = 0; i < OBNUM; i+= 2)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i + 1] = o;
efl_file_simple_load(o, build_path("e-logo-2.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
evas_object_clip_set(o_images[i], o);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i+= 2)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_position_set(o_images[i + 1], EINA_POSITION2D(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -1,110 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_3
#define NAME "Image Mask 3"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
for (i = 0; i < OBNUM; i+= 2)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("e-logo-2.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i + 1] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
evas_object_clip_set(o_images[i], o);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i+= 2)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_position_set(o_images[i + 1], EINA_POSITION2D(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -1,112 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_4
#define NAME "Image Mask 4"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_mask = o;
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
efl_gfx_entity_visible_set(o, EINA_TRUE);
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
evas_object_clip_set(o, o_mask);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
efl_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -1,112 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_5
#define NAME "Image Mask 5"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_mask = o;
efl_file_simple_load(o, build_path("e-logo-2.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 120) / 2, (win_h - 160) / 2));
efl_gfx_entity_visible_set(o, EINA_TRUE);
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
evas_object_clip_set(o, o_mask);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
efl_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -1,112 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_6
#define NAME "Image Mask 6"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_mask = o;
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
efl_gfx_entity_visible_set(o, EINA_TRUE);
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120 / 2, 160 / 2));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120 / 2, 160 / 2));
evas_object_clip_set(o, o_mask);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
efl_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
w = 120 / 2;
h = 160 / 2;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -1,117 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_7
#define NAME "Image Mask 7"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_mask = o;
efl_file_simple_load(o, build_path("e-logo-2.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 120) / 2, (win_h - 160) / 2));
efl_gfx_entity_visible_set(o, EINA_TRUE);
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
evas_object_clip_set(o, o_mask);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
efl_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
w = 10 + (110 + (110 * sin((double)(f) / (14.3 * SLOW))));
h = 10 + (150 + (150 * sin((double)(f) / (21.7 * SLOW))));
efl_gfx_fill_set(o_mask, EINA_RECT(0, 0, w, h));
efl_gfx_entity_size_set(o_mask, EINA_SIZE2D(w, h));
efl_gfx_entity_position_set(o_mask, EINA_POSITION2D((win_w - w) / 2, (win_h - h) / 2));
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -1,112 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_8
#define NAME "Image Mask 8"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[1];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_mask = o;
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
efl_gfx_entity_visible_set(o, EINA_TRUE);
for (i = 0; i < 1; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("texture.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 500, 444));
efl_gfx_entity_size_set(o, EINA_SIZE2D(win_w * 4, win_h * 4));
evas_object_clip_set(o, o_mask);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < 1; i++) efl_del(o_images[i]);
efl_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < 1; i++)
{
w = win_w * 4;
h = win_h * 4;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (500 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (444 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -1,123 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_9
#define NAME "Image Mask 9"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[1];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_mask = o;
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
efl_gfx_entity_visible_set(o, EINA_TRUE);
for (i = 0; i < 1; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("texture.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 500, 444));
efl_gfx_entity_size_set(o, EINA_SIZE2D(win_w * 4, win_h * 4));
evas_object_clip_set(o, o_mask);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < 1; i++) efl_del(o_images[i]);
efl_del(o_mask);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
static Evas_Map *m = NULL;
Evas_Coord x, y, w, h;
for (i = 0; i < 1; i++)
{
w = win_w * 4;
h = win_h * 4;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (500 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (444 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
if (!m) m = evas_map_new(4);
evas_map_util_points_populate_from_geometry(m,
(win_w - 720) / 2,
(win_h - 420) / 2,
720, 420, 0);
evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
evas_object_map_enable_set(o_mask, 1);
evas_object_map_set(o_mask, m);
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -1,133 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_mask_clipped
#define NAME "Image Mask Clipped"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
static Evas_Object *o_clip;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
o_clip = o;
efl_gfx_entity_size_set(o, EINA_SIZE2D(180, 105));
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 180) / 2, (win_h - 105) / 2));
efl_gfx_entity_visible_set(o, EINA_TRUE);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_mask = o;
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
evas_object_clip_set(o, o_clip);
efl_canvas_object_has_fixed_size_set(o, 1);
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
efl_gfx_entity_visible_set(o, EINA_TRUE);
for (i = 0; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 360, 480));
efl_gfx_entity_size_set(o, EINA_SIZE2D(360, 480));
efl_gfx_image_smooth_scale_set(o, 0);
evas_object_clip_set(o, o_mask);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
efl_del(o_mask);
efl_del(o_clip);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h, w0, h0;
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
w = (sin((double)f) * 720 + 840) / 2.2;
h = (sin((double)f) * 720 + 840) / 2.2;
efl_gfx_entity_size_set(o_mask, EINA_SIZE2D(w, h));
efl_gfx_entity_position_set(o_mask, EINA_POSITION2D((win_w - w) / 2, (win_h - h) / 2));
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

View File

@ -24,12 +24,12 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < 1; i++)
{
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("tp.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 640, 480));
efl_gfx_entity_size_set(o, EINA_SIZE2D(640, 480));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o, evas_obj_image_file_set(build_path("tp.png"), NULL),
evas_obj_image_fill_set(0, 0, 640, 480),
evas_obj_size_set(640, 480),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -38,7 +38,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < 1; i++) efl_del(o_images[i]);
for (i = 0; i < 1; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -54,15 +54,15 @@ static void _loop(double t, int f)
h *= (f / 100.0) * 4.0;
x = (win_w / 2) - (w / 2);
y = (win_h / 2) - (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
eo_do(o_images[i], evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -94,7 +94,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -26,15 +26,19 @@ static void _setup(void)
{
int r, g, b, a;
o = evas_object_line_add(evas);
o = eo_add(EVAS_LINE_CLASS, evas);
o_images[i] = o;
a = (rnd()&0xff) / 2;
r = ((rnd()&0xff) * a) / 255;
g = ((rnd()&0xff) * a) / 255;
b = ((rnd()&0xff) * a) / 255;
efl_gfx_color_set(o, r, g, b, a);
evas_object_line_xy_set(o, ((win_w / 2) * (rnd()&0xff)) / 255, ((win_h / 2) * (rnd()&0xff)) / 255, ((win_w / 2) * (rnd()&0xff)) / 255 + (win_w / 2), ((win_h / 2) * (rnd()&0xff)) / 255 + (win_h / 2));
efl_gfx_entity_visible_set(o, EINA_TRUE);
eo_do(o,
evas_obj_color_set(r, g, b, a),
evas_obj_line_xy_set(((win_w / 2) * (rnd()&0xff)) / 255,
((win_h / 2) * (rnd()&0xff)) / 255,
((win_w / 2) * (rnd()&0xff)) / 255 + (win_w / 2),
((win_h / 2) * (rnd()&0xff)) / 255 + (win_h / 2)),
evas_obj_visibility_set(EINA_TRUE));
}
@ -45,7 +49,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
#define PI (double) 3.141592654
@ -87,17 +91,17 @@ static void _loop(double t, int f)
for (i = 0; i < OBNUM; i++)
{
o = o_images[i];
evas_object_line_xy_get(o, &ox1, &oy1, &ox2, &oy2);
eo_do(o, evas_obj_line_xy_get(&ox1, &oy1, &ox2, &oy2));
_rotate_point(&ox1, &oy1, i);
_rotate_point(&ox2, &oy2, i);
evas_object_line_xy_set(o, ox1, oy1, ox2, oy2);
eo_do(o, evas_obj_line_xy_set(ox1, oy1, ox2, oy2));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -129,7 +133,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -7,7 +7,6 @@
Evas *evas = NULL;
const char *profile = "n800";
const char *choosen_engine = NULL;
char *output = NULL;
int win_w = 720, win_h = 420;
int loops = LOOPS;
int one_test = 0;
@ -1129,13 +1128,11 @@ static const Ecore_Getopt optdesc = {
ECORE_GETOPT_STORE_INT('c', "count", "Number of main loop run per tests"),
ECORE_GETOPT_STORE_TRUE('f', "fullscreen", "Make window fullscreen"),
ECORE_GETOPT_STORE_STR('d', "datadir", "Define expedite data directory"),
ECORE_GETOPT_STORE_STR('o', "output", "Output frame specified by count from test to specified file"),
ECORE_GETOPT_STORE_INT('t', "test", "Run a single test"),
ECORE_GETOPT_STORE_TRUE('l', "list-tests", "List all tests"),
ECORE_GETOPT_STORE_TRUE('m', "compat", "Output compatible with expedite-cmp"),
ECORE_GETOPT_STORE_TRUE('y', "async", "Enable async output"),
ECORE_GETOPT_STORE_TRUE('a', "all", "Run all tests"),
ECORE_GETOPT_STORE_FALSE('i', "tick", "Follow output animator tick"),
ECORE_GETOPT_LICENSE('L', "license"),
ECORE_GETOPT_COPYRIGHT('C', "copyright"),
ECORE_GETOPT_VERSION('V', "version"),
@ -1144,6 +1141,8 @@ static const Ecore_Getopt optdesc = {
}
};
// FIXME: missing - run all [-a], run specific test [-t], list test [-l], output compatible with expedite-cmp [-m]
static const Expedite_Resolution resolutions[] = {
{ "qvga", 320 , 240 },
{ "qvga-p", 240 , 320 },
@ -1163,18 +1162,14 @@ static const Expedite_Resolution resolutions[] = {
{ "pal", 720 , 576 },
{ "480p", 720 , 480 },
{ "720p", 1280, 720 },
{ "720p-p", 720, 1280 },
{ "1050p", 1680, 1050},
{ "1080p", 1920, 1080},
{ "1080p-p", 1080, 1920},
{ "wsvga", 1024, 600 },
{ "wsvga-p", 600 , 1024},
{ "watch-360", 360, 360},
{ "s9", 1600, 900 },
{ NULL, 0, 0 }
};
Eina_Bool tick = EINA_TRUE;
static void
_cb_delete(Ecore_Evas *ee EINA_UNUSED)
{
@ -1184,52 +1179,10 @@ _cb_delete(Ecore_Evas *ee EINA_UNUSED)
static Eina_Bool
_cb_anim(void *data EINA_UNUSED)
{
static double last = 0;
static double avg = 0;
static unsigned long long count = 0;
double current;
current = ecore_loop_time_get();
if (count++)
{
avg += current - last;
#if 0
if (abs(current - last - (avg / (count - 1))) > 0.05)
fprintf(stderr, "delta: %f vs %f\n",
current - last,
avg / (count - 1));
#endif
}
last = current;
ui_loop(NULL);
return EINA_TRUE;
}
void
exp_size_get(Eo *obj, int *w, int *h)
{
Eina_Size2D size = efl_gfx_entity_size_get(obj);
if (w) *w = size.w;
if (h) *h = size.h;
}
void
exp_pos_get(Eo *obj, int *x, int *y)
{
Eina_Position2D position = efl_gfx_entity_position_get(obj);
if (x) *x = position.x;
if (y) *y = position.y;
}
void
exp_input_pointer_pos_get(Eo *obj, int *x, int *y)
{
Eina_Position2D position = efl_input_pointer_position_get(obj);
if (x) *x = position.x;
if (y) *y = position.y;
}
static Ecore_Job *_job = NULL;
static void
@ -1270,13 +1223,11 @@ main(int argc, char **argv)
ECORE_GETOPT_VALUE_INT(loops),
ECORE_GETOPT_VALUE_BOOL(fullscreen),
ECORE_GETOPT_VALUE_STR(datadir),
ECORE_GETOPT_VALUE_STR(output),
ECORE_GETOPT_VALUE_INT(test),
ECORE_GETOPT_VALUE_BOOL(tests_list),
ECORE_GETOPT_VALUE_BOOL(cmp_report),
ECORE_GETOPT_VALUE_BOOL(async),
ECORE_GETOPT_VALUE_BOOL(all_tests),
ECORE_GETOPT_VALUE_BOOL(tick),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
@ -1285,10 +1236,6 @@ main(int argc, char **argv)
};
setenv("ECORE_NO_VSYNC", "1", 0);
setenv("ECORE_EVAS_RENDER_NOSYNC", "1", 1);
if (!async)
setenv("ECORE_EVAS_FORCE_SYNC_RENDER", "1", 0);
if (!ecore_evas_init()) return -1;
@ -1306,7 +1253,7 @@ main(int argc, char **argv)
unsigned int i;
fprintf(stderr, "Known resolution :\n");
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]) - 1; i++)
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]); i++)
fprintf(stderr, " * %s\t%ix%i\n", resolutions[i].name,
resolutions[i].width, resolutions[i].height);
return 0;
@ -1316,7 +1263,7 @@ main(int argc, char **argv)
{
unsigned int i;
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]) - 1; i++)
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]); i++)
if (!strcmp(resolutions[i].name, resolution))
break;
if (i == sizeof(resolutions)/sizeof(resolutions[0]))
@ -1328,6 +1275,9 @@ main(int argc, char **argv)
profile = resolution;
}
if (!async)
setenv("ECORE_EVAS_FORCE_SYNC_RENDER", "1", 0);
if (!datadir)
datadir = getenv("EXPEDITE_FONTS_DIR");
if (!datadir)
@ -1335,70 +1285,15 @@ main(int argc, char **argv)
ecore_app_args_set(argc, (const char **) argv);
if (output)
{
Ecore_Evas *pee;
Evas_Object *im;
pee = ecore_evas_buffer_new(1, 1);
if (!pee) return -1;
im = ecore_evas_object_image_new(pee);
if (!im) return -1;
evas_object_image_filled_set(im, EINA_TRUE);
evas_object_image_size_set(im,
resolutions[resolution_index].width,
resolutions[resolution_index].height);
ee = ecore_evas_object_ecore_evas_get(im);
if (!ee) return -1;
ecore_evas_resize(ee,
resolutions[resolution_index].width,
resolutions[resolution_index].height);
evas_object_show(im);
choosen_engine = ecore_evas_engine_name_get(pee);
evas = ecore_evas_get(ee);
evas_font_path_append(evas, datadir);
evas_font_hinting_set(evas, EVAS_FONT_HINTING_AUTO);
ui_setup(resolutions[resolution_index].width,
resolutions[resolution_index].height);
if (test > 0)
{
one_test = 1;
ui_num(test);
}
while (loops > 0)
{
ui_loop(NULL);
loops--;
}
ecore_evas_manual_render(pee);
evas_object_image_save(im, output, NULL, NULL);
goto done;
}
ee = ecore_evas_new(engine, 0, 0,
resolutions[resolution_index].width,
resolutions[resolution_index].height,
NULL); // FIXME: Specify additional parameter for the engine on the command line
if (!ee)
{
fprintf(stderr, "Failed to create Ecore_Evas. Please check engine name \"%s\"\n", engine);
return -1;
}
if (!ee) return -1;
choosen_engine = ecore_evas_engine_name_get(ee);
ecore_evas_callback_delete_request_set(ee, _cb_delete);
if (tick) ecore_evas_callback_post_render_set(ee, _cb_post_render);
ecore_evas_callback_post_render_set(ee, _cb_post_render);
evas = ecore_evas_get(ee);
@ -1437,11 +1332,10 @@ main(int argc, char **argv)
if (all_tests) ui_all();
anim = ecore_animator_add(_cb_anim, ee);
if (tick) ecore_animator_custom_tick();
ecore_animator_custom_tick();
ecore_main_loop_begin();
ecore_animator_del(anim);
done:
ecore_evas_free(ee);
ecore_evas_shutdown();

View File

@ -20,6 +20,14 @@
# include <sys/time.h>
#endif
#ifdef _WIN32
# include <windows.h>
#endif
#ifdef HAVE_EVIL
# include <Evil.h>
#endif
#include <Evas.h>
#include <Ecore.h>
@ -43,8 +51,6 @@ extern int one_test;
extern const char *choosen_engine;
extern Eina_Bool fullscreen;
extern Eina_Bool cmp_report;
extern char *output;
extern Eina_Bool tick;
typedef struct _Expedite_Resolution Expedite_Resolution;
typedef struct _Expedite_Engine Expedite_Engine;
@ -71,10 +77,6 @@ const char *build_path(const char *filename);
void engine_loop(void);
int engine_abort(void);
void exp_size_get(Eo *obj, int *w, int *h);
void exp_pos_get(Eo *obj, int *x, int *y);
void exp_input_pointer_pos_get(Eo *obj, int *x, int *y);
#ifdef __cplusplus
}
#endif
@ -86,15 +88,15 @@ void exp_input_pointer_pos_get(Eo *obj, int *x, int *y);
ui_menu(); \
}
#define FPS_STD(x) \
if (!output && (f >= loops) && (!done)) \
{ \
double fps; \
fps = (double)f / t; \
printf("%4.2f , %s\n", fps, x); \
ui_fps(fps); \
done = 1; \
}
#define FPS_STD(x) \
if ((f >= loops) && (!done)) \
{ \
double fps; \
fps = (double)f / t; \
printf("%4.2f , %s\n", fps, x); \
ui_fps(fps); \
done = 1; \
}
#define SLOW 5.0

View File

@ -1,134 +0,0 @@
expedite_sources = [ 'main.c',
'main.h',
'ui.c',
'ui.h',
'about.c',
'about.h',
'tests.h',
'widgets_file_icons.c',
'widgets_file_icons_2.c',
'widgets_file_icons_2_grouped.c',
'widgets_file_icons_2_same.c',
'widgets_file_icons_2_same_grouped.c',
'widgets_file_icons_3.c',
'widgets_file_icons_4.c',
'widgets_list_1.c',
'widgets_list_1_grouped.c',
'widgets_list_2.c',
'widgets_list_2_grouped.c',
'widgets_list_3.c',
'widgets_list_3_grouped.c',
'widgets_list_4.c',
'widgets_list_4_grouped.c',
'image_blend_unscaled.c',
'image_blend_solid_middle_unscaled.c',
'image_blend_fade_unscaled.c',
'image_blend_fade_pow2_unscaled.c',
'image_blend_solid_unscaled.c',
'image_blend_solid_fade_unscaled.c',
'image_blend_solid_fade_pow2_unscaled.c',
'image_blend_nearest_scaled.c',
'image_blend_nearest_solid_scaled.c',
'image_blend_smooth_scaled.c',
'image_blend_smooth_solid_scaled.c',
'image_blend_nearest_same_scaled.c',
'image_blend_nearest_solid_same_scaled.c',
'image_blend_smooth_same_scaled.c',
'image_blend_smooth_solid_same_scaled.c',
'image_blend_border.c',
'image_blend_solid_middle_border.c',
'image_blend_solid_border.c',
'image_blend_solid_stretch.c',
'image_blend_solid_9patch.c',
'image_blend_border_recolor.c',
'image_map_rotate.c',
'image_map_solid_rotate.c',
'image_map_nearest_rotate.c',
'image_map_nearest_solid_rotate.c',
'image_map_color_rotate.c',
'image_map_color_solid_rotate.c',
'image_map_color_nearest_rotate.c',
'image_map_color_nearest_solid_rotate.c',
'image_map_color_alpha_rotate.c',
'image_map_color_alpha_solid_rotate.c',
'image_map_color_alpha_nearest_rotate.c',
'image_map_color_alpha_nearest_solid_rotate.c',
'image_map_3d_1.c',
'image_map_3d_2.c',
'image_map_3d_3.c',
'image_map_3d_4.c',
'image_map_3d_5.c',
'image_map_3d_6.c',
'image_map_3d_flow.c',
'image_quality_scale.c',
'image_data_argb.c',
'image_data_argb_alpha.c',
'image_data_ycbcr601pl.c',
'image_data_ycbcr601pl_wide_stride.c',
'image_data_ycbcr601pl_map_solid_rotate.c',
'image_data_ycbcr601pl_map_nearest_solid_rotate.c',
'image_crossfade.c',
'text_basic.c',
'text_styles.c',
'text_styles_different_strings.c',
'text_change.c',
'textblock_basic.c',
'textblock_intl.c',
'textblock_auto_align.c',
'textblock_text_append.c',
'textblock_text_fill_format.c',
'rect_blend.c',
'rect_blend_pow2.c',
'rect_solid.c',
'rect_blend_few.c',
'rect_blend_pow2_few.c',
'rect_solid_few.c',
'image_blend_occlude1_few.c',
'image_blend_occlude2_few.c',
'image_blend_occlude3_few.c',
'image_blend_occlude1.c',
'image_blend_occlude2.c',
'image_blend_occlude3.c',
'image_blend_occlude1_many.c',
'image_blend_occlude2_many.c',
'image_blend_occlude3_many.c',
'image_blend_occlude1_very_many.c',
'image_blend_occlude2_very_many.c',
'image_blend_occlude3_very_many.c',
'poly_blend.c',
'proxy_image.c',
'proxy_image_clipped.c',
'proxy_textblock.c',
'proxy_text_fixed.c',
'proxy_text_random.c',
'line_blend.c',
'image_blend_many_smooth_same_scaled.c',
'font_effect_blur_alpha.c',
'font_effect_blur_color.c',
'image_mask.c',
'image_mask_2.c',
'image_mask_3.c',
'image_mask_4.c',
'image_mask_5.c',
'image_mask_6.c',
'image_mask_7.c',
'image_mask_8.c',
'image_mask_9.c',
'image_mask_10.c',
'image_mask_11.c',
'image_mask_12.c',
'image_mask_13.c',
'image_mask_clipped.c',
'vg_basic_rect.c',
'vg_basic_circle.c',
'vg_basic_gradient.c',
'vg_scaled.c',
'snapshot_widgets_file_icons.c' ]
executable('expedite',
expedite_sources,
install: true,
include_directories: config_dir,
dependencies: expedite_dependencies)

View File

@ -19,42 +19,47 @@ static Evas_Object *o_images[OBNUM];
static void
poly(Evas_Object *o, int type, Evas_Coord x, Evas_Coord y)
{
efl_canvas_polygon_points_clear(o);
if (o)
eo_do(o, evas_obj_polygon_points_clear());
switch (type % 4)
{
case 0: /* triangle */
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 50, y + 0));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 100, y + 100));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 0, y + 100));
break;
if (o)
eo_do(o, evas_obj_polygon_point_add(x + 50 , y + 0),
evas_obj_polygon_point_add(x + 100, y + 100),
evas_obj_polygon_point_add(x + 0 , y + 100));
break;
case 1: /* square */
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 0, y + 0));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 100, y + 0));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 100, y + 100));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 0, y + 100));
break;
if (o)
eo_do(o, evas_obj_polygon_point_add(x + 0 , y + 0),
evas_obj_polygon_point_add(x + 100, y + 0),
evas_obj_polygon_point_add(x + 100, y + 100),
evas_obj_polygon_point_add(x + 0 , y + 100));
break;
case 2: /* hex */
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 50, y + 0));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 100, y + 30));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 100, y + 70));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 50, y + 100));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 0, y + 70));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 0, y + 30));
break;
if (o)
eo_do(o, evas_obj_polygon_point_add(x + 50 , y + 0),
evas_obj_polygon_point_add(x + 100, y + 30),
evas_obj_polygon_point_add(x + 100, y + 70),
evas_obj_polygon_point_add(x + 50 , y + 100),
evas_obj_polygon_point_add(x + 0 , y + 70),
evas_obj_polygon_point_add(x + 0 , y + 30));
break;
case 3: /* star */
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 50, y + 0));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 60, y + 40));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 90, y + 30));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 70, y + 60));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 90, y + 100));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 50, y + 70));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 10, y + 100));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 30, y + 60));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 10, y + 30));
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 40, y + 40));
break;
if (o)
eo_do(o, evas_obj_polygon_point_add(x + 50 , y + 0),
evas_obj_polygon_point_add(x + 60 , y + 40),
evas_obj_polygon_point_add(x + 90 , y + 30),
evas_obj_polygon_point_add(x + 70 , y + 60),
evas_obj_polygon_point_add(x + 90 , y + 100),
evas_obj_polygon_point_add(x + 50 , y + 70),
evas_obj_polygon_point_add(x + 10 , y + 100),
evas_obj_polygon_point_add(x + 30 , y + 60),
evas_obj_polygon_point_add(x + 10 , y + 30),
evas_obj_polygon_point_add(x + 40 , y + 40));
break;
default:
break;
break;
}
}
@ -68,14 +73,15 @@ static void _setup(void)
{
int r, g, b, a;
o = efl_add(EFL_CANVAS_POLYGON_CLASS, evas);
o = eo_add(EVAS_POLYGON_CLASS, evas);
o_images[i] = o;
a = (rnd()&0xff) / 2;
r = ((rnd()&0xff) * a) / 255;
g = ((rnd()&0xff) * a) / 255;
b = ((rnd()&0xff) * a) / 255;
efl_gfx_color_set(o, r, g, b, a);
efl_gfx_entity_visible_set(o, EINA_TRUE);
if (o)
eo_do(o, evas_obj_color_set(r, g, b, a),
evas_obj_visibility_set(EINA_TRUE));
poly(o, i, 0, 0);
}
done = 0;
@ -85,7 +91,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -99,19 +105,19 @@ static void _loop(double t, int f)
{
o = o_images[i];
if (o)
exp_size_get(o, &w, &h);
eo_do(o, evas_obj_size_get(&w, &h));
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (win_w / 4);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (win_h / 4);
if (o)
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
eo_do(o, evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -143,7 +149,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -22,22 +22,24 @@ static void _setup(void)
int i;
Evas_Object *o,*src;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
o = eo_add(EVAS_IMAGE_CLASS, evas);
eo_do(o,
evas_obj_image_file_set(build_path("logo.png"), NULL),
evas_obj_image_fill_set(0, 0, 120, 160),
evas_obj_size_set(120, 160),
evas_obj_visibility_set(EINA_TRUE));
src = o;
o_images[0] = src;
for (i = 1; i < OBNUM; i++)
{
o = efl_add(EFL_CANVAS_PROXY_CLASS, evas);
o_images[i] = o;
efl_canvas_proxy_source_set(o, src);
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
o = eo_add(EVAS_IMAGE_CLASS, evas);
o_images[i] = o;
eo_do(o,
evas_obj_image_source_set(src),
evas_obj_size_set(120, 160),
evas_obj_image_fill_set(0,0,120,160),
evas_obj_visibility_set(EINA_TRUE));
}
done = 0;
}
@ -46,7 +48,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
}
/* loop - do things */
@ -62,13 +64,13 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
eo_do(o_images[i], evas_obj_position_set(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
static void _key(char *key)
{
KEY_STD;
}
@ -100,7 +102,8 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
ui_func_set(_key, _loop);
_setup();
}
# endif
#endif

View File

@ -1,124 +0,0 @@
#undef FNAME
#undef NAME
#undef ICON
/* metadata */
#define FNAME image_blend_clipped_proxy_start
#define NAME "Image Blend Clipped Proxy"
#define ICON "blend.png"
#ifndef PROTO
# ifndef UI
# include "main.h"
/* standard var */
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM * 2];
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o,*src;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
src = o;
o_images[0] = src;
for (i = 1; i < OBNUM; i += 2)
{
Eo *clip;
o = efl_add(EFL_CANVAS_PROXY_CLASS, evas);
o_images[i] = o;
efl_canvas_proxy_source_set(o, src);
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
clip = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
o_images[i + 1] = clip;
efl_canvas_object_clipper_set(o, clip);
efl_gfx_entity_size_set(clip, EINA_SIZE2D(120, 80));
efl_canvas_object_has_fixed_size_set(o, 1);
efl_gfx_entity_visible_set(clip, EINA_TRUE);
}
done = 0;
}
/* cleanup */
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM * 2; i++) efl_del(o_images[i]);
}
/* loop - do things */
static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM * 2; i++)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
if (i < 1) continue;
i++;
if ((i - 1) % 4)
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y + h / 2));
else
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(const char *key)
{
KEY_STD;
}
/* template stuff - ignore */
# endif
#endif
#ifdef UI
_ui_menu_item_add(ICON, NAME, FNAME);
#endif
#ifdef PROTO
void FNAME(void);
#endif
#ifndef PROTO
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop, _setup);
}
# endif
#endif
#undef FNAME
#undef NAME
#undef ICON

Some files were not shown because too many files have changed in this diff Show More