Commit Graph

1200 Commits

Author SHA1 Message Date
Vincent Torri 2a8d44f5a0 allow the user to chose in which directory the temporary file
will be created. The logic is the following:

 * if the environment variable TMPDIR is set, use its value
 * if it is not set, take the directory passed with the
   -td option (see edje_cc help)
 * otherwise on Windows use a temporary dir and on other
   platform, use /tmp


SVN revision: 41978
2009-08-25 17:25:23 +00:00
Vincent Torri 5fd9a46869 small cleanup
SVN revision: 41958
2009-08-24 17:20:33 +00:00
Vincent Torri 8b2bd0c079 * remove unused parameters (except in edje_lua.c, as i don't know the current status)
* remove unused variables


SVN revision: 41957
2009-08-24 16:40:42 +00:00
Vincent Torri b4ddae48b8 typo
SVN revision: 41942
2009-08-23 15:37:20 +00:00
Davide Andreoli dfac5a2a59 * Remove _strdup(). Useless unless we don't check the return value
SVN revision: 41850
2009-08-17 21:28:40 +00:00
Cedric BAIL 9abdbe30af * edje: Fix tween when comming from same state.
SVN revision: 41844
2009-08-17 15:16:23 +00:00
Davide Andreoli cb29b20245 * Do not include edje_cc.h anymore :)
SVN revision: 41843
2009-08-17 14:49:26 +00:00
Davide Andreoli 74565cec99 * Do not use the 'Font' struct from edje_cc.h
SVN revision: 41842
2009-08-17 14:26:31 +00:00
Davide Andreoli 8fa5f302d3 * Do not use SZ() macro from edje_cc.h
SVN revision: 41841
2009-08-17 14:13:26 +00:00
Cedric BAIL 06f76b1e87 * edje: Fix calc.
SVN revision: 41840
2009-08-17 14:00:44 +00:00
Davide Andreoli 061798f628 * rename mem_strdup() to not clash (in the case of a static build) with the one defined in bin/
SVN revision: 41839
2009-08-17 13:54:17 +00:00
Cedric BAIL 6c7f8ce84c * edje: Remove warning, mainly due to lua merge.
SVN revision: 41838
2009-08-17 11:32:56 +00:00
Carsten Haitzler 2a06a861d5 do not exit on lua errors! this would be righteously bad for apps using
themes that happened to use lua...



SVN revision: 41804
2009-08-16 03:00:14 +00:00
Hanspeter Portner da75132793 From: "Hanspeter Portner" <ventosus@airpost.net>
This concerns Ticket #109: Add Lua support for Edje

It adds Lua as scripting facility to Edje, letting Embryo untouched.
It should be easier to use and be more flexible than Embryo, imho ;-)

---
The patch
---

Lua 5.1 is used in sandboxed mode. Lua byte code is not
platform/architecture independent, Lua code is saved as text in the Edje
container and parsed at load time, therefore.

The patch goes in two directions

1) Analogous to Embryo for scripting logic, messaging and custom states.
The same things are implemented as in Embryo:

    - messaging from and to C
        - manual creation of timers, animators, pollers for custom events /
            animations
                - manual manipulation of Edje parts by means of the public
                    edje_object_part_* and internal functions and custom states
                    
                        -> those routines are actually implemented as Lua
bindings to
    functions in Edje.h and Ecore.h
        -> the implementation is done in an object oriented way, so that the
            interface gives the feel of an object description language, pretty
                similar to EDC itself
                    -> combining custom states and custom animators allows
for fancy
    animations and transitions, e.g circular/spline translations or
        complex/conditional transitions, etc.
            -> this is just the same as Embryo does, but implemented in Lua, so
                nothing new here, actually
                
                2) Dynamic object creation and manipulation
                
                    - this interface stems from the 'script_only' objects in
Edje. Those
    objects are a kind of scriptable Edje counterparts to Evas_Smart
        objects. The infrastructure for Embryo is already there, but has
            never been used
                - I added this in Lua and added some first bindings to
experiment
    with
        - I thought it would be useful to allow for a limited dynamic
            creation of ui parts
                - We can create instances of groups from within the same Edje
                    container and use them just like the main Edje object as
stated in
    1)
        - And there are some stand-alone bindings to dynamically create
            Evas_Image, Evas_Table, Evas_Line, Evas_Polygon as examples
            
                -> this may be useful to decouple the program from the ui
even more,
    to be able to do things that have to be done in the program itself
        atm, but actually belong to the user interface, but need dynamic
            creation of objects or complex interactions
                -> those objects are manipulated manually with Lua bindings
to the
    corresponding edje_object_* and evas_object_* functions
    
    ---
    Discussion points
    ---
    
    Both stuff in 1) & 2) is functioning, but needs testing, feedback,
    improvements, ...
    
    Stuff in 1) can already fully replace Embryo scripting with Lua
    scripting. There still is space for improvements/additions, though.
    
    Of the stuff in 2), I think it may only make sense to add the dynamic
    creation of groups defined in the same Edje container.  Dynamic creation
    of other Evas_Objects makes not much sense, as most of them can already
    be used as Edje parts and be manipulated with custom states (apart from
    polygons and lines) and it would make the whole theming potentially more
    programing-like and much more susceptible for errors, etc.
    
    Would this be useful, or drop it all?
    
    The scripting should be there just for logic, conditionals, custom
    states and animations, not for a whole dynamic canvas, imho.
    
    There is a patch around with EXTERNAL Edje parts. Seems to be a better,
    faster, more secure way to extend Edje with custom objects.
    
    There would be the possibility of precompiling Lua code at compile time
    (edje_cc) for faster loading, but we would have to patch and run our own
    Lua version.
    The Lua parser is pretty fast, though, and using
    byte-converted/endianness-swapped byte-code does only pay off for Lua
    chunks of some kilo lines.
    Byte code also occupies much more space than text in the final Edje
    container, as it includes debug symbols.
    
    ---
    
    Cedric and Vincent told me, that the plan was to replace Embryo totally
    by Lua before the official release of Edje at the end of the year? So it
    would make sense to bring Lua to svn soon and look how it fits in, test,
    debug, adapt it further to the themers needs, decide on its final shape,
    GATHER SOME PEOPLE TO HELP ;-)
    
    ---
    
    The Lua enhanced Edje is in sync with svn and can be get directly here
       git clone git://repo.or.cz/edje_lua.git
          cd edje_lua
             git checkout -b lua_patch origin/lua_patch
             
             or apply the attached patch
             
             There are also some examples to show the usage of the things
mentioned
above
    - showcase.edj: shows usage of custom animators, custom states,
        messaging and the script_only object
            - test.edj: test cases of script usage and bindings (custom states,
                custom transitions, tween_states, animators, timers,
object_parts),
    but most of it are experimental script_only objects
    
    http://didgmo.sourceforge.net/showcase.edj
    http://didgmo.sourceforge.net/test.edj
    
    The source of showcase.edc is attached, too, to just have a glimpse at
    Lua inside of EDC
    
    ---
    
    So, what do you guys think?
    
    Thanks and sry for the looong mail, hehe ;-)



SVN revision: 41802
2009-08-16 02:34:02 +00:00
Cedric BAIL 56674aeb99 * edje: Make EDJE_CALC_CACHE on by default.
SVN revision: 41772
2009-08-14 17:20:27 +00:00
Cedric BAIL 7df190d264 * edje_calc: Major cleanup.
- Edje_Real_Part use less memory.
		- Edje_Real_Part and Edje_Real_Part_State now use a mempool.
		- When both param1 and param2 are the same, only recalc param1.
		- Don't compute Edje_Real_Part more than one time per edje_recalc_do.



SVN revision: 41771
2009-08-14 17:19:42 +00:00
Cedric BAIL d894444135 * edje_calc: Use 20 bytes less per Edje_Calc_Params.
SVN revision: 41745
2009-08-13 16:28:17 +00:00
Cedric BAIL eff22017dc * edje_calc: Cleanup calc structure.
SVN revision: 41744
2009-08-13 16:13:49 +00:00
Cedric BAIL 2cf15dc335 * eet: Fix prefix.
SVN revision: 41735
2009-08-13 13:26:43 +00:00
Cedric BAIL bc5dda9c0c * edje: Use new clean API from Eet.
SVN revision: 41733
2009-08-13 12:53:12 +00:00
Gustavo Sverzut Barbieri 4a514076ad NULL sfont as it might be used earlier.
if sfont=something was given to _edje_text_class_font_get(), sfont
might be untouched there and old pointer was being freed, resulting in
double free. So make sure we're using the correct pointer there.



SVN revision: 41714
2009-08-12 17:57:34 +00:00
Cedric BAIL 3fe43bff2c * edje: Starting refactor of edje_recalc_single.
SVN revision: 41706
2009-08-12 14:13:17 +00:00
Cedric BAIL 3d5a09f6e8 * edje: Reverting to recalc_do in edje smart resize.
Note: A bug spotted in layout of box is the reason of this revert. From
	my understanding, layout require some property on the object to be
	correctly set. This is done during edje_recalc_single on the part. The
	layout fonction of evas would be called just after the resize. If we
	didn't do an edje_recalc_do, but an edje_recalc, the call to
	edje_recalc_single will be delayed and the layout property will not be
	set correctly.


SVN revision: 41698
2009-08-12 09:27:09 +00:00
Cedric BAIL 8170df024a * edje: Oops, fix drag.
SVN revision: 41691
2009-08-11 14:55:26 +00:00
Cedric BAIL b69abd204f * edje: Free the Edje_Real_Part_Drag.
SVN revision: 41686
2009-08-11 13:07:46 +00:00
Cedric BAIL d16bbd3953 * edje: Make Edje_Real_Part_Drag a pointer. Win 100 bytes per states.
SVN revision: 41685
2009-08-11 12:47:00 +00:00
Cedric BAIL 9807d2e4c8 * edje: More cleanup of Edje_Real_Part.
SVN revision: 41683
2009-08-11 10:32:21 +00:00
Cedric BAIL 7047c5f561 * edje: Cleanup drag part of Edje_Real_Part.
SVN revision: 41682
2009-08-11 10:17:14 +00:00
Cedric BAIL 16111c4867 * edje: Starting cleanup of Edje_Real_Part.
SVN revision: 41681
2009-08-11 10:08:03 +00:00
Cedric BAIL b6a228e3eb * edje_load: More cleanup.
SVN revision: 41680
2009-08-11 10:06:37 +00:00
Cedric BAIL 922939d832 * edje: Some cleanup, mainly removing dead code.
SVN revision: 41679
2009-08-11 09:45:06 +00:00
Cedric BAIL 280010f404 * edje: Fix memory count.
SVN revision: 41664
2009-08-10 15:18:07 +00:00
Cedric BAIL 7f9a41a824 * edje: Add a cache for _edje_part_recalc_single.
WARNING: THIS CAN CAUSE RENDERING GLITCH AND OTHER WEIRD BEHAVIOUR WITH
	YOUR EDJE FILE. PLEASE REPORT ANY ALIEN STUFF.

	Note: This patch cache the result of _edje_part_recalc_single, until
	any relative part are moved, the object is resized or some property
	are changed (like during text set or color class set).

	Note: Be carefull when you call edje_object_size_min_restricted_calc,
	it's really an inderect heavy user of _edje_part_recalc_single and
	I wasn't able to bring it down.

	Note: This patch use more RAM, around 480 bytes per Edje state, so I
	don't recommand using it on a Desktop with a lot of CPU power.


SVN revision: 41663
2009-08-10 15:16:51 +00:00
Cedric BAIL ee729dd97f * edje: Oops, not the right one.
SVN revision: 41658
2009-08-10 12:38:39 +00:00
Cedric BAIL db0247c644 * edje_recalc: Reduce use of stack.
SVN revision: 41656
2009-08-10 11:52:46 +00:00
Cedric BAIL b1de7da564 * edje: Delay edje_recalc on edje object resize.
WARNING: THIS MAY CAUSE RENDER GLITCH, IF YOU SEE ANYTHING STRANGE
	PLEASE REPORT TO ME.


SVN revision: 41654
2009-08-10 11:33:36 +00:00
Cedric BAIL 0f752e491c * edje: Group configure block together.
SVN revision: 41653
2009-08-10 11:15:38 +00:00
Cedric BAIL 854f360739 * edje: Reduce sizeof (Edje_Calc_Params).
Note: It doesn't really impact edje memory foot print yet. But in
	the plan to do a computation cache inside edje, this structure
	will be used a lot (I am planning to do this feature at some point,
	but no ETA yet, and be reassured it will be optionnal so we can
	choose between CPU load or memory load).

	Note: As I was looking for similar area of improvements,
	Edje_Part_Description could really use an union to reduce it's size,
	but as we load this structure directly from an Eet file, we need
	union in Eet first. And this should be part of a comming Edje file
	format break.



SVN revision: 41652
2009-08-10 09:56:19 +00:00
Christopher Michael 0c64692d4e Patch from Victor <victor.scorpion@gmail.com> to fix typo in
edje_real_part_swallow.

Thanks :)



SVN revision: 41630
2009-08-07 09:06:04 +00:00
Carsten Haitzler 1ea1c629cb back to pre ver's
SVN revision: 41535
2009-07-29 08:19:34 +00:00
Carsten Haitzler 6db38393cd SNAPSHOT: svn-03
SVN revision: 41532
2009-07-29 08:03:25 +00:00
Michael Lauer e1bb8c38ad edje: add first bunch of typedefs for previously anonymous callbacks
SVN revision: 41424
2009-07-18 22:43:50 +00:00
Rafael Antognolli d147af24e3 Created new function edje_edit_image_data_add().
Now it's possible to add an image that is already inside the eet (with a
default key name) to the edje image collection.



SVN revision: 41320
2009-07-13 19:17:35 +00:00
Vincent Torri 84be18a101 typo
SVN revision: 41299
2009-07-11 06:07:11 +00:00
Gustavo Sverzut Barbieri 5959578954 fix minor glitches with edje box.
still missing:
  * box.max
  * proper handling of min/max, need to behave like text.



SVN revision: 41297
2009-07-10 23:13:09 +00:00
Vincent Torri 390f94bcfd update m4 macros (mainly formatting)
SVN revision: 41212
2009-06-27 06:42:14 +00:00
Carsten Haitzler 02fef22de9 move adding of events if entry only if entry part exists.
SVN revision: 41103
2009-06-18 14:01:26 +00:00
Cedric BAIL b405fecf1e * edje: Remove last set of Evas_Hash, and move to Eina_Bool.
SVN revision: 41068
2009-06-17 11:10:32 +00:00
Carsten Haitzler 9394f73104 back to svn soname
SVN revision: 41042
2009-06-15 06:29:43 +00:00
Carsten Haitzler e81db0f5a3 make distcheck and... SNAP!
SVN revision: 41039
2009-06-15 05:32:49 +00:00