Merge branch 'master' into devs/hermet/lottie

This commit is contained in:
Hermet Park 2019-09-23 13:31:11 +09:00
commit 9db0a20139
138 changed files with 1728 additions and 847 deletions

View File

@ -1,6 +1,6 @@
project('efl', ['c','cpp'],
version: '1.23.0',
default_options : ['buildtype=plain', 'cpp_std=c++11'],
default_options : ['buildtype=release', 'cpp_std=c++11'],
meson_version : '>=0.47'
)

View File

@ -156,7 +156,7 @@ _free_func_get(const Eolian_Type *type)
return "eina_stringshare_del";
case EOLIAN_TYPE_BUILTIN_ANY_VALUE:
return "eina_value_flush";
case EOLIAN_TYPE_BUILTIN_ANY_VALUE_PTR:
case EOLIAN_TYPE_BUILTIN_ANY_VALUE_REF:
return "eina_value_free";
case EOLIAN_TYPE_BUILTIN_STRBUF:
return "eina_strbuf_free";

View File

@ -540,7 +540,22 @@ struct documentation_generator
template<typename OutputIterator, typename Context>
bool generate_parameter(OutputIterator sink, attributes::parameter_def const& param, Context const& context) const
{
return generate_tag_param(sink, name_helpers::escape_keyword(param.param_name), param.documentation.full_text, context);
auto text = param.documentation.full_text;
if (param.default_value.is_engaged())
{
auto value = param.default_value->serialized;
if (param.default_value->is_name_ref)
{
value = name_helpers::full_managed_name(value);
text += "\\<br/\\>The default value is \\<see cref=\\\"" + value + "\\\"/\\>.";
}
else
{
text += "\\<br/\\>The default value is \\<c\\>" + value + "\\</c\\>.";
}
}
return generate_tag_param(sink, name_helpers::escape_keyword(param.param_name), text, context);
}
template<typename OutputIterator, typename Context>

View File

@ -70,10 +70,10 @@ struct marshall_annotation_visitor_generate
{"stringshare", false, [&] {
return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]";
}},
{"any_value_ptr", true, [&] {
{"any_value_ref", true, [&] {
return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]";
}},
{"any_value_ptr", false, [&] {
{"any_value_ref", false, [&] {
return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]";
}},
{"strbuf", true, [&] {
@ -108,10 +108,10 @@ struct marshall_annotation_visitor_generate
{"stringshare", false, [&] {
return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]";
}},
{"any_value_ptr", true, [&] {
{"any_value_ref", true, [&] {
return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]";
}},
{"any_value_ptr", false, [&] {
{"any_value_ref", false, [&] {
return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]";
}},
{"strbuf", true, [&] {

View File

@ -137,14 +137,14 @@ struct marshall_type_visitor_generate
r.base_type = "Eina.ValueNative";
return r;
}}
, {"any_value_ptr", true, [&]
, {"any_value_ref", true, [&]
{
regular_type_def r = regular;
r.namespaces.clear();
r.base_type = "Eina.Value";
return r;
}}
, {"any_value_ptr", false, [&]
, {"any_value_ref", false, [&]
{
regular_type_def r = regular;
r.namespaces.clear();

View File

@ -123,7 +123,42 @@ static const std::vector<std::string> verbs =
"unpack",
"emit",
"call",
"append"
"append",
"apply",
"bind",
"cancel",
"copy",
"create",
"cut",
"delete",
"deselect",
"detach",
"do",
"gen",
"insert",
"iterate",
"join",
"leave",
"limit",
"paste",
"parse",
"prepend",
"process",
"query",
"refresh",
"remove",
"register",
"reject",
"release",
"reply",
"send",
"select",
"serialize",
"steal",
"sync",
"toggle",
"unbind",
"unregister"
};
const std::vector<std::string> not_verbs =
@ -204,6 +239,30 @@ inline std::string managed_name(std::string const& name, char separator='_')
return utils::to_pascal_case(tokens);
}
inline std::string full_managed_name(std::string const& name)
{
std::stringstream ss;
auto words = utils::split(name, '.');
std::transform(words.begin(), words.end(), words.begin(), [](std::string const& word) {
return managed_name(word);
});
auto b = std::begin(words), e = std::end(words);
if (b != e)
{
std::copy(b, std::prev(e), std::ostream_iterator<std::string>(ss, "."));
b = std::prev(e);
}
// Avoid trailing separator
if (b != e)
ss << *b;
return ss.str();
}
inline std::string alias_full_eolian_name(attributes::alias_def const& alias)
{

View File

@ -293,7 +293,7 @@ struct struct_internal_definition_generator
|| (regular && (regular->base_type == "string"
|| regular->base_type == "mstring"
|| regular->base_type == "stringshare"
|| regular->base_type == "any_value_ptr")))
|| regular->base_type == "any_value_ref")))
{
if (!as_generator(indent << scope_tab << "/// <summary>Internal wrapper for field " << field_name << "</summary>\n"
<< indent << scope_tab << "public System.IntPtr " << field_name << ";\n")

View File

@ -228,9 +228,9 @@ struct visitor_generate
, {"any_value", false, [&]
{ return regular_type_def{"Eina.Value", regular.base_qualifier, {}};
}}
, {"any_value_ptr", nullptr, [&]
, {"any_value_ref", nullptr, [&]
{ return regular_type_def{"Eina.Value", regular.base_qualifier, {}};
}} // FIXME add proper support for any_value_ptr
}} // FIXME add proper support for any_value_ref
};
std::string full_type_name = name_helpers::type_full_eolian_name(regular);
if(eina::optional<bool> b = call_match

View File

@ -161,7 +161,7 @@ ffi.cdef [[
EOLIAN_TYPE_BUILTIN_LIST,
EOLIAN_TYPE_BUILTIN_ANY_VALUE,
EOLIAN_TYPE_BUILTIN_ANY_VALUE_PTR,
EOLIAN_TYPE_BUILTIN_ANY_VALUE_REF,
EOLIAN_TYPE_BUILTIN_BINBUF,
EOLIAN_TYPE_BUILTIN_EVENT,
EOLIAN_TYPE_BUILTIN_MSTRING,
@ -962,7 +962,7 @@ M.type_builtin_type = {
LIST = 39,
ANY_VALUE = 40,
ANY_VALUE_PTR = 41,
ANY_VALUE_REF = 41,
BINBUF = 42,
EVENT = 43,
MSTRING = 44,

View File

@ -37,7 +37,7 @@ public class BindableProperty<T>
{
if (this.partName == null)
{
return this.binder.PropertyBind(this.propertyName, modelProperty);
return this.binder.BindProperty(this.propertyName, modelProperty);
}
else
{
@ -59,7 +59,7 @@ public class BindableProperty<T>
var partBinder = partMethod.Invoke(partHolder, new System.Object[] { this.partName }) as Efl.Ui.IPropertyBind;
if (partBinder != null)
{
return partBinder.PropertyBind(this.propertyName, modelProperty);
return partBinder.BindProperty(this.propertyName, modelProperty);
}
else
{
@ -112,7 +112,7 @@ public class BindableFactoryPart<T>
/// <summary>Binds the given factory to this part.</summary>
public Eina.Error BindFactory(Efl.Ui.IFactory factory)
{
this.Binder.FactoryBind(this.PartName, factory);
this.Binder.BindFactory(this.PartName, factory);
return Eina.Error.NO_ERROR;
}
}

View File

@ -34,8 +34,10 @@ static void _ecore_signal_generic_free(void *data, void *event);
typedef void (*Signal_Handler)(int sig, siginfo_t *si, void *foo);
static int sig_pipe[2] = { -1, -1 }; // [0] == read, [1] == write
static Eo *sig_pipe_handler = NULL;
#define NUM_PIPES 5
static int sig_pipe[NUM_PIPES][2] = {{ -1 }}; // [0] == read, [1] == write
static Eo *sig_pipe_handler[NUM_PIPES] = {NULL};
static Eina_Spinlock sig_pid_lock;
static Eina_List *sig_pid_info_list = NULL;
@ -48,114 +50,111 @@ typedef struct _Signal_Data
siginfo_t info;
} Signal_Data;
static Eina_Bool
static void
_ecore_signal_pipe_read(Eo *obj)
{
Signal_Data sdata;
int ret;
if (pipe_dead) return EINA_TRUE;
ret = read(sig_pipe[0], &sdata, sizeof(sdata));
if (ret != sizeof(sdata)) return EINA_FALSE;
switch (sdata.sig)
if (pipe_dead) return;
for (unsigned int i = 0; i < NUM_PIPES; i++)
{
case SIGPIPE:
break;
case SIGALRM:
break;
case SIGCHLD:
_ecore_signal_waitpid(EINA_FALSE, sdata.info);
break;
case SIGUSR1:
case SIGUSR2:
while (1)
{
Ecore_Event_Signal_User *e = _ecore_event_signal_user_new();
if (e)
ret = read(sig_pipe[i][0], &sdata, sizeof(sdata));
/* read as many signals as we can, trying again if we get interrupted */
if ((ret != sizeof(sdata)) && (errno != EINTR)) break;
switch (sdata.sig)
{
if (sdata.sig == SIGUSR1) e->number = 1;
else e->number = 2;
e->data = sdata.info;
ecore_event_add(ECORE_EVENT_SIGNAL_USER, e,
_ecore_signal_generic_free, NULL);
case SIGPIPE:
break;
case SIGALRM:
break;
case SIGCHLD:
_ecore_signal_waitpid(EINA_FALSE, sdata.info);
break;
case SIGUSR1:
case SIGUSR2:
{
Ecore_Event_Signal_User *e = _ecore_event_signal_user_new();
if (e)
{
if (sdata.sig == SIGUSR1) e->number = 1;
else e->number = 2;
e->data = sdata.info;
ecore_event_add(ECORE_EVENT_SIGNAL_USER, e,
_ecore_signal_generic_free, NULL);
}
Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
if (loop)
{
if (sdata.sig == SIGUSR1)
efl_event_callback_call(loop, EFL_APP_EVENT_SIGNAL_USR1, NULL);
else
efl_event_callback_call(loop, EFL_APP_EVENT_SIGNAL_USR2, NULL);
}
}
break;
case SIGHUP:
{
Ecore_Event_Signal_Hup *e = _ecore_event_signal_hup_new();
if (e)
{
e->data = sdata.info;
ecore_event_add(ECORE_EVENT_SIGNAL_HUP, e,
_ecore_signal_generic_free, NULL);
}
Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
if (loop)
efl_event_callback_call(loop, EFL_APP_EVENT_SIGNAL_HUP, NULL);
}
break;
case SIGQUIT:
case SIGINT:
case SIGTERM:
{
Ecore_Event_Signal_Exit *e = _ecore_event_signal_exit_new();
if (e)
{
if (sdata.sig == SIGQUIT) e->quit = 1;
else if (sdata.sig == SIGINT) e->interrupt = 1;
else e->terminate = 1;
e->data = sdata.info;
ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, e,
_ecore_signal_generic_free, NULL);
}
Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
if (loop)
efl_event_callback_call(loop, EFL_LOOP_EVENT_QUIT, NULL);
}
break;
#ifdef SIGPWR
case SIGPWR:
{
Ecore_Event_Signal_Power *e = _ecore_event_signal_power_new();
if (e)
{
e->data = sdata.info;
ecore_event_add(ECORE_EVENT_SIGNAL_POWER, e,
_ecore_signal_generic_free, NULL);
}
}
break;
#endif
default:
break;
}
Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
if (loop)
{
if (sdata.sig == SIGUSR1)
efl_event_callback_call(loop, EFL_APP_EVENT_SIGNAL_USR1, NULL);
else
efl_event_callback_call(loop, EFL_APP_EVENT_SIGNAL_USR2, NULL);
}
}
break;
case SIGHUP:
{
Ecore_Event_Signal_Hup *e = _ecore_event_signal_hup_new();
if (e)
{
e->data = sdata.info;
ecore_event_add(ECORE_EVENT_SIGNAL_HUP, e,
_ecore_signal_generic_free, NULL);
}
Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
if (loop)
efl_event_callback_call(loop, EFL_APP_EVENT_SIGNAL_HUP, NULL);
}
break;
case SIGQUIT:
case SIGINT:
case SIGTERM:
{
Ecore_Event_Signal_Exit *e = _ecore_event_signal_exit_new();
if (e)
{
if (sdata.sig == SIGQUIT) e->quit = 1;
else if (sdata.sig == SIGINT) e->interrupt = 1;
else e->terminate = 1;
e->data = sdata.info;
ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, e,
_ecore_signal_generic_free, NULL);
}
Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
if (loop)
efl_event_callback_call(loop, EFL_LOOP_EVENT_QUIT, NULL);
}
break;
#ifdef SIGPWR
case SIGPWR:
{
Ecore_Event_Signal_Power *e = _ecore_event_signal_power_new();
if (e)
{
e->data = sdata.info;
ecore_event_add(ECORE_EVENT_SIGNAL_POWER, e,
_ecore_signal_generic_free, NULL);
}
}
break;
#endif
default:
break;
}
}
return EINA_TRUE;
}
static void
_ecore_signal_cb_read(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
{
while (_ecore_signal_pipe_read(event->object));
_ecore_signal_pipe_read(event->object);
}
static void
_ecore_signal_cb_del(void *data EINA_UNUSED, const Efl_Event *event)
{
if (event->object == sig_pipe_handler) sig_pipe_handler = NULL;
}
EFL_CALLBACKS_ARRAY_DEFINE(_event_watch,
{ EFL_LOOP_HANDLER_EVENT_READ, _ecore_signal_cb_read },
{ EFL_EVENT_DEL, _ecore_signal_cb_del });
static void
_ecore_signal_callback(int sig, siginfo_t *si, void *foo EINA_UNUSED)
{
@ -168,13 +167,25 @@ _ecore_signal_callback(int sig, siginfo_t *si, void *foo EINA_UNUSED)
{
int err = errno;
if (pipe_dead) return;
const ssize_t bytes = write(sig_pipe[1], &sdata, sizeof(sdata));
if (EINA_UNLIKELY(bytes != sizeof(sdata)))
for (unsigned int i = 0; i < NUM_PIPES; i++)
{
err = errno;
ERR("write() failed: %s", strerror(err));
do
{
err = 0;
const ssize_t bytes = write(sig_pipe[i][1], &sdata, sizeof(sdata));
if (EINA_UNLIKELY(bytes != sizeof(sdata)))
{
err = errno;
if (err == EINTR)
DBG("signal pipe %u full", i);
else if (i == NUM_PIPES - 1) //only print errors on last pipe
ERR("write() failed: %d: %s", err, strerror(err));
}
errno = err;
/* loop if we got preempted */
} while (err == EINTR);
if (!err) break;
}
errno = err;
}
switch (sig)
{
@ -238,43 +249,52 @@ static void
_ecore_signal_pipe_init(void)
{
eina_spinlock_new(&sig_pid_lock);
if (sig_pipe[0] == -1)
{
if (pipe(sig_pipe) != 0)
{
sig_pipe[0] = -1;
return;
}
eina_file_close_on_exec(sig_pipe[0], EINA_TRUE);
eina_file_close_on_exec(sig_pipe[1], EINA_TRUE);
if (fcntl(sig_pipe[0], F_SETFL, O_NONBLOCK) < 0)
ERR("can't set pipe to NONBLOCK");
}
_signalhandler_setup();
if (!sig_pipe_handler)
sig_pipe_handler =
efl_add(EFL_LOOP_HANDLER_CLASS, ML_OBJ,
efl_loop_handler_fd_set(efl_added, sig_pipe[0]),
efl_loop_handler_active_set(efl_added, EFL_LOOP_HANDLER_FLAGS_READ),
efl_event_callback_array_add(efl_added, _event_watch(), NULL));
if (sig_pipe[0][0] == -1)
{
for (unsigned int i = 0; i < NUM_PIPES; i++)
{
if (pipe(sig_pipe[i]) != 0)
{
CRI("failed setting up signal pipes! %s", strerror(errno));
for (unsigned int j = 0; j < i; j++)
{
close(sig_pipe[j][0]);
close(sig_pipe[j][1]);
}
memset(sig_pipe, -1, sizeof(sig_pipe));
return;
}
eina_file_close_on_exec(sig_pipe[i][0], EINA_TRUE);
eina_file_close_on_exec(sig_pipe[i][1], EINA_TRUE);
if (fcntl(sig_pipe[i][0], F_SETFL, O_NONBLOCK) < 0)
ERR("can't set pipe to NONBLOCK");
if (fcntl(sig_pipe[i][1], F_SETFL, O_NONBLOCK) < 0)
ERR("can't set pipe to NONBLOCK");
efl_add(EFL_LOOP_HANDLER_CLASS, ML_OBJ,
efl_loop_handler_fd_set(efl_added, sig_pipe[i][0]),
efl_loop_handler_active_set(efl_added, EFL_LOOP_HANDLER_FLAGS_READ),
efl_event_callback_add(efl_added, EFL_LOOP_HANDLER_EVENT_READ, _ecore_signal_cb_read, NULL),
efl_wref_add(efl_added, &sig_pipe_handler[i])
);
}
}
}
static void
_ecore_signal_pipe_shutdown(void)
{
if (sig_pipe_handler)
if (sig_pipe[0][0] != -1)
{
efl_del(sig_pipe_handler);
sig_pipe_handler = NULL;
}
if (sig_pipe[0] != -1)
{
close(sig_pipe[0]);
close(sig_pipe[1]);
sig_pipe[0] = -1;
sig_pipe[1] = -1;
for (unsigned int i = 0; i < NUM_PIPES; i++)
{
close(sig_pipe[i][0]);
close(sig_pipe[i][1]);
efl_del(sig_pipe_handler[i]);
}
}
memset(sig_pipe, -1, sizeof(sig_pipe));
eina_spinlock_free(&sig_pid_lock);
}

View File

@ -144,7 +144,7 @@ _efl_generic_model_efl_model_children_count_get(const Eo *obj EINA_UNUSED, Efl_G
static Eo *
_efl_generic_model_efl_model_child_add(Eo *obj, Efl_Generic_Model_Data *sd)
{
Efl_Model_Children_Event cevt;
Efl_Model_Children_Event cevt = { 0 };
Efl_Model *child;
child = efl_add(EFL_GENERIC_MODEL_CLASS, obj);
@ -175,7 +175,7 @@ _efl_generic_model_efl_model_child_del(Eo *obj, Efl_Generic_Model_Data *sd, Eo *
{
if (data == child)
{
Efl_Model_Children_Event cevt;
Efl_Model_Children_Event cevt = { 0 };
sd->childrens = eina_list_remove_list(sd->childrens, l);

View File

@ -37,7 +37,7 @@ abstract Efl.Loop extends Efl.Task
}
begin {
[[Runs the application main loop.]]
return: any_value_ptr; [[Value set by quit()]]
return: any_value_ref; [[Value set by quit()]]
}
quit {
[[Quits the main loop once all the events currently on the queue have

View File

@ -1,133 +0,0 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "Eina.h"
#include "Eo.h"
#include "efl_model_accessor_view_private.h"
typedef struct _Efl_Model_Accessor
{
Eina_Accessor vtable;
Eina_Accessor *real_accessor;
void *pdata;
Efl_Model_Accessor_View_Constructor_Cb cb;
Eina_Array *children;
} Efl_Model_Accessor;
static void
_efl_model_accessor_setup(Efl_Model_Accessor *acc,
Eina_Accessor* real_accessor,
Efl_Model_Accessor_View_Constructor_Cb ctor,
void* pdata);
static Eina_Bool
_efl_model_acessor_get_at(Efl_Model_Accessor *acc, unsigned int idx, void **data)
{
void* eo;
Eo *p;
Eo *child;
if(eina_accessor_data_get(acc->real_accessor, idx, &eo))
{
p = eo;
child = acc->cb(acc->pdata, p);
if(!acc->children)
{
acc->children = eina_array_new(32);
}
eina_array_push(acc->children, child);
*data = child;
return !!*data;
}
else
return EINA_FALSE;
}
static void *
_efl_model_acessor_get_container(Efl_Model_Accessor *acc)
{
return eina_accessor_container_get(acc->real_accessor);
}
static void
_efl_model_acessor_free(Efl_Model_Accessor *acc)
{
if (acc->real_accessor)
{
eina_accessor_free(acc->real_accessor);
acc->real_accessor = NULL;
}
if(acc->children)
{
unsigned i;
Eina_Array_Iterator iterator;
Eo* item;
EINA_ARRAY_ITER_NEXT(acc->children, i, item, iterator)
{
efl_unref(item);
}
eina_array_free(acc->children);
acc->children = NULL;
}
free(acc);
}
static Eina_Bool
_efl_model_acessor_lock(Efl_Model_Accessor *acc)
{
return eina_accessor_lock(acc->real_accessor);
}
static Eina_Bool
_efl_model_acessor_unlock(Efl_Model_Accessor *acc)
{
return eina_accessor_unlock(acc->real_accessor);
}
static Efl_Model_Accessor *
_efl_model_acessor_clone(Efl_Model_Accessor *acc EINA_UNUSED)
{
Efl_Model_Accessor* accessor = calloc(1, sizeof(Efl_Model_Accessor));
_efl_model_accessor_setup(accessor, eina_accessor_clone(acc->real_accessor),
acc->cb, acc->pdata);
return accessor;
}
static void
_efl_model_accessor_setup(Efl_Model_Accessor *acc,
Eina_Accessor* real_accessor,
Efl_Model_Accessor_View_Constructor_Cb ctor,
void* pdata)
{
acc->vtable.version = EINA_ACCESSOR_VERSION;
acc->vtable.get_at = FUNC_ACCESSOR_GET_AT(_efl_model_acessor_get_at);
acc->vtable.get_container = FUNC_ACCESSOR_GET_CONTAINER(_efl_model_acessor_get_container);
acc->vtable.free = FUNC_ACCESSOR_FREE(_efl_model_acessor_free);
acc->vtable.lock = FUNC_ACCESSOR_LOCK(_efl_model_acessor_lock);
acc->vtable.unlock = FUNC_ACCESSOR_LOCK(_efl_model_acessor_unlock);
acc->vtable.clone = FUNC_ACCESSOR_CLONE(_efl_model_acessor_clone);
EINA_MAGIC_SET(&acc->vtable, EINA_MAGIC_ACCESSOR);
acc->real_accessor = real_accessor;
acc->cb = ctor;
acc->pdata = pdata;
}
Eina_Accessor* efl_model_accessor_view_new(Eina_Accessor* accessor,
Efl_Model_Accessor_View_Constructor_Cb ctor,
void* data)
{
Efl_Model_Accessor* acc = calloc(1, sizeof(Efl_Model_Accessor));
_efl_model_accessor_setup(acc, accessor, ctor, data);
return &acc->vtable;
}

View File

@ -1,5 +0,0 @@
typedef Eo*(*Efl_Model_Accessor_View_Constructor_Cb)(void* data, Eo* child);
Eina_Accessor* efl_model_accessor_view_new(Eina_Accessor* accessor,
Efl_Model_Accessor_View_Constructor_Cb constructor, void* data);

View File

@ -43,13 +43,11 @@ abstract Efl.Task extends Efl.Loop_Consumer
}
}
@property flags {
[[Flags to further customize task's behavior. The default value:
exit_with_parent
]]
[[Flags to further customize task's behavior.]]
set { }
get { }
values {
flags: Efl.Task_Flags; [[Desired task flags.]]
flags: Efl.Task_Flags(Efl.Task_Flags.exit_with_parent); [[Desired task flags.]]
}
}
run @pure_virtual {

View File

@ -139,8 +139,6 @@ ecore_src = [
'efl_container_model.c',
'efl_composite_model.c',
'efl_boolean_model.c',
'efl_model_accessor_view.c',
'efl_model_accessor_view_private.h',
'efl_filter_model.c',
'efl_linear_interpolator.c',
'efl_accelerate_interpolator.c',

View File

@ -9,7 +9,7 @@ interface @beta Efl.Config
name: string; [[Configuration option name.]]
}
values {
value: any_value_ptr @move;
value: any_value_ref @move;
[[The value. It will be empty if it doesn't exist. The caller
must free it after use (using $eina_value_free() in C).]]
}
@ -19,7 +19,7 @@ interface @beta Efl.Config
name: string; [[Configuration option name.]]
}
values {
value: const(any_value_ptr);
value: const(any_value_ref);
[[Configuration option value. May be $null if not found.]]
}
return: bool; [[$false in case of error: value type was invalid, the

View File

@ -22,10 +22,10 @@ interface @beta Efl.Gfx.Arrangement
set {}
get {}
values {
align_horiz: double; [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the horizontal axis
and 1.0 is at the end. The default value is 0.5.]]
align_vert: double; [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the vertical axis
and 1.0 is at the end. The default value is 0.5.]]
align_horiz: double(0.5); [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the horizontal
axis and 1.0 is at the end.]]
align_vert: double(0.5); [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the vertical
axis and 1.0 is at the end.]]
}
}
@property content_padding {
@ -40,9 +40,9 @@ interface @beta Efl.Gfx.Arrangement
set {}
get {}
values {
pad_horiz: double; [[Horizontal padding. The default value is 0.0.]]
pad_vert: double; [[Vertical padding. The default value is 0.0.]]
scalable: bool; [[$true if scalable, $false otherwise. The default value is $false.]]
pad_horiz: double(0.0); [[Horizontal padding.]]
pad_vert: double(0.0); [[Vertical padding.]]
scalable: bool(false); [[$true if scalable.]]
}
}
}

View File

@ -2,7 +2,10 @@ import efl_gfx_types;
mixin @beta Efl.Gfx.Color_Class
{
[[Efl Gfx Color Class mixin class]]
[[This mixin provides an interface for objects supporting color classes
(this is, named colors) and provides a helper method to also allow hexadecimal
color codes.
]]
data: null;
methods {
@property color_class @pure_virtual {
@ -53,7 +56,7 @@ mixin @beta Efl.Gfx.Color_Class
Setting color emits a signal "color_class,set" with source being
the given color.
When retrieving the color of an object, if no explicit
object color is set, then global values will be used.

View File

@ -83,7 +83,7 @@ interface Efl.Gfx.Entity {
This property is an individual scaling factor on the object (Edje
or UI widget). This property (or Edje's global scaling factor, when
applicable), will affect this object's part sizes. If scale is
not zero, than the individual scaling will override any global
not zero, then the individual scaling will override any global
scaling set, for the object obj's parts. Set it back to zero to
get the effects of the global scaling again.
@ -98,8 +98,7 @@ interface Efl.Gfx.Entity {
[[Gets an object's scaling factor.]]
}
values {
scale: double(0.0); [[The scaling factor (the default value is 0.0,
meaning individual scaling is not set)]]
scale: double(0.0); [[The scaling factor.]]
}
}
}

View File

@ -79,7 +79,7 @@ interface @beta Efl.Gfx.Image
set {}
get {}
values {
smooth_scale: bool; [[Whether to use smooth scale or not. The default value is $true.]]
smooth_scale: bool(true); [[Whether to use smooth scale or not.]]
}
}
@property scale_method {
@ -89,8 +89,7 @@ interface @beta Efl.Gfx.Image
buffer. The underlying image data will not be modified.
]]
values {
scale_method: Efl.Gfx.Image_Scale_Method; [[Image scale type to use. The default value is
@Efl.Gfx.Image_Scale_Method.none.]]
scale_method: Efl.Gfx.Image_Scale_Method(Efl.Gfx.Image_Scale_Method.none); [[Image scale type to use.]]
}
}
@property can_upscale {
@ -98,7 +97,7 @@ interface @beta Efl.Gfx.Image
the image will never be resized larger than its native size.
]]
values {
upscale: bool; [[Whether to allow image upscaling. The default value is $true.]]
upscale: bool(true); [[Whether to allow image upscaling.]]
}
}
@property can_downscale {
@ -106,7 +105,7 @@ interface @beta Efl.Gfx.Image
the image will never be resized smaller than its native size.
]]
values {
downscale: bool; [[Whether to allow image downscaling. The default value is $true.]]
downscale: bool(true); [[Whether to allow image downscaling.]]
}
}
@property ratio {
@ -116,7 +115,7 @@ interface @beta Efl.Gfx.Image
get {
}
values {
ratio: double; [[The image's ratio. The default value is $[1.0].]]
ratio: double(1.0); [[The image's ratio.]]
}
}
@property content_region {
@ -161,10 +160,10 @@ interface @beta Efl.Gfx.Image
set {}
get {}
values {
l: int; [[The border's left width. The default value is $0.]]
r: int; [[The border's right width. The default value is $0.]]
t: int; [[The border's top height. The default value is $0.]]
b: int; [[The border's bottom height. The default value is $0.]]
l: int(0); [[The border's left width.]]
r: int(0); [[The border's right width.]]
t: int(0); [[The border's top height.]]
b: int(0); [[The border's bottom height.]]
}
}
@property border_insets_scale {
@ -176,7 +175,7 @@ interface @beta Efl.Gfx.Image
set {}
get {}
values {
scale: double; [[The scale factor. The default value is $[1.0].]]
scale: double(1.0); [[The scale factor.]]
}
}
@property center_fill_mode {
@ -193,8 +192,8 @@ interface @beta Efl.Gfx.Image
set {}
get {}
values {
fill: Efl.Gfx.Center_Fill_Mode; [[Fill mode of the center region.
The default value is @Efl.Gfx.Center_Fill_Mode.default, i.e. render
fill: Efl.Gfx.Center_Fill_Mode(Efl.Gfx.Center_Fill_Mode.default); [[Fill mode of the center region.
The default behavior is to render
and scale the center area, respecting its transparency.]]
}
}
@ -214,12 +213,10 @@ interface @beta Efl.Gfx.Image
}
get {}
values {
horizontal: iterator<ptr(Efl.Gfx.Image_Stretch_Region)>; [[Representation of areas that are stretchable in
the image horizontal space. The default value
is $NULL.]]
vertical: iterator<ptr(Efl.Gfx.Image_Stretch_Region)>; [[Representation of areas that are stretchable in
the image vertical space. The default value
is $NULL.]]
horizontal: iterator<Efl.Gfx.Image_Stretch_Region>(null); [[Representation of areas that are
stretchable in the image horizontal space.]]
vertical: iterator<Efl.Gfx.Image_Stretch_Region>(null); [[Representation of areas that are
stretchable in the image vertical space.]]
}
}
@property image_size {
@ -251,8 +248,7 @@ interface @beta Efl.Gfx.Image
get {
}
values {
hint: Efl.Gfx.Image_Content_Hint; [[Dynamic or static content hint. The default value is
@Efl.Gfx.Image_Content_Hint.none.]]
hint: Efl.Gfx.Image_Content_Hint(Efl.Gfx.Image_Content_Hint.none); [[Dynamic or static content hint.]]
}
}
@property scale_hint {
@ -266,8 +262,7 @@ interface @beta Efl.Gfx.Image
get {
}
values {
hint: Efl.Gfx.Image_Scale_Hint; [[Scalable or static size hint. The default value is
@Efl.Gfx.Image_Scale_Hint.none.]]
hint: Efl.Gfx.Image_Scale_Hint(Efl.Gfx.Image_Scale_Hint.none); [[Scalable or static size hint.]]
}
}
@property image_load_error {

View File

@ -29,7 +29,11 @@ enum Efl.Gfx.Image_Orientation
interface Efl.Gfx.Image_Orientable
{
[[Interface for objects which can be oriented.]]
[[Interface for images which can be rotated or flipped (mirrored).
Compare with @Efl.Ui.Layout_Orientable which works for layout objects and does
not include rotation.
]]
c_prefix: efl_gfx;
methods {
@property image_orientation {

View File

@ -15,7 +15,14 @@ struct @beta Efl.Model_Children_Event {
interface @beta Efl.Model
{
[[Efl model interface]]
[[Basic Model abstraction.
A model in EFL can have a set of key-value properties, where key can only be a string.
The value can be anything within an Eina_Value. If a property is not yet available EAGAIN is returned.
Additionally a model can have a list of children. The fetching of the children is asynchronous, this has the advantage of
having as few data sets as possible in the memory itself.
]]
c_prefix: efl_model;
methods {
@property properties {
@ -39,8 +46,8 @@ interface @beta Efl.Model
set {
[[Set a property value of a given property name.
The caller must ensure to call at least efl_model_prop_list
before being able to see/set properties. This function sets
The caller must first read @.properties to obtain the list of available properties
before being able to access them through @.property. This function sets
a new property value into given property name. Once the
operation is completed the concrete implementation should
raise @[Efl.Model.properties,changed] event in order to
@ -52,7 +59,7 @@ interface @beta Efl.Model
See @.property.get, @[Efl.Model.properties,changed]
]]
return: future<any_value_ptr>; [[Return an error in case the property could not be set,
return: future<any_value_ref>; [[Return an error in case the property could not be set,
or the value that was set otherwise.]]
}
get {
@ -69,7 +76,7 @@ interface @beta Efl.Model
property: string; [[Property name]]
}
values {
value: any_value_ptr; [[Property value]]
value: any_value_ref; [[Property value]]
}
}
property_ready_get {
@ -87,7 +94,7 @@ interface @beta Efl.Model
params {
@in property: string; [[Property name.]]
}
return: future<any_value_ptr>; [[Future to be resolved when the property changes to anything other than
return: future<any_value_ref>; [[Future to be resolved when the property changes to anything other than
error:EAGAIN]]
}
children_slice_get {
@ -129,7 +136,7 @@ interface @beta Efl.Model
@property children_count {
[[Number of children.
When efl_model_load is completed @.children_count.get
After @[.properties,changed] is emitted, @.children_count.get
can be used to get the number of children. @.children_count.get
can also be used before calling @.children_slice_get so a valid
range is known. Event @[Efl.Model.children,count,changed] is

View File

@ -6,7 +6,12 @@ struct @beta Efl.Ui.Factory_Item_Created_Event {
interface @beta Efl.Ui.Factory extends Efl.Ui.Property_Bind, Efl.Ui.Factory_Bind
{
[[Efl UI factory interface]]
[[Interface for factory-pattern object creation.
This object represents a Factory in the factory pattern. Objects should be created via the method
@Efl.Ui.View_Factory.create_with_event, which will in turn call the necessary APIs from this interface.
Objects created this way should be removed using @.release.
]]
methods {
create @protected {
[[Create a UI object from the necessary properties in the specified model.
@ -16,14 +21,14 @@ interface @beta Efl.Ui.Factory extends Efl.Ui.Property_Bind, Efl.Ui.Factory_Bind
params {
models: iterator<Efl.Model>; [[Efl iterator providing the model to be associated to the new item.
It should remain valid until the end of the function call.]]
parent: Efl.Gfx.Entity; [[Efl canvas]]
parent: Efl.Gfx.Entity; [[Efl canvas.]]
}
return: future<Efl.Gfx.Entity>; [[Created UI object]]
return: future<Efl.Gfx.Entity>; [[Created UI object.]]
}
release {
[[Release a UI object and disconnect from models.]]
params {
ui_view: Efl.Gfx.Entity; [[Efl canvas]]
ui_view: Efl.Gfx.Entity; [[Object to remove.]]
}
}
building @const {

View File

@ -30,6 +30,8 @@ interface Efl.Ui.Layout_Orientable
For example, sliders, which can be horizontal or vertical, or container
boxes, which can arrange their elements in a horizontal or vertical fashion.
Compare with @Efl.Gfx.Image_Orientable that works for images and includes rotation.
]]
c_prefix: efl_ui_layout;
methods {

View File

@ -86,11 +86,12 @@ interface @beta Efl.Ui.Scrollable_Interactive extends Efl.Ui.Scrollable
}
}
@property movement_block {
[[Blocking of scrolling (per axis)
[[Blocking of scrolling (per axis).
This function will block scrolling movement (by input of a user) in
a given direction. You can disable movements in the X axis, the Y
axis or both. The default value is $none, where movements are
axis or both.
The default value is @Efl.Ui.Layout_Orientation.default meaning that movements are
allowed in both directions.
]]
set {
@ -107,21 +108,19 @@ interface @beta Efl.Ui.Scrollable_Interactive extends Efl.Ui.Scrollable
The gravity defines how the scroller will adjust its view
when the size of the scroller contents increases.
The scroller will adjust the view to glue itself as follows.
x=0.0, for staying where it is relative to the left edge of the content
x=1.0, for staying where it is relative to the right edge of the content
y=0.0, for staying where it is relative to the top edge of the content
y=1.0, for staying where it is relative to the bottom edge of the content
Default values for x and y are 0.0]]
The scroller will adjust the view to glue itself as follows:
$[x=0.0] to stay where it is relative to the left edge of the content.
$[x=1.0] to stay where it is relative to the right edge of the content.
$[y=0.0] to stay where it is relative to the top edge of the content.
$[y=1.0] to stay where it is relative to the bottom edge of the content.
]]
set {
}
get {
}
values {
x: double; [[Horizontal scrolling gravity]]
y: double; [[Vertical scrolling gravity]]
x: double(0.0); [[Horizontal scrolling gravity.]]
y: double(0.0); [[Vertical scrolling gravity.]]
}
}
@property match_content {

View File

@ -58,9 +58,9 @@ interface @beta Efl.Ui.Scrollbar
}
}
events {
bar,press: Efl.Ui.Layout_Orientation; [[Called when bar is pressed.]]
bar,unpress: Efl.Ui.Layout_Orientation; [[Called when bar is unpressed.]]
bar,drag: Efl.Ui.Layout_Orientation; [[Called when bar is dragged.]]
bar,pressed: Efl.Ui.Layout_Orientation; [[Called when bar is pressed.]]
bar,unpressed: Efl.Ui.Layout_Orientation; [[Called when bar is unpressed.]]
bar,dragged: Efl.Ui.Layout_Orientation; [[Called when bar is dragged.]]
bar,size,changed: void; [[Called when bar size is changed.]]
bar,pos,changed: void; [[Called when bar position is changed.]]
bar,show: Efl.Ui.Layout_Orientation; [[Callend when bar is shown.]]

View File

@ -8,13 +8,13 @@ class @beta Efl.Ui.View_Factory
the factory when the object is done building. This function must be use by all @Efl.Ui.View that need to
create object. They should not use @Efl.Ui.Factory.create directly.]]
params {
factory: Efl.Ui.Factory; [[The factory to use for requesting the new object from and generating the created
factory: Efl.Ui.Factory; [[The factory to use for requesting the new object from and generating the created
event onto.]]
models: iterator<Efl.Model>; [[Efl iterator providing the model to be associated to the new item. It should
models: iterator<Efl.Model>; [[Efl iterator providing the model to be associated to the new item. It should
remain valid until the end of the function call.]]
parent: Efl.Gfx.Entity; [[Efl canvas]]
parent: Efl.Gfx.Entity; [[Efl canvas]]
}
return: future<Efl.Gfx.Entity>; [[Created UI object]]
return: future<Efl.Gfx.Entity>; [[Created UI object]]
}
}
}

View File

@ -67,7 +67,7 @@ interface @beta Efl.Ui.Zoom
get {
}
values {
mode: Efl.Ui.Zoom_Mode; [[The zoom mode.]]
mode: Efl.Ui.Zoom_Mode(Efl.Ui.Zoom_Mode.manual); [[The zoom mode.]]
}
}
}

View File

@ -56,6 +56,11 @@ struct _Eina_Mempool_Backend
* @see eina_mempool_from
*/
Eina_Bool (*from)(void *data, void *element);
/** Function to get an Eina_Iterator that will walk every allocated element
* in the pool.
* @use eina_mempool_iterator_new
*/
Eina_Iterator *(*iterator)(void *data);
};
struct _Eina_Mempool_Backend_ABI1
@ -74,6 +79,7 @@ struct _Eina_Mempool_Backend_ABI2
{
void (*repack)(void *data, Eina_Mempool_Repack_Cb cb, void *cb_data);
Eina_Bool (*from)(void *data, void *element);
Eina_Iterator *(*iterator)(void *data);
};
struct _Eina_Mempool
@ -116,6 +122,13 @@ eina_mempool_from(Eina_Mempool *mp, void *element)
return mp->backend2->from(mp->backend_data, element);
}
static inline Eina_Iterator *
eina_mempool_iterator_new(Eina_Mempool *mp)
{
if (!mp->backend2->iterator) return NULL;
return mp->backend2->iterator(mp->backend_data);
}
static inline unsigned int
eina_mempool_alignof(unsigned int size)
{

View File

@ -104,6 +104,7 @@ _new_va(const char *name,
if (!mp->backend2) goto on_error;
mp->backend2->repack = be->repack;
mp->backend2->from = be->from;
mp->backend2->iterator = be->iterator;
}
mp->backend_data = mp->backend.init(context, options, args);

View File

@ -197,6 +197,17 @@ static inline Eina_Bool eina_mempool_from(Eina_Mempool *mp, void *element);
*/
EAPI void eina_mempool_statistics(Eina_Mempool *mp) EINA_ARG_NONNULL(1);
/**
* @brief Provide an iterator to walk all allocated elements from a specified mempool.
*
* @param[in] mp The mempool
* @return @c NULL if it is not possible to iterate over the mempool, a valid iterator otherwise.
*
* @note This call is expected to be slow and should not be used in any performance critical area.
* @since 1.23
*/
static inline Eina_Iterator *eina_mempool_iterator_new(Eina_Mempool *mp);
/**
* @brief Registers the given memory pool backend.
*

View File

@ -5279,6 +5279,9 @@ typedef struct _Eina_Value_Inner_Mp Eina_Value_Inner_Mp;
struct _Eina_Value_Inner_Mp
{
Eina_Mempool *mempool;
#ifdef DEBUG
int size;
#endif
int references;
};
@ -5310,6 +5313,9 @@ _eina_value_inner_mp_get(int size)
return NULL;
imp->references = 0;
#ifdef DEBUG
imp->size = size;
#endif
imp->mempool = eina_mempool_add(_eina_value_mp_choice,
"Eina_Value_Inner_Mp", NULL, size, 16);
@ -5517,7 +5523,42 @@ eina_value_init(void)
Eina_Bool
eina_value_shutdown(void)
{
#ifdef DEBUG
Eina_Iterator *it;
Eina_Value_Inner_Mp *imp;
#endif
eina_lock_take(&_eina_value_inner_mps_lock);
#ifdef DEBUG
it = eina_hash_iterator_data_new(_eina_value_inner_mps);
EINA_ITERATOR_FOREACH(it, imp)
{
Eina_Iterator *mit;
Eina_Value *value;
fprintf(stderr, "There is still %i Eina_Value in pool of size %i\n",
imp->references, imp->size);
mit = eina_mempool_iterator_new(imp->mempool);
EINA_ITERATOR_FOREACH(mit, value)
{
if (value->type)
{
char *str = eina_value_to_string(value);
fprintf(stderr, "Value %p of type '%s' containing '%s' still allocated.\n",
value, value->type->name, str);
free(str);
}
else
{
fprintf(stderr, "Unknown type found for value %p\n", value);
}
}
eina_iterator_free(mit);
}
eina_iterator_free(it);
#endif
if (eina_hash_population(_eina_value_inner_mps) != 0)
ERR("Cannot free eina_value internal memory pools -- still in use!");
else

View File

@ -1257,6 +1257,24 @@ EAPI const char *eio_monitor_path_get(Eio_Monitor *monitor);
* @beta
*/
EAPI Eina_Bool eio_monitor_fallback_check(const Eio_Monitor *monitor);
/**
* @brief Check if a monitor has the context about a file or not
* @param monitor The Eio_Monitor to check
* @param path The path to check
* @return EINA_TRUE if there is context, EINA_FALSE otherwise.
*
* There are Monitors that need context about a file before they can monitor the file correctly.
* As an example: If you publish a file in your API before the monitor has this file in his context,
* and the file gets deleted as a reaction to this, the monitor will not be able to emit the correct DELETE
* event even if the file is in the monitors path.
*
* In case the monitor does not yet have context, you can be sure that the monitor will bring up an FILE_ADD event about that file.
*
* @since 1.23
* @beta
*/
EAPI Eina_Bool eio_monitor_has_context(const Eio_Monitor *monitor, const char *path);
#endif
/**
* @}

View File

@ -762,6 +762,12 @@ _efl_io_model_efl_model_property_set(Eo *obj,
return efl_loop_future_rejected(obj, err);
}
static Eina_Bool
_monitor_has_context(Efl_Io_Model_Data *pd, const char *path)
{
return eio_monitor_has_context(pd->monitor, path);
}
static void
_efl_io_model_children_list(void *data, Eina_Array *entries)
{
@ -779,6 +785,7 @@ _efl_io_model_children_list(void *data, Eina_Array *entries)
{
Efl_Io_Model_Info *mi;
if (!_monitor_has_context(pd, info->path)) continue;
if (_already_added(pd, info->path)) continue;
if (pd->filter.cb)

View File

@ -411,3 +411,17 @@ eio_monitor_path_get(Eio_Monitor *monitor)
EINA_SAFETY_ON_NULL_RETURN_VAL(monitor, NULL);
return monitor->path;
}
EAPI Eina_Bool
eio_monitor_has_context(const Eio_Monitor *monitor, const char *path)
{
if (monitor->fallback)
{
return eio_monitor_fallback_context_check(monitor, path);
}
else
{
return eio_monitor_context_check(monitor, path);
}
}

View File

@ -403,6 +403,10 @@ void eio_monitor_backend_del(Eio_Monitor *monitor)
eina_hash_del(_fsevent_monitors, monitor->path, backend);
}
Eina_Bool eio_monitor_context_check(const Eio_Monitor *monitor, const char *path)
{
return EINA_TRUE;
}
/*============================================================================*
* API *

View File

@ -290,6 +290,11 @@ void eio_monitor_backend_del(Eio_Monitor *monitor)
eina_hash_del(_inotify_monitors, &backend->hwnd, backend);
}
Eina_Bool eio_monitor_context_check(const Eio_Monitor *monitor EINA_UNUSED, const char *path EINA_UNUSED)
{
return EINA_TRUE;
}
/*============================================================================*
* API *

View File

@ -299,13 +299,30 @@ error:
void eio_monitor_backend_del(Eio_Monitor *monitor)
{
Eio_Monitor_Backend *backend;
backend = monitor->backend;
monitor->backend = NULL;
eina_hash_del(_kevent_monitors, &backend->fd, backend);
}
Eina_Bool eio_monitor_context_check(const Eio_Monitor *monitor, const char *path)
{
Eio_Monitor_Backend *backend = monitor->backend;
Eina_List *l;
Eio_File_Info *file;
EINA_LIST_FOREACH(backend->prev_list, l, file)
{
if (eina_streq(file->path, path))
{
return EINA_TRUE;
}
}
return EINA_FALSE;
}
/*============================================================================*
* API *

View File

@ -315,6 +315,12 @@ void eio_monitor_backend_del(Eio_Monitor *monitor)
{
eio_monitor_fallback_del(monitor);
}
Eina_Bool eio_monitor_content_check(const Eio_Monitor *monitor, const char *path)
{
return eio_monitor_fallback_content_check(monitor, path);
}
#endif
void
@ -330,6 +336,15 @@ eio_monitor_fallback_shutdown(void)
timer_hash = NULL;
}
Eina_Bool
eio_monitor_fallback_context_check(const Eio_Monitor *monitor, const char *path)
{
Eio_Monitor_Backend *backend;
EINA_SAFETY_ON_FALSE_RETURN_VAL(monitor->fallback, EINA_TRUE);
backend = monitor->backend;
return !!eina_hash_find(backend->children, path);
}
void
eio_monitor_fallback_add(Eio_Monitor *monitor)
{

View File

@ -423,6 +423,11 @@ void eio_monitor_backend_del(Eio_Monitor *monitor)
monitor->backend = NULL;
}
Eina_Bool eio_monitor_context_check(const Eio_Monitor *monitor, const char *path)
{
return EINA_TRUE;
}
/**
* @endcond

View File

@ -486,7 +486,9 @@ void eio_monitor_shutdown(void);
void eio_monitor_backend_shutdown(void);
void eio_monitor_fallback_shutdown(void);
void eio_monitor_backend_add(Eio_Monitor *monitor);
Eina_Bool eio_monitor_context_check(const Eio_Monitor *monitor, const char *path);
void eio_monitor_fallback_add(Eio_Monitor *monitor);
Eina_Bool eio_monitor_fallback_context_check(const Eio_Monitor *monitor, const char *path);
void eio_monitor_backend_del(Eio_Monitor *monitor);
void eio_monitor_fallback_del(Eio_Monitor *monitor);

View File

@ -327,28 +327,18 @@ typedef Eo Efl_Ui_Spotlight_Indicator;
# include "efl_ui_list_view_types.eot.h"
# include <efl_ui_list_view.eo.h>
# include <efl_ui_list_view_model.eo.h>
# include <efl_ui_list_view_precise_layouter.eo.h>
# include <efl_ui_list_view_relayout.eo.h>
# include <efl_ui_list_view_pan.eo.h>
# include <efl_ui_view_model.eo.h>
# include <efl_ui_size_model.eo.h>
# include <efl_ui_homogeneous_model.eo.h>
# include <efl_ui_exact_model.eo.h>
# include <efl_ui_average_model.eo.h>
# include <efl_ui_scroller.eo.h>
# include <efl_ui_pan.eo.h>
# include <efl_ui_scroll_manager.eo.h>
# include <efl_ui_focus_parent_provider.eo.h>
# include <efl_ui_widget_focus_manager.eo.h>
# include <efl_ui_focus_parent_provider_standard.eo.h>
# include <efl_ui_selection.eo.h>
# include <efl_ui_dnd.eo.h>
# include <efl_ui_dnd_container.eo.h>
# include <efl_ui_selection_manager.eo.h>
# include <efl_datetime_manager.eo.h>
# include <efl_ui_timepicker.eo.h>
# include <efl_ui_datepicker.eo.h>
# include <efl_ui_calendar.eo.h>

View File

@ -45,7 +45,7 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
get {
}
values {
auto_play: bool; [[Auto play mode, Default value is $false]]
auto_play: bool(false); [[Auto play mode.]]
}
}
@property auto_repeat {
@ -71,17 +71,15 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
animation double-time faster, you can give $speed 2. If you want to play
animation double-time slower, you can give $speed 0.5.
$true when it's successful. $false otherwise.
Warning: speed must be greater than zero.
]]
set {
return: bool;
return: bool; [[$true when it's successful. $false otherwise.]]
}
get {
}
values {
speed: double; [[ Speed factor. Default value is 1.0]]
speed: double(1.0); [[Speed factor.]]
}
}
@property duration_time {
@ -214,50 +212,48 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
}
@property min_progress {
[[The start progress of the play.
Default value is 0.
]]
set {
}
get {
}
values {
min_progress: double; [[The minimum progress. Value must be 0 ~ 1.]]
min_progress: double(0.0); [[The minimum progress. Value must be 0 ~ 1.]]
}
}
@property max_progress {
[[The last progress of the play.
Default value is 1.
]]
set {
}
get {
}
values {
max_progress: double; [[The maximum progress. Value must be 0 ~ 1.]]
max_progress: double(1.0); [[The maximum progress. Value must be 0 ~ 1.]]
}
}
@property min_frame {
[[The start frame of the play.
Default value is 0.
]]
set {
}
get {
}
values {
min_frame: int; [[The minimum frame for play. Value must be 0 ~ @.max_frame]]
min_frame: int(0); [[The minimum frame for play. Value must be 0 ~ @.max_frame]]
}
}
@property max_frame {
[[The last frame of the play.
Default value is @.frame_count - 1
]]
set {
}
get {
}
values {
max_frame: int; [[The maximum frame for play. Value must be @.min_frame ~ (@.frame_count - 1)]]
max_frame: int; [[The maximum frame for play. Value must be @.min_frame ~ (@.frame_count - 1).
The default value is @.frame_count - 1.
]]
}
}

View File

@ -64,6 +64,8 @@ _efl_ui_bg_efl_object_constructor(Eo *obj, Efl_Ui_Bg_Data *pd)
efl_ui_widget_focus_allow_set(obj, EINA_FALSE);
efl_composite_attach(obj, pd->img);
return obj;
}
@ -132,18 +134,6 @@ elm_bg_option_get(const Evas_Object *obj)
return option;
}
EOLIAN static void
_efl_ui_bg_efl_gfx_image_scale_method_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd, Efl_Gfx_Image_Scale_Method scale_type)
{
efl_gfx_image_scale_method_set(sd->img, scale_type);
}
EOLIAN static Efl_Gfx_Image_Scale_Method
_efl_ui_bg_efl_gfx_image_scale_method_get(const Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd)
{
return efl_gfx_image_scale_method_get(sd->img);
}
EAPI void
elm_bg_color_set(Evas_Object *obj,
int r,
@ -194,18 +184,6 @@ elm_bg_load_size_set(Evas_Object *obj, int w, int h)
efl_gfx_image_load_controller_load_size_set(sd->img, EINA_SIZE2D(w, h));
}
EOLIAN static void
_efl_ui_bg_efl_gfx_image_load_controller_load_size_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd, Eina_Size2D sz)
{
efl_gfx_image_load_controller_load_size_set(sd->img, sz);
}
EOLIAN static Eina_Size2D
_efl_ui_bg_efl_gfx_image_load_controller_load_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd)
{
return efl_gfx_image_load_controller_load_size_get(sd->img);
}
EAPI Eina_Bool
elm_bg_file_set(Eo *obj, const char *file, const char *group)
{

View File

@ -1,5 +1,6 @@
class @beta Efl.Ui.Bg extends Efl.Ui.Layout_Base
implements Efl.File, Efl.Gfx.Color, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller
implements Efl.File, Efl.Gfx.Color
composites Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller
{
[[The bg (background) widget is used for setting (solid) background decorations
for a window (unless it has transparency enabled) or for any container object. It
@ -16,7 +17,5 @@ class @beta Efl.Ui.Bg extends Efl.Ui.Layout_Base
Efl.File.key { get; set; }
Efl.File.mmap { get; set; }
Efl.Gfx.Color.color { get; set; }
Efl.Gfx.Image.scale_method { get; set; }
Efl.Gfx.Image_Load_Controller.load_size { get; set; }
}
}

View File

@ -960,6 +960,7 @@ _efl_ui_collection_efl_ui_widget_focus_manager_focus_manager_create(Eo *obj, Efl
Eo *man = efl_add(EFL_UI_COLLECTION_FOCUS_MANAGER_CLASS, obj,
efl_ui_focus_manager_root_set(efl_added, root));
Efl_Ui_Collection_Focus_Manager_Data *fm_pd = efl_data_scope_safe_get(man, EFL_UI_COLLECTION_FOCUS_MANAGER_CLASS);
EINA_SAFETY_ON_NULL_RETURN_VAL(fm_pd, NULL);
fm_pd->collection = obj;
return man;
}
@ -1151,8 +1152,9 @@ _efl_ui_collection_efl_ui_single_selectable_fallback_selection_get(const Eo *obj
#define ITEM_IS_OUTSIDE_VISIBLE(id) id < collection_pd->start_id || id > collection_pd->end_id
static inline void
_assert_item_available(Eo *item, int new_id, Efl_Ui_Collection_Data *pd)
_assert_item_available(Eo *item, unsigned int new_id, Efl_Ui_Collection_Data *pd)
{
EINA_SAFETY_ON_FALSE_RETURN(new_id < eina_list_count(pd->items));
efl_gfx_entity_visible_set(item, EINA_TRUE);
efl_gfx_entity_geometry_set(item, efl_ui_position_manager_entity_position_single_item(pd->pos_man, new_id));
}

View File

@ -1,12 +1,10 @@
class @beta Efl.Ui.Collection extends Efl.Ui.Layout_Base implements
Efl.Ui.Scrollable_Interactive,
Efl.Ui.Scrollbar,
Efl.Pack_Linear, Efl.Pack_Layout,
Efl.Ui.Layout_Orientable,
Efl.Ui.Multi_Selectable,
Efl.Ui.Focus.Manager_Sub,
Efl.Ui.Widget_Focus_Manager
composite
composites
Efl.Ui.Scrollable_Interactive,
Efl.Ui.Scrollbar,
Efl.Ui.Focus.Manager

View File

@ -1388,6 +1388,143 @@ _efl_ui_image_efl_gfx_image_image_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_Ima
return efl_gfx_image_size_get(sd->img);
}
EOLIAN static double
_efl_ui_image_efl_gfx_image_ratio_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje) return 1.0; //documented value for the case that ratio cannot be calculated
return efl_gfx_image_ratio_get(pd->img);
}
EOLIAN static Eina_Rect
_efl_ui_image_efl_gfx_image_content_region_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje)
{
Eina_Size2D size = efl_gfx_entity_size_get(pd->img);
return EINA_RECT(0, 0, size.w, size.h);
}
return efl_gfx_image_content_region_get(pd->img);
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_border_insets_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, int l, int r, int t, int b)
{
if (pd->edje) return;
efl_gfx_image_border_insets_set(pd->img, l, r, t, b);
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_border_insets_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, int *l, int *r, int *t, int *b)
{
if (pd->edje)
{
if (l) *l = 0;
if (r) *r = 0;
if (t) *t = 0;
if (b) *b = 0;
}
else
{
efl_gfx_image_border_insets_get(pd->img, l, r, t, b);
}
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_border_insets_scale_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, double scale)
{
if (pd->edje) return;
efl_gfx_image_border_insets_scale_set(pd->img, scale);
}
EOLIAN static double
_efl_ui_image_efl_gfx_image_border_insets_scale_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje) return 0.0;
return efl_gfx_image_border_insets_scale_get(pd->img);
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_center_fill_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, Efl_Gfx_Center_Fill_Mode fill)
{
if (pd->edje) return;
efl_gfx_image_center_fill_mode_set(pd->img, fill);
}
EOLIAN static Efl_Gfx_Center_Fill_Mode
_efl_ui_image_efl_gfx_image_center_fill_mode_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje) return EFL_GFX_CENTER_FILL_MODE_DEFAULT;
return efl_gfx_image_center_fill_mode_get(pd->img);
}
EOLIAN static Eina_Error
_efl_ui_image_efl_gfx_image_stretch_region_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, Eina_Iterator *horizontal, Eina_Iterator *vertical)
{
if (pd->edje)
{
eina_iterator_free(horizontal);
eina_iterator_free(vertical);
return EINA_ERROR_NO_ERROR;
}
else
{
return efl_gfx_image_stretch_region_set(pd->img, horizontal, vertical);
}
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_stretch_region_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, Eina_Iterator **horizontal, Eina_Iterator **vertical)
{
if (pd->edje)
{
*horizontal = NULL;
*vertical = NULL;
}
else
{
efl_gfx_image_stretch_region_get(pd->img, horizontal, vertical);
}
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_scale_hint_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, Efl_Gfx_Image_Scale_Hint hint)
{
if (pd->edje) return;
return efl_gfx_image_scale_hint_set(pd->img, hint);
}
EOLIAN static Efl_Gfx_Image_Scale_Hint
_efl_ui_image_efl_gfx_image_scale_hint_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje) return EFL_GFX_IMAGE_SCALE_HINT_NONE;
return efl_gfx_image_scale_hint_get(pd->img);
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_content_hint_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, Efl_Gfx_Image_Content_Hint hint)
{
if (pd->edje) return;
return efl_gfx_image_content_hint_set(pd->img, hint);
}
EOLIAN static Efl_Gfx_Image_Content_Hint
_efl_ui_image_efl_gfx_image_content_hint_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje) return EFL_GFX_IMAGE_CONTENT_HINT_NONE;
return efl_gfx_image_content_hint_get(pd->img);
}
EOLIAN static Eina_Error
_efl_ui_image_efl_gfx_image_image_load_error_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje) return EINA_ERROR_NO_ERROR;
return efl_gfx_image_load_error_get(pd->img);
}
EAPI void
elm_image_prescale_set(Evas_Object *obj,
int size)
@ -1405,6 +1542,104 @@ _efl_ui_image_efl_gfx_image_load_controller_load_size_set(Eo *obj, Efl_Ui_Image_
_efl_ui_image_load_size_set_internal(obj, sd);
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_load_controller_load_async_start(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje) return;
efl_gfx_image_load_controller_load_async_start(pd->img);
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_load_controller_load_async_cancel(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje) return;
efl_gfx_image_load_controller_load_async_cancel(pd->img);
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_load_controller_load_dpi_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, double dpi)
{
if (pd->edje) return;
efl_gfx_image_load_controller_load_dpi_set(pd->img, dpi);
}
EOLIAN static double
_efl_ui_image_efl_gfx_image_load_controller_load_dpi_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje) return 0.0;
return efl_gfx_image_load_controller_load_dpi_get(pd->img);
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_load_controller_load_orientation_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, Eina_Bool enable)
{
if (pd->edje) return;
efl_gfx_image_load_controller_load_orientation_set(pd->img, enable);
}
EOLIAN static Eina_Bool
_efl_ui_image_efl_gfx_image_load_controller_load_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje) return EINA_FALSE;
return efl_gfx_image_load_controller_load_orientation_get(pd->img);
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_load_controller_load_scale_down_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, int div)
{
if (pd->edje) return;
efl_gfx_image_load_controller_load_scale_down_set(pd->img, div);
}
EOLIAN static int
_efl_ui_image_efl_gfx_image_load_controller_load_scale_down_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje) return EINA_FALSE;
return efl_gfx_image_load_controller_load_scale_down_get(pd->img);
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_load_controller_load_skip_header_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, Eina_Bool skip)
{
if (pd->edje) return;
return efl_gfx_image_load_controller_load_skip_header_set(pd->img, skip);
}
EOLIAN static Eina_Bool
_efl_ui_image_efl_gfx_image_load_controller_load_skip_header_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje) return EINA_FALSE;
return efl_gfx_image_load_controller_load_skip_header_get(pd->img);
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_load_controller_load_region_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, Eina_Rect region)
{
if (pd->edje) return;
return efl_gfx_image_load_controller_load_region_set(pd->img, region);
}
EOLIAN static Eina_Rect
_efl_ui_image_efl_gfx_image_load_controller_load_region_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje) return EINA_RECT(0, 0, 0, 0);
return efl_gfx_image_load_controller_load_region_get(pd->img);
}
EOLIAN static Eina_Bool
_efl_ui_image_efl_gfx_image_load_controller_load_region_support_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd)
{
if (pd->edje) return EINA_FALSE;
return EINA_TRUE;
}
EAPI int
elm_image_prescale_get(const Evas_Object *obj)
{

View File

@ -76,10 +76,27 @@ class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Input.Clickable, E
Efl.Gfx.Image.can_upscale { get; set; }
Efl.Gfx.Image.can_downscale { get; set; }
Efl.Gfx.Image.image_size { get; }
Efl.Gfx.Image_Load_Controller.load_async_start;
Efl.Gfx.Image_Load_Controller.load_async_cancel;
Efl.Gfx.Image_Load_Controller.load_dpi { get; set; }
Efl.Gfx.Image_Load_Controller.load_size { get; set; }
Efl.Gfx.Image_Load_Controller.load_orientation { get; set; }
Efl.Gfx.Image_Load_Controller.load_scale_down { get; set; }
Efl.Gfx.Image_Load_Controller.load_skip_header { get; set; }
Efl.Gfx.Image_Load_Controller.load_region { get; set; }
Efl.Gfx.Image_Load_Controller.load_region_support { get; }
Efl.Gfx.Image.smooth_scale { get; set; }
Efl.Gfx.Image.scale_method { get; set; }
Efl.Gfx.Image_Orientable.image_orientation { get; set; }
Efl.Gfx.Image.ratio { get; }
Efl.Gfx.Image.content_region { get; }
Efl.Gfx.Image.border_insets { get; set; }
Efl.Gfx.Image.border_insets_scale { get; set; }
Efl.Gfx.Image.center_fill_mode { get; set; }
Efl.Gfx.Image.stretch_region { get; set; }
Efl.Gfx.Image.scale_hint { get; set; }
Efl.Gfx.Image.content_hint { get; set; }
Efl.Gfx.Image.image_load_error { get; }
Efl.Player.playable { get; }
Efl.Player.play { get; set; }
Efl.Layout.Signal.signal_emit;

View File

@ -1394,7 +1394,7 @@ _efl_ui_image_zoomable_vbar_drag_cb(void *data,
_efl_ui_image_zoomable_bar_read_and_update(data);
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_VERTICAL;
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_DRAG, &type);
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_DRAGGED, &type);
}
static void
@ -1404,7 +1404,7 @@ _efl_ui_image_zoomable_vbar_press_cb(void *data,
const char *source EINA_UNUSED)
{
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_VERTICAL;
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_PRESS, &type);
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_PRESSED, &type);
}
static void
@ -1414,7 +1414,7 @@ _efl_ui_image_zoomable_vbar_unpress_cb(void *data,
const char *source EINA_UNUSED)
{
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_VERTICAL;
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESS, &type);
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESSED, &type);
}
static void
@ -1464,7 +1464,7 @@ _efl_ui_image_zoomable_hbar_drag_cb(void *data,
_efl_ui_image_zoomable_bar_read_and_update(data);
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL;
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_DRAG, &type);
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_DRAGGED, &type);
}
static void
@ -1474,7 +1474,7 @@ _efl_ui_image_zoomable_hbar_press_cb(void *data,
const char *source EINA_UNUSED)
{
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL;
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_PRESS, &type);
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_PRESSED, &type);
}
static void
@ -1484,7 +1484,7 @@ _efl_ui_image_zoomable_hbar_unpress_cb(void *data,
const char *source EINA_UNUSED)
{
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL;
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESS, &type);
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESSED, &type);
}
static void

View File

@ -2,10 +2,8 @@
struct @extern Elm.Photocam.Error; [[Photocam error information.]]
struct @extern Elm.Photocam.Progress; [[Photocam progress information.]]
class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom,
Efl.Ui.Scrollable_Interactive,
Efl.Ui.Scrollbar
composite Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar
class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom
composites Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar
{
[[Elementary Image Zoomable class]]
methods {

View File

@ -41,15 +41,24 @@ struct _Layout_Part_Data
unsigned char temp;
};
static void
_efl_ui_layout_part_set_real_part(Eo *obj, struct _Layout_Part_Data *pd, Eo *layout, const char *part)
{
pd->obj = layout;
pd->sd = efl_data_xref(pd->obj, EFL_UI_LAYOUT_BASE_CLASS, obj);
eina_stringshare_replace(&pd->part, part);
pd->temp = 1;
}
Eo *
_efl_ui_layout_pack_proxy_get(Efl_Ui_Layout *obj, Edje_Part_Type type, const char *part)
{
if (type == EDJE_PART_TYPE_BOX)
return efl_add(BOX_CLASS, obj,
efl_ui_layout_part_box_real_part_set(efl_added, obj, part));
_efl_ui_layout_part_set_real_part(efl_added, efl_data_scope_get(efl_added, BOX_CLASS), obj, part));
else if (type == EDJE_PART_TYPE_TABLE)
return efl_add(TABLE_CLASS, obj,
efl_ui_layout_part_table_real_part_set(efl_added, obj, part));
_efl_ui_layout_part_set_real_part(efl_added, efl_data_scope_get(efl_added, TABLE_CLASS), obj, part));
else
return NULL;
}
@ -63,15 +72,6 @@ _efl_ui_layout_part_box_efl_object_destructor(Eo *obj, Efl_Ui_Layout_Table_Data
efl_destructor(efl_super(obj, BOX_CLASS));
}
EOLIAN static void
_efl_ui_layout_part_box_real_part_set(Eo *obj, Efl_Ui_Layout_Box_Data *pd, Eo *layout, const char *part)
{
pd->obj = layout;
pd->sd = efl_data_xref(pd->obj, EFL_UI_LAYOUT_BASE_CLASS, obj);
eina_stringshare_replace(&pd->part, part);
pd->temp = 1;
}
EOLIAN static Eina_Iterator *
_efl_ui_layout_part_box_efl_container_content_iterate(Eo *obj, Efl_Ui_Layout_Box_Data *pd)
{
@ -214,15 +214,6 @@ _efl_ui_layout_part_box_efl_ui_layout_orientable_orientation_get(const Eo *obj E
/* Table proxy implementation */
EOLIAN static void
_efl_ui_layout_part_table_real_part_set(Eo *obj, Efl_Ui_Layout_Table_Data *pd, Eo *layout, const char *part)
{
pd->obj = layout;
pd->sd = efl_data_xref(pd->obj, EFL_UI_LAYOUT_BASE_CLASS, obj);
eina_stringshare_replace(&pd->part, part);
pd->temp = 1;
}
EOLIAN static void
_efl_ui_layout_part_table_efl_object_destructor(Eo *obj, Efl_Ui_Layout_Table_Data *pd)
{
@ -274,6 +265,48 @@ _efl_ui_layout_part_table_efl_pack_unpack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Tab
return _efl_ui_layout_table_unpack(pd->obj, pd->sd, pd->part, subobj) == subobj;
}
EOLIAN static Eina_Bool
_efl_ui_layout_part_table_efl_pack_pack(Eo *obj, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx_Entity *subobj)
{
int last_col, last_row;
int req_cols, req_rows;
Eina_Iterator *iter;
Eo *pack, *element;
pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
//first lookup what the most lower / right element is
iter = evas_object_table_iterator_new(pack);
EINA_ITERATOR_FOREACH(iter, element)
{
unsigned short item_col, item_row;
evas_object_table_pack_get(pack, element, &item_col, &item_row, NULL, NULL);
if (item_row > last_row ||
(item_row == last_row && item_col > last_col))
{
last_col = item_col;
last_row = item_row;
}
}
eina_iterator_free(iter);
//now add the new element right to it, or do a linebreak and place
//that element in the next column on the first element
evas_object_table_col_row_size_get(pack, &req_cols, &req_rows);
last_col ++;
if (last_col > req_cols)
{
last_row ++;
last_col = 0;
}
return _efl_ui_layout_table_pack(obj, pd->sd, pd->part, subobj, last_col, last_row, 1, 1);
}
EOLIAN static Eina_Bool
_efl_ui_layout_part_table_efl_pack_table_pack_table(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx_Entity *subobj, int col, int row, int colspan, int rowspan)
{
@ -414,5 +447,23 @@ _efl_ui_layout_part_table_efl_pack_table_table_rows_get(const Eo *obj EINA_UNUSE
return rows;
}
EOLIAN static void
_efl_ui_layout_part_table_efl_pack_table_table_rows_set(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd EINA_UNUSED, int rows EINA_UNUSED)
{
ERR("This API is currently not supported on table parts");
}
EOLIAN static void
_efl_ui_layout_part_table_efl_pack_table_table_columns_set(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd EINA_UNUSED, int cols EINA_UNUSED)
{
ERR("This API is currently not supported on table parts");
}
EOLIAN static void
_efl_ui_layout_part_table_efl_pack_table_table_size_set(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd EINA_UNUSED, int cols EINA_UNUSED, int rows EINA_UNUSED)
{
ERR("This API is currently not supported on table parts");
}
#include "efl_ui_layout_part_box.eo.c"
#include "efl_ui_layout_part_table.eo.c"

View File

@ -1,4 +1,4 @@
class @beta Efl.Ui.Layout_Part extends Efl.Ui.Widget_Part
class Efl.Ui.Layout_Part extends Efl.Ui.Widget_Part
{
[[Elementary layout internal part class]]
data: null;

View File

@ -1,4 +1,4 @@
class @beta Efl.Ui.Layout_Part_Bg extends Efl.Ui.Widget_Part_Bg
class Efl.Ui.Layout_Part_Bg extends Efl.Ui.Widget_Part_Bg
{
[[Elementary layout internal part background class]]
data: null;

View File

@ -1,4 +1,4 @@
class @beta Efl.Ui.Layout_Part_Box extends Efl.Object implements Efl.Pack_Linear,
class Efl.Ui.Layout_Part_Box extends Efl.Object implements Efl.Pack_Linear,
Efl.Ui.Layout_Orientable_Readonly
{
[[Represents a Box created as part of a layout.
@ -8,15 +8,6 @@ class @beta Efl.Ui.Layout_Part_Box extends Efl.Object implements Efl.Pack_Linear
]]
data: Efl_Ui_Layout_Box_Data;
methods {
/* FIXME: Remove this. */
@property real_part @protected {
[[Real part property]]
set {}
values {
layout: Efl.Object; [[Real part object]]
part: string; [[Real part name]]
}
}
}
implements {
Efl.Object.destructor;

View File

@ -1,4 +1,4 @@
class @beta Efl.Ui.Layout_Part_Content extends Efl.Ui.Layout_Part implements Efl.Content
class Efl.Ui.Layout_Part_Content extends Efl.Ui.Layout_Part implements Efl.Content
{
[[Elementary layout internal part class]]
data: null;

View File

@ -1,4 +1,4 @@
class @beta Efl.Ui.Layout_Part_Table extends Efl.Object implements Efl.Pack_Table
class Efl.Ui.Layout_Part_Table extends Efl.Object implements Efl.Pack_Table
{
[[Represents a Table created as part of a layout.
@ -7,20 +7,12 @@ class @beta Efl.Ui.Layout_Part_Table extends Efl.Object implements Efl.Pack_Tabl
]]
data: Efl_Ui_Layout_Table_Data;
methods {
/* FIXME: Remove this. */
@property real_part @protected {
[[Real part property]]
set {}
values {
layout: Efl.Object; [[Real part object]]
part: string; [[Real part name]]
}
}
}
implements {
Efl.Object.destructor;
Efl.Container.content_iterate;
Efl.Container.content_count;
Efl.Pack.pack;
Efl.Pack.pack_clear;
Efl.Pack.unpack_all;
Efl.Pack.unpack;
@ -29,8 +21,8 @@ class @beta Efl.Ui.Layout_Part_Table extends Efl.Object implements Efl.Pack_Tabl
Efl.Pack_Table.table_contents_get;
Efl.Pack_Table.table_cell_column { get; set; }
Efl.Pack_Table.table_cell_row { get; set; }
Efl.Pack_Table.table_size { get; }
Efl.Pack_Table.table_columns { get; }
Efl.Pack_Table.table_rows { get; }
Efl.Pack_Table.table_size { get; set; }
Efl.Pack_Table.table_columns { get; set; }
Efl.Pack_Table.table_rows { get; set; }
}
}

View File

@ -1,4 +1,4 @@
class @beta Efl.Ui.Layout_Part_Text extends Efl.Ui.Layout_Part implements Efl.Text, Efl.Text_Markup,
class Efl.Ui.Layout_Part_Text extends Efl.Ui.Layout_Part implements Efl.Text, Efl.Text_Markup,
Efl.Ui.L10n
{
[[Elementary layout internal part class]]

View File

@ -289,7 +289,7 @@ _efl_ui_list_view_vbar_drag_cb(void *data,
_efl_ui_list_view_bar_read_and_update(data);
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_VERTICAL;
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_DRAG, &type);
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_DRAGGED, &type);
}
static void
@ -299,7 +299,7 @@ _efl_ui_list_view_vbar_press_cb(void *data,
const char *source EINA_UNUSED)
{
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_VERTICAL;
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_PRESS, &type);
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_PRESSED, &type);
}
static void
@ -309,7 +309,7 @@ _efl_ui_list_view_vbar_unpress_cb(void *data,
const char *source EINA_UNUSED)
{
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_VERTICAL;
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESS, &type);
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESSED, &type);
}
static void
@ -359,7 +359,7 @@ _efl_ui_list_view_hbar_drag_cb(void *data,
_efl_ui_list_view_bar_read_and_update(data);
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL;
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_DRAG, &type);
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_DRAGGED, &type);
}
static void
@ -369,7 +369,7 @@ _efl_ui_list_view_hbar_press_cb(void *data,
const char *source EINA_UNUSED)
{
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL;
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_PRESS, &type);
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_PRESSED, &type);
}
static void
@ -379,7 +379,7 @@ _efl_ui_list_view_hbar_unpress_cb(void *data,
const char *source EINA_UNUSED)
{
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL;
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESS, &type);
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESSED, &type);
}
static void

View File

@ -7,10 +7,12 @@ struct @beta Efl.Ui.List_View_Item_Event
child: Efl.Model; [[TBD]]
index: int; [[TBD]]
}
class @beta Efl.Ui.List_View extends Efl.Ui.Layout_Base implements Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar,
Efl.Access.Widget.Action, Efl.Access.Selection, Efl.Ui.Focus.Composition, Efl.Ui.Focus.Manager_Sub,
Efl.Ui.Container_Selectable, Efl.Ui.List_View_Model, Efl.Ui.Widget_Focus_Manager
composite
class @beta Efl.Ui.List_View extends Efl.Ui.Layout_Base implements
Efl.Access.Widget.Action, Efl.Access.Selection,
Efl.Ui.Focus.Composition, Efl.Ui.Focus.Manager_Sub,
Efl.Ui.Container_Selectable, Efl.Ui.List_View_Model,
Efl.Ui.Widget_Focus_Manager
composites
Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar
{
methods {

View File

@ -7,6 +7,7 @@
#include <Elementary.h>
#include "efl_ui_list_view_relayout.eo.h"
#include "efl_ui_list_view_pan.eo.h"
#include "elm_priv.h"
typedef struct _Efl_Ui_List_View_Data Efl_Ui_List_View_Data;

View File

@ -16,9 +16,9 @@ struct @beta Efl.Ui.Panel_Scroll_Info
}
class @beta Efl.Ui.Panel extends Efl.Ui.Layout_Base
implements Efl.Ui.Focus.Layer, Efl.Ui.Scrollable_Interactive, Efl.Content,
implements Efl.Ui.Focus.Layer, Efl.Content,
Efl.Access.Widget.Action
composite Efl.Ui.Scrollable_Interactive
composites Efl.Ui.Scrollable_Interactive
{
[[Elementary panel class]]
methods {

View File

@ -91,6 +91,16 @@ interface @beta Efl.Ui.Position_Manager.Entity extends Efl.Ui.Layout_Orientable
end_id : int; [[The last item that has a new size]]
}
}
entities_ready {
[[The items from $start_id to $end_id now have their entities ready
The position manager will reapply the geometry to the elements if they are visible.
]]
params {
start_id : uint; [[The first item that is available]]
end_id : uint; [[The last item that is available]]
}
}
relative_item {
[[Translates the $current_id, into a new id which is oriented in the $direction of $current_id.
In case that there is no item, -1 is returned]]

View File

@ -19,6 +19,7 @@ typedef struct {
Eina_Vector2 scroll_position;
Efl_Ui_Layout_Orientation dir;
Vis_Segment prev_run;
unsigned int prev_consumed_space;
Eina_Size2D max_min_size;
Eina_Size2D last_viewport_size;
Eina_Size2D prev_min_size;
@ -491,6 +492,7 @@ _reposition_content(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd)
{
ev.start_id = pd->prev_run.start_id = cur.start_id;
ev.end_id = pd->prev_run.end_id = cur.end_id;
pd->prev_consumed_space = consumed_space;
efl_event_callback_call(obj, EFL_UI_POSITION_MANAGER_ENTITY_EVENT_VISIBLE_RANGE_CHANGED, &ev);
}
}
@ -809,5 +811,46 @@ _efl_ui_position_manager_grid_efl_object_finalize(Eo *obj, Efl_Ui_Position_Manag
return obj;
}
EOLIAN static void
_efl_ui_position_manager_grid_efl_ui_position_manager_entity_entities_ready(Eo *obj, Efl_Ui_Position_Manager_Grid_Data *pd, unsigned int start_id, unsigned int end_id)
{
Eina_Size2D space_size;
int relevant_space_size;
Item_Position_Context ctx;
if (end_id < pd->prev_run.start_id || start_id > pd->prev_run.end_id)
return;
space_size.w = (MAX(pd->last_viewport_size.w - pd->viewport.w, 0))*pd->scroll_position.x;
space_size.h = (MAX(pd->last_viewport_size.h - pd->viewport.h, 0))*pd->scroll_position.y;
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
{
relevant_space_size = space_size.h;
}
else
{
relevant_space_size = space_size.w;
}
ctx.new = pd->prev_run;
ctx.consumed_space = pd->prev_consumed_space;
ctx.relevant_space_size = relevant_space_size;
ctx.floating_group = NULL;
ctx.placed_item = NULL;
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
{
_position_items_vertical(obj, pd, &ctx);
_position_group_items(obj, pd, &ctx);
}
else
{
_position_items_horizontal(obj, pd, &ctx);
_position_group_items(obj, pd, &ctx);
}
}
#include "efl_ui_position_manager_grid.eo.c"

View File

@ -15,6 +15,7 @@ class @beta Efl.Ui.Position_Manager.Grid extends Efl.Object
Efl.Ui.Position_Manager.Entity.position_single_item;
Efl.Ui.Position_Manager.Entity.item_size_changed;
Efl.Ui.Position_Manager.Entity.relative_item;
Efl.Ui.Position_Manager.Entity.entities_ready;
Efl.Ui.Layout_Orientable.orientation {set; get;}
Efl.Ui.Position_Manager.Data_Access_V1.data_access {set;}
Efl.Object.finalize;

View File

@ -546,4 +546,34 @@ _efl_ui_position_manager_list_efl_ui_position_manager_data_access_v1_data_access
}
EOLIAN static void
_efl_ui_position_manager_list_efl_ui_position_manager_entity_entities_ready(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, unsigned int start_id, unsigned int end_id)
{
Eina_Size2D space_size;
int relevant_space_size;
if (end_id < pd->prev_run.start_id || start_id > pd->prev_run.end_id)
return;
if (!pd->size) return;
if (pd->average_item_size <= 0) return;
cache_require(obj, pd);
//space size contains the amount of space that is outside the viewport (either to the top or to the left)
space_size.w = (MAX(pd->abs_size.w - pd->viewport.w, 0))*pd->scroll_position.x;
space_size.h = (MAX(pd->abs_size.h - pd->viewport.h, 0))*pd->scroll_position.y;
if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
{
relevant_space_size = space_size.h;
}
else
{
relevant_space_size = space_size.w;
}
_position_items(obj, pd, pd->prev_run, relevant_space_size);
}
#include "efl_ui_position_manager_list.eo.c"

View File

@ -17,6 +17,7 @@ class @beta Efl.Ui.Position_Manager.List extends Efl.Object
Efl.Ui.Position_Manager.Entity.position_single_item;
Efl.Ui.Position_Manager.Entity.item_size_changed;
Efl.Ui.Position_Manager.Entity.relative_item;
Efl.Ui.Position_Manager.Entity.entities_ready;
Efl.Ui.Layout_Orientable.orientation {set; get;}
Efl.Ui.Position_Manager.Data_Access_V1.data_access {set;}
}

View File

@ -1,5 +1,4 @@
class @beta Efl.Ui.Radio_Box extends Efl.Ui.Box implements Efl.Ui.Radio_Group
composite Efl.Ui.Radio_Group
class @beta Efl.Ui.Radio_Box extends Efl.Ui.Box composites Efl.Ui.Radio_Group
{
[[A standard @Efl.Ui.Box container which automatically handles grouping of any @Efl.Ui.Radio
widget added to it in addition to regular widgets.

View File

@ -111,7 +111,7 @@ _scroll_connector_vbar_drag_cb(void *data,
_scroll_connector_bar_read_and_update(ctx);
type = EFL_UI_LAYOUT_ORIENTATION_VERTICAL;
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_DRAG, &type);
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_DRAGGED, &type);
}
static void
@ -123,7 +123,7 @@ _scroll_connector_vbar_press_cb(void *data,
Scroll_Connector_Context *ctx = data;
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_VERTICAL;
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_PRESS, &type);
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_PRESSED, &type);
}
static void
@ -135,7 +135,7 @@ _scroll_connector_vbar_unpress_cb(void *data,
Scroll_Connector_Context *ctx = data;
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_VERTICAL;
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESS, &type);
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESSED, &type);
}
static void
@ -148,7 +148,7 @@ _scroll_connector_hbar_drag_cb(void *data,
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL;
_scroll_connector_bar_read_and_update(ctx);
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_DRAG, &type);
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_DRAGGED, &type);
}
static void
@ -160,7 +160,7 @@ _scroll_connector_hbar_press_cb(void *data,
Scroll_Connector_Context *ctx = data;
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL;
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_PRESS, &type);
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_PRESSED, &type);
}
static void
@ -172,7 +172,7 @@ _scroll_connector_hbar_unpress_cb(void *data,
Scroll_Connector_Context *ctx = data;
Efl_Ui_Layout_Orientation type = EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL;
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESS, &type);
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESSED, &type);
}
static void
@ -249,6 +249,7 @@ void
efl_ui_scroll_connector_bind(Eo *obj, Eo *manager)
{
Scroll_Connector_Context *ctx = calloc(1, sizeof(Scroll_Connector_Context));
if (!ctx) return;
ctx->obj = obj;
ctx->smanager = manager;
efl_key_data_set(obj, "__context", ctx);

View File

@ -1,10 +1,8 @@
class @beta Efl.Ui.Scroller extends Efl.Ui.Layout_Base implements
Efl.Ui.Scrollable_Interactive,
Efl.Ui.Scrollbar,
Efl.Ui.Focus.Manager_Sub,
Efl.Ui.Widget_Focus_Manager,
Efl.Content
composite
composites
Efl.Ui.Scrollable_Interactive,
Efl.Ui.Scrollbar
{

View File

@ -2,18 +2,16 @@ class @beta Efl.Ui.Spotlight.Manager_Scroll extends Efl.Ui.Spotlight.Manager
{
methods {
@property scroll_block {
[[Blocking of scrolling
[[User scrolling forbidden.
This function will block scrolling movement (by input of a user).
You can disable scrolling movement. The default value is $false,
where the scrolling movement is allowed.
This property blocks scrolling movement by user input.
]]
set {
}
get {
}
values {
scroll_block: bool; [[$true if block scrolling movement, $false otherwise]]
scroll_block: bool(false); [[$true if user should not be able to scroll.]]
}
}
}

View File

@ -1,6 +1,6 @@
class @beta Efl.Ui.Tab_Bar extends Efl.Ui.Layout_Base
implements Efl.Ui.Single_Selectable, Efl.Pack_Linear
composite Efl.Pack_Linear, Efl.Pack
implements Efl.Ui.Single_Selectable
composites Efl.Pack_Linear, Efl.Pack
{
[[A selectable box of items.

View File

@ -1,6 +1,6 @@
class @beta Efl.Ui.Tags extends Efl.Ui.Layout_Base
implements Efl.Text, Efl.Ui.Format
composite Efl.Text
implements Efl.Ui.Format
composites Efl.Text
{
[[A widget displaying a list of tags. The user can remove tags by clicking
on each tag "close" button and add new tags by typing text in the text

View File

@ -3,8 +3,8 @@ import elm_general;
class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickable,
Efl.Access.Text, Efl.Access.Editable.Text, Efl.File,
Efl.Ui.Text_Selectable, Efl.Text_Interactive, Efl.Text_Markup
composite
Efl.Ui.Text_Selectable
composites
Efl.Text_Interactive, Efl.Text_Markup
{
[[A flexible text widget which can be static (as a label) or editable by
@ -190,12 +190,11 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
If $enabled is $true, the return key on input panel is disabled when the entry has no text.
The return key on the input panel is automatically enabled when the entry has text.
The default value is $false.
]]
set {
}
values {
enabled: bool; [[If $true, the return key is automatically disabled when the entry has no text.]]
enabled: bool(false); [[If $true, the return key is automatically disabled when the entry has no text.]]
}
}
@property item_factory {

View File

@ -1,6 +1,6 @@
class @beta Efl.Ui.Video extends Efl.Ui.Layout_Base
implements Efl.File, Efl.Player, Efl.Access.Widget.Action
composite Efl.Player
implements Efl.File, Efl.Access.Widget.Action
composites Efl.Player
{
[[Efl UI video class]]
methods {

View File

@ -4,7 +4,7 @@ function @beta EflUiViewModelPropertyGet {
@in view_model: const(Efl.Ui.View_Model); [[The ViewModel object the @.property.get is issued on.]]
@in property: stringshare; [[The property name the @.property.get is issued on.]]
}
return: any_value_ptr; [[The property value.]]
return: any_value_ref; [[The property value.]]
};
function @beta EflUiViewModelPropertySet {
@ -12,9 +12,9 @@ function @beta EflUiViewModelPropertySet {
params {
@in view_model: Efl.Ui.View_Model; [[The ViewModel object the @.property.set is issued on.]]
@in property: stringshare; [[The property name the @.property.set is issued on.]]
@in value: any_value_ptr @move; [[The new value to set.]]
@in value: any_value_ref @move; [[The new value to set.]]
}
return: future<any_value_ptr>; [[The value that was finally set.]]
return: future<any_value_ref>; [[The value that was finally set.]]
};
class @beta Efl.Ui.View_Model extends Efl.Composite_Model

View File

@ -4788,12 +4788,12 @@ elm_widget_tree_dot_dump(const Evas_Object *top,
EOLIAN static Eo *
_efl_ui_widget_efl_object_constructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED)
{
Eo *parent = efl_parent_get(obj);
sd->on_create = EINA_TRUE;
sd->window = efl_provider_find(efl_parent_get(obj), EFL_UI_WIN_CLASS);
if (!efl_isa(obj, EFL_UI_WIN_CLASS))
{
Eo *parent = efl_parent_get(obj);
if (!efl_isa(parent, EFL_UI_WIDGET_CLASS))
{
ERR("You passed a wrong parent parameter (%p %s). "
@ -4804,7 +4804,6 @@ _efl_ui_widget_efl_object_constructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UN
{
ELM_WIDGET_DATA_GET(parent, parent_sd);
sd->shared_win_data = parent_sd->shared_win_data;
efl_ui_widget_sub_object_add(parent, obj);
}
}
else
@ -4818,6 +4817,9 @@ _efl_ui_widget_efl_object_constructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UN
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
if (!efl_isa(obj, EFL_UI_WIN_CLASS) && efl_isa(parent, EFL_UI_WIDGET_CLASS))
efl_ui_widget_sub_object_add(parent, obj);
sd->on_create = EINA_FALSE;
efl_access_object_role_set(obj, EFL_ACCESS_ROLE_UNKNOWN);
@ -5759,21 +5761,16 @@ _efl_ui_widget_part_bg_efl_gfx_color_color_get(const Eo *obj, void *pd EINA_UNUS
efl_gfx_color_get(bg_obj, r, g, b, a);
}
EOLIAN static void
_efl_ui_widget_part_bg_efl_gfx_image_scale_method_set(Eo *obj, void *pd EINA_UNUSED, Efl_Gfx_Image_Scale_Method scale_type)
EOLIAN static Efl_Object*
_efl_ui_widget_part_bg_efl_object_finalize(Eo *obj, void *pd EINA_UNUSED)
{
Evas_Object *bg_obj = efl_ui_widget_part_bg_get(obj);
efl_gfx_image_scale_method_set(bg_obj, scale_type);
efl_composite_attach(obj, bg_obj);
return efl_finalize(efl_super(obj, EFL_UI_WIDGET_PART_BG_CLASS));
}
EOLIAN static Efl_Gfx_Image_Scale_Method
_efl_ui_widget_part_bg_efl_gfx_image_scale_method_get(const Eo *obj, void *pd EINA_UNUSED)
{
Evas_Object *bg_obj = efl_ui_widget_part_bg_get(obj);
return efl_gfx_image_scale_method_get(bg_obj);
}
typedef struct _Efl_Ui_Property_Bound Efl_Ui_Property_Bound;
struct _Efl_Ui_Property_Bound

View File

@ -397,8 +397,8 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object,
}
}
parts {
shadow @beta: Efl.Ui.Widget_Part_Shadow;
background @beta: Efl.Ui.Widget_Part_Bg;
shadow : Efl.Ui.Widget_Part_Shadow;
background : Efl.Ui.Widget_Part_Bg;
}
implements {
class.constructor;

View File

@ -69,16 +69,49 @@ _efl_ui_widget_factory_item_class_get(const Eo *obj EINA_UNUSED,
}
static void
_efl_ui_widget_factory_efl_ui_factory_building(const Eo *obj EINA_UNUSED, Efl_Ui_Widget_Factory_Data *pd EINA_UNUSED, Efl_Gfx_Entity *ui_view)
_efl_ui_widget_factory_efl_ui_factory_building(const Eo *factory EINA_UNUSED, Efl_Ui_Widget_Factory_Data *pd, Efl_Gfx_Entity *ui_view)
{
const Efl_Model *model;
Eina_Value *property;
Eina_Value *property, *width, *height;
Efl_Ui_Bind_Part_Data *bpd;
Eina_Iterator *it;
char *style;
model = efl_ui_view_model_get(ui_view);
// Bind all property before the object is finalize
it = eina_hash_iterator_data_new(pd->parts);
EINA_ITERATOR_FOREACH(it, bpd)
{
Efl_Ui_Property_Bind_Data *bppd;
Eina_List *l;
EINA_LIST_FOREACH(bpd->properties, l, bppd)
efl_ui_property_bind(efl_part(ui_view, bpd->part),
bppd->part_property,
bppd->model_property);
}
eina_iterator_free(it);
// Fetch min size from model if available to avoid recalculcating it
width = efl_model_property_get(model, "self.width");
height = efl_model_property_get(model, "self.height");
if (eina_value_type_get(width) != EINA_VALUE_TYPE_ERROR &&
eina_value_type_get(height) != EINA_VALUE_TYPE_ERROR)
{
Eina_Size2D s;
if (!eina_value_int_convert(width, &s.w)) s.w = 0;
if (!eina_value_int_convert(height, &s.h)) s.h = 0;
efl_gfx_hint_size_min_set(ui_view, s);
}
eina_value_free(width);
eina_value_free(height);
// As we have already waited for the property to be ready, we should get the right style now
if (!pd->style) return ;
model = efl_ui_view_model_get(ui_view);
// As we have already waited for the property to be ready, we should get the right style now
property = efl_model_property_get(model, pd->style);
if (!property) return ;
@ -92,31 +125,13 @@ _efl_ui_widget_factory_efl_ui_factory_building(const Eo *obj EINA_UNUSED, Efl_Ui
static Efl_Ui_Widget *
_efl_ui_widget_create(const Efl_Ui_Factory *factory,
const Efl_Class *klass, Eo *parent,
Efl_Model *model,
const Eina_Hash *parts)
Efl_Model *model)
{
Efl_Ui_Bind_Part_Data *bpd;
Eina_Iterator *it;
Efl_Ui_Widget *w;
w = efl_add(klass, parent,
efl_ui_view_model_set(efl_added, model),
efl_ui_factory_building(factory, efl_added));
if (!parts) return w;
it = eina_hash_iterator_data_new(parts);
EINA_ITERATOR_FOREACH(it, bpd)
{
Efl_Ui_Property_Bind_Data *bppd;
Eina_List *l;
EINA_LIST_FOREACH(bpd->properties, l, bppd)
efl_ui_property_bind(efl_part(w, bpd->part),
bppd->part_property,
bppd->model_property);
}
eina_iterator_free(it);
return w;
}
@ -126,7 +141,7 @@ _efl_ui_widget_factory_create_then(Eo *model, void *data, const Eina_Value v EIN
Efl_Ui_Widget_Factory_Request *r = data;
Efl_Ui_Widget *w;
w = _efl_ui_widget_create(r->factory, r->pd->klass, r->parent, model, r->pd->parts);
w = _efl_ui_widget_create(r->factory, r->pd->klass, r->parent, model);
if (!w) return eina_value_error_init(ENOMEM);
return eina_value_object_init(w);
}
@ -168,7 +183,7 @@ _efl_ui_widget_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Widget_Factory_Data
EINA_ITERATOR_FOREACH(models, model)
{
w = _efl_ui_widget_create(obj, pd->klass, parent, model, pd->parts);
w = _efl_ui_widget_create(obj, pd->klass, parent, model);
if (!w) return efl_loop_future_rejected(obj, ENOMEM);
eina_value_array_append(&r, w);

View File

@ -1,7 +1,6 @@
mixin Efl.Ui.Widget_Focus_Manager
requires Efl.Ui.Widget
extends Efl.Ui.Focus.Manager
composite Efl.Ui.Focus.Manager
composites Efl.Ui.Focus.Manager
{
[[Helper mixin for widgets which also can act as focus managers.

View File

@ -1,4 +1,4 @@
class @beta Efl.Ui.Widget_Part extends Efl.Object implements Efl.Ui.Property_Bind
class Efl.Ui.Widget_Part extends Efl.Object implements Efl.Ui.Property_Bind
{
[[This is the base class for all "Part" handles in Efl.Ui widgets.

View File

@ -1,4 +1,4 @@
class @beta Efl.Ui.Widget_Part_Bg extends Efl.Ui.Widget_Part implements Efl.File, Efl.Gfx.Color, Efl.Gfx.Image
class Efl.Ui.Widget_Part_Bg extends Efl.Ui.Widget_Part implements Efl.File, Efl.Gfx.Color, Efl.Gfx.Image composites Efl.Gfx.Image
{
[[Elementary widget internal part background class
@ -9,12 +9,12 @@ class @beta Efl.Ui.Widget_Part_Bg extends Efl.Ui.Widget_Part implements Efl.File
]]
data: null;
implements {
Efl.Object.finalize;
Efl.File.file { get; set; }
Efl.File.key { get; set; }
Efl.File.mmap { get; set; }
Efl.File.load;
Efl.File.unload;
Efl.Gfx.Color.color { set; get; }
Efl.Gfx.Image.scale_method { get; set; }
}
}

View File

@ -1,4 +1,4 @@
class @beta Efl.Ui.Widget_Part_Shadow extends Efl.Ui.Widget_Part implements Efl.Gfx.Color,
class Efl.Ui.Widget_Part_Shadow extends Efl.Ui.Widget_Part implements Efl.Gfx.Color,
Efl.Gfx.Blur, Efl.Gfx.Filter
{
[[A drop-shadow or glow effect around any widget.

View File

@ -137,9 +137,9 @@ enum Efl.Ui.Win_Move_Resize_Mode
class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.Window,
Efl.Access.Component, Efl.Access.Widget.Action,
Efl.Content, Efl.Input.State, Efl.Input.Interface, Efl.Screen,
Efl.Text, Efl.Config,
Efl.Ui.Widget_Focus_Manager, Efl.Ui.Focus.Manager_Window_Root
composite Efl.Config
Efl.Text, Efl.Ui.Widget_Focus_Manager,
Efl.Ui.Focus.Manager_Window_Root
composites Efl.Config
{
[[Efl UI window class.
@ -280,7 +280,7 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
windows are closed.
]]
values {
exit_code: const(any_value_ptr); [[The exit code to use when exiting]]
exit_code: const(any_value_ref); [[The exit code to use when exiting]]
}
}
@property icon_object {
@ -596,7 +596,7 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
Note this is different from @.exit_on_close which exits when a given window is closed.
]]
values {
exit_code: const(any_value_ptr); [[The exit code to use when exiting.]]
exit_code: const(any_value_ref); [[The exit code to use when exiting.]]
}
}
activate {

View File

@ -156,7 +156,15 @@
#include "efl_ui_layout_legacy_eo.h"
# include "efl_ui_size_model.eo.h"
# include "efl_ui_homogeneous_model.eo.h"
# include "efl_ui_exact_model.eo.h"
# include "efl_ui_average_model.eo.h"
# include "efl_ui_focus_parent_provider.eo.h"
# include "efl_ui_focus_parent_provider_standard.eo.h"
# include "efl_ui_selection_manager.eo.h"
# include "efl_datetime_manager.eo.h"
extern const char *_efl_model_property_itemw;
extern const char *_efl_model_property_itemh;
extern const char *_efl_model_property_selfw;

View File

@ -1132,6 +1132,7 @@ efl_object_legacy_only_event_description_get(const char *_event_name)
event_desc = calloc(1, sizeof(Efl_Event_Description));
event_desc->name = event_name;
event_desc->legacy_is = EINA_TRUE;
event_desc->unfreezable = EINA_TRUE;
eina_hash_add(_legacy_events_hash, event_name, event_desc);
}
else

View File

@ -340,7 +340,7 @@ typedef enum
EOLIAN_TYPE_BUILTIN_LIST,
EOLIAN_TYPE_BUILTIN_ANY_VALUE,
EOLIAN_TYPE_BUILTIN_ANY_VALUE_PTR,
EOLIAN_TYPE_BUILTIN_ANY_VALUE_REF,
EOLIAN_TYPE_BUILTIN_BINBUF,
EOLIAN_TYPE_BUILTIN_EVENT,
EOLIAN_TYPE_BUILTIN_MSTRING,

View File

@ -346,9 +346,9 @@ EAPI Eina_Stringshare *
eolian_function_return_c_type_get(const Eolian_Function *fid,
Eolian_Function_Type ftype)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, NULL);
EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, NULL);
const Eolian_Type *tp = NULL;
Eina_Bool by_ref = EINA_FALSE;
switch (ftype)

View File

@ -293,6 +293,11 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
int kwid = eo_lexer_keyword_str_to_id(tp->base.name);
if (kwid > KW_void)
tp->ownable = EINA_TRUE;
if (kwid == KW_hash && vals->stable)
{
_eo_parser_log(&tp->base, "hashes not allowed in stable context");
return EINA_FALSE;
}
Eolian_Type *itp = tp->base_type;
/* validate types in brackets so transitive fields get written */
while (itp)
@ -321,7 +326,7 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
case KW_mstring:
case KW_stringshare:
case KW_any_value:
case KW_any_value_ptr:
case KW_any_value_ref:
case KW_binbuf:
case KW_strbuf:
tp->ownable = EINA_TRUE;
@ -601,6 +606,7 @@ _validate_event(Validate_State *vals, Eolian_Event *event, Eina_Hash *nhash)
_eo_parser_log(&tp->base, "pointers not allowed in events");
return _reset_stable(vals, was_stable, EINA_FALSE);
}
int kwid = eo_lexer_keyword_str_to_id(tp->base.name);
/* require containers to be const for now...
*
* this is FIXME, and decision wasn't reached before 1.22
@ -608,10 +614,17 @@ _validate_event(Validate_State *vals, Eolian_Event *event, Eina_Hash *nhash)
*/
if (database_type_is_ownable(tp->base.unit, tp, EINA_FALSE))
{
if (!tp->is_const)
switch (kwid)
{
_eo_parser_log(&tp->base, "event container types must be const");
return _reset_stable(vals, was_stable, EINA_FALSE);
case KW_string:
case KW_stringshare:
break;
default:
if (!tp->is_const)
{
_eo_parser_log(&tp->base, "event container types must be const");
return _reset_stable(vals, was_stable, EINA_FALSE);
}
}
}
else if (tp->is_const)
@ -619,7 +632,6 @@ _validate_event(Validate_State *vals, Eolian_Event *event, Eina_Hash *nhash)
_eo_parser_log(&tp->base, "event value types cannot be const");
return _reset_stable(vals, was_stable, EINA_FALSE);
}
int kwid = eo_lexer_keyword_str_to_id(tp->base.name);
/* containers are allowed but not iterators/lists */
if (kwid == KW_iterator || kwid == KW_list)
{
@ -633,12 +645,12 @@ _validate_event(Validate_State *vals, Eolian_Event *event, Eina_Hash *nhash)
return _reset_stable(vals, was_stable, EINA_FALSE);
}
/* any type past builtin value types and containers is not allowed,
* any_value is allowed but passed as const reference, any_value_ptr
* any_value is allowed but passed as const reference, any_value_ref
* is not; string is allowed, but mutable strings or stringshares are
* not and neither are string buffers, the type is never owned by the
* callee, so all strings passed in are unowned and read-only
*/
if (kwid >= KW_any_value_ptr && kwid != KW_string)
if (kwid >= KW_any_value_ref && kwid != KW_string)
{
_eo_parser_log(&tp->base, "forbidden event type");
return _reset_stable(vals, was_stable, EINA_FALSE);
@ -865,6 +877,22 @@ _extend_impl(Eina_Hash *fs, Eolian_Implement *impl, Eina_Bool as_iface)
return !st;
}
/* fills a complete set of stuff implemented or inherited on a class
* this is used to check whether to auto-add composited interfaces into
* implemented/extended list
*/
static void
_db_fill_ihash(Eolian_Class *icl, Eina_Hash *icls)
{
if (icl->parent)
_db_fill_ihash(icl->parent, icls);
Eina_List *l;
Eolian_Class *sicl;
EINA_LIST_FOREACH(icl->extends, l, sicl)
_db_fill_ihash(sicl, icls);
eina_hash_set(icls, &icl, icl);
}
static void
_db_fill_callables(Eolian_Class *cl, Eolian_Class *icl, Eina_Hash *fs, Eina_Bool parent)
{
@ -1084,13 +1112,6 @@ _db_swap_inherit(Eolian_Class *cl, Eina_Bool succ, Eina_Stringshare *in_cl,
succ = EINA_FALSE;
_eo_parser_log(&cl->base, "non-interface class '%s' in composite list", icl->base.name);
}
else if (iface_only && !_get_impl_class(cl, icl->base.name))
{
/* TODO: optimize check using a lookup hash later */
succ = EINA_FALSE;
_eo_parser_log(&cl->base, "interface '%s' not found within the inheritance tree of '%s'",
icl->base.name, cl->base.name);
}
else
*out_cl = icl;
eina_stringshare_del(in_cl);
@ -1183,6 +1204,7 @@ _db_fill_inherits(Validate_State *vals, Eolian_Class *cl, Eina_Hash *fhash,
/* replace the composite list with real instances and initial-fill the hash */
il = cl->composite;
cl->composite = NULL;
int ncomp = 0;
EINA_LIST_FREE(il, inn)
{
Eolian_Class *out_cl = NULL;
@ -1190,6 +1212,8 @@ _db_fill_inherits(Validate_State *vals, Eolian_Class *cl, Eina_Hash *fhash,
if (!succ)
continue;
cl->composite = eina_list_append(cl->composite, out_cl);
succ = _db_fill_inherits(vals, out_cl, fhash, errh);
++ncomp;
eina_hash_set(ch, &out_cl, out_cl);
}
@ -1216,6 +1240,37 @@ _db_fill_inherits(Validate_State *vals, Eolian_Class *cl, Eina_Hash *fhash,
eina_hash_add(fhash, &cl->base.name, cl);
/* there are more than zero of composites of its own */
if (ncomp > 0)
{
/* this one stores what is already in inheritance tree */
Eina_Hash *ih = eina_hash_pointer_new(NULL);
/* fill a complete inheritance tree set */
if (cl->parent)
_db_fill_ihash(cl->parent, ih);
EINA_LIST_FOREACH(cl->extends, il, icl)
_db_fill_ihash(icl, ih);
/* go through only the explicitly specified composite list part, as the
* rest was to be handled in parents already... add what hasn't been
* explicitly implemented so far into implements/extends
*/
EINA_LIST_FOREACH(cl->composite, il, icl)
{
/* ran out of classes */
if (!ncomp--)
break;
/* found in inheritance tree, skip */
if (eina_hash_find(ih, &icl))
continue;
cl->extends = eina_list_append(cl->extends, icl);
}
eina_hash_free(ih);
}
/* stores mappings from function to Impl_Status */
Eina_Hash *fh = eina_hash_pointer_new(NULL);

View File

@ -27,7 +27,7 @@ enum Tokens
*/
#define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \
\
KW(abstract), KW(c_prefix), KW(composite), KW(constructor), KW(constructors), \
KW(abstract), KW(c_prefix), KW(composites), KW(constructor), KW(constructors), \
KW(data), KW(destructor), KW(error), KW(event_prefix), KW(events), KW(extends), \
KW(free), KW(get), KW(implements), KW(import), KW(interface), \
KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \
@ -60,7 +60,7 @@ enum Tokens
KW(void), \
\
KW(accessor), KW(array), KW(future), KW(iterator), KW(hash), KW(list), \
KW(any_value), KW(any_value_ptr), KW(binbuf), KW(event), \
KW(any_value), KW(any_value_ref), KW(binbuf), KW(event), \
KW(mstring), KW(string), KW(stringshare), KW(strbuf), \
\
KW(void_ptr), \

View File

@ -2210,8 +2210,8 @@ _composite_add(Eo_Lexer *ls, Eina_Strbuf *buf)
eo_lexer_syntax_error(ls, ebuf);
return;
}
/* do not introduce a dependency */
database_defer(ls->state, fnm, EINA_FALSE);
/* composite == definitely a dependency */
database_defer(ls->state, fnm, EINA_TRUE);
free(fnm);
ls->klass->composite = eina_list_append(ls->klass->composite, nm);
eo_lexer_context_pop(ls);
@ -2306,7 +2306,7 @@ tags_done:
/* regular class can have a parent, but just one */
_inherit_dep(ls, ibuf, EINA_TRUE);
/* if not followed by implements, we're done */
if (ls->t.kw != KW_implements)
if ((ls->t.kw != KW_implements) && (ls->t.kw != KW_composites))
{
eo_lexer_dtor_pop(ls);
goto inherit_done;
@ -2318,10 +2318,10 @@ tags_done:
while (test_next(ls, ','));
}
if (ls->t.kw == KW_composite)
if (ls->t.kw == KW_composites)
{
if (type == EOLIAN_CLASS_INTERFACE)
eo_lexer_syntax_error(ls, "composite not allowed in interfaces");
eo_lexer_syntax_error(ls, "interfaces cannot composite");
eo_lexer_get(ls);
do
_composite_add(ls, ibuf);

View File

@ -412,6 +412,9 @@ struct type_def
<< rhs.c_type << " has_own " << rhs.has_own << " is_ptr "
<< rhs.is_ptr << "]";
}
private:
void set(const char* regular_name, const char* c_type);
};
struct get_qualifier_visitor
@ -516,17 +519,39 @@ inline void type_def::set(Eolian_Expression_Type eolian_exp_type)
switch(eolian_exp_type)
{
case EOLIAN_EXPR_INT:
original_type = attributes::regular_type_def{"int", {{}, {}}, {}};
c_type = "int";
set("int", "int");
break;
case EOLIAN_EXPR_UINT:
set("uint", "unsigned int");
break;
case EOLIAN_EXPR_FLOAT:
set("float", "float");
break;
case EOLIAN_EXPR_DOUBLE:
set("double", "double");
break;
case EOLIAN_EXPR_STRING:
set("string", "const char *");
case EOLIAN_EXPR_BOOL:
set("bool", "Eina_Bool");
break;
case EOLIAN_EXPR_NULL:
set("null", "void *");
break;
default:
// FIXME implement the remaining types
EINA_LOG_ERR("Unsupported expression type");
EINA_LOG_ERR("Unsupported expression type : %d", eolian_exp_type);
std::abort();
break;
}
}
inline void type_def::set(const char* regular_name, const char* c_type)
{
original_type = attributes::regular_type_def{regular_name, {{}, {}}, {}};
this->c_type = c_type;
}
struct alias_def
{
std::string eolian_name;
@ -585,12 +610,57 @@ struct add_optional_qualifier_visitor
};
}
struct value_def
{
typedef eina::variant<int> variant_type; // FIXME support other types
variant_type value;
std::string literal;
type_def type;
value_def() = default;
value_def(Eolian_Value value_obj)
{
type.set(value_obj.type);
value = value_obj.value.i;
literal = eolian_expression_value_to_literal(&value_obj);
}
};
struct expression_def
{
value_def value;
std::string serialized;
// We store this explicitly as evaluating the value reduces a name reference
// to a plain string value.
bool is_name_ref;
friend inline bool operator==(expression_def const& lhs, expression_def const& rhs)
{
return lhs.serialized == rhs.serialized;
}
friend inline bool operator!=(expression_def const& lhs, expression_def const& rhs)
{
return lhs != rhs;
}
expression_def(Eolian_Expression const* expression) : value(::eolian_expression_eval(expression, EOLIAN_MASK_ALL))
, serialized()
, is_name_ref(::eolian_expression_type_get(expression) == EOLIAN_EXPR_NAME)
{
auto serialized_s = ::eolian_expression_serialize(expression);
serialized = serialized_s;
::eina_stringshare_del(serialized_s);
}
};
struct parameter_def
{
parameter_direction direction;
type_def type;
std::string param_name;
documentation_def documentation;
eina::optional<expression_def> default_value;
Eolian_Unit const* unit;
friend inline bool operator==(parameter_def const& lhs, parameter_def const& rhs)
@ -598,7 +668,8 @@ struct parameter_def
return lhs.direction == rhs.direction
&& lhs.type == rhs.type
&& lhs.param_name == rhs.param_name
&& lhs.documentation == rhs.documentation;
&& lhs.documentation == rhs.documentation
&& lhs.default_value == rhs.default_value;
}
friend inline bool operator!=(parameter_def const& lhs, parameter_def const& rhs)
{
@ -608,13 +679,17 @@ struct parameter_def
parameter_def(parameter_direction direction, type_def type, std::string param_name,
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)
parameter_def(Eolian_Function_Parameter const* param, Eolian_Unit const* _unit)
: type( ::eolian_parameter_type_get(param)
, unit
, _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)
, param_name( ::eolian_parameter_name_get(param))
, default_value(::eolian_parameter_default_value_get(param) ?
::eolian_parameter_default_value_get(param) :
eina::optional<expression_def>{})
, unit(_unit)
{
Eolian_Parameter_Dir direction = ::eolian_parameter_direction_get(param);
switch(direction)
@ -1530,22 +1605,6 @@ struct klass_def
}
};
struct value_def
{
typedef eina::variant<int> variant_type; // FIXME support other types
variant_type value;
std::string literal;
type_def type;
value_def() = default;
value_def(Eolian_Value value_obj)
{
type.set(value_obj.type);
value = value_obj.value.i;
literal = eolian_expression_value_to_literal(&value_obj);
}
};
struct enum_value_def
{
value_def value;

View File

@ -164,7 +164,7 @@ struct visitor_generate
else
return replace_base_type(r, " Eina_Binbuf const*");
}}
/* FIXME: handle any_value_ptr */
/* FIXME: handle any_value_ref */
, {"any_value", true, nullptr, nullptr, [&]
{
return regular_type_def{" ::efl::eina::value", regular.base_qualifier ^ qualifier_info::is_ref, {}};
@ -172,11 +172,11 @@ struct visitor_generate
, {"any_value", false, nullptr, nullptr, [&]
{ return regular_type_def{" ::efl::eina::value_view", regular.base_qualifier, {}};
}}
, {"any_value_ptr", true, nullptr, nullptr, [&]
, {"any_value_ref", true, nullptr, nullptr, [&]
{
return regular_type_def{" ::efl::eina::value", regular.base_qualifier ^ qualifier_info::is_ref, {}};
}}
, {"any_value_ptr", false, nullptr, nullptr, [&]
, {"any_value_ref", false, nullptr, nullptr, [&]
{ return regular_type_def{" ::efl::eina::value_view", regular.base_qualifier ^ qualifier_info::is_ref, {}};
}}
};

View File

@ -47,7 +47,6 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
If the value is @Efl.Input.Object_Pointer_Mode.no_grab, then events
will be emitted just when inside this object area.
The default value is @Efl.Input.Object_Pointer_Mode.auto_grab.
See also: @.pointer_mode_by_device.get and @.pointer_mode_by_device.set
Note: This function will only set/get the mode for the default pointer.
]]
@ -57,7 +56,7 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
return: bool; [[$true if pointer behaviour was set, $false otherwise]]
}
values {
pointer_mode: Efl.Input.Object_Pointer_Mode; [[Input pointer mode]]
pointer_mode: Efl.Input.Object_Pointer_Mode(Efl.Input.Object_Pointer_Mode.auto_grab); [[Input pointer mode]]
}
}
@property render_op {
@ -265,8 +264,7 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
get {
}
values {
precise: bool; [[Whether to use precise point collision
detection or not. The default value is false.]]
precise: bool(false); [[Whether to use precise point collision detection.]]
}
}
@property propagate_events {
@ -280,7 +278,7 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
propagated on to the smart object of which $obj is a member.
If $prop is $false, events occurring on this object will not
be propagated on to the smart object of which $obj is a
member. The default value is $true.
member.
See also @.repeat_events.set, @.pass_events.set.
]]
@ -289,8 +287,7 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
get {
}
values {
propagate: bool; [[Whether to propagate events ($true) or not
($false).]]
propagate: bool(true); [[Whether to propagate events.]]
}
}
@property pass_events {

View File

@ -33,6 +33,8 @@ static float xa, xb, ua, va, ca[4];
b = tmp
/************************** ANTI-ALIASING CODE ********************************/
#ifdef MAP_HIGH_ANTI_ALIASING
static void
_map_irregular_coverage_calc(AALine* spans, int eidx, int y, int diagonal,
int edge_dist, Eina_Bool reverse)
@ -332,6 +334,7 @@ _map_aa_apply(AASpans *aa_spans, DATA32 *dst, int dw)
free(aa_spans->lines);
free(aa_spans);
}
#endif
/************************** TEXTURE MAPPING CODE ******************************/
static void
@ -822,6 +825,8 @@ _evas_common_map_rgba_internal_high(RGBA_Image *src, RGBA_Image *dst,
//Setup Anti-Aliasing?
AASpans *aa_spans = NULL;
#ifdef MAP_HIGH_ANTI_ALIASING
if (anti_alias)
{
//Adjust AA Y range
@ -837,6 +842,7 @@ _evas_common_map_rgba_internal_high(RGBA_Image *src, RGBA_Image *dst,
aa_spans =
_map_aa_ready(dst->cache_entry.w, dst->cache_entry.h, ystart, yend);
}
#endif
/*
1 polygon is consisted of 2 triangles, 4 polygons constructs 1 mesh.
@ -900,7 +906,8 @@ _evas_common_map_rgba_internal_high(RGBA_Image *src, RGBA_Image *dst,
&poly, mul_col, aa_spans,
smooth, col_blend);
}
#ifdef MAP_HIGH_ANTI_ALIASING
if (anti_alias)
_map_aa_apply(aa_spans, dst->image.data, dst->cache_entry.w);
#endif
}

View File

@ -103,34 +103,35 @@ _evas_common_scale_rgba_sample_scale_nomask(int y,
DATA32 *dptr, RGBA_Gfx_Func func, unsigned int mul_col,
DATA32 *srcptr, int src_w)
{
DATA32 *buf = NULL;
int x;
/* a scanline buffer */
if (!srcptr)
buf = alloca(dst_clip_w * sizeof(DATA32));
dptr = dptr + dst_w * y;
for (; y < dst_clip_h; y++)
if (srcptr)
{
if (!srcptr)
for (; y < dst_clip_h; y++)
{
/* * blend here [clip_w *] buf -> dptr * */
func(srcptr, NULL, mul_col, dptr, dst_clip_w);
dptr += dst_w;
srcptr += src_w;
}
}
else
{
DATA32 *buf = alloca(dst_clip_w * sizeof(DATA32));
for (; y < dst_clip_h; y++)
{
DATA32 *dst_ptr = buf;
for (x = 0; x < dst_clip_w; x++)
{
DATA32 *ptr;
ptr = row_ptr[y] + lin_ptr[x];
DATA32 *ptr = row_ptr[y] + lin_ptr[x];
*dst_ptr = *ptr;
dst_ptr++;
}
/* * blend here [clip_w *] buf -> dptr * */
func(buf, NULL, mul_col, dptr, dst_clip_w);
dptr += dst_w;
}
/* * blend here [clip_w *] buf -> dptr * */
func(srcptr ?: buf, NULL, mul_col, dptr, dst_clip_w);
dptr += dst_w;
if (srcptr) srcptr += src_w;
}
}

View File

@ -1,44 +1,49 @@
import efl_canvas_gesture_types;
parse efl_gesture_events;
abstract @beta Efl.Canvas.Gesture extends Efl.Object
{
[[EFL Gesture abstract class
[[Base abstract class to support gesture-specific classes.
A gesture class defines a method that spcific gesture event and privides information
about the gesture's type, state, and associated pointer information.
A gesture object holds the current state of that gesture (i.e. whether the gesture has
just been started, it is in progress or it has finished) along with any gesture-specific
information it needs (like the number of taps so far, to detect triple-taps, for example).
For cetain gesture types, additional methods are defined to provide meaningful gesture
information to the user.]]
Typically this class is not used directly, instead, some sub-class of it (like
@Efl.Canvas.Gesture_Tap or @Efl.Canvas.Gesture_Zoom) is retrieved from gesture events
(like @[Efl.Gesture.Events.gesture,tap] or @[Efl.Gesture.Events.gesture,zoom]).
]]
c_prefix: efl_gesture;
methods {
@property state {
[[This property holds the current state of the gesture.]]
[[Current state of the gesture, from initial detection to successful recognition.]]
get {
}
set {
}
values {
state: Efl.Canvas.Gesture_State; [[gesture state]]
state: Efl.Canvas.Gesture_State; [[State.]]
}
}
@property hotspot {
[[This property holds the hotspot of the current gesture.]]
[[Hotspot of the gesture currently being analyzed.
The exact meaning depends on the gesture type.]]
get {
}
set {
}
values {
hotspot: Eina.Position2D;[[hotspot co-ordinate]]
hotspot: Eina.Position2D;[[Hotspot coordinates.]]
}
}
@property timestamp {
[[This property holds the timestamp of the current gesture.]]
[[Moment when the gesture currently being analyzed started.]]
get {
}
set {
}
values {
timestamp: uint;[[The timestamp]]
timestamp: uint;[[The time-stamp.]]
}
}
}

View File

@ -1,6 +1,9 @@
class @beta Efl.Canvas.Gesture_Double_Tap extends Efl.Canvas.Gesture
{
[[EFL Gesture Double Tap class]]
[[Double-tap gesture class holding state information.
See @Efl.Canvas.Gesture to see what this state is and
@[Efl.Gesture.Events.gesture,double_tap] for a description of the Double-tap gesture.
]]
data: null;
c_prefix: efl_gesture_double_tap;
implements {

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