Commit Graph

92 Commits

Author SHA1 Message Date
Cedric BAIL 018a9dad66 * edje: Use Eina_Log.
Patch from Mathieu Taillefumier.


SVN revision: 44655
2009-12-22 13:46:00 +00:00
Sebastian Dransfeld 06cd51c917 Uncomment label along with goto
SVN revision: 43537
2009-11-08 20:26:36 +00:00
Vincent Torri fd17f32a19 * rename _edje_strbuf_append to _edje_strbuf_append1 and
_edje_strbuf_append2 in edje_util.c and edje_textblock_styles.c
   respectiveley (for amalgamation. See next commit)
 * fixes for vc++


SVN revision: 43428
2009-11-03 09:26:15 +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 24211c8331 add declaration of alloca
SVN revision: 43050
2009-10-13 16:54:30 +00:00
Vincent Torri e4bea597c7 Fix documentation
* update Doxyfile file
 * fix end of groups
 * fix some warnings
 * fix link in head.html for Edje API ref


SVN revision: 42794
2009-09-29 06:13:33 +00:00
Iván Briano 4e33c6fd65 Improve documentation for Evas, Ecore, Edje and Elementary.
Work by:
 - Thiago R. Masaki (mostly)
 - Fabiano Fidencio
 - Gustavo Lima


SVN revision: 42552
2009-09-17 22:38:35 +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 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
Gustavo Sverzut Barbieri e09dc2a71c use alloca+memcpy instead of strdupa.
for these guys that insist in using doomed systems like solaris or
bsd, god save them ;-)

Patch by vtorri.


SVN revision: 40491
2009-05-02 23:22:07 +00:00
Gustavo Sverzut Barbieri 022204e09c Allow sending signals to GROUP sub-parts.
Today signals emitted inside GROUP sub-parts are delivered to parent
group as "part-name:original-source". This is good and allow edje
groups to be reused. But no counter part to send events to inside
sub-groups existed.

This patch allows one to send a signal "signal" to inside a part
"part" that is of type GROUP by prepending signal emission with part name:

    emission: "part:signal"
    source: "source"

this is the same as:

   o = edje_object_part_swallow_get(ed);
   edje_object_signal_emit(o, "signal", "source");

but can be done all in themes, no need to go to application c/c++/python.

Based on patch by Pieter, see mail list.


SVN revision: 40489
2009-05-02 20:05:53 +00:00
Carsten Haitzler b3e8f31362 tentative change... it seems in rare conditions some programs end up doubled
and the stop prog doesnt clean out all instances - leaving 1 or more excess
instances to run. this should fix that.



SVN revision: 39827
2009-04-01 09:11:48 +00:00
Chidambar Zinnoury 6b162f8fe0 Useless check as it has already been dome some lines above.
SVN revision: 38967
2009-02-07 15:45:50 +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
Gustavo Sverzut Barbieri 288a77ea18 Hopefully fix some problems with Edje fnmatch and callbacks.
* Fix buffer overflow with EDJE_PROGRAM_CACHE (not tested since I don't use it).
 * break_prog should always unset walking_callbacks and do after-tasks.
 * Fix list walking! ouch!!!



SVN revision: 37944
2008-12-05 22:32:04 +00:00
Carsten Haitzler 38f06f34e8 track subobjs (used by entry only for now) and emit signals to them too
SVN revision: 37688
2008-11-17 05:54:01 +00:00
Gustavo Sverzut Barbieri f53febde32 Edje postponed calculations.
This makes use of new Evas_Smart_Class calculate() callback to
postpone calculations until render time, possible saving lots of
calculations to happen.

It is another try, with Cedric's changes to force recalculations when
requried (ie: just before doing some edje_object_*_get()), let's see
if this one solve found issues.



SVN revision: 37620
2008-11-14 11:06:15 +00:00
Cedric BAIL 25f4acee01 This is a quick fix for edje match memory consuption. It is not the best
solution, but the fastest to implement without breaking edje file format.

So now, when a callback or a program don't use globbing charactere (*, ?,
[] and \), the match are put in a little rbtree instead of the big automate
matrix.

This patch could potentially break edje user, if you experience anything
strange with your edje file, please report.



SVN revision: 37577
2008-11-10 16:37:52 +00:00
Carsten Haitzler 68794e198b also use looptime
SVN revision: 37394
2008-11-02 02:43:43 +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
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 0a0d491cc3 disabel start/stop emits for programs - there is a good point that they are
largely useless.



SVN revision: 36064
2008-09-18 01:48:17 +00:00
Gustavo Sverzut Barbieri fb44db2211 Revert edje_smart_calculate_v4_r2, it breaks e17 shelf resize.
Not ready yet, reverting...



SVN revision: 36031
2008-09-17 01:50:16 +00:00
Gustavo Sverzut Barbieri d044a0245a More svn:ignore
SVN revision: 36026
2008-09-16 19:44:20 +00:00
Cedric BAIL 060f30aa6e Make EDJE_PROGRAM_CACHE configurable with autotools (with small fix for make it run again).
SVN revision: 35942
2008-09-11 11:14:39 +00:00
Gustavo Sverzut Barbieri d428d6ec1d Add some consts to Edje's API.
Some methods do no change object internal state and can be marked as
read only. In parallel have infamous edje_object_part_object_get() to
return a read-only object, so it's even more clear that one should not
touch this object state (either a cast or a compiler warning if you do
that!)


SVN revision: 35485
2008-08-14 18:21:27 +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
Sebastian Dransfeld 00065fd407 Add const
SVN revision: 34011
2008-03-13 06:38:16 +00:00
Gustavo Sverzut Barbieri 9abfa8f70a Cleanup of last patches and revert my patching mistakes.
Last 2 patches were swapped, I applied them in the wrong order and
missed the rejections, my bad.

I fixed it and also did some cleanup, looks better now.


SVN revision: 33855
2008-02-26 20:12:00 +00:00
Gustavo Sverzut Barbieri 30b26c0937 Cleanup for possible memory leak.
Patch by Cedric BAIL.


SVN revision: 33853
2008-02-26 18:41:44 +00:00
Gustavo Sverzut Barbieri 833e075b9a Delay patterns destruction until patterns is not used anymore.
Patch by Cedric BAIL.


SVN revision: 33850
2008-02-26 17:56:51 +00:00
Gustavo Sverzut Barbieri 435dfe2a2a Reduce memory allocation for edje match.
Just allocate and build the match automate for callbacks and programs
only when required. On load for programs and when callbacks list has
been updated.

Patch by Cedric BAIL. (with minor fixes to use TABS where context was using)


SVN revision: 33804
2008-02-21 18:48:36 +00:00
Carsten Haitzler fff9c738a2 did some tests - this seems to be faster and seems to match correctly in some
test cases i brewed up. doesnt seem to break e so far and thats a fairly
comprehensive test.


SVN revision: 33515
2008-01-18 06:34:04 +00:00
doursse 974152be16 remove trailingspaces
SVN revision: 31657
2007-09-08 18:31:56 +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
rephorm 10696fd213 some more docs
SVN revision: 29522
2007-04-15 04:05:41 +00:00
rephorm 418bcfd1d6 fix deleting of signal callbacks with empty strings for signal or source (they're stored internally as NULL's)
SVN revision: 28344
2007-02-13 09:58:49 +00:00
stffrdhrn 46a61a67b7 Edje bug fixes:
* Add some comments
 * Fixup some const char */stringshare related compile warnings
 * Fix text classes


SVN revision: 21392
2006-03-19 04:22:35 +00:00
sebastid 002bc72042 Fix EAPI warnings.
SVN revision: 19595
2006-01-07 08:54:30 +00:00
Carsten Haitzler bd0c83af10 make more use of stringshare and eet alloc methods
SVN revision: 18732
2005-11-30 15:36:34 +00:00
Carsten Haitzler 91eb081dd7 dont dup empty strings :)
SVN revision: 18621
2005-11-23 14:47:36 +00:00
Carsten Haitzler 3a6be732b9 clean up some null string stuff
SVN revision: 18620
2005-11-23 14:00:39 +00:00
Carsten Haitzler 725d212f48 handle NULL strings better - need to handle mroe NULLS though
SVN revision: 18617
2005-11-23 12:56:06 +00:00
tsauerbeck 963f0729c1 don't access freed memory
SVN revision: 17164
2005-10-04 17:54:36 +00:00
Carsten Haitzler a4fc9aa9ba fix typos in edje docs patch from martin :)
SVN revision: 16821
2005-09-21 03:11:31 +00:00