Commit Graph

141 Commits

Author SHA1 Message Date
Cedric BAIL b49c2411bd * edje: when gradient meet dodo. Yes, they are gone !
SVN revision: 50223
2010-07-13 15:47:19 +00:00
Cedric BAIL e17a4089df * edje: This is the first commit of a rewrite of edje file
internal representation.

	The objectiv is to simplify code, consume less CPU and memory
	without loosing feature. Please report any breakage when you
	see them. It will take a few weeks before we change the file
	layout, during that time the load time may increase.


SVN revision: 49922
2010-06-28 13:56:30 +00:00
Cedric BAIL 83e505b5c6 * edje: Add image set support.
Ease support of Freedesktop multiple size image.

	Sample:
	-------

	images {
		..
	       	set {
			name: "image_name_used";
  			image {
				image: "500x500.png" LOSSY 90;
     				size: 201 201 500 500;
  			}
  			image {
				image: "200x200.png" COMP;
     				size: 51 51 200 200;
  			}
  			image {
				image: "50x50.png" COMP;
     				size: 11 11 50 50;
  			}
  			image {
				image: "10x10.png" COMP;
     				size: 0 0 10 10;
  			}
		}
		..
	}



SVN revision: 49369
2010-06-01 13:31:07 +00:00
Sebastian Dransfeld f2273a3f51 use PATH_MAX to define buffer size
in snprintf on the buffer PATH_MAX is used, so also use it to define
buffer size

SVN revision: 46729
2010-03-01 19:05:37 +00:00
Sebastian Dransfeld ef970dfb10 make clang happy
SVN revision: 45195
2010-01-15 20:01:42 +00:00
Gustavo Sverzut Barbieri a85cc11943 better error reporting for edje_cc.
Instead of saying lots of possibilities that confuse users, check the
correct one and possibly give a hint.



SVN revision: 44669
2009-12-22 23:56:11 +00:00
Cedric BAIL 018a9dad66 * edje: Use Eina_Log.
Patch from Mathieu Taillefumier.


SVN revision: 44655
2009-12-22 13:46:00 +00:00
Carsten Haitzler 4d42a6d2db warnings--
SVN revision: 44306
2009-12-09 05:46:02 +00:00
Gustavo Sverzut Barbieri d40d8d123d edje external support, part 1.
Patch by Fabiano Fidêncio <fidencio@profusion.mobi>



SVN revision: 43927
2009-11-23 15:03:19 +00:00
Vincent Torri 10b4ebc4d4 * fix some warnings
* move variable declarations at the top of the bloc

SVN revision: 43265
2009-10-25 11:40:06 +00:00
Vincent Torri d3f076e73a unused parameters --
SVN revision: 43264
2009-10-25 11:24:55 +00:00
Vincent Torri 3c48d7e6d0 * include config.h in all source files
* declare alloca before the standard headers
 * include Evil.h for the declaration of realpath in edje_cc_prefix.c

SVN revision: 43263
2009-10-25 11:19:12 +00:00
Cedric BAIL 8ea901a753 * edje: Remove some potential bug detected by llvm and gcc.
See: http://local.profusion.mobi:8081/~lfelipe/output-efl/


SVN revision: 42930
2009-10-07 10:55:48 +00:00
Vincent Torri 1029babb26 remove debug
SVN revision: 42057
2009-08-28 05:49:40 +00:00
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
Cedric BAIL 6c7f8ce84c * edje: Remove warning, mainly due to lua merge.
SVN revision: 41838
2009-08-17 11:32:56 +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 6ab6dbca0d * edje: Remove snprintf("%i") for an eina itoa.
NOTE: When you just want to convert from an int to a string,
	better use eina for that.



SVN revision: 39213
2009-02-25 17:08:17 +00:00
Vincent Torri 812f1e185f add alloca declaration
SVN revision: 38977
2009-02-09 06:33:26 +00:00
Iván Briano 7f3dfc66f2 And finally, edje table goes in
SVN revision: 38204
2008-12-18 02:43:20 +00:00
Gustavo Sverzut Barbieri 2f8f874b20 Shut up a bunch of warnings and fix some real errors.
SVN revision: 37954
2008-12-06 03:08:17 +00:00
Iván Briano 0ee4d07727 Edje Box in. Have fun with it.
SVN revision: 37783
2008-11-24 05:15:15 +00:00
Vincent Torri 0d8b00fdeb * move standard header files to source files
* remove gendoc


SVN revision: 37158
2008-10-26 17:18:19 +00:00
Cedric BAIL fa66dbf40a Remove Evas list from Edje and use Eina instead.
SVN revision: 36961
2008-10-22 11:34:42 +00:00
Caio Marcelo de Oliveira Filho 0d378996c8 edje_cc_out.c: Create an error_and_abort() function and use it.
SVN revision: 35596
2008-08-21 03:58:11 +00:00
Caio Marcelo de Oliveira Filho 5d229801fd edje_cc_out.c: Splitting data_write_scripts() in smaller pieces.
Now we have one function for creating the script file and another for
compiling it.  Also tried to avoid lots of nesting by checking for
error conditions early and returning (or aborting).  Avoided messing
with the code logic.

SVN revision: 35595
2008-08-21 03:57:56 +00:00
Caio Marcelo de Oliveira Filho e2d17e6ddf edje_cc_out.c: Removing unused function declaration and definition.
SVN revision: 35594
2008-08-21 03:57:39 +00:00
Caio Marcelo de Oliveira Filho f2a0a0f216 edje_cc_out.c: Split data_write() in a bunch of smaller functions.
Just moved the code pieces from data_write(), which was huge, to
static functions.  Also made minor cleanups, initializing variables
during declaration.

SVN revision: 35593
2008-08-21 03:57:20 +00:00
doursse 074765d3aa open files in binary mode, to fix problems on Windows. Fix a constness
SVN revision: 34931
2008-06-28 09:11:48 +00:00
doursse 0cdcab6a5c forget to remove 2 calls
SVN revision: 34762
2008-06-06 18:52:19 +00:00
doursse 82fee3d58c evilize edje. Link against ecore_file only when needed. PATH_MAX and not MAX_PATH. Minor other fixes.
SVN revision: 34761
2008-06-06 18:31:49 +00:00
Carsten Haitzler 0afa61a56a santiago's embryo swallow patchs.
SVN revision: 34249
2008-04-11 23:36:35 +00:00
doursse 5b257881d7 update win32 port : use correct temp dir value and correct open function according to the compiler
SVN revision: 32882
2007-11-25 16:22:58 +00:00
Sebastian Dransfeld 5b85440817 Don't segfault on empty file.
SVN revision: 31721
2007-09-15 08:46:34 +00:00
doursse 2e7692e45e make edje binaries compile and allow the creation of the edje shared lib on windows. Remove some trailing spaces
SVN revision: 31517
2007-08-26 12:54:51 +00:00
Carsten Haitzler 902b6c40bb formattign and allocs...
SVN revision: 30925
2007-07-21 05:06:39 +00:00
tilman 731a6622f9 fixed some const char*/char* confusion.
SVN revision: 29279
2007-03-31 10:33:24 +00:00
Carsten Haitzler 1cfed3e3c0 and actually allow "USER" images (ie don't encode them into the .edj - use an
external path to them)


SVN revision: 27156
2006-11-17 14:47:30 +00:00
rephorm 980a64d58a add group aliases.
use as follows:

group {
  name: "primary_name";
  alias: "another_name";
  alias: "one_more_name";
}

then you can refer to the group by any of these names.


SVN revision: 26546
2006-10-12 05:35:14 +00:00
sebastid 5dc6a1479f filename is const
SVN revision: 24414
2006-08-06 01:35:56 +00:00
rephorm 6f000216b2 don't check spectra if we don't have any... (fix segv)
SVN revision: 24392
2006-08-04 18:40:31 +00:00
rephorm bcd6f83784 add some validation to spectra
SVN revision: 24385
2006-08-04 08:55:05 +00:00
rephorm 8cda88c2e6 Add initial support for edje gradients. See data/src/gradient.edc for an example.
SVN revision: 24361
2006-08-02 10:52:44 +00:00
Carsten Haitzler a06238ce46 edje prefix fixes - oops - was broken
build fixes for exec prefix settings


SVN revision: 23845
2006-07-11 09:43:26 +00:00
Carsten Haitzler f41aec9158 edje is now also prefix aware.
SVN revision: 23821
2006-07-10 18:55:23 +00:00
Christopher Michael 44e09d9e74 Fix typo spotted by odium :)
SVN revision: 21189
2006-03-11 15:34:46 +00:00
rephorm adb75e5097 Require that groups have a name.
SVN revision: 20094
2006-01-29 06:05:16 +00:00
Carsten Haitzler 1f5e929fd1 handle more returns with more info
SVN revision: 19987
2006-01-23 15:13:44 +00:00
Carsten Haitzler 1d9245b3f6 edje no longer needs imlib2.
SVN revision: 18425
2005-11-11 06:49:57 +00:00
tsauerbeck 63b3408040 don't die if embryo_cc brabbles about warnings in the embryo code
SVN revision: 14503
2005-04-29 18:46:41 +00:00
tsauerbeck ef57cf80b3 moved the include directory
SVN revision: 13496
2005-02-24 15:34:43 +00:00
Carsten Haitzler 7a097c0ab9 fixie fixie long time.
SVN revision: 12153
2004-11-09 09:31:08 +00:00
tsauerbeck 2d1c69e129 include collection id in error messages
SVN revision: 11980
2004-10-23 17:58:14 +00:00
tsauerbeck e2feb2dd97 cleaned up edje_cc's sanity checking for parts and programs. image parts need to have valid image attributes now.
SVN revision: 11979
2004-10-23 17:33:27 +00:00
tsauerbeck ea400bc3ff open files properly
SVN revision: 11959
2004-10-22 13:57:49 +00:00
tsauerbeck 4873a7d260 imlib2 is optional for edje_cc now. simplified autofoo
SVN revision: 11927
2004-10-20 18:42:36 +00:00
tsauerbeck 6b6d72b8a6 catch missing targets in STATE_SET programs, for example
SVN revision: 11913
2004-10-19 17:31:18 +00:00
tsauerbeck 63f3874903 better vim modelines for raster code
SVN revision: 11910
2004-10-19 16:50:27 +00:00
tsauerbeck f375a9fe2c New feature: part descriptions can inherit attributes from other descriptions of the same part. All attributes are inherited, except description name and value, of course.
Syntax: inherit, "desc_name" desc_value;


SVN revision: 11908
2004-10-19 16:37:20 +00:00
tsauerbeck 54705c6816 adapted to embryo_cc changes
SVN revision: 11845
2004-10-12 16:58:18 +00:00
tsauerbeck 226bc8ccf3 String concatenation ("foo""bar" -> "foobar") now works when used in arguments to PART/PROGRAM/IMAGE lookups, e.g. PART:"foo""bar" will look up the part id of "foobar".
SVN revision: 11836
2004-10-11 20:48:32 +00:00
Carsten Haitzler 2820c696d4 more compile options.. allow image sot be FORCIBLY rescaled so u can include
like 1/2 or 1/4 res images to make a smaller .eet :)


SVN revision: 11825
2004-10-10 11:58:43 +00:00
Carsten Haitzler f40fa3993e and dont use buf! :)
SVN revision: 11821
2004-10-10 04:29:21 +00:00
Carsten Haitzler e60a541c5a actually... error on any source file not being able to be found, decoded or
written out. images AND fonts. :)


SVN revision: 11820
2004-10-10 04:25:42 +00:00
tsauerbeck 4c702d01dc when a font cannot be loaded (because -fd was omitted, for example), just print a warning instead of an error message. i.e., fonts are treated the same way images are.
SVN revision: 11799
2004-10-09 16:23:29 +00:00
Carsten Haitzler cd39a020b2 1. note all the /* dup */ entries in edje_cc_handlers.c - we now are lenient
and allow image, font, images{} fonts {} programs{} program{} and scropt{}
sections in many mroe places...


SVN revision: 11764
2004-10-06 05:25:03 +00:00
Carsten Haitzler 497c68450d fix fonts in OTHEr states than default! :)
SVN revision: 11545
2004-09-07 14:48:41 +00:00
Carsten Haitzler f56ba99d4d if promoting compression we need to guess a new compression quality... :)
SVN revision: 11497
2004-09-02 02:43:16 +00:00
Carsten Haitzler 153781888e this should make a lot of themers happy.
edje_cc (and edje_recc) now support:

-no-lossy                Do NOT allow images to be lossy
-no-comp                 Do NOT allow images to be lossless compression
-no-raw                  Do NOT allow images to be zero compression
-min-quality VAL         Do NOT allow lossy images with quality > VAL (0-100)
-max-quality VAL         Do NOT allow lossy images with quality < VAL (0-100)

this lest you forcibly make a theme .eet that is full quality with NO
compression of images, or just lossless compression (recommended for
distribution as an "original" .eet) and then make lossy only ones with min
and max quality levels.... so u can make small small small themes by just
giving up quality :)


SVN revision: 11489
2004-09-01 05:41:26 +00:00
rephorm e135951db6 Ok. Completing the commit from last night. Sorry about that (and thanks for cleaning up after me raster). Nothing functional changed between raster's last commit and this, just making things more consistent.
Also, moved a few calloc's to  mem_alloc and strdups to mem_strdup.


SVN revision: 11455
2004-08-31 04:00:14 +00:00
Carsten Haitzler 5b7136d3f8 edje decompiling works now! you can decompile an edje .eet back into source
files (.edc's, fonts and images) and it will even make a handy build/sh to
rebuild the .edc into the original .eet again! :)

NB: only works on .et's created with this edje_cc or newer as i needed to
incpude some extra debug info :)


SVN revision: 11431
2004-08-29 11:03:19 +00:00
tsauerbeck 52a6615758 fixed a potential NULL pointer deref
SVN revision: 11429
2004-08-29 09:40:02 +00:00
Carsten Haitzler f4208aa56c aaaaaaaaaaaah message queue related fix.
SVN revision: 11207
2004-08-12 18:55:45 +00:00
Carsten Haitzler 6643d99647 aaaaaaah #'s form cpp in embryo verbatim snippets - strip them.
SVN revision: 9951
2004-04-28 03:31:06 +00:00
Carsten Haitzler 36862709f6 abort edje_cc compile if embryo is not happy
SVN revision: 9892
2004-04-25 04:24:56 +00:00
Carsten Haitzler ec680ae695 embryo_cc line numebrs match up with edje .edc ones now - much better foir
debugging


SVN revision: 9891
2004-04-25 04:20:58 +00:00
Carsten Haitzler d9d7b969dd cleaner...
SVN revision: 9550
2004-04-01 09:53:11 +00:00
Carsten Haitzler 39bb581573 string replacement with ID's in edje_cc for verbatim code snippets... see
example


SVN revision: 9548
2004-04-01 09:30:45 +00:00
Carsten Haitzler 7bd60e9cb0 busy adding some MEAT to edje's embryo script support. just added
"persistent" variables - ie tied to each instance of an edje object and you
can save/load via get_int() set_int() get_float() set_float(), get_str(),
get_strlen() and set_str(). the values are fetched/stored wherever you do
these calls. you need a public variable declaration to indicate you want to
use a global var, and use this variable handle as the variable index - edje
will init it for you.

e_logo.edc has some examples...
:)

this solves being able to keep state like if a check button is enabled or
disabled etc. etc. etc.
then i guess its onto the rest of the calls...


SVN revision: 9526
2004-03-30 10:30:35 +00:00
Carsten Haitzler 3821f74e99 and.... edje_cc can take small code snippets in script{} areas and compile
them, include them int eh edje.eet and edje can run them. all i have to do
now is actually give the small scripts an api worht talking about


SVN revision: 9514
2004-03-28 05:26:17 +00:00
Carsten Haitzler 59a6f2c4b0 embryo support... started. :)
SVN revision: 9487
2004-03-26 09:10:05 +00:00
tsauerbeck b2d118fbce don't segfault on a missing default description
SVN revision: 9242
2004-03-06 10:21:15 +00:00
Carsten Haitzler a9cfdc0688 support for inlining ttf's in edje's so you can ship your fonts along too! :)
SVN revision: 8624
2004-01-23 02:13:42 +00:00
Carsten Haitzler 1bb9260fea remove lots of warnings
SVN revision: 7662
2003-10-19 02:11:06 +00:00
Carsten Haitzler 6c7ac065bc yaya! edje_cc total output statistics :)
SVN revision: 7131
2003-07-11 01:47:42 +00:00
Carsten Haitzler 1b587fd598 work has been done while i've been away. i just need to put this in cvs. many
fixem's have been fixed. text parts work fully now, ALONG with all their
respective effect modes, fits, alignments and "chopping". a few more api
calls have been added and cleaned up. you'll need to update eet too for this
to work.


SVN revision: 7113
2003-07-07 07:55:18 +00:00
Carsten Haitzler 8cb638f08f the edje test program displays an edje .eet file now! build it all then:
cd data
./e_logo.sh
cd ..
./src/bin/edje

you can resize the window to watch the edje "bit" resize. this is just held
togetehr with sitckytape right now... its not done right.. it's only a
bootstrap - but it works. it needs to be cleaned up. definitely. will be
working on that.


SVN revision: 7041
2003-06-17 08:15:06 +00:00
Carsten Haitzler 0d2194a7b5 edje_cc can now fully parse my test edje input "test.edc" file and build a
properly formed test.eet output file including inlined images, data structs
and all. it can display verbose output infomration if you use the -v flag.
the only problem now is that no sample .edc files are shipped. I'll make one
or 2 better ones and include them.


SVN revision: 7033
2003-06-16 13:55:13 +00:00
Carsten Haitzler 5d7c4d02e0 we parse.... MORE! :) order is now irrelevant of how you delcare images or
parts and what they are relative to/use. the lookups are put off until just
before write-out. order of parts still is the stacking order though.


SVN revision: 7020
2003-06-14 03:06:36 +00:00
Carsten Haitzler 598dd0b60f mem allocs guaranteed now... they are wrapped and errors handled centrally
SVN revision: 7018
2003-06-12 22:34:51 +00:00
Carsten Haitzler 61586a277f spread edje_cc code out a little... it's goign to get big now. put parse
result handlers in one place.


SVN revision: 7011
2003-06-11 13:20:48 +00:00