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

Re: [E-devel] evas_smart_new() api



On Tue, 28 Nov 2006 10:15:05 -0600 Brian Mattern <brian.mattern@gmail.com>
babbled:

> A while back, layer and stacking handling for smart object members was
> moved into evas itself, removing the need for the layer_set, raise,
> lower, stack_above and stack_below callbacks. However, the api remained
> the same, so now every smart object has 5 NULL's in the middle of its
> evas_smart_new() call.
> 
> Any objections to removing these from the API (other than the fact that
> we have to trudge through cvs and delete a bunch of NULL's)? I'd prefer
> this to having deprecated API on release.
> 
> (and yes, i'd be willing to do most of the work) :)

actually - i would want to get rid of evas_smart_new() and replace with
evas_smart_class_new() that takes a struct pointer. i just added versioning to
it so the code can check if the abi changes and handle it - :)

ie instead you do:

Evas_Smart *smart;
Evas_Smart_Class sclass =
{ "smart_name", EVAS_SMART_CLASS_VERSION,
  my_add, my_del, my_move, my_resize, my_show, my_hide, my_color_set,
my_clip_set, my_clip_unset};
smart = evas_smart_class_new(&sc);

the idea is that in future we can add to (or even remove) from that struct and
the version field (ie when it was compiled it will have used the header version
and thus indicate what api it was compiled with). evas makes a copy of this
stuct so it doesn't need to be const or static.

> rephorm
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
裸好多
Tokyo, Japan (東京 日本)