forked from enlightenment/efl
Revert "ecore: make efl_loop_promise_new a function of Efl.Loop_Consumer."
This reverts commit 9b5155c9f1
.
For now lets revert this, this breaks copy and paste, further more it
has the potential to break a lot more things, as eio_model tends to use
efl_loop_promise new, and then eina_promise_data_set, which is
explicitly forbidden.
This fixes crashing terminology instances.
This commit is contained in:
parent
0e278d1de8
commit
42e886d8d6
|
@ -62,6 +62,19 @@ EAPI int efl_loop_exit_code_process(Eina_Value *value);
|
||||||
*/
|
*/
|
||||||
EAPI Eina_Future_Scheduler *efl_loop_future_scheduler_get(const Eo *obj);
|
EAPI Eina_Future_Scheduler *efl_loop_future_scheduler_get(const Eo *obj);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Create a promise attached to the current loop
|
||||||
|
*
|
||||||
|
* @param[in] An object which will provide a loop, either by being a loop or a loop consumer
|
||||||
|
* @param cancel_cb A callback used to inform that the promise was canceled. Use
|
||||||
|
* this callback to @c free @p data. @p cancel_cb must not be @c NULL !
|
||||||
|
* @param data Data to @p cancel_cb.
|
||||||
|
* @return A promise or @c NULL on error.
|
||||||
|
*
|
||||||
|
* @see eina_promise_new()
|
||||||
|
*/
|
||||||
|
EAPI Eina_Promise *efl_loop_promise_new(const Eo *obj, Eina_Promise_Cancel_Cb cancel_cb, const void *data);
|
||||||
|
|
||||||
#include "efl_loop_fd.eo.h"
|
#include "efl_loop_fd.eo.h"
|
||||||
#include "efl_loop_handler.eo.h"
|
#include "efl_loop_handler.eo.h"
|
||||||
|
|
||||||
|
|
|
@ -485,7 +485,7 @@ _efl_exe_efl_task_run(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd)
|
||||||
EFL_LOOP_HANDLER_FLAGS_READ));
|
EFL_LOOP_HANDLER_FLAGS_READ));
|
||||||
_ecore_signal_pid_unlock();
|
_ecore_signal_pid_unlock();
|
||||||
pd->run = EINA_TRUE;
|
pd->run = EINA_TRUE;
|
||||||
pd->promise = efl_loop_promise_new(obj, obj, _run_cancel_cb, NULL);
|
pd->promise = efl_loop_promise_new(obj, _run_cancel_cb, obj);
|
||||||
return efl_future_then(obj, eina_future_new(pd->promise));
|
return efl_future_then(obj, eina_future_new(pd->promise));
|
||||||
}
|
}
|
||||||
// this code is in the child here, and is temporary setup until we
|
// this code is in the child here, and is temporary setup until we
|
||||||
|
|
|
@ -902,4 +902,11 @@ efl_loop_future_scheduler_get(const Eo *obj)
|
||||||
#define EFL_LOOP_EXTRA_OPS \
|
#define EFL_LOOP_EXTRA_OPS \
|
||||||
EFL_OBJECT_OP_FUNC(efl_loop_message_process, _efl_loop_message_process)
|
EFL_OBJECT_OP_FUNC(efl_loop_message_process, _efl_loop_message_process)
|
||||||
|
|
||||||
|
EAPI Eina_Promise *
|
||||||
|
efl_loop_promise_new(const Eo *obj, Eina_Promise_Cancel_Cb cancel_cb, const void *data)
|
||||||
|
{
|
||||||
|
return eina_promise_new(efl_loop_future_scheduler_get(obj),
|
||||||
|
cancel_cb, data);
|
||||||
|
}
|
||||||
|
|
||||||
#include "efl_loop.eo.c"
|
#include "efl_loop.eo.c"
|
||||||
|
|
|
@ -50,51 +50,4 @@ _efl_loop_consumer_future_rejected(Eo *obj, Efl_Loop_Consumer_Data *pd EINA_UNUS
|
||||||
return eina_future_rejected(efl_loop_future_scheduler_get(obj), error);
|
return eina_future_rejected(efl_loop_future_scheduler_get(obj), error);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct _Efl_Loop_Consumer_Promise Efl_Loop_Consumer_Promise;
|
|
||||||
struct _Efl_Loop_Consumer_Promise
|
|
||||||
{
|
|
||||||
EflLoopConsumerPromiseCancel func;
|
|
||||||
Eina_Free_Cb free;
|
|
||||||
void *data;
|
|
||||||
Eo *obj;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
|
||||||
_cancel_free(void *data)
|
|
||||||
{
|
|
||||||
Efl_Loop_Consumer_Promise *lcp = data;
|
|
||||||
|
|
||||||
if (lcp->free) lcp->free(lcp->data);
|
|
||||||
efl_unref(lcp->obj);
|
|
||||||
free(lcp);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_cancel_triggered(void *data, const Eina_Promise *p)
|
|
||||||
{
|
|
||||||
Efl_Loop_Consumer_Promise *lcp = data;
|
|
||||||
|
|
||||||
if (lcp->func) lcp->func(lcp->data, lcp->obj, p);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Eina_Promise *
|
|
||||||
_efl_loop_consumer_promise_new(Eo *obj, Efl_Loop_Consumer_Data *pd,
|
|
||||||
void *cancel_data, EflLoopConsumerPromiseCancel cancel, Eina_Free_Cb cancel_free_cb)
|
|
||||||
{
|
|
||||||
Efl_Loop_Consumer_Promise *lcp;
|
|
||||||
Eina_Promise *p;
|
|
||||||
|
|
||||||
lcp = calloc(1, sizeof (Efl_Loop_Consumer_Promise));
|
|
||||||
if (!lcp) return NULL;
|
|
||||||
|
|
||||||
lcp->func = cancel;
|
|
||||||
lcp->data = cancel_data;
|
|
||||||
lcp->free = cancel_free_cb;
|
|
||||||
lcp->obj = efl_ref(obj);
|
|
||||||
|
|
||||||
p = eina_promise_new(efl_loop_future_scheduler_get(obj), _cancel_triggered, lcp);
|
|
||||||
eina_promise_data_free_cb_set(p, _cancel_free);
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "efl_loop_consumer.eo.c"
|
#include "efl_loop_consumer.eo.c"
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
function EflLoopConsumerPromiseCancel {
|
|
||||||
[[EflLoopConsumerPromiseCancel function callback called when a promise is cancelled.]]
|
|
||||||
params {
|
|
||||||
@in consumer: Efl.Loop_Consumer; [[The consumer that was used to create the promise.]]
|
|
||||||
@in dead_promise: const(ptr(Eina.Promise)); [[The promise that was just cancelled.]]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class Efl.Loop_Consumer (Efl.Object)
|
class Efl.Loop_Consumer (Efl.Object)
|
||||||
{
|
{
|
||||||
[[An Efl.Loop_Consumer is a class which requires one of the parents to provide
|
[[An Efl.Loop_Consumer is a class which requires one of the parents to provide
|
||||||
|
@ -34,15 +26,6 @@ class Efl.Loop_Consumer (Efl.Object)
|
||||||
}
|
}
|
||||||
return: future<Eina.Error>;
|
return: future<Eina.Error>;
|
||||||
}
|
}
|
||||||
promise_new {
|
|
||||||
[[Create a new promise with the scheduler coming from the loop provided by this object.
|
|
||||||
|
|
||||||
Note: You should not use eina_promise_data_set as this function rely on controlling the promise data.]]
|
|
||||||
params {
|
|
||||||
cancel: EflLoopConsumerPromiseCancel; [[Callback called when the promise is being cancelled.]]
|
|
||||||
}
|
|
||||||
return: ptr(Eina.Promise) @owned; [[The new promise.]]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
implements {
|
implements {
|
||||||
Efl.Object.parent { set; }
|
Efl.Object.parent { set; }
|
||||||
|
|
|
@ -412,7 +412,7 @@ _cb_thread_parent_ctrl_out(void *data, const Efl_Event *event EINA_UNUSED)
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_run_cancel_cb(void *data, Efl_Loop_Consumer *consumer EINA_UNUSED, const Eina_Promise *dead_promise EINA_UNUSED)
|
_run_cancel_cb(void *data, const Eina_Promise *dead_promise EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Eo *obj = data;
|
Eo *obj = data;
|
||||||
Efl_Thread_Data *pd = efl_data_scope_get(obj, MY_CLASS);
|
Efl_Thread_Data *pd = efl_data_scope_get(obj, MY_CLASS);
|
||||||
|
@ -777,7 +777,7 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd)
|
||||||
}
|
}
|
||||||
pd->thdat = thdat;
|
pd->thdat = thdat;
|
||||||
pd->run = EINA_TRUE;
|
pd->run = EINA_TRUE;
|
||||||
pd->promise = efl_loop_promise_new(obj, obj, _run_cancel_cb, NULL);
|
pd->promise = efl_loop_promise_new(obj, _run_cancel_cb, obj);
|
||||||
return efl_future_then(obj, eina_future_new(pd->promise));
|
return efl_future_then(obj, eina_future_new(pd->promise));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -751,7 +751,7 @@ _efl_net_control_access_point_connect_cb(void *data, const Eldbus_Message *msg,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_efl_net_control_access_point_connect_promise_del(void *data, Efl_Loop_Consumer *consumer EINA_UNUSED, const Eina_Promise *dead_ptr)
|
_efl_net_control_access_point_connect_promise_del(void *data, const Eina_Promise *dead_ptr)
|
||||||
{
|
{
|
||||||
Eldbus_Pending *p = data;
|
Eldbus_Pending *p = data;
|
||||||
Efl_Net_Control_Access_Point_Data *pd;
|
Efl_Net_Control_Access_Point_Data *pd;
|
||||||
|
@ -773,7 +773,7 @@ _efl_net_control_access_point_connect(Eo *o, Efl_Net_Control_Access_Point_Data *
|
||||||
Eina_Promise *promise;
|
Eina_Promise *promise;
|
||||||
Eina_Future *f = NULL;
|
Eina_Future *f = NULL;
|
||||||
|
|
||||||
promise = efl_loop_promise_new(o, o, _efl_net_control_access_point_connect_promise_del, NULL);
|
promise = efl_loop_promise_new(o, _efl_net_control_access_point_connect_promise_del, o);
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(promise, NULL);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(promise, NULL);
|
||||||
|
|
||||||
f = eina_future_new(promise);
|
f = eina_future_new(promise);
|
||||||
|
|
|
@ -371,9 +371,9 @@ _efl_net_control_technology_scan_cb(void *data, const Eldbus_Message *msg, Eldbu
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_efl_net_control_technology_scan_promise_del(void *data, Efl_Loop_Consumer *consumer, const Eina_Promise *dead_ptr)
|
_efl_net_control_technology_scan_promise_del(void *data, const Eina_Promise *dead_ptr)
|
||||||
{
|
{
|
||||||
Eldbus_Pending *p = consumer;
|
Eldbus_Pending *p = data;
|
||||||
Efl_Net_Control_Technology_Data *pd;
|
Efl_Net_Control_Technology_Data *pd;
|
||||||
Eo *o;
|
Eo *o;
|
||||||
|
|
||||||
|
@ -399,7 +399,7 @@ _efl_net_control_technology_scan(Eo *o, Efl_Net_Control_Technology_Data *pd)
|
||||||
Eina_Promise *promise;
|
Eina_Promise *promise;
|
||||||
Eina_Future *f = NULL;
|
Eina_Future *f = NULL;
|
||||||
|
|
||||||
promise = efl_loop_promise_new(o, NULL, _efl_net_control_technology_scan_promise_del, NULL);
|
promise = efl_loop_promise_new(o, _efl_net_control_technology_scan_promise_del, NULL);
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(promise, NULL);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(promise, NULL);
|
||||||
|
|
||||||
f = eina_future_new(promise);
|
f = eina_future_new(promise);
|
||||||
|
|
|
@ -573,7 +573,7 @@ _efl_net_ip_address_resolve(Eo *cls EINA_UNUSED, void *pd EINA_UNUSED, const cha
|
||||||
ctx->thread = efl_net_ip_resolve_async_new(host, port, &hints, _efl_net_ip_address_resolve_done, ctx);
|
ctx->thread = efl_net_ip_resolve_async_new(host, port, &hints, _efl_net_ip_address_resolve_done, ctx);
|
||||||
EINA_SAFETY_ON_NULL_GOTO(ctx->thread, error_thread);
|
EINA_SAFETY_ON_NULL_GOTO(ctx->thread, error_thread);
|
||||||
|
|
||||||
ctx->promise = eina_promise_new(efl_loop_future_scheduler_get(efl_main_loop_get()), _efl_net_ip_address_resolve_del, ctx);
|
ctx->promise = efl_loop_promise_new(efl_main_loop_get(), _efl_net_ip_address_resolve_del, ctx);
|
||||||
EINA_SAFETY_ON_NULL_GOTO(ctx->promise, error_promise);
|
EINA_SAFETY_ON_NULL_GOTO(ctx->promise, error_promise);
|
||||||
|
|
||||||
free(str);
|
free(str);
|
||||||
|
|
|
@ -119,7 +119,7 @@ _efl_io_manager_direct_ls(const Eo *obj,
|
||||||
Eina_Future *future;
|
Eina_Future *future;
|
||||||
Eio_File *h;
|
Eio_File *h;
|
||||||
|
|
||||||
p = eina_promise_new(efl_loop_future_scheduler_get(obj), _efl_io_manager_future_cancel, NULL);
|
p = efl_loop_promise_new(obj, _efl_io_manager_future_cancel, NULL);
|
||||||
if (!p) return NULL;
|
if (!p) return NULL;
|
||||||
future = eina_future_new(p);
|
future = eina_future_new(p);
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ _efl_io_manager_stat_ls(const Eo *obj,
|
||||||
Eina_Future *future;
|
Eina_Future *future;
|
||||||
Eio_File *h;
|
Eio_File *h;
|
||||||
|
|
||||||
p = eina_promise_new(efl_loop_future_scheduler_get(obj), _efl_io_manager_future_cancel, NULL);
|
p = efl_loop_promise_new(obj, _efl_io_manager_future_cancel, NULL);
|
||||||
if (!p) return NULL;
|
if (!p) return NULL;
|
||||||
future = eina_future_new(p);
|
future = eina_future_new(p);
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ _efl_io_manager_ls(const Eo *obj,
|
||||||
Eina_Future *future;
|
Eina_Future *future;
|
||||||
Eio_File *h;
|
Eio_File *h;
|
||||||
|
|
||||||
p = eina_promise_new(efl_loop_future_scheduler_get(obj), _efl_io_manager_future_cancel, NULL);
|
p = efl_loop_promise_new(obj, _efl_io_manager_future_cancel, NULL);
|
||||||
if (!p) return NULL;
|
if (!p) return NULL;
|
||||||
future = eina_future_new(p);
|
future = eina_future_new(p);
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ _efl_io_manager_stat(const Eo *obj,
|
||||||
Eina_Future *future;
|
Eina_Future *future;
|
||||||
Eio_File *h;
|
Eio_File *h;
|
||||||
|
|
||||||
p = eina_promise_new(efl_loop_future_scheduler_get(obj), _efl_io_manager_future_cancel, NULL);
|
p = efl_loop_promise_new(obj, _efl_io_manager_future_cancel, NULL);
|
||||||
if (!p) return NULL;
|
if (!p) return NULL;
|
||||||
future = eina_future_new(p);
|
future = eina_future_new(p);
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ _efl_io_manager_xattr_ls(const Eo *obj,
|
||||||
Eina_Future *future;
|
Eina_Future *future;
|
||||||
Eio_File *h;
|
Eio_File *h;
|
||||||
|
|
||||||
p = eina_promise_new(efl_loop_future_scheduler_get(obj), _efl_io_manager_future_cancel, NULL);
|
p = efl_loop_promise_new(obj, _efl_io_manager_future_cancel, NULL);
|
||||||
if (!p) return NULL;
|
if (!p) return NULL;
|
||||||
future = eina_future_new(p);
|
future = eina_future_new(p);
|
||||||
|
|
||||||
|
@ -336,7 +336,7 @@ _efl_io_manager_xattr_set(Eo *obj,
|
||||||
Eina_Future *future;
|
Eina_Future *future;
|
||||||
Eio_File *h;
|
Eio_File *h;
|
||||||
|
|
||||||
p = eina_promise_new(efl_loop_future_scheduler_get(obj), _efl_io_manager_future_cancel, NULL);
|
p = efl_loop_promise_new(obj, _efl_io_manager_future_cancel, NULL);
|
||||||
if (!p) return NULL;
|
if (!p) return NULL;
|
||||||
future = eina_future_new(p);
|
future = eina_future_new(p);
|
||||||
|
|
||||||
|
@ -366,7 +366,7 @@ _efl_io_manager_xattr_get(const Eo *obj,
|
||||||
Eina_Future *future;
|
Eina_Future *future;
|
||||||
Eio_File *h;
|
Eio_File *h;
|
||||||
|
|
||||||
p = eina_promise_new(efl_loop_future_scheduler_get(obj), _efl_io_manager_future_cancel, NULL);
|
p = efl_loop_promise_new(obj, _efl_io_manager_future_cancel, NULL);
|
||||||
if (!p) return NULL;
|
if (!p) return NULL;
|
||||||
future = eina_future_new(p);
|
future = eina_future_new(p);
|
||||||
|
|
||||||
|
@ -405,7 +405,7 @@ _efl_io_manager_open(const Eo *obj,
|
||||||
Eina_Future *future;
|
Eina_Future *future;
|
||||||
Eio_File *h;
|
Eio_File *h;
|
||||||
|
|
||||||
p = eina_promise_new(efl_loop_future_scheduler_get(obj), _efl_io_manager_future_cancel, NULL);
|
p = efl_loop_promise_new(obj, _efl_io_manager_future_cancel, NULL);
|
||||||
if (!p) return NULL;
|
if (!p) return NULL;
|
||||||
future = eina_future_new(p);
|
future = eina_future_new(p);
|
||||||
|
|
||||||
|
@ -431,7 +431,7 @@ _efl_io_manager_close(const Eo *obj,
|
||||||
Eina_Future *future;
|
Eina_Future *future;
|
||||||
Eio_File *h;
|
Eio_File *h;
|
||||||
|
|
||||||
p = eina_promise_new(efl_loop_future_scheduler_get(obj), _efl_io_manager_future_cancel, NULL);
|
p = efl_loop_promise_new(obj, _efl_io_manager_future_cancel, NULL);
|
||||||
if (!p) return NULL;
|
if (!p) return NULL;
|
||||||
future = eina_future_new(p);
|
future = eina_future_new(p);
|
||||||
|
|
||||||
|
|
|
@ -417,7 +417,7 @@ _build_delay(Efl_Loop *loop)
|
||||||
{
|
{
|
||||||
Eina_Promise *p;
|
Eina_Promise *p;
|
||||||
|
|
||||||
p = eina_promise_new(efl_loop_future_scheduler_get(loop), _cancel_request, NULL);
|
p = efl_loop_promise_new(loop, _cancel_request, NULL);
|
||||||
|
|
||||||
if (!delayed_queue)
|
if (!delayed_queue)
|
||||||
{
|
{
|
||||||
|
@ -682,7 +682,7 @@ _eio_model_efl_model_property_set(Eo *obj,
|
||||||
|
|
||||||
if (finalized)
|
if (finalized)
|
||||||
{
|
{
|
||||||
Eina_Promise *p = eina_promise_new(efl_loop_future_scheduler_get(obj), _efl_io_manager_future_cancel, NULL);
|
Eina_Promise *p = efl_loop_promise_new(obj, _efl_io_manager_future_cancel, NULL);
|
||||||
f = eina_future_new(p);
|
f = eina_future_new(p);
|
||||||
|
|
||||||
pd->request.move = eio_file_move(pd->path, path,
|
pd->request.move = eio_file_move(pd->path, path,
|
||||||
|
|
|
@ -70,7 +70,7 @@ _eldbus_model_connection_efl_model_children_slice_get(Eo *obj,
|
||||||
return efl_loop_future_resolved(obj, v);
|
return efl_loop_future_resolved(obj, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
p = efl_loop_promise_new(obj, NULL, _eldbus_eina_promise_cancel, NULL);
|
p = efl_loop_promise_new(obj, _eldbus_eina_promise_cancel, NULL);
|
||||||
|
|
||||||
slice = calloc(1, sizeof (Eldbus_Children_Slice_Promise));
|
slice = calloc(1, sizeof (Eldbus_Children_Slice_Promise));
|
||||||
slice->p = p;
|
slice->p = p;
|
||||||
|
|
|
@ -127,7 +127,7 @@ _eldbus_model_object_efl_model_children_slice_get(Eo *obj EINA_UNUSED,
|
||||||
return efl_loop_future_resolved(obj, v);
|
return efl_loop_future_resolved(obj, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
p = efl_loop_promise_new(obj, NULL, _eldbus_eina_promise_cancel, NULL);
|
p = efl_loop_promise_new(obj, _eldbus_eina_promise_cancel, NULL);
|
||||||
|
|
||||||
slice = calloc(1, sizeof(struct _Eldbus_Children_Slice_Promise));
|
slice = calloc(1, sizeof(struct _Eldbus_Children_Slice_Promise));
|
||||||
slice->p = p;
|
slice->p = p;
|
||||||
|
|
|
@ -41,7 +41,6 @@ extern int eldbus_model_log_dom;
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
_eldbus_eina_promise_cancel(void *data EINA_UNUSED,
|
_eldbus_eina_promise_cancel(void *data EINA_UNUSED,
|
||||||
Efl_Loop_Consumer *consumer EINA_UNUSED,
|
|
||||||
const Eina_Promise *dead_ptr EINA_UNUSED)
|
const Eina_Promise *dead_ptr EINA_UNUSED)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,7 +230,6 @@ eldbus_model_proxy_property_check(Eldbus_Model_Proxy_Data *pd,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_eldbus_model_proxy_cancel_cb(void *data,
|
_eldbus_model_proxy_cancel_cb(void *data,
|
||||||
Efl_Loop_Consumer *consumer EINA_UNUSED,
|
|
||||||
const Eina_Promise *dead_promise EINA_UNUSED)
|
const Eina_Promise *dead_promise EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Eldbus_Model_Proxy_Property_Set_Data *sd = data;
|
Eldbus_Model_Proxy_Property_Set_Data *sd = data;
|
||||||
|
@ -294,7 +293,7 @@ _eldbus_model_proxy_efl_model_property_set(Eo *obj EINA_UNUSED,
|
||||||
if (!data) goto on_error;
|
if (!data) goto on_error;
|
||||||
|
|
||||||
data->pd = pd;
|
data->pd = pd;
|
||||||
data->promise = efl_loop_promise_new(obj, data, _eldbus_model_proxy_cancel_cb, NULL);
|
data->promise = efl_loop_promise_new(obj, _eldbus_model_proxy_cancel_cb, data);
|
||||||
data->property = eina_stringshare_add(property);
|
data->property = eina_stringshare_add(property);
|
||||||
if (!(data->value = eina_value_dup(value))) goto on_error;
|
if (!(data->value = eina_value_dup(value))) goto on_error;
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,7 @@ _sel_manager_seat_selection_init(Efl_Selection_Manager_Data *pd, unsigned int se
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_sel_manager_promise_cancel(void *data, Efl_Loop_Consumer *consumer, const Eina_Promise *dead_future EINA_UNUSED)
|
_sel_manager_promise_cancel(void *data, const Eina_Promise *dead_future EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Sel_Manager_Selection_Lost *sel_lost = data;
|
Sel_Manager_Selection_Lost *sel_lost = data;
|
||||||
sel_lost->seat_sel->sel_lost_list = eina_list_remove(
|
sel_lost->seat_sel->sel_lost_list = eina_list_remove(
|
||||||
|
@ -247,7 +247,7 @@ _update_sel_lost_list(Efl_Object *obj, Efl_Selection_Type type,
|
||||||
sel_lost->seat_sel = seat_sel;
|
sel_lost->seat_sel = seat_sel;
|
||||||
seat_sel->sel_lost_list = eina_list_append(seat_sel->sel_lost_list, sel_lost);
|
seat_sel->sel_lost_list = eina_list_append(seat_sel->sel_lost_list, sel_lost);
|
||||||
|
|
||||||
p = efl_loop_promise_new(obj, NULL, _sel_manager_promise_cancel, NULL);
|
p = efl_loop_promise_new(obj, _sel_manager_promise_cancel, NULL);
|
||||||
eina_promise_data_set(p, sel_lost);
|
eina_promise_data_set(p, sel_lost);
|
||||||
if (!p) return NULL;
|
if (!p) return NULL;
|
||||||
sel_lost->promise = p;
|
sel_lost->promise = p;
|
||||||
|
|
|
@ -99,8 +99,6 @@ struct @extern Eina.Stat {
|
||||||
ctimensec: ulong; [[The nano version of the timestmap when the file was created]]
|
ctimensec: ulong; [[The nano version of the timestmap when the file was created]]
|
||||||
}
|
}
|
||||||
|
|
||||||
struct @extern Eina.Promise; [[Eina promise type]]
|
|
||||||
|
|
||||||
/* FIXME: This definitely shouldn't be here. */
|
/* FIXME: This definitely shouldn't be here. */
|
||||||
type Efl.Event_Cb: __undefined_type; [[Efl event callback type]]
|
type Efl.Event_Cb: __undefined_type; [[Efl event callback type]]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue