Page MenuHomePhabricator

efl.object
Closed, ResolvedPublic

Description

| | | | |abstract Efl.Object
| | | | |├ (P) parent
| | | | |├ (P) name
| | | | |├ (P) comment
| | | | |├ (P) event_global_freeze_count
| | | | |├ (P) event_freeze_count
| | | | |├ (P) finalized
| | | | |├ (P) invalidated
| | | | |├ (P) invalidating
| | | | |├ (P) allow_parent_unref
| | | | |├ (M) debug_name_override
| | | | |├ (M) provider_find
| | | | |├ (M) constructor
| | | | |├ (M) destructor
| | | | |├ (M) finalize
| | | | |├ (M) invalidate
| | | | |├ (M) noref
| | | | |├ (M) name_find
| | | | |├ (M) event_thaw
| | | | |├ (M) event_freeze
| | | | |├ (M) event_global_thaw
| | | | |├ (M) event_global_freeze
| | | | |├ (M) event_callback_stop
| | | | |├ (M) event_callback_forwarder_priority_add
| | | | |├ (M) event_callback_forwarder_del
| | | | |├ (M) children_iterator_new
| | | | |├ (M) composite_attach
| | | | |├ (M) composite_detach
| | | | |├ (M) composite_part_is
| | | | |├ (E) del
| | | | |├ (E) invalidate
| | | | |├ (E) noref
| | | | |├ (E) destruct
zmike created this task.Jan 8 2019, 11:30 AM
zmike triaged this task as TODO priority.

We probebly should document this here with a few nice Sequence diagrams, as its not quite obvious when which calls are happening ...

If you mean the lifecycle calls, I agree completely. I'd love to understand what do (P) finalized, (P) invalidated, (P) invalidating, (M) finalize, (M) invalidate, (M) noref, (E) del, (E) invalidate, (E) noref and (E) destruct mean.

Other than that, i would say that everything except composite APIs and allow_parent_unref can be stable. Thoughts ?

zmike added a comment.Feb 8 2019, 9:20 AM

If you mean the lifecycle calls, I agree completely. I'd love to understand what do (P) finalized, (P) invalidated, (P) invalidating, (M) finalize, (M) invalidate, (M) noref, (E) del, (E) invalidate, (E) noref and (E) destruct mean.

This output needs to be updated but the lua script I was using doesn't work anymore.

In short, the lifecycle works something like this:

  1. constructor - callback for instantiating the class
  2. finalize - callback for after the constructors are called but before the created object is returned
  3. invalidate - occurs when an object's parent has been unset (parent_set(NULL))
  4. noref - occurs when the object's refcount reaches 0
  5. del - occurs when the object starts to be deleted
  6. destruct - occurs when the object is destroyed

There are some functions for determining exactly where in the deletion chain an object is:

  • invalidated - the object's parent has been unset
  • invalidating - the object's parent is being unset (i.e., during the parent_set(NULL) call)

On the C# side, the main concerns are:

  • CallbackPriority constants: To be added with T7506
  • Add a way to pass events to methods: Kinda T7358
    • This should allow testing the event forwarders
  • Provider find: T7618

(Also, but not related to the API)

  • Document the typedefs: T7689

@lauromoura Afaics this only affects bindings, but not the efl.object definition perse. @segfaultxavi improved the documentation big time. To me the API looks good, except one tiny thing, i don't know if we want to have allow_parent_unref out of beta or not, because to me this seems like a hack that should not be needed in future, opinions @zmike @cedric.

bu5hm4n moved this task from Backlog to Stabilized on the efl: api board.Feb 21 2019, 10:20 AM
bu5hm4n raised the priority of this task from TODO to Normal.Feb 22 2019, 1:20 AM
cedric reopened this task as Open.Mar 6 2019, 11:43 AM

Hum, phab decided on its own to close this after landing just one patch. Weird.

Why reopen, the class is now declared stable, so this ticket is done ?

cedric closed this task as Resolved.Mar 7 2019, 9:17 AM
cedric claimed this task.

I didn't explicitely close the task and phab decided to do it on its own. If we are all fine with efl_object, then let's close this one.