Merge branch 'master' into devs/hermet/lottie

This commit is contained in:
Hermet Park 2019-09-10 14:53:48 +09:00
commit 7cc63b9b8f
26 changed files with 157 additions and 117 deletions

43
NEWS
View File

@ -7,6 +7,8 @@ Changes since 1.22.0:
Features:
* eolian: remove support for inlist/inarray
* ecore-drm2: Add API function to return output rotation (T7690)
* ecore-drm2: Add background_color to crtc atomic properties
* ecore-drm2: Fill in crtc background color (if supported) during atomic commits
* ecore-drm2: Add API function to set crtc background color
@ -28,6 +30,42 @@ Features:
Fixes:
* Fix leak in elm atspi
* eina_file: set errno on open fail for win32 build
* evas-gl-drm: Fix issue of rotation not actually rotating (T7690)
* solve neon rotation issue by moving to the tiled rotator
* eo: Fix missing varags cleanup (CID1399080)
* efl_core_command_line: Fix logically dead code (CID1399106)
* efl_ui_widget_common: Fix potential resource leak (CID1399088)
* efl_ui_selection_manager: Fix unchecked return value (CID1399092)
* evas_device: Fix dereferencing null pointer (CID1399091)
* efl_ui_stack: Fix dereference null return value (CID1399082)
* efl_ui_datepicker: Fix uninitialized scalar value (CID1397006)
* efl_ui_grid: Fix dereferencing null pointer (CID1397000)
* ecore_con: Fix dereferencing of null pointer (CID1396990)
* elm_atspi_bridge: Fix resource leak (CID1399429)
* efl_ui_win: Fix dereference null return value (CID1399428)
* efl_ui_win: Fix dereference null return (CID1399427)
* efl_ui_win: Fix dereference null return (CID1399426)
* efl_ui_win: Fix dereference null return value (CID1399425)
* efreet: Fix resource leak (CID1399090)
* efl_ui_text: Fix resource leak (CID1396998)
* eldbus: Fix dereference after null check (CID1399422)
* efl_ui_focus_manager_calc: Fix resource leaks (CID1396984, CID1396965)
* elm_focus_legacy: Fix resource leaks (CID1399096, CID1399095)
* eldbus: Fix resource leak (CID1399097)
* efl_canvas_vg_object: Fix dereference after null check (CID1399423, CID1399421)
* efl_ui_win: fix hw accel detection
* efl_ui_layout: Eina_Error type has been modified to work correctly.
* ecore-drm2: Don't use AtomicAddProperty for plane rotation (T7690)
* ecore-drm2: Update plane state values based on FB (T7690)
* ecore-drm2: Factor in output rotation when getting output info (T7690)
* evas drm: Don't use eng_output_resize or redraws clear (T7690)
* evas drm: Fix software output rotation (T7690)
* efl_ui_image: remove job in sizing calc. (T7360)
* evas_render: Process deferred callback in the sync render case.
* efl_ui_selection_manager: Don't leak malloc'd data (CID1396949)
* ecore-drm2: Add missing @ingroup for some doxy
* remove vpath test for user dir the test was broken and fixing is insane (T7728)
* tests - fix check header to always include eina due to windows
* tests - remove one of the eina strtod tests as libc is failing
@ -189,6 +227,11 @@ Fixes:
* evas -gl engines - buffer age - bring back fix for changing buffer age
* eio - don't call cb's after a cancel
* elm sel mgr - remove event handlers when no drop targets are left
* evas_vg: fix alpha animation bug in case of partial update
* elm_popup: calculate the label min size of popup before the popup group calculation
* vg_common_svg : Initialize "display" attribute
* fix a bunch of breaks that having a blind file unload has brought
* fix xpm loader to be threadable - fixes so much stuff...
Changes since 1.21.0:
---------------------

View File

@ -175,10 +175,6 @@
*
* @image html img/widget/notify/preview-00.png
* @image latex img/widget/notify/preview-00.eps
* @li @ref Elm_Nstate
*
* @image html img/widget/nstate/preview-00.png
* @image latex img/widget/nstate/preview-00.eps
* @li @ref Elm_Panel
*
* @image html img/widget/panel/preview-00.png

View File

@ -66,7 +66,6 @@ widget_previews = [
['mapbuf', 'preview-00.png', 'widget_preview_mapbuf', '200', '200'],
['menu', 'preview-00.png', 'widget_preview_menu', '100', '100'],
['notify', 'preview-00.png', 'widget_preview_notify', '60', '30'],
['nstate', 'preview-00.png', 'widget_preview_nstate', '45', '28'],
['panel', 'preview-00.png', 'widget_preview_panel', '150', '50'],
['panes', 'preview-00.png', 'widget_preview_panes', '200', '100'],
['photocam', 'preview-00.png', 'widget_preview_photocam', '243', '162'],
@ -114,7 +113,11 @@ foreach text_filter_property : text_filter_properties
filter_code = run_command('cat', join_paths(meson.source_root(), 'src', 'examples', 'evas', 'filters', 'filter_'+name+'.lua'))
doc_target += custom_target('preview_text_filters_'+name,
command: [env, 'EFL_RUN_IN_TREE=1', preview_text_filter.full_path(), text, filter_code.stdout(), '@OUTPUT@', font, size],
command: [
env, 'EFL_RUN_IN_TREE=1',
'EFL_EVAS_FILTER_LUA_PREFIX=' + join_paths(meson.source_root(), 'src', 'lib', 'evas'),
preview_text_filter.full_path(), text, filter_code.stdout(), '@OUTPUT@', font, size
],
depends: preview_text_filter,
output: 'filter_'+name+'.png',
build_by_default: false

View File

@ -1,10 +0,0 @@
#include "widget_preview_tmpl_head.c"
Evas_Object *o = efl_add(EFL_UI_NSTATE_CLASS, win);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, o);
evas_object_show(o);
elm_object_text_set(o, "Nstate");
#include "widget_preview_tmpl_foot.c"

View File

@ -280,7 +280,7 @@ subprojects = [
['ecore' ,[] , false, true, false, false, false, false, ['eina', 'eo', 'efl'], ['buildsystem']],
['eldbus' ,[] , false, true, true, false, true, true, ['eina', 'eo', 'efl'], []],
['ecore' ,[] , true, false, false, false, true, true, ['eina', 'eo', 'efl'], []], #ecores modules depend on eldbus
['ecore_audio' ,[] , false, true, false, false, false, false, ['eina', 'eo'], []],
['ecore_audio' ,['audio'] , false, true, false, false, false, false, ['eina', 'eo'], []],
['ecore_avahi' ,['avahi'] , false, true, false, false, false, true, ['eina', 'ecore'], []],
['ecore_con' ,[] , false, true, true, false, true, false, ['eina', 'eo', 'efl', 'ecore'], ['http-parser']],
['ecore_file' ,[] , false, true, false, false, false, false, ['eina'], []],
@ -325,6 +325,10 @@ config_dir += include_directories('.')
#the other modules require theire package
subdir(join_paths(local_module, 'eina'))
#List of dependency objects that might be disabled due to configurations
#If they are enabled, the object gets overwritten by the library file.
ecore_audio = declare_dependency()
test_dirs = []
example_dirs = []
tmp_empty = declare_dependency()

View File

@ -36,9 +36,9 @@ TST(01, tick) (Evas *e EINA_UNUSED, double f, Evas_Coord win_w, Evas_Coord win_h
w = 5 + ((1.0 + cos((double)((f * 30.0) + (i * 10)))) * w0 * 2);
h = 5 + ((1.0 + sin((double)((f * 40.0) + (i * 19)))) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)((f * 50.0) + (i * 13))) * (w0 / 2);
x += (Evas_Coord)(sin((double)((f * 50.0) + (i * 13))) * (w0 / 2));
y = (win_h / 2) - (h / 2);
y += cos((double)((f * 45.0) + (i * 28))) * (h0 / 2);
y += (Evas_Coord)(cos((double)((f * 45.0) + (i * 28))) * (h0 / 2));
evas_object_geometry_set(o, x, y, w, h);
}
}

View File

@ -36,9 +36,9 @@ TST(02, tick) (Evas *e EINA_UNUSED, double f, Evas_Coord win_w, Evas_Coord win_h
w = 5 + ((1.0 + cos((double)((f * 30.0) + (i * 10)))) * w0 * 2);
h = 5 + ((1.0 + sin((double)((f * 40.0) + (i * 19)))) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)((f * 50.0) + (i * 13))) * (w0 / 2);
x += (Evas_Coord)(sin((double)((f * 50.0) + (i * 13))) * (w0 / 2));
y = (win_h / 2) - (h / 2);
y += cos((double)((f * 45.0) + (i * 28))) * (h0 / 2);
y += (Evas_Coord)(cos((double)((f * 45.0) + (i * 28))) * (h0 / 2));
evas_object_geometry_set(o, x, y, w, h);
}
}

View File

@ -36,9 +36,9 @@ TST(03, tick) (Evas *e EINA_UNUSED, double f, Evas_Coord win_w, Evas_Coord win_h
w = 5 + ((1.0 + cos((double)((f * 30.0) + (i * 10)))) * w0 * 2);
h = 5 + ((1.0 + sin((double)((f * 40.0) + (i * 19)))) * h0 * 2);
x = (win_w / 2) - (w / 2);
x += sin((double)((f * 50.0) + (i * 13))) * (w0 / 2);
x += (Evas_Coord)(sin((double)((f * 50.0) + (i * 13))) * (w0 / 2));
y = (win_h / 2) - (h / 2);
y += cos((double)((f * 45.0) + (i * 28))) * (h0 / 2);
y += (Evas_Coord)(cos((double)((f * 45.0) + (i * 28))) * (h0 / 2));
evas_object_geometry_set(o, x, y, w, h);
}
}

View File

@ -380,7 +380,7 @@ eo_gen_docs_event_gen(const Eolian_State *state, const Eolian_Event *ev,
if (rt)
{
p = buf;
Eina_Stringshare *rts = eolian_type_c_type_get(rt, EOLIAN_C_TYPE_DEFAULT);
Eina_Stringshare *rts = eolian_type_c_type_get(rt);
snprintf(buf, sizeof(buf), "@return %s", rts);
eina_stringshare_del(rts);
}

View File

@ -235,7 +235,7 @@ _generate_iterative_free(Eina_Strbuf **buf, const Eolian_Type *type, const Eolia
eina_strbuf_append_printf(iter_param, "%s_iter", eolian_parameter_name_get(parameter));
//generate the field definition
eina_strbuf_append_printf(*buf, " %s", eolian_type_c_type_get(inner_type, EOLIAN_C_TYPE_DEFAULT));
eina_strbuf_append_printf(*buf, " %s", eolian_type_c_type_get(inner_type));
eina_strbuf_append_buffer(*buf, iter_param);
eina_strbuf_append(*buf, ";\n");

View File

@ -203,7 +203,7 @@ _var_generate(const Eolian_State *state, const Eolian_Variable *vr)
}
else
{
Eina_Stringshare *ct = eolian_type_c_type_get(vt, EOLIAN_C_TYPE_DEFAULT);
Eina_Stringshare *ct = eolian_type_c_type_get(vt);
eina_strbuf_append_printf(buf, "EWAPI extern %s %s;", ct, fn);
eina_stringshare_del(ct);
}
@ -394,7 +394,7 @@ _source_gen_var(Eina_Strbuf *buf, const Eolian_Variable *vr)
eina_str_toupper(&fn);
const Eolian_Type *vt = eolian_variable_base_type_get(vr);
Eina_Stringshare *ct = eolian_type_c_type_get(vt, EOLIAN_C_TYPE_DEFAULT);
Eina_Stringshare *ct = eolian_type_c_type_get(vt);
eina_strbuf_append_printf(buf, "EWAPI %s %s = ", ct, fn);
eina_stringshare_del(ct);
free(fn);

View File

@ -172,12 +172,6 @@ ffi.cdef [[
EOLIAN_TYPE_BUILTIN_VOID_PTR
} Eolian_Type_Builtin_Type;
typedef enum {
EOLIAN_C_TYPE_DEFAULT = 0,
EOLIAN_C_TYPE_PARAM,
EOLIAN_C_TYPE_RETURN
} Eolian_C_Type_Type;
typedef enum {
EOLIAN_EXPR_UNKNOWN = 0,
EOLIAN_EXPR_INT,
@ -453,7 +447,7 @@ ffi.cdef [[
Eina_Bool eolian_typedecl_is_extern(const Eolian_Typedecl *tp);
const char *eolian_type_c_type_get(const Eolian_Type *tp, Eolian_C_Type_Type ctype);
const char *eolian_type_c_type_get(const Eolian_Type *tp);
const char *eolian_typedecl_c_type_get(const Eolian_Typedecl *tp);
const char *eolian_typedecl_free_func_get(const Eolian_Typedecl *tp);
@ -989,12 +983,6 @@ M.typedecl_type = {
FUNCTION_POINTER = 5
}
M.c_type_type = {
DEFAULT = 0,
PARAM = 1,
RETURN = 2
}
ffi.metatype("Eolian_Struct_Type_Field", {
__index = wrap_object {
documentation_get = function(self)
@ -1175,8 +1163,8 @@ M.Type = ffi.metatype("Eolian_Type", {
return eolian.eolian_type_is_ptr(self) ~= 0
end,
c_type_get = function(self, ctype)
local v = eolian.eolian_type_c_type_get(self, ctype)
c_type_get = function(self)
local v = eolian.eolian_type_c_type_get(self)
if v == nil then return nil end
return ffi_stringshare(v)
end

View File

@ -15,7 +15,7 @@ endif
config_h.set('EDJE_CALC_CACHE', '1')
if get_option('edje-sound-and-video')
if get_option('audio') and get_option('edje-sound-and-video')
config_h.set('ENABLE_MULTISENSE', '1')
edje_deps += ecore_audio
endif

View File

@ -10,7 +10,7 @@ class @beta Efl.Ui.Internal_Text_Scroller extends Efl.Ui.Scroller
[[Internal-usage text scroller class.
This class is a special scroller that evaluates its size based on the
$Efl.Canvas.Text object it holds. On initialization the object is meant
@Efl.Canvas.Text object it holds. On initialization the object is meant
to be passed along a container (so that other objects such as
a "guide hint" text object are store in such container.
]]

View File

@ -350,7 +350,11 @@ schedule_recalc_absolut_size(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd)
EOLIAN static void
_efl_ui_position_manager_list_efl_ui_position_manager_entity_viewport_set(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, Eina_Rect size)
{
if (pd->viewport.w == size.w && pd->viewport.h == size.h) return;
if (pd->viewport.x == size.x &&
pd->viewport.y == size.y &&
pd->viewport.w == size.w &&
pd->viewport.h == size.h)
return;
pd->viewport = size;

View File

@ -60,7 +60,7 @@ _apply_box_properties(Eo *obj, Efl_Ui_Spotlight_Manager_Scroll_Data *pd)
double diff = i - current_pos;
Efl_Gfx_Entity *elem = efl_pack_content_get(pd->container, i);
geometry.x = (group_pos.x + group_pos.w/2)-(pd->page_size.w/2 - diff*pd->page_size.w);
geometry.x = (int)((group_pos.x + group_pos.w/2)-(pd->page_size.w/2 - diff*pd->page_size.w));
if (!eina_rectangles_intersect(&geometry.rect, &group_pos.rect))
{
efl_canvas_object_clipper_set(elem, pd->backclip);

View File

@ -351,13 +351,6 @@ typedef enum
EOLIAN_TYPE_BUILTIN_VOID_PTR
} Eolian_Type_Builtin_Type;
typedef enum
{
EOLIAN_C_TYPE_DEFAULT = 0,
EOLIAN_C_TYPE_PARAM,
EOLIAN_C_TYPE_RETURN
} Eolian_C_Type_Type;
typedef enum
{
EOLIAN_EXPR_UNKNOWN = 0,
@ -3000,7 +2993,6 @@ EAPI Eina_Bool eolian_type_is_ptr(const Eolian_Type *tp);
* @brief Get the full C type name of the given type.
*
* @param[in] tp the type.
* @param[in] ctype the context within which the C type string will be used.
* @return The C type name assuming @c tp is not NULL.
*
* You're responsible for the stringshare.
@ -3009,7 +3001,7 @@ EAPI Eina_Bool eolian_type_is_ptr(const Eolian_Type *tp);
*
* @ingroup Eolian
*/
EAPI Eina_Stringshare *eolian_type_c_type_get(const Eolian_Type *tp, Eolian_C_Type_Type ctype);
EAPI Eina_Stringshare *eolian_type_c_type_get(const Eolian_Type *tp);
/*
* @brief A helper function to get the full name of a type.

View File

@ -267,13 +267,13 @@ eolian_typedecl_is_extern(const Eolian_Typedecl *tp)
}
EAPI Eina_Stringshare *
eolian_type_c_type_get(const Eolian_Type *tp, Eolian_C_Type_Type ctype)
eolian_type_c_type_get(const Eolian_Type *tp)
{
Eina_Stringshare *ret;
Eina_Strbuf *buf;
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
buf = eina_strbuf_new();
database_type_to_str(tp, buf, NULL, ctype, EINA_FALSE);
database_type_to_str(tp, buf, NULL, EOLIAN_C_TYPE_DEFAULT, EINA_FALSE);
ret = eina_stringshare_add(eina_strbuf_string_get(buf));
eina_strbuf_free(buf);
return ret;

View File

@ -263,6 +263,13 @@ struct _Eolian_Function_Parameter
Eina_Bool move :1;
};
typedef enum
{
EOLIAN_C_TYPE_DEFAULT = 0,
EOLIAN_C_TYPE_PARAM,
EOLIAN_C_TYPE_RETURN
} Eolian_C_Type_Type;
struct _Eolian_Type
{
Eolian_Object base;

View File

@ -372,6 +372,12 @@ namespace value_ownership
const bool unmoved = false;
};
namespace is_by
{
const bool reference = true;
const bool value = false;
};
// type_def represents a type where it is used, like a method parameter or a struc field, in contrast to more
// specifict types like struct_def, class_def, function_def, which represents a declaration of a type.
struct type_def
@ -389,11 +395,11 @@ struct type_def
type_def(variant_type original_type, std::string c_type, bool has_own, bool is_ptr, bool is_beta, std::string doc_summary)
: original_type(original_type), c_type(c_type), has_own(has_own), is_ptr(is_ptr), is_beta(is_beta), doc_summary(doc_summary) {}
type_def(Eolian_Type const* eolian_type, Eolian_Unit const* unit, Eolian_C_Type_Type ctype, bool is_moved)
type_def(Eolian_Type const* eolian_type, Eolian_Unit const* unit, std::string const& ctype, bool is_moved, bool is_reference)
{
set(eolian_type, unit, ctype, is_moved);
set(eolian_type, unit, ctype, is_moved, is_reference);
}
void set(Eolian_Type const* eolian_type, Eolian_Unit const* unit, Eolian_C_Type_Type ctype, bool is_moved);
void set(Eolian_Type const* eolian_type, Eolian_Unit const* unit, std::string const & ctype, bool is_moved, bool is_reference);
void set(Eolian_Expression_Type eolian_exp_type);
friend inline bool operator<(type_def const& lhs, type_def const& rhs)
@ -433,14 +439,15 @@ inline bool operator!=(type_def const& lhs, type_def const& rhs)
type_def const void_ {attributes::regular_type_def{"void", {qualifier_info::is_none, {}}, {}}, "void", false, false, false, ""};
inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* unit, Eolian_C_Type_Type ctype, bool is_moved)
inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* unit, std::string const& ctype, bool is_moved, bool is_reference)
{
c_type = ::eolian_type_c_type_get(eolian_type, ctype);
c_type = ctype;
is_value_type = ('*' != c_type.back());
// ::eina_stringshare_del(stringshare); // this crashes
Eolian_Type const* stp = eolian_type_base_type_get(eolian_type);
has_own = is_moved;
is_ptr = !!::eolian_type_is_ptr(eolian_type);
is_ptr = is_reference || eolian_type_is_ptr(eolian_type);
Eolian_Typedecl const* decl = eolian_type_typedecl_get(eolian_type);
is_beta = decl && eolian_object_is_beta(EOLIAN_OBJECT(decl));
@ -452,7 +459,7 @@ inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* uni
switch( ::eolian_type_type_get(eolian_type))
{
case EOLIAN_TYPE_VOID:
original_type = attributes::regular_type_def{"void", {qualifiers(eolian_type, is_moved), {}}, {}};
original_type = attributes::regular_type_def{"void", {qualifiers(eolian_type, is_moved, is_ptr), {}}, {}};
break;
case EOLIAN_TYPE_REGULAR:
if (!stp)
@ -474,15 +481,19 @@ inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* uni
for(efl::eina::iterator<const char> namespace_iterator( ::eolian_type_namespaces_get(eolian_type))
, namespace_last; namespace_iterator != namespace_last; ++namespace_iterator)
namespaces.push_back(&*namespace_iterator);
original_type = {regular_type_def{ ::eolian_type_short_name_get(eolian_type), {qualifiers(eolian_type, is_moved), {}}, namespaces, type_type, is_undefined}};
original_type = {regular_type_def{ ::eolian_type_short_name_get(eolian_type), {qualifiers(eolian_type, is_moved, is_ptr), {}}, namespaces, type_type, is_undefined}};
}
else
{
complex_type_def complex
{{::eolian_type_short_name_get(eolian_type), {qualifiers(eolian_type, is_moved), {}}, {}}, {}};
{{::eolian_type_short_name_get(eolian_type), {qualifiers(eolian_type, is_moved, is_ptr), {}}, {}}, {}};
while (stp)
{
complex.subtypes.push_back({stp, unit, EOLIAN_C_TYPE_DEFAULT, eolian_type_is_move(stp)});
complex.subtypes.push_back({stp
, unit
, ::eolian_type_c_type_get(stp)
, eolian_type_is_move(stp)
, is_by::value});
stp = eolian_type_next_type_get(stp);
}
original_type = complex;
@ -491,7 +502,7 @@ inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* uni
case EOLIAN_TYPE_CLASS:
{
Eolian_Class const* klass = eolian_type_class_get(eolian_type);
original_type = klass_name(klass, {qualifiers(eolian_type, is_moved), {}});
original_type = klass_name(klass, {qualifiers(eolian_type, is_moved, is_ptr), {}});
}
break;
default:
@ -540,7 +551,12 @@ struct alias_def
is_undefined = true;
else
{
base_type = type_def(::eolian_typedecl_base_type_get(alias_obj), unit, EOLIAN_C_TYPE_DEFAULT, value_ownership::unmoved);
auto eolian_type = ::eolian_typedecl_base_type_get(alias_obj);
base_type = type_def(eolian_type
, unit
, ::eolian_type_c_type_get(eolian_type)
, value_ownership::unmoved
, is_by::value);
is_undefined = false;
}
@ -593,7 +609,11 @@ struct parameter_def
documentation_def documentation, Eolian_Unit const* unit)
: direction(std::move(direction)), type(std::move(type)), param_name(std::move(param_name)), documentation(documentation), unit(unit) {}
parameter_def(Eolian_Function_Parameter const* param, Eolian_Unit const* unit)
: type( ::eolian_parameter_type_get(param), unit, EOLIAN_C_TYPE_PARAM, eolian_parameter_is_move(param))
: type( ::eolian_parameter_type_get(param)
, unit
, eolian_parameter_c_type_get(param, EINA_FALSE)
, eolian_parameter_is_move(param)
, eolian_parameter_is_by_ref(param))
, param_name( ::eolian_parameter_name_get(param)), unit(unit)
{
Eolian_Parameter_Dir direction = ::eolian_parameter_direction_get(param);
@ -747,7 +767,11 @@ struct function_def
return_documentation = eolian_function_return_documentation_get(function, type);
scope = static_cast<member_scope>(eolian_function_scope_get(function, type));
if(r_type)
return_type.set(r_type, unit, EOLIAN_C_TYPE_RETURN, eolian_function_return_is_move(function, type));
return_type.set(r_type
, unit
, eolian_function_return_c_type_get(function, type)
, eolian_function_return_is_move(function, type)
, eolian_function_return_is_by_ref(function, type));
if(type == EOLIAN_METHOD || type == EOLIAN_FUNCTION_POINTER)
{
for(efl::eina::iterator<Eolian_Function_Parameter> param_iterator ( ::eolian_function_parameters_get(function))
@ -1003,7 +1027,11 @@ struct variable_def
variable_def(Eolian_Variable const* variable, Eolian_Unit const* unit)
: name(::eolian_variable_short_name_get(variable))
, full_name(::eolian_variable_name_get(variable))
, base_type(::eolian_variable_base_type_get(variable), unit, ::EOLIAN_C_TYPE_DEFAULT, value_ownership::unmoved)
, base_type(::eolian_variable_base_type_get(variable)
, unit
, ::eolian_type_c_type_get(eolian_variable_base_type_get(variable))
, value_ownership::unmoved
, is_by::value)
, documentation(::eolian_variable_documentation_get(variable))
, type(static_cast<variable_type>(::eolian_variable_type_get(variable)))
, expression_value()
@ -1087,7 +1115,12 @@ struct event_def
event_def(Eolian_Event const* event, Eolian_Class const* cls, Eolian_Unit const* unit)
: klass(cls, {attributes::qualifier_info::is_none, std::string()})
, type( ::eolian_event_type_get(event) ? eina::optional<type_def>{{::eolian_event_type_get(event), unit, EOLIAN_C_TYPE_DEFAULT, value_ownership::unmoved}} : eina::optional<type_def>{})
, type( ::eolian_event_type_get(event) ? eina::optional<type_def>{{::eolian_event_type_get(event)
, unit
, ::eolian_type_c_type_get(::eolian_event_type_get(event))
, value_ownership::unmoved
, is_by::value}
} : eina::optional<type_def>{})
, name( ::eolian_event_name_get(event))
, c_name( ::eolian_event_c_macro_get(event))
, beta( ::eolian_event_is_beta(event))
@ -1552,8 +1585,11 @@ struct struct_field_def
{
name = eolian_typedecl_struct_field_name_get(struct_field);
try {
type.set(eolian_typedecl_struct_field_type_get(struct_field), unit, EOLIAN_C_TYPE_DEFAULT
, eolian_typedecl_struct_field_is_move(struct_field));
type.set(eolian_typedecl_struct_field_type_get(struct_field)
, unit
, eolian_typedecl_struct_field_c_type_get(struct_field)
, eolian_typedecl_struct_field_is_move(struct_field)
, eolian_typedecl_struct_field_is_by_ref(struct_field));
} catch(std::runtime_error const&) { /* Silently skip pointer fields*/ }
documentation = ::eolian_typedecl_struct_field_documentation_get(struct_field);
}

View File

@ -72,11 +72,11 @@ inline qualifier_bool operator^(qualifier_bool lhs, qualifier_info rhs)
return lhs;
}
inline qualifier_info qualifiers(Eolian_Type const* type, bool is_moved)
inline qualifier_info qualifiers(Eolian_Type const* type, bool is_moved, bool is_by_ref)
{
qualifier_info is_own = is_moved ? qualifier_info::is_own : qualifier_info::is_none;
qualifier_info is_const = ::eolian_type_is_const(type) ? qualifier_info::is_const : qualifier_info::is_none;
qualifier_info is_ref = ::eolian_type_is_ptr(type) ? qualifier_info::is_ref : qualifier_info::is_none;
qualifier_info is_ref = is_by_ref ? qualifier_info::is_ref : qualifier_info::is_none;
return is_own | is_const | is_ref;
}

View File

@ -2262,7 +2262,13 @@ static char *_lua_color_code = NULL;
static inline void
_lua_import_path_get(char *path, size_t len, const char *name)
{
const char *pfx = _evas_module_datadir_get();
const char *pfx = NULL;
/* a hack for in-tree runs, can point this to src/lib/evas */
if (getenv("EFL_RUN_IN_TREE"))
pfx = getenv("EFL_EVAS_FILTER_LUA_PREFIX");
/* the real path not for in-tree runs */
if (!pfx)
pfx = _evas_module_datadir_get();
size_t r = 0;
#ifdef FILTERS_DEBUG

View File

@ -142,11 +142,6 @@ class Eolian_Type_Builtin_Type(IntEnum):
VOID_PTR = 48
FREE_CB = 49
class Eolian_C_Type_Type(IntEnum):
DEFAULT = 0
PARAM = 1
RETURN = 2
class Eolian_Expression_Type(IntEnum):
UNKNOWN = 0
INT = 1
@ -1053,24 +1048,12 @@ class Type(Object):
def builtin_type(self):
return Eolian_Type_Builtin_Type(lib.eolian_type_builtin_type_get(self))
def c_type_get(self, ctype):
s = lib.eolian_type_c_type_get(self, ctype)
def c_type_get(self):
s = lib.eolian_type_c_type_get(self)
ret = _str_to_py(s)
lib.eina_stringshare_del(c_void_p(s))
return ret
@cached_property
def c_type_default(self):
return self.c_type_get(Eolian_C_Type_Type.DEFAULT)
@cached_property
def c_type_param(self):
return self.c_type_get(Eolian_C_Type_Type.PARAM)
@cached_property
def c_type_return(self):
return self.c_type_get(Eolian_C_Type_Type.RETURN)
@cached_property
def typedecl(self):
c_tdecl = lib.eolian_type_typedecl_get(self)

View File

@ -603,8 +603,8 @@ lib.eolian_type_is_const.restype = c_bool
lib.eolian_type_is_ptr.argtypes = (c_void_p,)
lib.eolian_type_is_ptr.restype = c_bool
# EAPI Eina_Stringshare *eolian_type_c_type_get(const Eolian_Type *tp, Eolian_C_Type_Type ctype);
lib.eolian_type_c_type_get.argtypes = (c_void_p, c_int)
# EAPI Eina_Stringshare *eolian_type_c_type_get(const Eolian_Type *tp);
lib.eolian_type_c_type_get.argtypes = (c_void_p)
lib.eolian_type_c_type_get.restype = c_void_p # Stringshare TO BE FREED
### Eolian_Expression #######################################################

View File

@ -582,10 +582,6 @@ class TestEolianType(unittest.TestCase):
self.assertIsNone(t.class_)
self.assertEqual(t, t.aliased_base) # TODO find a better test
self.assertEqual(t.c_type_default, 'double') # TODO find a better test
self.assertEqual(t.c_type_param, 'double')
self.assertEqual(t.c_type_return, 'double')
def test_type_regular(self):
cls = eolian_db.class_by_name_get('Efl.Gfx.Entity')
func = cls.function_by_name_get('geometry')
@ -601,10 +597,6 @@ class TestEolianType(unittest.TestCase):
self.assertIsNone(t.class_)
self.assertEqual(t, t.aliased_base)
self.assertEqual(t.c_type_default, 'Eina_Rect') # TODO find a better test
self.assertEqual(t.c_type_param, 'Eina_Rect')
self.assertEqual(t.c_type_return, 'Eina_Rect')
td = t.typedecl
self.assertIsInstance(td, eolian.Typedecl)
self.assertEqual(td.name, 'Eina.Rect')
@ -623,10 +615,6 @@ class TestEolianType(unittest.TestCase):
self.assertEqual(list(t.namespaces), ['Efl', 'Gfx'])
self.assertEqual(t, t.aliased_base)
self.assertEqual(t.c_type_default, 'Efl_Gfx_Entity *') # TODO find a better test
self.assertEqual(t.c_type_param, 'Efl_Gfx_Entity *')
self.assertEqual(t.c_type_return, 'Efl_Gfx_Entity *')
cls = t.class_
self.assertIsInstance(cls, eolian.Class)
self.assertEqual(cls.name, 'Efl.Gfx.Entity')

View File

@ -375,12 +375,12 @@ EFL_START_TEST(eolian_typedef)
fail_if(!(type_name = eolian_typedecl_short_name_get(tdl)));
fail_if(strcmp(type_name, "List_Objects"));
fail_if(!(type = eolian_typedecl_base_type_get(tdl)));
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_DEFAULT)));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(strcmp(type_name, "Eina_List *"));
eina_stringshare_del(type_name);
fail_if(!(type = eolian_type_base_type_get(type)));
fail_if(!!eolian_type_next_type_get(type));
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_DEFAULT)));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(strcmp(type_name, "Typedef *"));
eina_stringshare_del(type_name);
@ -432,14 +432,14 @@ EFL_START_TEST(eolian_complex_type)
eina_stringshare_del(type_name);
fail_if(!(type = eolian_type_base_type_get(type)));
fail_if(!!eolian_type_next_type_get(type));
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_DEFAULT)));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(eolian_type_is_move(type));
fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_ARRAY);
fail_if(strcmp(type_name, "Eina_Array *"));
eina_stringshare_del(type_name);
fail_if(!(type = eolian_type_base_type_get(type)));
fail_if(!!eolian_type_next_type_get(type));
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_DEFAULT)));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(!eolian_type_is_move(type));
fail_if(strcmp(type_name, "Eina_Strbuf *"));
eina_stringshare_del(type_name);
@ -456,7 +456,7 @@ EFL_START_TEST(eolian_complex_type)
eina_stringshare_del(type_name);
fail_if(!(type = eolian_type_base_type_get(type)));
fail_if(!!eolian_type_next_type_get(type));
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_DEFAULT)));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(eolian_type_is_move(type));
fail_if(strcmp(type_name, "const char *"));
eina_stringshare_del(type_name);
@ -470,7 +470,7 @@ EFL_START_TEST(eolian_complex_type)
eina_stringshare_del(type_name);
fail_if(!(type = eolian_type_base_type_get(type)));
fail_if(!!eolian_type_next_type_get(type));
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_DEFAULT)));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(eolian_type_is_move(type));
fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_STRINGSHARE);
fail_if(strcmp(type_name, "Eina_Stringshare *"));