Commit Graph

79 Commits

Author SHA1 Message Date
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
Gustavo Sverzut Barbieri 71d603c360 new program action PARAM_COPY, awesome crazy stuff! :-)
Edje got a new program action called PARAM_COPY in the form:

   action: PARAM_COPY "src_part" "src_param" "dst_part" "dst_param";

This will copy the parameter "src_param" from part "src_part" to
parameter "dst_param" of part "dst_part".

So far so good, why the "crazy" in the first line? Because this also:
  * do type conversion!
  * set properties of native parts, not just EXTERNAL!

The type conversion allows one to get an integer and display that in a
text property, or get an string and convert into a float.

The set of native parts is quite simple, basically a map of Edje.h
edje_object_part_*_set(). With that one can set the string to be used
by a TEXT, or set drag page/step/size/value! (page/step increments are
not supported at the moment, if it is worth, they may be supported in
future).

Sample EDC:

{{{

  // test.edc, compile with edje_cc and run with edje_player

   externals {
      external: "elm";
   }
   collections {
      group { name: "main";
         parts {
            part { name: "bg"; type: RECT;
               description { state: "default" 0.0;
                  color: 255 255 255 255;
               }
            }
            part { name: "entry"; type: EXTERNAL;
               source: "elm/scrolled_entry";
               description { state: "default" 0.0;
                  rel2.relative: 1.0 0.5;
               }
            }
            part { name: "display"; type: TEXT;
               description { state: "default" 0.0;
                  color: 0 128 0 255;
                  rel1.relative: 0.0 0.5;
                  text { font: "Sans"; size: 16; }
               }
            }
            programs {
               program {
                  signal: "changed";
                  source: "entry";
                  action: PARAM_COPY "entry" "text" "display" "text";
               }
            }
         }
      }
   }

}}}



SVN revision: 47500
2010-03-27 01:26:10 +00:00
Cedric BAIL fc20b4541e * edje: Use fixed point for tween too.
SVN revision: 46429
2010-02-24 15:37:16 +00:00
Carsten Haitzler a952803f13 aaaah missing map smooth and alpha flags.
SVN revision: 46383
2010-02-23 05:45:24 +00:00
Carsten Haitzler e89c590b0d add border_scale option for images - image border will scale based on edje
scale factors. this is independant of scale: per part.



SVN revision: 46341
2010-02-21 06:53:44 +00:00
Cedric BAIL e4ee012951 * edje: Change filter_state to filter and give the possibility to
filter from another part than the event source.



SVN revision: 46316
2010-02-19 18:30:46 +00:00
Carsten Haitzler e2bc27fb44 interp properly and make perspective api work.. untested yet...
SVN revision: 46302
2010-02-19 06:28:03 +00:00
Carsten Haitzler 3c71b10522 add back face cull option.
SVN revision: 46217
2010-02-16 16:36:16 +00:00
Carsten Haitzler bf293931a1 map support in edje - first cut, missing features like back-face culling.
also no dependency tracking etc. etc.



SVN revision: 46216
2010-02-16 16:20:15 +00:00
Cedric BAIL 397b718cf1 * edje: Add filter_state to program.
Patch from "Tristan <blunderer@gmail.com>".


SVN revision: 46048
2010-02-10 15:07:17 +00:00
Tiago Rezende Campos Falcao 2ab186175e Save font filename in eet. By Masaki
Author:    Thiago Ribeiro Masaki <masaki at profusion.mobi>

SVN revision: 45869
2010-02-04 14:34:06 +00:00
Iván Briano 953835bad8 Add 'api' keyword to parts and programs.
Not used yet, stay tuned.

Patch by Thiago Masaki


SVN revision: 44912
2010-01-05 19:26:18 +00:00
Cedric BAIL b32c9a3eae * edje: Add Fixed Point Math support to Edje.
You can try it by passing --enable-fixed-point to the configure. It
	will produce an ABI/API compatible Edje library that use internally
	Eina_F32p32 instead of double. It will load Eina_F32p32 instead of
	double from eet file (thanks to eet ability to convert them on the
	fly), so edje file are compatible between fixed point and floating
	point version.

	This patch touch almost all internal calc of Edje, I did test it with
	elementary_test, enlightenment and all my test apps, but it could
	certainly break some of your preferred Edje file. If you see any
	unexpected behaviour please report them to me as soon as possible.

	Note: For devs, I put few macros in edje_private.h that should now
	be used when doing calc in Edje, please use them so that Fixed Point
	doesn't break in the futur.


SVN revision: 44323
2009-12-09 15:44:54 +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
Iván Briano 22952844c4 and bring external back now that the file was added
SVN revision: 43306
2009-10-27 01:08:19 +00:00
Carsten Haitzler d3fd0c30cb REVERT! broke edje.
try again and dont forget to add edje_external.c! (and any others needing
adding)



SVN revision: 43304
2009-10-27 00:27:50 +00:00
Iván Briano 68756f92b2 External objects support by Brian 'rephorm' Mattern
Since we are on a freeze, the patch goes on updated to current svn, but without changing its API. After the freeze some things will be added, and some will change :)


SVN revision: 43302
2009-10-26 21:33:56 +00:00
Vincent Torri 1c7fa1c81b rename _edje_edd_setup() and _edje_edd_free() to respectively
_edje_edd_init() and _edje_edd_shutdown() to follow standard
naming convention


SVN revision: 42978
2009-10-09 05:17:19 +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 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
Carsten Haitzler 2afadb527b working on edje entry to allow more selection controls. not 100% done yet.
SVN revision: 39578
2009-03-19 13:36:10 +00:00
Viktor Kojouharov 0a544a09d3 'box.min' for the edje box
SVN revision: 39298
2009-02-28 19:38:35 +00:00
Iván Briano 7f3dfc66f2 And finally, edje table goes in
SVN revision: 38204
2008-12-18 02:43:20 +00:00
Cedric BAIL e33474c92f Move to eina_hash. Nothing should break, but if you experience any unexpected behaviour
please ping me on #edevelop.



SVN revision: 38183
2008-12-17 14:26:47 +00:00
Iván Briano 0ee4d07727 Edje Box in. Have fun with it.
SVN revision: 37783
2008-11-24 05:15:15 +00:00
Carsten Haitzler 48f89d316a support repch - replacement char for passowrd mode. theme defines it now.
SVN revision: 37013
2008-10-23 05:38:06 +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
Carsten Haitzler 7428272b25 and support anchors now. fix up other nigglies. very solid now.
SVN revision: 36741
2008-10-17 06:40:46 +00:00
Cedric BAIL b489e1936b Switch evas_stringshare to eina_stringshare.
SVN revision: 36672
2008-10-15 14:11:11 +00:00
Carsten Haitzler ce0d40cae7 editable textblocks... a start (definitely not there yet)
SVN revision: 36611
2008-10-13 09:19:04 +00:00
Carsten Haitzler 23e2c9e035 support an edje scaling factor. parts can selectively say "yes.. scale me!"
:)... this allows e etc. to adapt to massivelyt different dpi screens with
slickness that even svg can't get to... why? you scale just what NEEDS
scaling (text, button sizes, and other limiting elements). other bits like
borders, padding etc. can remain pixel-perfect and thus the look is amazing.
pixel-perfect drawing with scalable adapting.



SVN revision: 35895
2008-09-09 14:13:34 +00:00
Gustavo Sverzut Barbieri dbe1ac5aca Fix warnings about Edje's usage of Eet_Data_Descriptor_Class.
Couple of casts to shut up gcc.


SVN revision: 35484
2008-08-14 18:10:26 +00:00
doursse c5623c01b3 reorganize header files inclusion. Fix some problems when compiling on Windows
SVN revision: 34768
2008-06-07 10:06:14 +00:00
Carsten Haitzler 15cd1238db start some serious work on script_only edje objects - for efficiency sake i'm
having an almost parallel codepath for script_only objects - they dont get to
use the older edje api calls for part defined objects. they will have a new
set of calls specifically for them. it's partly done - very little available
now, but will expand. lots of fixme's.


SVN revision: 34699
2008-05-30 11:20:49 +00:00
Carsten Haitzler 43821d36e4 * add efreet garbage data check
* remove printfs that clutter output
* add efreet file type check - only parse regular files
* chekc mmap returns correctly for MAP_FAILED results
* edje has some stubs for adding script-only objecvts - but nothing useful
right now


SVN revision: 34689
2008-05-29 02:00:04 +00:00
Caio Marcelo de Oliveira Filho ea56c61eba Edje: adding support for ignore_flags.
Parts can choose to ignore Events with certain flags in event_flags. The default value is
to accept all events. The syntax for this is specifying in the part:

    ignore_flags: ON_HOLD;

I've tried to update Edje_Edit bits also.


SVN revision: 34170
2008-04-01 21:33:17 +00:00
Carsten Haitzler 68a7734f67 disable compression for now on sources - this breaks edje_decc.
we need to resolve the bug where u can't read compressed sources anymore... :/


SVN revision: 33895
2008-03-02 05:39:51 +00:00
Carsten Haitzler e076a78519 cedric's eet and edje patches to use eet dictionaries for strings.
SVN revision: 33873
2008-03-01 06:38:09 +00:00
doursse c63454baea remove trailingspaces
SVN revision: 31656
2007-09-08 18:25:43 +00:00
Gustavo Sverzut Barbieri eda1f13b33 Support for selectable pointer_mode.
Evas now support objects that do not grab mouse down event (NOGRAB) aside
with the default (AUTOGRAB). API is meant to be extensible.


SVN revision: 30950
2007-07-24 14:20:07 +00:00
Carsten Haitzler d6f9cc797e adrunko's precise event patch
SVN revision: 30939
2007-07-23 14:22:57 +00:00
rephorm 982ad090be add cedric bail's fill.type patch.
you can now include "type: TILE;" in the fill block to tile an image part at the size of its image data


SVN revision: 30624
2007-07-06 22:36:40 +00:00
rephorm d4a055585b Add GROUP Parts to edje.
These can be used to automatically swallow in another group from the same file.

Parts within child groups can be referred to by a ':' separated 'full path' of
part names. Any API functions that take a part name will now accept a full path
also.

Signals emitted by child objects will be repeated up to the parents with the
source changed to be the path relative to the receiving object.  E.g in the
example below, a mouse moving over the lower light green rectangle would result
in the parent object recieving a "mouse,move" signal with source "bot:inner".

**** NEW RESTRICTION ****  part names should no longer include a ':' character.
This is not yet enforced by edje_cc, but will cause the part to be inaccessible
from the API.

Example EDC:

collections {
  group {
    name: "parent";
    parts {
      part {
        name: "top";
        type: GROUP;
        source: "child";
        description {
          state: "default" 0.0;
          rel2.relative: 1 0.5;
        }
      }
      part {
        name: "bot";
        type: GROUP;
        source: "child";
        description {
          state: "default" 0.0;
          rel1.relative: 0 0.5;
        }
      }
    }
  }
  group {
    name: "child";
    parts {
      part {
        name: "base";
        type: RECT;
        description {
          state: "default" 0.0;
          color: 160 208 8 255;
        }
      }
      part {
        name: "inner";
        type: RECT;
        description {
          state: "default" 0.0;
          rel1.offset: 10 10;
          rel2.offset: -11 -11;
          color: 210 228 76 255;
        }
      }
    }
  }
}


SVN revision: 30087
2007-05-27 05:28:07 +00:00
Carsten Haitzler 6d5551939d tilman's edje font metrics patch
SVN revision: 29266
2007-03-30 23:39:41 +00:00
Carsten Haitzler 54184c2c37 add max text size for text objects - object wont get bigger than its text
contents. useful for some things.


SVN revision: 26439
2006-10-09 06:01:13 +00:00
rephorm 46b3c5f1a0 add linear gradient specific fill options
used (inside a part description) as follows:

Horizontal from left to right filling entire part:

  gradient {
    spectrum: "black_to_white";
    rel1 {
      relative: 0 0.5;
      offset: 0 0;
    }
    rel2 {
      relative: 1 0.5;
      offset: -1 0;
    }
  }

Diagonal from top left to bottom right:


  gradient {
    spectrum: "black_to_white";
    rel1 {
      relative: 0 0;
      offset: 0 0;
    }
    rel2 {
      relative: 1 1;
      offset: -1 -1;
    }
  }

If either rel1 or rel2 is present in the gradient block of a linear gradient, these will override any angle/origin/size specified in the fill block ('spread' is still honored).


SVN revision: 24975
2006-08-21 03:00:01 +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
Christopher Michael 10308c1133 Patch from drexil to fix a leak in edje_data.c
SVN revision: 23184
2006-06-05 13:11:08 +00:00
codewarrior 31b64ba77a after hours of work, discusisons with rephorm, and raster, I found this!
(13:05) <raster> BAD formie

(=


SVN revision: 20571
2006-02-19 11:14:49 +00:00