From: Dennis S. <sy...@yo...> - 2004-11-23 23:21:40
|
Alright, most of the libvisual system is now in the VisObject fashion. This introduces the following API functions: VisObject *visual_object_new (void); int visual_object_free (VisObject *object); int visual_object_destroy (VisObject *object); int visual_object_ref (VisObject *object); int visual_object_unref (VisObject *object); int visual_object_set_private (VisObject *object, void *priv); void *visual_object_get_private (VisObject *object); Nearly every libvisual structure (like VisActor / VisSongInfo etc etc) can be cast into a VisObject using object = VISUAL_OBJECT (actor); This way we provide a generalized ref counting interface. That also supports complex object desctructors that are set at object creation. With this change most of the other _free and _destroy functions are history and object disposing should be done using an visual_object_unref, and if you're really sure visual_object_destroy. To get this working, EVERY libvisual module needs a recompile. I haven't updated lvdisplay to this, Vitaly would you like to take a look at VisObjectifying lvdisplay ? VisUI and lv_plugin.c still needs to be done, I will most likely do that tomorrow in the evening. Cheers, Dennis |