WIP change object model

This commit is contained in:
Wim Taymans 2016-11-14 12:42:00 +01:00
parent 190f01d88e
commit c25ccbb4ba
44 changed files with 1557 additions and 2525 deletions

View file

@ -47,7 +47,8 @@ struct _PinosObject {
uint32_t id;
PinosObjectFlags flags;
PinosDestroyFunc destroy;
PinosSignal destroy_signal;
PINOS_SIGNAL (destroy_signal, (PinosListener *listener,
PinosObject *object));
unsigned int n_interfaces;
PinosInterface *interfaces;
};
@ -81,7 +82,7 @@ static inline void
pinos_object_destroy (PinosObject *object)
{
object->flags |= PINOS_OBJECT_FLAG_DESTROYING;
pinos_signal_emit (&object->destroy_signal, object, NULL);
pinos_signal_emit (&object->destroy_signal, object);
if (object->destroy)
object->destroy (object);
}