Hey everyone, As part my effort of improving entry, I started implementing undo/redo support. I guess there are several ways of doing it, therefore I'd like to hear what you guys think about the solutions in general, and the one I chose in particular.
Before I start, there's one important thing to remember: Elm_Entry interacts with textblock through edje_entry. Edje_entry's callbacks aren't "smart callbacks" but are edje signals instead, which means they aren't called immediately. Edje signals are inserted into the edje queue with additional information, which means all the data passed with them has to be allocated on the heap and stored. Also, because it's not possible to know in advance when a signal will be called, querying the issuing object upon calling the callback is also not possible, as it may have changed in the meanwhile. This means I have to do one of the following: either I add smart callbacks to edje (or custom ones like is done with text_filter) which means I don't have to allocate anything on the heap, and if I do, it's very contained and will only happen if a callback will actually be called. The worst thing about this method is probably that it breaks order of callbacks, as those will be called before signals emitted. The other alternative is what I currently implemented: I added a way to pass additional information to c callbacks listening to signals ( (added a function: edje_object_signal_callback_extra_data_get(void)). I really don't know which one is better. I prefer using smart callbacks, but there are many drawbacks. As for the additional data with signals: there won't be many allocations because "changed,user" is only called on user changes, which are very limited anyway. So, what do you guys think I should do? Thanks, Tom. ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel