[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] Evas Smart objects



 
> Hi all, 
> i have some doubts-ideas about evas smart objects, 
>  
 
	Ah yes, the saga of the evas smart object. 
 
> 1. the API 
> in order to add an object to a smart object you have to do 
> _member_add(o, s) and to delete _member_del(o,s). On the code 
> of both an evas smart object actually stores the members on a 
> list but theres no function to retrieve them, 
>    Evas_List * _members_get(s), so when you code an evas smart 
> obejct and you need to keep track of the objects you have, 
> you need to duplicate the list and code a different function 
> to do that. 
>  
 
	A function to get the list of smart members would likely 
be a non-controversial addition :) 
 
> 2. the implementation 
> ive been playing with smart objects for evoak, so ill explain 
 
	I thought evoak was considered to be laid to rest? 
 
> the case: my goal was to create a container, an evas objects 
> container. the problem i see is that the evas smart objects where 
> thought for a static environment, on the callback of a smart 
> object add you create the static objects inside, store them on 
> your list and when something happens (move, resize, whatever) 
> you act accord with that and apply that to your internal objects. 
> thats fine. but i thought the idea of the smart objects was to 
> actually be a sub canvas of evas, so when you add an object: 
> evas_object_add(evas) and then add it as a member of smart 
> object it is no longer part of the evas objects but of the smart 
> objects, so for example a layer change on that is actually a 
> layer change inside the layers of the sub canvas, wich in fact 
> the subcanvas is in one layer. but not in the evas canvas 
> layers. another example is that when you move an object what 
> is member of a smart object it should move relative to it, 
> no relative to the evas canvas. dont know if i explain myself 
> correctly :) 
> so a problem with this is that if you want to move an object 
> that is part of smart object you should call a different (own) 
> function to calculate all the relative coordinates and move it 
> there. 
> so my question is, the current aproach of evas smart objects 
> in the correct way? or my use case is just an specific and 
> doesnt make sense to change the behaviour of the smart objects? 
> maybe a solution could be to add callbacks for a move, resize, 
> layer_set, whatever, but not for the smart object but for 
> the elements of a smart object. 
>  
> btw, if i made a wrong assumption about smart objects please 
> forgive me :) havent used them a lot :) 
>  
> bye 
 
 
	Smart objs were, until fairly recently, a generic kind 
of fairly unconstrained mechanism for creating new 'kinds' of 
evas objects from collections of other evas objs. They have been 
made a bit tamer since, but are quite far really from having the 
structure of a 'sub-canvas' object - that is itself a certain 
new kind of object type with many similarities. 
 
	Should smart objs be 'modified' so that ............ 
 
	Well, ............ 
 
 
    jose.