forked from enlightenment/efl
51 lines
1.6 KiB
Plaintext
51 lines
1.6 KiB
Plaintext
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)
|
|
{
|
|
[[An Efl.Loop_Consumer is a class which requires one of the parents to provide
|
|
an Efl.Loop interface when performing provider_find. It will enforce this by
|
|
only allowing parents which provide such an interface or NULL.]]
|
|
eo_prefix: efl_loop;
|
|
methods {
|
|
@property loop {
|
|
[[The loop to which this object belongs to.]]
|
|
get {
|
|
[[Gets a handle to the loop.]]
|
|
}
|
|
values {
|
|
loop: Efl.Loop; [[Efl loop]]
|
|
}
|
|
}
|
|
future_resolved {
|
|
params {
|
|
result: any_value;
|
|
}
|
|
return: future<any_value>;
|
|
}
|
|
future_rejected {
|
|
params {
|
|
error: 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 {
|
|
Efl.Object.parent { set; }
|
|
}
|
|
}
|