summaryrefslogtreecommitdiff
path: root/src/lib/ecore/efl_loop_consumer.eo
blob: def99ef035ef978dbed602ce563f899c97ca0396 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
abstract Efl.Loop_Consumer extends 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 @const {
         [[Creates a new future that is already resolved to a value.

         This function creates a new future with an already known value,
         that will be resolved and dispatched by the loop scheduler as
         usual.

         This is a helper that behaves the same as eina_future_resolved.]]
         params {
            result: any_value; [[The value to be delivered.

            Note that the value contents must survive this function scope, that is, do
            not use stack allocated blobs, arrays, structures or types that keep
            references to memory you give. Values will be automatically cleaned up using
            \@ref eina_value_flush() once they are unused (no more future or futures returned a new value)]]
         }
         return: future<any_value>; [[The future or $NULL on error.]]
      }
      future_rejected @const {
         [[Creates a new future that is already rejected to a specified error using the @.loop.get.

         This function creates a new future with an already known error,
         that will be resolved and dispatched by the loop scheduler as
         usual.

         This is a helper that behaves the same as \@ref eina_future_rejected.]]
         params {
            error: Eina.Error; [[An Eina_Error value]]
         }
         return: future<Eina.Error>; [[The future or $NULL on error.]]
      }
      promise_new @const {
         [[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.]]
	 return: ptr(Eina.Promise) @owned; [[The new promise.]]
      }
   }
   implements {
      Efl.Object.parent { set; }
   }
}