forked from enlightenment/efl
Merge branch 'master' into devs/hermet/lottie
This commit is contained in:
commit
5bfcc5033a
|
@ -72,7 +72,6 @@ __pycache__
|
|||
/compile
|
||||
/test-driver
|
||||
/missing
|
||||
/INSTALL
|
||||
/ABOUT-NLS
|
||||
/config.rpath
|
||||
/coverage
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
** COMPILING and INSTALLING **
|
||||
------------------------------
|
||||
|
||||
Meson is the build system used for this project. For more information please
|
||||
see:
|
||||
|
||||
http://mesonbuild.com
|
||||
|
||||
----
|
||||
|
||||
Normal compilation in /usr/local:
|
||||
|
||||
meson . build
|
||||
ninja -C build
|
||||
sudo ninja -C build install
|
||||
|
||||
For meson build generic options:
|
||||
|
||||
meson --help
|
||||
|
||||
For a list of project specific options supported:
|
||||
|
||||
cat meson_options.txt
|
||||
|
||||
To set 1 or more project specific options:
|
||||
|
||||
meson --prefix=/path/to -Doption=value [-Dother=value2] [...] . build
|
||||
|
||||
To display current configuration:
|
||||
|
||||
meson configure build
|
||||
|
||||
The above will only work after at least the following is done:
|
||||
|
||||
meson . build
|
||||
|
||||
** QUICK AND DIRTY HELP **
|
||||
--------------------------
|
||||
|
||||
How clean out the build and config and start fresh:
|
||||
|
||||
rm -rf build
|
||||
|
||||
How to make a dist tarball and check its build:
|
||||
(must do it from git tree clone and commit all changes to git first)
|
||||
|
||||
ninja -C build dist
|
||||
|
||||
How to change prefix:
|
||||
|
||||
meson --prefix=/path/to/prefix . build
|
||||
|
||||
How to install in a specific destination directory for packaging:
|
||||
|
||||
DESTDIR=/path/to/destdir ninja -C build install
|
||||
|
||||
How to build with verbose output (full commands run):
|
||||
|
||||
ninja -C build -v
|
|
@ -284,7 +284,7 @@ subprojects = [
|
|||
['ecore_input' ,[] , false, true, false, false, false, false, ['eina', 'eo'], []],
|
||||
['ecore_x' ,['x11'] , false, true, false, false, false, false, ['eina', 'efl'], []],
|
||||
['ecore_fb' ,['fb'] , false, true, false, false, false, false, ['eina'], []],
|
||||
['ecore_wl2' ,['wl'] , true, true, false, false, false, false, ['eina'], ['libdrm']],
|
||||
['ecore_wl2' ,['wl'] , true, true, false, false, true, false, ['eina'], ['libdrm']],
|
||||
['ecore_sdl' ,['sdl'] , false, true, false, false, false, false, ['eina'], []],
|
||||
['ecore_win32' ,[] , false, true, false, false, false, false, ['eina'], []],
|
||||
['ecore_ipc' ,[] , false, true, false, false, false, false, ['eina'], []],
|
||||
|
|
|
@ -1,247 +1,248 @@
|
|||
option('audio',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'Flag for handling audio support in efl'
|
||||
description : 'Audio support in efl'
|
||||
)
|
||||
|
||||
option('avahi',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'Flag for handling avahi support in efl'
|
||||
description : 'Avahi (zeroconf) support in efl'
|
||||
)
|
||||
|
||||
option('x11',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'Flag for handling x11 support in efl'
|
||||
description : 'X11 support in efl'
|
||||
)
|
||||
|
||||
option('fb',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Flag for handling frame buffer support in efl'
|
||||
description : 'Framebuffer (/dev/fb / fbocon) support in efl'
|
||||
)
|
||||
|
||||
option('sdl',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Flag for handling sdl support in efl'
|
||||
description : 'SDL support in efl'
|
||||
)
|
||||
|
||||
option('wl',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Flag for handling wayland support in efl'
|
||||
description : 'Wayland client support in efl'
|
||||
)
|
||||
|
||||
option('buffer',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Flag for handling buffer support in efl'
|
||||
description : 'Generic graphics buffer API support in efl'
|
||||
)
|
||||
|
||||
option('drm',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Flag for handling drm support in efl'
|
||||
description : 'DRM/KMS advanced framebuffer/console support in efl'
|
||||
)
|
||||
|
||||
option('cocoa',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Flag for handling apple cocoa support in efl'
|
||||
description : 'Apple MacOS cocoa support in efl'
|
||||
)
|
||||
|
||||
option('physics',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'Flag for handling the internal physics engine in efl'
|
||||
description : 'Physics engine (bullet) in efl'
|
||||
)
|
||||
|
||||
option('eeze',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'Flag for handling the device abstraction layer in efl'
|
||||
description : 'Device abstraction (udev wrapper) in efl'
|
||||
)
|
||||
|
||||
option('opengl',
|
||||
type : 'combo',
|
||||
choices : ['full', 'es-egl', 'none'],
|
||||
value : 'full',
|
||||
description : 'build efl with a special opengl support'
|
||||
description : 'Type of OpenGL support in efl'
|
||||
)
|
||||
|
||||
option('build-id',
|
||||
type : 'string',
|
||||
value : 'none',
|
||||
description : 'The build id to attach to the efl build')
|
||||
description : 'The build id string for efl set as the EFL_BUILD_ID define')
|
||||
|
||||
option('eina-magic-debug',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'magic debug of eina structure'
|
||||
description : 'Magic number checking of eina structures in efl'
|
||||
)
|
||||
|
||||
option('debug-threads',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'thread debugging'
|
||||
description : 'Thread debugging in efl'
|
||||
)
|
||||
|
||||
option('build-examples',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'build examples'
|
||||
description : 'Compile examples'
|
||||
)
|
||||
|
||||
option('build-tests',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'build tests'
|
||||
description : 'Compile tests'
|
||||
)
|
||||
|
||||
option('crypto',
|
||||
type : 'combo',
|
||||
choices : ['gnutls', 'openssl'],
|
||||
value : 'openssl'
|
||||
value : 'openssl',
|
||||
description : 'Which SSL Crypto library used in efl'
|
||||
)
|
||||
|
||||
option('glib',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'use glib or not'
|
||||
description : 'Main loop integration for glib in efl'
|
||||
)
|
||||
|
||||
option('g-mainloop',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'use glib mainloop or not'
|
||||
description : 'Use glib to run the main loop in efl'
|
||||
)
|
||||
|
||||
option('gstreamer',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'use gstreamer 1.0 support'
|
||||
description : 'GStreamer 1.0+ support in efl'
|
||||
)
|
||||
|
||||
option('systemd',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'use systemd support'
|
||||
description : 'Systemd support in efl'
|
||||
)
|
||||
|
||||
option('pulseaudio',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'pulseaudio support'
|
||||
description : 'Pulseaudio support for audio API'
|
||||
)
|
||||
|
||||
option('network-backend',
|
||||
type : 'combo',
|
||||
choices : ['connman', 'none'],
|
||||
value : 'none',
|
||||
description : 'connman support'
|
||||
description : 'Connman support in efl'
|
||||
)
|
||||
|
||||
option('xpresent',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'xpresent support'
|
||||
description : 'X11 XPresent extension support in efl'
|
||||
)
|
||||
|
||||
option('xgesture',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'xgesture support'
|
||||
description : 'X11 XGesture support in efl'
|
||||
)
|
||||
|
||||
option('xinput2',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'xi2 support'
|
||||
description : 'X11 XInput 2.0+ support in efl'
|
||||
)
|
||||
|
||||
option('xinput22',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'xi22 support'
|
||||
value : true,
|
||||
description : 'X11 XInput 2.2+ support in efl'
|
||||
)
|
||||
|
||||
option('tslib',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'tslib support'
|
||||
description : 'Framebuffer (/dev/fb / fbcon) touchscreen tslib support in efl'
|
||||
)
|
||||
|
||||
option('eject-path',
|
||||
type : 'string',
|
||||
value : 'detect',
|
||||
description : 'path to use as eject binary, if "detect" internal eeze bins are used'
|
||||
description : 'Path to the eject binary, if "detect" internal eeze bins are used'
|
||||
)
|
||||
|
||||
option('mount-path',
|
||||
type : 'string',
|
||||
value : 'detect',
|
||||
description : 'path to use as eject binary, if "detect" internal eeze bins are used'
|
||||
description : 'Path to the mount binary, if "detect" internal eeze bins are used'
|
||||
)
|
||||
|
||||
option('unmount-path',
|
||||
type : 'string',
|
||||
value : 'detect',
|
||||
description : 'path to use as eject binary, if "detect" internal eeze bins are used'
|
||||
description : 'Path to the unmount binary, if "detect" internal eeze bins are used'
|
||||
)
|
||||
|
||||
option('evas-modules',
|
||||
type : 'combo',
|
||||
choices : ['shared', 'static'],
|
||||
value : 'shared',
|
||||
description : 'how to build the evas modules'
|
||||
description : 'Should modules be shared or statically inlined'
|
||||
)
|
||||
|
||||
option('evas-loaders-disabler',
|
||||
type : 'array',
|
||||
description : 'add names here to disable the loaders',
|
||||
description : 'List of modular image loaders to disable in efl',
|
||||
choices : ['gst', 'pdf', 'ps', 'raw', 'svg', 'xcf', 'bmp', 'dds', 'eet', 'generic', 'gif', 'ico', 'jp2k', 'jpeg', 'pmaps', 'png', 'psd', 'tga', 'tgv', 'tiff', 'wbmp', 'webp', 'xpm', 'json'],
|
||||
value : ['webp']
|
||||
)
|
||||
|
||||
option('ecore-imf-loaders-disabler',
|
||||
type : 'array',
|
||||
description : 'add names here to disable the loaders',
|
||||
description : 'List of input methods to disable in efl',
|
||||
choices : ['xim', 'ibus', 'scim'],
|
||||
value : ['scim']
|
||||
)
|
||||
|
||||
option('emotion-loaders-disabler',
|
||||
type : 'array',
|
||||
description : 'add names here to disable the loaders',
|
||||
description : 'List of video back-ends to disable in efl',
|
||||
choices : ['gstreamer', 'gstreamer1', 'libvlc', 'xine'],
|
||||
value : ['gstreamer', 'libvlc', 'xine']
|
||||
)
|
||||
|
||||
option('emotion-generic-loaders-disabler',
|
||||
type : 'array',
|
||||
description : 'add names here to disable the loaders',
|
||||
description : 'List of out-of-process generic binary video loaders to disable in efl',
|
||||
choices : ['vlc'],
|
||||
value : ['vlc']
|
||||
)
|
||||
|
||||
option('harfbuzz',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'harfbuzz support'
|
||||
value : true,
|
||||
description : 'Harfbuzz (complex text layout library) support in efl'
|
||||
)
|
||||
|
||||
option('fribidi',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'fribidi support'
|
||||
description : 'Fribidi (right to left text layout library) support in efl'
|
||||
)
|
||||
|
||||
option('fontconfig',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'fontconfig support'
|
||||
description : 'Fontconfig (system font database) support in efl'
|
||||
)
|
||||
|
||||
option('edje-sound-and-video',
|
||||
|
@ -253,122 +254,122 @@ option('edje-sound-and-video',
|
|||
option('pixman',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Enable pixman support in evas'
|
||||
description : 'Pixman software renderer support in efl'
|
||||
)
|
||||
|
||||
option('hyphen',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Enable hyphen support in evas'
|
||||
description : 'Hyphen text layout support in efl'
|
||||
)
|
||||
|
||||
option('embedded-lz4',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'do not use the system lz4, but rather the embedded r131 release'
|
||||
description : 'Use the embedded in-tree zlib r131 release instead of system zlib'
|
||||
)
|
||||
|
||||
option('libmount',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'use libmount support or not'
|
||||
description : 'Libmount support for device mounting in efl'
|
||||
)
|
||||
|
||||
option('vnc-server',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'enable building a vnc-server for multiseat testing'
|
||||
description : 'VNS server support in efl for multiseat testing'
|
||||
)
|
||||
|
||||
option('v4l2',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'add v4l2 support'
|
||||
description : 'Video v4l2 support'
|
||||
)
|
||||
|
||||
option('elua',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'Flag for handling elua support in efl'
|
||||
description : 'Lua launcher binary support in efl'
|
||||
)
|
||||
|
||||
option('wl-deprecated',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Flag for handling deprecated wayland support in efl'
|
||||
description : 'Deprecated wayland support in efl'
|
||||
)
|
||||
|
||||
option('drm-deprecated',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Flag for handling deprecated drm support in efl'
|
||||
description : 'Deprecated DRM/KMS support in efl'
|
||||
)
|
||||
|
||||
option('nls',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
description: 'enable localization: (default=true)'
|
||||
description: 'Localization'
|
||||
)
|
||||
|
||||
option('bindings',
|
||||
type : 'array',
|
||||
choices : ['luajit', 'cxx', 'mono'],
|
||||
value : ['luajit', 'cxx'],
|
||||
description : 'Add values here to enable the bindings',
|
||||
description : 'Which auto-generated language bindings for efl to enable',
|
||||
)
|
||||
|
||||
option('mono-beta',
|
||||
type: 'boolean',
|
||||
value: false,
|
||||
description: 'Flag for enabling @beta Eo methods in the api'
|
||||
description: 'Mono/C# @beta Eo methods enabled in the efl'
|
||||
)
|
||||
|
||||
option('mono-examples-dir',
|
||||
type: 'string',
|
||||
value: '',
|
||||
description: 'Directory where eolian_mono will search for examples to embed into the documentation'
|
||||
description: 'Where eolian_mono will search for examples to embed into the documentation'
|
||||
)
|
||||
|
||||
option('lua-interpreter',
|
||||
type: 'combo',
|
||||
choices: ['luajit', 'lua'],
|
||||
value: 'luajit',
|
||||
description: 'Select a type of lua interpreter to use it for edje and evas'
|
||||
description: 'Which Lua back-end library to use in efl'
|
||||
)
|
||||
|
||||
option('native-arch-optimization',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
description: 'Flag for enabling architecture native optimizations'
|
||||
description: 'Enable architecture native optimizations in efl'
|
||||
)
|
||||
|
||||
option('elogind',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'use elogind support'
|
||||
description : 'elogind support in efl (subset of systemd)'
|
||||
)
|
||||
|
||||
option('windows-version',
|
||||
type : 'combo',
|
||||
choices : ['vista', 'win7', 'win8', 'win81', 'win10'],
|
||||
value : 'win7',
|
||||
description : 'When host_machine is windows, compile the efl with the specified version of Windows'
|
||||
description : 'When on Windows, compile efl with the specified Windows version'
|
||||
)
|
||||
|
||||
option('dictionaries-hyphen-dir',
|
||||
type : 'string',
|
||||
value : '/usr/share/hyphen/',
|
||||
description : 'Put the path to hyphen dictionaries directory'
|
||||
description : 'The path to the hyphen dictionaries directory'
|
||||
)
|
||||
|
||||
option('elementary-base-dir',
|
||||
type : 'string',
|
||||
value : '.elementary',
|
||||
description : 'Put the name of a base directory for elementary data'
|
||||
description : 'The name of the directory for user supplied elementary data files like themes, config files'
|
||||
)
|
||||
|
||||
option('install-eo-files',
|
||||
type: 'boolean',
|
||||
value: false,
|
||||
description : 'Set this to false to not install any eo file'
|
||||
description : 'Install any eo file'
|
||||
)
|
||||
|
|
|
@ -138,7 +138,7 @@ _canvas_resize_cb(Ecore_Evas *_ee)
|
|||
}
|
||||
|
||||
static void
|
||||
_color_class_callback_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||
_color_class_callback_delete(void *data, Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission, void *source EINA_UNUSED)
|
||||
{
|
||||
if (!strcmp(data, "process"))
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||
<defs>
|
||||
<linearGradient
|
||||
id="linearGradient1"
|
||||
x1="0"
|
||||
y1="0"
|
||||
x2="0.2"
|
||||
y2="0.2"
|
||||
spreadMethod="reflect">
|
||||
<stop
|
||||
style="stop-color:#FF0000;stop-opacity:1;"
|
||||
offset="0"/>
|
||||
<stop
|
||||
style="stop-color:#0000FF;stop-opacity:1;"
|
||||
offset="1"/>
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
id="radialGradient1"
|
||||
r="0.2"
|
||||
cx="0.3"
|
||||
cy="0.3"
|
||||
spreadMethod="reflect">
|
||||
<stop
|
||||
style="stop-color:#FFFF00;stop-opacity:1;"
|
||||
offset="0"/>
|
||||
<stop
|
||||
style="stop-color:#00FFFF;stop-opacity:1;"
|
||||
offset="1"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
<linearGradient
|
||||
id="linearGradient2"
|
||||
x1="0"
|
||||
y1="0"
|
||||
x2="0.2"
|
||||
y2="0.2"
|
||||
spreadMethod="reflect">
|
||||
<stop
|
||||
style="stop-color:#0F00F0;stop-opacity:1;"
|
||||
offset="0"/>
|
||||
<stop
|
||||
style="stop-color:#0F000F;stop-opacity:1;"
|
||||
offset="1"/>
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
id="radialGradient2"
|
||||
r="0.2"
|
||||
cx="0.3"
|
||||
cy="0.3"
|
||||
spreadMethod="reflect">
|
||||
<stop
|
||||
style="stop-color:#00FF00;stop-opacity:1;"
|
||||
offset="0"/>
|
||||
<stop
|
||||
style="stop-color:#FF00FF;stop-opacity:1;"
|
||||
offset="1"/>
|
||||
</radialGradient>
|
||||
<rect x="0" y="0" width="50" height="50" fill="url(#linearGradient1)"/>
|
||||
<rect x="50" y="0" width="50" height="50" fill="url(#radialGradient1)"/>
|
||||
<rect x="0" y="50" width="50" height="50" fill="url(#linearGradient2)"/>
|
||||
<rect x="50" y="50" width="50" height="50" fill="url(#radialGradient2)"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -72,6 +72,7 @@ collections {
|
|||
vector: "favorite_off.svg";
|
||||
vector: "batman1.svg";
|
||||
vector: "batman2.svg";
|
||||
vector: "gradients.svg";
|
||||
}
|
||||
group {
|
||||
name: "svg-test";
|
||||
|
@ -104,6 +105,7 @@ collections {
|
|||
SVG_PART("bg22", "vg22", 0.2, 0.8, .4, 1.0,"favorite_on.svg")
|
||||
SVG_PART("bg23", "vg23", 0.4, 0.8, .6, 1.0,"favorite_off.svg")
|
||||
SVG_PART_INTERPOLATE("bg24", "vg24", 0.6, 0.8, .8, 1.0,"batman1.svg", "batman2.svg")
|
||||
SVG_PART("bg25", "vg25", 0.8, 0.8, 1.0, 1.0,"gradients.svg")
|
||||
}
|
||||
programs {
|
||||
SVG_PROGRAM("bg1", "vg1")
|
||||
|
@ -130,6 +132,7 @@ collections {
|
|||
SVG_PROGRAM("bg22", "vg22")
|
||||
SVG_PROGRAM("bg23", "vg23")
|
||||
SVG_PROGRAM("bg24", "vg24")
|
||||
SVG_PROGRAM("bg25", "vg25")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -227,8 +227,6 @@ EAPI Eina_Future *efl_ui_view_factory_create_with_event(Efl_Ui_Factory *factory,
|
|||
#include "interfaces/efl_text_types.eot.h"
|
||||
#endif
|
||||
|
||||
typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
|
||||
|
||||
#endif
|
||||
|
||||
/* work-around bug in gcc --as-needed link optimization */
|
||||
|
|
|
@ -29,7 +29,7 @@ interface Efl.Io.Reader {
|
|||
You can understand this method as read(2) libc function.
|
||||
]]
|
||||
params {
|
||||
@inout rw_slice: Eina.Rw_Slice; [[Provides a pre-allocated memory to be filled up to rw_slice.len. It will be populated and the length will be set to the actually used amount of bytes, which can be smaller than the request.]]
|
||||
@inout rw_slice: rw_slice<ubyte>; [[Provides a pre-allocated memory to be filled up to rw_slice.len. It will be populated and the length will be set to the actually used amount of bytes, which can be smaller than the request.]]
|
||||
}
|
||||
return: Eina.Error; [[0 on succeed, a mapping of errno otherwise]]
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ interface Efl.Io.Writer {
|
|||
You can understand this method as write(2) libc function.
|
||||
]]
|
||||
params {
|
||||
@inout slice: Eina.Slice; [[Provides a pre-populated memory to be used up to slice.len. The returned slice will be adapted as length will be set to the actually used amount of bytes, which can be smaller than the request.]]
|
||||
@out remaining: Eina.Slice @optional; [[Convenience to output the remaining parts of slice that was not written. If the full slice was written, this will be a slice of zero-length.]]
|
||||
@inout slice: slice<ubyte>; [[Provides a pre-populated memory to be used up to slice.len. The returned slice will be adapted as length will be set to the actually used amount of bytes, which can be smaller than the request.]]
|
||||
@out remaining: slice<ubyte> @optional; [[Convenience to output the remaining parts of slice that was not written. If the full slice was written, this will be a slice of zero-length.]]
|
||||
}
|
||||
return: Eina.Error; [[0 on succeed, a mapping of errno otherwise]]
|
||||
}
|
||||
|
|
|
@ -42,9 +42,9 @@ struct @extern Eina.Matrix3 {
|
|||
zz: double; [[ZZ matrix value]]
|
||||
}
|
||||
|
||||
type @extern Eina.Unicode: uint32; [[Eina unicode type]]
|
||||
type @extern @beta Eina.Unicode: uint32; [[Eina unicode type]]
|
||||
|
||||
struct @extern Eina.File_Direct_Info; [[Eina file direct information data structure]]
|
||||
struct @extern @beta Eina.File_Direct_Info; [[Eina file direct information data structure]]
|
||||
/*{
|
||||
path_lenght: size_t; [[Size of the whole path]]
|
||||
name_length: size_t; [[Size of the filename/basename component]]
|
||||
|
@ -53,7 +53,7 @@ struct @extern Eina.File_Direct_Info; [[Eina file direct information data struct
|
|||
path: char[EINA_PATH_MAX]; [[The path]]
|
||||
};*/
|
||||
|
||||
enum @extern Eina.Xattr.Flags {
|
||||
enum @extern @beta Eina.Xattr.Flags {
|
||||
[[Eina file extended attributes flags]]
|
||||
insert, [[This is the default behaviour, it will either create or replace the extended attribute]]
|
||||
replace, [[This will only succeed if the extended attribute previously existed]]
|
||||
|
@ -62,25 +62,25 @@ enum @extern Eina.Xattr.Flags {
|
|||
|
||||
type @extern Eina.Error: int; [[Eina error type]]
|
||||
|
||||
struct @extern @free(eina_binbuf_free) Eina.Binbuf; [[Eina binbuf data structure]]
|
||||
struct @extern @free(eina_strbuf_free) Eina.Strbuf; [[Eina strbuf data structure]]
|
||||
struct @extern @beta @free(eina_binbuf_free) Eina.Binbuf; [[Eina binbuf data structure]]
|
||||
struct @extern @beta @free(eina_strbuf_free) Eina.Strbuf; [[Eina strbuf data structure]]
|
||||
|
||||
struct @extern Eina.Slice {
|
||||
struct @extern @beta Eina.Slice {
|
||||
[[A linear, read-only, memory segment]]
|
||||
len: size; [[Length of the memory segment]]
|
||||
mem: const(void_ptr); [[Pointer to memory segment]]
|
||||
}
|
||||
|
||||
struct @extern Eina.Rw_Slice {
|
||||
struct @extern @beta Eina.Rw_Slice {
|
||||
[[A linear, read-write, memory segment]]
|
||||
len: size; [[Length of the memory segment]]
|
||||
mem: void_ptr; [[Pointer to memory segment]]
|
||||
}
|
||||
|
||||
struct @extern Eina.Value; [[Eina value placeholder so it can be referenced from docs.]]
|
||||
struct @extern Eina.Value_Type; [[Eina value type]]
|
||||
struct @extern @beta Eina.Value; [[Eina value placeholder so it can be referenced from docs.]]
|
||||
struct @extern @beta Eina.Value_Type; [[Eina value type]]
|
||||
|
||||
struct @extern Eina.Stat {
|
||||
struct @extern @beta Eina.Stat {
|
||||
[[The structure to store some file statistics.]]
|
||||
dev : ulong; [[The device where this file is located]]
|
||||
ino : ulong; [[The inode]]
|
||||
|
@ -103,5 +103,5 @@ struct @extern Eina.Stat {
|
|||
struct @extern @free(eina_promise_free) Eina.Promise; [[Eina promise type]]
|
||||
|
||||
/* FIXME: This definitely shouldn't be here. */
|
||||
type Efl.Event_Cb: __undefined_type; [[Efl event callback type]]
|
||||
type @beta Efl.Event_Cb: __undefined_type; [[Efl event callback type]]
|
||||
|
||||
|
|
|
@ -35,7 +35,8 @@ struct _Evas_SVG_Loader
|
|||
Eina_Array *stack;
|
||||
Svg_Node *doc;
|
||||
Svg_Node *def;
|
||||
Svg_Style_Gradient *gradient;
|
||||
Eina_List *gradients;
|
||||
Svg_Style_Gradient *latest_gradient; //for stops
|
||||
Evas_SVG_Parser *svg_parse;
|
||||
int level;
|
||||
Eina_Bool result:1;
|
||||
|
@ -1758,15 +1759,63 @@ _handle_radial_r_attr(Evas_SVG_Loader *loader, Svg_Radial_Gradient* radial, cons
|
|||
radial->r = _gradient_to_double(loader->svg_parse, value, SVG_PARSER_LENGTH_OTHER);
|
||||
}
|
||||
|
||||
static void
|
||||
_recalc_radial_cx_attr(Evas_SVG_Loader *loader, Svg_Radial_Gradient* radial, Eina_Bool user_space)
|
||||
{
|
||||
if (!user_space)
|
||||
{
|
||||
radial->cx = radial->cx * loader->svg_parse->global.width;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_recalc_radial_cy_attr(Evas_SVG_Loader *loader, Svg_Radial_Gradient* radial, Eina_Bool user_space)
|
||||
{
|
||||
if (!user_space)
|
||||
{
|
||||
radial->cy = radial->cy * loader->svg_parse->global.height;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_recalc_radial_fx_attr(Evas_SVG_Loader *loader, Svg_Radial_Gradient* radial, Eina_Bool user_space)
|
||||
{
|
||||
if (!user_space)
|
||||
{
|
||||
radial->fx = radial->fx * loader->svg_parse->global.width;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_recalc_radial_fy_attr(Evas_SVG_Loader *loader, Svg_Radial_Gradient* radial, Eina_Bool user_space)
|
||||
{
|
||||
if (!user_space)
|
||||
{
|
||||
radial->fy = radial->fy * loader->svg_parse->global.height;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_recalc_radial_r_attr(Evas_SVG_Loader *loader, Svg_Radial_Gradient* radial, Eina_Bool user_space)
|
||||
{
|
||||
if (!user_space)
|
||||
{
|
||||
radial->r = radial->r * (sqrt(pow(loader->svg_parse->global.height, 2) + pow(loader->svg_parse->global.width, 2)) / sqrt(2.0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
typedef void (*Radial_Method)(Evas_SVG_Loader *loader, Svg_Radial_Gradient *radial, const char *value);
|
||||
typedef void (*Radial_Method_Recalc)(Evas_SVG_Loader *loader, Svg_Radial_Gradient *radial, Eina_Bool user_space);
|
||||
|
||||
#define RADIAL_DEF(Name) \
|
||||
{ #Name, sizeof (#Name), _handle_radial_##Name##_attr}
|
||||
{ #Name, sizeof (#Name), _handle_radial_##Name##_attr, _recalc_radial_##Name##_attr}
|
||||
|
||||
static const struct {
|
||||
const char *tag;
|
||||
int sz;
|
||||
Radial_Method tag_handler;;
|
||||
Radial_Method_Recalc tag_recalc;
|
||||
} radial_tags[] = {
|
||||
RADIAL_DEF(cx),
|
||||
RADIAL_DEF(cy),
|
||||
|
@ -1814,6 +1863,7 @@ _attr_parse_radial_gradient_node(void *data, const char *key, const char *value)
|
|||
static Svg_Style_Gradient *
|
||||
_create_radialGradient(Evas_SVG_Loader *loader, const char *buf, unsigned buflen)
|
||||
{
|
||||
unsigned int i = 0;
|
||||
Svg_Style_Gradient *grad = calloc(1, sizeof(Svg_Style_Gradient));
|
||||
loader->svg_parse->style_grad = grad;
|
||||
|
||||
|
@ -1834,6 +1884,11 @@ _create_radialGradient(Evas_SVG_Loader *loader, const char *buf, unsigned buflen
|
|||
eina_simple_xml_attributes_parse(buf, buflen,
|
||||
_attr_parse_radial_gradient_node, loader);
|
||||
|
||||
for (i = 0; i < sizeof (radial_tags) / sizeof(radial_tags[0]); i++)
|
||||
radial_tags[i].tag_recalc(loader, grad->radial, grad->user_space);
|
||||
|
||||
grad->use_percentage = EINA_TRUE;
|
||||
|
||||
return loader->svg_parse->style_grad;
|
||||
}
|
||||
|
||||
|
@ -2104,11 +2159,21 @@ _evas_svg_loader_xml_open_parser(Evas_SVG_Loader *loader,
|
|||
{
|
||||
Svg_Style_Gradient *gradient;
|
||||
gradient = gradient_method(loader, attrs, attrs_length);
|
||||
/*FIXME: The current parsing structure does not distinguish end tags.
|
||||
There is no way to know if the currently parsed gradient is in defs.
|
||||
If a gradient is declared outside of defs after defs is set, it is included in the gradients of defs.
|
||||
But finally, the loader has a gradient style list regardless of defs.
|
||||
This is only to support this when multiple gradients are declared, even if no defs are declared.
|
||||
refer to: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs */
|
||||
if (loader->doc->node.doc.defs)
|
||||
{
|
||||
loader->def->node.defs.gradients = eina_list_append(loader->def->node.defs.gradients, gradient);
|
||||
}
|
||||
loader->gradient = gradient;
|
||||
else
|
||||
{
|
||||
loader->gradients = eina_list_append(loader->gradients, gradient);
|
||||
}
|
||||
loader->latest_gradient = gradient;
|
||||
}
|
||||
else if (!strcmp(tag_name, "stop"))
|
||||
{
|
||||
|
@ -2118,8 +2183,10 @@ _evas_svg_loader_xml_open_parser(Evas_SVG_Loader *loader,
|
|||
stop->a = 255;
|
||||
eina_simple_xml_attributes_parse(attrs, attrs_length,
|
||||
_attr_parse_stops, loader);
|
||||
if (loader->gradient)
|
||||
loader->gradient->stops = eina_list_append(loader->gradient->stops, stop);
|
||||
if (loader->latest_gradient)
|
||||
{
|
||||
loader->latest_gradient->stops = eina_list_append(loader->latest_gradient->stops, stop);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2361,9 +2428,9 @@ evas_vg_load_file_open_svg(Eina_File *file,
|
|||
_update_gradient(loader.doc, defs->node.defs.gradients);
|
||||
else
|
||||
{
|
||||
if (loader.gradient)
|
||||
if (loader.gradients)
|
||||
{
|
||||
Eina_List* gradient_list = eina_list_append(NULL, loader.gradient);
|
||||
Eina_List* gradient_list = loader.gradients;
|
||||
_update_gradient(loader.doc, gradient_list);
|
||||
eina_list_free(gradient_list);
|
||||
}
|
||||
|
|
|
@ -618,10 +618,18 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F
|
|||
int min = (r.h > r.w) ? r.w : r.h;
|
||||
radius = sqrt(pow(min, 2) + pow(min, 2)) / sqrt(2.0);
|
||||
}
|
||||
if (g->use_percentage)
|
||||
{
|
||||
g->radial->cx = g->radial->cx * r.w + r.x;
|
||||
g->radial->cy = g->radial->cy * r.h + r.y;
|
||||
g->radial->r = g->radial->r * radius;
|
||||
g->radial->fx = g->radial->fx * r.w + r.x;
|
||||
g->radial->fy = g->radial->fy * r.h + r.y;
|
||||
}
|
||||
grad_obj = efl_add(EFL_CANVAS_VG_GRADIENT_RADIAL_CLASS, parent);
|
||||
efl_gfx_gradient_radial_center_set(grad_obj, g->radial->cx * r.w + r.x, g->radial->cy * r.h + r.y);
|
||||
efl_gfx_gradient_radial_radius_set(grad_obj, g->radial->r * radius);
|
||||
efl_gfx_gradient_radial_focal_set(grad_obj, g->radial->fx * r.w + r.x, g->radial->fy * r.h + r.y);
|
||||
efl_gfx_gradient_radial_center_set(grad_obj, g->radial->cx, g->radial->cy);
|
||||
efl_gfx_gradient_radial_radius_set(grad_obj, g->radial->r);
|
||||
efl_gfx_gradient_radial_focal_set(grad_obj, g->radial->fx, g->radial->fy);
|
||||
|
||||
/* in case of objectBoundingBox it need proper scaling */
|
||||
if (!g->user_space)
|
||||
|
@ -955,7 +963,6 @@ _create_gradient_node(Efl_VG *vg)
|
|||
if (!grad->linear) goto oom_error;
|
||||
efl_gfx_gradient_linear_start_get(vg, &grad->linear->x1, &grad->linear->y1);
|
||||
efl_gfx_gradient_linear_end_get(vg, &grad->linear->x2, &grad->linear->y2);
|
||||
grad->use_percentage = EINA_FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -966,6 +973,7 @@ _create_gradient_node(Efl_VG *vg)
|
|||
efl_gfx_gradient_radial_focal_get(vg, &grad->radial->fx, &grad->radial->fy);
|
||||
grad->radial->r = efl_gfx_gradient_radial_radius_get(vg);
|
||||
}
|
||||
grad->use_percentage = EINA_FALSE;
|
||||
|
||||
return grad;
|
||||
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "ecore_wl2_suite.h"
|
||||
#include "../efl_check.h"
|
||||
#include <Ecore_Wl2.h>
|
||||
|
||||
static const Efl_Test_Case etc[] =
|
||||
{
|
||||
#if HAVE_ECORE_WL2
|
||||
{ "Ecore_Wl2", ecore_wl2_test_init },
|
||||
{ "Display", ecore_wl2_test_display },
|
||||
{ "Window", ecore_wl2_test_window },
|
||||
#endif
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
SUITE_INIT(ecore_wl2)
|
||||
{
|
||||
ck_assert_int_eq(ecore_wl2_init(), 1);
|
||||
}
|
||||
|
||||
SUITE_SHUTDOWN(ecore_wl2)
|
||||
{
|
||||
ck_assert_int_eq(ecore_wl2_shutdown(), 0);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int count;
|
||||
|
||||
if (!_efl_test_option_disp(argc, argv, etc)) return 0;
|
||||
|
||||
#ifdef NEED_RUN_IN_TREE
|
||||
putenv("EFL_RUN_IN_TREE=1");
|
||||
#endif
|
||||
|
||||
count =
|
||||
_efl_suite_build_and_run(argc - 1,
|
||||
(const char **)argv + 1, "Ecore_Wl2", etc,
|
||||
SUITE_INIT_FN(ecore_wl2),
|
||||
SUITE_SHUTDOWN_FN(ecore_wl2));
|
||||
|
||||
return (count == 0) ? 0 : 255;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef _ECORE_WL2_SUITE_H
|
||||
# define _ECORE_WL2_SUITE_H
|
||||
|
||||
# include <check.h>
|
||||
# include "../efl_check.h"
|
||||
|
||||
void ecore_wl2_test_init(TCase *tc);
|
||||
void ecore_wl2_test_display(TCase *tc);
|
||||
void ecore_wl2_test_window(TCase *tc);
|
||||
|
||||
#endif
|
|
@ -0,0 +1,191 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <Eina.h>
|
||||
#include <Ecore.h>
|
||||
#include <Ecore_Wl2.h>
|
||||
|
||||
#include "ecore_wl2_suite.h"
|
||||
#include "ecore_wl2_tests_helpers.h"
|
||||
|
||||
EFL_START_TEST(wl2_display_create)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
|
||||
disp = ECORE_WL2_TEST_DISPLAY_SETUP();
|
||||
ck_assert(disp != NULL);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_display_destroy)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
|
||||
disp = ECORE_WL2_TEST_DISPLAY_SETUP();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
ecore_wl2_display_destroy(disp);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_display_get)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
struct wl_display *wdisp;
|
||||
|
||||
disp = ECORE_WL2_TEST_DISPLAY_SETUP();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
wdisp = ecore_wl2_display_get(disp);
|
||||
ck_assert(wdisp != NULL);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_display_name_get)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
|
||||
disp = ECORE_WL2_TEST_DISPLAY_SETUP();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
ck_assert(ecore_wl2_display_name_get(disp) != NULL);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_display_connect)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
|
||||
disp = ECORE_WL2_TEST_DISPLAY_CONNECT();
|
||||
ck_assert(disp != NULL);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_display_disconnect)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
|
||||
disp = ECORE_WL2_TEST_DISPLAY_CONNECT();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
ecore_wl2_display_disconnect(disp);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_display_registry_get)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
|
||||
disp = ECORE_WL2_TEST_DISPLAY_CONNECT();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
ck_assert(ecore_wl2_display_registry_get(disp) != NULL);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_display_shm_get)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
struct wl_shm *shm;
|
||||
|
||||
disp = ECORE_WL2_TEST_DISPLAY_CONNECT();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
shm = ecore_wl2_display_shm_get(disp);
|
||||
ck_assert(shm != NULL);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_display_dmabuf_get)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
void *dma;
|
||||
|
||||
disp = ECORE_WL2_TEST_DISPLAY_CONNECT();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
dma = ecore_wl2_display_dmabuf_get(disp);
|
||||
ck_assert(dma != NULL);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_display_globals_get)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
Ecore_Wl2_Global *global;
|
||||
Eina_Iterator *itr;
|
||||
void *data;
|
||||
|
||||
disp = ECORE_WL2_TEST_DISPLAY_CONNECT();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
itr = ecore_wl2_display_globals_get(disp);
|
||||
ck_assert(itr != NULL);
|
||||
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
global = (Ecore_Wl2_Global *)data;
|
||||
printf("Interface: <%s>\n", global->interface);
|
||||
}
|
||||
|
||||
eina_iterator_free(itr);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_display_screen_size_get)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
int w, h;
|
||||
|
||||
disp = ECORE_WL2_TEST_DISPLAY_CONNECT();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
ecore_wl2_display_screen_size_get(disp, &w, &h);
|
||||
ck_assert_int_ne(w, 0);
|
||||
ck_assert_int_ne(h, 0);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(wl2_display_inputs_get)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
Eina_Iterator *itr;
|
||||
|
||||
disp = ECORE_WL2_TEST_DISPLAY_CONNECT();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
itr = ecore_wl2_display_inputs_get(disp);
|
||||
ck_assert(itr != NULL);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void
|
||||
ecore_wl2_test_display(TCase *tc)
|
||||
{
|
||||
if ((!getenv("WAYLAND_DISPLAY")) && (getenv("XDG_RUNTIME_DIR")))
|
||||
{
|
||||
/* tests here are for server-side functions */
|
||||
printf("No Wayland Compositor detected. Testing server-side functions\n");
|
||||
tcase_add_test(tc, wl2_display_create);
|
||||
tcase_add_test(tc, wl2_display_destroy);
|
||||
tcase_add_test(tc, wl2_display_get);
|
||||
tcase_add_test(tc, wl2_display_name_get);
|
||||
}
|
||||
|
||||
if (getenv("WAYLAND_DISPLAY"))
|
||||
{
|
||||
/* tests here are for client-side functions */
|
||||
printf("Wayland Compositor detected. Testing client-side functions\n");
|
||||
tcase_add_test(tc, wl2_display_connect);
|
||||
tcase_add_test(tc, wl2_display_disconnect);
|
||||
tcase_add_test(tc, wl2_display_registry_get);
|
||||
tcase_add_test(tc, wl2_display_shm_get);
|
||||
tcase_add_test(tc, wl2_display_dmabuf_get);
|
||||
tcase_add_test(tc, wl2_display_globals_get);
|
||||
tcase_add_test(tc, wl2_display_screen_size_get);
|
||||
tcase_add_test(tc, wl2_display_inputs_get);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <Eina.h>
|
||||
#include <Ecore.h>
|
||||
#include <Ecore_Wl2.h>
|
||||
|
||||
#include "ecore_wl2_suite.h"
|
||||
|
||||
EFL_START_TEST(ecore_wl2_simple)
|
||||
{
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void
|
||||
ecore_wl2_test_init(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, ecore_wl2_simple);
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <Eina.h>
|
||||
#include <Ecore.h>
|
||||
#include <Ecore_Wl2.h>
|
||||
|
||||
#include "ecore_wl2_suite.h"
|
||||
|
||||
static Ecore_Wl2_Display *
|
||||
_display_connect(void)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
|
||||
disp = ecore_wl2_display_connect(NULL);
|
||||
return disp;
|
||||
}
|
||||
|
||||
static Ecore_Wl2_Window *
|
||||
_window_create(Ecore_Wl2_Display *disp)
|
||||
{
|
||||
Ecore_Wl2_Window *win;
|
||||
|
||||
win = ecore_wl2_window_new(disp, NULL, 100, 100, 500, 500);
|
||||
return win;
|
||||
}
|
||||
|
||||
EFL_START_TEST(wl2_window_new)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
Ecore_Wl2_Window *win;
|
||||
|
||||
disp = _display_connect();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
win = _window_create(disp);
|
||||
ck_assert(win != NULL);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void
|
||||
ecore_wl2_test_window(TCase *tc)
|
||||
{
|
||||
if (getenv("WAYLAND_DISPLAY"))
|
||||
{
|
||||
/* window tests can only run if there is an existing compositor */
|
||||
tcase_add_test(tc, wl2_window_new);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef ECORE_WL2_TEST_HELPERS_H
|
||||
# define ECORE_WL2_TEST_HELPERS_H
|
||||
|
||||
# include <Ecore_Wl2.h>
|
||||
|
||||
# define ECORE_WL2_TEST_DISPLAY_SETUP() _setup_display()
|
||||
# define ECORE_WL2_TEST_DISPLAY_CONNECT() _connect_display()
|
||||
|
||||
static Ecore_Wl2_Display *
|
||||
_setup_display(void)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
|
||||
disp = ecore_wl2_display_create(NULL);
|
||||
return disp;
|
||||
}
|
||||
|
||||
static Ecore_Wl2_Display *
|
||||
_connect_display(void)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
|
||||
disp = ecore_wl2_display_connect(NULL);
|
||||
return disp;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -0,0 +1,20 @@
|
|||
ecore_wl2_suite_src = [
|
||||
'ecore_wl2_suite.c',
|
||||
'ecore_wl2_suite.h',
|
||||
'ecore_wl2_tests_helpers.h',
|
||||
'ecore_wl2_test_ecore_wl2.c',
|
||||
'ecore_wl2_test_display.c',
|
||||
'ecore_wl2_test_window.c'
|
||||
]
|
||||
|
||||
ecore_wl2_suite = executable('ecore_wl2_suite',
|
||||
ecore_wl2_suite_src,
|
||||
dependencies: [ecore_wl2, ecore, check],
|
||||
c_args : [
|
||||
'-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
|
||||
'-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"']
|
||||
)
|
||||
|
||||
test('ecore_wl2-suite', ecore_wl2_suite,
|
||||
env : test_env
|
||||
)
|
Loading…
Reference in New Issue