Merge branch 'master' into devs/hermet/lottie

This commit is contained in:
Hermet Park 2020-06-10 09:45:24 +09:00
commit c27697cf58
18 changed files with 107 additions and 30 deletions

View File

@ -6,7 +6,8 @@ travis_fold start "meson"
travis_time_start "meson"
if [ "$DISTRO" != "" ] ; then
# Why do we need to disable the imf loaders here?
OPTS=" -Decore-imf-loaders-disabler=scim,ibus"
# Once libwebp 1.1.0 is available in more distros we can enable it by default again
OPTS=" -Decore-imf-loaders-disabler=scim,ibus -Devas-loaders-disabler=json,webp"
MONO_LINUX_COPTS=" -Dbindings=cxx,mono -Dmono-beta=true"
@ -37,7 +38,7 @@ if [ "$DISTRO" != "" ] ; then
MINGW_COPTS="--cross-file .ci/cross_toolchain.txt -Davahi=false -Deeze=false -Dsystemd=false \
-Dpulseaudio=false -Dx11=false -Dopengl=none -Dlibmount=false \
-Devas-loaders-disabler=json,pdf,ps,raw,svg,rsvg,webp \
-Devas-loaders-disabler=json,pdf,ps,raw,svg,rsvg \
-Dharfbuzz=true -Dpixman=true -Dembedded-lz4=false "
if [ "$1" = "default" ]; then
@ -98,7 +99,7 @@ elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:/usr/local/Cellar/libffi/$LIBFFI_VER/lib/pkgconfig:$(pwd)/.ci"
mkdir build && meson build -Dopengl=full -Decore-imf-loaders-disabler=scim,ibus -Dx11=false -Davahi=false -Deeze=false -Dsystemd=false -Dnls=false -Dcocoa=true -Dgstreamer=false
else # Native Ubuntu Linux Travis builds (non-docker)
OPTS=" -Decore-imf-loaders-disabler=scim,ibus"
OPTS=" -Decore-imf-loaders-disabler=scim,ibus -Devas-loaders-disabler=json,webp"
if [ "$TRAVIS_CPU_ARCH" = "ppc64le" ]; then
OPTS="$OPTS -Dbindings="

View File

@ -407,7 +407,15 @@ inline bool is_unique_event(attributes::event_def const& evt
inline std::vector<attributes::constructor_def> reorder_constructors(std::vector<attributes::constructor_def> constructors)
{
auto is_required = [](attributes::constructor_def const& ctr) { return !ctr.is_optional; };
auto is_object_parent = [](attributes::constructor_def const& ctr)
{
return (ctr.klass.namespaces.size() == 1
&& ctr.klass.namespaces[0] == "Efl"
&& ctr.klass.eolian_name == "Object"
&& ctr.name == "Efl.Object.parent");
};
std::stable_partition(constructors.begin(), constructors.end(), is_required);
constructors.erase (std::remove_if (constructors.begin(), constructors.end(), is_object_parent), constructors.end());
return constructors;
}

View File

@ -53,6 +53,10 @@ template <>
struct in_traits<efl::eina::strbuf> { typedef efl::eina::strbuf type; };
template <>
struct in_traits<efl::eina::strbuf const> { typedef efl::eina::strbuf const type; };
template <>
struct in_traits<efl::eina::strbuf_view> { typedef efl::eina::strbuf_view type; };
template <>
struct in_traits<efl::eina::strbuf_view const> { typedef efl::eina::strbuf_view const type; };
template <typename T>
struct in_traits<T&> { typedef T& type; };
template <typename T>
@ -550,10 +554,22 @@ inline const char* convert_to_c_impl(efl::eina::stringshare x, tag<const char*,
{
return eina_stringshare_ref(x.c_str());
}
inline Eina_Strbuf const* convert_to_c_impl(efl::eina::strbuf& x, tag<Eina_Strbuf const*, efl::eina::strbuf, false>)
{
return x.native_handle();
}
inline Eina_Strbuf* convert_to_c_impl(efl::eina::strbuf& x, tag<Eina_Strbuf*, efl::eina::strbuf, false>)
{
return x.native_handle();
}
inline Eina_Strbuf const* convert_to_c_impl(efl::eina::strbuf_view const& x, tag<Eina_Strbuf const*, efl::eina::strbuf_view, false>)
{
return x.native_handle();
}
inline Eina_Strbuf* convert_to_c_impl(efl::eina::strbuf_view const& x, tag<Eina_Strbuf*, efl::eina::strbuf_view, false>)
{
return const_cast<Eina_Strbuf*>(x.native_handle());
}
template <typename T, typename U, typename Deleter>
T* convert_to_c_impl(std::unique_ptr<U, Deleter>& v, tag<T*, std::unique_ptr<U, Deleter>>)
{
@ -732,6 +748,19 @@ T convert_to_return(U* value, tag<T, U*>, typename std::enable_if<is_range<T>::v
// const should be to the type if value is const
return T{const_cast<typename std::remove_const<U>::type*>(value)};
}
inline eina::strbuf convert_to_return(Eina_Strbuf* value, tag<Eina_Strbuf*, efl::eina::strbuf>)
{
eina::strbuf_wrapper t{value};
return t;
}
inline eina::strbuf_view convert_to_return(Eina_Strbuf* value, tag<Eina_Strbuf*, efl::eina::strbuf_view>)
{
return {value};
}
inline eina::strbuf_view convert_to_return(Eina_Strbuf const* value, tag<Eina_Strbuf const*, efl::eina::strbuf_view>)
{
return {value};
}
inline eina::stringshare convert_to_return(const Eina_Stringshare* value, tag<const char*, efl::eina::stringshare>)
{
return efl::eina::stringshare(value);

View File

@ -21,7 +21,7 @@
#include "efl_loop_message_future_handler.eo.h"
/**
* @addtogroup Ecore_MainLoop_Group
* @addtogroup Ecore_Main_Loop_Group
*
* @{
*/
@ -93,6 +93,7 @@ EAPI Eo *efl_main_loop_get(void);
*/
/**
* @ingroup Ecore
* @addtogroup Ecore_Fd_Io_Group
*
* @{
@ -115,6 +116,7 @@ EAPI Eo *efl_main_loop_get(void);
*/
/**
* @ingroup Ecore
* @addtogroup Ecore_Model_Group
*
* @{

View File

@ -148,7 +148,7 @@ class @beta Efl.Io.Copier extends Efl.Loop_Consumer implements Efl.Io.Closer {
destination then the "done" event is emitted.
If the destination is not set (ie: $NULL) then data is kept
in a internal @Eina.Binbuf, which can be stolen with
in a internal binbuf, which can be stolen with
@.binbuf_steal once "data" or "line" events are
emitted. It exists as a useful shortcut to easily drain
readers and store all data in memory with no need to use an
@ -313,7 +313,7 @@ class @beta Efl.Io.Copier extends Efl.Loop_Consumer implements Efl.Io.Closer {
which case you should wait for "done", "data" or "line"
events and then call it to retrieve and own the data.
]]
return: ptr(Eina.Binbuf) @move @no_unused; [[Binbuf]]
return: binbuf @move @no_unused; [[Binbuf]]
}
@property pending_size {

View File

@ -133,7 +133,7 @@ class @beta Efl.Io.Buffer extends Efl.Object
On failure, for example a read-only backing store was
adopted with @.adopt_readonly, $NULL is returned.
]]
return: ptr(Eina.Binbuf) @move @no_unused; [[Binbuf]]
return: binbuf @move @no_unused; [[Binbuf]]
}
}

View File

@ -51,6 +51,8 @@ static const char *xdg_pictures_dir = NULL;
static const char *xdg_videos_dir = NULL;
static const char *hostname = NULL;
static Eina_Prefix *pfx= NULL;
static void efreet_dirs_init(void);
static const char *efreet_dir_get(const char *key, const char *fallback);
static Eina_List *efreet_dirs_get(const char *key,
@ -72,6 +74,9 @@ efreet_base_init(void)
EINA_LOG_ERR("Efreet: Could not create a log domain for efreet_base.\n");
return 0;
}
if (!pfx) pfx = eina_prefix_new
(NULL, efreet_init, "EFREET", "efreet", "checkme",
PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
efreet_dirs_init();
return 1;
}
@ -105,6 +110,11 @@ efreet_base_shutdown(void)
IF_RELEASE(hostname);
if (pfx)
{
eina_prefix_free(pfx);
pfx = NULL;
}
eina_log_domain_unregister(_efreet_base_log_dom);
_efreet_base_log_dom = -1;
}
@ -280,6 +290,7 @@ efreet_dirs_reset(void)
static void
efreet_dirs_init(void)
{
char *data_dir = DATA_DIR;
char buf[PATH_MAX];
/* efreet_home_dir */
@ -294,13 +305,27 @@ efreet_dirs_init(void)
xdg_cache_home = efreet_dir_get("XDG_CACHE_HOME", "/.cache");
/* xdg_data_dirs */
if (pfx)
{
const char *dir = eina_prefix_get(pfx);
if (dir)
{
size_t len = strlen(dir);
data_dir = alloca(len + 1 + 5 /*"share" */ + 1);
#ifdef _WIN32
snprintf(buf, sizeof(buf), "%s\\Efl;" DATA_DIR ";", getenv("APPDATA"));
xdg_data_dirs = efreet_dirs_get("XDG_DATA_DIRS", buf);
snprintf(data_dir, len + 1 + 5 + 1, "%s\\share", dir);
#else
xdg_data_dirs = efreet_dirs_get("XDG_DATA_DIRS",
DATA_DIR ":/usr/share:/usr/local/share");
snprintf(data_dir, len + 1 + 5 + 1, "%s/share", dir);
#endif
}
}
#ifdef _WIN32
snprintf(buf, sizeof(buf), "%s\\Efl;%s;", data_dir, getenv("APPDATA"));
#else
snprintf(buf, sizeof(buf), "%s:/usr/share:/usr/local/share", data_dir);
#endif
xdg_data_dirs = efreet_dirs_get("XDG_DATA_DIRS", buf);
/* xdg_config_dirs */
#ifdef _WIN32
xdg_config_dirs = efreet_dirs_get("XDG_CONFIG_DIRS", getenv("APPDATA"));

View File

@ -321,7 +321,7 @@ _eina_value_type_content_convert_to(const Eina_Value_Type *type EINA_UNUSED, con
}
//create some fallback
{
char buf[PATH_MAX];
char buf[128];
char *tmp = (char*) &buf;
snprintf(buf, sizeof(buf), "Content %p cannot be converted to \"text/plain;charset=utf-8\"", *ra);
return eina_value_type_pset(convert, convert_mem, &tmp);

View File

@ -301,8 +301,9 @@ _try_argv(Eina_Prefix *pfx, const char *argv0)
{
if (getcwd(buf2, sizeof(buf2)))
{
char joined[PATH_MAX];
eina_file_path_join(joined, sizeof(joined), buf2, argv0);
size_t len = strlen(buf2) + 1 + strlen(argv0) + 1;
char *joined = alloca(len);
eina_file_path_join(joined, len, buf2, argv0);
if (realpath(joined, buf))
{
if (access(buf, X_OK) == 0)
@ -371,7 +372,7 @@ _try_argv(Eina_Prefix *pfx, const char *argv0)
static int
_get_env_var(char **var, const char *envprefix, const char *envsuffix, const char *prefix, const char *dir)
{
char env[1024];
char env[64];
const char *s;
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
@ -387,8 +388,11 @@ _get_env_var(char **var, const char *envprefix, const char *envsuffix, const cha
}
else if (prefix)
{
char buf[PATH_MAX];
eina_file_path_join(buf, sizeof(buf), prefix, dir);
size_t len = strlen(prefix) + 1 + strlen(dir) + 1;
char *buf;
buf = alloca(len);
eina_file_path_join(buf, len, prefix, dir);
INF("Have %s_PREFIX = %s, use %s = %s", envprefix, prefix, env, buf);
STRDUP_REP(*var, buf);
return 1;
@ -409,7 +413,7 @@ _get_env_vars(Eina_Prefix *pfx,
const char *datadir,
const char *localedir)
{
char env[1024];
char env[32];
const char *prefix;
int ret = 0;

View File

@ -80,13 +80,13 @@ class @beta Efl.Io.Manager extends Efl.Loop_Consumer
[[Retrieves or sets information of a given extended attribute.]]
set {
values {
data: ptr(Eina.Binbuf); [[Data to set as information]]
data: binbuf; [[Data to set as information]]
flags: Eina.Xattr.Flags; [[Extended attributes flags]]
}
return: future<uint64> @move; [[Future for asynchronous set operation]]
}
get {
return: future<Eina.Binbuf> @move; [[Information]]
return: future<binbuf> @move; [[Information]]
}
keys {
path: string; [[File path]]

View File

@ -835,9 +835,9 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
Efl.Part.part_get;
}
constructors {
.win_name @optional;
.win_name;
.win_type @optional;
.accel_preference @optional;
.accel_preference;
}
events {
delete,request: void; [[Called when the window receives a delete request]]

View File

@ -432,6 +432,9 @@ abstract Efl.Object
class.constructor;
class.destructor;
}
constructors {
.parent @optional;
}
events {
del @hot: void; [[Object is being deleted. See @.destructor.]]
invalidate @hot: void; [[Object is being invalidated and losing its parent. See @.invalidate.]]

View File

@ -128,9 +128,6 @@ type @extern Eina.Error: int; [[Eina error type
@since 1.22
]]
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 @beta Eina.Slice {
[[A linear, read-only, memory segment]]
len: size; [[Length of the memory segment]]

View File

@ -174,10 +174,10 @@ struct visitor_generate
if (r.base_qualifier.qualifier & qualifier_info::is_const)
{
r.base_qualifier.qualifier ^= qualifier_info::is_const;
return replace_base_type(r, " Eina_Binbuf*");
return replace_base_type(r, " ::efl::eina::strbuf");
}
else
return replace_base_type(r, " Eina_Binbuf const*");
return replace_base_type(r, " ::efl::eina::strbuf_view");
}}
/* FIXME: handle any_value_ref */
, {"any_value", true, nullptr, nullptr, [&]

View File

@ -483,6 +483,9 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
}
}
}
constructors {
Efl.Object.parent;
}
implements {
Efl.Object.constructor;
Efl.Object.finalize;

View File

@ -597,6 +597,11 @@ _glyph_free(RGBA_Font_Glyph *fg)
if ((fg->glyph_out->rle) && (fg->glyph_out->bitmap.rle_alloc))
free(fg->glyph_out->rle);
else if ((fg->glyph_out->bitmap.buffer) && (fg->glyph_out->bitmap.rle_alloc))
{
free(fg->glyph_out->bitmap.buffer);
fg->glyph_out->bitmap.buffer = NULL;
}
fg->glyph_out->rle = NULL;
if (!fg->glyph_out->bitmap.no_free_glout) free(fg->glyph_out);
fg->glyph_out = NULL;

View File

@ -69,7 +69,7 @@ public static class TestModel {
{
string propertyBound = null;
bool callbackCalled = false;
var parent = new Efl.Ui.Win(null);
var parent = new Efl.Ui.Win(null, "", "");
parent.Visible = false;
var factory = new Efl.Ui.ItemFactory<Efl.Ui.Button>(parent);
factory.PropertyBoundEvent += (object sender, Efl.Ui.PropertyBindPropertyBoundEventArgs args) => {

View File

@ -61,7 +61,7 @@ public static class TestMVVMParts
{
public static void mvvm_dynamic_parts()
{
var parent = new Efl.Ui.Win(null);
var parent = new Efl.Ui.Win(null, "", "");
parent.Visible = false;
var factory = new Efl.Ui.ItemFactory<Efl.Ui.ListDefaultItem>(parent);
@ -75,7 +75,7 @@ public static class TestMVVMParts
public static void mvvm_factory_properties()
{
var parent = new Efl.Ui.Win(null);
var parent = new Efl.Ui.Win(null, "", "");
parent.Visible = false;
var factory = new Efl.Ui.ItemFactory<Efl.Ui.ListDefaultItem>(parent);
var iconFactory = new Efl.Ui.ImageFactory(null);