summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_ui_factory.eo
blob: 2828ec3b37ee33a2b10cbcc9d50432a2cce4a297 (plain) (blame)
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
struct @beta Efl.Ui.Factory_Item_Created_Event {
   [[EFL UI Factory event structure provided when an item was just created.]]
   model: Efl.Model; [[The model already set on the new item.]]
   item: Efl.Gfx.Entity; [[The item that was just created.]]
}

interface @beta Efl.Ui.Factory extends Efl.Ui.Property_Bind, Efl.Ui.Factory_Bind
{
   [[Efl UI factory interface]]
   methods {
      create @protected {
         [[Create a UI object from the necessary properties in the specified model.

           Note: This is the function you need to implement for a custom factory, but if you want to use a factory,
           you should rely on @Efl.Ui.View_Factory.create_with_event.]]
         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]]
         }
         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]]
         }
      }
      building @const {
         [[This function is called after the creation of an UI object.

         Note: if the @Efl.Ui.Factory does keep a cache of object, this won't be called when object are pulled out of the cache.]]
         params {
            ui_view: Efl.Gfx.Entity; [[The UI object being created.]]
         }
      }
      constructing @const {
         [[This function is called during the construction of an UI object between the @Efl.Object.constructor and @Efl.Object.finalize call.

           Note: If the @Efl.Ui.Factory does keep a cache of objects, this won't be called when objects are pulled out
           of the cache.]]
         params {
            ui_view: Efl.Gfx.Entity; [[The UI object being created.]]
         }
      }
   }
   events {
      created: Efl.Ui.Factory_Item_Created_Event; [[Event triggered when an item has been successfully created.]]
   }
}