Compare commits

...

194 Commits

Author SHA1 Message Date
Wander Lairson Costa 9db3724e47 Skip ill formed lines
Summary:
Some lines reported by expedite are just informative, like the window
size. We skip lines that don't have the formatting we expect.

Fixes T8852

Reviewers: vtorri, raster

Reviewed By: raster

Maniphest Tasks: T8852

Differential Revision: https://phab.enlightenment.org/D12186
2020-11-10 08:31:13 +00:00
Vincent Torri 7c4bebe47e Windows: remove Evil dependency, general cleanup for Windows
Test Plan: compilation and execution

Reviewers: raster

Differential Revision: https://phab.enlightenment.org/D12039
2020-07-07 13:39:31 +01:00
Hermet Park d6a3eb3dec containing ui setup steps in the profiling again.
This change is for compatibility to compare the new measurement with the past existing ones.

Now we proprly fix the missing setup steps in the profiling.
2019-12-30 16:00:56 +09:00
Hermet Park 7746bbb039 Revert "Revert "Setup before starting fps measurement""
This reverts commit cac6ca6a9a.
2019-12-30 15:42:29 +09:00
Hermet Park 46e328404c update version properly.
We can upgrade version to 1.24 when efl 1.24 is released.
2019-12-30 15:36:16 +09:00
Hermet Park 1c16ed647b remove shadow(unused) variables. 2019-12-30 13:57:55 +09:00
Hermet Park 5ca60ccf22 fix xconfigure errors. 2019-12-30 13:51:41 +09:00
Hermet Park deb3905a32 bump up version 2019-12-30 13:29:21 +09:00
Hermet Park cac6ca6a9a Revert "Setup before starting fps measurement"
This reverts commit 7874ae718f.
2019-12-30 13:25:44 +09:00
Hermet Park b72d775b10 proxy_textblock: increase a factor to update animation properly. 2019-12-27 15:03:51 +09:00
Hermet Park aee23715a2 text_style_different_string: increase a factor to update animation properly. 2019-12-27 13:50:25 +09:00
Hermet Park 7dca83b4e5 add one more resolution item. 2019-12-27 13:37:25 +09:00
Hermet Park a4d6ef526a version up efl dependency.
Some new efl interfaces are applied.
2019-12-27 13:29:23 +09:00
Hermet Park b84865bb12 image_blend_occlude_few: increase a factor to update animation properly. 2019-12-26 17:50:26 +09:00
Hermet Park 67771fd4a6 textblock_intl: increase a factor to update animation properly. 2019-12-26 17:22:10 +09:00
Hermet Park 4828d1a5d5 textblock_basic: increase an factor to update animation properly. 2019-12-26 17:07:55 +09:00
Hermet Park f3e0448bd3 fix array bounds overflow. 2019-12-24 18:46:55 +09:00
Hermet Park d540c8420b add a resolution option 720p-p 2019-12-24 18:35:01 +09:00
Hermet Park 7874ae718f Setup before starting fps measurement
It's not good to include the setup in fps measurement,
Also, animator tick occur immediately when test item is selected.
We need to setup before it in order to avoid invalid objects access.
2019-12-24 15:14:51 +09:00
Hermet Park 03324357ed about: update to use new efl interface. 2019-12-24 14:37:16 +09:00
Hermet Park cf48e97379 proxy_textblock: update api call. 2019-12-24 14:33:58 +09:00
Hermet Park ae6cf1318b compare list item count properly,
and remove s9 resolution in the default list.
2019-12-23 21:39:09 +09:00
Hermet Park 9bb9dba018 ui: remove menu icon.
Unnecessary decoration that may cause user look it as a wrong display.
2019-12-23 21:10:25 +09:00
Hermet Park 858246e2dd fix broken menu selection.
booo. efl_input_pointer_mouse_get() doesn't work.

This is a temporary fix for expedite working back.
2019-12-23 20:57:51 +09:00
Hermet Park a2bc36a91d proxy_textblock: correct textblock class name. 2019-12-23 19:53:16 +09:00
Cedric BAIL 08dd13567e Migrate to new font family API. 2019-12-06 09:29:22 -08:00
Cedric Bail ac6a3bcb44 Updated to fit EFL 1.23 API. 2019-09-25 10:26:17 -07:00
Cedric Bail 105e6568a4 main: lookup for the right file thanks error warning in Efl! 2019-09-25 10:25:47 -07:00
Ali Alzyod dc6c931dc2 evas_textblock: add test for parsing styles time (fill_format)
speed test for setting parsing formats during layot_setup stage
this is related to D9536
Differential Revision: https://phab.enlightenment.org/D9541
2019-08-12 10:12:00 -07:00
Cedric BAIL 4e6dd92826 add new test for 9patch files. 2019-08-09 11:03:42 -07:00
Cedric BAIL 6c2c96b622 add new test for stretchable zone support on image object. 2019-08-09 11:03:42 -07:00
Mike Blumenkrantz ba687d4b20 mark clippers static in previous 3 tests
Reviewers: cedric

Reviewed By: cedric

Tags: #expedite

Differential Revision: https://phab.enlightenment.org/D8888
2019-08-09 12:40:21 -04:00
Mike Blumenkrantz 735ca81d6b add a clipped textblock proxy test
Summary:
this renders a classic text passage split in twain between a real textblock
and a proxy render of the textblock to mimic rendering only a textblock

also provides a define for easily testing against raw textblock render perf
Depends on D8877

Reviewers: cedric, Hermet

Reviewed By: Hermet

Subscribers: Hermet

Tags: #expedite

Differential Revision: https://phab.enlightenment.org/D8878
2019-05-13 07:57:08 -04:00
Mike Blumenkrantz 37093983bf add clipped image proxy test
Summary:
this is a test with lots of image proxies which have clippers
Depends on D8836

Reviewers: cedric

Reviewed By: cedric

Tags: #expedite

Differential Revision: https://phab.enlightenment.org/D8877
2019-05-13 07:56:56 -04:00
Mike Blumenkrantz 3a1058aab1 add test for a clipped masked image
Summary:
this test is the same as one of the other mask tests (I forgot which)
but it clips the mask and then moves/resizes the mask crazily to make
the performance really bad

Reviewers: cedric

Reviewed By: cedric

Tags: #expedite

Differential Revision: https://phab.enlightenment.org/D8836
2019-05-13 07:56:19 -04:00
Lauro Moura 9fd3c26a5e 2to3 modifications to expedite-cmp
Make expedite-cmp runnable with py3

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8700
2019-04-24 09:56:57 -07:00
Cedric BAIL b624cde117 enable git phab to work with expedite repo. 2019-04-24 09:56:56 -07:00
Cedric BAIL 555b18dbaa Update use of buffer map that must specify a valid buffer size now. 2019-03-22 16:21:59 -07:00
Cedric BAIL bbc29b232b Disable debugging code. 2019-03-22 16:15:50 -07:00
Cedric BAIL cd761e5093 Update use of VG API after EFL update. 2019-03-22 16:13:05 -07:00
Cedric BAIL bea0e934ad Last warning to fix. 2019-03-13 17:31:13 -07:00
Cedric BAIL 6feba0405c Stop computing useless number. 2019-03-13 17:24:32 -07:00
Cedric BAIL 0f1d9a77e5 efl: migrate to the new efl_gfx_stack_raise_to_top and efl_gfx_stack_lower_to_bottom. 2019-03-13 17:21:51 -07:00
Cedric BAIL 00ffe9ca86 efl: we now require the Efl_Ui.h header for all the new Eo object. 2019-03-13 17:19:06 -07:00
Cedric BAIL 153818c6bc efl: use new API efl_file_simple_load. 2019-03-13 17:19:06 -07:00
Cedric BAIL a12ab95df0 build: add support for meson build system. 2019-03-13 17:19:06 -07:00
Hermet Park 6a69955e71 up to date version dependency. 2018-06-19 08:18:03 +09:00
Mike Blumenkrantz 27e5e02370 update efl api usage to work with current master
this is a bit hacky in some places where I created wrappers to avoid
having to manually rewrite dozens of function calls in places where I was
unable to sed/awk the changes that were needed

this is a dead project, so submitting such a massive machine-generated patch
for review would be futile. any bugs will probably never be seen since this
app is no longer used

ref T7037
2018-06-18 18:20:58 -04:00
Hermet Park 1587f3e5ea update AUTHORS 2017-10-14 22:57:00 +08:00
Daniel Hirt 9cdc8c68a7 Textblock: fix textblock_basic test
Test's text was changed some time ago, changing the escaped strings e.g.
"&gt;" to "&gt" (i.e. without ";").
Thus, only the starting portion of the text got shown.
Now it's fixed.
2017-06-14 08:20:41 +03:00
Cedric BAIL fe8e23cbc6 make it possible to follow output tick. 2017-06-13 14:33:56 -07:00
Stefan Schmidt e7b11dd328 build: make sure we check for c99 during configure
We have some c99 code in expedite (loop initial declarations) and some
setups bail out when trying to use c89 here. EFL is already enforcing
c99 and compilers have catched up a long time ago.

Fixes T5440
2017-05-10 13:22:22 +02:00
Jean-Philippe Andre 0529ce56b6 images: Fix YUV and other image data tests 2017-01-11 11:10:41 +09:00
Cedric BAIL f59b164351 attempt to use the new buffer_copy_set API.
It does currently crash or fails. Seems to me like an evas issue.
2016-12-27 11:56:49 -08:00
Cedric BAIL cd80106f54 force maximum throughput with latest Ecore_Evas change. 2016-12-27 10:50:05 -08:00
Hermet Park e2a2ef4f86 fix build break.
replace efl_gfx_shape to efl_gfx_path.

Still expedite is screwed up at behaviors... :(
2016-12-02 11:15:35 +09:00
Carsten Haitzler 4ab2935364 expedite ui - stop using invalid argb values 2016-11-11 11:59:02 +09:00
Subhransu Mohanty 525879533a fixed the build break because of api change.
Summary: NOTE: need to check if the api replacements are correct or not

Reviewers: Hermet, jpeg

Differential Revision: https://phab.enlightenment.org/D4329
2016-10-10 14:09:23 +09:00
Hermet Park 46e58922fe ui: fix all eo_event syntax changes.
Eo_Event -> Efl_Event
2016-10-10 14:08:30 +09:00
Jean-Philippe Andre 19657b6d25 ui: Fix build break due to eo api changes (input events) 2016-08-30 15:45:39 +09:00
Hermet Park 05a29c965a fix eo break.
Its api are still unstable. make it work again.
2016-08-22 19:00:56 +09:00
Jean-Philippe Andre ffa005ea3d Switch back to eo_del.
This was a brutal eo_unref -> eo_del. Should be good enough.
2016-07-19 19:03:49 +09:00
Jean-Philippe Andre 95d6a6cd9a Fix compilation for git master (1.18-alpha) 2016-07-19 19:03:49 +09:00
Daniel Hirt e79517e490 Fix build after EFL_CANVAS_RECTANGLE_CLASS change 2016-06-08 10:02:08 +00:00
Jean-Philippe Andre 74007f65bc Fix compilation - use eo_unref and buffer map
Remove eo api usage for TEXT and LINE objects.
This is a very quickly made patch, in order to test. Expedite
tests might need to be fixed up a little bit more if we use eo_halt.

Running expedite spews out TONS of errors.
2016-05-26 18:48:51 +09:00
Tom Hacohen 9a98d6376b Adjust according to the eo event member changes. 2016-04-12 15:27:38 +01:00
Jean-Philippe Andre 185fe20e88 Remove efl_gfx_filled_set() as eo-created images are filled
This is a behaviour change between legacy and eo apis.
To be discussed, of course, if someone disagrees.
2016-03-18 15:02:37 +09:00
Jean-Philippe Andre f7fa84bf93 ui: add more keyboard controls (home/end/pageup/pagedown)
Add support for: up/down/pageup/pagedown/home/end
There behaviour kinda makes sense visually, not logically (ie.
up goes to the left, pageup also, home also).

I didn't add any hint on the ui, just press the keys and test :)
2016-03-18 15:00:29 +09:00
Cedric BAIL f8b38f6c24 migrate to new broken data_get/set api. 2016-03-17 16:54:20 -07:00
Cedric BAIL f9834c142c migrate to new snapshot object. 2016-03-17 16:54:05 -07:00
Cedric BAIL adea5d2b26 migrate to new proxy object. 2016-03-17 16:53:50 -07:00
Cedric BAIL 051a4ec0cf migrate to new efl api. 2016-03-17 16:53:27 -07:00
Cedric BAIL 24eca8a778 evas: use new efl interface polygon API 2016-03-14 15:12:25 -07:00
Tom Hacohen a927cdd1a4 Revert "Automatic migration to the new eo_add syntax."
We reverted those changes.

This reverts commit 1c99584bcb.
2016-03-11 12:40:21 +00:00
Tom Hacohen 1c99584bcb Automatic migration to the new eo_add syntax. 2016-03-09 16:31:15 +00:00
Tom Hacohen 088df1425e Adjust according to recent Eo4 changes. 2016-03-03 14:03:49 +00:00
Tom Hacohen 1c72554acc Eo events: Migrate to the new eo event cb signature. 2016-02-29 11:38:38 +00:00
Nicolas Aguirre 58857a657c expedite: Add 1080p portrait resolution. 2015-11-16 17:11:55 +01:00
Jean-Philippe Andre 91ca743b85 Fix filter in snapshot test
Snaphot objects are opaque. So a color with alpha < 255 is not
valid. I kinda wonder:
- if snapshot objects should really be opaque
- should this have been properly handled by the image object?
2015-10-12 16:56:16 +09:00
Cedric BAIL 9cf0688f99 vg: fix inapropriate parenting of gradient. 2015-09-15 07:45:13 +02:00
Jean-Philippe Andre 6c1e40666d snapshot: simplify filter code. 2015-08-06 11:14:50 +02:00
Cedric BAIL 8e8a079515 snapshot: add a test with blur. 2015-08-06 11:14:40 +02:00
Yakov Goldberg 3ce8b3f145 vector: add a basic circle test
Separate test for circle was added because results are quite
different for shapes/backends

For Cairo backend: rect == 0.72, circle = 0.32 -> 125% slower
For Freetype backend: rect == 2.81, circle = 2.26 -> 24% slower
2015-06-30 11:44:28 +03:00
Yakov Goldberg cc4fa8a76e vector: re-add a basic rect test 2015-06-30 11:44:23 +03:00
Yakov Goldberg 0d6c86f4ab Rename test: VG Basic -> Vg Basic Gradient 2015-06-30 10:58:01 +03:00
Cedric BAIL c290c2d15c expedite: add ability to dump any frame. 2015-06-25 18:30:26 +02:00
Cedric BAIL 014001fb20 font_effect: fix JP borking. 2015-06-25 17:56:26 +02:00
Cedric BAIL 7de69008b4 expedite: remove FIXME that is already fixed. 2015-06-25 17:27:53 +02:00
Yakov Goldberg b1931c5146 vector: add a scaling test 2015-06-23 17:11:48 +03:00
Yakov Goldberg 817b8c3500 Use premultiplied colors in stroke's color 2015-06-18 10:05:57 +03:00
Yakov Goldberg 4aa37445c5 vector: add a basic test (no change, just moving). 2015-06-16 17:25:43 +02:00
Cedric BAIL 9b7d97d503 move to EFL 1.14 interfaces. 2015-04-09 13:31:59 +02:00
Jean-Philippe Andre accb76125f Add arcconfig file
Differential Revision: https://phab.enlightenment.org/D1961
2015-02-12 11:47:23 +09:00
jiin.moon c4dfca2b01 expedite: add test case for image masking
Summary: Add some test case to the expedite

Reviewers: jpeg, cedric, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1896

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-11 18:57:14 +01:00
Daniel Zaoui 09456566a3 Text: Fix segfault when a test is re-executed.
It happens in the text append test. One of the internal pointers was
pointing to freed memory.
2014-11-20 11:41:47 +02:00
Jean-Philippe Andre 0a40a87039 Fix support of --count from command line
expedite would never exit after N loops
2014-10-22 15:49:25 +09:00
Jean-Philippe Andre 0774f2ceeb UI main loop: Fix indentation 2014-10-22 15:19:05 +09:00
ChunEon Park 6d76a78b23 print a message when it fails to create ecore evas. 2014-10-06 22:15:23 +09:00
Savio Sena 776268d077 expedite: fix to follow the new eo_add semantics.
Summary:
Please see EFL's commit a7560dbc61953c3652780f232e38adbd2d711972 for
more information.

@fix

Reviewers: cedric, tasn

Subscribers: felipealmeida

Differential Revision: https://phab.enlightenment.org/D1494

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-09-27 11:23:39 +02:00
Cedric BAIL 578c0b4318 fix wrong ordering of report. 2014-09-04 14:21:20 +02:00
Cedric BAIL 12a8257451 update configuration version to EFL number. 2014-08-22 18:29:02 +02:00
Cedric BAIL 74d732c094 Move to EFL 1.12 interface. 2014-08-22 18:29:02 +02:00
Cedric BAIL 3ef31223f6 cleanup, remove warning, useless if and tab . 2014-08-22 18:29:02 +02:00
Cedric BAIL 281bbd90fd move to use Ecore and Ecore_Evas. 2014-08-22 18:28:59 +02:00
Stefan Schmidt ec0863e6ed engine_drm: Fix typo in error message 2014-07-10 12:34:08 +02:00
Cedric BAIL bacba21ab0 eo: fix build due to change in the Eo API.
Apparently nobody is running expedite this days...
2014-06-25 10:47:42 +02:00
Tom Hacohen acf7130b52 Update code according to the recent eolian generation changes. 2014-06-03 14:21:17 +01:00
Tom Hacohen 4848c66d47 Adjust code to use the slightly different Eo2 API.
With Eo2 you can return values directly without the need to use
a pointer
(use the C return).

For example:
eo_do(obj, elm_object_text_get(&text));
becomes:
eo_do(obj, text = elm_object_text_get());

@feature
2014-04-10 09:54:23 +01:00
Tom Hacohen ea387769f5 Adjusted code to use the Eo2 API. 2014-04-03 12:27:57 +01:00
ChunEon Park 4e5cac21bf added Jaeun Choi to author list. 2014-03-25 14:03:03 +09:00
Jean-Philippe Andre 26ba629f00 Fix previous commit's API usage and improve layout
Font effects now have "padding_set" which will fix the geometry
of the text object. Thanks to Jaeun for preparing this work :)
2014-03-25 11:56:29 +09:00
Jaeun Choi c3890ffeb1 Add font effect tests (alpha blur, rgba blur)
Patch by eunue (Jaeun Choi): D658
2014-03-25 11:34:27 +09:00
Chris Michael d68739908f expedite: Use proper engine field name
@bugfix: The engine field name for Drm engine changed in master.
Update expedite drm engine code to match.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-06 14:39:54 +00:00
Carsten Haitzler c52f943e6e add 1050p mode for output res 2014-03-04 14:56:06 +09:00
Cedric Bail 01ff7df1f2 expedite: report the resolution size in pixels in help. 2014-02-28 13:05:11 -03:00
Cedric Bail 21d03f8a61 expedite: add Samsung Serie 9 resolution. 2014-02-28 12:59:54 -03:00
Cedric Bail 5aa277e4d8 expedite: report when building drm support. 2014-02-28 12:58:25 -03:00
Chris Michael d846790c37 expedite: Add support for setting vsync in drm engine
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 12:42:35 +00:00
Chris Michael 3571eef532 Add expedite drm engine files
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-12 08:22:48 +00:00
Chris Michael 64cdd1677e Add expedite drm engine functions if built with drm engine support
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-12 08:22:11 +00:00
Chris Michael e6442777a4 Add expedite drm header to includes if building with drm support
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-12 08:21:22 +00:00
Chris Michael ac729f10f4 Add drm build sources for expedite drm tests
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-12 08:20:48 +00:00
Chris Michael bccac2adec Add build option for drm engine
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-12 08:20:05 +00:00
Chris Michael 5174c08f1f Fix expedite to build for wayland engines
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-12 08:18:04 +00:00
Chris Michael 196b527d51 Fix expedite to build for wayland engines
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-12 08:17:49 +00:00
Chris Michael 5f70cec6e5 Fix expedite to build for wayland engines
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-12 08:16:27 +00:00
Chris Michael 840686042a Fix expedite building with wayland engines.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-12 08:10:04 +00:00
Thanatermesis a5e6af917a document the -y option in the default help output 2013-12-02 17:12:30 +01:00
Daniel Zaoui 19e674eeef Fix (from devilhorns) expedite built in the case that we have wayland libraries installed,
but do not have EFL built with wayland support

Hey Devilhorns, I am drunk and I just want to sleep but I promised you
to push it so...
2013-10-23 02:37:10 +03:00
Cedric Bail 36fa887496 expedite: use beta API. 2013-07-23 11:29:11 +09:00
Cedric Bail a829f37b83 expedite: request Eo EFL API. 2013-06-28 10:21:21 +09:00
Cedric Bail 1a9f0c74ae expedite: cleanup formatting. 2013-06-28 10:20:52 +09:00
Chris Michael 394ce6a170 Flush display events after dispatching.
NB: speedup in fps.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-26 13:55:27 +01:00
Chris Michael 3c7b6797da Flush display events after dispatching
NB: slight speedup in fps.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-26 13:54:59 +01:00
Chris Michael 504bb0e2bb If we cannot connect to the wayland display, then print an error and
exit.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-26 12:53:00 +01:00
Chris Michael 078473137f Add missing initializer for wl_seat_listener name function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-26 12:39:47 +01:00
Carsten Haitzler 5dabf01fca fix valgrind complaint in proxy test 2013-06-11 11:35:43 +09:00
Daniel Juyung Seo 02f1fb2a92 Applied recent evas_canvas_render_async API change.
-EAPI Eina_Bool         evas_render_async(Evas *e, Evas_Event_Cb func, void *data) EINA_ARG_NONNULL(1);
+EAPI Eina_Bool         evas_render_async(Evas *e) EINA_ARG_NONNULL(1);
2013-03-27 09:32:11 +09:00
Christopher Michael b5916516c1 We should use dispatch_pending here.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84381
2013-02-26 14:51:11 +00:00
Carsten Haitzler 4689ceb088 add new test to expedite.
SVN revision: 84374
2013-02-26 09:53:51 +00:00
Cedric BAIL 244a1da63c expedite: test and benchmark lines.
SVN revision: 84039
2013-02-18 06:50:33 +00:00
Eduardo Lima (Etrunko) 81676f217d Remove unecessary code
With the fresh new Evas Wayland SHM engine, it is not necessary to handle with
surface damage and commits anymore. Also let's not synchronize the rendering
with the compositor, because we want to be as fast as possible for the sake of
the benchmark.

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>



SVN revision: 83329
2013-01-25 13:24:17 +00:00
ChunEon Park dce0fb3159 expedite - removed filter/mask codes
SVN revision: 83323
2013-01-25 10:55:11 +00:00
Christopher Michael a9e39877d2 Modify expedite wayland shm engine to work with new Evas one.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 83295
2013-01-24 12:16:33 +00:00
Yakov Goldberg 4db2eca350 ChangeLog, NEWS updated
Signed-off-by: Yakov Goldberg <yakov.g@samsung.com>

SVN revision: 83203
2013-01-24 07:20:42 +00:00
Yakov Goldberg f473d6996b adding if (obj) before eo_do(obj) to avoid Eo warning messages
"if (obj)" was added automatically before every "eo_do()" call.
Later I removed this check from some places, so they are clean.

Places, where check is still presenting,
could either cause warning, or not.

Signed-off-by: Yakov Goldberg <yakov.g@samsung.com>

SVN revision: 83181
2013-01-23 15:05:24 +00:00
Yakov Goldberg faf1579d35 expedite: porting to Eo
Signed-off-by: Yakov Goldberg <yakov.goldberg@gmail.com>

SVN revision: 83180
2013-01-23 15:05:09 +00:00
Cedric BAIL 42339e1e32 trunk: remove use of AM_PROG_CC_STDC as AC_PROG_CC does it.
Patch by Doug Newgard <scimmia22@outlook.com>


SVN revision: 82148
2013-01-04 05:49:26 +00:00
Carsten Haitzler 5090a74da4 if you use eo... link to it eh?
SVN revision: 81801
2012-12-28 13:51:09 +00:00
Cedric BAIL f0bca469a9 expedite: enable benchmarking of async renderer.
SVN revision: 81777
2012-12-28 03:24:07 +00:00
Cedric BAIL 1477f6b155 expedite: add back a expedite-cmp parsable output.
SVN revision: 79816
2012-11-29 07:01:54 +00:00
Eduardo Lima (Etrunko) 5e69c24b6e Don't leak struct wl_registry
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>



SVN revision: 79565
2012-11-23 17:49:39 +00:00
Eduardo Lima (Etrunko) 267f9e2106 Cleanup and Reuse Code
Most of those functions in engine_wayland_common.h should be static.
Also, move the shell surface listener to the common codebase.

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>



SVN revision: 79526
2012-11-21 22:17:45 +00:00
Eduardo Lima (Etrunko) 167611c5f1 Added support for wayland SHM too
Moved most of the seat/keyboard code to a common file so both shm and egl
engines can reuse the code.

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>



SVN revision: 79516
2012-11-21 15:45:20 +00:00
Eduardo Lima (Etrunko) d27dc525eb Added keyboard support for Wayland EGL
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>



SVN revision: 79515
2012-11-21 15:45:02 +00:00
Eduardo Lima (Etrunko) 7eab217299 Remove warnings
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>



SVN revision: 79514
2012-11-21 15:44:54 +00:00
Eduardo Lima (Etrunko) 05a2386517 Fill in NEWS and ChangeLog
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>



SVN revision: 79513
2012-11-21 15:44:45 +00:00
Rui Seabra 0333810d77 The previous commit was a slight fix on the efl spec for an error I made, its comment applies to this commit: adapt rpm specs to the new efl dependency instead of several independent dependencies.
SVN revision: 79419
2012-11-18 11:27:12 +00:00
Eduardo de Barros Lima 335a772168 Updated dev info and added myself to AUTHORS where relevant
SVN revision: 79155
2012-11-12 12:33:21 +00:00
Eduardo Lima (Etrunko) 8f5ebabc11 Move AM_CONDITIONAL to outside the if block
The configure script was failing fail if the --disable option for the wayland
engines were explicitly set.

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>



SVN revision: 79034
2012-11-09 18:23:17 +00:00
ChunEon Park 902905ef60 expedite - here is good to use EINA_LIST_FOREACH
SVN revision: 78880
2012-11-03 09:43:56 +00:00
ChunEon Park 164d8d26e0 expedite - fix changelog format
SVN revision: 78879
2012-11-03 09:40:20 +00:00
ChunEon Park 6f135f2734 expedite - calc weighted fps more clearly.
SVN revision: 78878
2012-11-03 09:39:59 +00:00
ChunEon Park 533fa58a7e expedite - let it print more meaningful words
SVN revision: 78827
2012-11-02 07:07:20 +00:00
ChunEon Park d78ed2e298 expedite - --white spaces & trailings.
SVN revision: 78825
2012-11-02 05:15:34 +00:00
Eduardo Lima (Etrunko) f81697bb99 Basic support for wayland engines
Next: Mouse/Keyboard support

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>



SVN revision: 78799
2012-11-01 15:57:18 +00:00
Eduardo Lima (Etrunko) 2913da1dca Configure: Add checks for Wayland Engines
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>



SVN revision: 78798
2012-11-01 15:57:05 +00:00
Eduardo Lima (Etrunko) 8ac751d68e Expedite: Remove software_16_X11 code
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>



SVN revision: 78402
2012-10-24 14:14:25 +00:00
Stefan Schmidt 0ff46d0f59 expedite: Ignore generated spec file
SVN revision: 76823
2012-09-18 14:14:41 +00:00
Vincent Torri a8133405ab Update changelog
SVN revision: 76334
2012-09-08 07:13:24 +00:00
Carsten Haitzler db7a4979d7 and up ver to 1.7.99 now in svn. nack to svnrev num at end.
SVN revision: 75869
2012-08-30 10:34:01 +00:00
Carsten Haitzler 7b0c11bf14 no this isnt release - this is simply me removing the beta tag so when
we release it's ready.



SVN revision: 75740
2012-08-27 10:24:41 +00:00
Carsten Haitzler 9659e746e0 update NEWS
SVN revision: 75736
2012-08-27 09:38:23 +00:00
Carsten Haitzler 3f67eb1f31 umm no - give the output filename not input. ie expedite.spec not
expedite.spec.in



SVN revision: 75408
2012-08-18 11:13:43 +00:00
Rui Seabra bddd638fa5 Update spec, make it autogenerated and add expedite.spec to svn:ignore
SVN revision: 75405
2012-08-18 08:24:07 +00:00
Carsten Haitzler 78f16260ba tag as beta...
SVN revision: 75344
2012-08-17 03:57:49 +00:00
Carsten Haitzler 6bf7790fa7 vincent wanted 16bit ddraw gone from expedite.. so it shall be!
SVN revision: 75204
2012-08-13 10:17:48 +00:00
Carsten Haitzler 2fc8dfa052 more updates for 1.7.0 alpha.
SVN revision: 75095
2012-08-10 10:51:17 +00:00
Carsten Haitzler 580d32d7b0 alpha release of 1.7 - let's roll. ALPHA!
SVN revision: 75091
2012-08-10 10:37:05 +00:00
Stefan Schmidt 1fcf0101f3 expedite: For the ifdefs we use Xinit we should include the header
SVN revision: 75077
2012-08-10 09:19:05 +00:00
Stefan Schmidt fc24feaee2 expedite: Switch to newer keycode to keysym handling from XKBlib.h
SVN revision: 75076
2012-08-10 09:19:01 +00:00
Stefan Schmidt ad8e7a7e8c expedite: Remove unused vars and paramater copy and pasted around
SVN revision: 75075
2012-08-10 09:18:57 +00:00
Stefan Schmidt 4311466d1a expedite: Don'T compare signed and unsigned values.
t_count gets only incrmented and starts with 0. Safe to make it unsigned which make its sane to
comapre against another unsigned value in i.

SVN revision: 75074
2012-08-10 09:18:52 +00:00
Youness Alaoui 5fb6f8bccf Expedite: Applying same patch as the one I put for sdl engine on September 7th.
Expedite: Fix bug with mouse handling in sdl engine
    A button press would send '1' as the button (the pressed state) and the
    release would send '0', so evas would think button 1 was never released
    so it would never register any button releases.

SVN revision: 74322
2012-07-23 11:58:57 +00:00
Carsten Haitzler 2fb9aeef35 update all versions in @sincs, README's and configure.ac's etc. to
reflect a unified release version, for now 1.6.99.



SVN revision: 73498
2012-07-09 10:20:21 +00:00
Cedric BAIL 025ea406ee expedite: don't leak Evas_Map.
SVN revision: 73272
2012-07-04 12:02:17 +00:00
ChunEon Park 3f6aa28951 expedite - updated AUTHORS
SVN revision: 72166
2012-06-15 06:46:57 +00:00
ChunEon Park 8030912040 expedite - fixed mouse grab lost problem.
when the mouse cursor goes to outside of the window, then the mouse up event in the rect would be skipped (is it correct?)
So the down would be never 0 again.

We can make it simpler and working better also. 



SVN revision: 71713
2012-06-05 12:25:59 +00:00
ChunEon Park 0375436758 expedite - fixed indentations before fixing a bug
SVN revision: 71712
2012-06-05 12:21:17 +00:00
Vincent Torri f161656713 expedite: fix label
SVN revision: 70938
2012-05-12 08:23:59 +00:00
Cedric BAIL d6821d5d8b expedite: don't overallocate things.
SVN revision: 70609
2012-05-02 06:57:59 +00:00
Carsten Haitzler 22b8898cfa remove expedite oe file - in oe and maintained now.
SVN revision: 70551
2012-04-30 09:47:27 +00:00
Cedric BAIL f9d52d4767 efl: add release point in ChangeLog files.
SVN revision: 70494
2012-04-26 08:07:22 +00:00
Carsten Haitzler f50d7a0b64 restore .99 micro versions for trunk and add back svnrev vers too.
SVN revision: 70492
2012-04-26 04:51:32 +00:00
193 changed files with 6004 additions and 9824 deletions

6
.arcconfig Normal file
View File

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

1
.gitignore vendored
View File

@ -17,6 +17,7 @@ configure
data/Makefile
data/Makefile.in
depcomp
expedite.spec
install-sh
ltmain.sh
m4/libtool.m4

View File

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

View File

@ -1,3 +1,39 @@
2011-12-02 Carsten Haitzler (The Rasterman)
2011-12-02 Carsten Haitzler (The Rasterman)
1.1.0 release
* 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
View File

@ -1,14 +1,368 @@
COMPILING and INSTALLING:
Installation Instructions
*************************
If you got a official release tar archive do:
./configure
( otherwise if you got this from enlightenment cvs do: ./autogen.sh )
Then to compile:
make
Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
Foundation, Inc.
To install (run this as root, or the user who handles installs):
make install
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
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.

27
NEWS
View File

@ -1,3 +1,30 @@
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:

2
README
View File

@ -1,4 +1,4 @@
Expedite 1.2.0
Expedite 1.7.99
******************************************************************************

View File

@ -3,246 +3,61 @@ dnl Process this file with autoconf to produce a configure script.
# get rid of that stupid cache mechanism
rm -f config.cache
AC_INIT([expedite], [1.2.0], [enlightenment-devel@lists.sourceforge.net])
AC_INIT([expedite], [1.23.0], [enlightenment-devel@lists.sourceforge.net])
AC_PREREQ([2.52])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([1.6 dist-bzip2])
AM_INIT_AUTOMAKE([1.6 dist-xz])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
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)
# 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
AC_ISC_POSIX
m4_ifdef([AC_PROG_OBJC],
[
AC_PROG_OBJC
_AM_DEPENDENCIES(OBJC)
],
[
AC_CHECK_TOOL([OBJC], [gcc])
AC_SUBST([OBJC])
AC_SUBST([OBJCFLAGS])
]
)
AC_PROG_CXX
AC_PROG_CC
LT_PROG_RC
### Checks for libraries
# Evil library for compilation on Windows
# 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
mingw32*)
PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0])
AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
;;
esac
AC_SUBST(requirement_expedite)
# Eina
PKG_CHECK_MODULES([EINA], eina >= 1.2.0)
# Evas
PKG_CHECK_MODULES([EVAS], evas >= 1.2.0 eet >= 1.6.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
PKG_CHECK_MODULES([SDL], [sdl], [have_sdl="yes"], [have_sdl="no"])
AM_CONDITIONAL(BUILD_SDL, test "x$have_sdl" = "xyes")
if test "x$have_sdl" = "xyes"; then
AC_DEFINE(BUILD_SDL, 1, [build sdl support])
fi
# 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")
PKG_CHECK_MODULES([EFL], [${requirement_expedite}])
EFL_ENABLE_EO_API_SUPPORT
EFL_ENABLE_BETA_API_SUPPORT
### Checks for header files
### Checks for types
### Checks for structures
### Checks for compiler characteristics
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_CONST
AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_C___ATTRIBUTE__
WIN32_CFLAGS=""
case "$host_os" in
cegcc*)
WIN32_CFLAGS="-mwin32"
;;
esac
AC_SUBST(WIN32_CFLAGS)
EXPEDITE_CXXFLAGS=""
AC_LANG_PUSH([C++])
CXXFLAGS_save="${CXXFLAGS}"
CXXFLAGS="${CXXFLAGS} -fno-rtti -fno-exceptions"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[]])],
[have_cxx_flags="yes"],
[have_cxx_flags="no"])
AC_MSG_CHECKING([whether the compiler supports -fno-rtti -fno-exceptions])
AC_MSG_RESULT([${have_cxx_flags}])
CXXFLAGS="${CXXFLAGS_save}"
if test "x${have_cxx_flags}" = "xyes" ; then
EXPEDITE_CXXFLAGS="-fno-rtti -fno-exceptions"
if test "x${ac_cv_prog_cc_c99}" = "xno" ; then
AC_MSG_ERROR([expedite requires a c99-capable compiler])
fi
AC_LANG_POP([C++])
AC_SUBST(EXPEDITE_CXXFLAGS)
### Checks for linker characteristics
lt_enable_auto_import=""
case "$host_os" in
mingw* | cegcc*)
lt_enable_auto_import="-Wl,--enable-auto-import"
;;
esac
AC_SUBST(lt_enable_auto_import)
### Checks for library functions
AC_CHECK_FUNCS([sync])
@ -250,6 +65,7 @@ AC_CHECK_FUNCS([sync])
AC_OUTPUT([
Makefile
expedite.spec
src/Makefile
src/bin/Makefile
data/Makefile
@ -258,24 +74,6 @@ data/Makefile
echo
echo " $PACKAGE $VERSION"
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 " prefix.......................: ${prefix}"
echo

BIN
data/9patch_test.9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

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

61
data/meson.build Normal file
View File

@ -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'))

BIN
data/stretch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
data/vector.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -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}"

View File

@ -1,20 +1,23 @@
# Note that this is NOT a relocatable package
%define ver 0.7.0
%define rel 1
%define _missing_doc_files_terminate_build 0
%{!?_rel:%{expand:%%global _rel 0.enl%{?dist}}}
%define ver @VERSION@
%define rel %{_rel}
%define prefix /usr
Summary: expedite
Name: expedite
Version: %ver
Release: %rel
Copyright: BSD
License: BSD
Group: System Environment/Desktops
Source: ftp://ftp.enlightenment.org/pub/enlightenment/expedite-%{ver}.tar.gz
BuildRoot: /var/tmp/expedite-root
Packager: The Rasterman <raster@rasterman.com>
URL: http://www.enlightenment.org/
BuildRequires: evas-devel
Requires: evas
BuildRequires: efl-devel
Requires: efl
%description

5
m4/efl_beta.m4 Normal file
View File

@ -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])
])

6
m4/efl_eo.m4 Normal file
View File

@ -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])
])

63
meson.build Normal file
View File

@ -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')

View File

@ -6,13 +6,7 @@ AM_CPPFLAGS = \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
@EINA_CFLAGS@ \
@EVAS_CFLAGS@ \
@x_cflags@ \
@SDL_CFLAGS@ \
@DIRECTFB_CFLAGS@ \
@XCB_CFLAGS@ \
@EVIL_CFLAGS@
@EFL_CFLAGS@
bin_PROGRAMS = expedite
bin_SCRIPTS = expedite-cmp
@ -55,6 +49,8 @@ image_blend_smooth_solid_same_scaled.c \
image_blend_border.c \
image_blend_solid_middle_border.c \
image_blend_solid_border.c \
image_blend_solid_stretch.c \
image_blend_solid_9patch.c \
image_blend_border_recolor.c \
image_map_rotate.c \
image_map_solid_rotate.c \
@ -91,6 +87,7 @@ textblock_basic.c \
textblock_intl.c \
textblock_auto_align.c \
textblock_text_append.c \
textblock_text_fill_format.c \
rect_blend.c \
rect_blend_pow2.c \
rect_solid.c \
@ -112,127 +109,36 @@ image_blend_occlude3_very_many.c \
poly_blend.c \
proxy_image.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 \
#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_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 $@
expedite_LDADD = @EFL_LIBS@ -lm
EXTRA_DIST = $(bin_SCRIPTS)

View File

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

View File

@ -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);
}

View File

@ -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__ */

View File

@ -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));
}

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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

View File

@ -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)
{
}

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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);
}

View File

@ -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__ */

View File

@ -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);
}

View File

@ -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__ */

View File

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

View File

@ -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);
}

View File

@ -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

View File

@ -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);
}

View File

@ -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__ */

View File

@ -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);
}

View File

@ -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__ */

View File

@ -1,242 +0,0 @@
#include <assert.h>
#include "main.h"
#include <SDL/SDL.h>
#include <Evas_Engine_Buffer.h>
static void *
_expedite_sdl_switch_buffer(void *data, void *dest __UNUSED__)
{
SDL_Flip(data);
return ((SDL_Surface*)data)->pixels;
}
Eina_Bool
engine_software_sdl_args(const char *engine, int width, int height)
{
int ok = 0;
if (!strcmp(engine, "sdl")) ok = 1;
if (!ok) return EINA_FALSE;
if (ok == 1)
{
Evas_Engine_Info_Buffer *einfo;
evas_output_method_set(evas, evas_render_method_lookup("buffer"));
einfo = (Evas_Engine_Info_Buffer *) evas_engine_info_get(evas);
if (einfo)
{
SDL_Init(SDL_INIT_NOPARACHUTE);
if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0)
{
printf("SDL_Init failed with %s", SDL_GetError());
SDL_Quit();
return EINA_FALSE;
}
einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_RGB32;
einfo->info.switch_data = SDL_SetVideoMode(width, height, 32, SDL_HWSURFACE | SDL_DOUBLEBUF);
if (!einfo->info.switch_data)
{
printf("SDL_SetVideoMode failed !");
return EINA_FALSE;
}
SDL_SetAlpha(einfo->info.switch_data, SDL_SRCALPHA, 0);
SDL_FillRect(einfo->info.switch_data, NULL, 0);
einfo->info.dest_buffer = ((SDL_Surface*)einfo->info.switch_data)->pixels;
einfo->info.dest_buffer_row_bytes = width * sizeof (int);
einfo->info.use_color_key = 0;
einfo->info.alpha_threshold = 0;
einfo->info.func.new_update_region = NULL;
einfo->info.func.free_update_region = NULL;
einfo->info.func.switch_buffer = _expedite_sdl_switch_buffer;
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
{
printf("evas_engine_info_set() for engine 'sdl' with 'buffer' backend failed.");
return EINA_FALSE;
}
}
}
return EINA_TRUE;
}
void
engine_software_sdl_loop(void)
{
SDL_Event event;
int rmethod;
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:
rmethod = evas_output_method_get(evas);
if (rmethod == evas_render_method_lookup("buffer"))
{
Evas_Engine_Info_Buffer *einfo;
einfo = (Evas_Engine_Info_Buffer *) evas_engine_info_get(evas);
if (einfo)
{
einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_RGB32;
einfo->info.switch_data = SDL_SetVideoMode(event.resize.w, event.resize.h, 32, SDL_HWSURFACE | SDL_DOUBLEBUF);
if (!einfo->info.switch_data)
{
return ;
}
SDL_SetAlpha(einfo->info.switch_data, SDL_SRCALPHA, 0);
SDL_FillRect(einfo->info.switch_data, NULL, 0);
einfo->info.dest_buffer = ((SDL_Surface*)einfo->info.switch_data)->pixels;
einfo->info.dest_buffer_row_bytes = event.resize.w * sizeof (int);
einfo->info.use_color_key = 0;
einfo->info.alpha_threshold = 0;
einfo->info.func.new_update_region = NULL;
einfo->info.func.free_update_region = NULL;
einfo->info.func.switch_buffer = _expedite_sdl_switch_buffer;
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
{
return ;
}
}
}
evas_output_viewport_set(evas, 0, 0,
event.resize.h, event.resize.w);
evas_output_size_set(evas, event.resize.h, 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)
{
}

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

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

View File

@ -1,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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -23,11 +23,11 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
evas_object_image_file_set(o, build_path("bar.png"), NULL);
evas_object_image_border_set(o, 6, 6, 6, 6);
evas_object_show(o);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("bar.png"), NULL);
efl_gfx_image_border_insets_set(o, 6, 6, 6, 6);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -36,7 +36,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -47,22 +47,22 @@ static void _loop(double t, int f)
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
evas_object_move(o_images[i], x, y);
evas_object_resize(o_images[i], w, h);
evas_object_image_fill_set(o_images[i], 0, 0, w, h);
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -94,8 +94,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -23,12 +23,12 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
evas_object_image_file_set(o, build_path("pan.png"), NULL);
evas_object_color_set(o, 64, 64, 64, 255);
evas_object_image_border_set(o, 3, 3, 3, 3);
evas_object_show(o);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("pan.png"), NULL);
efl_gfx_color_set(o, 64, 64, 64, 255);
efl_gfx_image_border_insets_set(o, 3, 3, 3, 3);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -37,7 +37,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -48,22 +48,22 @@ static void _loop(double t, int f)
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
evas_object_move(o_images[i], x, y);
evas_object_resize(o_images[i], w, h);
evas_object_image_fill_set(o_images[i], 0, 0, w, h);
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -95,8 +95,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -24,16 +24,16 @@ static void _setup(void)
for (i = 0; i < OBNUM; i++)
{
int a;
o = evas_object_image_add(evas);
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);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
a = 256 - (1 << ((rnd() % 8) + 1));
if (a < 128) a = 128;
evas_object_color_set(o, a, a, a, a);
evas_object_show(o);
efl_gfx_color_set(o, a, a, a, a);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -42,7 +42,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -53,18 +53,18 @@ static void _loop(double t, int f)
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);
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -96,8 +96,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -24,15 +24,14 @@ static void _setup(void)
for (i = 0; i < OBNUM; i++)
{
int a;
o = evas_object_image_add(evas);
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);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
a = rnd()&0xff;
evas_object_color_set(o, a, a, a, a);
evas_object_show(o);
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_color_set(o, a, a, a, a);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -41,7 +40,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -52,18 +51,18 @@ static void _loop(double t, int f)
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);
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -95,8 +94,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -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

View File

@ -23,11 +23,11 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
evas_object_image_file_set(o, build_path("logo.png"), NULL);
evas_object_image_smooth_scale_set(o, 0);
evas_object_show(o);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -36,7 +36,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -47,22 +47,22 @@ static void _loop(double t, int f)
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 40 + ((i % 3) * (w0 / 2));
h = 40 + ((i % 3) * (h0 / 2));
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
evas_object_move(o_images[i], x, y);
evas_object_resize(o_images[i], w, h);
evas_object_image_fill_set(o_images[i], 0, 0, w, h);
h0 = 80;
w = 40 + ((i % 3) * (w0 / 2));
h = 40 + ((i % 3) * (h0 / 2));
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -94,8 +94,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -23,11 +23,11 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
evas_object_image_file_set(o, build_path("logo.png"), NULL);
evas_object_image_smooth_scale_set(o, 0);
evas_object_show(o);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -36,7 +36,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -47,22 +47,22 @@ static void _loop(double t, int f)
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
evas_object_move(o_images[i], x, y);
evas_object_resize(o_images[i], w, h);
evas_object_image_fill_set(o_images[i], 0, 0, w, h);
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -94,8 +94,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -23,11 +23,11 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
evas_object_image_file_set(o, build_path("image.png"), NULL);
evas_object_image_smooth_scale_set(o, 0);
evas_object_show(o);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -36,7 +36,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -47,22 +47,22 @@ static void _loop(double t, int f)
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 40 + ((i % 3) * (w0 / 2));
h = 40 + ((i % 3) * (h0 / 2));
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
evas_object_move(o_images[i], x, y);
evas_object_resize(o_images[i], w, h);
evas_object_image_fill_set(o_images[i], 0, 0, w, h);
h0 = 80;
w = 40 + ((i % 3) * (w0 / 2));
h = 40 + ((i % 3) * (h0 / 2));
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -94,8 +94,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -23,11 +23,11 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
evas_object_image_file_set(o, build_path("image.png"), NULL);
evas_object_image_smooth_scale_set(o, 0);
evas_object_show(o);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 0);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -36,7 +36,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -47,22 +47,22 @@ static void _loop(double t, int f)
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
evas_object_move(o_images[i], x, y);
evas_object_resize(o_images[i], w, h);
evas_object_image_fill_set(o_images[i], 0, 0, w, h);
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -94,8 +94,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -24,22 +24,24 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
if (i < (OBNUM / 2))
evas_object_image_file_set(o, build_path("logo.png"), NULL);
else
{
Evas_Coord x, y;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i < (OBNUM / 2))
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
}
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);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
evas_object_move(o, x, y);
}
evas_object_image_fill_set(o, 0, 0, 120, 160);
evas_object_resize(o, 120, 160);
evas_object_show(o);
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -48,7 +50,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -58,22 +60,22 @@ static void _loop(double t, int f)
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
if (i < (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
evas_object_move(o_images[i], x, y);
}
if (i < (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -105,8 +107,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -27,22 +27,24 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
if (i < (OBNUM / 2))
evas_object_image_file_set(o, PACKAGE_DATA_DIR"/data/logo.png", NULL);
else
{
Evas_Coord x, y;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i < (OBNUM / 2))
{
efl_file_simple_load(o, PACKAGE_DATA_DIR"/data/logo.png", NULL);
}
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);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
evas_object_move(o, x, y);
}
evas_object_image_fill_set(o, 0, 0, 120, 160);
evas_object_resize(o, 120, 160);
evas_object_show(o);
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, PACKAGE_DATA_DIR"/data/image.png", NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -51,32 +53,34 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
static void _loop(double t, int f)
{
static int k = 0;
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
if (i < (OBNUM / 2))
{
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);
}
if (i < (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
}
++k;
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -108,8 +112,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -27,22 +27,24 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
if (i < (OBNUM / 2))
evas_object_image_file_set(o, build_path("logo.png"), NULL);
else
{
Evas_Coord x, y;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i < (OBNUM / 2))
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
}
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);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
evas_object_move(o, x, y);
}
evas_object_image_fill_set(o, 0, 0, 120, 160);
evas_object_resize(o, 120, 160);
evas_object_show(o);
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -51,7 +53,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -61,22 +63,22 @@ static void _loop(double t, int f)
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
if (i < (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
evas_object_move(o_images[i], x, y);
}
if (i < (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -108,8 +110,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -27,22 +27,24 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
if (i < (OBNUM / 2))
evas_object_image_file_set(o, build_path("logo.png"), NULL);
else
{
Evas_Coord x, y;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i < (OBNUM / 2))
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
}
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);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
evas_object_move(o, x, y);
}
evas_object_image_fill_set(o, 0, 0, 120, 160);
evas_object_resize(o, 120, 160);
evas_object_show(o);
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -51,7 +53,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -61,22 +63,22 @@ static void _loop(double t, int f)
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
if (i < (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
evas_object_move(o_images[i], x, y);
}
if (i < (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -108,8 +110,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -24,22 +24,24 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
if (i & 0x1)
evas_object_image_file_set(o, build_path("logo.png"), NULL);
else
{
Evas_Coord x, y;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i & 0x1)
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
}
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);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
evas_object_move(o, x, y);
}
evas_object_image_fill_set(o, 0, 0, 120, 160);
evas_object_resize(o, 120, 160);
evas_object_show(o);
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -48,7 +50,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -58,22 +60,22 @@ static void _loop(double t, int f)
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
if (i & 0x1)
{
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);
}
if (i & 0x1)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -105,8 +107,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -27,22 +27,24 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
if (i & 0x1)
evas_object_image_file_set(o, build_path("logo.png"), NULL);
else
{
Evas_Coord x, y;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i & 0x1)
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
}
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);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
evas_object_move(o, x, y);
}
evas_object_image_fill_set(o, 0, 0, 120, 160);
evas_object_resize(o, 120, 160);
evas_object_show(o);
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -51,32 +53,34 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
static void _loop(double t, int f)
{
static int k = 0;
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
if (i & 0x1)
{
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);
}
if (i & 0x1)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
}
k++;
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -108,8 +112,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -27,22 +27,24 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
if (i & 0x1)
evas_object_image_file_set(o, build_path("logo.png"), NULL);
else
{
Evas_Coord x, y;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i & 0x1)
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
}
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);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
evas_object_move(o, x, y);
}
evas_object_image_fill_set(o, 0, 0, 120, 160);
evas_object_resize(o, 120, 160);
evas_object_show(o);
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -51,7 +53,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -61,22 +63,22 @@ static void _loop(double t, int f)
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
if (i & 0x1)
{
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);
}
if (i & 0x1)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -108,8 +110,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -27,22 +27,24 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
if (i & 0x1)
evas_object_image_file_set(o, build_path("logo.png"), NULL);
else
{
Evas_Coord x, y;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i & 0x1)
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
}
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);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
evas_object_move(o, x, y);
}
evas_object_image_fill_set(o, 0, 0, 120, 160);
evas_object_resize(o, 120, 160);
evas_object_show(o);
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -51,7 +53,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -61,22 +63,22 @@ static void _loop(double t, int f)
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
if (i & 0x1)
{
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);
}
if (i & 0x1)
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -108,8 +110,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -24,22 +24,24 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
if (i > (OBNUM / 2))
evas_object_image_file_set(o, build_path("logo.png"), NULL);
else
{
Evas_Coord x, y;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i > (OBNUM / 2))
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
}
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);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
evas_object_move(o, x, y);
}
evas_object_image_fill_set(o, 0, 0, 120, 160);
evas_object_resize(o, 120, 160);
evas_object_show(o);
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -48,7 +50,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -58,22 +60,22 @@ static void _loop(double t, int f)
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
if (i > (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
evas_object_move(o_images[i], x, y);
}
if (i > (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -105,8 +107,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -27,22 +27,24 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
if (i > (OBNUM / 2))
evas_object_image_file_set(o, build_path("logo.png"), NULL);
else
{
Evas_Coord x, y;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i > (OBNUM / 2))
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
}
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);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
evas_object_move(o, x, y);
}
evas_object_image_fill_set(o, 0, 0, 120, 160);
evas_object_resize(o, 120, 160);
evas_object_show(o);
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -51,32 +53,34 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
static void _loop(double t, int f)
{
static int k = 0;
int i;
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
if (i > (OBNUM / 2))
{
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);
}
if (i < (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
}
++k;
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -108,8 +112,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -27,22 +27,24 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
if (i > (OBNUM / 2))
evas_object_image_file_set(o, build_path("logo.png"), NULL);
else
{
Evas_Coord x, y;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i > (OBNUM / 2))
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
}
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);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
evas_object_move(o, x, y);
}
evas_object_image_fill_set(o, 0, 0, 120, 160);
evas_object_resize(o, 120, 160);
evas_object_show(o);
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -51,7 +53,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -61,22 +63,22 @@ static void _loop(double t, int f)
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
if (i > (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
evas_object_move(o_images[i], x, y);
}
if (i > (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -108,8 +110,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -27,22 +27,24 @@ static void _setup(void)
srnd();
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
if (i > (OBNUM / 2))
evas_object_image_file_set(o, build_path("logo.png"), NULL);
else
{
Evas_Coord x, y;
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
if (i > (OBNUM / 2))
{
efl_file_simple_load(o, build_path("logo.png"), NULL);
}
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);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
evas_object_move(o, x, y);
}
evas_object_image_fill_set(o, 0, 0, 120, 160);
evas_object_resize(o, 120, 160);
evas_object_show(o);
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_entity_position_set(o, EINA_POSITION2D(x, y));
}
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -51,7 +53,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -61,22 +63,22 @@ static void _loop(double t, int f)
Evas_Coord x, y, w, h;
for (i = 0; i < OBNUM; i++)
{
if (i > (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
evas_object_move(o_images[i], x, y);
}
if (i > (OBNUM / 2))
{
w = 120;
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -108,8 +110,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -23,11 +23,11 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
evas_object_image_file_set(o, build_path("logo.png"), NULL);
evas_object_image_smooth_scale_set(o, 1);
evas_object_show(o);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 1);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -36,7 +36,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -47,22 +47,22 @@ static void _loop(double t, int f)
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 40 + ((i % 3) * (w0 / 2));
h = 40 + ((i % 3) * (h0 / 2));
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
evas_object_move(o_images[i], x, y);
evas_object_resize(o_images[i], w, h);
evas_object_image_fill_set(o_images[i], 0, 0, w, h);
h0 = 80;
w = 40 + ((i % 3) * (w0 / 2));
h = 40 + ((i % 3) * (h0 / 2));
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -94,8 +94,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -23,11 +23,11 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
evas_object_image_file_set(o, build_path("logo.png"), NULL);
evas_object_image_smooth_scale_set(o, 1);
evas_object_show(o);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 1);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -36,7 +36,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -47,22 +47,22 @@ static void _loop(double t, int f)
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
evas_object_move(o_images[i], x, y);
evas_object_resize(o_images[i], w, h);
evas_object_image_fill_set(o_images[i], 0, 0, w, h);
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -94,8 +94,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -23,11 +23,11 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
evas_object_image_file_set(o, build_path("image.png"), NULL);
evas_object_image_smooth_scale_set(o, 1);
evas_object_show(o);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 1);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -36,7 +36,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -47,22 +47,22 @@ static void _loop(double t, int f)
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 40 + ((i % 3) * (w0 / 2));
h = 40 + ((i % 3) * (h0 / 2));
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
evas_object_move(o_images[i], x, y);
evas_object_resize(o_images[i], w, h);
evas_object_image_fill_set(o_images[i], 0, 0, w, h);
h0 = 80;
w = 40 + ((i % 3) * (w0 / 2));
h = 40 + ((i % 3) * (h0 / 2));
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -94,8 +94,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -23,11 +23,11 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
evas_object_image_file_set(o, build_path("image.png"), NULL);
evas_object_image_smooth_scale_set(o, 1);
evas_object_show(o);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_image_smooth_scale_set(o, 1);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -36,7 +36,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -47,22 +47,22 @@ static void _loop(double t, int f)
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
evas_object_move(o_images[i], x, y);
evas_object_resize(o_images[i], w, h);
evas_object_image_fill_set(o_images[i], 0, 0, w, h);
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -94,8 +94,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -3,8 +3,8 @@
#undef ICON
/* metadata */
#define FNAME image_mask_14
#define NAME "Image Mask 14"
#define FNAME image_blend_solid_9patch_start
#define NAME "Image Blend Solid 9patch"
#define ICON "blend.png"
#ifndef PROTO
@ -15,32 +15,18 @@
static int done = 0;
/* private data */
static Evas_Object *o_images[OBNUM];
static Evas_Object *o_mask;
/* setup */
static void _setup(void)
{
int i;
Evas_Object *o;
o = 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++)
{
o = evas_object_image_add(evas);
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);
evas_object_image_smooth_scale_set(o, 1);
evas_object_clip_set(o, o_mask);
evas_object_show(o);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("9patch_test.9.png"), NULL);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -49,8 +35,7 @@ static void _setup(void)
static void _cleanup(void)
{
int i;
for (i = 0; i < OBNUM; i++) evas_object_del(o_images[i]);
evas_object_del(o_mask);
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
}
/* loop - do things */
@ -58,25 +43,26 @@ static void _loop(double t, int f)
{
int i;
Evas_Coord x, y, w, h, w0, h0;
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW))) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW))) * w0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
evas_object_move(o_images[i], x, y);
evas_object_resize(o_images[i], w, h);
evas_object_image_fill_set(o_images[i], 0, 0, w, h);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -108,8 +94,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -23,11 +23,11 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
evas_object_image_file_set(o, build_path("frame.png"), NULL);
evas_object_image_border_set(o, 8, 8, 8, 8);
evas_object_show(o);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("frame.png"), NULL);
efl_gfx_image_border_insets_set(o, 8, 8, 8, 8);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -36,7 +36,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -47,22 +47,22 @@ static void _loop(double t, int f)
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW))) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW))) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
evas_object_move(o_images[i], x, y);
evas_object_resize(o_images[i], w, h);
evas_object_image_fill_set(o_images[i], 0, 0, w, h);
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW))) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW))) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -94,8 +94,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -24,16 +24,16 @@ static void _setup(void)
for (i = 0; i < OBNUM; i++)
{
int a;
o = evas_object_image_add(evas);
o_images[i] = o;
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);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
a = 256 - (1 << ((rnd() % 8) + 1));
if (a < 128) a = 128;
evas_object_color_set(o, a, a, a, a);
evas_object_show(o);
efl_gfx_color_set(o, a, a, a, a);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -42,7 +42,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -53,18 +53,18 @@ static void _loop(double t, int f)
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);
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -96,8 +96,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -24,15 +24,15 @@ static void _setup(void)
for (i = 0; i < OBNUM; i++)
{
int a;
o = evas_object_image_add(evas);
o_images[i] = o;
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);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("image.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
a = rnd()&0xff;
evas_object_color_set(o, a, a, a, a);
evas_object_show(o);
efl_gfx_color_set(o, a, a, a, a);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -41,7 +41,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -52,18 +52,18 @@ static void _loop(double t, int f)
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);
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -95,8 +95,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -23,12 +23,12 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
o_images[i] = o;
evas_object_image_file_set(o, build_path("bar.png"), NULL);
evas_object_image_border_set(o, 6, 6, 6, 6);
evas_object_image_border_center_fill_set(o, EVAS_BORDER_FILL_SOLID);
evas_object_show(o);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("bar.png"), NULL);
efl_gfx_image_border_insets_set(o, 6, 6, 6, 6);
efl_gfx_image_center_fill_mode_set(o, EFL_GFX_CENTER_FILL_MODE_SOLID);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -37,7 +37,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -48,22 +48,22 @@ static void _loop(double t, int f)
for (i = 0; i < OBNUM; i++)
{
w0 = 80;
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
evas_object_move(o_images[i], x, y);
evas_object_resize(o_images[i], w, h);
evas_object_image_fill_set(o_images[i], 0, 0, w, h);
h0 = 80;
w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -95,8 +95,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

View File

@ -23,14 +23,14 @@ static void _setup(void)
Evas_Object *o;
for (i = 0; i < OBNUM; i++)
{
o = evas_object_image_add(evas);
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);
evas_object_image_border_set(o, 43, 48, 48, 83);
evas_object_image_border_center_fill_set(o, EVAS_BORDER_FILL_SOLID);
evas_object_show(o);
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
o_images[i] = o;
efl_file_simple_load(o, build_path("logo.png"), NULL);
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
efl_gfx_image_border_insets_set(o, 43, 48, 48, 83);
efl_gfx_image_center_fill_mode_set(o, EFL_GFX_CENTER_FILL_MODE_SOLID);
efl_gfx_entity_visible_set(o, EINA_TRUE);
}
done = 0;
}
@ -39,7 +39,7 @@ static void _setup(void)
static void _cleanup(void)
{
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 */
@ -50,18 +50,18 @@ static void _loop(double t, int f)
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);
h = 160;
x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
}
FPS_STD(NAME);
}
/* prepend special key handlers if interactive (before STD) */
static void _key(char *key)
static void _key(const char *key)
{
KEY_STD;
}
@ -93,8 +93,7 @@ void FNAME(void);
# ifndef UI
void FNAME(void)
{
ui_func_set(_key, _loop);
_setup();
ui_func_set(_key, _loop, _setup);
}
# endif
#endif

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