Compare commits
209 Commits
expedite-1
...
master
Author | SHA1 | Date |
---|---|---|
|
9db3724e47 | |
|
7c4bebe47e | |
|
d6a3eb3dec | |
|
7746bbb039 | |
|
46e328404c | |
|
1c16ed647b | |
|
5ca60ccf22 | |
|
deb3905a32 | |
|
cac6ca6a9a | |
|
b72d775b10 | |
|
aee23715a2 | |
|
7dca83b4e5 | |
|
a4d6ef526a | |
|
b84865bb12 | |
|
67771fd4a6 | |
|
4828d1a5d5 | |
|
f3e0448bd3 | |
|
d540c8420b | |
|
7874ae718f | |
|
03324357ed | |
|
cf48e97379 | |
|
ae6cf1318b | |
|
9bb9dba018 | |
|
858246e2dd | |
|
a2bc36a91d | |
|
08dd13567e | |
|
ac6a3bcb44 | |
|
105e6568a4 | |
|
dc6c931dc2 | |
|
4e6dd92826 | |
|
6c2c96b622 | |
|
ba687d4b20 | |
|
735ca81d6b | |
|
37093983bf | |
|
3a1058aab1 | |
|
9fd3c26a5e | |
|
b624cde117 | |
|
555b18dbaa | |
|
bbc29b232b | |
|
cd761e5093 | |
|
bea0e934ad | |
|
6feba0405c | |
|
0f1d9a77e5 | |
|
00ffe9ca86 | |
|
153818c6bc | |
|
a12ab95df0 | |
|
6a69955e71 | |
|
27e5e02370 | |
|
1587f3e5ea | |
|
9cdc8c68a7 | |
|
fe8e23cbc6 | |
|
e7b11dd328 | |
|
0529ce56b6 | |
|
f59b164351 | |
|
cd80106f54 | |
|
e2a2ef4f86 | |
|
4ab2935364 | |
|
525879533a | |
|
46e58922fe | |
|
19657b6d25 | |
|
05a29c965a | |
|
ffa005ea3d | |
|
95d6a6cd9a | |
|
e79517e490 | |
|
74007f65bc | |
|
9a98d6376b | |
|
185fe20e88 | |
|
f7fa84bf93 | |
|
f8b38f6c24 | |
|
f9834c142c | |
|
adea5d2b26 | |
|
051a4ec0cf | |
|
24eca8a778 | |
|
a927cdd1a4 | |
|
1c99584bcb | |
|
088df1425e | |
|
1c72554acc | |
|
58857a657c | |
|
91ca743b85 | |
|
9cf0688f99 | |
|
6c1e40666d | |
|
8e8a079515 | |
|
3ce8b3f145 | |
|
cc4fa8a76e | |
|
0d6c86f4ab | |
|
c290c2d15c | |
|
014001fb20 | |
|
7de69008b4 | |
|
b1931c5146 | |
|
817b8c3500 | |
|
4aa37445c5 | |
|
9b7d97d503 | |
|
accb76125f | |
|
c4dfca2b01 | |
|
09456566a3 | |
|
0a40a87039 | |
|
0774f2ceeb | |
|
6d76a78b23 | |
|
776268d077 | |
|
578c0b4318 | |
|
12a8257451 | |
|
74d732c094 | |
|
3ef31223f6 | |
|
281bbd90fd | |
|
ec0863e6ed | |
|
bacba21ab0 | |
|
acf7130b52 | |
|
4848c66d47 | |
|
ea387769f5 | |
|
4e5cac21bf | |
|
26ba629f00 | |
|
c3890ffeb1 | |
|
d68739908f | |
|
c52f943e6e | |
|
01ff7df1f2 | |
|
21d03f8a61 | |
|
5aa277e4d8 | |
|
d846790c37 | |
|
3571eef532 | |
|
64cdd1677e | |
|
e6442777a4 | |
|
ac729f10f4 | |
|
bccac2adec | |
|
5174c08f1f | |
|
196b527d51 | |
|
5f70cec6e5 | |
|
840686042a | |
|
a5e6af917a | |
|
19e674eeef | |
|
36fa887496 | |
|
a829f37b83 | |
|
1a9f0c74ae | |
|
394ce6a170 | |
|
3c7b6797da | |
|
504bb0e2bb | |
|
078473137f | |
|
5dabf01fca | |
|
02f1fb2a92 | |
|
b5916516c1 | |
|
4689ceb088 | |
|
244a1da63c | |
|
81676f217d | |
|
dce0fb3159 | |
|
a9e39877d2 | |
|
4db2eca350 | |
|
f473d6996b | |
|
faf1579d35 | |
|
42339e1e32 | |
|
5090a74da4 | |
|
f0bca469a9 | |
|
1477f6b155 | |
|
5e69c24b6e | |
|
267f9e2106 | |
|
167611c5f1 | |
|
d27dc525eb | |
|
7eab217299 | |
|
05a2386517 | |
|
0333810d77 | |
|
335a772168 | |
|
8f5ebabc11 | |
|
902905ef60 | |
|
164d8d26e0 | |
|
6f135f2734 | |
|
533fa58a7e | |
|
d78ed2e298 | |
|
f81697bb99 | |
|
2913da1dca | |
|
8ac751d68e | |
|
0ff46d0f59 | |
|
a8133405ab | |
|
db7a4979d7 | |
|
7b0c11bf14 | |
|
9659e746e0 | |
|
3f67eb1f31 | |
|
bddd638fa5 | |
|
78f16260ba | |
|
6bf7790fa7 | |
|
2fc8dfa052 | |
|
580d32d7b0 | |
|
1fcf0101f3 | |
|
fc24feaee2 | |
|
ad8e7a7e8c | |
|
4311466d1a | |
|
5fb6f8bccf | |
|
2fb9aeef35 | |
|
025ea406ee | |
|
3f6aa28951 | |
|
8030912040 | |
|
0375436758 | |
|
f161656713 | |
|
d6821d5d8b | |
|
22b8898cfa | |
|
f9d52d4767 | |
|
f50d7a0b64 | |
|
cc6760cdc4 | |
|
ac17754b04 | |
|
a4f9211613 | |
|
42fc61818d | |
|
4eb5f62d15 | |
|
6a1612abb2 | |
|
755ff80124 | |
|
a1beb50ce7 | |
|
98b733080e | |
|
32c11e818c | |
|
7a3b5f5f57 | |
|
38cd554da6 | |
|
012af4d3d8 | |
|
349c4a337a | |
|
2f65a62d49 |
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"project_id" : "expedite",
|
||||||
|
"projects" : "expedite",
|
||||||
|
"conduit_uri" : "https://phab.enlightenment.org/",
|
||||||
|
"phabricator.uri" : "https://phab.enlightenment.org/"
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
*~
|
||||||
|
*.o
|
||||||
|
*.swo
|
||||||
|
*.swp
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
aclocal.m4
|
||||||
|
autom4te.cache/
|
||||||
|
compile
|
||||||
|
config.guess
|
||||||
|
config.h
|
||||||
|
config.h.in
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
config.sub
|
||||||
|
configure
|
||||||
|
data/Makefile
|
||||||
|
data/Makefile.in
|
||||||
|
depcomp
|
||||||
|
expedite.spec
|
||||||
|
install-sh
|
||||||
|
ltmain.sh
|
||||||
|
m4/libtool.m4
|
||||||
|
m4/ltoptions.m4
|
||||||
|
m4/ltsugar.m4
|
||||||
|
m4/ltversion.m4
|
||||||
|
m4/lt~obsolete.m4
|
||||||
|
missing
|
||||||
|
src/Makefile
|
||||||
|
src/Makefile.in
|
||||||
|
src/bin/.deps/
|
||||||
|
src/bin/Makefile
|
||||||
|
src/bin/Makefile.in
|
||||||
|
src/bin/expedite
|
||||||
|
stamp-h1
|
3
AUTHORS
3
AUTHORS
|
@ -3,3 +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>
|
||||||
|
Hermet Park <hermetpark@gmail.com>
|
||||||
|
Eduardo Lima (Etrunko) <eblima@gmail.com>
|
||||||
|
JaEun Choi <jaeun12.choi@samsung.com>
|
||||||
|
|
39
ChangeLog
39
ChangeLog
|
@ -0,0 +1,39 @@
|
||||||
|
2011-12-02 Carsten Haitzler (The Rasterman)
|
||||||
|
|
||||||
|
* 1.1.0 release
|
||||||
|
|
||||||
|
2012-04-26 Carsten Haitzler (The Rasterman)
|
||||||
|
|
||||||
|
* 1.2.0 release
|
||||||
|
|
||||||
|
2012-05-02 Cedric Bail
|
||||||
|
|
||||||
|
* Do not allocate more than once Evas_Map.
|
||||||
|
|
||||||
|
2012-08-30 Carsten Haitzler (The Rasterman)
|
||||||
|
|
||||||
|
* 1.7.0 release
|
||||||
|
|
||||||
|
2012-10-24 Eduardo Lima (Etrunko)
|
||||||
|
|
||||||
|
* Remove support fox software_16_x11
|
||||||
|
|
||||||
|
2012-11-01 Eduardo Lima (Etrunko)
|
||||||
|
|
||||||
|
* Added basic support for wayland engines
|
||||||
|
|
||||||
|
2012-11-16 Eduardo Lima (Etrunko)
|
||||||
|
|
||||||
|
* Keyboard Support for Wayland EGL
|
||||||
|
|
||||||
|
2012-11-21 Eduardo Lima (Etrunko)
|
||||||
|
|
||||||
|
* Keyboard Support for Wayland SHM
|
||||||
|
|
||||||
|
2013-01-23 Yakov Goldberg
|
||||||
|
|
||||||
|
* Porting to Eo
|
||||||
|
|
||||||
|
2013-02-18 Cedric Bail
|
||||||
|
|
||||||
|
* Test and benchmark lines.
|
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.
|
||||||
|
|
36
NEWS
36
NEWS
|
@ -0,0 +1,36 @@
|
||||||
|
Expedite 1.8.0
|
||||||
|
|
||||||
|
Changes since Expedite 1.7.0:
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
Additions:
|
||||||
|
|
||||||
|
* Support for Wayland engines
|
||||||
|
* Test and benchmark lines
|
||||||
|
|
||||||
|
Removals:
|
||||||
|
|
||||||
|
* Evas software X11 16bpp engine suport
|
||||||
|
|
||||||
|
Improvements:
|
||||||
|
|
||||||
|
* Porting to Eo
|
||||||
|
|
||||||
|
Expedite 1.7.0
|
||||||
|
|
||||||
|
Changes since Expedite 1.2.0:
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
Improvements:
|
||||||
|
|
||||||
|
* Don't over allocate Evas_Map.
|
||||||
|
|
||||||
|
Expedite 1.2.0
|
||||||
|
|
||||||
|
Changes since Expedite 1.1.0:
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
Removals:
|
||||||
|
|
||||||
|
* Evas SDL 16bpp engine suport
|
||||||
|
* Software_SDL engine (nos just use buffer engine)
|
2
README
2
README
|
@ -1,4 +1,4 @@
|
||||||
Expedite 1.0.0
|
Expedite 1.7.99
|
||||||
|
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
|
|
||||||
|
|
244
configure.ac
244
configure.ac
|
@ -3,248 +3,61 @@ 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.1.0], [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
|
||||||
|
|
||||||
|
|
||||||
### Additional options to configure
|
|
||||||
|
|
||||||
## Simple X11 build/link
|
|
||||||
|
|
||||||
## Evas engines
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(simple-x11,
|
|
||||||
[AC_HELP_STRING([--enable-simple-x11], [enable simple x11 linking])],
|
|
||||||
[want_evas_simple_x11=$enableval]
|
|
||||||
)
|
|
||||||
|
|
||||||
# Software X11
|
|
||||||
have_software_xlib="no"
|
|
||||||
have_software_xcb="no"
|
|
||||||
EXPEDITE_CHECK_ENGINE([software-x11], [Software X11], "yes")
|
|
||||||
|
|
||||||
if test "x${have_software_x11}" = "xyes" ; then
|
|
||||||
have_software_xlib=`${PKG_CONFIG} --variable=Xlib evas-software-x11`
|
|
||||||
if test "x${have_software_xlib}" = "xstatic" ; then
|
|
||||||
have_software_xlib="yes"
|
|
||||||
fi
|
|
||||||
if test "x${have_software_xlib}" = "xyes" ; then
|
|
||||||
AC_DEFINE(HAVE_EVAS_SOFTWARE_XLIB, 1, [Evas Software Xlib Engine Support])
|
|
||||||
fi
|
|
||||||
have_software_xcb=`${PKG_CONFIG} --variable=XCB evas-software-x11`
|
|
||||||
if test "x${have_software_xcb}" = "xstatic" ; then
|
|
||||||
have_software_xcb="yes"
|
|
||||||
fi
|
|
||||||
if test "x${have_software_xcb}" = "xyes" ; then
|
|
||||||
AC_DEFINE(HAVE_EVAS_SOFTWARE_XCB, 1, [Evas Software XCB Engine Support])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
AM_CONDITIONAL([BUILD_SOFTWARE_XLIB], [test "x${have_software_xlib}" = "xyes"])
|
|
||||||
AM_CONDITIONAL([BUILD_SOFTWARE_XCB], [test "x${have_software_xcb}" = "xyes"])
|
|
||||||
|
|
||||||
# XRender X11
|
|
||||||
EXPEDITE_CHECK_ENGINE([xrender-x11], [XRender X11], "yes")
|
|
||||||
|
|
||||||
# OpenGL X11
|
|
||||||
EXPEDITE_CHECK_ENGINE([opengl-x11], [OpenGL X11], "yes")
|
|
||||||
|
|
||||||
# XRender XCB
|
|
||||||
EXPEDITE_CHECK_ENGINE([xrender-xcb], [XRender XCB], "yes")
|
|
||||||
|
|
||||||
# GDI
|
|
||||||
EXPEDITE_CHECK_ENGINE([software-gdi], [Software GDI], "yes", [gdi_libs="-lgdi32"])
|
|
||||||
AC_SUBST(gdi_libs)
|
|
||||||
|
|
||||||
# DirectDraw
|
|
||||||
EXPEDITE_CHECK_ENGINE([software-ddraw], [Software DirectDraw], "yes", [ddraw_libs="-lddraw -ldxguid -lgdi32"])
|
|
||||||
AC_SUBST(ddraw_libs)
|
|
||||||
|
|
||||||
# Direct3D
|
|
||||||
EXPEDITE_CHECK_ENGINE([direct3d], [Direct3D], "yes", [d3d_libs="-ld3d9 -ld3dx9d -lgdi32"])
|
|
||||||
AC_SUBST(d3d_libs)
|
|
||||||
|
|
||||||
# Software SDL
|
|
||||||
EXPEDITE_CHECK_ENGINE([software-sdl], [Software SDL], "yes")
|
|
||||||
|
|
||||||
# PSL1GHT
|
|
||||||
EXPEDITE_CHECK_ENGINE([psl1ght], [PSL1GHT], "yes")
|
|
||||||
|
|
||||||
# GL SDL
|
|
||||||
EXPEDITE_CHECK_ENGINE([opengl-sdl], [OpenGL SDL], "yes")
|
|
||||||
|
|
||||||
# FB
|
|
||||||
EXPEDITE_CHECK_ENGINE([fb], [Framebuffer], "yes")
|
|
||||||
|
|
||||||
# DIRECTFB
|
|
||||||
EXPEDITE_CHECK_ENGINE([directfb], [DirectFB], "yes")
|
|
||||||
|
|
||||||
# GL Cocoa
|
|
||||||
EXPEDITE_CHECK_ENGINE([opengl-cocoa], [OpenGL Cocoa], "yes", [gl_cocoa_libs="-framework Cocoa"])
|
|
||||||
AC_SUBST(gl_cocoa_libs)
|
|
||||||
|
|
||||||
# Software 16bit X11
|
|
||||||
EXPEDITE_CHECK_ENGINE([software-16-x11], [Software 16 bits X11], "yes")
|
|
||||||
|
|
||||||
# 16bit DirectDraw
|
|
||||||
EXPEDITE_CHECK_ENGINE([software-16-ddraw], [Software 16 bits DirectDraw], "yes", [ddraw_16_libs="-lddraw -ldxguid"])
|
|
||||||
AC_SUBST(ddraw_16_libs)
|
|
||||||
|
|
||||||
# 16bit WinCE
|
|
||||||
EXPEDITE_CHECK_ENGINE([software-16-wince], [Software 16 bits WinCE], "yes", [wince_16_libs="-laygshell"])
|
|
||||||
AC_SUBST(wince_16_libs)
|
|
||||||
|
|
||||||
### 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
|
# 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}"
|
||||||
|
|
||||||
case "$host_os" in
|
AC_SUBST(requirement_expedite)
|
||||||
mingw32ce*)
|
|
||||||
PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0])
|
|
||||||
AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Eina
|
PKG_CHECK_MODULES([EFL], [${requirement_expedite}])
|
||||||
|
|
||||||
PKG_CHECK_MODULES([EINA], eina >= 1.1.0)
|
|
||||||
|
|
||||||
# Evas
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES([EVAS], evas >= 1.1.0 eet >= 1.5.0)
|
|
||||||
|
|
||||||
# Xlib
|
|
||||||
|
|
||||||
if test "x$have_software_xlib" = "xyes" -o "x$have_software_16_x11" = "xyes" -o "x$have_xrender_x11" = "xyes" -o "x$have_opengl_x11" = "xyes"; then
|
|
||||||
AC_PATH_XTRA
|
|
||||||
AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h],
|
|
||||||
[have_xlib="yes"],
|
|
||||||
[have_xlib="no"])
|
|
||||||
if test "x$want_evas_simple_x11" = "xyes"; then
|
|
||||||
x_libs="${x_libs} -lX11"
|
|
||||||
else
|
|
||||||
x_dir=${x_dir:-/usr/X11R6}
|
|
||||||
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
|
|
||||||
x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL(BUILD_X11, [test "x$have_xlib" = "xyes"])
|
|
||||||
|
|
||||||
AC_SUBST(x_cflags)
|
|
||||||
AC_SUBST(x_libs)
|
|
||||||
|
|
||||||
# XCB
|
|
||||||
|
|
||||||
if test "x$have_software_xcb" = "xyes"; then
|
|
||||||
PKG_CHECK_MODULES([XCB], [xcb xcb-keysyms], [have_xcb="yes"], [have_xcb="no"])
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL(BUILD_XCB, test "x$have_xcb" = "xyes")
|
|
||||||
if test "x$have_xcb" = "xyes"; then
|
|
||||||
AC_DEFINE(BUILD_XCB, 1, [build xcb support])
|
|
||||||
fi
|
|
||||||
|
|
||||||
# SDL
|
|
||||||
|
|
||||||
if test "x$have_software_sdl" = "xyes" -o "x$have_gl_sdl" = "xyes"; then
|
|
||||||
PKG_CHECK_MODULES([SDL], [sdl], [have_sdl="yes"], [have_sdl="no"])
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL(BUILD_SDL, test "x$have_sdl" = "xyes")
|
|
||||||
|
|
||||||
# PSL1GHT
|
|
||||||
AM_CONDITIONAL(BUILD_PSL1GHT, test "x$have_psl1ght" = "xyes")
|
|
||||||
|
|
||||||
# DirectFB
|
|
||||||
|
|
||||||
if test "x$have_directfb" = "xyes"; then
|
|
||||||
PKG_CHECK_MODULES([DIRECTFB], [directfb], [have_directfb="yes"], [have_directfb="no"])
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL(BUILD_DIRECTFB, test "x$have_directfb" = "xyes")
|
|
||||||
|
|
||||||
|
EFL_ENABLE_EO_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
|
||||||
|
|
||||||
AM_PROG_CC_STDC
|
AC_PROG_CC_C99
|
||||||
AC_HEADER_STDC
|
|
||||||
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])
|
||||||
|
@ -252,6 +65,7 @@ AC_CHECK_FUNCS([sync])
|
||||||
|
|
||||||
AC_OUTPUT([
|
AC_OUTPUT([
|
||||||
Makefile
|
Makefile
|
||||||
|
expedite.spec
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/bin/Makefile
|
src/bin/Makefile
|
||||||
data/Makefile
|
data/Makefile
|
||||||
|
@ -260,24 +74,6 @@ data/Makefile
|
||||||
echo
|
echo
|
||||||
echo " $PACKAGE $VERSION"
|
echo " $PACKAGE $VERSION"
|
||||||
echo
|
echo
|
||||||
echo " Engines:"
|
|
||||||
echo " Software X11.................: ${have_software_x11} (Xlib: ${have_software_xlib}) (XCB: ${have_software_xcb})"
|
|
||||||
echo " X Render X11.................: ${have_xrender_x11}"
|
|
||||||
echo " Open GL X11..................: ${have_opengl_x11}"
|
|
||||||
echo " X Render XCB.................: ${have_xrender_xcb}"
|
|
||||||
echo " Software GDI.................: ${have_software_gdi}"
|
|
||||||
echo " Software DirectDraw..........: ${have_software_ddraw}"
|
|
||||||
echo " Direct3D.....................: ${have_direct3d}"
|
|
||||||
echo " Software SDL.................: ${have_software_sdl}"
|
|
||||||
echo " Open GL SDL..................: ${have_opengl_sdl}"
|
|
||||||
echo " Open GL Cocoa................: ${have_opengl_cocoa}"
|
|
||||||
echo " FB...........................: ${have_fb}"
|
|
||||||
echo " DirectFB.....................: ${have_directfb}"
|
|
||||||
echo " PSL1GHT......................: ${have_psl1ght}"
|
|
||||||
echo " Software X11 16 bits.........: ${have_software_16_x11}"
|
|
||||||
echo " Software DirectDraw 16 bits..: ${have_software_16_ddraw}"
|
|
||||||
echo " Software WinCE 16 bits.......: ${have_software_16_wince}"
|
|
||||||
echo
|
|
||||||
echo " Installation:"
|
echo " Installation:"
|
||||||
echo " prefix.......................: ${prefix}"
|
echo " prefix.......................: ${prefix}"
|
||||||
echo
|
echo
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 9.6 KiB |
|
@ -55,6 +55,7 @@ data.png \
|
||||||
widgets.png \
|
widgets.png \
|
||||||
e-logo-2.png \
|
e-logo-2.png \
|
||||||
e-logo-mask.png \
|
e-logo-mask.png \
|
||||||
texture.png
|
texture.png \
|
||||||
|
vector.png
|
||||||
|
|
||||||
EXTRA_DIST = $(files_DATA)
|
EXTRA_DIST = $(files_DATA)
|
||||||
|
|
|
@ -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 |
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
21
expedite.oe
21
expedite.oe
|
@ -1,21 +0,0 @@
|
||||||
DESCRIPTION = "Expedite Evas benchmark/test suite"
|
|
||||||
HOMEPAGE = "http://www.enlightenment.org"
|
|
||||||
MAINTAINER = "Carsten Haitzler (Rasterman) <raster@rasterman.com>"
|
|
||||||
SECTION = "e/test"
|
|
||||||
PRIORITY = "optional"
|
|
||||||
DEPENDS = "evas"
|
|
||||||
PV = "0.7.0"
|
|
||||||
PR = "1"
|
|
||||||
|
|
||||||
do_prepsources () {
|
|
||||||
make clean distclean || true
|
|
||||||
}
|
|
||||||
addtask prepsources after do_fetch before do_unpack
|
|
||||||
SRC_URI = "file://./"
|
|
||||||
S = "${WORKDIR}/expedite"
|
|
||||||
|
|
||||||
inherit autotools pkgconfig binconfig
|
|
||||||
|
|
||||||
EXTRA_OECONF = ""
|
|
||||||
|
|
||||||
FILES_${PN} = "${bindir}/* ${datadir}"
|
|
|
@ -1,20 +1,23 @@
|
||||||
# Note that this is NOT a relocatable package
|
# Note that this is NOT a relocatable package
|
||||||
%define ver 0.7.0
|
%define _missing_doc_files_terminate_build 0
|
||||||
%define rel 1
|
%{!?_rel:%{expand:%%global _rel 0.enl%{?dist}}}
|
||||||
|
|
||||||
|
%define ver @VERSION@
|
||||||
|
%define rel %{_rel}
|
||||||
%define prefix /usr
|
%define prefix /usr
|
||||||
|
|
||||||
Summary: expedite
|
Summary: expedite
|
||||||
Name: expedite
|
Name: expedite
|
||||||
Version: %ver
|
Version: %ver
|
||||||
Release: %rel
|
Release: %rel
|
||||||
Copyright: BSD
|
License: BSD
|
||||||
Group: System Environment/Desktops
|
Group: System Environment/Desktops
|
||||||
Source: ftp://ftp.enlightenment.org/pub/enlightenment/expedite-%{ver}.tar.gz
|
Source: ftp://ftp.enlightenment.org/pub/enlightenment/expedite-%{ver}.tar.gz
|
||||||
BuildRoot: /var/tmp/expedite-root
|
BuildRoot: /var/tmp/expedite-root
|
||||||
Packager: The Rasterman <raster@rasterman.com>
|
Packager: The Rasterman <raster@rasterman.com>
|
||||||
URL: http://www.enlightenment.org/
|
URL: http://www.enlightenment.org/
|
||||||
BuildRequires: evas-devel
|
BuildRequires: efl-devel
|
||||||
Requires: evas
|
Requires: efl
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
dnl use: EFL_ENABLE_BETA_API_SUPPORT
|
||||||
|
AC_DEFUN([EFL_ENABLE_BETA_API_SUPPORT],
|
||||||
|
[
|
||||||
|
AC_DEFINE([EFL_BETA_API_SUPPORT], [1], [Enable access to unstable EFL API that are still in beta])
|
||||||
|
])
|
|
@ -0,0 +1,6 @@
|
||||||
|
dnl use: EFL_ENABLE_EO_API_SUPPORT
|
||||||
|
AC_DEFUN([EFL_ENABLE_EO_API_SUPPORT],
|
||||||
|
[
|
||||||
|
AC_DEFINE([EFL_EO_API_SUPPORT], [1], [Enable access to unstable EFL Eo API])
|
||||||
|
])
|
||||||
|
|
|
@ -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,13 +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)\" \
|
||||||
@EINA_CFLAGS@ \
|
@EFL_CFLAGS@
|
||||||
@EVAS_CFLAGS@ \
|
|
||||||
@x_cflags@ \
|
|
||||||
@SDL_CFLAGS@ \
|
|
||||||
@DIRECTFB_CFLAGS@ \
|
|
||||||
@XCB_CFLAGS@ \
|
|
||||||
@EVIL_CFLAGS@
|
|
||||||
|
|
||||||
bin_PROGRAMS = expedite
|
bin_PROGRAMS = expedite
|
||||||
bin_SCRIPTS = expedite-cmp
|
bin_SCRIPTS = expedite-cmp
|
||||||
|
@ -55,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 \
|
||||||
|
@ -91,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 \
|
||||||
|
@ -112,127 +109,36 @@ image_blend_occlude3_very_many.c \
|
||||||
poly_blend.c \
|
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 \
|
||||||
|
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
|
||||||
|
# \
|
||||||
|
# image_mask_14.c \
|
||||||
|
# image_mask_15.c
|
||||||
|
|
||||||
#image_mask.c \
|
expedite_LDADD = @EFL_LIBS@ -lm
|
||||||
#image_mask_2.c \
|
|
||||||
#image_mask_3.c \
|
|
||||||
#image_mask_4.c \
|
|
||||||
#image_mask_5.c \
|
|
||||||
#image_mask_6.c \
|
|
||||||
#image_mask_7.c \
|
|
||||||
#image_mask_8.c \
|
|
||||||
#image_mask_9.c \
|
|
||||||
#image_mask_10.c \
|
|
||||||
#image_mask_11.c \
|
|
||||||
#image_mask_12.c \
|
|
||||||
#image_mask_13.c \
|
|
||||||
#image_mask_14.c \
|
|
||||||
#image_mask_15.c \
|
|
||||||
#filter_object_colors.c \
|
|
||||||
#filter_object_colors_solid.c \
|
|
||||||
#filter_object_sepia.c \
|
|
||||||
#filter_object_sepia_solid.c \
|
|
||||||
#filter_object_greyscale.c \
|
|
||||||
#filter_object_greyscale_solid.c \
|
|
||||||
#filter_object_invert.c \
|
|
||||||
#filter_object_invert_solid.c \
|
|
||||||
#filter_object_brightness.c \
|
|
||||||
#filter_object_brightness_solid.c \
|
|
||||||
#filter_object_blur.c \
|
|
||||||
#filter_object_blur_solid.c
|
|
||||||
|
|
||||||
expedite_CFLAGS = @WIN32_CFLAGS@
|
|
||||||
expedite_CXXFLAGS = @EXPEDITE_CXXFLAGS@
|
|
||||||
expedite_LDADD = @SDL_LIBS@ @x_libs@ @gdi_libs@ @ddraw_libs@ @ddraw_16_libs@ @d3d_libs@ @wince_16_libs@ @DIRECTFB_LIBS@ @XCB_LIBS@ @EVAS_LIBS@ @EINA_LIBS@ @EVIL_LIBS@ @gl_cocoa_libs@ -lm
|
|
||||||
expedite_LDFLAGS = @lt_enable_auto_import@
|
|
||||||
|
|
||||||
if BUILD_SOFTWARE_XLIB
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_software_xlib.c engine_software_xlib.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_XRENDER_X11
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_xrender_x11.c engine_xrender_x11.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_OPENGL_X11
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_gl_x11.c engine_gl_x11.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_SOFTWARE_XCB
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_software_xcb.c engine_software_xcb.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_XRENDER_XCB
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_xrender_xcb.c engine_xrender_xcb.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_SOFTWARE_GDI
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_software_gdi.c engine_software_gdi.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_SOFTWARE_DDRAW
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_software_ddraw.cpp engine_software_ddraw.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_DIRECT3D
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_direct3d.cpp engine_direct3d.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_SOFTWARE_SDL
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_software_sdl.c engine_software_sdl.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_OPENGL_SDL
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_gl_sdl.c engine_gl_sdl.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_PSL1GHT
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_psl1ght.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_FB
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_fb.c engine_fb.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_DIRECTFB
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_directfb.c engine_directfb.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_OPENGL_COCOA
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_gl_cocoa.m engine_gl_cocoa.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_SOFTWARE_16_X11
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_software_16_x11.c engine_software_16_x11.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_SOFTWARE_16_DDRAW
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_software_16_ddraw.cpp engine_software_16_ddraw.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_SOFTWARE_16_WINCE
|
|
||||||
expedite_SOURCES += \
|
|
||||||
engine_software_16_wince.c engine_software_16_wince.h engine_software_16_wince.rc
|
|
||||||
endif
|
|
||||||
|
|
||||||
.rc.lo:
|
|
||||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) $< -o $@
|
|
||||||
|
|
||||||
EXTRA_DIST = $(bin_SCRIPTS)
|
EXTRA_DIST = $(bin_SCRIPTS)
|
||||||
|
|
|
@ -6,34 +6,28 @@ static void
|
||||||
_setup(void)
|
_setup(void)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
Evas_Textblock_Style *st;
|
|
||||||
|
|
||||||
o = evas_object_textblock_add(evas);
|
o = efl_add(EFL_CANVAS_TEXTBLOCK_CLASS, evas);
|
||||||
evas_object_move(o, 10, 40);
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(10, 40));
|
||||||
evas_object_resize(o, win_w - 20, win_h - 50);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(win_w - 20, win_h - 50));
|
||||||
evas_object_show(o);
|
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
|
||||||
evas_object_textblock_style_set(o, st);
|
|
||||||
evas_textblock_style_free(st);
|
|
||||||
evas_object_textblock_clear(o);
|
|
||||||
evas_object_textblock_text_markup_set
|
|
||||||
(o,
|
(o,
|
||||||
"<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 "
|
||||||
|
@ -41,9 +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>"
|
|
||||||
);
|
|
||||||
o_text = o;
|
o_text = o;
|
||||||
ui_fps(0.0);
|
ui_fps(0.0);
|
||||||
}
|
}
|
||||||
|
@ -51,28 +44,28 @@ _setup(void)
|
||||||
static void
|
static void
|
||||||
_cleanup(void)
|
_cleanup(void)
|
||||||
{
|
{
|
||||||
evas_object_del(o_text);
|
efl_del(o_text);
|
||||||
o_text = NULL;
|
o_text = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_loop(double t __UNUSED__, int f __UNUSED__)
|
_loop(double t EINA_UNUSED,
|
||||||
|
int f 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")))
|
||||||
{
|
{
|
||||||
_cleanup();
|
_cleanup();
|
||||||
ui_menu();
|
ui_menu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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,20 +0,0 @@
|
||||||
#ifndef __ENGINE_DIRECT3D_H__
|
|
||||||
#define __ENGINE_DIRECT3D_H__
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Eina_Bool engine_direct3d_args(const char *engine, int width, int height);
|
|
||||||
void engine_direct3d_loop(void);
|
|
||||||
void engine_direct3d_shutdown(void);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __ENGINE_DIRECT3D_H__ */
|
|
|
@ -1,277 +0,0 @@
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <Evas_Engine_DirectFB.h>
|
|
||||||
|
|
||||||
static IDirectFB *_dfb;
|
|
||||||
static IDirectFBEventBuffer *_window_event;
|
|
||||||
static IDirectFBEventBuffer *_input_event;
|
|
||||||
static IDirectFBDisplayLayer *_layer;
|
|
||||||
static DFBResult _err;
|
|
||||||
static IDirectFBWindow *_dfb_window;
|
|
||||||
static IDirectFBSurface *_dfb_surface;
|
|
||||||
|
|
||||||
#define DBG(...) do {} while (0)
|
|
||||||
//#define DBG(...) fprintf(stderr, __VA_ARGS__)
|
|
||||||
|
|
||||||
#define DFBCHECK(x...) \
|
|
||||||
{ \
|
|
||||||
_err = x; \
|
|
||||||
if (_err != DFB_OK) { \
|
|
||||||
fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \
|
|
||||||
DirectFBErrorFatal( #x, _err ); \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
Eina_Bool
|
|
||||||
engine_directfb_args(const char *engine, int width, int height)
|
|
||||||
{
|
|
||||||
Evas_Engine_Info_DirectFB *einfo;
|
|
||||||
DFBWindowDescription desc;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
evas_output_method_set(evas, evas_render_method_lookup("directfb"));
|
|
||||||
einfo = (Evas_Engine_Info_DirectFB *)evas_engine_info_get(evas);
|
|
||||||
if (!einfo)
|
|
||||||
{
|
|
||||||
printf("Evas does not support the DirectFB Engine\n");
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
DFBCHECK(DirectFBInit(NULL, NULL));
|
|
||||||
DFBCHECK(DirectFBCreate(&_dfb));
|
|
||||||
DFBCHECK(_dfb->GetDisplayLayer(_dfb, DLID_PRIMARY, &_layer));
|
|
||||||
DFBCHECK(_dfb->CreateEventBuffer(_dfb, &_window_event));
|
|
||||||
DFBCHECK(_dfb->CreateInputEventBuffer(_dfb, DICAPS_ALL, DFB_FALSE, &_input_event));
|
|
||||||
|
|
||||||
memset(&desc, 0, sizeof(DFBWindowDescription));
|
|
||||||
desc.flags = (DWDESC_POSX | DWDESC_POSY | DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_PIXELFORMAT);
|
|
||||||
desc.posx = 0;
|
|
||||||
desc.posy = 0;
|
|
||||||
desc.width = width;
|
|
||||||
desc.height = height;
|
|
||||||
desc.pixelformat = DSPF_ARGB;
|
|
||||||
|
|
||||||
DFBCHECK(_layer->CreateWindow(_layer, &desc, &_dfb_window));
|
|
||||||
DFBCHECK(_dfb_window->AttachEventBuffer(_dfb_window, _window_event));
|
|
||||||
DFBCHECK(_dfb_window->SetOptions(_dfb_window, DWOP_NONE));
|
|
||||||
DFBCHECK(_dfb_window->SetOpacity(_dfb_window, 0xFF));
|
|
||||||
DFBCHECK(_dfb_window->GetSurface(_dfb_window, &_dfb_surface));
|
|
||||||
DFBCHECK(_dfb_surface->SetPorterDuff(_dfb_surface, DSPD_SRC_OVER));
|
|
||||||
|
|
||||||
einfo->info.dfb = _dfb;
|
|
||||||
einfo->info.surface = _dfb_surface;
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
|
||||||
{
|
|
||||||
printf("Evas can not setup the informations of the DirectFB Engine\n");
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return EINA_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
engine_directfb_quit(void)
|
|
||||||
{
|
|
||||||
DFBCHECK(_input_event->Release(_input_event));
|
|
||||||
DFBCHECK(_window_event->Release(_window_event));
|
|
||||||
DFBCHECK(_dfb_surface->Release(_dfb_surface));
|
|
||||||
DFBCHECK(_dfb_window->Release(_dfb_window));
|
|
||||||
DFBCHECK(_layer->Release(_layer));
|
|
||||||
DFBCHECK(_dfb->Release(_dfb));
|
|
||||||
|
|
||||||
evas_engine_info_set(evas, NULL);
|
|
||||||
|
|
||||||
engine_abort();
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char *
|
|
||||||
key_string(DFBInputDeviceKeySymbol sym)
|
|
||||||
{
|
|
||||||
switch (sym)
|
|
||||||
{
|
|
||||||
case DIKS_ESCAPE:
|
|
||||||
{
|
|
||||||
static const char k[] = "Escape";
|
|
||||||
return k;
|
|
||||||
}
|
|
||||||
case DIKS_RETURN:
|
|
||||||
{
|
|
||||||
static const char k[] = "Return";
|
|
||||||
return k;
|
|
||||||
}
|
|
||||||
case DIKS_CURSOR_LEFT:
|
|
||||||
{
|
|
||||||
static const char k[] = "Left";
|
|
||||||
return k;
|
|
||||||
}
|
|
||||||
case DIKS_CURSOR_RIGHT:
|
|
||||||
{
|
|
||||||
static const char k[] = "Right";
|
|
||||||
return k;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
static char k[2];
|
|
||||||
k[0] = (char)sym;
|
|
||||||
k[1] = 0;
|
|
||||||
return k;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
engine_directfb_event_window(const DFBWindowEvent *ev)
|
|
||||||
{
|
|
||||||
DBG("===> Window Event (type=%#10x, window=%d) <===\n",
|
|
||||||
ev->type, ev->window_id);
|
|
||||||
|
|
||||||
if (ev->type & DWET_POSITION)
|
|
||||||
{
|
|
||||||
DBG("\tDWET_POSITION %d, %d\n", ev->x, ev->y);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev->type & DWET_SIZE)
|
|
||||||
{
|
|
||||||
DBG("\tDWET_SIZE %dx%d\n", ev->w, ev->h);
|
|
||||||
evas_output_viewport_set(evas, 0, 0,
|
|
||||||
ev->w, ev->h);
|
|
||||||
evas_output_size_set(evas, ev->w, ev->h);
|
|
||||||
win_w = ev->w;
|
|
||||||
win_h = ev->h;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev->type & DWET_CLOSE)
|
|
||||||
{
|
|
||||||
DBG("\tDWET_CLOSE\n");
|
|
||||||
engine_directfb_quit();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev->type & DWET_DESTROYED)
|
|
||||||
{
|
|
||||||
DBG("\tDWET_DESTROYED\n");
|
|
||||||
engine_directfb_quit();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev->type & DWET_GOTFOCUS)
|
|
||||||
{
|
|
||||||
DBG("\tDWET_GOTFOCUS\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev->type & DWET_LOSTFOCUS)
|
|
||||||
{
|
|
||||||
DBG("\tDWET_LOSTFOCUS\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev->type & DWET_KEYDOWN)
|
|
||||||
{
|
|
||||||
const char *k;
|
|
||||||
|
|
||||||
k = key_string(ev->key_symbol);
|
|
||||||
DBG("\tDWET_KEYDOWN key_symbol=%s\n", k);
|
|
||||||
|
|
||||||
if (k)
|
|
||||||
evas_event_feed_key_down(evas, k, k, NULL, NULL, 0, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev->type & DWET_KEYUP)
|
|
||||||
{
|
|
||||||
const char *k;
|
|
||||||
|
|
||||||
k = key_string(ev->key_symbol);
|
|
||||||
DBG("\tDWET_KEYUP key_symbol=%s\n", k);
|
|
||||||
|
|
||||||
if (k)
|
|
||||||
evas_event_feed_key_up(evas, k, k, NULL, NULL, 0, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev->type & DWET_BUTTONDOWN)
|
|
||||||
{
|
|
||||||
DBG("\tDWET_BUTTONDOWN pos=(%d, %d) cur_pos=(%d, %d) "
|
|
||||||
"button=%#x buttons=%#x\n",
|
|
||||||
ev->x, ev->y, ev->cx, ev->cy, ev->button, ev->buttons);
|
|
||||||
evas_event_feed_mouse_move(evas, ev->cx, ev->cy, 0, NULL);
|
|
||||||
evas_event_feed_mouse_down(evas, ev->button, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev->type & DWET_BUTTONUP)
|
|
||||||
{
|
|
||||||
DBG("\tDWET_BUTTONUP pos=(%d, %d) cur_pos=(%d, %d) "
|
|
||||||
"button=%#x buttons=%#x\n",
|
|
||||||
ev->x, ev->y, ev->cx, ev->cy, ev->button, ev->buttons);
|
|
||||||
evas_event_feed_mouse_move(evas, ev->cx, ev->cy, 0, NULL);
|
|
||||||
evas_event_feed_mouse_up(evas, ev->button, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev->type & DWET_MOTION)
|
|
||||||
{
|
|
||||||
DBG("\tDWET_MOTION pos=(%d, %d) cur_pos=(%d, %d) buttons=%#x\n",
|
|
||||||
ev->x, ev->y, ev->cx, ev->cy, ev->buttons);
|
|
||||||
/* Mouse Motion Compression [tm] */
|
|
||||||
_layer->GetCursorPosition( _layer, (int*)&ev->x, (int*)&ev->y );
|
|
||||||
|
|
||||||
evas_event_feed_mouse_move(evas, ev->x, ev->y, 0, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev->type & DWET_LEAVE)
|
|
||||||
{
|
|
||||||
DBG("\tDWET_LEAVE pos=(%d, %d) cur_pos=(%d, %d)\n",
|
|
||||||
ev->x, ev->y, ev->cx, ev->cy);
|
|
||||||
evas_event_feed_mouse_out(evas, 0, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev->type & DWET_ENTER)
|
|
||||||
{
|
|
||||||
DBG("\tDWET_ENTER pos=(%d, %d) cur_pos=(%d, %d)\n",
|
|
||||||
ev->x, ev->y, ev->cx, ev->cy);
|
|
||||||
evas_event_feed_mouse_in(evas, 0, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev->type & DWET_WHEEL)
|
|
||||||
{
|
|
||||||
DBG("\tDWET_WHEEL step=%d\n", ev->step);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DBG("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_directfb_loop(void)
|
|
||||||
{
|
|
||||||
DFBEvent ev;
|
|
||||||
|
|
||||||
while ((_input_event->GetEvent(_input_event, &ev) == DFB_OK) ||
|
|
||||||
(_window_event->GetEvent(_window_event, &ev) == DFB_OK))
|
|
||||||
{
|
|
||||||
DBG("got dfb input event %d\n", ev.clazz);
|
|
||||||
switch (ev.clazz)
|
|
||||||
{
|
|
||||||
case DFEC_NONE:
|
|
||||||
DBG("No event?\n");
|
|
||||||
break;
|
|
||||||
case DFEC_INPUT:
|
|
||||||
DBG("Input\n");
|
|
||||||
break;
|
|
||||||
case DFEC_WINDOW:
|
|
||||||
engine_directfb_event_window((const DFBWindowEvent *)&ev);
|
|
||||||
break;
|
|
||||||
case DFEC_USER:
|
|
||||||
DBG("User\n");
|
|
||||||
break;
|
|
||||||
case DFEC_UNIVERSAL:
|
|
||||||
DBG("Universal\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_directfb_shutdown(void)
|
|
||||||
{
|
|
||||||
DFBCHECK(_input_event->Release(_input_event));
|
|
||||||
DFBCHECK(_window_event->Release(_window_event));
|
|
||||||
DFBCHECK(_dfb_surface->Release(_dfb_surface));
|
|
||||||
DFBCHECK(_dfb_window->Release(_dfb_window));
|
|
||||||
DFBCHECK(_layer->Release(_layer));
|
|
||||||
DFBCHECK(_dfb->Release(_dfb));
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
#ifndef ENGINE_DIRECTFB_H
|
|
||||||
#define ENGINE_DIRECTFB_H
|
|
||||||
|
|
||||||
Eina_Bool engine_directfb_args(const char *engine, int width, int height);
|
|
||||||
void engine_directfb_loop(void);
|
|
||||||
void engine_directfb_shutdown(void);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,43 +0,0 @@
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <Evas_Engine_FB.h>
|
|
||||||
|
|
||||||
Eina_Bool
|
|
||||||
engine_fb_args(const char *engine, int width, int height)
|
|
||||||
{
|
|
||||||
Evas_Engine_Info_FB *einfo;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
evas_output_method_set(evas, evas_render_method_lookup("fb"));
|
|
||||||
einfo = (Evas_Engine_Info_FB *)evas_engine_info_get(evas);
|
|
||||||
if (!einfo)
|
|
||||||
{
|
|
||||||
printf("Evas does not support the FB Engine\n");
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
einfo->info.virtual_terminal = 0;
|
|
||||||
einfo->info.device_number = 0;
|
|
||||||
einfo->info.device_number = 0;
|
|
||||||
einfo->info.refresh = 0;
|
|
||||||
einfo->info.rotation = 0;
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
|
||||||
{
|
|
||||||
printf("Evas can not setup the informations of the FB Engine\n");
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return EINA_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_fb_loop(void)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_fb_shutdown(void)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
#ifndef ENGINE_FB_H
|
|
||||||
#define ENGINE_FB_H
|
|
||||||
|
|
||||||
Eina_Bool engine_fb_args(const char *engine, int width, int height);
|
|
||||||
void engine_fb_loop(void);
|
|
||||||
void engine_fb_shutdown(void);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,8 +0,0 @@
|
||||||
#ifndef ENGINE_GL_COCOA_H
|
|
||||||
#define ENGINE_GL_COCOA_H
|
|
||||||
|
|
||||||
int engine_gl_cocoa_args(int argc, char **argv);
|
|
||||||
void engine_gl_cocoa_loop(void);
|
|
||||||
void engine_gl_cocoa_shutdown(void);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,174 +0,0 @@
|
||||||
#include <assert.h>
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <Evas_Engine_GL_SDL.h>
|
|
||||||
|
|
||||||
Eina_Bool
|
|
||||||
engine_gl_sdl_args(const char *engine, int width, int height)
|
|
||||||
{
|
|
||||||
Evas_Engine_Info_GL_SDL *einfo;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
evas_output_method_set(evas, evas_render_method_lookup("gl_sdl"));
|
|
||||||
|
|
||||||
einfo = (Evas_Engine_Info_GL_SDL *) evas_engine_info_get(evas);
|
|
||||||
if (!einfo)
|
|
||||||
{
|
|
||||||
printf("Evas wasn't build with GL SDL backend.\n");
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* the following is specific to the engine */
|
|
||||||
einfo->flags.fullscreen = fullscreen;
|
|
||||||
einfo->flags.noframe = 0;
|
|
||||||
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
|
||||||
{
|
|
||||||
printf("Evas could not initialize the GL SDL Engine\n");
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return EINA_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_gl_sdl_loop(void)
|
|
||||||
{
|
|
||||||
SDL_Event event;
|
|
||||||
|
|
||||||
while(SDL_PollEvent(&event))
|
|
||||||
{
|
|
||||||
switch(event.type)
|
|
||||||
{
|
|
||||||
case SDL_MOUSEMOTION:
|
|
||||||
evas_event_feed_mouse_move(evas, event.motion.x, event.motion.y, 0, NULL);
|
|
||||||
break;
|
|
||||||
case SDL_MOUSEBUTTONDOWN:
|
|
||||||
evas_event_feed_mouse_move(evas, event.button.x, event.button.y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_down(evas, event.button.state, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
case SDL_MOUSEBUTTONUP:
|
|
||||||
evas_event_feed_mouse_move(evas, event.button.x, event.button.y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_up(evas, event.button.state, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
case SDL_VIDEORESIZE:
|
|
||||||
evas_output_viewport_set(evas, 0, 0,
|
|
||||||
event.resize.w, event.resize.w);
|
|
||||||
evas_output_size_set(evas, event.resize.w, event.resize.w);
|
|
||||||
evas_output_size_get(evas, &win_w, &win_h);
|
|
||||||
break;
|
|
||||||
case SDL_VIDEOEXPOSE:
|
|
||||||
evas_output_size_get(evas, &win_w, &win_h);
|
|
||||||
evas_damage_rectangle_add(evas, 0, 0, win_w, win_h);
|
|
||||||
break;
|
|
||||||
case SDL_KEYDOWN:
|
|
||||||
switch (event.key.keysym.sym)
|
|
||||||
{
|
|
||||||
case SDLK_LSHIFT:
|
|
||||||
case SDLK_RSHIFT:
|
|
||||||
evas_key_modifier_on(evas, "Shift");
|
|
||||||
break;
|
|
||||||
case SDLK_RCTRL:
|
|
||||||
case SDLK_LCTRL:
|
|
||||||
evas_key_modifier_on(evas, "Control");
|
|
||||||
break;
|
|
||||||
case SDLK_MENU:
|
|
||||||
case SDLK_RALT:
|
|
||||||
case SDLK_LALT:
|
|
||||||
evas_key_modifier_on(evas, "Alt");
|
|
||||||
break;
|
|
||||||
case SDLK_LSUPER:
|
|
||||||
case SDLK_RSUPER:
|
|
||||||
evas_key_modifier_on(evas, "Super");
|
|
||||||
break;
|
|
||||||
case SDLK_CAPSLOCK:
|
|
||||||
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");
|
|
||||||
break;
|
|
||||||
case SDLK_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");
|
|
||||||
break;
|
|
||||||
case SDLK_SCROLLOCK:
|
|
||||||
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");
|
|
||||||
break;
|
|
||||||
case SDLK_s:
|
|
||||||
case SDLK_ESCAPE:
|
|
||||||
evas_event_feed_key_down(evas, "Escape", "Escape", NULL, NULL, 0, NULL);
|
|
||||||
break;
|
|
||||||
case SDLK_KP_ENTER:
|
|
||||||
case SDLK_RETURN:
|
|
||||||
evas_event_feed_key_down(evas, "Return", "Return", NULL, NULL, 0, NULL);
|
|
||||||
break;
|
|
||||||
case SDLK_LEFT: evas_event_feed_key_down(evas, "Left", "Left", NULL, NULL, 0, NULL); break;
|
|
||||||
case SDLK_RIGHT: evas_event_feed_key_down(evas, "Right", "Right", NULL, NULL, 0, NULL); break;
|
|
||||||
case SDLK_q:
|
|
||||||
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock"))
|
|
||||||
evas_event_feed_key_down(evas, "Q", "Q", NULL, NULL, 0, NULL);
|
|
||||||
else
|
|
||||||
evas_event_feed_key_down(evas, "q", "q", NULL, NULL, 0, NULL);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case SDL_KEYUP:
|
|
||||||
switch (event.key.keysym.sym)
|
|
||||||
{
|
|
||||||
case SDLK_LSHIFT:
|
|
||||||
case SDLK_RSHIFT:
|
|
||||||
evas_key_modifier_off(evas, "Shift");
|
|
||||||
break;
|
|
||||||
case SDLK_RCTRL:
|
|
||||||
case SDLK_LCTRL:
|
|
||||||
evas_key_modifier_off(evas, "Control");
|
|
||||||
break;
|
|
||||||
case SDLK_MENU:
|
|
||||||
case SDLK_RALT:
|
|
||||||
case SDLK_LALT:
|
|
||||||
evas_key_modifier_off(evas, "Alt");
|
|
||||||
break;
|
|
||||||
case SDLK_LSUPER:
|
|
||||||
case SDLK_RSUPER:
|
|
||||||
evas_key_modifier_off(evas, "Super");
|
|
||||||
break;
|
|
||||||
case SDLK_ESCAPE: evas_event_feed_key_up(evas, "Escape", "Escape", NULL, NULL, 0, NULL); break;
|
|
||||||
case SDLK_RETURN: evas_event_feed_key_up(evas, "Return", "Return", NULL, NULL, 0, NULL); break;
|
|
||||||
case SDLK_LEFT: evas_event_feed_key_up(evas, "Left", "Left", NULL, NULL, 0, NULL); break;
|
|
||||||
case SDLK_RIGHT: evas_event_feed_key_up(evas, "Right", "Right", NULL, NULL, 0, NULL); break;
|
|
||||||
case SDLK_q:
|
|
||||||
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock"))
|
|
||||||
evas_event_feed_key_up(evas, "Q", "Q", NULL, NULL, 0, NULL);
|
|
||||||
else
|
|
||||||
evas_event_feed_key_up(evas, "q", "q", NULL, NULL, 0, NULL);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case SDL_QUIT:
|
|
||||||
case SDL_SYSWMEVENT:
|
|
||||||
case SDL_USEREVENT:
|
|
||||||
case SDL_ACTIVEEVENT:
|
|
||||||
case SDL_JOYAXISMOTION:
|
|
||||||
case SDL_JOYBALLMOTION:
|
|
||||||
case SDL_JOYHATMOTION:
|
|
||||||
case SDL_JOYBUTTONDOWN:
|
|
||||||
case SDL_JOYBUTTONUP:
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_gl_sdl_shutdown(void)
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
#ifndef ENGINE_GL_SDL_H
|
|
||||||
#define ENGINE_GL_SDL_H
|
|
||||||
|
|
||||||
Eina_Bool engine_gl_sdl_args(const char *engine, int width, int height);
|
|
||||||
void engine_gl_sdl_loop(void);
|
|
||||||
void engine_gl_sdl_shutdown(void);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,223 +0,0 @@
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Xutil.h>
|
|
||||||
#include <X11/Xatom.h>
|
|
||||||
#include <Evas_Engine_GL_X11.h>
|
|
||||||
|
|
||||||
static Display *disp = NULL;
|
|
||||||
static Window win = 0;
|
|
||||||
static int first_expose = 0;
|
|
||||||
|
|
||||||
Eina_Bool
|
|
||||||
engine_gl_x11_args(const char *engine, int width, int height)
|
|
||||||
{
|
|
||||||
XSetWindowAttributes attr;
|
|
||||||
XClassHint chint;
|
|
||||||
XSizeHints szhints;
|
|
||||||
Evas_Engine_Info_GL_X11 *einfo;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
disp = XOpenDisplay(NULL);
|
|
||||||
if (!disp) return EINA_FALSE;
|
|
||||||
|
|
||||||
evas_output_method_set(evas, evas_render_method_lookup("gl_x11"));
|
|
||||||
einfo = (Evas_Engine_Info_GL_X11 *)evas_engine_info_get(evas);
|
|
||||||
if (!einfo)
|
|
||||||
{
|
|
||||||
printf("Evas does not support the OpenGL X11 Engine\n");
|
|
||||||
goto close_display;
|
|
||||||
}
|
|
||||||
|
|
||||||
einfo->info.display = disp;
|
|
||||||
einfo->info.screen = DefaultScreen(einfo->info.display);
|
|
||||||
einfo->info.visual = einfo->func.best_visual_get(einfo);
|
|
||||||
einfo->info.colormap = einfo->func.best_colormap_get(einfo);
|
|
||||||
einfo->info.depth = einfo->func.best_depth_get(einfo);
|
|
||||||
attr.backing_store = NotUseful;
|
|
||||||
attr.colormap = einfo->info.colormap;
|
|
||||||
attr.border_pixel = 0;
|
|
||||||
attr.background_pixmap = None;
|
|
||||||
attr.event_mask =
|
|
||||||
ExposureMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
|
|
||||||
StructureNotifyMask | EnterWindowMask | LeaveWindowMask |
|
|
||||||
KeyPressMask | KeyReleaseMask;
|
|
||||||
attr.bit_gravity = ForgetGravity;
|
|
||||||
win = XCreateWindow(disp, DefaultRootWindow(disp),
|
|
||||||
0, 0, width, height, 0,
|
|
||||||
einfo->info.depth, InputOutput,
|
|
||||||
einfo->info.visual,
|
|
||||||
CWBackingStore | CWColormap |
|
|
||||||
CWBackPixmap | CWBorderPixel |
|
|
||||||
CWBitGravity | CWEventMask,
|
|
||||||
&attr);
|
|
||||||
if (!win)
|
|
||||||
goto close_display;
|
|
||||||
|
|
||||||
einfo->info.drawable = win;
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
|
||||||
{
|
|
||||||
printf("Evas can not setup the informations of the OpenGL X11 Engine\n");
|
|
||||||
goto destroy_window;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
Atom prop = XInternAtom(disp, "_NET_WM_STATE", False);
|
|
||||||
Atom state = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False);
|
|
||||||
unsigned long data = state;
|
|
||||||
XChangeProperty(disp, win, prop, XA_ATOM, 32, PropModeReplace,
|
|
||||||
(unsigned char*) &data, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
XStoreName(disp, win, "Expedite - Evas Test Suite");
|
|
||||||
chint.res_name = "expedite";
|
|
||||||
chint.res_class = "Expedite";
|
|
||||||
XSetClassHint(disp, win, &chint);
|
|
||||||
szhints.flags = PMinSize | PMaxSize | PSize | USSize;
|
|
||||||
szhints.min_width = szhints.max_width = width;
|
|
||||||
szhints.min_height = szhints.max_height = height;
|
|
||||||
XSetWMNormalHints(disp, win, &szhints);
|
|
||||||
XMapWindow(disp, win);
|
|
||||||
XSync(disp, False);
|
|
||||||
while (!first_expose)
|
|
||||||
engine_gl_x11_loop();
|
|
||||||
return EINA_TRUE;
|
|
||||||
|
|
||||||
destroy_window:
|
|
||||||
XDestroyWindow(disp, win);
|
|
||||||
close_display:
|
|
||||||
XCloseDisplay(disp);
|
|
||||||
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_gl_x11_loop(void)
|
|
||||||
{
|
|
||||||
XEvent ev;
|
|
||||||
KeySym ks;
|
|
||||||
char *kstr;
|
|
||||||
|
|
||||||
again:
|
|
||||||
if (!XCheckMaskEvent(disp,
|
|
||||||
ExposureMask |
|
|
||||||
StructureNotifyMask |
|
|
||||||
KeyPressMask |
|
|
||||||
KeyReleaseMask |
|
|
||||||
ButtonPressMask |
|
|
||||||
ButtonReleaseMask |
|
|
||||||
PointerMotionMask |
|
|
||||||
EnterWindowMask |
|
|
||||||
LeaveWindowMask, &ev))
|
|
||||||
return;
|
|
||||||
switch (ev.type)
|
|
||||||
{
|
|
||||||
case ButtonPress:
|
|
||||||
evas_event_feed_mouse_move(evas, ev.xbutton.x, ev.xbutton.y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_down(evas, ev.xbutton.button, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
case ButtonRelease:
|
|
||||||
evas_event_feed_mouse_move(evas, ev.xbutton.x, ev.xbutton.y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_up(evas, ev.xbutton.button, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
case MotionNotify:
|
|
||||||
evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL);
|
|
||||||
break;
|
|
||||||
case Expose:
|
|
||||||
first_expose = 1;
|
|
||||||
evas_damage_rectangle_add(evas,
|
|
||||||
ev.xexpose.x,
|
|
||||||
ev.xexpose.y,
|
|
||||||
ev.xexpose.width,
|
|
||||||
ev.xexpose.height);
|
|
||||||
break;
|
|
||||||
case ConfigureNotify:
|
|
||||||
evas_output_viewport_set(evas, 0, 0,
|
|
||||||
ev.xconfigure.width,
|
|
||||||
ev.xconfigure.height);
|
|
||||||
evas_output_size_set(evas,
|
|
||||||
ev.xconfigure.width,
|
|
||||||
ev.xconfigure.height);
|
|
||||||
win_w = ev.xconfigure.width;
|
|
||||||
win_h = ev.xconfigure.height;
|
|
||||||
break;
|
|
||||||
case EnterNotify:
|
|
||||||
evas_event_feed_mouse_in(evas, 0, NULL);
|
|
||||||
break;
|
|
||||||
case LeaveNotify:
|
|
||||||
evas_event_feed_mouse_out(evas, 0, NULL);
|
|
||||||
break;
|
|
||||||
case KeyPress:
|
|
||||||
ks = XKeycodeToKeysym(ev.xkey.display, ev.xkey.keycode, 0);
|
|
||||||
kstr = XKeysymToString(ks);
|
|
||||||
if (kstr)
|
|
||||||
{
|
|
||||||
if ((!strcmp(kstr, "Shift_L")) ||
|
|
||||||
(!strcmp(kstr, "Shift_R")))
|
|
||||||
evas_key_modifier_on(evas, "Shift");
|
|
||||||
if ((!strcmp(kstr, "Control_L")) ||
|
|
||||||
(!strcmp(kstr, "Control_R")))
|
|
||||||
evas_key_modifier_on(evas, "Control");
|
|
||||||
if ((!strcmp(kstr, "Alt_L")) ||
|
|
||||||
(!strcmp(kstr, "Alt_R")))
|
|
||||||
evas_key_modifier_on(evas, "Alt");
|
|
||||||
if ((!strcmp(kstr, "Super_L")) ||
|
|
||||||
(!strcmp(kstr, "Super_R")))
|
|
||||||
evas_key_modifier_on(evas, "Super");
|
|
||||||
if (!strcmp(kstr, "Caps_Lock"))
|
|
||||||
{
|
|
||||||
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 (!strcmp(kstr, "Num_Lock"))
|
|
||||||
{
|
|
||||||
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 (!strcmp(kstr, "Scroll_Lock"))
|
|
||||||
{
|
|
||||||
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 (kstr) evas_event_feed_key_down(evas, kstr, kstr, NULL, NULL, 0, NULL);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case KeyRelease:
|
|
||||||
ks = XKeycodeToKeysym(ev.xkey.display, ev.xkey.keycode, 0);
|
|
||||||
kstr = XKeysymToString(ks);
|
|
||||||
if (kstr)
|
|
||||||
{
|
|
||||||
if ((!strcmp(kstr, "Shift_L")) ||
|
|
||||||
(!strcmp(kstr, "Shift_R")))
|
|
||||||
evas_key_modifier_off(evas, "Shift");
|
|
||||||
if ((!strcmp(kstr, "Control_L")) ||
|
|
||||||
(!strcmp(kstr, "Control_R")))
|
|
||||||
evas_key_modifier_off(evas, "Control");
|
|
||||||
if ((!strcmp(kstr, "Alt_L")) ||
|
|
||||||
(!strcmp(kstr, "Alt_R")))
|
|
||||||
evas_key_modifier_off(evas, "Alt");
|
|
||||||
if ((!strcmp(kstr, "Super_L")) ||
|
|
||||||
(!strcmp(kstr, "Super_R")))
|
|
||||||
evas_key_modifier_off(evas, "Super");
|
|
||||||
evas_event_feed_key_up(evas, kstr, kstr, NULL, NULL, 0, NULL);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
goto again;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_gl_x11_shutdown(void)
|
|
||||||
{
|
|
||||||
XDestroyWindow(disp, win);
|
|
||||||
XCloseDisplay(disp);
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
#ifndef ENGINE_GL_X11_H
|
|
||||||
#define ENGINE_GL_X11_H
|
|
||||||
|
|
||||||
Eina_Bool engine_gl_x11_args(const char *engine, int width, int height);
|
|
||||||
void engine_gl_x11_loop(void);
|
|
||||||
void engine_gl_x11_shutdown(void);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,284 +0,0 @@
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <Evas_Engine_PSL1GHT.h>
|
|
||||||
#include <io/mouse.h>
|
|
||||||
#include <io/kb.h>
|
|
||||||
|
|
||||||
static int window_width = 0;
|
|
||||||
static int window_height = 0;
|
|
||||||
|
|
||||||
Eina_Bool
|
|
||||||
engine_psl1ght_args(const char *engine, int width, int height)
|
|
||||||
{
|
|
||||||
Evas_Engine_Info_PSL1GHT *einfo;
|
|
||||||
|
|
||||||
evas_output_method_set(evas, evas_render_method_lookup("psl1ght"));
|
|
||||||
einfo = (Evas_Engine_Info_PSL1GHT *)evas_engine_info_get(evas);
|
|
||||||
if (!einfo)
|
|
||||||
{
|
|
||||||
printf("Evas does not support the PSL1GHT Engine\n");
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *)einfo))
|
|
||||||
{
|
|
||||||
printf("Evas can not setup the informations of the PSL1GHT Engine\n");
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
window_width = width;
|
|
||||||
window_height = height;
|
|
||||||
ioMouseInit(1);
|
|
||||||
ioKbInit(1);
|
|
||||||
return EINA_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_psl1ght_loop(void)
|
|
||||||
{
|
|
||||||
mouseInfo mouseinfo;
|
|
||||||
static int mouse_connected = FALSE;
|
|
||||||
static u8 mouse_buttons = 0;
|
|
||||||
static int mouse_x = 0;
|
|
||||||
static int mouse_y = 0;
|
|
||||||
KbInfo kbInfo;
|
|
||||||
static int keyboard_connected = FALSE;
|
|
||||||
static KbLed keyboard_leds = {{0}};
|
|
||||||
static KbMkey keyboard_mods = {{0}};
|
|
||||||
static u16 keyboard_old_key = 0;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
/* Check mouse events */
|
|
||||||
ioMouseGetInfo(&mouseinfo);
|
|
||||||
|
|
||||||
if (mouseinfo.status[0] == 1 && !mouse_connected) // Connected
|
|
||||||
{
|
|
||||||
mouse_connected = TRUE;
|
|
||||||
mouse_buttons = 0;
|
|
||||||
|
|
||||||
// Old events in the queue are discarded
|
|
||||||
ioMouseClearBuf(0);
|
|
||||||
}
|
|
||||||
else if (mouseinfo.status[0] != 1 && mouse_connected) // Disconnected
|
|
||||||
{
|
|
||||||
mouse_connected = FALSE;
|
|
||||||
mouse_buttons = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mouse_connected)
|
|
||||||
{
|
|
||||||
mouseDataList datalist;
|
|
||||||
|
|
||||||
ioMouseGetDataList(0, &datalist);
|
|
||||||
|
|
||||||
for (i = 0; i < datalist.count; i++) {
|
|
||||||
u8 old_left = mouse_buttons & 1;
|
|
||||||
u8 new_left = datalist.list[i].buttons & 1;
|
|
||||||
u8 old_right = mouse_buttons & 2;
|
|
||||||
u8 new_right = datalist.list[i].buttons & 2;
|
|
||||||
u8 old_middle = mouse_buttons & 4;
|
|
||||||
u8 new_middle = datalist.list[i].buttons & 4;
|
|
||||||
|
|
||||||
mouse_x += datalist.list[i].x_axis;
|
|
||||||
mouse_y += datalist.list[i].y_axis;
|
|
||||||
if (mouse_x < 0) mouse_x = 0;
|
|
||||||
if (mouse_y < 0) mouse_y = 0;
|
|
||||||
if (mouse_x > window_width) mouse_x = window_width;
|
|
||||||
if (mouse_y > window_height) mouse_x = window_height;
|
|
||||||
|
|
||||||
evas_event_feed_mouse_move(evas, mouse_x, mouse_y, 0, NULL);
|
|
||||||
|
|
||||||
if (old_left != new_left)
|
|
||||||
{
|
|
||||||
if (new_left)
|
|
||||||
evas_event_feed_mouse_down(evas, 1, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
else
|
|
||||||
evas_event_feed_mouse_up(evas, 1, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
}
|
|
||||||
if (old_right != new_right)
|
|
||||||
{
|
|
||||||
if (new_right)
|
|
||||||
evas_event_feed_mouse_down(evas, 3, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
else
|
|
||||||
evas_event_feed_mouse_up(evas, 3, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
}
|
|
||||||
if (old_middle != new_middle)
|
|
||||||
{
|
|
||||||
if (new_middle)
|
|
||||||
evas_event_feed_mouse_down(evas, 2, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
else
|
|
||||||
evas_event_feed_mouse_up(evas, 2, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
}
|
|
||||||
mouse_buttons = datalist.list[i].buttons;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check keyboard events */
|
|
||||||
ioKbGetInfo(&kbInfo);
|
|
||||||
|
|
||||||
if (kbInfo.status[0] == 1 && !keyboard_connected)
|
|
||||||
{
|
|
||||||
/* Connected */
|
|
||||||
keyboard_connected = true;
|
|
||||||
|
|
||||||
// Old events in the queue are discarded
|
|
||||||
ioKbClearBuf(0);
|
|
||||||
keyboard_leds._KbLedU.leds = 0;
|
|
||||||
keyboard_mods._KbMkeyU.mkeys = 0;
|
|
||||||
keyboard_old_key = 0;
|
|
||||||
|
|
||||||
// Set raw keyboard code types to get scan codes
|
|
||||||
ioKbSetCodeType(0, KB_CODETYPE_ASCII);
|
|
||||||
ioKbSetReadMode(0, KB_RMODE_INPUTCHAR);
|
|
||||||
}
|
|
||||||
else if (kbInfo.status[0] != 1 && keyboard_connected)
|
|
||||||
{
|
|
||||||
/* Disconnected keyboard */
|
|
||||||
keyboard_connected = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (keyboard_connected)
|
|
||||||
{
|
|
||||||
KbData Keys;
|
|
||||||
|
|
||||||
// Read data from the keyboard buffer
|
|
||||||
if (ioKbRead(0, &Keys) == 0 && Keys.nb_keycode > 0)
|
|
||||||
{
|
|
||||||
if (Keys.mkey._KbMkeyU._KbMkeyS.l_shift !=
|
|
||||||
keyboard_mods._KbMkeyU._KbMkeyS.l_shift ||
|
|
||||||
Keys.mkey._KbMkeyU._KbMkeyS.r_shift !=
|
|
||||||
keyboard_mods._KbMkeyU._KbMkeyS.r_shift)
|
|
||||||
{
|
|
||||||
if (Keys.mkey._KbMkeyU._KbMkeyS.r_shift ||
|
|
||||||
Keys.mkey._KbMkeyU._KbMkeyS.l_shift)
|
|
||||||
evas_key_modifier_on(evas, "Shift");
|
|
||||||
else
|
|
||||||
evas_key_modifier_off(evas, "Shift");
|
|
||||||
}
|
|
||||||
if (Keys.mkey._KbMkeyU._KbMkeyS.l_ctrl !=
|
|
||||||
keyboard_mods._KbMkeyU._KbMkeyS.l_ctrl ||
|
|
||||||
Keys.mkey._KbMkeyU._KbMkeyS.r_ctrl !=
|
|
||||||
keyboard_mods._KbMkeyU._KbMkeyS.r_ctrl)
|
|
||||||
{
|
|
||||||
if (Keys.mkey._KbMkeyU._KbMkeyS.r_ctrl ||
|
|
||||||
Keys.mkey._KbMkeyU._KbMkeyS.l_ctrl)
|
|
||||||
evas_key_modifier_on(evas, "Control");
|
|
||||||
else
|
|
||||||
evas_key_modifier_off(evas, "Control");
|
|
||||||
}
|
|
||||||
if (Keys.mkey._KbMkeyU._KbMkeyS.l_alt !=
|
|
||||||
keyboard_mods._KbMkeyU._KbMkeyS.l_alt ||
|
|
||||||
Keys.mkey._KbMkeyU._KbMkeyS.r_alt !=
|
|
||||||
keyboard_mods._KbMkeyU._KbMkeyS.r_alt)
|
|
||||||
{
|
|
||||||
if (Keys.mkey._KbMkeyU._KbMkeyS.r_alt ||
|
|
||||||
Keys.mkey._KbMkeyU._KbMkeyS.l_alt)
|
|
||||||
evas_key_modifier_on(evas, "Alt");
|
|
||||||
else
|
|
||||||
evas_key_modifier_off(evas, "Alt");
|
|
||||||
}
|
|
||||||
if (Keys.mkey._KbMkeyU._KbMkeyS.l_win !=
|
|
||||||
keyboard_mods._KbMkeyU._KbMkeyS.l_win ||
|
|
||||||
Keys.mkey._KbMkeyU._KbMkeyS.r_win !=
|
|
||||||
keyboard_mods._KbMkeyU._KbMkeyS.r_win)
|
|
||||||
{
|
|
||||||
if (Keys.mkey._KbMkeyU._KbMkeyS.r_win ||
|
|
||||||
Keys.mkey._KbMkeyU._KbMkeyS.l_win)
|
|
||||||
evas_key_modifier_on(evas, "Super");
|
|
||||||
else
|
|
||||||
evas_key_modifier_off(evas, "Super");
|
|
||||||
}
|
|
||||||
keyboard_mods = Keys.mkey;
|
|
||||||
|
|
||||||
if (Keys.led._KbLedU._KbLedS.num_lock !=
|
|
||||||
keyboard_leds._KbLedU._KbLedS.num_lock)
|
|
||||||
{
|
|
||||||
if (Keys.led._KbLedU._KbLedS.num_lock)
|
|
||||||
evas_key_lock_on(evas, "Num_Lock");
|
|
||||||
else
|
|
||||||
evas_key_lock_on(evas, "Num_Lock");
|
|
||||||
}
|
|
||||||
if (Keys.led._KbLedU._KbLedS.caps_lock !=
|
|
||||||
keyboard_leds._KbLedU._KbLedS.caps_lock)
|
|
||||||
{
|
|
||||||
if (Keys.led._KbLedU._KbLedS.caps_lock)
|
|
||||||
evas_key_lock_on(evas, "Caps_Lock");
|
|
||||||
else
|
|
||||||
evas_key_lock_on(evas, "Caps_Lock");
|
|
||||||
}
|
|
||||||
if (Keys.led._KbLedU._KbLedS.scroll_lock !=
|
|
||||||
keyboard_leds._KbLedU._KbLedS.scroll_lock)
|
|
||||||
{
|
|
||||||
if (Keys.led._KbLedU._KbLedS.scroll_lock)
|
|
||||||
evas_key_lock_on(evas, "Scroll_Lock");
|
|
||||||
else
|
|
||||||
evas_key_lock_on(evas, "Scroll_Lock");
|
|
||||||
}
|
|
||||||
keyboard_leds = Keys.led;
|
|
||||||
|
|
||||||
for (i = 0; i < Keys.nb_keycode; i++) {
|
|
||||||
if (Keys.keycode[i] != keyboard_old_key)
|
|
||||||
{
|
|
||||||
u16 key = Keys.keycode[i];
|
|
||||||
char *key_str = NULL;
|
|
||||||
|
|
||||||
if (key == 0)
|
|
||||||
key = keyboard_old_key;
|
|
||||||
key_str = (char *)&key;
|
|
||||||
|
|
||||||
printf ("Key %d is %X\n", i, key);
|
|
||||||
key &= ~KB_KEYPAD;
|
|
||||||
if (key & KB_RAWDAT)
|
|
||||||
{
|
|
||||||
key &= 0xFF;
|
|
||||||
if (key == KB_RAWKEY_ESCAPE)
|
|
||||||
key_str = "Escape";
|
|
||||||
else if (key == KB_RAWKEY_ENTER)
|
|
||||||
key_str = "Return";
|
|
||||||
else if (key == KB_RAWKEY_UP_ARROW)
|
|
||||||
key_str = "Up";
|
|
||||||
else if (key == KB_RAWKEY_DOWN_ARROW)
|
|
||||||
key_str = "Down";
|
|
||||||
else if (key == KB_RAWKEY_LEFT_ARROW)
|
|
||||||
key_str = "Left";
|
|
||||||
else if (key == KB_RAWKEY_RIGHT_ARROW)
|
|
||||||
key_str = "Right";
|
|
||||||
else
|
|
||||||
key_str = NULL;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (key == 0x0A)
|
|
||||||
key_str = "Return";
|
|
||||||
else {
|
|
||||||
key_str[0] = key_str[1];
|
|
||||||
key_str[1] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (key_str)
|
|
||||||
{
|
|
||||||
if (Keys.keycode[i] != 0)
|
|
||||||
{
|
|
||||||
printf ("Key %s pressed\n", key_str);
|
|
||||||
evas_event_feed_key_up(evas, key_str, key_str, NULL, NULL, 0, NULL);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
evas_event_feed_key_down(evas, key_str, key_str, NULL, NULL, 0, NULL);
|
|
||||||
printf ("Key %s released\n", key_str);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
keyboard_old_key = Keys.keycode[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_psl1ght_shutdown(void)
|
|
||||||
{
|
|
||||||
ioMouseEnd();
|
|
||||||
ioKbEnd();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
#ifndef ENGINE_SOFTWARE_PSL1GHT_H
|
|
||||||
#define ENGINE_SOFTWARE_PSL1GHT_H
|
|
||||||
|
|
||||||
Eina_Bool engine_psl1ght_args(const char *engine, int width, int height);
|
|
||||||
void engine_psl1ght_loop(void);
|
|
||||||
void engine_psl1ght_shutdown(void);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,392 +0,0 @@
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <windowsx.h>
|
|
||||||
#include <Evas_Engine_Software_16_DDraw.h>
|
|
||||||
|
|
||||||
|
|
||||||
static HWND window;
|
|
||||||
static HINSTANCE instance;
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
_directdraw_init (HWND window,
|
|
||||||
int width,
|
|
||||||
int height,
|
|
||||||
LPDIRECTDRAW *object,
|
|
||||||
LPDIRECTDRAWSURFACE *surface_primary,
|
|
||||||
LPDIRECTDRAWSURFACE *surface_back,
|
|
||||||
LPDIRECTDRAWSURFACE *surface_source,
|
|
||||||
int *depth)
|
|
||||||
{
|
|
||||||
DDSURFACEDESC surface_desc;
|
|
||||||
DDPIXELFORMAT pixel_format;
|
|
||||||
LPDIRECTDRAW o;
|
|
||||||
void *source;
|
|
||||||
HRESULT res;
|
|
||||||
|
|
||||||
res = DirectDrawCreate (NULL, &o, NULL);
|
|
||||||
if (FAILED(res))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
res = o->SetCooperativeLevel (window, DDSCL_NORMAL);
|
|
||||||
if (FAILED(res))
|
|
||||||
{
|
|
||||||
o->Release ();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&surface_desc, 0, sizeof(surface_desc));
|
|
||||||
surface_desc.dwSize = sizeof(surface_desc);
|
|
||||||
surface_desc.dwFlags = DDSD_CAPS;
|
|
||||||
surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
|
|
||||||
|
|
||||||
res = o->CreateSurface (&surface_desc, surface_primary, NULL);
|
|
||||||
if (FAILED(res))
|
|
||||||
{
|
|
||||||
o->Release ();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset (&surface_desc, 0, sizeof(surface_desc));
|
|
||||||
surface_desc.dwSize = sizeof(surface_desc);
|
|
||||||
surface_desc.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH;
|
|
||||||
surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
|
|
||||||
surface_desc.dwWidth = width;
|
|
||||||
surface_desc.dwHeight = height;
|
|
||||||
|
|
||||||
res = o->CreateSurface (&surface_desc, surface_back, NULL);
|
|
||||||
if (FAILED(res))
|
|
||||||
{
|
|
||||||
(*surface_primary)->Release ();
|
|
||||||
o->Release ();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ZeroMemory(&pixel_format, sizeof(pixel_format));
|
|
||||||
pixel_format.dwSize = sizeof(pixel_format);
|
|
||||||
(*surface_primary)->GetPixelFormat(&pixel_format);
|
|
||||||
|
|
||||||
source = malloc(width * height * 2);
|
|
||||||
if (!source)
|
|
||||||
{
|
|
||||||
(*surface_primary)->Release ();
|
|
||||||
o->Release ();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset (&surface_desc, 0, sizeof (surface_desc));
|
|
||||||
surface_desc.dwSize = sizeof (surface_desc);
|
|
||||||
surface_desc.dwFlags =
|
|
||||||
DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH |
|
|
||||||
DDSD_LPSURFACE | DDSD_PITCH | DDSD_PIXELFORMAT;
|
|
||||||
surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
|
|
||||||
surface_desc.dwWidth = width;
|
|
||||||
surface_desc.dwHeight = height;
|
|
||||||
surface_desc.lPitch = 2 * surface_desc.dwWidth;
|
|
||||||
surface_desc.lpSurface = source;
|
|
||||||
surface_desc.ddpfPixelFormat = pixel_format;
|
|
||||||
|
|
||||||
if (FAILED(o->CreateSurface(&surface_desc, surface_source, NULL)))
|
|
||||||
{
|
|
||||||
free(source);
|
|
||||||
(*surface_primary)->Release ();
|
|
||||||
o->Release ();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
*object = o;
|
|
||||||
*depth = pixel_format.dwRGBBitCount;
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
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_16_ddraw_args(const char *engine, int width, int height)
|
|
||||||
{
|
|
||||||
WNDCLASS wc;
|
|
||||||
RECT rect;
|
|
||||||
LPDIRECTDRAW object;
|
|
||||||
LPDIRECTDRAWSURFACE surface_primary;
|
|
||||||
LPDIRECTDRAWSURFACE surface_back;
|
|
||||||
LPDIRECTDRAWSURFACE surface_source;
|
|
||||||
Evas_Engine_Info_Software_16_DDraw *einfo;
|
|
||||||
DWORD style;
|
|
||||||
DWORD exstyle;
|
|
||||||
int depth;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
instance = GetModuleHandle(NULL);
|
|
||||||
if (!instance) return EINA_FALSE;
|
|
||||||
|
|
||||||
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 = (HBRUSH)(1 + COLOR_BTNFACE);
|
|
||||||
wc.lpszMenuName = NULL;
|
|
||||||
wc.lpszClassName = "Evas_Software_16_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_16_DDraw_Test",
|
|
||||||
"Evas_Software_16_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 unregister_class;
|
|
||||||
|
|
||||||
if (!_directdraw_init(window, width, height,
|
|
||||||
&object,
|
|
||||||
&surface_primary,
|
|
||||||
&surface_back,
|
|
||||||
&surface_source,
|
|
||||||
&depth))
|
|
||||||
goto destroy_window;
|
|
||||||
|
|
||||||
evas_output_method_set(evas, evas_render_method_lookup("software_16_ddraw"));
|
|
||||||
einfo = (Evas_Engine_Info_Software_16_DDraw *)evas_engine_info_get(evas);
|
|
||||||
if (!einfo)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "Evas does not support the 16 bits Software DirectDraw Engine\n");
|
|
||||||
/* should shutdown ddraw */
|
|
||||||
goto destroy_window;
|
|
||||||
}
|
|
||||||
|
|
||||||
einfo->info.window = window;
|
|
||||||
einfo->info.object = object;
|
|
||||||
einfo->info.surface_primary = surface_primary;
|
|
||||||
einfo->info.surface_back = surface_back;
|
|
||||||
einfo->info.surface_source = surface_source;
|
|
||||||
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 16 bits 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 EINA_TRUE;
|
|
||||||
|
|
||||||
destroy_window:
|
|
||||||
DestroyWindow(window);
|
|
||||||
unregister_class:
|
|
||||||
UnregisterClass("Evas_Software_16_DDraw_Test", instance);
|
|
||||||
free_library:
|
|
||||||
FreeLibrary(instance);
|
|
||||||
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_software_16_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_16_ddraw_shutdown(void)
|
|
||||||
{
|
|
||||||
DestroyWindow(window);
|
|
||||||
UnregisterClass("Evas_Software_16_DDraw_Test", instance);
|
|
||||||
FreeLibrary(instance);
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
#ifndef __ENGINE_SOFTWARE_16_DDRAW_H__
|
|
||||||
#define __ENGINE_SOFTWARE_16_DDRAW_H__
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Eina_Bool engine_software_16_ddraw_args(const char *engine, int width, int height);
|
|
||||||
void engine_software_16_ddraw_loop(void);
|
|
||||||
void engine_software_16_ddraw_shutdown(void);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __ENGINE_SOFTWARE_16_DDRAW_H__ */
|
|
|
@ -1,324 +0,0 @@
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
#include <aygshell.h>
|
|
||||||
#include <Evas_Engine_Software_16_WinCE.h>
|
|
||||||
|
|
||||||
|
|
||||||
static HINSTANCE instance = NULL;
|
|
||||||
static HWND window = NULL;
|
|
||||||
static int backend = 0;
|
|
||||||
|
|
||||||
typedef int (*suspend) (int backend);
|
|
||||||
typedef int (*resume) (int backend);
|
|
||||||
|
|
||||||
static suspend _suspend = NULL;
|
|
||||||
static resume _resume = NULL;
|
|
||||||
|
|
||||||
|
|
||||||
typedef BOOL (__stdcall *UnregisterFunc1Proc)(UINT, UINT);
|
|
||||||
|
|
||||||
static int
|
|
||||||
_wince_hardware_keys_register(HWND window)
|
|
||||||
{
|
|
||||||
HINSTANCE core_dll;
|
|
||||||
UnregisterFunc1Proc unregister_fct;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
core_dll = LoadLibrary(L"coredll.dll");
|
|
||||||
if (!core_dll)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
unregister_fct = (UnregisterFunc1Proc)GetProcAddress(core_dll, L"UnregisterFunc1");
|
|
||||||
if (!unregister_fct)
|
|
||||||
{
|
|
||||||
FreeLibrary(core_dll);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0xc1; i <= 0xcf; i++)
|
|
||||||
{
|
|
||||||
unregister_fct(MOD_WIN, i);
|
|
||||||
RegisterHotKey(window, i, MOD_WIN, i);
|
|
||||||
}
|
|
||||||
|
|
||||||
FreeLibrary(core_dll);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_wince_key_down(WPARAM wParam)
|
|
||||||
{
|
|
||||||
int key;
|
|
||||||
|
|
||||||
key = LOWORD(wParam);
|
|
||||||
|
|
||||||
if ((key == VK_SHIFT) ||
|
|
||||||
(key == VK_LSHIFT) ||
|
|
||||||
(key == VK_RSHIFT))
|
|
||||||
evas_key_modifier_on(evas, "Shift");
|
|
||||||
|
|
||||||
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_RETURN) || (key == VK_APP1))
|
|
||||||
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) || (key == VK_APP2))
|
|
||||||
evas_event_feed_key_down(evas, "Q", "Q", NULL, NULL, 0, NULL);
|
|
||||||
if ((key == 113) || (key == VK_APP3))
|
|
||||||
evas_event_feed_key_down(evas, "q", "q", NULL, NULL, 0, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_wince_key_up(WPARAM wParam)
|
|
||||||
{
|
|
||||||
int key;
|
|
||||||
|
|
||||||
key = LOWORD(wParam);
|
|
||||||
|
|
||||||
if ((key == VK_SHIFT) ||
|
|
||||||
(key == VK_LSHIFT) ||
|
|
||||||
(key == VK_RSHIFT))
|
|
||||||
evas_key_modifier_off(evas, "Shift");
|
|
||||||
if ((key == VK_RETURN) || (key == VK_APP1))
|
|
||||||
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) || (key == VK_APP2))
|
|
||||||
evas_event_feed_key_up(evas, "Q", "Q", NULL, NULL, 0, NULL);
|
|
||||||
if ((key == 113) || (key == VK_APP3))
|
|
||||||
evas_event_feed_key_up(evas, "q", "q", NULL, NULL, 0, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static LRESULT CALLBACK
|
|
||||||
MainWndProc(HWND hwnd,
|
|
||||||
UINT uMsg,
|
|
||||||
WPARAM wParam,
|
|
||||||
LPARAM lParam)
|
|
||||||
{
|
|
||||||
switch (uMsg)
|
|
||||||
{
|
|
||||||
case WM_DESTROY:
|
|
||||||
PostQuitMessage(0);
|
|
||||||
return 0;
|
|
||||||
case WM_CLOSE:
|
|
||||||
PostQuitMessage(0);
|
|
||||||
return 0;
|
|
||||||
case WM_PAINT:
|
|
||||||
ValidateRect(hwnd, NULL);
|
|
||||||
return 0;
|
|
||||||
case WM_HOTKEY:
|
|
||||||
_wince_key_down(wParam);
|
|
||||||
return 0;
|
|
||||||
case WM_KEYDOWN:
|
|
||||||
_wince_key_down(wParam);
|
|
||||||
return 0;
|
|
||||||
case WM_KEYUP:
|
|
||||||
_wince_key_up(wParam);
|
|
||||||
return 0;
|
|
||||||
case WM_KILLFOCUS:
|
|
||||||
if (_suspend)
|
|
||||||
_suspend (backend);
|
|
||||||
return 0;
|
|
||||||
case WM_SETFOCUS:
|
|
||||||
if (_resume)
|
|
||||||
_resume (backend);
|
|
||||||
return 0;
|
|
||||||
case WM_SIZE:
|
|
||||||
{
|
|
||||||
Evas_Engine_Info_Software_16_WinCE *einfo;
|
|
||||||
|
|
||||||
printf ("WM_SIZE %dx%d\n", LOWORD(lParam), HIWORD(lParam));
|
|
||||||
einfo = (Evas_Engine_Info_Software_16_WinCE *)evas_engine_info_get(evas);
|
|
||||||
if (!einfo)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (einfo->info.rotation != 0)
|
|
||||||
{
|
|
||||||
einfo->info.width = win_h;
|
|
||||||
einfo->info.height = win_w;
|
|
||||||
einfo->info.rotation = 90;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
einfo->info.width = win_w;
|
|
||||||
einfo->info.height = win_h;
|
|
||||||
einfo->info.rotation = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
evas_engine_info_set(evas, (Evas_Engine_Info *)einfo);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
return DefWindowProc(hwnd, uMsg, wParam, lParam);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Eina_Bool
|
|
||||||
engine_software_16_wince_args(const char *engine, int width, int height)
|
|
||||||
{
|
|
||||||
WNDCLASS wc;
|
|
||||||
RECT rect;
|
|
||||||
Evas_Engine_Info_Software_16_WinCE *einfo;
|
|
||||||
HWND task_bar;
|
|
||||||
HWND sip_window;
|
|
||||||
HWND sip_icon;
|
|
||||||
int stride_x;
|
|
||||||
int stride_y;
|
|
||||||
int bpp;
|
|
||||||
int format;
|
|
||||||
void *buffer;
|
|
||||||
int ok = 0;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (!strcmp(engine, "wince")) ok = 1;
|
|
||||||
if (!strcmp(engine, "wince-fb")) { ok = 1; backend = 1; }
|
|
||||||
if (!strcmp(engine, "wince-gapi")) { ok = 1; backend = 2; }
|
|
||||||
if (!strcmp(engine, "wince-ddraw")) { ok = 1; backend = 3; }
|
|
||||||
if (!strcmp(engine, "wince-gdi")) { ok = 1; backend = 4; }
|
|
||||||
if (!ok) return EINA_FALSE;
|
|
||||||
|
|
||||||
instance = GetModuleHandle(NULL);
|
|
||||||
if (!instance) return EINA_FALSE;
|
|
||||||
|
|
||||||
memset (&wc, 0, sizeof (wc));
|
|
||||||
wc.style = CS_HREDRAW | CS_VREDRAW;
|
|
||||||
wc.lpfnWndProc = MainWndProc;
|
|
||||||
wc.cbClsExtra = 0;
|
|
||||||
wc.cbWndExtra = 0;
|
|
||||||
wc.hInstance = instance;
|
|
||||||
wc.hIcon = NULL;
|
|
||||||
wc.hCursor = LoadCursor (NULL, IDC_ARROW);
|
|
||||||
wc.hbrBackground = GetSysColorBrush(COLOR_BTNFACE);
|
|
||||||
wc.lpszMenuName = NULL;
|
|
||||||
wc.lpszClassName = L"Evas_Software_16_WinCE_Test";
|
|
||||||
|
|
||||||
if(!RegisterClass(&wc))
|
|
||||||
goto free_library;
|
|
||||||
|
|
||||||
SetRect(&rect, 0, 0,
|
|
||||||
GetSystemMetrics(SM_CXSCREEN),
|
|
||||||
GetSystemMetrics(SM_CYSCREEN));
|
|
||||||
|
|
||||||
window = CreateWindowEx(WS_EX_TOPMOST,
|
|
||||||
L"Evas_Software_16_WinCE_Test",
|
|
||||||
L"Evas_Software_16_WinCE_Test",
|
|
||||||
WS_VISIBLE | WS_POPUP,
|
|
||||||
rect.left, rect.top,
|
|
||||||
rect.right - rect.left,
|
|
||||||
rect.bottom - rect.top,
|
|
||||||
NULL, NULL, instance, NULL);
|
|
||||||
if (!window)
|
|
||||||
goto unregister_class;
|
|
||||||
|
|
||||||
/* hide top level windows (Task bar, SIP and SIP button */
|
|
||||||
task_bar = FindWindow(L"HHTaskBar", NULL);
|
|
||||||
ShowWindow(task_bar, SW_HIDE);
|
|
||||||
EnableWindow(task_bar, FALSE);
|
|
||||||
sip_window = FindWindow(L"SipWndClass", NULL);
|
|
||||||
ShowWindow(sip_window, SW_HIDE);
|
|
||||||
EnableWindow(sip_window, FALSE);
|
|
||||||
sip_icon = FindWindow(L"MS_SIPBUTTON", NULL);
|
|
||||||
ShowWindow(sip_icon, SW_HIDE);
|
|
||||||
EnableWindow(sip_icon, FALSE);
|
|
||||||
|
|
||||||
if (!_wince_hardware_keys_register(window))
|
|
||||||
goto destroy_window;
|
|
||||||
|
|
||||||
evas_output_method_set(evas, evas_render_method_lookup("software_16_wince"));
|
|
||||||
|
|
||||||
einfo = (Evas_Engine_Info_Software_16_WinCE *)evas_engine_info_get(evas);
|
|
||||||
if (!einfo)
|
|
||||||
{
|
|
||||||
printf("Evas does not support the 16bit Software WinCE Engine\n");
|
|
||||||
goto destroy_window;
|
|
||||||
}
|
|
||||||
|
|
||||||
einfo->info.window = window;
|
|
||||||
einfo->info.width = width;
|
|
||||||
einfo->info.height = height;
|
|
||||||
einfo->info.backend = backend;
|
|
||||||
einfo->info.rotation = 0;
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
|
||||||
{
|
|
||||||
printf("Evas can not setup the informations of the 16 bits Software WinCE Engine\n");
|
|
||||||
goto destroy_window;
|
|
||||||
}
|
|
||||||
|
|
||||||
_suspend = einfo->func.suspend;
|
|
||||||
_resume = einfo->func.resume;
|
|
||||||
|
|
||||||
/* 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);
|
|
||||||
ShowWindow(task_bar, SW_SHOW);
|
|
||||||
EnableWindow(task_bar, TRUE);
|
|
||||||
ShowWindow(sip_window, SW_SHOW);
|
|
||||||
EnableWindow(sip_window, TRUE);
|
|
||||||
ShowWindow(sip_icon, SW_SHOW);
|
|
||||||
EnableWindow(sip_icon, TRUE);
|
|
||||||
unregister_class:
|
|
||||||
UnregisterClass(L"Evas_Software_16_WinCE_Test", instance);
|
|
||||||
free_library:
|
|
||||||
FreeLibrary(instance);
|
|
||||||
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_software_16_wince_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_16_wince_shutdown(void)
|
|
||||||
{
|
|
||||||
HWND task_bar;
|
|
||||||
HWND sip_window;
|
|
||||||
HWND sip_icon;
|
|
||||||
|
|
||||||
DestroyWindow(window);
|
|
||||||
|
|
||||||
/* show top level windows (Task bar, SIP and SIP button */
|
|
||||||
task_bar = FindWindow(L"HHTaskBar", NULL);
|
|
||||||
ShowWindow(task_bar, SW_SHOW);
|
|
||||||
EnableWindow(task_bar, TRUE);
|
|
||||||
sip_window = FindWindow(L"SipWndClass", NULL);
|
|
||||||
ShowWindow(sip_window, SW_SHOW);
|
|
||||||
EnableWindow(sip_window, TRUE);
|
|
||||||
sip_icon = FindWindow(L"MS_SIPBUTTON", NULL);
|
|
||||||
ShowWindow(sip_icon, SW_SHOW);
|
|
||||||
EnableWindow(sip_icon, TRUE);
|
|
||||||
|
|
||||||
UnregisterClass(L"Evas_Software_16_WinCE_Test", instance);
|
|
||||||
FreeLibrary(instance);
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
#ifndef __ENGINE_SOFTWARE_16_WINCE_H__
|
|
||||||
#define __ENGINE_SOFTWARE_16_WINCE_H__
|
|
||||||
|
|
||||||
|
|
||||||
Eina_Bool engine_software_16_wince_args(const char *engine, int width, int height);
|
|
||||||
void engine_software_16_wince_loop(void);
|
|
||||||
void engine_software_16_wince_shutdown(void);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __ENGINE_SOFTWARE_16_WINCE_H__ */
|
|
|
@ -1 +0,0 @@
|
||||||
HI_RES_AWARE CEUX {1}
|
|
|
@ -1,219 +0,0 @@
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Xutil.h>
|
|
||||||
#include <X11/Xatom.h>
|
|
||||||
#include <Evas_Engine_Software_16_X11.h>
|
|
||||||
|
|
||||||
static Display *disp = NULL;
|
|
||||||
static Window win = 0;
|
|
||||||
static int first_expose = 0;
|
|
||||||
|
|
||||||
Eina_Bool
|
|
||||||
engine_software_16_x11_args(const char *engine, int width, int height)
|
|
||||||
{
|
|
||||||
XSetWindowAttributes attr;
|
|
||||||
XClassHint chint;
|
|
||||||
XSizeHints szhints;
|
|
||||||
Evas_Engine_Info_Software_16_X11 *einfo;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
disp = XOpenDisplay(NULL);
|
|
||||||
if (!disp) return EINA_FALSE;
|
|
||||||
|
|
||||||
evas_output_method_set(evas, evas_render_method_lookup("software_16_x11"));
|
|
||||||
einfo = (Evas_Engine_Info_Software_16_X11 *)evas_engine_info_get(evas);
|
|
||||||
if (!einfo)
|
|
||||||
{
|
|
||||||
printf("Evas does not support the Software 16bit X11 Engine\n");
|
|
||||||
goto close_display;
|
|
||||||
}
|
|
||||||
|
|
||||||
einfo->info.display = disp;
|
|
||||||
attr.backing_store = NotUseful;
|
|
||||||
attr.colormap = DefaultColormap(disp, DefaultScreen(disp));
|
|
||||||
attr.border_pixel = 0;
|
|
||||||
attr.background_pixmap = None;
|
|
||||||
attr.event_mask =
|
|
||||||
ExposureMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
|
|
||||||
StructureNotifyMask | EnterWindowMask | LeaveWindowMask |
|
|
||||||
KeyPressMask | KeyReleaseMask;
|
|
||||||
attr.bit_gravity = ForgetGravity;
|
|
||||||
win = XCreateWindow(disp, DefaultRootWindow(disp),
|
|
||||||
0, 0, width, height, 0,
|
|
||||||
DefaultDepth(disp, DefaultScreen(disp)), InputOutput,
|
|
||||||
DefaultVisual(disp, DefaultScreen(disp)),
|
|
||||||
CWBackingStore | CWColormap |
|
|
||||||
CWBackPixmap | CWBorderPixel |
|
|
||||||
CWBitGravity | CWEventMask,
|
|
||||||
&attr);
|
|
||||||
if (!win)
|
|
||||||
goto close_display;
|
|
||||||
|
|
||||||
einfo->info.drawable = win;
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
|
||||||
{
|
|
||||||
printf("Evas can not setup the informations of the Software 16bit X11 Engine\n");
|
|
||||||
goto destroy_window;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
Atom prop = XInternAtom(disp, "_NET_WM_STATE", False);
|
|
||||||
Atom state = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False);
|
|
||||||
unsigned long data = state;
|
|
||||||
XChangeProperty(disp, win, prop, XA_ATOM, 32, PropModeReplace,
|
|
||||||
(unsigned char*) &data, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
XStoreName(disp, win, "Expedite - Evas Test Suite");
|
|
||||||
chint.res_name = "expedite";
|
|
||||||
chint.res_class = "Expedite";
|
|
||||||
XSetClassHint(disp, win, &chint);
|
|
||||||
szhints.flags = PMinSize | PMaxSize | PSize | USSize;
|
|
||||||
szhints.min_width = szhints.max_width = width;
|
|
||||||
szhints.min_height = szhints.max_height = height;
|
|
||||||
XSetWMNormalHints(disp, win, &szhints);
|
|
||||||
XMapWindow(disp, win);
|
|
||||||
XSync(disp, False);
|
|
||||||
while (!first_expose)
|
|
||||||
engine_software_16_x11_loop();
|
|
||||||
return EINA_TRUE;
|
|
||||||
|
|
||||||
destroy_window:
|
|
||||||
XDestroyWindow(disp, win);
|
|
||||||
close_display:
|
|
||||||
XCloseDisplay(disp);
|
|
||||||
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_software_16_x11_loop(void)
|
|
||||||
{
|
|
||||||
XEvent ev;
|
|
||||||
KeySym ks;
|
|
||||||
char *kstr;
|
|
||||||
|
|
||||||
again:
|
|
||||||
if (!XCheckMaskEvent(disp,
|
|
||||||
ExposureMask |
|
|
||||||
StructureNotifyMask |
|
|
||||||
KeyPressMask |
|
|
||||||
KeyReleaseMask |
|
|
||||||
ButtonPressMask |
|
|
||||||
ButtonReleaseMask |
|
|
||||||
PointerMotionMask |
|
|
||||||
EnterWindowMask |
|
|
||||||
LeaveWindowMask, &ev))
|
|
||||||
return;
|
|
||||||
switch (ev.type)
|
|
||||||
{
|
|
||||||
case ButtonPress:
|
|
||||||
evas_event_feed_mouse_move(evas, ev.xbutton.x, ev.xbutton.y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_down(evas, ev.xbutton.button, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
case ButtonRelease:
|
|
||||||
evas_event_feed_mouse_move(evas, ev.xbutton.x, ev.xbutton.y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_up(evas, ev.xbutton.button, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
case MotionNotify:
|
|
||||||
evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL);
|
|
||||||
break;
|
|
||||||
case Expose:
|
|
||||||
first_expose = 1;
|
|
||||||
evas_damage_rectangle_add(evas,
|
|
||||||
ev.xexpose.x,
|
|
||||||
ev.xexpose.y,
|
|
||||||
ev.xexpose.width,
|
|
||||||
ev.xexpose.height);
|
|
||||||
break;
|
|
||||||
case ConfigureNotify:
|
|
||||||
evas_output_viewport_set(evas, 0, 0,
|
|
||||||
ev.xconfigure.width,
|
|
||||||
ev.xconfigure.height);
|
|
||||||
evas_output_size_set(evas,
|
|
||||||
ev.xconfigure.width,
|
|
||||||
ev.xconfigure.height);
|
|
||||||
win_w = ev.xconfigure.width;
|
|
||||||
win_h = ev.xconfigure.height;
|
|
||||||
break;
|
|
||||||
case EnterNotify:
|
|
||||||
evas_event_feed_mouse_in(evas, 0, NULL);
|
|
||||||
break;
|
|
||||||
case LeaveNotify:
|
|
||||||
evas_event_feed_mouse_out(evas, 0, NULL);
|
|
||||||
break;
|
|
||||||
case KeyPress:
|
|
||||||
ks = XKeycodeToKeysym(ev.xkey.display, ev.xkey.keycode, 0);
|
|
||||||
kstr = XKeysymToString(ks);
|
|
||||||
if (kstr)
|
|
||||||
{
|
|
||||||
if ((!strcmp(kstr, "Shift_L")) ||
|
|
||||||
(!strcmp(kstr, "Shift_R")))
|
|
||||||
evas_key_modifier_on(evas, "Shift");
|
|
||||||
if ((!strcmp(kstr, "Control_L")) ||
|
|
||||||
(!strcmp(kstr, "Control_R")))
|
|
||||||
evas_key_modifier_on(evas, "Control");
|
|
||||||
if ((!strcmp(kstr, "Alt_L")) ||
|
|
||||||
(!strcmp(kstr, "Alt_R")))
|
|
||||||
evas_key_modifier_on(evas, "Alt");
|
|
||||||
if ((!strcmp(kstr, "Super_L")) ||
|
|
||||||
(!strcmp(kstr, "Super_R")))
|
|
||||||
evas_key_modifier_on(evas, "Super");
|
|
||||||
if (!strcmp(kstr, "Caps_Lock"))
|
|
||||||
{
|
|
||||||
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 (!strcmp(kstr, "Num_Lock"))
|
|
||||||
{
|
|
||||||
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 (!strcmp(kstr, "Scroll_Lock"))
|
|
||||||
{
|
|
||||||
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 (kstr) evas_event_feed_key_down(evas, kstr, kstr, NULL, NULL, 0, NULL);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case KeyRelease:
|
|
||||||
ks = XKeycodeToKeysym(ev.xkey.display, ev.xkey.keycode, 0);
|
|
||||||
kstr = XKeysymToString(ks);
|
|
||||||
if (kstr)
|
|
||||||
{
|
|
||||||
if ((!strcmp(kstr, "Shift_L")) ||
|
|
||||||
(!strcmp(kstr, "Shift_R")))
|
|
||||||
evas_key_modifier_off(evas, "Shift");
|
|
||||||
if ((!strcmp(kstr, "Control_L")) ||
|
|
||||||
(!strcmp(kstr, "Control_R")))
|
|
||||||
evas_key_modifier_off(evas, "Control");
|
|
||||||
if ((!strcmp(kstr, "Alt_L")) ||
|
|
||||||
(!strcmp(kstr, "Alt_R")))
|
|
||||||
evas_key_modifier_off(evas, "Alt");
|
|
||||||
if ((!strcmp(kstr, "Super_L")) ||
|
|
||||||
(!strcmp(kstr, "Super_R")))
|
|
||||||
evas_key_modifier_off(evas, "Super");
|
|
||||||
evas_event_feed_key_up(evas, kstr, kstr, NULL, NULL, 0, NULL);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
goto again;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_software_16_x11_shutdown(void)
|
|
||||||
{
|
|
||||||
XDestroyWindow(disp, win);
|
|
||||||
XCloseDisplay(disp);
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
#ifndef ENGINE_SOFTWARE_16_X11_H
|
|
||||||
#define ENGINE_SOFTWARE_16_X11_H
|
|
||||||
|
|
||||||
Eina_Bool engine_software_16_x11_args(const char *engine, int width, int height);
|
|
||||||
void engine_software_16_x11_loop(void);
|
|
||||||
void engine_software_16_x11_shutdown(void);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -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 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("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,19 +0,0 @@
|
||||||
#ifndef __ENGINE_SOFTWARE_DDRAW_H__
|
|
||||||
#define __ENGINE_SOFTWARE_DDRAW_H__
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Eina_Bool engine_software_ddraw_args(const char *engine, int width, int height);
|
|
||||||
void engine_software_ddraw_loop(void);
|
|
||||||
void engine_software_ddraw_shutdown(void);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __ENGINE_SOFTWARE_DDRAW_H__ */
|
|
|
@ -1,293 +0,0 @@
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <windowsx.h>
|
|
||||||
#include <Evas_Engine_Software_Gdi.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_gdi_args(const char *engine __UNUSED__, int width, int height)
|
|
||||||
{
|
|
||||||
WNDCLASS wc;
|
|
||||||
RECT rect;
|
|
||||||
HDC dc;
|
|
||||||
Evas_Engine_Info_Software_Gdi *einfo;
|
|
||||||
DWORD style;
|
|
||||||
DWORD exstyle;
|
|
||||||
int depth;
|
|
||||||
|
|
||||||
instance = GetModuleHandle(NULL);
|
|
||||||
if (!instance) return EINA_FALSE;
|
|
||||||
|
|
||||||
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_Gdi_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_Gdi_Test",
|
|
||||||
"Evas_Software_Gdi_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 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("software_gdi"));
|
|
||||||
einfo = (Evas_Engine_Info_Software_Gdi *)evas_engine_info_get(evas);
|
|
||||||
if (!einfo)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "Evas does not support the Software GDI Engine\n");
|
|
||||||
goto destroy_window;
|
|
||||||
}
|
|
||||||
|
|
||||||
einfo->info.window = window;
|
|
||||||
einfo->info.depth = depth;
|
|
||||||
einfo->info.rotation = 0;
|
|
||||||
einfo->info.borderless = 0;
|
|
||||||
einfo->info.fullscreen = 0;
|
|
||||||
einfo->info.region = 0;
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
|
||||||
{
|
|
||||||
printf("Evas can not setup the informations of the Software GDI 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_Software_Gdi_Test", instance);
|
|
||||||
free_library:
|
|
||||||
FreeLibrary(instance);
|
|
||||||
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_software_gdi_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_gdi_shutdown(void)
|
|
||||||
{
|
|
||||||
DestroyWindow(window);
|
|
||||||
UnregisterClass("Evas_Software_Gdi_Test", instance);
|
|
||||||
FreeLibrary(instance);
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
#ifndef __ENGINE_SOFTWARE_GDI_H__
|
|
||||||
#define __ENGINE_SOFTWARE_GDI_H__
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Eina_Bool engine_software_gdi_args(const char *engine, int width, int height);
|
|
||||||
void engine_software_gdi_loop(void);
|
|
||||||
void engine_software_gdi_shutdown(void);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __ENGINE_SOFTWARE_GDI_H__ */
|
|
|
@ -1,178 +0,0 @@
|
||||||
#include <assert.h>
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <SDL/SDL.h>
|
|
||||||
#include <Evas_Engine_SDL.h>
|
|
||||||
|
|
||||||
Eina_Bool
|
|
||||||
engine_software_sdl_args(const char *engine, int width, int height)
|
|
||||||
{
|
|
||||||
Evas_Engine_Info_SDL *einfo;
|
|
||||||
int i;
|
|
||||||
int ok = 0;
|
|
||||||
|
|
||||||
if (!strcmp(engine, "sdl")) ok = 1;
|
|
||||||
if (!strcmp(engine, "sdl-16")) ok = 2;
|
|
||||||
if (!ok) return EINA_FALSE;
|
|
||||||
|
|
||||||
if (ok == 1)
|
|
||||||
evas_output_method_set(evas, evas_render_method_lookup("software_sdl"));
|
|
||||||
else
|
|
||||||
evas_output_method_set(evas, evas_render_method_lookup("software_16_sdl"));
|
|
||||||
|
|
||||||
einfo = (Evas_Engine_Info_SDL *) evas_engine_info_get(evas);
|
|
||||||
|
|
||||||
/* the following is specific to the engine */
|
|
||||||
einfo->info.fullscreen = fullscreen;
|
|
||||||
einfo->info.noframe = 0;
|
|
||||||
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
|
||||||
{
|
|
||||||
printf("Evas can not setup the informations of the Software SDL Engine\n");
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return EINA_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_software_sdl_loop(void)
|
|
||||||
{
|
|
||||||
SDL_Event event;
|
|
||||||
|
|
||||||
while(SDL_PollEvent(&event))
|
|
||||||
{
|
|
||||||
switch(event.type)
|
|
||||||
{
|
|
||||||
case SDL_MOUSEMOTION:
|
|
||||||
evas_event_feed_mouse_move(evas, event.motion.x, event.motion.y, 0, NULL);
|
|
||||||
break;
|
|
||||||
case SDL_MOUSEBUTTONDOWN:
|
|
||||||
evas_event_feed_mouse_move(evas, event.button.x, event.button.y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_down(evas, event.button.button, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
case SDL_MOUSEBUTTONUP:
|
|
||||||
evas_event_feed_mouse_move(evas, event.button.x, event.button.y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_up(evas, event.button.button, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
case SDL_VIDEORESIZE:
|
|
||||||
evas_output_viewport_set(evas, 0, 0,
|
|
||||||
event.resize.w, event.resize.w);
|
|
||||||
evas_output_size_set(evas, event.resize.w, event.resize.w);
|
|
||||||
evas_output_size_get(evas, &win_w, &win_h);
|
|
||||||
break;
|
|
||||||
case SDL_VIDEOEXPOSE:
|
|
||||||
evas_output_size_get(evas, &win_w, &win_h);
|
|
||||||
evas_damage_rectangle_add(evas, 0, 0, win_w, win_h);
|
|
||||||
break;
|
|
||||||
case SDL_KEYDOWN:
|
|
||||||
switch (event.key.keysym.sym)
|
|
||||||
{
|
|
||||||
case SDLK_LSHIFT:
|
|
||||||
case SDLK_RSHIFT:
|
|
||||||
evas_key_modifier_on(evas, "Shift");
|
|
||||||
break;
|
|
||||||
case SDLK_RCTRL:
|
|
||||||
case SDLK_LCTRL:
|
|
||||||
evas_key_modifier_on(evas, "Control");
|
|
||||||
break;
|
|
||||||
case SDLK_MENU:
|
|
||||||
case SDLK_RALT:
|
|
||||||
case SDLK_LALT:
|
|
||||||
evas_key_modifier_on(evas, "Alt");
|
|
||||||
break;
|
|
||||||
case SDLK_LSUPER:
|
|
||||||
case SDLK_RSUPER:
|
|
||||||
evas_key_modifier_on(evas, "Super");
|
|
||||||
break;
|
|
||||||
case SDLK_CAPSLOCK:
|
|
||||||
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");
|
|
||||||
break;
|
|
||||||
case SDLK_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");
|
|
||||||
break;
|
|
||||||
case SDLK_SCROLLOCK:
|
|
||||||
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");
|
|
||||||
break;
|
|
||||||
case SDLK_s:
|
|
||||||
case SDLK_ESCAPE:
|
|
||||||
evas_event_feed_key_down(evas, "Escape", "Escape", NULL, NULL, 0, NULL);
|
|
||||||
break;
|
|
||||||
case SDLK_KP_ENTER:
|
|
||||||
case SDLK_RETURN:
|
|
||||||
evas_event_feed_key_down(evas, "Return", "Return", NULL, NULL, 0, NULL);
|
|
||||||
break;
|
|
||||||
case SDLK_LEFT: evas_event_feed_key_down(evas, "Left", "Left", NULL, NULL, 0, NULL); break;
|
|
||||||
case SDLK_RIGHT: evas_event_feed_key_down(evas, "Right", "Right", NULL, NULL, 0, NULL); break;
|
|
||||||
case SDLK_q:
|
|
||||||
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock"))
|
|
||||||
evas_event_feed_key_down(evas, "Q", "Q", NULL, NULL, 0, NULL);
|
|
||||||
else
|
|
||||||
evas_event_feed_key_down(evas, "q", "q", NULL, NULL, 0, NULL);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case SDL_KEYUP:
|
|
||||||
switch (event.key.keysym.sym)
|
|
||||||
{
|
|
||||||
case SDLK_LSHIFT:
|
|
||||||
case SDLK_RSHIFT:
|
|
||||||
evas_key_modifier_off(evas, "Shift");
|
|
||||||
break;
|
|
||||||
case SDLK_RCTRL:
|
|
||||||
case SDLK_LCTRL:
|
|
||||||
evas_key_modifier_off(evas, "Control");
|
|
||||||
break;
|
|
||||||
case SDLK_MENU:
|
|
||||||
case SDLK_RALT:
|
|
||||||
case SDLK_LALT:
|
|
||||||
evas_key_modifier_off(evas, "Alt");
|
|
||||||
break;
|
|
||||||
case SDLK_LSUPER:
|
|
||||||
case SDLK_RSUPER:
|
|
||||||
evas_key_modifier_off(evas, "Super");
|
|
||||||
break;
|
|
||||||
case SDLK_ESCAPE: evas_event_feed_key_up(evas, "Escape", "Escape", NULL, NULL, 0, NULL); break;
|
|
||||||
case SDLK_RETURN: evas_event_feed_key_up(evas, "Return", "Return", NULL, NULL, 0, NULL); break;
|
|
||||||
case SDLK_LEFT: evas_event_feed_key_up(evas, "Left", "Left", NULL, NULL, 0, NULL); break;
|
|
||||||
case SDLK_RIGHT: evas_event_feed_key_up(evas, "Right", "Right", NULL, NULL, 0, NULL); break;
|
|
||||||
case SDLK_q:
|
|
||||||
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock"))
|
|
||||||
evas_event_feed_key_up(evas, "Q", "Q", NULL, NULL, 0, NULL);
|
|
||||||
else
|
|
||||||
evas_event_feed_key_up(evas, "q", "q", NULL, NULL, 0, NULL);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case SDL_QUIT:
|
|
||||||
case SDL_SYSWMEVENT:
|
|
||||||
case SDL_USEREVENT:
|
|
||||||
case SDL_ACTIVEEVENT:
|
|
||||||
case SDL_JOYAXISMOTION:
|
|
||||||
case SDL_JOYBALLMOTION:
|
|
||||||
case SDL_JOYHATMOTION:
|
|
||||||
case SDL_JOYBUTTONDOWN:
|
|
||||||
case SDL_JOYBUTTONUP:
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_software_sdl_shutdown(void)
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
#ifndef ENGINE_SOFTWARE_SDL_H
|
|
||||||
#define ENGINE_SOFTWARE_SDL_H
|
|
||||||
|
|
||||||
Eina_Bool engine_software_sdl_args(const char *engine, int width, int height);
|
|
||||||
void engine_software_sdl_loop(void);
|
|
||||||
void engine_software_sdl_shutdown(void);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,399 +0,0 @@
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <xcb/xcb.h>
|
|
||||||
#include <xcb/xcb_keysyms.h>
|
|
||||||
#include <Evas_Engine_Software_X11.h>
|
|
||||||
|
|
||||||
#define XK_MISCELLANY
|
|
||||||
#include <X11/keysymdef.h>
|
|
||||||
|
|
||||||
enum {
|
|
||||||
XCB_SIZE_US_POSITION_HINT = 1 << 0,
|
|
||||||
XCB_SIZE_US_SIZE_HINT = 1 << 1,
|
|
||||||
XCB_SIZE_P_POSITION_HINT = 1 << 2,
|
|
||||||
XCB_SIZE_P_SIZE_HINT = 1 << 3,
|
|
||||||
XCB_SIZE_P_MIN_SIZE_HINT = 1 << 4,
|
|
||||||
XCB_SIZE_P_MAX_SIZE_HINT = 1 << 5,
|
|
||||||
XCB_SIZE_P_RESIZE_INC_HINT = 1 << 6,
|
|
||||||
XCB_SIZE_P_ASPECT_HINT = 1 << 7,
|
|
||||||
XCB_SIZE_BASE_SIZE_HINT = 1 << 8,
|
|
||||||
XCB_SIZE_P_WIN_GRAVITY_HINT = 1 << 9
|
|
||||||
};
|
|
||||||
|
|
||||||
struct xcb_size_hints_t {
|
|
||||||
uint32_t flags;
|
|
||||||
int32_t x, y, width, height;
|
|
||||||
int32_t min_width, min_height;
|
|
||||||
int32_t max_width, max_height;
|
|
||||||
int32_t width_inc, height_inc;
|
|
||||||
int32_t min_aspect_num, min_aspect_den;
|
|
||||||
int32_t max_aspect_num, max_aspect_den;
|
|
||||||
int32_t base_width, base_height;
|
|
||||||
uint32_t win_gravity;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static xcb_connection_t *conn = NULL;
|
|
||||||
static xcb_screen_t *screen = NULL;
|
|
||||||
static xcb_window_t win = 0;
|
|
||||||
static int first_expose = 0;
|
|
||||||
|
|
||||||
Eina_Bool
|
|
||||||
engine_software_xcb_args(const char *engine, int width, int height)
|
|
||||||
{
|
|
||||||
struct xcb_size_hints_t hints;
|
|
||||||
uint32_t value_list[6];
|
|
||||||
xcb_screen_iterator_t iter;
|
|
||||||
Evas_Engine_Info_Software_X11 *einfo;
|
|
||||||
xcb_intern_atom_reply_t *reply;
|
|
||||||
const char *str;
|
|
||||||
xcb_intern_atom_cookie_t cookie1;
|
|
||||||
xcb_intern_atom_cookie_t cookie2;
|
|
||||||
xcb_intern_atom_cookie_t cookie3;
|
|
||||||
xcb_intern_atom_cookie_t cookie4;
|
|
||||||
xcb_intern_atom_cookie_t cookie5;
|
|
||||||
xcb_atom_t string;
|
|
||||||
xcb_atom_t wm_name;
|
|
||||||
xcb_atom_t wm_class;
|
|
||||||
xcb_atom_t wm_normal_hint;
|
|
||||||
xcb_atom_t wm_size_hint;
|
|
||||||
uint32_t value_mask;
|
|
||||||
int s;
|
|
||||||
int s_tmp;
|
|
||||||
int l1;
|
|
||||||
int l2;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
conn = xcb_connect(NULL, &s);
|
|
||||||
if (xcb_connection_has_error(conn)) return EINA_FALSE;
|
|
||||||
|
|
||||||
cookie1 = xcb_intern_atom_unchecked(conn, 0, strlen("STRING"), "STRING");
|
|
||||||
cookie2 = xcb_intern_atom_unchecked(conn, 0, strlen("WM_NAME"), "WM_NAME");
|
|
||||||
cookie3 = xcb_intern_atom_unchecked(conn, 0, strlen("WM_CLASS"), "WM_CLASS");
|
|
||||||
cookie4 = xcb_intern_atom_unchecked(conn, 0, strlen("WM_NORMAL_HINTS)"), "WM_NORMAL_HINTS)");
|
|
||||||
cookie5 = xcb_intern_atom_unchecked(conn, 0, strlen("WM_SIZE_HINTS)"), "WM_SIZE_HINTS)");
|
|
||||||
|
|
||||||
s_tmp = s;
|
|
||||||
iter = xcb_setup_roots_iterator(xcb_get_setup(conn));
|
|
||||||
for (; iter.rem; --s_tmp, xcb_screen_next (&iter))
|
|
||||||
if (s_tmp == 0)
|
|
||||||
{
|
|
||||||
screen = iter.data;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
evas_output_method_set(evas, evas_render_method_lookup("software_x11"));
|
|
||||||
einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas);
|
|
||||||
if (!einfo)
|
|
||||||
{
|
|
||||||
printf("Evas does not support the Software XCB Engine\n");
|
|
||||||
goto close_connection;
|
|
||||||
}
|
|
||||||
|
|
||||||
einfo->info.backend = EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XCB;
|
|
||||||
einfo->info.connection = conn;
|
|
||||||
einfo->info.screen = screen;
|
|
||||||
einfo->info.visual = einfo->func.best_visual_get(1, conn, s);
|
|
||||||
einfo->info.colormap = einfo->func.best_colormap_get(1, conn, s);
|
|
||||||
einfo->info.depth = einfo->func.best_depth_get(1, conn, s);
|
|
||||||
einfo->info.rotation = 0;
|
|
||||||
einfo->info.debug = 0;
|
|
||||||
|
|
||||||
value_mask =
|
|
||||||
XCB_CW_BACK_PIXMAP | XCB_CW_BORDER_PIXEL | XCB_CW_BIT_GRAVITY |
|
|
||||||
XCB_CW_BACKING_STORE | XCB_CW_EVENT_MASK | XCB_CW_COLORMAP;
|
|
||||||
|
|
||||||
value_list[0] = XCB_NONE;
|
|
||||||
value_list[1] = 0;
|
|
||||||
value_list[2] = XCB_GRAVITY_BIT_FORGET;
|
|
||||||
value_list[3] = XCB_BACKING_STORE_NOT_USEFUL;
|
|
||||||
value_list[4] =
|
|
||||||
XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE |
|
|
||||||
XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE |
|
|
||||||
XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW |
|
|
||||||
XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_EXPOSURE |
|
|
||||||
XCB_EVENT_MASK_STRUCTURE_NOTIFY;
|
|
||||||
value_list[5] = einfo->info.colormap;
|
|
||||||
|
|
||||||
win = xcb_generate_id(conn);
|
|
||||||
if (!win)
|
|
||||||
goto close_connection;
|
|
||||||
xcb_create_window(conn,
|
|
||||||
einfo->info.depth,
|
|
||||||
win, screen->root, 0, 0, width, height, 0,
|
|
||||||
XCB_WINDOW_CLASS_INPUT_OUTPUT,
|
|
||||||
((xcb_visualtype_t *)einfo->info.visual)->visual_id,
|
|
||||||
value_mask,
|
|
||||||
value_list);
|
|
||||||
einfo->info.drawable = win;
|
|
||||||
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
|
||||||
{
|
|
||||||
printf("Evas can not setup the informations of the Software XCB Engine\n");
|
|
||||||
goto destroy_window;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
xcb_intern_atom_cookie_t cookie1;
|
|
||||||
xcb_intern_atom_cookie_t cookie2;
|
|
||||||
xcb_intern_atom_reply_t *reply;
|
|
||||||
xcb_atom_t prop;
|
|
||||||
xcb_atom_t type;
|
|
||||||
xcb_atom_t state;
|
|
||||||
|
|
||||||
cookie1 = xcb_intern_atom_unchecked(conn, 0, strlen("_NET_WM_STATE"), "_NET_WM_STATE");
|
|
||||||
cookie2 = xcb_intern_atom_unchecked(conn, 0, strlen("_NET_WM_STATE_FULLSCREEN"), "_NET_WM_STATE_FULLSCREEN");
|
|
||||||
reply = xcb_intern_atom_reply(conn, cookie1, NULL);
|
|
||||||
prop = reply->atom;
|
|
||||||
free(reply);
|
|
||||||
reply = xcb_intern_atom_reply(conn, cookie2, NULL);
|
|
||||||
state = reply->atom;
|
|
||||||
free(reply);
|
|
||||||
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win, prop, XCB_ATOM_ATOM, 32, 1, (const void *)&state);
|
|
||||||
}
|
|
||||||
|
|
||||||
str = "expedite\0Expedite";
|
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
|
||||||
hints.flags = XCB_SIZE_US_SIZE_HINT | XCB_SIZE_P_SIZE_HINT | XCB_SIZE_P_MIN_SIZE_HINT | XCB_SIZE_P_MAX_SIZE_HINT;
|
|
||||||
hints.min_width = width;
|
|
||||||
hints.max_width = width;
|
|
||||||
hints.min_height = height;
|
|
||||||
hints.max_height = height;
|
|
||||||
|
|
||||||
reply = xcb_intern_atom_reply(conn, cookie1, NULL);
|
|
||||||
string = reply->atom;
|
|
||||||
free(reply);
|
|
||||||
|
|
||||||
reply = xcb_intern_atom_reply(conn, cookie2, NULL);
|
|
||||||
wm_name = reply->atom;
|
|
||||||
free(reply);
|
|
||||||
|
|
||||||
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win,
|
|
||||||
wm_name, string, 8,
|
|
||||||
strlen("Expedite - Evas Test Suite"), "Expedite - Evas Test Suite");
|
|
||||||
|
|
||||||
reply = xcb_intern_atom_reply(conn, cookie3, NULL);
|
|
||||||
wm_class = reply->atom;
|
|
||||||
free(reply);
|
|
||||||
|
|
||||||
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win,
|
|
||||||
wm_class, string, 8,
|
|
||||||
l1 + l2 + 1, str);
|
|
||||||
|
|
||||||
reply = xcb_intern_atom_reply(conn, cookie4, NULL);
|
|
||||||
wm_normal_hint = reply->atom;
|
|
||||||
free(reply);
|
|
||||||
|
|
||||||
reply = xcb_intern_atom_reply(conn, cookie5, NULL);
|
|
||||||
wm_size_hint = reply->atom;
|
|
||||||
free(reply);
|
|
||||||
|
|
||||||
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win,
|
|
||||||
wm_normal_hint, wm_size_hint, 32,
|
|
||||||
sizeof(hints) / 4, &hints);
|
|
||||||
|
|
||||||
xcb_map_window(conn, win);
|
|
||||||
|
|
||||||
free(xcb_get_input_focus_reply(conn, xcb_get_input_focus_unchecked(conn), NULL));
|
|
||||||
|
|
||||||
while (!first_expose)
|
|
||||||
engine_software_xcb_loop();
|
|
||||||
return EINA_TRUE;
|
|
||||||
|
|
||||||
destroy_window:
|
|
||||||
xcb_destroy_window(conn, win);
|
|
||||||
close_connection:
|
|
||||||
free(xcb_intern_atom_reply(conn, cookie1, NULL));
|
|
||||||
free(xcb_intern_atom_reply(conn, cookie2, NULL));
|
|
||||||
free(xcb_intern_atom_reply(conn, cookie3, NULL));
|
|
||||||
free(xcb_intern_atom_reply(conn, cookie4, NULL));
|
|
||||||
free(xcb_intern_atom_reply(conn, cookie5, NULL));
|
|
||||||
xcb_disconnect(conn);
|
|
||||||
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_software_xcb_loop(void)
|
|
||||||
{
|
|
||||||
xcb_generic_event_t *ev;
|
|
||||||
|
|
||||||
again:
|
|
||||||
ev = xcb_poll_for_event(conn);
|
|
||||||
if (!ev)
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (ev->response_type)
|
|
||||||
{
|
|
||||||
case XCB_BUTTON_PRESS:
|
|
||||||
{
|
|
||||||
xcb_button_press_event_t *e;
|
|
||||||
|
|
||||||
e = (xcb_button_press_event_t *)ev;
|
|
||||||
|
|
||||||
evas_event_feed_mouse_move(evas, e->event_x, e->event_y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_down(evas, e->detail, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XCB_BUTTON_RELEASE:
|
|
||||||
{
|
|
||||||
xcb_button_release_event_t *e;
|
|
||||||
|
|
||||||
e = (xcb_button_release_event_t *)ev;
|
|
||||||
|
|
||||||
evas_event_feed_mouse_move(evas, e->event_x, e->event_y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_up(evas, e->detail, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XCB_MOTION_NOTIFY:
|
|
||||||
{
|
|
||||||
xcb_motion_notify_event_t *e;
|
|
||||||
|
|
||||||
e = (xcb_motion_notify_event_t *)ev;
|
|
||||||
|
|
||||||
evas_event_feed_mouse_move(evas, e->event_x, e->event_y, 0, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XCB_EXPOSE:
|
|
||||||
{
|
|
||||||
xcb_expose_event_t *e;
|
|
||||||
|
|
||||||
e = (xcb_expose_event_t *)ev;
|
|
||||||
|
|
||||||
first_expose = 1;
|
|
||||||
evas_damage_rectangle_add(evas,
|
|
||||||
e->x,
|
|
||||||
e->y,
|
|
||||||
e->width,
|
|
||||||
e->height);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XCB_CONFIGURE_NOTIFY:
|
|
||||||
{
|
|
||||||
xcb_configure_notify_event_t *e;
|
|
||||||
|
|
||||||
e = (xcb_configure_notify_event_t *)ev;
|
|
||||||
|
|
||||||
evas_output_viewport_set(evas, 0, 0,
|
|
||||||
e->width,
|
|
||||||
e->height);
|
|
||||||
evas_output_size_set(evas,
|
|
||||||
e->width,
|
|
||||||
e->height);
|
|
||||||
win_w = e->width;
|
|
||||||
win_h = e->height;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XCB_ENTER_NOTIFY:
|
|
||||||
evas_event_feed_mouse_in(evas, 0, NULL);
|
|
||||||
break;
|
|
||||||
case XCB_LEAVE_NOTIFY:
|
|
||||||
evas_event_feed_mouse_out(evas, 0, NULL);
|
|
||||||
break;
|
|
||||||
case XCB_KEY_PRESS:
|
|
||||||
{
|
|
||||||
xcb_key_press_event_t *e;
|
|
||||||
xcb_key_symbols_t *kss;
|
|
||||||
xcb_keysym_t ks;
|
|
||||||
char *str = "";
|
|
||||||
|
|
||||||
e = (xcb_key_press_event_t *)ev;
|
|
||||||
|
|
||||||
kss = xcb_key_symbols_alloc(conn);
|
|
||||||
|
|
||||||
ks = xcb_key_symbols_get_keysym(kss, e->detail, 0);
|
|
||||||
|
|
||||||
if ((ks == XK_Shift_L) || (ks == XK_Shift_R))
|
|
||||||
evas_key_modifier_on(evas, "Shift");
|
|
||||||
else if ((ks == XK_Control_L) || (ks == XK_Control_R))
|
|
||||||
evas_key_modifier_on(evas, "Control");
|
|
||||||
else if ((ks == XK_Alt_L) || (ks == XK_Alt_R))
|
|
||||||
evas_key_modifier_on(evas, "Alt");
|
|
||||||
else if ((ks == XK_Super_L) || (ks == XK_Super_R))
|
|
||||||
evas_key_modifier_on(evas, "Super");
|
|
||||||
else if (ks == XK_Caps_Lock)
|
|
||||||
{
|
|
||||||
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");
|
|
||||||
}
|
|
||||||
else if (ks == XK_Scroll_Lock)
|
|
||||||
{
|
|
||||||
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 (ks == XK_Left)
|
|
||||||
str = "Left";
|
|
||||||
if (ks == XK_Right)
|
|
||||||
str = "Right";
|
|
||||||
if (ks == XK_Escape)
|
|
||||||
str = "Escape";
|
|
||||||
if (ks == XK_Return)
|
|
||||||
str = "Return";
|
|
||||||
if (ks == 113)
|
|
||||||
str = "q";
|
|
||||||
|
|
||||||
evas_event_feed_key_down(evas, str, str, NULL, NULL, 0, NULL);
|
|
||||||
|
|
||||||
xcb_key_symbols_free(kss);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XCB_KEY_RELEASE:
|
|
||||||
{
|
|
||||||
xcb_key_release_event_t *e;
|
|
||||||
xcb_key_symbols_t *kss;
|
|
||||||
xcb_keysym_t ks;
|
|
||||||
char *str = "";
|
|
||||||
|
|
||||||
e = (xcb_key_release_event_t *)ev;
|
|
||||||
|
|
||||||
kss = xcb_key_symbols_alloc(conn);
|
|
||||||
|
|
||||||
ks = xcb_key_symbols_get_keysym(kss, e->detail, 0);
|
|
||||||
|
|
||||||
if ((ks == XK_Shift_L) || (ks == XK_Shift_R))
|
|
||||||
evas_key_modifier_on(evas, "Shift");
|
|
||||||
else if ((ks == XK_Control_L) || (ks == XK_Control_R))
|
|
||||||
evas_key_modifier_on(evas, "Control");
|
|
||||||
else if ((ks == XK_Alt_L) || (ks == XK_Alt_R))
|
|
||||||
evas_key_modifier_on(evas, "Alt");
|
|
||||||
else if ((ks == XK_Super_L) || (ks == XK_Super_R))
|
|
||||||
evas_key_modifier_on(evas, "Super");
|
|
||||||
|
|
||||||
if (ks == XK_Left)
|
|
||||||
str = "Left";
|
|
||||||
if (ks == XK_Right)
|
|
||||||
str = "Right";
|
|
||||||
if (ks == XK_Escape)
|
|
||||||
str = "Escape";
|
|
||||||
if (ks == XK_Return)
|
|
||||||
str = "Return";
|
|
||||||
if (ks == 113)
|
|
||||||
str = "q";
|
|
||||||
|
|
||||||
evas_event_feed_key_up(evas, str, str, NULL, NULL, 0, NULL);
|
|
||||||
|
|
||||||
xcb_key_symbols_free(kss);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
free(ev);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
free(ev);
|
|
||||||
|
|
||||||
goto again;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_software_xcb_shutdown(void)
|
|
||||||
{
|
|
||||||
xcb_destroy_window(conn, win);
|
|
||||||
xcb_disconnect(conn);
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
#ifndef ENGINE_SOFTWARE_XCB_H
|
|
||||||
#define ENGINE_SOFTWARE_XCB_H
|
|
||||||
|
|
||||||
Eina_Bool engine_software_xcb_args(const char *engine, int width, int height);
|
|
||||||
void engine_software_xcb_loop(void);
|
|
||||||
void engine_software_xcb_shutdown(void);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,236 +0,0 @@
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Xutil.h>
|
|
||||||
#include <X11/Xatom.h>
|
|
||||||
#include <Evas_Engine_Software_X11.h>
|
|
||||||
|
|
||||||
static Display *disp = NULL;
|
|
||||||
static Window win = 0;
|
|
||||||
static int first_expose = 0;
|
|
||||||
|
|
||||||
Eina_Bool
|
|
||||||
engine_software_xlib_args(const char *engine, int width, int height)
|
|
||||||
{
|
|
||||||
XSetWindowAttributes attr;
|
|
||||||
XClassHint chint;
|
|
||||||
XSizeHints szhints;
|
|
||||||
Evas_Engine_Info_Software_X11 *einfo;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
disp = XOpenDisplay(NULL);
|
|
||||||
if (!disp) return EINA_FALSE;
|
|
||||||
|
|
||||||
evas_output_method_set(evas, evas_render_method_lookup("software_x11"));
|
|
||||||
einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas);
|
|
||||||
if (!einfo)
|
|
||||||
{
|
|
||||||
printf("Evas does not support the Software Xlib Engine\n");
|
|
||||||
goto close_display;
|
|
||||||
}
|
|
||||||
|
|
||||||
einfo->info.backend = EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB;
|
|
||||||
einfo->info.connection = disp;
|
|
||||||
einfo->info.screen = NULL;
|
|
||||||
einfo->info.visual = einfo->func.best_visual_get(0, disp, DefaultScreen(disp));
|
|
||||||
einfo->info.colormap = einfo->func.best_colormap_get(0, disp, DefaultScreen(disp));
|
|
||||||
einfo->info.depth = einfo->func.best_depth_get(0, disp, DefaultScreen(disp));
|
|
||||||
einfo->info.rotation = 0;
|
|
||||||
einfo->info.debug = 0;
|
|
||||||
#ifdef EVAS_FRAME_QUEUING
|
|
||||||
{
|
|
||||||
char *render_mode;
|
|
||||||
render_mode = getenv("EVAS_RENDER_MODE");
|
|
||||||
if (render_mode && !strcmp(render_mode, "non-blocking"))
|
|
||||||
{
|
|
||||||
einfo->render_mode = EVAS_RENDER_MODE_NONBLOCKING;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
attr.backing_store = NotUseful;
|
|
||||||
attr.colormap = einfo->info.colormap;
|
|
||||||
attr.border_pixel = 0;
|
|
||||||
attr.background_pixmap = None;
|
|
||||||
attr.event_mask =
|
|
||||||
ExposureMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
|
|
||||||
StructureNotifyMask | EnterWindowMask | LeaveWindowMask |
|
|
||||||
KeyPressMask | KeyReleaseMask;
|
|
||||||
attr.bit_gravity = ForgetGravity;
|
|
||||||
win = XCreateWindow(disp, DefaultRootWindow(disp),
|
|
||||||
0, 0, width, height, 0,
|
|
||||||
einfo->info.depth, InputOutput,
|
|
||||||
einfo->info.visual,
|
|
||||||
CWBackingStore | CWColormap |
|
|
||||||
CWBackPixmap | CWBorderPixel |
|
|
||||||
CWBitGravity | CWEventMask,
|
|
||||||
&attr);
|
|
||||||
if (!win)
|
|
||||||
goto close_display;
|
|
||||||
|
|
||||||
einfo->info.drawable = win;
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
|
||||||
{
|
|
||||||
printf("Evas can not setup the informations of the Software Xlib Engine\n");
|
|
||||||
goto destroy_window;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
Atom prop = XInternAtom(disp, "_NET_WM_STATE", False);
|
|
||||||
Atom state = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False);
|
|
||||||
unsigned long data = state;
|
|
||||||
XChangeProperty(disp, win, prop, XA_ATOM, 32, PropModeReplace,
|
|
||||||
(unsigned char*) &data, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
XStoreName(disp, win, "Expedite - Evas Test Suite");
|
|
||||||
chint.res_name = "expedite";
|
|
||||||
chint.res_class = "Expedite";
|
|
||||||
XSetClassHint(disp, win, &chint);
|
|
||||||
szhints.flags = PMinSize | PMaxSize | PSize | USSize;
|
|
||||||
szhints.min_width = szhints.max_width = width;
|
|
||||||
szhints.min_height = szhints.max_height = height;
|
|
||||||
XSetWMNormalHints(disp, win, &szhints);
|
|
||||||
XMapWindow(disp, win);
|
|
||||||
XSync(disp, False);
|
|
||||||
while (!first_expose)
|
|
||||||
engine_software_xlib_loop();
|
|
||||||
return EINA_TRUE;
|
|
||||||
|
|
||||||
destroy_window:
|
|
||||||
XDestroyWindow(disp, win);
|
|
||||||
close_display:
|
|
||||||
XCloseDisplay(disp);
|
|
||||||
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_software_xlib_loop(void)
|
|
||||||
{
|
|
||||||
XEvent ev;
|
|
||||||
KeySym ks;
|
|
||||||
char *kstr;
|
|
||||||
|
|
||||||
again:
|
|
||||||
if (!XCheckMaskEvent(disp,
|
|
||||||
ExposureMask |
|
|
||||||
StructureNotifyMask |
|
|
||||||
KeyPressMask |
|
|
||||||
KeyReleaseMask |
|
|
||||||
ButtonPressMask |
|
|
||||||
ButtonReleaseMask |
|
|
||||||
PointerMotionMask |
|
|
||||||
EnterWindowMask |
|
|
||||||
LeaveWindowMask, &ev))
|
|
||||||
return;
|
|
||||||
switch (ev.type)
|
|
||||||
{
|
|
||||||
case ButtonPress:
|
|
||||||
evas_event_feed_mouse_move(evas, ev.xbutton.x, ev.xbutton.y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_down(evas, ev.xbutton.button, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
case ButtonRelease:
|
|
||||||
evas_event_feed_mouse_move(evas, ev.xbutton.x, ev.xbutton.y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_up(evas, ev.xbutton.button, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
case MotionNotify:
|
|
||||||
evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL);
|
|
||||||
break;
|
|
||||||
case Expose:
|
|
||||||
first_expose = 1;
|
|
||||||
evas_damage_rectangle_add(evas,
|
|
||||||
ev.xexpose.x,
|
|
||||||
ev.xexpose.y,
|
|
||||||
ev.xexpose.width,
|
|
||||||
ev.xexpose.height);
|
|
||||||
break;
|
|
||||||
case ConfigureNotify:
|
|
||||||
evas_output_viewport_set(evas, 0, 0,
|
|
||||||
ev.xconfigure.width,
|
|
||||||
ev.xconfigure.height);
|
|
||||||
evas_output_size_set(evas,
|
|
||||||
ev.xconfigure.width,
|
|
||||||
ev.xconfigure.height);
|
|
||||||
win_w = ev.xconfigure.width;
|
|
||||||
win_h = ev.xconfigure.height;
|
|
||||||
break;
|
|
||||||
case EnterNotify:
|
|
||||||
evas_event_feed_mouse_in(evas, 0, NULL);
|
|
||||||
break;
|
|
||||||
case LeaveNotify:
|
|
||||||
evas_event_feed_mouse_out(evas, 0, NULL);
|
|
||||||
break;
|
|
||||||
case KeyPress:
|
|
||||||
ks = XKeycodeToKeysym(ev.xkey.display, ev.xkey.keycode, 0);
|
|
||||||
kstr = XKeysymToString(ks);
|
|
||||||
if (kstr)
|
|
||||||
{
|
|
||||||
if ((!strcmp(kstr, "Shift_L")) ||
|
|
||||||
(!strcmp(kstr, "Shift_R")))
|
|
||||||
evas_key_modifier_on(evas, "Shift");
|
|
||||||
if ((!strcmp(kstr, "Control_L")) ||
|
|
||||||
(!strcmp(kstr, "Control_R")))
|
|
||||||
evas_key_modifier_on(evas, "Control");
|
|
||||||
if ((!strcmp(kstr, "Alt_L")) ||
|
|
||||||
(!strcmp(kstr, "Alt_R")))
|
|
||||||
evas_key_modifier_on(evas, "Alt");
|
|
||||||
if ((!strcmp(kstr, "Super_L")) ||
|
|
||||||
(!strcmp(kstr, "Super_R")))
|
|
||||||
evas_key_modifier_on(evas, "Super");
|
|
||||||
if (!strcmp(kstr, "Caps_Lock"))
|
|
||||||
{
|
|
||||||
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 (!strcmp(kstr, "Num_Lock"))
|
|
||||||
{
|
|
||||||
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 (!strcmp(kstr, "Scroll_Lock"))
|
|
||||||
{
|
|
||||||
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 (kstr) evas_event_feed_key_down(evas, kstr, kstr, NULL, NULL, 0, NULL);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case KeyRelease:
|
|
||||||
ks = XKeycodeToKeysym(ev.xkey.display, ev.xkey.keycode, 0);
|
|
||||||
kstr = XKeysymToString(ks);
|
|
||||||
if (kstr)
|
|
||||||
{
|
|
||||||
if ((!strcmp(kstr, "Shift_L")) ||
|
|
||||||
(!strcmp(kstr, "Shift_R")))
|
|
||||||
evas_key_modifier_off(evas, "Shift");
|
|
||||||
if ((!strcmp(kstr, "Control_L")) ||
|
|
||||||
(!strcmp(kstr, "Control_R")))
|
|
||||||
evas_key_modifier_off(evas, "Control");
|
|
||||||
if ((!strcmp(kstr, "Alt_L")) ||
|
|
||||||
(!strcmp(kstr, "Alt_R")))
|
|
||||||
evas_key_modifier_off(evas, "Alt");
|
|
||||||
if ((!strcmp(kstr, "Super_L")) ||
|
|
||||||
(!strcmp(kstr, "Super_R")))
|
|
||||||
evas_key_modifier_off(evas, "Super");
|
|
||||||
evas_event_feed_key_up(evas, kstr, kstr, NULL, NULL, 0, NULL);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
goto again;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_software_xlib_shutdown(void)
|
|
||||||
{
|
|
||||||
XDestroyWindow(disp, win);
|
|
||||||
XCloseDisplay(disp);
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
#ifndef ENGINE_SOFTWARE_XLIB_H
|
|
||||||
#define ENGINE_SOFTWARE_XLIB_H
|
|
||||||
|
|
||||||
Eina_Bool engine_software_xlib_args(const char *engine, int width, int height);
|
|
||||||
void engine_software_xlib_loop(void);
|
|
||||||
void engine_software_xlib_shutdown(void);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,221 +0,0 @@
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Xutil.h>
|
|
||||||
#include <X11/Xatom.h>
|
|
||||||
#include <Evas_Engine_XRender_X11.h>
|
|
||||||
|
|
||||||
static Display *disp = NULL;
|
|
||||||
static Window win = 0;
|
|
||||||
static int first_expose = 0;
|
|
||||||
|
|
||||||
Eina_Bool
|
|
||||||
engine_xrender_x11_args(const char *engine, int width, int height)
|
|
||||||
{
|
|
||||||
XSetWindowAttributes attr;
|
|
||||||
XClassHint chint;
|
|
||||||
XSizeHints szhints;
|
|
||||||
Evas_Engine_Info_XRender_X11 *einfo;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
disp = XOpenDisplay(NULL);
|
|
||||||
if (!disp) return EINA_FALSE;
|
|
||||||
|
|
||||||
evas_output_method_set(evas, evas_render_method_lookup("xrender_x11"));
|
|
||||||
einfo = (Evas_Engine_Info_XRender_X11 *)evas_engine_info_get(evas);
|
|
||||||
if (!einfo)
|
|
||||||
{
|
|
||||||
printf("Evas does not support the XRender X11 Engine\n");
|
|
||||||
goto close_display;
|
|
||||||
}
|
|
||||||
|
|
||||||
einfo->info.backend = EVAS_ENGINE_INFO_XRENDER_BACKEND_XLIB;
|
|
||||||
einfo->info.connection = disp;
|
|
||||||
einfo->info.screen = NULL;
|
|
||||||
einfo->info.visual = DefaultVisual(disp, DefaultScreen(disp));
|
|
||||||
attr.backing_store = NotUseful;
|
|
||||||
attr.border_pixel = 0;
|
|
||||||
attr.background_pixmap = None;
|
|
||||||
attr.event_mask =
|
|
||||||
ExposureMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
|
|
||||||
StructureNotifyMask | EnterWindowMask | LeaveWindowMask |
|
|
||||||
KeyPressMask | KeyReleaseMask;
|
|
||||||
attr.bit_gravity = ForgetGravity;
|
|
||||||
win = XCreateWindow(disp, DefaultRootWindow(disp),
|
|
||||||
0, 0, width, height, 0,
|
|
||||||
0, InputOutput,
|
|
||||||
einfo->info.visual,
|
|
||||||
CWBackingStore |
|
|
||||||
CWBackPixmap | CWBorderPixel |
|
|
||||||
CWBitGravity | CWEventMask,
|
|
||||||
&attr);
|
|
||||||
if (!win)
|
|
||||||
goto close_display;
|
|
||||||
einfo->info.drawable = win;
|
|
||||||
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
|
||||||
{
|
|
||||||
printf("Evas can not setup the informations of the XRender X11 Engine\n");
|
|
||||||
goto destroy_window;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
Atom prop = XInternAtom(disp, "_NET_WM_STATE", False);
|
|
||||||
Atom state = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False);
|
|
||||||
unsigned long data = state;
|
|
||||||
XChangeProperty(disp, win, prop, XA_ATOM, 32, PropModeReplace,
|
|
||||||
(unsigned char*) &data, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
XStoreName(disp, win, "Expedite - Evas Test Suite");
|
|
||||||
chint.res_name = "expedite";
|
|
||||||
chint.res_class = "Expedite";
|
|
||||||
XSetClassHint(disp, win, &chint);
|
|
||||||
szhints.flags = PMinSize | PMaxSize | PSize | USSize;
|
|
||||||
szhints.min_width = szhints.max_width = width;
|
|
||||||
szhints.min_height = szhints.max_height = height;
|
|
||||||
XSetWMNormalHints(disp, win, &szhints);
|
|
||||||
XMapWindow(disp, win);
|
|
||||||
XSync(disp, False);
|
|
||||||
while (!first_expose)
|
|
||||||
engine_xrender_x11_loop();
|
|
||||||
return EINA_TRUE;
|
|
||||||
|
|
||||||
destroy_window:
|
|
||||||
XDestroyWindow(disp, win);
|
|
||||||
close_display:
|
|
||||||
XCloseDisplay(disp);
|
|
||||||
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_xrender_x11_loop(void)
|
|
||||||
{
|
|
||||||
XEvent ev;
|
|
||||||
KeySym ks;
|
|
||||||
char *kstr;
|
|
||||||
|
|
||||||
again:
|
|
||||||
if (!XCheckMaskEvent(disp,
|
|
||||||
ExposureMask |
|
|
||||||
StructureNotifyMask |
|
|
||||||
KeyPressMask |
|
|
||||||
KeyReleaseMask |
|
|
||||||
ButtonPressMask |
|
|
||||||
ButtonReleaseMask |
|
|
||||||
PointerMotionMask |
|
|
||||||
EnterWindowMask |
|
|
||||||
LeaveWindowMask, &ev))
|
|
||||||
return;
|
|
||||||
switch (ev.type)
|
|
||||||
{
|
|
||||||
case ButtonPress:
|
|
||||||
evas_event_feed_mouse_move(evas, ev.xbutton.x, ev.xbutton.y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_down(evas, ev.xbutton.button, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
case ButtonRelease:
|
|
||||||
evas_event_feed_mouse_move(evas, ev.xbutton.x, ev.xbutton.y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_up(evas, ev.xbutton.button, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
case MotionNotify:
|
|
||||||
evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL);
|
|
||||||
break;
|
|
||||||
case Expose:
|
|
||||||
first_expose = 1;
|
|
||||||
evas_damage_rectangle_add(evas,
|
|
||||||
ev.xexpose.x,
|
|
||||||
ev.xexpose.y,
|
|
||||||
ev.xexpose.width,
|
|
||||||
ev.xexpose.height);
|
|
||||||
break;
|
|
||||||
case ConfigureNotify:
|
|
||||||
evas_output_viewport_set(evas, 0, 0,
|
|
||||||
ev.xconfigure.width,
|
|
||||||
ev.xconfigure.height);
|
|
||||||
evas_output_size_set(evas,
|
|
||||||
ev.xconfigure.width,
|
|
||||||
ev.xconfigure.height);
|
|
||||||
win_w = ev.xconfigure.width;
|
|
||||||
win_h = ev.xconfigure.height;
|
|
||||||
break;
|
|
||||||
case EnterNotify:
|
|
||||||
evas_event_feed_mouse_in(evas, 0, NULL);
|
|
||||||
break;
|
|
||||||
case LeaveNotify:
|
|
||||||
evas_event_feed_mouse_out(evas, 0, NULL);
|
|
||||||
break;
|
|
||||||
case KeyPress:
|
|
||||||
ks = XKeycodeToKeysym(ev.xkey.display, ev.xkey.keycode, 0);
|
|
||||||
kstr = XKeysymToString(ks);
|
|
||||||
if (kstr)
|
|
||||||
{
|
|
||||||
if ((!strcmp(kstr, "Shift_L")) ||
|
|
||||||
(!strcmp(kstr, "Shift_R")))
|
|
||||||
evas_key_modifier_on(evas, "Shift");
|
|
||||||
if ((!strcmp(kstr, "Control_L")) ||
|
|
||||||
(!strcmp(kstr, "Control_R")))
|
|
||||||
evas_key_modifier_on(evas, "Control");
|
|
||||||
if ((!strcmp(kstr, "Alt_L")) ||
|
|
||||||
(!strcmp(kstr, "Alt_R")))
|
|
||||||
evas_key_modifier_on(evas, "Alt");
|
|
||||||
if ((!strcmp(kstr, "Super_L")) ||
|
|
||||||
(!strcmp(kstr, "Super_R")))
|
|
||||||
evas_key_modifier_on(evas, "Super");
|
|
||||||
if (!strcmp(kstr, "Caps_Lock"))
|
|
||||||
{
|
|
||||||
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 (!strcmp(kstr, "Num_Lock"))
|
|
||||||
{
|
|
||||||
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 (!strcmp(kstr, "Scroll_Lock"))
|
|
||||||
{
|
|
||||||
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 (kstr) evas_event_feed_key_down(evas, kstr, kstr, NULL, NULL, 0, NULL);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case KeyRelease:
|
|
||||||
ks = XKeycodeToKeysym(ev.xkey.display, ev.xkey.keycode, 0);
|
|
||||||
kstr = XKeysymToString(ks);
|
|
||||||
if (kstr)
|
|
||||||
{
|
|
||||||
if ((!strcmp(kstr, "Shift_L")) ||
|
|
||||||
(!strcmp(kstr, "Shift_R")))
|
|
||||||
evas_key_modifier_off(evas, "Shift");
|
|
||||||
if ((!strcmp(kstr, "Control_L")) ||
|
|
||||||
(!strcmp(kstr, "Control_R")))
|
|
||||||
evas_key_modifier_off(evas, "Control");
|
|
||||||
if ((!strcmp(kstr, "Alt_L")) ||
|
|
||||||
(!strcmp(kstr, "Alt_R")))
|
|
||||||
evas_key_modifier_off(evas, "Alt");
|
|
||||||
if ((!strcmp(kstr, "Super_L")) ||
|
|
||||||
(!strcmp(kstr, "Super_R")))
|
|
||||||
evas_key_modifier_off(evas, "Super");
|
|
||||||
evas_event_feed_key_up(evas, kstr, kstr, NULL, NULL, 0, NULL);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
goto again;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_xrender_x11_shutdown(void)
|
|
||||||
{
|
|
||||||
XDestroyWindow(disp, win);
|
|
||||||
XCloseDisplay(disp);
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
#ifndef ENGINE_XRENDER_X11_H
|
|
||||||
#define ENGINE_XRENDER_X11_H
|
|
||||||
|
|
||||||
Eina_Bool engine_xrender_x11_args(const char *engine, int width, int height);
|
|
||||||
void engine_xrender_x11_loop(void);
|
|
||||||
void engine_xrender_x11_shutdown(void);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,405 +0,0 @@
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <xcb/xcb.h>
|
|
||||||
#include <xcb/xcb_keysyms.h>
|
|
||||||
#include <Evas_Engine_XRender_X11.h>
|
|
||||||
|
|
||||||
#define XK_MISCELLANY
|
|
||||||
#include <X11/keysymdef.h>
|
|
||||||
|
|
||||||
enum {
|
|
||||||
XCB_SIZE_US_POSITION_HINT = 1 << 0,
|
|
||||||
XCB_SIZE_US_SIZE_HINT = 1 << 1,
|
|
||||||
XCB_SIZE_P_POSITION_HINT = 1 << 2,
|
|
||||||
XCB_SIZE_P_SIZE_HINT = 1 << 3,
|
|
||||||
XCB_SIZE_P_MIN_SIZE_HINT = 1 << 4,
|
|
||||||
XCB_SIZE_P_MAX_SIZE_HINT = 1 << 5,
|
|
||||||
XCB_SIZE_P_RESIZE_INC_HINT = 1 << 6,
|
|
||||||
XCB_SIZE_P_ASPECT_HINT = 1 << 7,
|
|
||||||
XCB_SIZE_BASE_SIZE_HINT = 1 << 8,
|
|
||||||
XCB_SIZE_P_WIN_GRAVITY_HINT = 1 << 9
|
|
||||||
};
|
|
||||||
|
|
||||||
struct xcb_size_hints_t {
|
|
||||||
uint32_t flags;
|
|
||||||
int32_t x, y, width, height;
|
|
||||||
int32_t min_width, min_height;
|
|
||||||
int32_t max_width, max_height;
|
|
||||||
int32_t width_inc, height_inc;
|
|
||||||
int32_t min_aspect_num, min_aspect_den;
|
|
||||||
int32_t max_aspect_num, max_aspect_den;
|
|
||||||
int32_t base_width, base_height;
|
|
||||||
uint32_t win_gravity;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static xcb_connection_t *conn = NULL;
|
|
||||||
static xcb_screen_t *screen = NULL;
|
|
||||||
static xcb_window_t win = 0;
|
|
||||||
static int first_expose = 0;
|
|
||||||
|
|
||||||
static xcb_visualtype_t *
|
|
||||||
_engine_xrender_visual_get(xcb_connection_t *conn, xcb_screen_t *screen)
|
|
||||||
{
|
|
||||||
xcb_depth_iterator_t iter_depth;
|
|
||||||
|
|
||||||
iter_depth = xcb_screen_allowed_depths_iterator(screen);
|
|
||||||
for (; iter_depth.rem; xcb_depth_next (&iter_depth))
|
|
||||||
{
|
|
||||||
xcb_visualtype_iterator_t iter_vis;
|
|
||||||
|
|
||||||
iter_vis = xcb_depth_visuals_iterator(iter_depth.data);
|
|
||||||
for (; iter_vis.rem; xcb_visualtype_next (&iter_vis))
|
|
||||||
{
|
|
||||||
if (screen->root_visual == iter_vis.data->visual_id)
|
|
||||||
return iter_vis.data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Eina_Bool
|
|
||||||
engine_xrender_xcb_args(const char *engine, int width, int height)
|
|
||||||
{
|
|
||||||
struct xcb_size_hints_t hints;
|
|
||||||
uint32_t value_list[6];
|
|
||||||
xcb_screen_iterator_t iter;
|
|
||||||
Evas_Engine_Info_XRender_X11 *einfo;
|
|
||||||
xcb_intern_atom_reply_t *reply;
|
|
||||||
char *str;
|
|
||||||
xcb_intern_atom_cookie_t cookie1;
|
|
||||||
xcb_intern_atom_cookie_t cookie2;
|
|
||||||
xcb_intern_atom_cookie_t cookie3;
|
|
||||||
xcb_intern_atom_cookie_t cookie4;
|
|
||||||
xcb_intern_atom_cookie_t cookie5;
|
|
||||||
xcb_atom_t string;
|
|
||||||
xcb_atom_t wm_name;
|
|
||||||
xcb_atom_t wm_class;
|
|
||||||
xcb_atom_t wm_normal_hint;
|
|
||||||
xcb_atom_t wm_size_hint;
|
|
||||||
uint32_t value_mask;
|
|
||||||
int s;
|
|
||||||
int s_tmp;
|
|
||||||
int l1;
|
|
||||||
int l2;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
conn = xcb_connect(NULL, &s);
|
|
||||||
if (xcb_connection_has_error(conn)) return EINA_FALSE;
|
|
||||||
|
|
||||||
s_tmp = s;
|
|
||||||
iter = xcb_setup_roots_iterator(xcb_get_setup(conn));
|
|
||||||
for (; iter.rem; --s_tmp, xcb_screen_next (&iter))
|
|
||||||
if (s_tmp == 0)
|
|
||||||
{
|
|
||||||
screen = iter.data;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
evas_output_method_set(evas, evas_render_method_lookup("xrender_x11"));
|
|
||||||
einfo = (Evas_Engine_Info_XRender_X11 *)evas_engine_info_get(evas);
|
|
||||||
if (!einfo)
|
|
||||||
{
|
|
||||||
printf("Evas does not support the XRender XCB Engine\n");
|
|
||||||
goto close_connection;
|
|
||||||
}
|
|
||||||
|
|
||||||
einfo->info.backend = EVAS_ENGINE_INFO_XRENDER_BACKEND_XCB;
|
|
||||||
einfo->info.connection = conn;
|
|
||||||
einfo->info.screen = screen;
|
|
||||||
einfo->info.visual = _engine_xrender_visual_get(conn, screen);
|
|
||||||
|
|
||||||
value_mask =
|
|
||||||
XCB_CW_BACK_PIXMAP | XCB_CW_BORDER_PIXEL | XCB_CW_BIT_GRAVITY |
|
|
||||||
XCB_CW_BACKING_STORE | XCB_CW_EVENT_MASK | XCB_CW_COLORMAP;
|
|
||||||
|
|
||||||
value_list[0] = XCB_NONE;
|
|
||||||
value_list[1] = 0;
|
|
||||||
value_list[2] = XCB_GRAVITY_BIT_FORGET;
|
|
||||||
value_list[3] = XCB_BACKING_STORE_NOT_USEFUL;
|
|
||||||
value_list[4] =
|
|
||||||
XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE |
|
|
||||||
XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE |
|
|
||||||
XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW |
|
|
||||||
XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_EXPOSURE |
|
|
||||||
XCB_EVENT_MASK_STRUCTURE_NOTIFY;
|
|
||||||
value_list[5] =screen->default_colormap;
|
|
||||||
|
|
||||||
win = xcb_generate_id(conn);
|
|
||||||
if (!win)
|
|
||||||
goto close_connection;
|
|
||||||
xcb_create_window(conn,
|
|
||||||
screen->root_depth,
|
|
||||||
win, screen->root, 0, 0, width, height, 0,
|
|
||||||
XCB_WINDOW_CLASS_INPUT_OUTPUT,
|
|
||||||
((xcb_visualtype_t *)einfo->info.visual)->visual_id,
|
|
||||||
value_mask,
|
|
||||||
value_list);
|
|
||||||
einfo->info.drawable = win;
|
|
||||||
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
|
||||||
{
|
|
||||||
printf("Evas can not setup the informations of the XRender XCB Engine\n");
|
|
||||||
goto destroy_window;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* XStoreName(disp, win, "Expedite - Evas Test Suite"); */
|
|
||||||
|
|
||||||
cookie1 = xcb_intern_atom_unchecked(conn, 0, strlen("STRING"), "STRING");
|
|
||||||
cookie2 = xcb_intern_atom_unchecked(conn, 0, strlen("WM_NAME"), "WM_NAME");
|
|
||||||
cookie3 = xcb_intern_atom_unchecked(conn, 0, strlen("WM_CLASS"), "WM_CLASS");
|
|
||||||
cookie4 = xcb_intern_atom_unchecked(conn, 0, strlen("WM_NORMAL_HINTS)"), "WM_NORMAL_HINTS)");
|
|
||||||
cookie5 = xcb_intern_atom_unchecked(conn, 0, strlen("WM_SIZE_HINTS)"), "WM_SIZE_HINTS)");
|
|
||||||
|
|
||||||
reply = xcb_intern_atom_reply(conn, cookie1, NULL);
|
|
||||||
string = reply->atom;
|
|
||||||
free(reply);
|
|
||||||
reply = xcb_intern_atom_reply(conn, cookie2, NULL);
|
|
||||||
wm_name = reply->atom;
|
|
||||||
free(reply);
|
|
||||||
|
|
||||||
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win,
|
|
||||||
wm_name, string, 8,
|
|
||||||
strlen("Expedite - Evas Test Suite"), "Expedite - Evas Test Suite");
|
|
||||||
|
|
||||||
/* chint.res_name = "expedite"; */
|
|
||||||
/* chint.res_class = "Expedite"; */
|
|
||||||
/* XSetClassHint(disp, win, &chint); */
|
|
||||||
|
|
||||||
l1 = strlen("expedite");
|
|
||||||
l2 = strlen("Expedite");
|
|
||||||
str = (char *)malloc(l1 + l2 + 1);
|
|
||||||
memcpy(str, "expedite", l1);
|
|
||||||
str[l1] = '\0';
|
|
||||||
memcpy(str + l1 + 1, "Expedite", l2);
|
|
||||||
|
|
||||||
reply = xcb_intern_atom_reply(conn, cookie3, NULL);
|
|
||||||
wm_class = reply->atom;
|
|
||||||
free(reply);
|
|
||||||
|
|
||||||
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win,
|
|
||||||
wm_class, string, 8,
|
|
||||||
l1 + l2 + 1, str);
|
|
||||||
free(str);
|
|
||||||
|
|
||||||
/* szhints.flags = PMinSize | PMaxSize | PSize | USSize; */
|
|
||||||
/* szhints.min_width = szhints.max_width = width; */
|
|
||||||
/* szhints.min_height = szhints.max_height = height; */
|
|
||||||
/* XSetWMNormalHints(disp, win, &szhints); */
|
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
|
||||||
hints.flags = XCB_SIZE_US_SIZE_HINT | XCB_SIZE_P_SIZE_HINT | XCB_SIZE_P_MIN_SIZE_HINT | XCB_SIZE_P_MAX_SIZE_HINT;
|
|
||||||
hints.min_width = width;
|
|
||||||
hints.max_width = width;
|
|
||||||
hints.min_height = height;
|
|
||||||
hints.max_height = height;
|
|
||||||
|
|
||||||
reply = xcb_intern_atom_reply(conn, cookie4, NULL);
|
|
||||||
wm_normal_hint = reply->atom;
|
|
||||||
free(reply);
|
|
||||||
|
|
||||||
reply = xcb_intern_atom_reply(conn, cookie5, NULL);
|
|
||||||
wm_size_hint = reply->atom;
|
|
||||||
free(reply);
|
|
||||||
|
|
||||||
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win,
|
|
||||||
wm_normal_hint, wm_size_hint, 32,
|
|
||||||
sizeof(hints) / 4, &hints);
|
|
||||||
|
|
||||||
free(xcb_get_input_focus_reply(conn, xcb_get_input_focus_unchecked(conn), NULL));
|
|
||||||
|
|
||||||
xcb_map_window(conn, win);
|
|
||||||
|
|
||||||
while (!first_expose)
|
|
||||||
engine_xrender_xcb_loop();
|
|
||||||
return EINA_TRUE;
|
|
||||||
|
|
||||||
destroy_window:
|
|
||||||
xcb_destroy_window(conn, win);
|
|
||||||
close_connection:
|
|
||||||
xcb_disconnect(conn);
|
|
||||||
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_xrender_xcb_loop(void)
|
|
||||||
{
|
|
||||||
xcb_generic_event_t *ev;
|
|
||||||
|
|
||||||
again:
|
|
||||||
ev = xcb_poll_for_event(conn);
|
|
||||||
if (!ev)
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (ev->response_type)
|
|
||||||
{
|
|
||||||
case XCB_BUTTON_PRESS:
|
|
||||||
{
|
|
||||||
xcb_button_press_event_t *e;
|
|
||||||
|
|
||||||
e = (xcb_button_press_event_t *)ev;
|
|
||||||
|
|
||||||
evas_event_feed_mouse_move(evas, e->event_x, e->event_y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_down(evas, e->detail, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XCB_BUTTON_RELEASE:
|
|
||||||
{
|
|
||||||
xcb_button_release_event_t *e;
|
|
||||||
|
|
||||||
e = (xcb_button_release_event_t *)ev;
|
|
||||||
|
|
||||||
evas_event_feed_mouse_move(evas, e->event_x, e->event_y, 0, NULL);
|
|
||||||
evas_event_feed_mouse_up(evas, e->detail, EVAS_BUTTON_NONE, 0, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XCB_MOTION_NOTIFY:
|
|
||||||
{
|
|
||||||
xcb_motion_notify_event_t *e;
|
|
||||||
|
|
||||||
e = (xcb_motion_notify_event_t *)ev;
|
|
||||||
|
|
||||||
evas_event_feed_mouse_move(evas, e->event_x, e->event_y, 0, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XCB_EXPOSE:
|
|
||||||
{
|
|
||||||
xcb_expose_event_t *e;
|
|
||||||
|
|
||||||
e = (xcb_expose_event_t *)ev;
|
|
||||||
|
|
||||||
first_expose = 1;
|
|
||||||
evas_damage_rectangle_add(evas,
|
|
||||||
e->x,
|
|
||||||
e->y,
|
|
||||||
e->width,
|
|
||||||
e->height);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XCB_CONFIGURE_NOTIFY:
|
|
||||||
{
|
|
||||||
xcb_configure_notify_event_t *e;
|
|
||||||
|
|
||||||
e = (xcb_configure_notify_event_t *)ev;
|
|
||||||
|
|
||||||
evas_output_viewport_set(evas, 0, 0,
|
|
||||||
e->width,
|
|
||||||
e->height);
|
|
||||||
evas_output_size_set(evas,
|
|
||||||
e->width,
|
|
||||||
e->height);
|
|
||||||
win_w = e->width;
|
|
||||||
win_h = e->height;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XCB_ENTER_NOTIFY:
|
|
||||||
evas_event_feed_mouse_in(evas, 0, NULL);
|
|
||||||
break;
|
|
||||||
case XCB_LEAVE_NOTIFY:
|
|
||||||
evas_event_feed_mouse_out(evas, 0, NULL);
|
|
||||||
break;
|
|
||||||
case XCB_KEY_PRESS:
|
|
||||||
{
|
|
||||||
xcb_key_press_event_t *e;
|
|
||||||
xcb_key_symbols_t *kss;
|
|
||||||
xcb_keysym_t ks;
|
|
||||||
char *str = "";
|
|
||||||
|
|
||||||
e = (xcb_key_press_event_t *)ev;
|
|
||||||
|
|
||||||
kss = xcb_key_symbols_alloc(conn);
|
|
||||||
|
|
||||||
ks = xcb_key_symbols_get_keysym(kss, e->detail, 0);
|
|
||||||
|
|
||||||
if ((ks == XK_Shift_L) || (ks == XK_Shift_R))
|
|
||||||
evas_key_modifier_on(evas, "Shift");
|
|
||||||
else if ((ks == XK_Control_L) || (ks == XK_Control_R))
|
|
||||||
evas_key_modifier_on(evas, "Control");
|
|
||||||
else if ((ks == XK_Alt_L) || (ks == XK_Alt_R))
|
|
||||||
evas_key_modifier_on(evas, "Alt");
|
|
||||||
else if ((ks == XK_Super_L) || (ks == XK_Super_R))
|
|
||||||
evas_key_modifier_on(evas, "Super");
|
|
||||||
else if (ks == XK_Caps_Lock)
|
|
||||||
{
|
|
||||||
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");
|
|
||||||
}
|
|
||||||
else if (ks == XK_Scroll_Lock)
|
|
||||||
{
|
|
||||||
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 (ks == XK_Left)
|
|
||||||
str = "Left";
|
|
||||||
if (ks == XK_Right)
|
|
||||||
str = "Right";
|
|
||||||
if (ks == XK_Escape)
|
|
||||||
str = "Escape";
|
|
||||||
if (ks == XK_Return)
|
|
||||||
str = "Return";
|
|
||||||
if (ks == 113)
|
|
||||||
str = "q";
|
|
||||||
|
|
||||||
evas_event_feed_key_down(evas, str, str, NULL, NULL, 0, NULL);
|
|
||||||
|
|
||||||
xcb_key_symbols_free(kss);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XCB_KEY_RELEASE:
|
|
||||||
{
|
|
||||||
xcb_key_release_event_t *e;
|
|
||||||
xcb_key_symbols_t *kss;
|
|
||||||
xcb_keysym_t ks;
|
|
||||||
char *str = "";
|
|
||||||
|
|
||||||
e = (xcb_key_release_event_t *)ev;
|
|
||||||
|
|
||||||
kss = xcb_key_symbols_alloc(conn);
|
|
||||||
|
|
||||||
ks = xcb_key_symbols_get_keysym(kss, e->detail, 0);
|
|
||||||
|
|
||||||
if ((ks == XK_Shift_L) || (ks == XK_Shift_R))
|
|
||||||
evas_key_modifier_on(evas, "Shift");
|
|
||||||
else if ((ks == XK_Control_L) || (ks == XK_Control_R))
|
|
||||||
evas_key_modifier_on(evas, "Control");
|
|
||||||
else if ((ks == XK_Alt_L) || (ks == XK_Alt_R))
|
|
||||||
evas_key_modifier_on(evas, "Alt");
|
|
||||||
else if ((ks == XK_Super_L) || (ks == XK_Super_R))
|
|
||||||
evas_key_modifier_on(evas, "Super");
|
|
||||||
|
|
||||||
if (ks == XK_Left)
|
|
||||||
str = "Left";
|
|
||||||
if (ks == XK_Right)
|
|
||||||
str = "Right";
|
|
||||||
if (ks == XK_Escape)
|
|
||||||
str = "Escape";
|
|
||||||
if (ks == XK_Return)
|
|
||||||
str = "Return";
|
|
||||||
if (ks == 113)
|
|
||||||
str = "q";
|
|
||||||
|
|
||||||
evas_event_feed_key_up(evas, str, str, NULL, NULL, 0, NULL);
|
|
||||||
|
|
||||||
xcb_key_symbols_free(kss);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
free(ev);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
free(ev);
|
|
||||||
|
|
||||||
goto again;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
engine_xrender_xcb_shutdown(void)
|
|
||||||
{
|
|
||||||
xcb_destroy_window(conn, win);
|
|
||||||
xcb_disconnect(conn);
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
#ifndef ENGINE_XRENDER_XCB_H
|
|
||||||
#define ENGINE_XRENDER_XCB_H
|
|
||||||
|
|
||||||
Eina_Bool engine_xrender_xcb_args(const char *engine, int width, int height);
|
|
||||||
void engine_xrender_xcb_loop(void);
|
|
||||||
void engine_xrender_xcb_shutdown(void);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -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()
|
||||||
|
|
|
@ -1,107 +0,0 @@
|
||||||
#undef FNAME
|
|
||||||
#undef NAME
|
|
||||||
#undef ICON
|
|
||||||
|
|
||||||
/* metadata */
|
|
||||||
#define FNAME filter_object_blur
|
|
||||||
#define NAME "Filter Object Blur"
|
|
||||||
#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,*src;
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
o = evas_object_image_add(evas);
|
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
|
||||||
evas_object_resize(o, 120, 160);
|
|
||||||
evas_object_filter_set(o, EVAS_FILTER_BLUR);
|
|
||||||
evas_object_filter_param_int_set(o, "radius", 3);
|
|
||||||
evas_object_show(o);
|
|
||||||
src = o;
|
|
||||||
o_images[i] = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
done = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
static void _cleanup(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* loop - do things */
|
|
||||||
static void _loop(double t, int f)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
Evas_Coord x, y, w, h;
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
evas_object_move(o_images[i], x, y);
|
|
||||||
}
|
|
||||||
FPS_STD(NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
|
||||||
static void _key(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
|
|
||||||
|
|
|
@ -1,108 +0,0 @@
|
||||||
#undef FNAME
|
|
||||||
#undef NAME
|
|
||||||
#undef ICON
|
|
||||||
|
|
||||||
/* metadata */
|
|
||||||
#define FNAME filter_object_blur_solid
|
|
||||||
#define NAME "Filter Object Blur Solid"
|
|
||||||
#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,*src;
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
o = evas_object_image_add(evas);
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
|
||||||
evas_object_resize(o, 120, 160);
|
|
||||||
evas_object_filter_set(o, EVAS_FILTER_BLUR);
|
|
||||||
evas_object_filter_param_int_set(o, "radius", 5);
|
|
||||||
evas_object_layer_set(o,1);
|
|
||||||
evas_object_show(o);
|
|
||||||
src = o;
|
|
||||||
o_images[i] = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
done = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
static void _cleanup(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* loop - do things */
|
|
||||||
static void _loop(double t, int f)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
Evas_Coord x, y, w, h;
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
evas_object_move(o_images[i], x, y);
|
|
||||||
}
|
|
||||||
FPS_STD(NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
|
||||||
static void _key(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
|
|
||||||
|
|
|
@ -1,109 +0,0 @@
|
||||||
#undef FNAME
|
|
||||||
#undef NAME
|
|
||||||
#undef ICON
|
|
||||||
|
|
||||||
/* metadata */
|
|
||||||
#define FNAME filter_object_brightness
|
|
||||||
#define NAME "Filter Object Brightness"
|
|
||||||
#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,*src;
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
o = evas_object_image_add(evas);
|
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
|
||||||
evas_object_resize(o, 120, 160);
|
|
||||||
evas_object_filter_set(o, EVAS_FILTER_BRIGHTNESS);
|
|
||||||
evas_object_filter_param_float_set(o, "adjust", i / (double)OBNUM);
|
|
||||||
evas_object_show(o);
|
|
||||||
src = o;
|
|
||||||
o_images[i] = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
done = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
static void _cleanup(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* loop - do things */
|
|
||||||
static void _loop(double t, int f)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
Evas_Coord x, y, w, h;
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
evas_object_move(o_images[i], x, y);
|
|
||||||
evas_object_filter_param_float_set(o_images[i], "adjust",
|
|
||||||
((i + f) % OBNUM) / (2.0 * OBNUM) - 1);
|
|
||||||
}
|
|
||||||
FPS_STD(NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
|
||||||
static void _key(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
|
|
||||||
|
|
|
@ -1,111 +0,0 @@
|
||||||
#undef FNAME
|
|
||||||
#undef NAME
|
|
||||||
#undef ICON
|
|
||||||
|
|
||||||
/* metadata */
|
|
||||||
#define FNAME filter_object_brightness_solid
|
|
||||||
#define NAME "Filter Object Brightness Solid"
|
|
||||||
#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,*src;
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
o = evas_object_image_add(evas);
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
|
||||||
evas_object_resize(o, 120, 160);
|
|
||||||
evas_object_filter_set(o, EVAS_FILTER_BRIGHTNESS);
|
|
||||||
evas_object_filter_param_float_set(o, "adjust",
|
|
||||||
i / (2.0 * OBNUM) - 1.0);
|
|
||||||
evas_object_layer_set(o,1);
|
|
||||||
evas_object_show(o);
|
|
||||||
src = o;
|
|
||||||
o_images[i] = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
done = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
static void _cleanup(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* loop - do things */
|
|
||||||
static void _loop(double t, int f)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
Evas_Coord x, y, w, h;
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
evas_object_move(o_images[i], x, y);
|
|
||||||
evas_object_filter_param_float_set(o_images[i], "adjust",
|
|
||||||
(((i + f) % OBNUM) * 2.0) / (OBNUM) - 1.0);
|
|
||||||
}
|
|
||||||
FPS_STD(NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
|
||||||
static void _key(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
|
|
||||||
|
|
|
@ -1,111 +0,0 @@
|
||||||
#undef FNAME
|
|
||||||
#undef NAME
|
|
||||||
#undef ICON
|
|
||||||
|
|
||||||
/* metadata */
|
|
||||||
#define FNAME filter_object_colors
|
|
||||||
#define NAME "Filter Object Colors"
|
|
||||||
#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,*src;
|
|
||||||
Evas_Filter filters[3] = {
|
|
||||||
EVAS_FILTER_GREYSCALE,
|
|
||||||
EVAS_FILTER_INVERT,
|
|
||||||
EVAS_FILTER_SEPIA
|
|
||||||
};
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
o = evas_object_image_add(evas);
|
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
|
||||||
evas_object_resize(o, 120, 160);
|
|
||||||
evas_object_filter_set(o, filters[i % 3]);
|
|
||||||
evas_object_show(o);
|
|
||||||
src = o;
|
|
||||||
o_images[i] = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
done = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
static void _cleanup(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* loop - do things */
|
|
||||||
static void _loop(double t, int f)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
Evas_Coord x, y, w, h;
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
evas_object_move(o_images[i], x, y);
|
|
||||||
}
|
|
||||||
FPS_STD(NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
|
||||||
static void _key(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
|
|
||||||
|
|
|
@ -1,112 +0,0 @@
|
||||||
#undef FNAME
|
|
||||||
#undef NAME
|
|
||||||
#undef ICON
|
|
||||||
|
|
||||||
/* metadata */
|
|
||||||
#define FNAME filter_object_colors_solid
|
|
||||||
#define NAME "Filter Object Colors Solid"
|
|
||||||
#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,*src;
|
|
||||||
Evas_Filter filters[3] = {
|
|
||||||
EVAS_FILTER_GREYSCALE,
|
|
||||||
EVAS_FILTER_INVERT,
|
|
||||||
EVAS_FILTER_SEPIA
|
|
||||||
};
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
o = evas_object_image_add(evas);
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
|
||||||
evas_object_resize(o, 120, 160);
|
|
||||||
evas_object_filter_set(o, filters[i % 3]);
|
|
||||||
evas_object_layer_set(o,1);
|
|
||||||
evas_object_show(o);
|
|
||||||
src = o;
|
|
||||||
o_images[i] = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
done = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
static void _cleanup(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* loop - do things */
|
|
||||||
static void _loop(double t, int f)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
Evas_Coord x, y, w, h;
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
evas_object_move(o_images[i], x, y);
|
|
||||||
}
|
|
||||||
FPS_STD(NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
|
||||||
static void _key(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
|
|
||||||
|
|
|
@ -1,106 +0,0 @@
|
||||||
#undef FNAME
|
|
||||||
#undef NAME
|
|
||||||
#undef ICON
|
|
||||||
|
|
||||||
/* metadata */
|
|
||||||
#define FNAME filter_object_greyscale
|
|
||||||
#define NAME "Filter Object Greyscale"
|
|
||||||
#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,*src;
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
o = evas_object_image_add(evas);
|
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
|
||||||
evas_object_resize(o, 120, 160);
|
|
||||||
evas_object_filter_set(o, EVAS_FILTER_GREYSCALE);
|
|
||||||
evas_object_show(o);
|
|
||||||
src = o;
|
|
||||||
o_images[i] = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
done = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
static void _cleanup(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* loop - do things */
|
|
||||||
static void _loop(double t, int f)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
Evas_Coord x, y, w, h;
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
evas_object_move(o_images[i], x, y);
|
|
||||||
}
|
|
||||||
FPS_STD(NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
|
||||||
static void _key(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
|
|
||||||
|
|
|
@ -1,107 +0,0 @@
|
||||||
#undef FNAME
|
|
||||||
#undef NAME
|
|
||||||
#undef ICON
|
|
||||||
|
|
||||||
/* metadata */
|
|
||||||
#define FNAME filter_object_greyscale_solid
|
|
||||||
#define NAME "Filter Object Greyscale Solid"
|
|
||||||
#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,*src;
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
o = evas_object_image_add(evas);
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
|
||||||
evas_object_resize(o, 120, 160);
|
|
||||||
evas_object_filter_set(o, EVAS_FILTER_GREYSCALE);
|
|
||||||
evas_object_layer_set(o,1);
|
|
||||||
evas_object_show(o);
|
|
||||||
src = o;
|
|
||||||
o_images[i] = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
done = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
static void _cleanup(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* loop - do things */
|
|
||||||
static void _loop(double t, int f)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
Evas_Coord x, y, w, h;
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
evas_object_move(o_images[i], x, y);
|
|
||||||
}
|
|
||||||
FPS_STD(NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
|
||||||
static void _key(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
|
|
||||||
|
|
|
@ -1,106 +0,0 @@
|
||||||
#undef FNAME
|
|
||||||
#undef NAME
|
|
||||||
#undef ICON
|
|
||||||
|
|
||||||
/* metadata */
|
|
||||||
#define FNAME filter_object_invert
|
|
||||||
#define NAME "Filter Object Invert"
|
|
||||||
#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,*src;
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
o = evas_object_image_add(evas);
|
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
|
||||||
evas_object_resize(o, 120, 160);
|
|
||||||
evas_object_filter_set(o, EVAS_FILTER_INVERT);
|
|
||||||
evas_object_show(o);
|
|
||||||
src = o;
|
|
||||||
o_images[i] = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
done = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
static void _cleanup(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* loop - do things */
|
|
||||||
static void _loop(double t, int f)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
Evas_Coord x, y, w, h;
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
evas_object_move(o_images[i], x, y);
|
|
||||||
}
|
|
||||||
FPS_STD(NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
|
||||||
static void _key(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
|
|
||||||
|
|
|
@ -1,107 +0,0 @@
|
||||||
#undef FNAME
|
|
||||||
#undef NAME
|
|
||||||
#undef ICON
|
|
||||||
|
|
||||||
/* metadata */
|
|
||||||
#define FNAME filter_object_invert_solid
|
|
||||||
#define NAME "Filter Object Invert Solid"
|
|
||||||
#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,*src;
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
o = evas_object_image_add(evas);
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
|
||||||
evas_object_resize(o, 120, 160);
|
|
||||||
evas_object_filter_set(o, EVAS_FILTER_INVERT);
|
|
||||||
evas_object_layer_set(o,1);
|
|
||||||
evas_object_show(o);
|
|
||||||
src = o;
|
|
||||||
o_images[i] = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
done = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
static void _cleanup(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* loop - do things */
|
|
||||||
static void _loop(double t, int f)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
Evas_Coord x, y, w, h;
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
evas_object_move(o_images[i], x, y);
|
|
||||||
}
|
|
||||||
FPS_STD(NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
|
||||||
static void _key(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
|
|
||||||
|
|
|
@ -1,106 +0,0 @@
|
||||||
#undef FNAME
|
|
||||||
#undef NAME
|
|
||||||
#undef ICON
|
|
||||||
|
|
||||||
/* metadata */
|
|
||||||
#define FNAME filter_object_sepia
|
|
||||||
#define NAME "Filter Object Sepia"
|
|
||||||
#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,*src;
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
o = evas_object_image_add(evas);
|
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
|
||||||
evas_object_resize(o, 120, 160);
|
|
||||||
evas_object_filter_set(o, EVAS_FILTER_SEPIA);
|
|
||||||
evas_object_show(o);
|
|
||||||
src = o;
|
|
||||||
o_images[i] = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
done = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
static void _cleanup(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* loop - do things */
|
|
||||||
static void _loop(double t, int f)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
Evas_Coord x, y, w, h;
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
evas_object_move(o_images[i], x, y);
|
|
||||||
}
|
|
||||||
FPS_STD(NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
|
||||||
static void _key(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
|
|
||||||
|
|
|
@ -1,107 +0,0 @@
|
||||||
#undef FNAME
|
|
||||||
#undef NAME
|
|
||||||
#undef ICON
|
|
||||||
|
|
||||||
/* metadata */
|
|
||||||
#define FNAME filter_object_sepia_solid
|
|
||||||
#define NAME "Filter Object Sepia Solid"
|
|
||||||
#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,*src;
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
o = evas_object_image_add(evas);
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
|
||||||
evas_object_resize(o, 120, 160);
|
|
||||||
evas_object_filter_set(o, EVAS_FILTER_SEPIA);
|
|
||||||
evas_object_layer_set(o,1);
|
|
||||||
evas_object_show(o);
|
|
||||||
src = o;
|
|
||||||
o_images[i] = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
done = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
static void _cleanup(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* loop - do things */
|
|
||||||
static void _loop(double t, int f)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
Evas_Coord x, y, w, h;
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
evas_object_move(o_images[i], x, y);
|
|
||||||
}
|
|
||||||
FPS_STD(NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* prepend special key handlers if interactive (before STD) */
|
|
||||||
static void _key(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
|
|
||||||
|
|
|
@ -0,0 +1,101 @@
|
||||||
|
#define EFL_GFX_FILTER_BETA
|
||||||
|
|
||||||
|
#undef FNAME
|
||||||
|
#undef NAME
|
||||||
|
#undef ICON
|
||||||
|
|
||||||
|
/* metadata */
|
||||||
|
#define FNAME font_effect_blur_alpha_start
|
||||||
|
#define NAME "Font Effect Blur (Alpha)"
|
||||||
|
#define ICON "text.png"
|
||||||
|
|
||||||
|
#ifndef PROTO
|
||||||
|
# ifndef UI
|
||||||
|
# include "main.h"
|
||||||
|
|
||||||
|
#include "ui.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* standard var */
|
||||||
|
static int done = 0;
|
||||||
|
extern int win_w, win_h;
|
||||||
|
/* private data */
|
||||||
|
static Evas_Object *text;
|
||||||
|
static const int MAX_BLUR = 100;
|
||||||
|
|
||||||
|
/* setup */
|
||||||
|
static void _setup(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
Evas_Object *o;
|
||||||
|
int w,h;
|
||||||
|
|
||||||
|
o = evas_object_text_add(evas);
|
||||||
|
evas_object_color_set(o, 0, 0, 0, 255);
|
||||||
|
evas_object_text_font_set(o, "Vera-Bold", 80);
|
||||||
|
evas_object_text_text_set(o, "Font Effect");
|
||||||
|
evas_object_show(o);
|
||||||
|
evas_object_geometry_get(o, NULL, NULL, &w, &h);
|
||||||
|
evas_object_move(o, (win_w / 2) - (w / 2) - MAX_BLUR, (win_h / 2) - (h / 2) - MAX_BLUR);
|
||||||
|
text = o;
|
||||||
|
|
||||||
|
done = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* cleanup */
|
||||||
|
static void _cleanup(void)
|
||||||
|
{
|
||||||
|
evas_object_del(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* loop - do things */
|
||||||
|
static void _loop(double t, int f)
|
||||||
|
{
|
||||||
|
char buf[256];
|
||||||
|
char *str = "padding_set({ %d });blur({%d,color=black });";
|
||||||
|
sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1));
|
||||||
|
efl_gfx_filter_program_set(text, buf, "test");
|
||||||
|
|
||||||
|
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
|
|
@ -0,0 +1,103 @@
|
||||||
|
#define EFL_GFX_FILTER_BETA
|
||||||
|
|
||||||
|
#undef FNAME
|
||||||
|
#undef NAME
|
||||||
|
#undef ICON
|
||||||
|
|
||||||
|
/* metadata */
|
||||||
|
#define FNAME font_effect_blur_color_start
|
||||||
|
#define NAME "Font Effect Blur (Color)"
|
||||||
|
#define ICON "text.png"
|
||||||
|
|
||||||
|
#ifndef PROTO
|
||||||
|
# ifndef UI
|
||||||
|
# include "main.h"
|
||||||
|
|
||||||
|
#include "ui.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* standard var */
|
||||||
|
static int done = 0;
|
||||||
|
/* private data */
|
||||||
|
static Evas_Object *text;
|
||||||
|
|
||||||
|
extern int win_w, win_h;
|
||||||
|
static const int MAX_BLUR = 100;
|
||||||
|
|
||||||
|
|
||||||
|
/* setup */
|
||||||
|
static void _setup(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
Evas_Object *o;
|
||||||
|
int w, h;
|
||||||
|
|
||||||
|
o = evas_object_text_add(evas);
|
||||||
|
evas_object_color_set(o, 0, 0, 0, 255);
|
||||||
|
evas_object_text_font_set(o, "Vera-Bold", 80);
|
||||||
|
evas_object_text_text_set(o, "Font Effect");
|
||||||
|
evas_object_show(o);
|
||||||
|
evas_object_geometry_get(o, NULL, NULL, &w, &h);
|
||||||
|
evas_object_move(o, (win_w / 2) - (w / 2) - MAX_BLUR, (win_h / 2) - (h / 2) - MAX_BLUR);
|
||||||
|
text = o;
|
||||||
|
|
||||||
|
done = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* cleanup */
|
||||||
|
static void _cleanup(void)
|
||||||
|
{
|
||||||
|
evas_object_del(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* loop - do things */
|
||||||
|
static void _loop(double t, int f)
|
||||||
|
{
|
||||||
|
char buf[256];
|
||||||
|
char *str = "a = buffer({ 'rgba' }); padding_set({ %d }); blend({dst=a, color=darkblue});blur({%d,src=a});";
|
||||||
|
sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1));
|
||||||
|
efl_gfx_filter_program_set(text, buf, "test");
|
||||||
|
|
||||||
|
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,11 +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 = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("bar.png"), NULL);
|
efl_file_simple_load(o, build_path("bar.png"), NULL);
|
||||||
evas_object_image_border_set(o, 6, 6, 6, 6);
|
efl_gfx_image_border_insets_set(o, 6, 6, 6, 6);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -36,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -47,22 +47,22 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
w0 = 80;
|
w0 = 80;
|
||||||
h0 = 80;
|
h0 = 80;
|
||||||
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
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);
|
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
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);
|
||||||
evas_object_move(o_images[i], x, y);
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
evas_object_resize(o_images[i], w, h);
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
evas_object_image_fill_set(o_images[i], 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
|
||||||
|
|
|
@ -23,12 +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 = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("pan.png"), NULL);
|
efl_file_simple_load(o, build_path("pan.png"), NULL);
|
||||||
evas_object_color_set(o, 64, 64, 64, 255);
|
efl_gfx_color_set(o, 64, 64, 64, 255);
|
||||||
evas_object_image_border_set(o, 3, 3, 3, 3);
|
efl_gfx_image_border_insets_set(o, 3, 3, 3, 3);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -37,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -48,22 +48,22 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
w0 = 80;
|
w0 = 80;
|
||||||
h0 = 80;
|
h0 = 80;
|
||||||
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
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);
|
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
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);
|
||||||
evas_object_move(o_images[i], x, y);
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
evas_object_resize(o_images[i], w, h);
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
evas_object_image_fill_set(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -95,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
|
||||||
|
|
|
@ -24,16 +24,16 @@ static void _setup(void)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
int a;
|
int a;
|
||||||
|
|
||||||
o = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
a = 256 - (1 << ((rnd() % 8) + 1));
|
a = 256 - (1 << ((rnd() % 8) + 1));
|
||||||
if (a < 128) a = 128;
|
if (a < 128) a = 128;
|
||||||
evas_object_color_set(o, a, a, a, a);
|
efl_gfx_color_set(o, a, a, a, a);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -42,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -53,18 +53,18 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
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 * 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);
|
||||||
evas_object_move(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -96,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 = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o = evas_object_image_add(evas);
|
o_images[i] = o;
|
||||||
o_images[i] = o;
|
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
|
||||||
evas_object_resize(o, 120, 160);
|
|
||||||
a = rnd()&0xff;
|
a = rnd()&0xff;
|
||||||
evas_object_color_set(o, a, a, a, a);
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
evas_object_show(o);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
|
efl_gfx_color_set(o, a, a, a, a);
|
||||||
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -52,18 +51,18 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
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 * 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);
|
||||||
evas_object_move(o_images[i], 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
|
||||||
|
|
|
@ -0,0 +1,105 @@
|
||||||
|
#undef FNAME
|
||||||
|
#undef NAME
|
||||||
|
#undef ICON
|
||||||
|
|
||||||
|
/* metadata */
|
||||||
|
#define FNAME image_blend_many_smooth_down_scaled_start
|
||||||
|
#define NAME "Image Blend Many Smooth Down Scaled"
|
||||||
|
#define ICON "blend.png"
|
||||||
|
|
||||||
|
#ifndef PROTO
|
||||||
|
# ifndef UI
|
||||||
|
# include "main.h"
|
||||||
|
|
||||||
|
#define MANYNUM 8192
|
||||||
|
|
||||||
|
/* standard var */
|
||||||
|
static int done = 0;
|
||||||
|
/* private data */
|
||||||
|
static Evas_Object *o_images[MANYNUM];
|
||||||
|
|
||||||
|
/* setup */
|
||||||
|
static void _setup(void)
|
||||||
|
{
|
||||||
|
int i, w, h, n;
|
||||||
|
Evas_Object *o;
|
||||||
|
for (i = 0; i < MANYNUM; i++)
|
||||||
|
{
|
||||||
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
|
o_images[i] = o;
|
||||||
|
n = rnd() % 100;
|
||||||
|
w = 3 + ((n * (60 - 3)) / 100);
|
||||||
|
h = 4 + ((n * (80 - 4)) / 100);
|
||||||
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
|
efl_gfx_image_smooth_scale_set(o, 1);
|
||||||
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(w, h));
|
||||||
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, w, h));
|
||||||
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
|
}
|
||||||
|
done = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* cleanup */
|
||||||
|
static void _cleanup(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < MANYNUM; 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 < MANYNUM; i++)
|
||||||
|
{
|
||||||
|
exp_size_get(o_images[i], &w, &h);
|
||||||
|
x = (win_w / 2) - (w / 2);
|
||||||
|
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (win_w / 2);
|
||||||
|
y = (win_h / 2) - (h / 2);
|
||||||
|
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (win_h / 2);
|
||||||
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
|
}
|
||||||
|
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,11 +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 = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
evas_object_image_smooth_scale_set(o, 0);
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -36,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -47,22 +47,22 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
w0 = 80;
|
w0 = 80;
|
||||||
h0 = 80;
|
h0 = 80;
|
||||||
w = 40 + ((i % 3) * (w0 / 2));
|
w = 40 + ((i % 3) * (w0 / 2));
|
||||||
h = 40 + ((i % 3) * (h0 / 2));
|
h = 40 + ((i % 3) * (h0 / 2));
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
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);
|
||||||
evas_object_move(o_images[i], x, y);
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
evas_object_resize(o_images[i], w, h);
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
evas_object_image_fill_set(o_images[i], 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
|
||||||
|
|
|
@ -23,11 +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 = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
evas_object_image_smooth_scale_set(o, 0);
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -36,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -47,22 +47,22 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
w0 = 80;
|
w0 = 80;
|
||||||
h0 = 80;
|
h0 = 80;
|
||||||
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
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);
|
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
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);
|
||||||
evas_object_move(o_images[i], x, y);
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
evas_object_resize(o_images[i], w, h);
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
evas_object_image_fill_set(o_images[i], 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
|
||||||
|
|
|
@ -23,11 +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 = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_image_smooth_scale_set(o, 0);
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -36,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -47,22 +47,22 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
w0 = 80;
|
w0 = 80;
|
||||||
h0 = 80;
|
h0 = 80;
|
||||||
w = 40 + ((i % 3) * (w0 / 2));
|
w = 40 + ((i % 3) * (w0 / 2));
|
||||||
h = 40 + ((i % 3) * (h0 / 2));
|
h = 40 + ((i % 3) * (h0 / 2));
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
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);
|
||||||
evas_object_move(o_images[i], x, y);
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
evas_object_resize(o_images[i], w, h);
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
evas_object_image_fill_set(o_images[i], 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
|
||||||
|
|
|
@ -23,11 +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 = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_image_smooth_scale_set(o, 0);
|
efl_gfx_image_smooth_scale_set(o, 0);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -36,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -47,22 +47,22 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
w0 = 80;
|
w0 = 80;
|
||||||
h0 = 80;
|
h0 = 80;
|
||||||
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
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);
|
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
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);
|
||||||
evas_object_move(o_images[i], x, y);
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
evas_object_resize(o_images[i], w, h);
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
evas_object_image_fill_set(o_images[i], 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
|
||||||
|
|
|
@ -24,22 +24,24 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = evas_object_image_add(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))
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
{
|
||||||
else
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
{
|
}
|
||||||
Evas_Coord x, y;
|
else
|
||||||
|
{
|
||||||
|
Evas_Coord x, y;
|
||||||
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
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);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_move(o, x, y);
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -48,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -58,22 +60,22 @@ 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++)
|
||||||
{
|
{
|
||||||
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 * 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);
|
||||||
evas_object_move(o_images[i], 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 +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,22 +27,24 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = evas_object_image_add(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))
|
||||||
evas_object_image_file_set(o, PACKAGE_DATA_DIR"/data/logo.png", NULL);
|
{
|
||||||
else
|
efl_file_simple_load(o, PACKAGE_DATA_DIR"/data/logo.png", NULL);
|
||||||
{
|
}
|
||||||
Evas_Coord x, y;
|
else
|
||||||
|
{
|
||||||
|
Evas_Coord x, y;
|
||||||
|
|
||||||
evas_object_image_file_set(o, PACKAGE_DATA_DIR"/data/image.png", NULL);
|
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);
|
efl_file_simple_load(o, PACKAGE_DATA_DIR"/data/image.png", NULL);
|
||||||
evas_object_move(o, x, y);
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -51,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++) evas_object_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);
|
||||||
evas_object_move(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -108,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,22 +27,24 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = evas_object_image_add(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))
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
{
|
||||||
else
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
{
|
}
|
||||||
Evas_Coord x, y;
|
else
|
||||||
|
{
|
||||||
|
Evas_Coord x, y;
|
||||||
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
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);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_move(o, x, y);
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -51,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -61,22 +63,22 @@ 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++)
|
||||||
{
|
{
|
||||||
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 * 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);
|
||||||
evas_object_move(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -108,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,22 +27,24 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = evas_object_image_add(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))
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
{
|
||||||
else
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
{
|
}
|
||||||
Evas_Coord x, y;
|
else
|
||||||
|
{
|
||||||
|
Evas_Coord x, y;
|
||||||
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
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);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_move(o, x, y);
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -51,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -61,22 +63,22 @@ 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++)
|
||||||
{
|
{
|
||||||
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 * 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);
|
||||||
evas_object_move(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -108,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,22 +24,24 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i & 0x1)
|
if (i & 0x1)
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
{
|
||||||
else
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
{
|
}
|
||||||
Evas_Coord x, y;
|
else
|
||||||
|
{
|
||||||
|
Evas_Coord x, y;
|
||||||
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
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);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_move(o, x, y);
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -48,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -58,22 +60,22 @@ 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++)
|
||||||
{
|
{
|
||||||
if (i & 0x1)
|
if (i & 0x1)
|
||||||
{
|
{
|
||||||
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 * 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);
|
||||||
evas_object_move(o_images[i], 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 +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,22 +27,24 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i & 0x1)
|
if (i & 0x1)
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
{
|
||||||
else
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
{
|
}
|
||||||
Evas_Coord x, y;
|
else
|
||||||
|
{
|
||||||
|
Evas_Coord x, y;
|
||||||
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
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);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_move(o, x, y);
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -51,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++) evas_object_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 & 0x1)
|
if (i & 0x1)
|
||||||
{
|
{
|
||||||
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);
|
||||||
evas_object_move(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -108,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,22 +27,24 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i & 0x1)
|
if (i & 0x1)
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
{
|
||||||
else
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
{
|
}
|
||||||
Evas_Coord x, y;
|
else
|
||||||
|
{
|
||||||
|
Evas_Coord x, y;
|
||||||
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
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);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_move(o, x, y);
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -51,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -61,22 +63,22 @@ 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++)
|
||||||
{
|
{
|
||||||
if (i & 0x1)
|
if (i & 0x1)
|
||||||
{
|
{
|
||||||
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 * 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);
|
||||||
evas_object_move(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -108,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,22 +27,24 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (i & 0x1)
|
if (i & 0x1)
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
{
|
||||||
else
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
{
|
}
|
||||||
Evas_Coord x, y;
|
else
|
||||||
|
{
|
||||||
|
Evas_Coord x, y;
|
||||||
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
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);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_move(o, x, y);
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -51,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -61,22 +63,22 @@ 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++)
|
||||||
{
|
{
|
||||||
if (i & 0x1)
|
if (i & 0x1)
|
||||||
{
|
{
|
||||||
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 * 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);
|
||||||
evas_object_move(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -108,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,22 +24,24 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = evas_object_image_add(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))
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
{
|
||||||
else
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
{
|
}
|
||||||
Evas_Coord x, y;
|
else
|
||||||
|
{
|
||||||
|
Evas_Coord x, y;
|
||||||
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
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);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_move(o, x, y);
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -48,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -58,22 +60,22 @@ 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++)
|
||||||
{
|
{
|
||||||
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 * 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);
|
||||||
evas_object_move(o_images[i], 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 +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,22 +27,24 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = evas_object_image_add(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))
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
{
|
||||||
else
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
{
|
}
|
||||||
Evas_Coord x, y;
|
else
|
||||||
|
{
|
||||||
|
Evas_Coord x, y;
|
||||||
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
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);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_move(o, x, y);
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -51,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++) evas_object_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);
|
||||||
evas_object_move(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -108,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,22 +27,24 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = evas_object_image_add(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))
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
{
|
||||||
else
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
{
|
}
|
||||||
Evas_Coord x, y;
|
else
|
||||||
|
{
|
||||||
|
Evas_Coord x, y;
|
||||||
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
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);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_move(o, x, y);
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -51,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -61,22 +63,22 @@ 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++)
|
||||||
{
|
{
|
||||||
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 * 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);
|
||||||
evas_object_move(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -108,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,22 +27,24 @@ static void _setup(void)
|
||||||
srnd();
|
srnd();
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = evas_object_image_add(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))
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
{
|
||||||
else
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
{
|
}
|
||||||
Evas_Coord x, y;
|
else
|
||||||
|
{
|
||||||
|
Evas_Coord x, y;
|
||||||
|
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
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);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_move(o, x, y);
|
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
|
||||||
}
|
}
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -51,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -61,22 +63,22 @@ 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++)
|
||||||
{
|
{
|
||||||
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 * 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);
|
||||||
evas_object_move(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -108,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,11 +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 = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
evas_object_image_smooth_scale_set(o, 1);
|
efl_gfx_image_smooth_scale_set(o, 1);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -36,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -47,22 +47,22 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
w0 = 80;
|
w0 = 80;
|
||||||
h0 = 80;
|
h0 = 80;
|
||||||
w = 40 + ((i % 3) * (w0 / 2));
|
w = 40 + ((i % 3) * (w0 / 2));
|
||||||
h = 40 + ((i % 3) * (h0 / 2));
|
h = 40 + ((i % 3) * (h0 / 2));
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
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);
|
||||||
evas_object_move(o_images[i], x, y);
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
evas_object_resize(o_images[i], w, h);
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
evas_object_image_fill_set(o_images[i], 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
|
||||||
|
|
|
@ -23,11 +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 = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
evas_object_image_smooth_scale_set(o, 1);
|
efl_gfx_image_smooth_scale_set(o, 1);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -36,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -47,22 +47,22 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
w0 = 80;
|
w0 = 80;
|
||||||
h0 = 80;
|
h0 = 80;
|
||||||
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
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);
|
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
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);
|
||||||
evas_object_move(o_images[i], x, y);
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
evas_object_resize(o_images[i], w, h);
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
evas_object_image_fill_set(o_images[i], 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
|
||||||
|
|
|
@ -23,11 +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 = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_image_smooth_scale_set(o, 1);
|
efl_gfx_image_smooth_scale_set(o, 1);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -36,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -47,22 +47,22 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
w0 = 80;
|
w0 = 80;
|
||||||
h0 = 80;
|
h0 = 80;
|
||||||
w = 40 + ((i % 3) * (w0 / 2));
|
w = 40 + ((i % 3) * (w0 / 2));
|
||||||
h = 40 + ((i % 3) * (h0 / 2));
|
h = 40 + ((i % 3) * (h0 / 2));
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
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);
|
||||||
evas_object_move(o_images[i], x, y);
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
evas_object_resize(o_images[i], w, h);
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
evas_object_image_fill_set(o_images[i], 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
|
||||||
|
|
|
@ -23,11 +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 = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_image_smooth_scale_set(o, 1);
|
efl_gfx_image_smooth_scale_set(o, 1);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -36,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -47,22 +47,22 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
w0 = 80;
|
w0 = 80;
|
||||||
h0 = 80;
|
h0 = 80;
|
||||||
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
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);
|
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
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);
|
||||||
evas_object_move(o_images[i], x, y);
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
evas_object_resize(o_images[i], w, h);
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
evas_object_image_fill_set(o_images[i], 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
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#undef ICON
|
#undef ICON
|
||||||
|
|
||||||
/* metadata */
|
/* metadata */
|
||||||
#define FNAME image_mask_14
|
#define FNAME image_blend_solid_9patch_start
|
||||||
#define NAME "Image Mask 14"
|
#define NAME "Image Blend Solid 9patch"
|
||||||
#define ICON "blend.png"
|
#define ICON "blend.png"
|
||||||
|
|
||||||
#ifndef PROTO
|
#ifndef PROTO
|
||||||
|
@ -15,32 +15,18 @@
|
||||||
static int done = 0;
|
static int done = 0;
|
||||||
/* private data */
|
/* private data */
|
||||||
static Evas_Object *o_images[OBNUM];
|
static Evas_Object *o_images[OBNUM];
|
||||||
static Evas_Object *o_mask;
|
|
||||||
|
|
||||||
/* setup */
|
/* setup */
|
||||||
static void _setup(void)
|
static void _setup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
o = evas_object_image_add(evas);
|
|
||||||
o_mask = o;
|
|
||||||
evas_object_image_file_set(o, build_path("e-logo-mask.png"), NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, 720, 420);
|
|
||||||
evas_object_resize(o, 720, 420);
|
|
||||||
evas_object_move(o, (win_w - 720) / 2, (win_h - 420) / 2);
|
|
||||||
evas_object_show(o);
|
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
o = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
efl_file_simple_load(o, build_path("9patch_test.9.png"), NULL);
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
evas_object_resize(o, 120, 160);
|
|
||||||
evas_object_image_smooth_scale_set(o, 1);
|
|
||||||
evas_object_clip_set(o, o_mask);
|
|
||||||
evas_object_show(o);
|
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -49,8 +35,7 @@ static void _setup(void)
|
||||||
static void _cleanup(void)
|
static void _cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
evas_object_del(o_mask);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -58,25 +43,26 @@ static void _loop(double t, int f)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
Evas_Coord x, y, w, h, w0, h0;
|
Evas_Coord x, y, w, h, w0, h0;
|
||||||
|
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
w0 = 80;
|
w0 = 80;
|
||||||
h0 = 80;
|
h0 = 80;
|
||||||
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
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);
|
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW))) * w0 * 2);
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
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);
|
||||||
evas_object_move(o_images[i], x, y);
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
evas_object_resize(o_images[i], w, h);
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
evas_object_image_fill_set(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -108,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,11 +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 = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("frame.png"), NULL);
|
efl_file_simple_load(o, build_path("frame.png"), NULL);
|
||||||
evas_object_image_border_set(o, 8, 8, 8, 8);
|
efl_gfx_image_border_insets_set(o, 8, 8, 8, 8);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -36,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -47,22 +47,22 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
w0 = 80;
|
w0 = 80;
|
||||||
h0 = 80;
|
h0 = 80;
|
||||||
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW))) * w0 * 2);
|
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);
|
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW))) * h0 * 2);
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
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);
|
||||||
evas_object_move(o_images[i], x, y);
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
evas_object_resize(o_images[i], w, h);
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
evas_object_image_fill_set(o_images[i], 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
|
||||||
|
|
|
@ -24,16 +24,16 @@ static void _setup(void)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
int a;
|
int a;
|
||||||
|
|
||||||
o = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
a = 256 - (1 << ((rnd() % 8) + 1));
|
a = 256 - (1 << ((rnd() % 8) + 1));
|
||||||
if (a < 128) a = 128;
|
if (a < 128) a = 128;
|
||||||
evas_object_color_set(o, a, a, a, a);
|
efl_gfx_color_set(o, a, a, a, a);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -42,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -53,18 +53,18 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
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 * 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);
|
||||||
evas_object_move(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -96,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,15 @@ static void _setup(void)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
int a;
|
int a;
|
||||||
|
|
||||||
o = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("image.png"), NULL);
|
efl_file_simple_load(o, build_path("image.png"), NULL);
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
a = rnd()&0xff;
|
a = rnd()&0xff;
|
||||||
evas_object_color_set(o, a, a, a, a);
|
efl_gfx_color_set(o, a, a, a, a);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -41,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -52,18 +52,18 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
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 * 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);
|
||||||
evas_object_move(o_images[i], 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 +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,12 +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 = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("bar.png"), NULL);
|
efl_file_simple_load(o, build_path("bar.png"), NULL);
|
||||||
evas_object_image_border_set(o, 6, 6, 6, 6);
|
efl_gfx_image_border_insets_set(o, 6, 6, 6, 6);
|
||||||
evas_object_image_border_center_fill_set(o, EVAS_BORDER_FILL_SOLID);
|
efl_gfx_image_center_fill_mode_set(o, EFL_GFX_CENTER_FILL_MODE_SOLID);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -37,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -48,22 +48,22 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
w0 = 80;
|
w0 = 80;
|
||||||
h0 = 80;
|
h0 = 80;
|
||||||
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
|
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);
|
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
|
||||||
x = (win_w / 2) - (w / 2);
|
x = (win_w / 2) - (w / 2);
|
||||||
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);
|
||||||
evas_object_move(o_images[i], x, y);
|
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||||
evas_object_resize(o_images[i], w, h);
|
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||||
evas_object_image_fill_set(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -95,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,14 +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 = evas_object_image_add(evas);
|
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
evas_object_image_file_set(o, build_path("logo.png"), NULL);
|
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||||
evas_object_image_fill_set(o, 0, 0, 120, 160);
|
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||||
evas_object_resize(o, 120, 160);
|
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||||
evas_object_image_border_set(o, 43, 48, 48, 83);
|
efl_gfx_image_border_insets_set(o, 43, 48, 48, 83);
|
||||||
evas_object_image_border_center_fill_set(o, EVAS_BORDER_FILL_SOLID);
|
efl_gfx_image_center_fill_mode_set(o, EFL_GFX_CENTER_FILL_MODE_SOLID);
|
||||||
evas_object_show(o);
|
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||||
}
|
}
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -39,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++) evas_object_del(o_images[i]);
|
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop - do things */
|
/* loop - do things */
|
||||||
|
@ -50,18 +50,18 @@ static void _loop(double t, int f)
|
||||||
for (i = 0; i < OBNUM; i++)
|
for (i = 0; i < OBNUM; i++)
|
||||||
{
|
{
|
||||||
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 * 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);
|
||||||
evas_object_move(o_images[i], 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;
|
||||||
}
|
}
|
||||||
|
@ -93,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
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue