Compare commits
82 Commits
devs/cedri
...
master
Author | SHA1 | Date |
---|---|---|
Wander Lairson Costa | 9db3724e47 | |
Vincent Torri | 7c4bebe47e | |
Hermet Park | d6a3eb3dec | |
Hermet Park | 7746bbb039 | |
Hermet Park | 46e328404c | |
Hermet Park | 1c16ed647b | |
Hermet Park | 5ca60ccf22 | |
Hermet Park | deb3905a32 | |
Hermet Park | cac6ca6a9a | |
Hermet Park | b72d775b10 | |
Hermet Park | aee23715a2 | |
Hermet Park | 7dca83b4e5 | |
Hermet Park | a4d6ef526a | |
Hermet Park | b84865bb12 | |
Hermet Park | 67771fd4a6 | |
Hermet Park | 4828d1a5d5 | |
Hermet Park | f3e0448bd3 | |
Hermet Park | d540c8420b | |
Hermet Park | 7874ae718f | |
Hermet Park | 03324357ed | |
Hermet Park | cf48e97379 | |
Hermet Park | ae6cf1318b | |
Hermet Park | 9bb9dba018 | |
Hermet Park | 858246e2dd | |
Hermet Park | a2bc36a91d | |
Cedric BAIL | 08dd13567e | |
Cedric Bail | ac6a3bcb44 | |
Cedric Bail | 105e6568a4 | |
Ali Alzyod | dc6c931dc2 | |
Cedric BAIL | 4e6dd92826 | |
Cedric BAIL | 6c2c96b622 | |
Mike Blumenkrantz | ba687d4b20 | |
Mike Blumenkrantz | 735ca81d6b | |
Mike Blumenkrantz | 37093983bf | |
Mike Blumenkrantz | 3a1058aab1 | |
Lauro Moura | 9fd3c26a5e | |
Cedric BAIL | b624cde117 | |
Cedric BAIL | 555b18dbaa | |
Cedric BAIL | bbc29b232b | |
Cedric BAIL | cd761e5093 | |
Cedric BAIL | bea0e934ad | |
Cedric BAIL | 6feba0405c | |
Cedric BAIL | 0f1d9a77e5 | |
Cedric BAIL | 00ffe9ca86 | |
Cedric BAIL | 153818c6bc | |
Cedric BAIL | a12ab95df0 | |
Hermet Park | 6a69955e71 | |
Mike Blumenkrantz | 27e5e02370 | |
Hermet Park | 1587f3e5ea | |
Daniel Hirt | 9cdc8c68a7 | |
Cedric BAIL | fe8e23cbc6 | |
Stefan Schmidt | e7b11dd328 | |
Jean-Philippe Andre | 0529ce56b6 | |
Cedric BAIL | f59b164351 | |
Cedric BAIL | cd80106f54 | |
Hermet Park | e2a2ef4f86 | |
Carsten Haitzler | 4ab2935364 | |
Subhransu Mohanty | 525879533a | |
Hermet Park | 46e58922fe | |
Jean-Philippe Andre | 19657b6d25 | |
Hermet Park | 05a29c965a | |
Jean-Philippe Andre | ffa005ea3d | |
Jean-Philippe Andre | 95d6a6cd9a | |
Daniel Hirt | e79517e490 | |
Jean-Philippe Andre | 74007f65bc | |
Tom Hacohen | 9a98d6376b | |
Jean-Philippe Andre | 185fe20e88 | |
Jean-Philippe Andre | f7fa84bf93 | |
Cedric BAIL | f8b38f6c24 | |
Cedric BAIL | f9834c142c | |
Cedric BAIL | adea5d2b26 | |
Cedric BAIL | 051a4ec0cf | |
Cedric BAIL | 24eca8a778 | |
Tom Hacohen | a927cdd1a4 | |
Tom Hacohen | 1c99584bcb | |
Tom Hacohen | 088df1425e | |
Tom Hacohen | 1c72554acc | |
Nicolas Aguirre | 58857a657c | |
Jean-Philippe Andre | 91ca743b85 | |
Cedric BAIL | 9cf0688f99 | |
Jean-Philippe Andre | 6c1e40666d | |
Cedric BAIL | 8e8a079515 |
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
"project_id" : "expedite",
|
"project_id" : "expedite",
|
||||||
"conduit_uri" : "https://phab.enlightenment.org/"
|
"projects" : "expedite",
|
||||||
|
"conduit_uri" : "https://phab.enlightenment.org/",
|
||||||
|
"phabricator.uri" : "https://phab.enlightenment.org/"
|
||||||
}
|
}
|
||||||
|
|
2
AUTHORS
2
AUTHORS
|
@ -3,6 +3,6 @@ Tim Horton <hortont424@gmail.com>
|
||||||
Saumsung Electronics <tbd>
|
Saumsung Electronics <tbd>
|
||||||
Samsung SAIT <tbd>
|
Samsung SAIT <tbd>
|
||||||
Bruno Tarquini <btarquini@gmail.com>
|
Bruno Tarquini <btarquini@gmail.com>
|
||||||
ChunEon Park (Hermet) <hermet@hermet.pe.kr>
|
Hermet Park <hermetpark@gmail.com>
|
||||||
Eduardo Lima (Etrunko) <eblima@gmail.com>
|
Eduardo Lima (Etrunko) <eblima@gmail.com>
|
||||||
JaEun Choi <jaeun12.choi@samsung.com>
|
JaEun Choi <jaeun12.choi@samsung.com>
|
||||||
|
|
376
INSTALL
376
INSTALL
|
@ -1,14 +1,368 @@
|
||||||
COMPILING and INSTALLING:
|
Installation Instructions
|
||||||
|
*************************
|
||||||
|
|
||||||
If you got a official release tar archive do:
|
Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
|
||||||
./configure
|
Foundation, Inc.
|
||||||
|
|
||||||
( otherwise if you got this from enlightenment cvs do: ./autogen.sh )
|
|
||||||
|
|
||||||
Then to compile:
|
|
||||||
make
|
|
||||||
|
|
||||||
To install (run this as root, or the user who handles installs):
|
Copying and distribution of this file, with or without modification,
|
||||||
make install
|
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.
|
||||||
|
|
||||||
NOTE: You MUST make install Expedite for it to run properly.
|
Basic Installation
|
||||||
|
==================
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
85
configure.ac
85
configure.ac
|
@ -3,14 +3,14 @@ dnl Process this file with autoconf to produce a configure script.
|
||||||
# get rid of that stupid cache mechanism
|
# get rid of that stupid cache mechanism
|
||||||
rm -f config.cache
|
rm -f config.cache
|
||||||
|
|
||||||
AC_INIT([expedite], [1.11.99], [enlightenment-devel@lists.sourceforge.net])
|
AC_INIT([expedite], [1.23.0], [enlightenment-devel@lists.sourceforge.net])
|
||||||
AC_PREREQ([2.52])
|
AC_PREREQ([2.52])
|
||||||
AC_CONFIG_SRCDIR([configure.ac])
|
AC_CONFIG_SRCDIR([configure.ac])
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AC_CANONICAL_BUILD
|
AC_CANONICAL_BUILD
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE([1.6 dist-bzip2])
|
AM_INIT_AUTOMAKE([1.6 dist-xz])
|
||||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||||
|
|
||||||
PKG_PROG_PKG_CONFIG
|
PKG_PROG_PKG_CONFIG
|
||||||
|
@ -18,97 +18,46 @@ PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
### Checks for programs
|
### 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
|
AC_PROG_CC
|
||||||
|
|
||||||
LT_PROG_RC
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Checks for libraries
|
### 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 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}"
|
||||||
|
|
||||||
PKG_CHECK_MODULES([EFL], eina >= 1.7.99 efl >= 1.13.0 eo >= 1.7.99 evas >= 1.7.99 eet >= 1.7.99 ecore-evas >= 1.7.99 ecore >= 1.7.99)
|
AC_SUBST(requirement_expedite)
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES([EFL], [${requirement_expedite}])
|
||||||
|
|
||||||
EFL_ENABLE_EO_API_SUPPORT
|
EFL_ENABLE_EO_API_SUPPORT
|
||||||
EFL_ENABLE_BETA_API_SUPPORT
|
EFL_ENABLE_BETA_API_SUPPORT
|
||||||
|
|
||||||
|
|
||||||
### Checks for header files
|
### Checks for header files
|
||||||
|
|
||||||
|
|
||||||
### Checks for types
|
### Checks for types
|
||||||
|
|
||||||
|
|
||||||
### Checks for structures
|
### Checks for structures
|
||||||
|
|
||||||
|
|
||||||
### Checks for compiler characteristics
|
### Checks for compiler characteristics
|
||||||
|
|
||||||
AC_HEADER_STDC
|
AC_PROG_CC_C99
|
||||||
AC_C_CONST
|
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
AC_C___ATTRIBUTE__
|
AC_C___ATTRIBUTE__
|
||||||
|
|
||||||
WIN32_CFLAGS=""
|
if test "x${ac_cv_prog_cc_c99}" = "xno" ; then
|
||||||
case "$host_os" in
|
AC_MSG_ERROR([expedite requires a c99-capable compiler])
|
||||||
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
|
fi
|
||||||
AC_LANG_POP([C++])
|
|
||||||
AC_SUBST(EXPEDITE_CXXFLAGS)
|
|
||||||
|
|
||||||
|
|
||||||
### Checks for linker characteristics
|
### 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
|
### Checks for library functions
|
||||||
|
|
||||||
AC_CHECK_FUNCS([sync])
|
AC_CHECK_FUNCS([sync])
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 9.6 KiB |
|
@ -0,0 +1,61 @@
|
||||||
|
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.
After Width: | Height: | Size: 3.9 KiB |
|
@ -0,0 +1,63 @@
|
||||||
|
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')
|
|
@ -6,8 +6,7 @@ AM_CPPFLAGS = \
|
||||||
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
|
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
|
||||||
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||||
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
||||||
@EFL_CFLAGS@ \
|
@EFL_CFLAGS@
|
||||||
@EVIL_CFLAGS@
|
|
||||||
|
|
||||||
bin_PROGRAMS = expedite
|
bin_PROGRAMS = expedite
|
||||||
bin_SCRIPTS = expedite-cmp
|
bin_SCRIPTS = expedite-cmp
|
||||||
|
@ -50,6 +49,8 @@ image_blend_smooth_solid_same_scaled.c \
|
||||||
image_blend_border.c \
|
image_blend_border.c \
|
||||||
image_blend_solid_middle_border.c \
|
image_blend_solid_middle_border.c \
|
||||||
image_blend_solid_border.c \
|
image_blend_solid_border.c \
|
||||||
|
image_blend_solid_stretch.c \
|
||||||
|
image_blend_solid_9patch.c \
|
||||||
image_blend_border_recolor.c \
|
image_blend_border_recolor.c \
|
||||||
image_map_rotate.c \
|
image_map_rotate.c \
|
||||||
image_map_solid_rotate.c \
|
image_map_solid_rotate.c \
|
||||||
|
@ -86,6 +87,7 @@ textblock_basic.c \
|
||||||
textblock_intl.c \
|
textblock_intl.c \
|
||||||
textblock_auto_align.c \
|
textblock_auto_align.c \
|
||||||
textblock_text_append.c \
|
textblock_text_append.c \
|
||||||
|
textblock_text_fill_format.c \
|
||||||
rect_blend.c \
|
rect_blend.c \
|
||||||
rect_blend_pow2.c \
|
rect_blend_pow2.c \
|
||||||
rect_solid.c \
|
rect_solid.c \
|
||||||
|
@ -108,6 +110,8 @@ poly_blend.c \
|
||||||
proxy_image.c \
|
proxy_image.c \
|
||||||
proxy_text_fixed.c \
|
proxy_text_fixed.c \
|
||||||
proxy_text_random.c \
|
proxy_text_random.c \
|
||||||
|
proxy_textblock.c \
|
||||||
|
proxy_image_clipped.c \
|
||||||
line_blend.c \
|
line_blend.c \
|
||||||
image_blend_many_smooth_same_scaled.c \
|
image_blend_many_smooth_same_scaled.c \
|
||||||
font_effect_blur_alpha.c \
|
font_effect_blur_alpha.c \
|
||||||
|
@ -125,20 +129,16 @@ image_mask_10.c \
|
||||||
image_mask_11.c \
|
image_mask_11.c \
|
||||||
image_mask_12.c \
|
image_mask_12.c \
|
||||||
image_mask_13.c \
|
image_mask_13.c \
|
||||||
|
image_mask_clipped.c \
|
||||||
vg_basic_rect.c \
|
vg_basic_rect.c \
|
||||||
vg_basic_circle.c \
|
vg_basic_circle.c \
|
||||||
vg_basic_gradient.c \
|
vg_basic_gradient.c \
|
||||||
vg_scaled.c
|
vg_scaled.c \
|
||||||
|
snapshot_widgets_file_icons.c
|
||||||
# \
|
# \
|
||||||
# image_mask_14.c \
|
# image_mask_14.c \
|
||||||
# image_mask_15.c
|
# image_mask_15.c
|
||||||
|
|
||||||
expedite_CFLAGS = @WIN32_CFLAGS@
|
expedite_LDADD = @EFL_LIBS@ -lm
|
||||||
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)
|
EXTRA_DIST = $(bin_SCRIPTS)
|
||||||
|
|
|
@ -6,32 +6,28 @@ static void
|
||||||
_setup(void)
|
_setup(void)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
Evas_Textblock_Style *st;
|
|
||||||
|
|
||||||
o = eo_add(EVAS_TEXTBLOCK_CLASS, evas);
|
o = efl_add(EFL_CANVAS_TEXTBLOCK_CLASS, evas);
|
||||||
eo_do(o, efl_gfx_position_set(10, 40),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(10, 40));
|
||||||
efl_gfx_size_set(win_w - 20, win_h - 50),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(win_w - 20, win_h - 50));
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
st = evas_textblock_style_new();
|
|
||||||
evas_textblock_style_set
|
efl_text_font_family_set(o, "Vera");
|
||||||
(st,
|
efl_text_font_size_set(o, 10);
|
||||||
"DEFAULT='font=Vera font_size=8 align=left color=#000 wrap=word'"
|
efl_text_color_set(o, 0, 0, 0, 255);
|
||||||
"center='+ font=Vera font_size=10 align=center'"
|
efl_text_multiline_set(o, EINA_TRUE);
|
||||||
"/center='- \n \n'"
|
efl_text_horizontal_align_set(o, 0.5);
|
||||||
"p='+ font=Vera font_size=10 align=left'"
|
efl_text_wrap_set(o, EFL_TEXT_FORMAT_WRAP_WORD);
|
||||||
"/p='- \n \n'"
|
|
||||||
);
|
efl_text_markup_set
|
||||||
eo_do(o, evas_obj_textblock_style_set(st),
|
(o,
|
||||||
evas_obj_textblock_clear(),
|
|
||||||
evas_obj_textblock_text_markup_set
|
|
||||||
("<center>"
|
|
||||||
"Enlightenment used to be a window manager project, but "
|
"Enlightenment used to be a window manager project, but "
|
||||||
"since has changed a lot to become a miniature desktop and mobile "
|
"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 "
|
"device environment all of its own. It is now made up of many "
|
||||||
"components (libraries and applications) that have specific uses. "
|
"components (libraries and applications) that have specific uses. "
|
||||||
"It is very large, and so requires more testing and demonstration."
|
"It is very large, and so requires more testing and demonstration."
|
||||||
"</center>"
|
"</center>"
|
||||||
|
"</br>"
|
||||||
"<center>"
|
"<center>"
|
||||||
"Expedite is a full test suite for Evas, which is one of the "
|
"Expedite is a full test suite for Evas, which is one of the "
|
||||||
"core components of the Enlightenment Foundation Libraries. Evas "
|
"core components of the Enlightenment Foundation Libraries. Evas "
|
||||||
|
@ -39,10 +35,8 @@ _setup(void)
|
||||||
"render to many targets, including framebuffer, X11, OpenGL, memory, "
|
"render to many targets, including framebuffer, X11, OpenGL, memory, "
|
||||||
"DirectFB and other targets to boot. It handles high level graphic "
|
"DirectFB and other targets to boot. It handles high level graphic "
|
||||||
"layout descriptions that applications set up, dealing with the hard "
|
"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;
|
o_text = o;
|
||||||
ui_fps(0.0);
|
ui_fps(0.0);
|
||||||
}
|
}
|
||||||
|
@ -50,7 +44,7 @@ _setup(void)
|
||||||
static void
|
static void
|
||||||
_cleanup(void)
|
_cleanup(void)
|
||||||
{
|
{
|
||||||
eo_del(o_text);
|
efl_del(o_text);
|
||||||
o_text = NULL;
|
o_text = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +55,7 @@ _loop(double t EINA_UNUSED,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_key(char *key)
|
_key(const char *key)
|
||||||
{
|
{
|
||||||
if ((!strcmp(key, "Escape")) || (!strcmp(key, "q")) || (!strcmp(key, "Q")))
|
if ((!strcmp(key, "Escape")) || (!strcmp(key, "q")) || (!strcmp(key, "Q")))
|
||||||
{
|
{
|
||||||
|
@ -73,6 +67,5 @@ _key(char *key)
|
||||||
void
|
void
|
||||||
about_start(void)
|
about_start(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,288 +0,0 @@
|
||||||
#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);
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
HI_RES_AWARE CEUX {1}
|
|
|
@ -1,291 +0,0 @@
|
||||||
#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);
|
|
||||||
}
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
|
@ -56,10 +58,16 @@ tests = []
|
||||||
for f in files:
|
for f in files:
|
||||||
d = data[f] = {}
|
d = data[f] = {}
|
||||||
for row in csv.reader(open(f)):
|
for row in csv.reader(open(f)):
|
||||||
|
if len(row) < 2:
|
||||||
|
continue
|
||||||
t = row[1].strip()
|
t = row[1].strip()
|
||||||
|
try:
|
||||||
|
val = float(row[0])
|
||||||
|
except ValueError:
|
||||||
|
continue
|
||||||
if f == ref_f:
|
if f == ref_f:
|
||||||
tests.append(t)
|
tests.append(t)
|
||||||
d[t] = float(row[0])
|
d[t] = val
|
||||||
max_test_name = max(len(t), max_test_name)
|
max_test_name = max(len(t), max_test_name)
|
||||||
|
|
||||||
def report_text():
|
def report_text():
|
||||||
|
@ -68,12 +76,12 @@ def report_text():
|
||||||
fmtsize = len(options.format % {"value": 12345.67, "percentual": 1234.56})
|
fmtsize = len(options.format % {"value": 12345.67, "percentual": 1234.56})
|
||||||
hdrfmt = "%%%d.%ds" % (fmtsize, fmtsize)
|
hdrfmt = "%%%d.%ds" % (fmtsize, fmtsize)
|
||||||
|
|
||||||
print test_name_fmt % "\\",
|
print(test_name_fmt % "\\", end=' ')
|
||||||
print "%7.7s" % (files[0][-7:],),
|
print("%7.7s" % (files[0][-7:],), end=' ')
|
||||||
for f in files[1:]:
|
for f in files[1:]:
|
||||||
n, e = os.path.splitext(f)
|
n, e = os.path.splitext(f)
|
||||||
print hdrfmt % n[-fmtsize:],
|
print(hdrfmt % n[-fmtsize:], end=' ')
|
||||||
print
|
print()
|
||||||
|
|
||||||
if options.color and os.environ.get("TERM", "") in (
|
if options.color and os.environ.get("TERM", "") in (
|
||||||
"xterm", "xterm-color", "rxvt", "rxvt-unicode", "screen",
|
"xterm", "xterm-color", "rxvt", "rxvt-unicode", "screen",
|
||||||
|
@ -90,14 +98,14 @@ def report_text():
|
||||||
|
|
||||||
|
|
||||||
def print_row(test):
|
def print_row(test):
|
||||||
print test_name_fmt % test,
|
print(test_name_fmt % test, end=' ')
|
||||||
ref_val = data[ref_f][test]
|
ref_val = data[ref_f][test]
|
||||||
print "%7.2f" % ref_val,
|
print("%7.2f" % ref_val, end=' ')
|
||||||
for f in others_f:
|
for f in others_f:
|
||||||
try:
|
try:
|
||||||
val = data[f][test]
|
val = data[f][test]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print "-?????-",
|
print("-?????-", end=' ')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
percent = (val - ref_val) / ref_val
|
percent = (val - ref_val) / ref_val
|
||||||
|
@ -111,9 +119,9 @@ def report_text():
|
||||||
fmt = options.format % {"value": val, "percentual": percent * 100}
|
fmt = options.format % {"value": val, "percentual": percent * 100}
|
||||||
if len(fmt) < fmtsize:
|
if len(fmt) < fmtsize:
|
||||||
fmt = hdrfmt % fmt
|
fmt = hdrfmt % fmt
|
||||||
print "%s%s%s" % (c, fmt, color_reset),
|
print("%s%s%s" % (c, fmt, color_reset), end=' ')
|
||||||
|
|
||||||
print
|
print()
|
||||||
|
|
||||||
for t in tests:
|
for t in tests:
|
||||||
print_row(t)
|
print_row(t)
|
||||||
|
@ -123,7 +131,7 @@ def report_html():
|
||||||
import time
|
import time
|
||||||
|
|
||||||
fnames = [os.path.basename(f) for f in files]
|
fnames = [os.path.basename(f) for f in files]
|
||||||
print """\
|
print("""\
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -156,9 +164,9 @@ def report_html():
|
||||||
border-bottom: 1px dashed #ccc;
|
border-bottom: 1px dashed #ccc;
|
||||||
}
|
}
|
||||||
td.test-name, thead tr td { text-align: right; }\
|
td.test-name, thead tr td { text-align: right; }\
|
||||||
"""
|
""")
|
||||||
if options.color:
|
if options.color:
|
||||||
print """\
|
print("""\
|
||||||
td.value-good { background-color: #aaffaa; }
|
td.value-good { background-color: #aaffaa; }
|
||||||
td.value-bad { background-color: #ffaaaa; }
|
td.value-bad { background-color: #ffaaaa; }
|
||||||
td.value-missing { background-color: #ffffaa; }
|
td.value-missing { background-color: #ffffaa; }
|
||||||
|
@ -168,9 +176,9 @@ def report_html():
|
||||||
background-color: #d9d9d9;
|
background-color: #d9d9d9;
|
||||||
border-bottom: 1px dashed #ccc;
|
border-bottom: 1px dashed #ccc;
|
||||||
}
|
}
|
||||||
"""
|
""")
|
||||||
|
|
||||||
print """
|
print("""
|
||||||
</style>
|
</style>
|
||||||
<body>
|
<body>
|
||||||
<p>Comparison sheet for %(files)s, created at %(date)s.</p>
|
<p>Comparison sheet for %(files)s, created at %(date)s.</p>
|
||||||
|
@ -180,17 +188,17 @@ def report_html():
|
||||||
<td>\\</td>\
|
<td>\\</td>\
|
||||||
""" % {"files": ", ".join(fnames),
|
""" % {"files": ", ".join(fnames),
|
||||||
"date": time.asctime(),
|
"date": time.asctime(),
|
||||||
}
|
})
|
||||||
|
|
||||||
for f in fnames:
|
for f in fnames:
|
||||||
print """\
|
print("""\
|
||||||
<td>%s</td>\
|
<td>%s</td>\
|
||||||
""" % f
|
""" % f)
|
||||||
print """\
|
print("""\
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>\
|
<tbody>\
|
||||||
"""
|
""")
|
||||||
|
|
||||||
def print_row(test):
|
def print_row(test):
|
||||||
ref_val = data[ref_f][test]
|
ref_val = data[ref_f][test]
|
||||||
|
@ -199,19 +207,19 @@ def report_html():
|
||||||
else:
|
else:
|
||||||
extra_cls = ""
|
extra_cls = ""
|
||||||
|
|
||||||
print """\
|
print("""\
|
||||||
<tr%s>
|
<tr%s>
|
||||||
<td class="test-name">%s</td>
|
<td class="test-name">%s</td>
|
||||||
<td class="value-reference">%7.2f</td>\
|
<td class="value-reference">%7.2f</td>\
|
||||||
""" % (extra_cls, test, ref_val)
|
""" % (extra_cls, test, ref_val))
|
||||||
|
|
||||||
for f in others_f:
|
for f in others_f:
|
||||||
try:
|
try:
|
||||||
val = data[f][test]
|
val = data[f][test]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print """\
|
print("""\
|
||||||
<td class="value-missing">-?????-</td>\
|
<td class="value-missing">-?????-</td>\
|
||||||
"""
|
""")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
percent = (val - ref_val) / ref_val
|
percent = (val - ref_val) / ref_val
|
||||||
|
@ -224,23 +232,23 @@ def report_html():
|
||||||
|
|
||||||
v = options.format % {"value": val, "percentual": percent * 100}
|
v = options.format % {"value": val, "percentual": percent * 100}
|
||||||
|
|
||||||
print """\
|
print("""\
|
||||||
<td class="value-%s">%s</td>\
|
<td class="value-%s">%s</td>\
|
||||||
""" % (c, v)
|
""" % (c, v))
|
||||||
|
|
||||||
print """\
|
print("""\
|
||||||
</tr>\
|
</tr>\
|
||||||
"""
|
""")
|
||||||
|
|
||||||
for t in tests:
|
for t in tests:
|
||||||
print_row(t)
|
print_row(t)
|
||||||
|
|
||||||
print """\
|
print("""\
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
"""
|
""")
|
||||||
|
|
||||||
if options.report == "text":
|
if options.report == "text":
|
||||||
report_text()
|
report_text()
|
||||||
|
|
|
@ -54,13 +54,13 @@ static void _loop(double t, int f)
|
||||||
char buf[256];
|
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));
|
sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1));
|
||||||
eo_do(text, efl_gfx_filter_program_set(buf, "test"));
|
efl_gfx_filter_program_set(text, buf, "test");
|
||||||
|
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -92,8 +92,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -56,13 +56,13 @@ static void _loop(double t, int f)
|
||||||
char buf[256];
|
char buf[256];
|
||||||
char *str = "a = buffer({ 'rgba' }); padding_set({ %d }); blend({dst=a, color=darkblue});blur({%d,src=a});";
|
char *str = "a = buffer({ 'rgba' }); padding_set({ %d }); blend({dst=a, color=darkblue});blur({%d,src=a});";
|
||||||
sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1));
|
sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1));
|
||||||
eo_do(text, efl_gfx_filter_program_set(buf, "test"));
|
efl_gfx_filter_program_set(text, buf, "test");
|
||||||
|
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -94,8 +94,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,12 +23,11 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("bar.png"), NULL);
|
||||||
efl_file_set(build_path("bar.png"), NULL),
|
efl_gfx_image_border_insets_set(o, 6, 6, 6, 6);
|
||||||
evas_obj_image_border_set(6, 6, 6, 6),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +36,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -55,16 +54,15 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -96,8 +94,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,13 +23,12 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("pan.png"), NULL);
|
||||||
efl_file_set(build_path("pan.png"), NULL),
|
efl_gfx_color_set(o, 64, 64, 64, 255);
|
||||||
efl_gfx_color_set(64, 64, 64, 255),
|
efl_gfx_image_border_insets_set(o, 3, 3, 3, 3);
|
||||||
evas_obj_image_border_set(3, 3, 3, 3),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +37,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -56,16 +55,15 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -97,8 +95,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,17 +25,15 @@ static void _setup(void)
|
||||||
{
|
{
|
||||||
int a;
|
int a;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160));
|
|
||||||
a = 256 - (1 << ((rnd() % 8) + 1));
|
a = 256 - (1 << ((rnd() % 8) + 1));
|
||||||
if (a < 128) a = 128;
|
if (a < 128) a = 128;
|
||||||
eo_do(o,
|
efl_gfx_color_set(o, a, a, a, a);
|
||||||
efl_gfx_color_set(a, a, a, a),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +42,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -60,13 +58,13 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -98,8 +96,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,15 +24,14 @@ static void _setup(void)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
int a;
|
int a;
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
a = rnd()&0xff;
|
a = rnd()&0xff;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_color_set(o, a, a, a, a);
|
||||||
efl_gfx_color_set(a, a, a, a),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +40,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -57,13 +56,13 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -95,8 +94,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,17 +25,16 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < MANYNUM; i++)
|
for (i = 0; i < MANYNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
n = rnd() % 100;
|
n = rnd() % 100;
|
||||||
w = 3 + ((n * (60 - 3)) / 100);
|
w = 3 + ((n * (60 - 3)) / 100);
|
||||||
h = 4 + ((n * (80 - 4)) / 100);
|
h = 4 + ((n * (80 - 4)) / 100);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_image_smooth_scale_set(o, 1);
|
||||||
efl_image_smooth_scale_set(1),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +43,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < MANYNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < MANYNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -54,18 +53,18 @@ static void _loop(double t, int f)
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
for (i = 0; i < MANYNUM; i++)
|
for (i = 0; i < MANYNUM; i++)
|
||||||
{
|
{
|
||||||
eo_do(o_images[i], efl_gfx_size_get(&w, &h));
|
exp_size_get(o_images[i], &w, &h);
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (win_w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (win_w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (win_h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (win_h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -97,8 +96,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,12 +23,11 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +36,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -55,16 +54,15 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -96,8 +94,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,12 +23,11 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +36,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -55,16 +54,15 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -96,8 +94,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,12 +23,11 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +36,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -55,16 +54,15 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -96,8 +94,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,12 +23,11 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +36,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -55,16 +54,15 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -96,8 +94,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,11 +24,11 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i < (OBNUM / 2))
|
if (i < (OBNUM / 2))
|
||||||
{
|
{
|
||||||
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -36,14 +36,12 @@ static void _setup(void)
|
||||||
|
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y));
|
|
||||||
}
|
}
|
||||||
eo_do(o,
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -52,7 +50,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -70,14 +68,14 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -109,8 +107,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,11 +27,11 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i < (OBNUM / 2))
|
if (i < (OBNUM / 2))
|
||||||
{
|
{
|
||||||
eo_do(o, efl_file_set(PACKAGE_DATA_DIR"/data/logo.png", NULL));
|
efl_file_simple_load(o, PACKAGE_DATA_DIR"/data/logo.png", NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -39,14 +39,12 @@ static void _setup(void)
|
||||||
|
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, PACKAGE_DATA_DIR"/data/image.png", NULL);
|
||||||
efl_file_set(PACKAGE_DATA_DIR"/data/image.png", NULL),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y));
|
|
||||||
}
|
}
|
||||||
eo_do(o,
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -55,12 +53,13 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
static void _loop(double t, int f)
|
static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
|
static int k = 0;
|
||||||
int i;
|
int i;
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
|
@ -70,17 +69,18 @@ static void _loop(double t, int f)
|
||||||
w = 120;
|
w = 120;
|
||||||
h = 160;
|
h = 160;
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
++k;
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -112,8 +112,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,11 +27,11 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i < (OBNUM / 2))
|
if (i < (OBNUM / 2))
|
||||||
{
|
{
|
||||||
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -39,14 +39,12 @@ static void _setup(void)
|
||||||
|
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y));
|
|
||||||
}
|
}
|
||||||
eo_do(o,
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +53,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -73,14 +71,14 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -112,8 +110,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,11 +27,11 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i < (OBNUM / 2))
|
if (i < (OBNUM / 2))
|
||||||
{
|
{
|
||||||
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -39,14 +39,12 @@ static void _setup(void)
|
||||||
|
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y));
|
|
||||||
}
|
}
|
||||||
eo_do(o,
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +53,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -73,14 +71,14 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -112,8 +110,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,11 +24,11 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i & 0x1)
|
if (i & 0x1)
|
||||||
{
|
{
|
||||||
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -36,14 +36,12 @@ static void _setup(void)
|
||||||
|
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y));
|
|
||||||
}
|
}
|
||||||
eo_do(o,
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -52,7 +50,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -70,14 +68,14 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -109,8 +107,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,11 +27,11 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i & 0x1)
|
if (i & 0x1)
|
||||||
{
|
{
|
||||||
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -39,14 +39,12 @@ static void _setup(void)
|
||||||
|
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y));
|
|
||||||
}
|
}
|
||||||
eo_do(o,
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -55,12 +53,13 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
static void _loop(double t, int f)
|
static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
|
static int k = 0;
|
||||||
int i;
|
int i;
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
|
@ -70,17 +69,18 @@ static void _loop(double t, int f)
|
||||||
w = 120;
|
w = 120;
|
||||||
h = 160;
|
h = 160;
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
k++;
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -112,8 +112,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,11 +27,11 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i & 0x1)
|
if (i & 0x1)
|
||||||
{
|
{
|
||||||
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -39,14 +39,12 @@ static void _setup(void)
|
||||||
|
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y));
|
|
||||||
}
|
}
|
||||||
eo_do(o,
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +53,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -73,14 +71,14 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -112,8 +110,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,11 +27,11 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i & 0x1)
|
if (i & 0x1)
|
||||||
{
|
{
|
||||||
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -39,14 +39,12 @@ static void _setup(void)
|
||||||
|
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y));
|
|
||||||
}
|
}
|
||||||
eo_do(o,
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +53,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -73,14 +71,14 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -112,8 +110,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,11 +24,11 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i > (OBNUM / 2))
|
if (i > (OBNUM / 2))
|
||||||
{
|
{
|
||||||
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -36,14 +36,12 @@ static void _setup(void)
|
||||||
|
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y));
|
|
||||||
}
|
}
|
||||||
eo_do(o,
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -52,7 +50,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -70,14 +68,14 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -109,8 +107,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,11 +27,11 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i > (OBNUM / 2))
|
if (i > (OBNUM / 2))
|
||||||
{
|
{
|
||||||
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -39,14 +39,12 @@ static void _setup(void)
|
||||||
|
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y));
|
|
||||||
}
|
}
|
||||||
eo_do(o,
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -55,32 +53,34 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
static void _loop(double t, int f)
|
static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
|
static int k = 0;
|
||||||
int i;
|
int i;
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
if (i > (OBNUM / 2))
|
if (i < (OBNUM / 2))
|
||||||
{
|
{
|
||||||
w = 120;
|
w = 120;
|
||||||
h = 160;
|
h = 160;
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
++k;
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -112,8 +112,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,11 +27,11 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i > (OBNUM / 2))
|
if (i > (OBNUM / 2))
|
||||||
{
|
{
|
||||||
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -39,14 +39,12 @@ static void _setup(void)
|
||||||
|
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y));
|
|
||||||
}
|
}
|
||||||
eo_do(o,
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +53,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -73,14 +71,14 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -112,8 +110,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,11 +27,11 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i > (OBNUM / 2))
|
if (i > (OBNUM / 2))
|
||||||
{
|
{
|
||||||
eo_do(o, efl_file_set(build_path("logo.png"), NULL));
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -39,14 +39,12 @@ static void _setup(void)
|
||||||
|
|
||||||
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
|
||||||
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y));
|
|
||||||
}
|
}
|
||||||
eo_do(o,
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +53,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -73,14 +71,14 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -112,8 +110,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,12 +23,11 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_image_smooth_scale_set(o, 1);
|
||||||
efl_image_smooth_scale_set(1),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +36,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -55,16 +54,15 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -96,8 +94,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,12 +23,11 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_image_smooth_scale_set(o, 1);
|
||||||
efl_image_smooth_scale_set(1),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +36,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -55,16 +54,15 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -96,8 +94,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,12 +23,11 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_image_smooth_scale_set(o, 1);
|
||||||
efl_image_smooth_scale_set(1),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +36,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -55,16 +54,15 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -96,8 +94,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,12 +23,11 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_image_smooth_scale_set(o, 1);
|
||||||
efl_image_smooth_scale_set(1),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +36,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -55,16 +54,15 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -96,8 +94,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -0,0 +1,103 @@
|
||||||
|
#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
|
|
@ -23,12 +23,11 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("frame.png"), NULL);
|
||||||
efl_file_set(build_path("frame.png"), NULL),
|
efl_gfx_image_border_insets_set(o, 8, 8, 8, 8);
|
||||||
evas_obj_image_border_set(8, 8, 8, 8),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +36,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -55,16 +54,15 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -96,8 +94,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,17 +25,15 @@ static void _setup(void)
|
||||||
{
|
{
|
||||||
int a;
|
int a;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160));
|
|
||||||
a = 256 - (1 << ((rnd() % 8) + 1));
|
a = 256 - (1 << ((rnd() % 8) + 1));
|
||||||
if (a < 128) a = 128;
|
if (a < 128) a = 128;
|
||||||
eo_do(o,
|
efl_gfx_color_set(o, a, a, a, a);
|
||||||
efl_gfx_color_set(a, a, a, a),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +42,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -60,13 +58,13 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -98,8 +96,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,16 +25,14 @@ static void _setup(void)
|
||||||
{
|
{
|
||||||
int a;
|
int a;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160));
|
|
||||||
a = rnd()&0xff;
|
a = rnd()&0xff;
|
||||||
eo_do(o,
|
efl_gfx_color_set(o, a, a, a, a);
|
||||||
efl_gfx_color_set(a, a, a, a),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -43,7 +41,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -59,13 +57,13 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -97,8 +95,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,13 +23,12 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("bar.png"), NULL);
|
||||||
efl_file_set(build_path("bar.png"), NULL),
|
efl_gfx_image_border_insets_set(o, 6, 6, 6, 6);
|
||||||
evas_obj_image_border_set(6, 6, 6, 6),
|
efl_gfx_image_center_fill_mode_set(o, EFL_GFX_CENTER_FILL_MODE_SOLID);
|
||||||
evas_obj_image_border_center_fill_set(EVAS_BORDER_FILL_SOLID),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +37,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -56,16 +55,15 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -97,8 +95,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,15 +23,14 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_image_border_insets_set(o, 43, 48, 48, 83);
|
||||||
evas_obj_image_border_set(43, 48, 48, 83),
|
efl_gfx_image_center_fill_mode_set(o, EFL_GFX_CENTER_FILL_MODE_SOLID);
|
||||||
evas_obj_image_border_center_fill_set(EVAS_BORDER_FILL_SOLID),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +39,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -56,13 +55,13 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -94,8 +93,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -0,0 +1,109 @@
|
||||||
|
#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
|
|
@ -23,13 +23,12 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +37,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -54,13 +53,13 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -92,8 +91,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,13 +23,12 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +37,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -54,13 +53,13 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -92,8 +91,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,21 +22,19 @@ static void _setup(void)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[0] = o;
|
o_images[0] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("im1.png"), NULL);
|
||||||
efl_file_set(build_path("im1.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
|
||||||
efl_gfx_fill_set(0, 0, 720, 420),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
|
||||||
efl_gfx_size_set(720, 420),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[1] = o;
|
o_images[1] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("im2.png"), NULL);
|
||||||
efl_file_set(build_path("im2.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
|
||||||
efl_gfx_fill_set(0, 0, 720, 420),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
|
||||||
efl_gfx_size_set(720, 420),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -45,7 +43,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 2; i++) eo_del(o_images[i]);
|
for (i = 0; i < 2; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -55,12 +53,12 @@ static void _loop(double t, int f)
|
||||||
|
|
||||||
a = f & 0x1f;
|
a = f & 0x1f;
|
||||||
a = ((a << 3) | (a >> 2)) & 0xff;
|
a = ((a << 3) | (a >> 2)) & 0xff;
|
||||||
eo_do(o_images[1], efl_gfx_color_set(a, a, a, a));
|
efl_gfx_color_set(o_images[1], a, a, a, a);
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -92,8 +90,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,20 +20,21 @@ static Evas_Object *o_images[1];
|
||||||
/* setup */
|
/* setup */
|
||||||
static void _setup(void)
|
static void _setup(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < 1; i++)
|
Eina_Slice sl;
|
||||||
|
|
||||||
|
sl.len = 640 * 480 * 4;
|
||||||
|
sl.mem = malloc(sl.len);
|
||||||
|
for (int i = 0; i < 1; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_gfx_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
|
||||||
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
|
efl_gfx_buffer_alpha_set(o, 0);
|
||||||
evas_obj_image_colorspace_set(EVAS_COLORSPACE_ARGB8888),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 640, 480));
|
||||||
efl_gfx_view_size_set(640, 480),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(640, 480));
|
||||||
evas_obj_image_alpha_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_fill_set(0, 0, 640, 480),
|
efl_gfx_buffer_managed_set(o, &sl, EINA_SIZE2D(640, 480), 0, EFL_GFX_COLORSPACE_ARGB8888, 0);
|
||||||
efl_gfx_size_set(640, 480),
|
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -41,31 +42,45 @@ static void _setup(void)
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
for (int i = 0; i < 1; i++)
|
||||||
for (i = 0; i < 1; i++) eo_del(o_images[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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
static void _loop(double t, int f)
|
static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
int i, st;
|
for (int i = 0; i < 1; i++)
|
||||||
Evas_Coord x, y, w, h;
|
|
||||||
for (i = 0; i < 1; i++)
|
|
||||||
{
|
{
|
||||||
|
Evas_Object *o = o_images[i];
|
||||||
unsigned int *data, *p;
|
unsigned int *data, *p;
|
||||||
|
Evas_Coord x, y, w, h;
|
||||||
|
Eina_Rw_Slice sl = {};
|
||||||
|
int st;
|
||||||
|
|
||||||
w = 640;
|
w = 640;
|
||||||
h = 480;
|
h = 480;
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h),
|
sl = efl_gfx_buffer_map(o, EFL_GFX_BUFFER_ACCESS_MODE_WRITE,
|
||||||
data = evas_obj_image_data_get(1),
|
&EINA_RECT(0, 0, w, h), EFL_GFX_COLORSPACE_ARGB8888, 0, &st);
|
||||||
st = evas_obj_image_stride_get());
|
data = sl.mem;
|
||||||
|
if (!data)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "ERROR: Failed to map image!\n");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
st = st >> 2;
|
st = st >> 2;
|
||||||
p = data;
|
p = sl.mem;
|
||||||
for (y = 0; y < h; y++)
|
for (y = 0; y < h; y++)
|
||||||
{
|
{
|
||||||
for (x = 0; x < w; x++)
|
for (x = 0; x < w; x++)
|
||||||
|
@ -75,15 +90,14 @@ static void _loop(double t, int f)
|
||||||
}
|
}
|
||||||
p += (st - w);
|
p += (st - w);
|
||||||
}
|
}
|
||||||
eo_do(o_images[i],
|
efl_gfx_buffer_unmap(o, sl);
|
||||||
evas_obj_image_data_set(data),
|
efl_gfx_buffer_update_add(o, &EINA_RECT(0, 0, w, h));
|
||||||
evas_obj_image_data_update_add( 0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -115,8 +129,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,20 +20,21 @@ static Evas_Object *o_images[1];
|
||||||
/* setup */
|
/* setup */
|
||||||
static void _setup(void)
|
static void _setup(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < 1; i++)
|
Eina_Slice sl;
|
||||||
|
|
||||||
|
sl.len = 640 * 480 * 4;
|
||||||
|
sl.mem = malloc(sl.len);
|
||||||
|
for (int i = 0; i < 1; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_gfx_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
|
||||||
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
|
efl_gfx_buffer_alpha_set(o, 1);
|
||||||
evas_obj_image_colorspace_set(EVAS_COLORSPACE_ARGB8888),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 640, 480));
|
||||||
efl_gfx_view_size_set(640, 480),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(640, 480));
|
||||||
evas_obj_image_alpha_set(1),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_fill_set(0, 0, 640, 480),
|
efl_gfx_buffer_managed_set(o, &sl, EINA_SIZE2D(640, 480), 0, EFL_GFX_COLORSPACE_ARGB8888, 0);
|
||||||
efl_gfx_size_set(640, 480),
|
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -41,8 +42,15 @@ static void _setup(void)
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
for (int i = 0; i < 1; i++)
|
||||||
for (i = 0; i < 1; i++) eo_del(o_images[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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -50,22 +58,30 @@ static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
int i, st;
|
int i, st;
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
|
|
||||||
for (i = 0; i < 1; i++)
|
for (i = 0; i < 1; i++)
|
||||||
{
|
{
|
||||||
unsigned int *data, *p;
|
Evas_Object *o = o_images[i];
|
||||||
|
unsigned int *p;
|
||||||
|
Eina_Rw_Slice sl = {};
|
||||||
int a, r, g, b;
|
int a, r, g, b;
|
||||||
|
|
||||||
w = 640;
|
w = 640;
|
||||||
h = 480;
|
h = 480;
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h),
|
sl = efl_gfx_buffer_map(o, EFL_GFX_BUFFER_ACCESS_MODE_WRITE,
|
||||||
data = evas_obj_image_data_get(1),
|
&EINA_RECT(0, 0, w, h), EFL_GFX_COLORSPACE_ARGB8888, 0, &st);
|
||||||
st = evas_obj_image_stride_get());
|
if (!sl.mem)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "ERROR: Failed to map image!\n");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
st = st >> 2;
|
st = st >> 2;
|
||||||
p = data;
|
p = sl.mem;
|
||||||
for (y = 0; y < h; y++)
|
for (y = 0; y < h; y++)
|
||||||
{
|
{
|
||||||
for (x = 0; x < w; x++)
|
for (x = 0; x < w; x++)
|
||||||
|
@ -86,15 +102,14 @@ static void _loop(double t, int f)
|
||||||
}
|
}
|
||||||
p += (st - w);
|
p += (st - w);
|
||||||
}
|
}
|
||||||
eo_do(o_images[i],
|
efl_gfx_buffer_unmap(o, sl);
|
||||||
evas_obj_image_data_set(data),
|
efl_gfx_buffer_update_add(o, &EINA_RECT(0, 0, w, h));
|
||||||
evas_obj_image_data_update_add( 0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -126,8 +141,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,56 +16,34 @@ static int done = 0;
|
||||||
|
|
||||||
/* private data */
|
/* private data */
|
||||||
static Evas_Object *o_images[1];
|
static Evas_Object *o_images[1];
|
||||||
static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
|
static Eina_Slice slice[3];
|
||||||
|
|
||||||
/* setup */
|
/* setup */
|
||||||
static void _setup(void)
|
static void _setup(void)
|
||||||
{
|
{
|
||||||
int i, y;
|
|
||||||
FILE *f;
|
FILE *f;
|
||||||
unsigned char **data, **lp;
|
for (int i = 0; i < 1; i++)
|
||||||
Evas_Object *o;
|
|
||||||
for (i = 0; i < 1; i++)
|
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
Evas_Object *o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_gfx_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
|
||||||
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
|
efl_gfx_buffer_alpha_set(o, 0);
|
||||||
evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 640, 480));
|
||||||
efl_gfx_view_size_set(640, 480),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(640, 480));
|
||||||
evas_obj_image_alpha_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_fill_set(0, 0, 640, 480),
|
|
||||||
efl_gfx_size_set(640, 480),
|
slice[0].len = 640 * 480;
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
slice[1].len = 320 * 240;
|
||||||
yp = malloc(640 * 480);
|
slice[2].len = 320 * 240;
|
||||||
up = malloc(320 * 240);
|
|
||||||
vp = malloc(320 * 240);
|
|
||||||
f = fopen(build_path("tp.yuv"), "rb");
|
f = fopen(build_path("tp.yuv"), "rb");
|
||||||
if (f)
|
if (!f) continue;
|
||||||
|
for (int p = 0; p < 3; p++)
|
||||||
{
|
{
|
||||||
fread(yp, 640 * 480, 1, f);
|
slice[p].mem = malloc(slice[p].len);
|
||||||
fread(up, 320 * 240, 1, f);
|
fread((void *) slice[p].mem, slice[p].len, 1, f);
|
||||||
fread(vp, 320 * 240, 1, f);
|
efl_gfx_buffer_managed_set(o, &slice[p], EINA_SIZE2D(640, 480), 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, p);
|
||||||
fclose(f);
|
|
||||||
}
|
}
|
||||||
data = evas_object_image_data_get(o_images[i], 1);
|
fclose(f);
|
||||||
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;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -73,11 +51,16 @@ static void _setup(void)
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
for (int i = 0; i < 1; i++)
|
||||||
for (i = 0; i < 1; i++) eo_del(o_images[i]);
|
{
|
||||||
free(yp);
|
Evas_Object *o = o_images[i];
|
||||||
free(up);
|
for (int p = 0; p < 3; p++)
|
||||||
free(vp);
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -91,17 +74,16 @@ static void _loop(double t, int f)
|
||||||
h = 480;
|
h = 480;
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h),
|
efl_gfx_buffer_update_add(o_images[i], &EINA_RECT(0, 0, 640, 480));
|
||||||
evas_obj_image_data_update_add( 0, 0, 640, 480));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -133,8 +115,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,57 +16,34 @@ static int done = 0;
|
||||||
|
|
||||||
/* private data */
|
/* private data */
|
||||||
static Evas_Object *o_images[1];
|
static Evas_Object *o_images[1];
|
||||||
static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
|
static Eina_Slice slice[3];
|
||||||
|
|
||||||
/* setup */
|
/* setup */
|
||||||
static void _setup(void)
|
static void _setup(void)
|
||||||
{
|
{
|
||||||
int i, y;
|
|
||||||
FILE *f;
|
FILE *f;
|
||||||
unsigned char **data, **lp;
|
for (int i = 0; i < 1; i++)
|
||||||
Evas_Object *o;
|
|
||||||
for (i = 0; i < 1; i++)
|
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
Evas_Object *o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_gfx_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
|
||||||
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
|
efl_gfx_buffer_alpha_set(o, 0);
|
||||||
evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 640, 480));
|
||||||
efl_gfx_view_size_set(640, 480),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(640, 480));
|
||||||
evas_obj_image_alpha_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_fill_set(0, 0, 640, 480),
|
|
||||||
efl_gfx_size_set(640, 480),
|
slice[0].len = 640 * 480;
|
||||||
efl_image_smooth_scale_set(0),
|
slice[1].len = 320 * 240;
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
slice[2].len = 320 * 240;
|
||||||
yp = malloc(640 * 480);
|
|
||||||
up = malloc(320 * 240);
|
|
||||||
vp = malloc(320 * 240);
|
|
||||||
f = fopen(build_path("tp.yuv"), "rb");
|
f = fopen(build_path("tp.yuv"), "rb");
|
||||||
if (f)
|
if (!f) continue;
|
||||||
|
for (int p = 0; p < 3; p++)
|
||||||
{
|
{
|
||||||
fread(yp, 640 * 480, 1, f);
|
slice[p].mem = malloc(slice[p].len);
|
||||||
fread(up, 320 * 240, 1, f);
|
fread((void *) slice[p].mem, slice[p].len, 1, f);
|
||||||
fread(vp, 320 * 240, 1, f);
|
efl_gfx_buffer_managed_set(o, &slice[p], EINA_SIZE2D(640, 480), 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, p);
|
||||||
fclose(f);
|
|
||||||
}
|
}
|
||||||
data = evas_object_image_data_get(o_images[i], 1);
|
fclose(f);
|
||||||
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;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -74,11 +51,16 @@ static void _setup(void)
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
for (int i = 0; i < 1; i++)
|
||||||
for (i = 0; i < 1; i++) eo_del(o_images[i]);
|
{
|
||||||
free(yp);
|
Evas_Object *o = o_images[i];
|
||||||
free(up);
|
for (int p = 0; p < 3; p++)
|
||||||
free(vp);
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -100,15 +82,14 @@ static void _loop(double t, int f)
|
||||||
|
|
||||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
|
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -140,8 +121,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,56 +16,34 @@ static int done = 0;
|
||||||
|
|
||||||
/* private data */
|
/* private data */
|
||||||
static Evas_Object *o_images[1];
|
static Evas_Object *o_images[1];
|
||||||
static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
|
static Eina_Slice slice[3];
|
||||||
|
|
||||||
/* setup */
|
/* setup */
|
||||||
static void _setup(void)
|
static void _setup(void)
|
||||||
{
|
{
|
||||||
int i, y;
|
|
||||||
FILE *f;
|
FILE *f;
|
||||||
unsigned char **data, **lp;
|
for (int i = 0; i < 1; i++)
|
||||||
Evas_Object *o;
|
|
||||||
for (i = 0; i < 1; i++)
|
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
Evas_Object *o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_gfx_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
|
||||||
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
|
efl_gfx_buffer_alpha_set(o, 0);
|
||||||
evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 640, 480));
|
||||||
efl_gfx_view_size_set(640, 480),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(640, 480));
|
||||||
evas_obj_image_alpha_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_fill_set(0, 0, 640, 480),
|
|
||||||
efl_gfx_size_set(640, 480),
|
slice[0].len = 640 * 480;
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
slice[1].len = 320 * 240;
|
||||||
yp = malloc(640 * 480);
|
slice[2].len = 320 * 240;
|
||||||
up = malloc(320 * 240);
|
|
||||||
vp = malloc(320 * 240);
|
|
||||||
f = fopen(build_path("tp.yuv"), "rb");
|
f = fopen(build_path("tp.yuv"), "rb");
|
||||||
if (f)
|
if (!f) continue;
|
||||||
|
for (int p = 0; p < 3; p++)
|
||||||
{
|
{
|
||||||
fread(yp, 640 * 480, 1, f);
|
slice[p].mem = malloc(slice[p].len);
|
||||||
fread(up, 320 * 240, 1, f);
|
fread((void *) slice[p].mem, slice[p].len, 1, f);
|
||||||
fread(vp, 320 * 240, 1, f);
|
efl_gfx_buffer_managed_set(o, &slice[p], EINA_SIZE2D(640, 480), 0, EFL_GFX_COLORSPACE_YCBCR422P601_PL, p);
|
||||||
fclose(f);
|
|
||||||
}
|
}
|
||||||
data = evas_object_image_data_get(o_images[i], 1);
|
fclose(f);
|
||||||
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;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -73,11 +51,16 @@ static void _setup(void)
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
for (int i = 0; i < 1; i++)
|
||||||
for (i = 0; i < 1; i++) eo_del(o_images[i]);
|
{
|
||||||
free(yp);
|
Evas_Object *o = o_images[i];
|
||||||
free(up);
|
for (int p = 0; p < 3; p++)
|
||||||
free(vp);
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -98,15 +81,14 @@ static void _loop(double t, int f)
|
||||||
|
|
||||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
|
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -138,8 +120,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,61 +16,40 @@ static int done = 0;
|
||||||
|
|
||||||
/* private data */
|
/* private data */
|
||||||
static Evas_Object *o_images[1];
|
static Evas_Object *o_images[1];
|
||||||
static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
|
static Eina_Slice slice[3];
|
||||||
|
|
||||||
/* setup */
|
/* setup */
|
||||||
static void _setup(void)
|
static void _setup(void)
|
||||||
{
|
{
|
||||||
int i, y;
|
int stride;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
unsigned char **data, **lp;
|
int w = 320 - 16;
|
||||||
Evas_Object *o;
|
for (int i = 0; i < 1; i++)
|
||||||
for (i = 0; i < 1; i++)
|
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
Evas_Object *o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_gfx_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
|
||||||
evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
|
efl_gfx_buffer_alpha_set(o, 0);
|
||||||
evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 640, 480));
|
||||||
efl_gfx_view_size_set(320, 480),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(640, 480));
|
||||||
evas_obj_image_alpha_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_fill_set(0, 0, 640, 480),
|
|
||||||
efl_gfx_size_set(640, 480),
|
// in this test, the stride is 640 but the width changes
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
slice[0].len = 640 * 480;
|
||||||
yp = malloc(640 * 480);
|
slice[1].len = 320 * 240;
|
||||||
up = malloc(320 * 240);
|
slice[2].len = 320 * 240;
|
||||||
vp = malloc(320 * 240);
|
|
||||||
f = fopen(build_path("tp.yuv"), "rb");
|
f = fopen(build_path("tp.yuv"), "rb");
|
||||||
if (f)
|
if (!f) continue;
|
||||||
|
stride = 640;
|
||||||
|
for (int p = 0; p < 3; p++)
|
||||||
{
|
{
|
||||||
fread(yp, 640 * 480, 1, f);
|
slice[p].mem = malloc(slice[p].len);
|
||||||
fread(up, 320 * 240, 1, f);
|
fread((void *) slice[p].mem, slice[p].len, 1, f);
|
||||||
fread(vp, 320 * 240, 1, f);
|
efl_gfx_buffer_managed_set(o, &slice[p], EINA_SIZE2D(w, 480), stride,
|
||||||
fclose(f);
|
EFL_GFX_COLORSPACE_YCBCR422P601_PL, p);
|
||||||
}
|
stride = 320;
|
||||||
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;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -78,11 +57,17 @@ static void _setup(void)
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
for (int i = 0; i < 1; i++)
|
||||||
for (i = 0; i < 1; i++) eo_del(o_images[i]);
|
{
|
||||||
free(yp);
|
Evas_Object *o = o_images[i];
|
||||||
free(up);
|
for (int p = 0; p < 3; p++)
|
||||||
free(vp);
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -92,53 +77,39 @@ static void _loop(double t, int f)
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
for (i = 0; i < 1; i++)
|
for (i = 0; i < 1; i++)
|
||||||
{
|
{
|
||||||
unsigned char **data, **lp;
|
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);
|
||||||
|
|
||||||
w = 640;
|
w = 640;
|
||||||
h = 480;
|
h = 480;
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
|
|
||||||
w = 320 - 16 + f;
|
// logic here differs a bit from old expedite
|
||||||
if (w < 1) w = 1;
|
w = 320 - 16 + (f * 2) % 336;
|
||||||
else if (w > 640) w = 640;
|
if (w > 640) w = 320;
|
||||||
|
|
||||||
w &= ~0x1;
|
stride = 640;
|
||||||
|
for (int p = 0; p < 3; p++)
|
||||||
eo_do(o_images[i], efl_gfx_view_size_set(w, 480));
|
{
|
||||||
data = evas_object_image_data_get(o_images[i], 1);
|
efl_gfx_buffer_managed_set(o, &sl[p], EINA_SIZE2D(w, 480), stride,
|
||||||
if (data)
|
EFL_GFX_COLORSPACE_YCBCR422P601_PL, p);
|
||||||
{
|
stride = 320;
|
||||||
lp = data;
|
}
|
||||||
for (y = 0; y < 480; y++)
|
efl_gfx_buffer_update_add(o, &EINA_RECT(0, 0, w, 480));
|
||||||
{
|
|
||||||
*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);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -170,8 +141,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -54,15 +54,14 @@ _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
c->side[i].o = o;
|
c->side[i].o = o;
|
||||||
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
|
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path(buf), NULL);
|
||||||
efl_file_set(build_path(buf), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 256, 256));
|
||||||
efl_gfx_fill_set(0, 0, 256, 256),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(256, 256));
|
||||||
efl_gfx_size_set(256, 256),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
POINT(0, 0, -w, -h, -d, 0, 0);
|
POINT(0, 0, -w, -h, -d, 0, 0);
|
||||||
POINT(0, 1, w, -h, -d, 256, 0);
|
POINT(0, 1, w, -h, -d, 256, 0);
|
||||||
|
@ -131,14 +130,13 @@ _cube_pos(Cube *c,
|
||||||
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
|
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
|
||||||
if (evas_map_util_clockwise_get(m))
|
if (evas_map_util_clockwise_get(m))
|
||||||
{
|
{
|
||||||
eo_do(c->side[i].o,
|
evas_object_map_enable_set(c->side[i].o, 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(c->side[i].o, m);
|
||||||
evas_obj_map_set(m),
|
efl_gfx_entity_visible_set(c->side[i].o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
eo_do(c->side[i].o, efl_gfx_visible_set(EINA_FALSE));
|
efl_gfx_entity_visible_set(c->side[i].o, EINA_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
order[i] = i;
|
order[i] = i;
|
||||||
|
@ -163,9 +161,9 @@ _cube_pos(Cube *c,
|
||||||
}
|
}
|
||||||
while (!sorted);
|
while (!sorted);
|
||||||
|
|
||||||
eo_do(c->side[order[0]].o, efl_gfx_stack_raise());
|
efl_gfx_stack_raise_to_top(c->side[order[0]].o);
|
||||||
for (i = 1; i < 6; i++)
|
for (i = 1; i < 6; i++)
|
||||||
eo_do(c->side[order[i]].o, efl_gfx_stack_below(c->side[order[i - 1]].o));
|
efl_gfx_stack_below(c->side[order[i]].o, c->side[order[i - 1]].o);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -173,7 +171,7 @@ _cube_free(Cube *c)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
|
for (i = 0; i < 6; i++) efl_del(c->side[i].o);
|
||||||
free(c);
|
free(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,7 +219,7 @@ static void _loop(double t, int f)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -253,8 +251,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -54,14 +54,13 @@ _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
c->side[i].o = o;
|
c->side[i].o = o;
|
||||||
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
|
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path(buf), NULL);
|
||||||
efl_file_set(build_path(buf), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 256, 256));
|
||||||
efl_gfx_fill_set(0, 0, 256, 256),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(256, 256));
|
||||||
efl_gfx_size_set(256, 256),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
POINT(0, 0, -w, -h, -d, 0, 0);
|
POINT(0, 0, -w, -h, -d, 0, 0);
|
||||||
POINT(0, 1, w, -h, -d, 256, 0);
|
POINT(0, 1, w, -h, -d, 256, 0);
|
||||||
|
@ -129,14 +128,13 @@ _cube_pos(Cube *c,
|
||||||
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
|
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
|
||||||
if (evas_map_util_clockwise_get(m))
|
if (evas_map_util_clockwise_get(m))
|
||||||
{
|
{
|
||||||
eo_do(c->side[i].o,
|
evas_object_map_enable_set(c->side[i].o, 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(c->side[i].o, m);
|
||||||
evas_obj_map_set(m),
|
efl_gfx_entity_visible_set(c->side[i].o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
eo_do(c->side[i].o, efl_gfx_visible_set(EINA_FALSE));
|
efl_gfx_entity_visible_set(c->side[i].o, EINA_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
order[i] = i;
|
order[i] = i;
|
||||||
|
@ -161,9 +159,9 @@ _cube_pos(Cube *c,
|
||||||
}
|
}
|
||||||
while (!sorted);
|
while (!sorted);
|
||||||
|
|
||||||
eo_do(c->side[order[0]].o, efl_gfx_stack_raise());
|
efl_gfx_stack_raise_to_top(c->side[order[0]].o);
|
||||||
for (i = 1; i < 6; i++)
|
for (i = 1; i < 6; i++)
|
||||||
eo_do(c->side[order[i]].o, efl_gfx_stack_below(c->side[order[i - 1]].o));
|
efl_gfx_stack_below(c->side[order[i]].o, c->side[order[i - 1]].o);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -171,7 +169,7 @@ _cube_free(Cube *c)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
|
for (i = 0; i < 6; i++) efl_del(c->side[i].o);
|
||||||
free(c);
|
free(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,7 +217,7 @@ static void _loop(double t, int f)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -251,8 +249,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -54,15 +54,14 @@ _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
c->side[i].o = o;
|
c->side[i].o = o;
|
||||||
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
|
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path(buf), NULL);
|
||||||
efl_file_set(build_path(buf), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 256, 256));
|
||||||
efl_gfx_fill_set(0, 0, 256, 256),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(256, 256));
|
||||||
efl_gfx_size_set(256, 256),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
POINT(0, 0, -w, -h, -d, 0, 0);
|
POINT(0, 0, -w, -h, -d, 0, 0);
|
||||||
POINT(0, 1, w, -h, -d, 256, 0);
|
POINT(0, 1, w, -h, -d, 256, 0);
|
||||||
|
@ -129,9 +128,8 @@ _cube_pos(Cube *c,
|
||||||
255, 255, 255,
|
255, 255, 255,
|
||||||
20, 20, 20);
|
20, 20, 20);
|
||||||
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
|
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
|
||||||
eo_do(c->side[i].o,
|
evas_object_map_enable_set(c->side[i].o, 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(c->side[i].o, m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
|
|
||||||
order[i] = i;
|
order[i] = i;
|
||||||
for (j = 0; j < 4; j++)
|
for (j = 0; j < 4; j++)
|
||||||
|
@ -155,9 +153,9 @@ _cube_pos(Cube *c,
|
||||||
}
|
}
|
||||||
while (!sorted);
|
while (!sorted);
|
||||||
|
|
||||||
eo_do(c->side[order[0]].o, efl_gfx_stack_raise());
|
efl_gfx_stack_raise_to_top(c->side[order[0]].o);
|
||||||
for (i = 1; i < 6; i++)
|
for (i = 1; i < 6; i++)
|
||||||
eo_do(c->side[order[i]].o, efl_gfx_stack_below(c->side[order[i - 1]].o));
|
efl_gfx_stack_below(c->side[order[i]].o, c->side[order[i - 1]].o);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -165,7 +163,7 @@ _cube_free(Cube *c)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
|
for (i = 0; i < 6; i++) efl_del(c->side[i].o);
|
||||||
free(c);
|
free(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,7 +211,7 @@ static void _loop(double t, int f)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -245,8 +243,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -54,14 +54,13 @@ _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
c->side[i].o = o;
|
c->side[i].o = o;
|
||||||
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
|
snprintf(buf, sizeof(buf), "cube%i.png", i + 1);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path(buf), NULL);
|
||||||
efl_file_set(build_path(buf), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 256, 256));
|
||||||
efl_gfx_fill_set(0, 0, 256, 256),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(256, 256));
|
||||||
efl_gfx_size_set(256, 256),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
POINT(0, 0, -w, -h, -d, 0, 0);
|
POINT(0, 0, -w, -h, -d, 0, 0);
|
||||||
POINT(0, 1, w, -h, -d, 256, 0);
|
POINT(0, 1, w, -h, -d, 256, 0);
|
||||||
|
@ -127,9 +126,8 @@ _cube_pos(Cube *c,
|
||||||
255, 255, 255,
|
255, 255, 255,
|
||||||
20, 20, 20);
|
20, 20, 20);
|
||||||
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
|
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512);
|
||||||
eo_do(c->side[i].o,
|
evas_object_map_enable_set(c->side[i].o, 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(c->side[i].o, m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
|
|
||||||
order[i] = i;
|
order[i] = i;
|
||||||
for (j = 0; j < 4; j++)
|
for (j = 0; j < 4; j++)
|
||||||
|
@ -153,9 +151,9 @@ _cube_pos(Cube *c,
|
||||||
}
|
}
|
||||||
while (!sorted);
|
while (!sorted);
|
||||||
|
|
||||||
eo_do(c->side[order[0]].o, efl_gfx_stack_raise());
|
efl_gfx_stack_raise_to_top(c->side[order[0]].o);
|
||||||
for (i = 1; i < 6; i++)
|
for (i = 1; i < 6; i++)
|
||||||
eo_do(c->side[order[i]].o, efl_gfx_stack_below(c->side[order[i - 1]].o));
|
efl_gfx_stack_below(c->side[order[i]].o, c->side[order[i - 1]].o);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -163,7 +161,7 @@ _cube_free(Cube *c)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
|
for (i = 0; i < 6; i++) efl_del(c->side[i].o);
|
||||||
free(c);
|
free(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,7 +209,7 @@ static void _loop(double t, int f)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -243,8 +241,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -54,15 +54,14 @@ _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
c->side[i].o = o;
|
c->side[i].o = o;
|
||||||
snprintf(buf, sizeof(buf), "im%i.png", (i % 2) + 1);
|
snprintf(buf, sizeof(buf), "im%i.png", (i % 2) + 1);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path(buf), NULL);
|
||||||
efl_file_set(build_path(buf), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
|
||||||
efl_gfx_fill_set(0, 0, 720, 420),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
|
||||||
efl_gfx_size_set(720, 420),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
POINT(0, 0, -w, -h, -d, 0, 0);
|
POINT(0, 0, -w, -h, -d, 0, 0);
|
||||||
POINT(0, 1, w, -h, -d, 720, 0);
|
POINT(0, 1, w, -h, -d, 720, 0);
|
||||||
|
@ -131,14 +130,13 @@ _cube_pos(Cube *c,
|
||||||
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -360, 720);
|
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -360, 720);
|
||||||
if (evas_map_util_clockwise_get(m))
|
if (evas_map_util_clockwise_get(m))
|
||||||
{
|
{
|
||||||
eo_do(c->side[i].o,
|
evas_object_map_enable_set(c->side[i].o, 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(c->side[i].o, m);
|
||||||
evas_obj_map_set(m),
|
efl_gfx_entity_visible_set(c->side[i].o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
eo_do(c->side[i].o, efl_gfx_visible_set(EINA_FALSE));
|
efl_gfx_entity_visible_set(c->side[i].o, EINA_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
order[i] = i;
|
order[i] = i;
|
||||||
|
@ -163,9 +161,9 @@ _cube_pos(Cube *c,
|
||||||
}
|
}
|
||||||
while (!sorted);
|
while (!sorted);
|
||||||
|
|
||||||
eo_do(c->side[order[0]].o, efl_gfx_stack_raise());
|
efl_gfx_stack_raise_to_top(c->side[order[0]].o);
|
||||||
for (i = 1; i < 6; i++)
|
for (i = 1; i < 6; i++)
|
||||||
eo_do(c->side[order[i]].o, efl_gfx_stack_below(c->side[order[i - 1]].o));
|
efl_gfx_stack_below(c->side[order[i]].o, c->side[order[i - 1]].o);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -173,7 +171,7 @@ _cube_free(Cube *c)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
|
for (i = 0; i < 6; i++) efl_del(c->side[i].o);
|
||||||
free(c);
|
free(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +199,7 @@ static void _loop(double t, int f)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -233,8 +231,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -54,15 +54,14 @@ _cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
c->side[i].o = o;
|
c->side[i].o = o;
|
||||||
snprintf(buf, sizeof(buf), "im%i.png", (i % 2) + 1);
|
snprintf(buf, sizeof(buf), "im%i.png", (i % 2) + 1);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path(buf), NULL);
|
||||||
efl_file_set(build_path(buf), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
|
||||||
efl_gfx_fill_set(0, 0, 720, 420),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
|
||||||
efl_gfx_size_set(720, 420),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
POINT(0, 0, -w, -h, -d, 0, 0);
|
POINT(0, 0, -w, -h, -d, 0, 0);
|
||||||
POINT(0, 1, w, -h, -d, 720, 0);
|
POINT(0, 1, w, -h, -d, 720, 0);
|
||||||
|
@ -128,14 +127,13 @@ _cube_pos(Cube *c,
|
||||||
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -360, 720);
|
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -360, 720);
|
||||||
if (evas_map_util_clockwise_get(m))
|
if (evas_map_util_clockwise_get(m))
|
||||||
{
|
{
|
||||||
eo_do(c->side[i].o,
|
evas_object_map_enable_set(c->side[i].o, 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(c->side[i].o, m);
|
||||||
evas_obj_map_set(m),
|
efl_gfx_entity_visible_set(c->side[i].o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
eo_do(c->side[i].o, efl_gfx_visible_set(EINA_FALSE));
|
efl_gfx_entity_visible_set(c->side[i].o, EINA_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
order[i] = i;
|
order[i] = i;
|
||||||
|
@ -160,9 +158,9 @@ _cube_pos(Cube *c,
|
||||||
}
|
}
|
||||||
while (!sorted);
|
while (!sorted);
|
||||||
|
|
||||||
eo_do(c->side[order[0]].o, efl_gfx_stack_raise());
|
efl_gfx_stack_raise_to_top(c->side[order[0]].o);
|
||||||
for (i = 1; i < 6; i++)
|
for (i = 1; i < 6; i++)
|
||||||
eo_do(c->side[order[i]].o, efl_gfx_stack_below(c->side[order[i - 1]].o));
|
efl_gfx_stack_below(c->side[order[i]].o, c->side[order[i - 1]].o);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -170,7 +168,7 @@ _cube_free(Cube *c)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 6; i++) eo_del(c->side[i].o);
|
for (i = 0; i < 6; i++) efl_del(c->side[i].o);
|
||||||
free(c);
|
free(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,7 +196,7 @@ static void _loop(double t, int f)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -230,8 +228,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -29,25 +29,23 @@ static void _setup(void)
|
||||||
{
|
{
|
||||||
char buf[256];
|
char buf[256];
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1);
|
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path(buf), NULL);
|
||||||
efl_file_set(build_path(buf), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 256, 256));
|
||||||
efl_gfx_fill_set(0, 0, 256, 256),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(256, 256));
|
||||||
efl_gfx_size_set(256, 256),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_reflec[i] = o;
|
o_reflec[i] = o;
|
||||||
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1);
|
snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path(buf), NULL);
|
||||||
efl_file_set(build_path(buf), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 256, 256));
|
||||||
efl_gfx_fill_set(0, 0, 256, 256),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(256, 256));
|
||||||
efl_gfx_size_set(256, 256),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -58,8 +56,8 @@ static void _cleanup(void)
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < CNUM; i++)
|
for (i = 0; i < CNUM; i++)
|
||||||
{
|
{
|
||||||
eo_del(o_images[i]);
|
efl_del(o_images[i]);
|
||||||
eo_del(o_reflec[i]);
|
efl_del(o_reflec[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,13 +128,13 @@ static void _loop(double t, int f)
|
||||||
|
|
||||||
if (c <= 0)
|
if (c <= 0)
|
||||||
{
|
{
|
||||||
eo_do(o_images[i], efl_gfx_stack_raise());
|
efl_gfx_stack_raise_to_top(o_images[i]);
|
||||||
eo_do(o_reflec[i], efl_gfx_stack_raise());
|
efl_gfx_stack_raise_to_top(o_reflec[i]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
eo_do(o_images[i], efl_gfx_stack_lower());
|
efl_gfx_stack_lower_to_bottom(o_images[i]);
|
||||||
eo_do(o_reflec[i], efl_gfx_stack_lower());
|
efl_gfx_stack_lower_to_bottom(o_reflec[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
evas_map_point_coord_set (m, 0, x, y, -z);
|
evas_map_point_coord_set (m, 0, x, y, -z);
|
||||||
|
@ -159,9 +157,8 @@ static void _loop(double t, int f)
|
||||||
x + (w / 2), y + (h / 2), 0);
|
x + (w / 2), y + (h / 2), 0);
|
||||||
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512);
|
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512);
|
||||||
|
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
|
|
||||||
evas_map_point_coord_set (m, 0, x, yy, -z);
|
evas_map_point_coord_set (m, 0, x, yy, -z);
|
||||||
evas_map_point_image_uv_set(m, 0, 0, 256);
|
evas_map_point_image_uv_set(m, 0, 0, 256);
|
||||||
|
@ -183,16 +180,15 @@ static void _loop(double t, int f)
|
||||||
x + (w / 2), y + (h / 2), 0);
|
x + (w / 2), y + (h / 2), 0);
|
||||||
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512);
|
evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512);
|
||||||
|
|
||||||
eo_do(o_reflec[i],
|
evas_object_map_enable_set(o_reflec[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_reflec[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -224,8 +220,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,14 +24,13 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < (OBNUM / 2); i++)
|
for (i = 0; i < (OBNUM / 2); i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +39,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
|
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -69,15 +68,14 @@ static void _loop(double t, int f)
|
||||||
|
|
||||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
|
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -109,8 +107,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,14 +24,13 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < (OBNUM / 2); i++)
|
for (i = 0; i < (OBNUM / 2); i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +39,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
|
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -69,15 +68,14 @@ static void _loop(double t, int f)
|
||||||
|
|
||||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
|
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -109,8 +107,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,13 +24,12 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < (OBNUM / 2); i++)
|
for (i = 0; i < (OBNUM / 2); i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +38,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
|
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -67,15 +66,14 @@ static void _loop(double t, int f)
|
||||||
|
|
||||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
|
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -107,8 +105,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,13 +24,12 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < (OBNUM / 2); i++)
|
for (i = 0; i < (OBNUM / 2); i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +38,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
|
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -66,15 +65,14 @@ static void _loop(double t, int f)
|
||||||
evas_map_point_color_set(m, 3, 0, 0, 0, 0);
|
evas_map_point_color_set(m, 3, 0, 0, 0, 0);
|
||||||
|
|
||||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -106,8 +104,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,14 +24,13 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < (OBNUM / 2); i++)
|
for (i = 0; i < (OBNUM / 2); i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +39,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
|
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -69,15 +68,14 @@ static void _loop(double t, int f)
|
||||||
|
|
||||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
|
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -109,8 +107,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,14 +24,13 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < (OBNUM / 2); i++)
|
for (i = 0; i < (OBNUM / 2); i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +39,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
|
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -69,15 +68,14 @@ static void _loop(double t, int f)
|
||||||
|
|
||||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
|
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -109,8 +107,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,13 +24,12 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < (OBNUM / 2); i++)
|
for (i = 0; i < (OBNUM / 2); i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +38,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
|
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -67,15 +66,14 @@ static void _loop(double t, int f)
|
||||||
|
|
||||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
|
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -107,8 +105,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,13 +24,12 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < (OBNUM / 2); i++)
|
for (i = 0; i < (OBNUM / 2); i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +38,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
|
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -67,15 +66,14 @@ static void _loop(double t, int f)
|
||||||
|
|
||||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
|
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -107,8 +105,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,14 +24,13 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < (OBNUM / 2); i++)
|
for (i = 0; i < (OBNUM / 2); i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +39,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
|
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -64,15 +63,14 @@ static void _loop(double t, int f)
|
||||||
|
|
||||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
|
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -104,8 +102,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,14 +24,13 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < (OBNUM / 2); i++)
|
for (i = 0; i < (OBNUM / 2); i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +39,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
|
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -64,15 +63,14 @@ static void _loop(double t, int f)
|
||||||
|
|
||||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
|
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -104,8 +102,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,12 +24,12 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < (OBNUM / 2); i++)
|
for (i = 0; i < (OBNUM / 2); i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o, efl_file_set(build_path("logo.png"), NULL),
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
|
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* 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_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
|
|
||||||
eo_do(o_images[i], evas_obj_map_enable_set(1),
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_set(m));
|
evas_object_map_set(o_images[i], m);
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -100,8 +100,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,13 +24,12 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < (OBNUM / 2); i++)
|
for (i = 0; i < (OBNUM / 2); i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +38,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
|
for (i = 0; i < (OBNUM / 2); i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -62,15 +61,14 @@ static void _loop(double t, int f)
|
||||||
|
|
||||||
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
|
||||||
|
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -102,8 +100,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
_setup();
|
ui_func_set(_key, _loop, _setup);
|
||||||
ui_func_set(_key, _loop);
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,23 +23,21 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i+= 2)
|
for (i = 0; i < OBNUM; i+= 2)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i + 1] = o;
|
o_images[i + 1] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("e-logo.png"), NULL);
|
||||||
efl_file_set(build_path("e-logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
eo_do(o_images[i], evas_obj_clip_set(o));
|
evas_object_clip_set(o_images[i], o);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +46,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -64,14 +62,14 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
eo_do(o_images[i + 1], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i + 1], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -103,8 +101,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,25 +23,23 @@ static void _setup(void)
|
||||||
int i;
|
int i;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_mask = o;
|
o_mask = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
|
||||||
efl_file_set(build_path("e-logo-mask.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
|
||||||
efl_gfx_fill_set(0, 0, 720, 420),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
|
||||||
efl_gfx_size_set(720, 420),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
|
||||||
efl_gfx_position_set((win_w - 720) / 2, (win_h - 420) / 2),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
for (i = 0; i < 1; i++)
|
for (i = 0; i < 1; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("texture.png"), NULL);
|
||||||
efl_file_set(build_path("texture.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, win_w * 4, win_h * 4));
|
||||||
efl_gfx_fill_set(0, 0, win_w * 4, win_h * 4),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(win_w * 4, win_h * 4));
|
||||||
efl_gfx_size_set(win_w * 4, win_h * 4),
|
evas_object_clip_set(o, o_mask);
|
||||||
evas_obj_clip_set(o_mask),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -50,8 +48,8 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 1; i++) eo_del(o_images[i]);
|
for (i = 0; i < 1; i++) efl_del(o_images[i]);
|
||||||
eo_del(o_mask);
|
efl_del(o_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -59,28 +57,25 @@ static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
static Evas_Map *m = NULL;
|
static Evas_Map *m = NULL;
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord w, h;
|
||||||
if (!m) m = evas_map_new(4);
|
if (!m) m = evas_map_new(4);
|
||||||
for (i = 0; i < 1; i++)
|
for (i = 0; i < 1; i++)
|
||||||
{
|
{
|
||||||
w = win_w * 4;
|
w = win_w * 4;
|
||||||
h = win_h * 4;
|
h = win_h * 4;
|
||||||
x = (win_w / 2) - (w / 2);
|
evas_map_util_points_populate_from_geometry(m,
|
||||||
y = (win_h / 2) - (h / 2);
|
|
||||||
evas_map_util_points_populate_from_geometry(m,
|
|
||||||
-win_w, -win_h,
|
-win_w, -win_h,
|
||||||
win_w * 4, win_h * 4, 0);
|
w, h, 0);
|
||||||
evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
|
evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
|
||||||
|
|
||||||
eo_do(o_images[i],
|
evas_object_map_enable_set(o_images[i], 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_images[i], m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -112,8 +107,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,25 +23,23 @@ static void _setup(void)
|
||||||
int i;
|
int i;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_mask = o;
|
o_mask = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
|
||||||
efl_file_set(build_path("e-logo-mask.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
|
||||||
efl_gfx_fill_set(0, 0, 720, 420),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
|
||||||
efl_gfx_size_set(720, 420),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
|
||||||
efl_gfx_position_set((win_w - 720) / 2, (win_h - 420) / 2),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
evas_object_clip_set(o, o_mask);
|
||||||
evas_obj_clip_set(o_mask),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -50,8 +48,8 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
eo_del(o_mask);
|
efl_del(o_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -68,7 +66,7 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
if (!m) m = evas_map_new(4);
|
if (!m) m = evas_map_new(4);
|
||||||
evas_map_util_points_populate_from_geometry(m,
|
evas_map_util_points_populate_from_geometry(m,
|
||||||
|
@ -77,14 +75,13 @@ static void _loop(double t, int f)
|
||||||
720, 420, 0);
|
720, 420, 0);
|
||||||
evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
|
evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
|
||||||
|
|
||||||
eo_do(o_mask,
|
evas_object_map_enable_set(o_mask, 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_mask, m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -116,8 +113,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,26 +23,24 @@ static void _setup(void)
|
||||||
int i;
|
int i;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_mask = o;
|
o_mask = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
|
||||||
efl_file_set(build_path("e-logo-mask.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
|
||||||
efl_gfx_fill_set(0, 0, 720, 420),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
|
||||||
efl_gfx_size_set(720, 420),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
|
||||||
efl_gfx_position_set((win_w - 720) / 2, (win_h - 420) / 2),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_image_smooth_scale_set(o, 1);
|
||||||
efl_image_smooth_scale_set(1),
|
evas_object_clip_set(o, o_mask);
|
||||||
evas_obj_clip_set(o_mask),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -51,8 +49,8 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
eo_del(o_mask);
|
efl_del(o_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -71,16 +69,15 @@ static void _loop(double t, int f)
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||||
|
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -112,8 +109,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,26 +23,24 @@ static void _setup(void)
|
||||||
int i;
|
int i;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_mask = o;
|
o_mask = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
|
||||||
efl_file_set(build_path("e-logo-mask.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
|
||||||
efl_gfx_fill_set(0, 0, 720, 420),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
|
||||||
efl_gfx_size_set(720, 420),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
|
||||||
efl_gfx_position_set((win_w - 720) / 2, (win_h - 420) / 2),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
efl_image_smooth_scale_set(0),
|
evas_object_clip_set(o, o_mask);
|
||||||
evas_obj_clip_set(o_mask),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -51,8 +49,8 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
eo_del(o_mask);
|
efl_del(o_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -71,16 +69,15 @@ static void _loop(double t, int f)
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||||
|
|
||||||
eo_do(o_images[i],
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_position_set(x, y),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -112,8 +109,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,23 +23,21 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i+= 2)
|
for (i = 0; i < OBNUM; i+= 2)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
efl_file_set(build_path("image.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i + 1] = o;
|
o_images[i + 1] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("e-logo-2.png"), NULL);
|
||||||
efl_file_set(build_path("e-logo-2.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
eo_do(o_images[i], evas_obj_clip_set(o));
|
evas_object_clip_set(o_images[i], o);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +46,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -64,14 +62,14 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
eo_do(o_images[i + 1], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i + 1], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -103,8 +101,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,23 +23,21 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < OBNUM; i+= 2)
|
for (i = 0; i < OBNUM; i+= 2)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("e-logo-2.png"), NULL);
|
||||||
efl_file_set(build_path("e-logo-2.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i + 1] = o;
|
o_images[i + 1] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
eo_do(o_images[i], evas_obj_clip_set(o));
|
evas_object_clip_set(o_images[i], o);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +46,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -64,14 +62,14 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
eo_do(o_images[i + 1], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i + 1], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -103,8 +101,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,25 +23,23 @@ static void _setup(void)
|
||||||
int i;
|
int i;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_mask = o;
|
o_mask = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
|
||||||
efl_file_set(build_path("e-logo-mask.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
|
||||||
efl_gfx_fill_set(0, 0, 720, 420),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
|
||||||
efl_gfx_size_set(720, 420),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
|
||||||
efl_gfx_position_set((win_w - 720) / 2, (win_h - 420) / 2),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
evas_object_clip_set(o, o_mask);
|
||||||
evas_obj_clip_set(o_mask),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -50,8 +48,8 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
eo_del(o_mask);
|
efl_del(o_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -67,13 +65,13 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -105,8 +103,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,25 +23,23 @@ static void _setup(void)
|
||||||
int i;
|
int i;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_mask = o;
|
o_mask = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("e-logo-2.png"), NULL);
|
||||||
efl_file_set(build_path("e-logo-2.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 120) / 2, (win_h - 160) / 2));
|
||||||
efl_gfx_position_set((win_w - 120) / 2, (win_h - 160) / 2),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
evas_object_clip_set(o, o_mask);
|
||||||
evas_obj_clip_set(o_mask),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -50,8 +48,8 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
eo_del(o_mask);
|
efl_del(o_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -67,13 +65,13 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -105,8 +103,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,25 +23,23 @@ static void _setup(void)
|
||||||
int i;
|
int i;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_mask = o;
|
o_mask = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
|
||||||
efl_file_set(build_path("e-logo-mask.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
|
||||||
efl_gfx_fill_set(0, 0, 720, 420),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
|
||||||
efl_gfx_size_set(720, 420),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
|
||||||
efl_gfx_position_set((win_w - 720) / 2, (win_h - 420) / 2),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120 / 2, 160 / 2));
|
||||||
efl_gfx_fill_set(0, 0, 120 / 2, 160 / 2),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120 / 2, 160 / 2));
|
||||||
efl_gfx_size_set(120 / 2, 160 / 2),
|
evas_object_clip_set(o, o_mask);
|
||||||
evas_obj_clip_set(o_mask),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -50,8 +48,8 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
eo_del(o_mask);
|
efl_del(o_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -67,13 +65,13 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -105,8 +103,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,25 +23,23 @@ static void _setup(void)
|
||||||
int i;
|
int i;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_mask = o;
|
o_mask = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("e-logo-2.png"), NULL);
|
||||||
efl_file_set(build_path("e-logo-2.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 120) / 2, (win_h - 160) / 2));
|
||||||
efl_gfx_position_set((win_w - 120) / 2, (win_h - 160) / 2),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
evas_object_clip_set(o, o_mask);
|
||||||
evas_obj_clip_set(o_mask),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -50,8 +48,8 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
eo_del(o_mask);
|
efl_del(o_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -67,19 +65,18 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
w = 10 + (110 + (110 * sin((double)(f) / (14.3 * SLOW))));
|
w = 10 + (110 + (110 * sin((double)(f) / (14.3 * SLOW))));
|
||||||
h = 10 + (150 + (150 * sin((double)(f) / (21.7 * SLOW))));
|
h = 10 + (150 + (150 * sin((double)(f) / (21.7 * SLOW))));
|
||||||
eo_do(o_mask,
|
efl_gfx_fill_set(o_mask, EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h),
|
efl_gfx_entity_size_set(o_mask, EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_entity_position_set(o_mask, EINA_POSITION2D((win_w - w) / 2, (win_h - h) / 2));
|
||||||
efl_gfx_position_set((win_w - w) / 2, (win_h - h) / 2));
|
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -111,8 +108,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,25 +23,23 @@ static void _setup(void)
|
||||||
int i;
|
int i;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_mask = o;
|
o_mask = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
|
||||||
efl_file_set(build_path("e-logo-mask.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
|
||||||
efl_gfx_fill_set(0, 0, 720, 420),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
|
||||||
efl_gfx_size_set(720, 420),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
|
||||||
efl_gfx_position_set((win_w - 720) / 2, (win_h - 420) / 2),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
for (i = 0; i < 1; i++)
|
for (i = 0; i < 1; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("texture.png"), NULL);
|
||||||
efl_file_set(build_path("texture.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 500, 444));
|
||||||
efl_gfx_fill_set(0, 0, 500, 444),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(win_w * 4, win_h * 4));
|
||||||
efl_gfx_size_set(win_w * 4, win_h * 4),
|
evas_object_clip_set(o, o_mask);
|
||||||
evas_obj_clip_set(o_mask),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -50,8 +48,8 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 1; i++) eo_del(o_images[i]);
|
for (i = 0; i < 1; i++) efl_del(o_images[i]);
|
||||||
eo_del(o_mask);
|
efl_del(o_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -67,13 +65,13 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (500 / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (500 / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (444 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (444 / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -105,8 +103,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,25 +23,23 @@ static void _setup(void)
|
||||||
int i;
|
int i;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_mask = o;
|
o_mask = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
|
||||||
efl_file_set(build_path("e-logo-mask.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
|
||||||
efl_gfx_fill_set(0, 0, 720, 420),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
|
||||||
efl_gfx_size_set(720, 420),
|
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
|
||||||
efl_gfx_position_set((win_w - 720) / 2, (win_h - 420) / 2),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
for (i = 0; i < 1; i++)
|
for (i = 0; i < 1; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS,evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("texture.png"), NULL);
|
||||||
efl_file_set(build_path("texture.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 500, 444));
|
||||||
efl_gfx_fill_set(0, 0, 500, 444),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(win_w * 4, win_h * 4));
|
||||||
efl_gfx_size_set(win_w * 4, win_h * 4),
|
evas_object_clip_set(o, o_mask);
|
||||||
evas_obj_clip_set(o_mask),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -50,8 +48,8 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 1; i++) eo_del(o_images[i]);
|
for (i = 0; i < 1; i++) efl_del(o_images[i]);
|
||||||
eo_del(o_mask);
|
efl_del(o_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -68,7 +66,7 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (500 / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (500 / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (444 / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (444 / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
if (!m) m = evas_map_new(4);
|
if (!m) m = evas_map_new(4);
|
||||||
|
|
||||||
|
@ -78,14 +76,13 @@ static void _loop(double t, int f)
|
||||||
720, 420, 0);
|
720, 420, 0);
|
||||||
evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
|
evas_map_util_rotate(m, f, win_w / 2, win_h / 2);
|
||||||
|
|
||||||
eo_do(o_mask,
|
evas_object_map_enable_set(o_mask, 1);
|
||||||
evas_obj_map_enable_set(1),
|
evas_object_map_set(o_mask, m);
|
||||||
evas_obj_map_set(m));
|
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -117,8 +114,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -0,0 +1,133 @@
|
||||||
|
#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
|
|
@ -24,12 +24,12 @@ static void _setup(void)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
for (i = 0; i < 1; i++)
|
for (i = 0; i < 1; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o, efl_file_set(build_path("tp.png"), NULL),
|
efl_file_simple_load(o, build_path("tp.png"), NULL);
|
||||||
efl_gfx_fill_set(0, 0, 640, 480),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 640, 480));
|
||||||
efl_gfx_size_set(640, 480),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(640, 480));
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 1; i++) eo_del(o_images[i]);
|
for (i = 0; i < 1; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -54,15 +54,15 @@ static void _loop(double t, int f)
|
||||||
h *= (f / 100.0) * 4.0;
|
h *= (f / 100.0) * 4.0;
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y),
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h));
|
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -94,8 +94,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -26,19 +26,15 @@ static void _setup(void)
|
||||||
{
|
{
|
||||||
int r, g, b, a;
|
int r, g, b, a;
|
||||||
|
|
||||||
o = eo_add(EVAS_LINE_CLASS, evas);
|
o = evas_object_line_add(evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
a = (rnd()&0xff) / 2;
|
a = (rnd()&0xff) / 2;
|
||||||
r = ((rnd()&0xff) * a) / 255;
|
r = ((rnd()&0xff) * a) / 255;
|
||||||
g = ((rnd()&0xff) * a) / 255;
|
g = ((rnd()&0xff) * a) / 255;
|
||||||
b = ((rnd()&0xff) * a) / 255;
|
b = ((rnd()&0xff) * a) / 255;
|
||||||
eo_do(o,
|
efl_gfx_color_set(o, r, g, b, a);
|
||||||
efl_gfx_color_set(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));
|
||||||
evas_obj_line_xy_set(((win_w / 2) * (rnd()&0xff)) / 255,
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
((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_visible_set(EINA_TRUE));
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -49,7 +45,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PI (double) 3.141592654
|
#define PI (double) 3.141592654
|
||||||
|
@ -91,17 +87,17 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = o_images[i];
|
o = o_images[i];
|
||||||
eo_do(o, evas_obj_line_xy_get(&ox1, &oy1, &ox2, &oy2));
|
evas_object_line_xy_get(o, &ox1, &oy1, &ox2, &oy2);
|
||||||
|
|
||||||
_rotate_point(&ox1, &oy1, i);
|
_rotate_point(&ox1, &oy1, i);
|
||||||
_rotate_point(&ox2, &oy2, i);
|
_rotate_point(&ox2, &oy2, i);
|
||||||
eo_do(o, evas_obj_line_xy_set(ox1, oy1, ox2, oy2));
|
evas_object_line_xy_set(o, ox1, oy1, ox2, oy2);
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -133,8 +129,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1135,6 +1135,7 @@ static const Ecore_Getopt optdesc = {
|
||||||
ECORE_GETOPT_STORE_TRUE('m', "compat", "Output compatible with expedite-cmp"),
|
ECORE_GETOPT_STORE_TRUE('m', "compat", "Output compatible with expedite-cmp"),
|
||||||
ECORE_GETOPT_STORE_TRUE('y', "async", "Enable async output"),
|
ECORE_GETOPT_STORE_TRUE('y', "async", "Enable async output"),
|
||||||
ECORE_GETOPT_STORE_TRUE('a', "all", "Run all tests"),
|
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_LICENSE('L', "license"),
|
||||||
ECORE_GETOPT_COPYRIGHT('C', "copyright"),
|
ECORE_GETOPT_COPYRIGHT('C', "copyright"),
|
||||||
ECORE_GETOPT_VERSION('V', "version"),
|
ECORE_GETOPT_VERSION('V', "version"),
|
||||||
|
@ -1162,14 +1163,18 @@ static const Expedite_Resolution resolutions[] = {
|
||||||
{ "pal", 720 , 576 },
|
{ "pal", 720 , 576 },
|
||||||
{ "480p", 720 , 480 },
|
{ "480p", 720 , 480 },
|
||||||
{ "720p", 1280, 720 },
|
{ "720p", 1280, 720 },
|
||||||
|
{ "720p-p", 720, 1280 },
|
||||||
{ "1050p", 1680, 1050},
|
{ "1050p", 1680, 1050},
|
||||||
{ "1080p", 1920, 1080},
|
{ "1080p", 1920, 1080},
|
||||||
|
{ "1080p-p", 1080, 1920},
|
||||||
{ "wsvga", 1024, 600 },
|
{ "wsvga", 1024, 600 },
|
||||||
{ "wsvga-p", 600 , 1024},
|
{ "wsvga-p", 600 , 1024},
|
||||||
{ "s9", 1600, 900 },
|
{ "watch-360", 360, 360},
|
||||||
{ NULL, 0, 0 }
|
{ NULL, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Eina_Bool tick = EINA_TRUE;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_cb_delete(Ecore_Evas *ee EINA_UNUSED)
|
_cb_delete(Ecore_Evas *ee EINA_UNUSED)
|
||||||
{
|
{
|
||||||
|
@ -1179,10 +1184,52 @@ _cb_delete(Ecore_Evas *ee EINA_UNUSED)
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_cb_anim(void *data EINA_UNUSED)
|
_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);
|
ui_loop(NULL);
|
||||||
return EINA_TRUE;
|
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 Ecore_Job *_job = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1229,6 +1276,7 @@ main(int argc, char **argv)
|
||||||
ECORE_GETOPT_VALUE_BOOL(cmp_report),
|
ECORE_GETOPT_VALUE_BOOL(cmp_report),
|
||||||
ECORE_GETOPT_VALUE_BOOL(async),
|
ECORE_GETOPT_VALUE_BOOL(async),
|
||||||
ECORE_GETOPT_VALUE_BOOL(all_tests),
|
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),
|
ECORE_GETOPT_VALUE_BOOL(quit_option),
|
||||||
ECORE_GETOPT_VALUE_BOOL(quit_option),
|
ECORE_GETOPT_VALUE_BOOL(quit_option),
|
||||||
|
@ -1237,6 +1285,10 @@ main(int argc, char **argv)
|
||||||
};
|
};
|
||||||
|
|
||||||
setenv("ECORE_NO_VSYNC", "1", 0);
|
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;
|
if (!ecore_evas_init()) return -1;
|
||||||
|
|
||||||
|
@ -1254,7 +1306,7 @@ main(int argc, char **argv)
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
fprintf(stderr, "Known resolution :\n");
|
fprintf(stderr, "Known resolution :\n");
|
||||||
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]); i++)
|
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]) - 1; i++)
|
||||||
fprintf(stderr, " * %s\t%ix%i\n", resolutions[i].name,
|
fprintf(stderr, " * %s\t%ix%i\n", resolutions[i].name,
|
||||||
resolutions[i].width, resolutions[i].height);
|
resolutions[i].width, resolutions[i].height);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1264,7 +1316,7 @@ main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]); i++)
|
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]) - 1; i++)
|
||||||
if (!strcmp(resolutions[i].name, resolution))
|
if (!strcmp(resolutions[i].name, resolution))
|
||||||
break;
|
break;
|
||||||
if (i == sizeof(resolutions)/sizeof(resolutions[0]))
|
if (i == sizeof(resolutions)/sizeof(resolutions[0]))
|
||||||
|
@ -1276,9 +1328,6 @@ main(int argc, char **argv)
|
||||||
profile = resolution;
|
profile = resolution;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!async)
|
|
||||||
setenv("ECORE_EVAS_FORCE_SYNC_RENDER", "1", 0);
|
|
||||||
|
|
||||||
if (!datadir)
|
if (!datadir)
|
||||||
datadir = getenv("EXPEDITE_FONTS_DIR");
|
datadir = getenv("EXPEDITE_FONTS_DIR");
|
||||||
if (!datadir)
|
if (!datadir)
|
||||||
|
@ -1349,7 +1398,7 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
choosen_engine = ecore_evas_engine_name_get(ee);
|
choosen_engine = ecore_evas_engine_name_get(ee);
|
||||||
ecore_evas_callback_delete_request_set(ee, _cb_delete);
|
ecore_evas_callback_delete_request_set(ee, _cb_delete);
|
||||||
ecore_evas_callback_post_render_set(ee, _cb_post_render);
|
if (tick) ecore_evas_callback_post_render_set(ee, _cb_post_render);
|
||||||
|
|
||||||
evas = ecore_evas_get(ee);
|
evas = ecore_evas_get(ee);
|
||||||
|
|
||||||
|
@ -1388,7 +1437,7 @@ main(int argc, char **argv)
|
||||||
if (all_tests) ui_all();
|
if (all_tests) ui_all();
|
||||||
|
|
||||||
anim = ecore_animator_add(_cb_anim, ee);
|
anim = ecore_animator_add(_cb_anim, ee);
|
||||||
ecore_animator_custom_tick();
|
if (tick) ecore_animator_custom_tick();
|
||||||
ecore_main_loop_begin();
|
ecore_main_loop_begin();
|
||||||
ecore_animator_del(anim);
|
ecore_animator_del(anim);
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,6 @@
|
||||||
# include <sys/time.h>
|
# include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
# include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_EVIL
|
|
||||||
# include <Evil.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <Evas.h>
|
#include <Evas.h>
|
||||||
#include <Ecore.h>
|
#include <Ecore.h>
|
||||||
|
|
||||||
|
@ -52,6 +44,7 @@ extern const char *choosen_engine;
|
||||||
extern Eina_Bool fullscreen;
|
extern Eina_Bool fullscreen;
|
||||||
extern Eina_Bool cmp_report;
|
extern Eina_Bool cmp_report;
|
||||||
extern char *output;
|
extern char *output;
|
||||||
|
extern Eina_Bool tick;
|
||||||
|
|
||||||
typedef struct _Expedite_Resolution Expedite_Resolution;
|
typedef struct _Expedite_Resolution Expedite_Resolution;
|
||||||
typedef struct _Expedite_Engine Expedite_Engine;
|
typedef struct _Expedite_Engine Expedite_Engine;
|
||||||
|
@ -78,6 +71,10 @@ const char *build_path(const char *filename);
|
||||||
void engine_loop(void);
|
void engine_loop(void);
|
||||||
int engine_abort(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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -0,0 +1,134 @@
|
||||||
|
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)
|
||||||
|
|
||||||
|
|
|
@ -19,47 +19,42 @@ static Evas_Object *o_images[OBNUM];
|
||||||
static void
|
static void
|
||||||
poly(Evas_Object *o, int type, Evas_Coord x, Evas_Coord y)
|
poly(Evas_Object *o, int type, Evas_Coord x, Evas_Coord y)
|
||||||
{
|
{
|
||||||
if (o)
|
efl_canvas_polygon_points_clear(o);
|
||||||
eo_do(o, evas_obj_polygon_points_clear());
|
|
||||||
switch (type % 4)
|
switch (type % 4)
|
||||||
{
|
{
|
||||||
case 0: /* triangle */
|
case 0: /* triangle */
|
||||||
if (o)
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 50, y + 0));
|
||||||
eo_do(o, evas_obj_polygon_point_add(x + 50 , y + 0),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 100, y + 100));
|
||||||
evas_obj_polygon_point_add(x + 100, y + 100),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 0, y + 100));
|
||||||
evas_obj_polygon_point_add(x + 0 , y + 100));
|
break;
|
||||||
break;
|
|
||||||
case 1: /* square */
|
case 1: /* square */
|
||||||
if (o)
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 0, y + 0));
|
||||||
eo_do(o, evas_obj_polygon_point_add(x + 0 , y + 0),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 100, y + 0));
|
||||||
evas_obj_polygon_point_add(x + 100, y + 0),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 100, y + 100));
|
||||||
evas_obj_polygon_point_add(x + 100, y + 100),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 0, y + 100));
|
||||||
evas_obj_polygon_point_add(x + 0 , y + 100));
|
break;
|
||||||
break;
|
|
||||||
case 2: /* hex */
|
case 2: /* hex */
|
||||||
if (o)
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 50, y + 0));
|
||||||
eo_do(o, evas_obj_polygon_point_add(x + 50 , y + 0),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 100, y + 30));
|
||||||
evas_obj_polygon_point_add(x + 100, y + 30),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 100, y + 70));
|
||||||
evas_obj_polygon_point_add(x + 100, y + 70),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 50, y + 100));
|
||||||
evas_obj_polygon_point_add(x + 50 , y + 100),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 0, y + 70));
|
||||||
evas_obj_polygon_point_add(x + 0 , y + 70),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 0, y + 30));
|
||||||
evas_obj_polygon_point_add(x + 0 , y + 30));
|
break;
|
||||||
break;
|
|
||||||
case 3: /* star */
|
case 3: /* star */
|
||||||
if (o)
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 50, y + 0));
|
||||||
eo_do(o, evas_obj_polygon_point_add(x + 50 , y + 0),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 60, y + 40));
|
||||||
evas_obj_polygon_point_add(x + 60 , y + 40),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 90, y + 30));
|
||||||
evas_obj_polygon_point_add(x + 90 , y + 30),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 70, y + 60));
|
||||||
evas_obj_polygon_point_add(x + 70 , y + 60),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 90, y + 100));
|
||||||
evas_obj_polygon_point_add(x + 90 , y + 100),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 50, y + 70));
|
||||||
evas_obj_polygon_point_add(x + 50 , y + 70),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 10, y + 100));
|
||||||
evas_obj_polygon_point_add(x + 10 , y + 100),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 30, y + 60));
|
||||||
evas_obj_polygon_point_add(x + 30 , y + 60),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 10, y + 30));
|
||||||
evas_obj_polygon_point_add(x + 10 , y + 30),
|
efl_canvas_polygon_point_add(o, EINA_POSITION2D(x + 40, y + 40));
|
||||||
evas_obj_polygon_point_add(x + 40 , y + 40));
|
break;
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,15 +68,14 @@ static void _setup(void)
|
||||||
{
|
{
|
||||||
int r, g, b, a;
|
int r, g, b, a;
|
||||||
|
|
||||||
o = eo_add(EVAS_POLYGON_CLASS, evas);
|
o = efl_add(EFL_CANVAS_POLYGON_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
a = (rnd()&0xff) / 2;
|
a = (rnd()&0xff) / 2;
|
||||||
r = ((rnd()&0xff) * a) / 255;
|
r = ((rnd()&0xff) * a) / 255;
|
||||||
g = ((rnd()&0xff) * a) / 255;
|
g = ((rnd()&0xff) * a) / 255;
|
||||||
b = ((rnd()&0xff) * a) / 255;
|
b = ((rnd()&0xff) * a) / 255;
|
||||||
if (o)
|
efl_gfx_color_set(o, r, g, b, a);
|
||||||
eo_do(o, efl_gfx_color_set(r, g, b, a),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
poly(o, i, 0, 0);
|
poly(o, i, 0, 0);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
|
@ -91,7 +85,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -105,19 +99,19 @@ static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
o = o_images[i];
|
o = o_images[i];
|
||||||
if (o)
|
if (o)
|
||||||
eo_do(o, efl_gfx_size_get(&w, &h));
|
exp_size_get(o, &w, &h);
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (win_w / 4);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (win_w / 4);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (win_h / 4);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (win_h / 4);
|
||||||
if (o)
|
if (o)
|
||||||
eo_do(o, efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -149,8 +143,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,24 +22,22 @@ static void _setup(void)
|
||||||
int i;
|
int i;
|
||||||
Evas_Object *o,*src;
|
Evas_Object *o,*src;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
eo_do(o,
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_file_set(build_path("logo.png"), NULL),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
src = o;
|
src = o;
|
||||||
o_images[0] = src;
|
o_images[0] = src;
|
||||||
|
|
||||||
for (i = 1; i < OBNUM; i++)
|
for (i = 1; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_PROXY_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o,
|
efl_canvas_proxy_source_set(o, src);
|
||||||
evas_obj_image_source_set(src),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_fill_set(0,0,120,160),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +46,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -64,13 +62,13 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -102,8 +100,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -0,0 +1,124 @@
|
||||||
|
#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
|
||||||
|
|
|
@ -26,21 +26,21 @@ static void _setup(void)
|
||||||
int i;
|
int i;
|
||||||
Evas_Object *o,*src;
|
Evas_Object *o,*src;
|
||||||
|
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = eo_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
eo_do(o, efl_file_set(build_path("logo.png"), NULL),
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
efl_gfx_fill_set(0, 0, 120, 160),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_position_set(-400, -300));
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(-400, -300));
|
||||||
src = o;
|
src = o;
|
||||||
|
|
||||||
for (i = 0; i < OBNUM / 2; i++)
|
for (i = 0; i < OBNUM / 2; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = eo_add(EFL_CANVAS_PROXY_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
eo_do(o, evas_obj_image_source_set(src, NULL),
|
efl_canvas_proxy_source_set(o, src, NULL);
|
||||||
efl_gfx_size_set(120, 160),
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
efl_gfx_fill_set(0,0,120,160),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -65,13 +65,13 @@ static void _loop(double t, int f)
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||||
eo_do(o_images[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -103,8 +103,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,34 +27,33 @@ static void _setup(void)
|
||||||
st = EVAS_TEXT_STYLE_SHADOW;
|
st = EVAS_TEXT_STYLE_SHADOW;
|
||||||
for (i = 0; st <= EVAS_TEXT_STYLE_FAR_SOFT_SHADOW; i++)
|
for (i = 0; st <= EVAS_TEXT_STYLE_FAR_SOFT_SHADOW; i++)
|
||||||
{
|
{
|
||||||
o = eo_add(EVAS_TEXT_CLASS, evas);
|
o = evas_object_text_add(evas);
|
||||||
o_texts[i] = o;
|
o_texts[i] = o;
|
||||||
eo_do(o,
|
efl_text_font_family_set(o, "Vera-Bold");
|
||||||
efl_text_properties_font_set("Vera-Bold", 20),
|
efl_text_font_size_set(o, 20);
|
||||||
efl_text_set("This is a test string"),
|
efl_text_set(o, "This is a test string");
|
||||||
evas_obj_text_style_set(st),
|
evas_object_text_style_set(o, st);
|
||||||
efl_gfx_color_set(255, 255, 255, 255),
|
efl_gfx_color_set(o, 255, 255, 255, 255);
|
||||||
evas_obj_text_shadow_color_set(0, 0, 0, 24),
|
evas_object_text_shadow_color_set(o, 0, 0, 0, 24);
|
||||||
evas_obj_text_glow_color_set(100, 80, 40, 100),
|
evas_object_text_glow_color_set(o, 100, 80, 40, 100);
|
||||||
evas_obj_text_glow2_color_set(50, 10, 5, 50),
|
evas_object_text_glow2_color_set(o, 50, 10, 5, 50);
|
||||||
evas_obj_text_outline_color_set(0, 0, 0, 255),
|
evas_object_text_outline_color_set(o, 0, 0, 0, 255);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
st++;
|
st++;
|
||||||
}
|
}
|
||||||
st = i;
|
st = i;
|
||||||
|
|
||||||
for ( ; i < OBNUM ; i ++)
|
for ( ; i < OBNUM ; i ++)
|
||||||
{
|
{
|
||||||
s = o_texts[i % st];
|
s = o_texts[i % st];
|
||||||
o = eo_add(EVAS_IMAGE_CLASS, evas);
|
o = efl_add(EFL_CANVAS_PROXY_CLASS, evas);
|
||||||
o_texts[i] = o;
|
o_texts[i] = o;
|
||||||
eo_do(o, evas_obj_image_source_set(s));
|
efl_canvas_proxy_source_set(o, s);
|
||||||
/* FIXME s == NULL*/
|
/* FIXME s == NULL*/
|
||||||
eo_do(s, efl_gfx_size_get(&w, &h));
|
exp_size_get(s, &w, &h);
|
||||||
eo_do(o,
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(w, h));
|
||||||
efl_gfx_size_set(w, h),
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, w, h));
|
||||||
efl_gfx_fill_set(0, 0, w, h),
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
efl_gfx_visible_set(EINA_TRUE));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
done = 0;
|
done = 0;
|
||||||
|
@ -64,7 +63,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) eo_del(o_texts[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_texts[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -74,18 +73,18 @@ static void _loop(double t, int f)
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
eo_do(o_texts[i], efl_gfx_size_get(&w, &h));
|
exp_size_get(o_texts[i], &w, &h);
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||||
y = (win_h / 2) - (h / 2);
|
y = (win_h / 2) - (h / 2);
|
||||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2);
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2);
|
||||||
eo_do(o_texts[i], efl_gfx_position_set(x, y));
|
efl_gfx_entity_position_set(o_texts[i], EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
FPS_STD(NAME);
|
FPS_STD(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
/* prepend special key handlers if interactive (before STD) */
|
||||||
static void _key(char *key)
|
static void _key(const char *key)
|
||||||
{
|
{
|
||||||
KEY_STD;
|
KEY_STD;
|
||||||
}
|
}
|
||||||
|
@ -117,8 +116,7 @@ void FNAME(void);
|
||||||
# ifndef UI
|
# ifndef UI
|
||||||
void FNAME(void)
|
void FNAME(void)
|
||||||
{
|
{
|
||||||
ui_func_set(_key, _loop);
|
ui_func_set(_key, _loop, _setup);
|
||||||
_setup();
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue