Commit Graph

1501 Commits

Author SHA1 Message Date
Iván Briano 3c61844af1 Make the Edje Smart inheritable.
Pretty much moving some things around and extending the smart class
to allow overloading some common functions. Edje_Edit will make use
of this.


SVN revision: 47841
2010-04-08 19:21:54 +00:00
Iván Briano 1c53021214 Edje_Edit: Big Fat API Break.
All state functions now receive the value as a double, separate from
the state name.
Getting the list of states from the part still returns a list of strings
with everything together, but we'll change that soon too.


SVN revision: 47811
2010-04-07 17:04:49 +00:00
Tiago Rezende Campos Falcao 209a4ce236 Return FALSE when save fail
SVN revision: 47787
2010-04-06 18:18:53 +00:00
Carsten Haitzler 12012ef38a ok tested - it. new lua disabled for now (not ready). old lua still there.
SVN revision: 47783
2010-04-06 11:32:09 +00:00
Carsten Haitzler 8babebf48e an ongoing lua cleanup. existing lua is there and works for the most part.
but it could be much much much cleaner/better so i started a minimalist redo.
it's temporarily enabled right now. will disable soon to do in the background.



SVN revision: 47782
2010-04-06 11:26:32 +00:00
Tiago Rezende Campos Falcao f824eac7ff _edje_file_hash can't be NULL in open_new
SVN revision: 47763
2010-04-05 14:05:21 +00:00
Carsten Haitzler 77a55c3fd8 aaah well... 1. fix segv with edje_match stuff is deep child cleans up
pattersn - ref them.
2. edje lua... beating it into shape. slowly bit by bit.



SVN revision: 47685
2010-04-02 11:05:53 +00:00
Gustavo Sverzut Barbieri f10ffca9c4 handle cases without default values and add missing functions.
SVN revision: 47640
2010-04-01 03:48:07 +00:00
Gustavo Sverzut Barbieri fdedaedea0 fix stupid bug, my bad at copy and paste...
SVN revision: 47639
2010-04-01 03:47:04 +00:00
Gustavo Sverzut Barbieri 651070fc1d new program action PARAM_SET, complements PARAM_COPY.
Sometimes you want to catch an action like "clicked" from elm/button
or "mouse,clicked,1" from a regular part and want to set a property
like "play" on some object. In this case there is no source property
to copy, so setting the destination makes sense. This was possible
with Embryo, and now it is with regular "program".

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: "button"; type: EXTERNAL;
               source: "elm/button";
               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;
                  rel2.relative: 0.5 1.0;
                  text { font: "Sans"; size: 16; }
               }
            }
            part { name: "entry"; type: EXTERNAL;
               source: "elm/scrolled_entry";
               description { state: "default" 0.0;
                  rel1.relative: 0.5 0.5;
                  params.bool: "editable" 0;
               }
            }
            programs {
               program {
                  signal: "clicked";
                  source: "button";
                  action: PARAM_SET "display" "text" "hello world!";
               }
               program {
                  signal: "clicked";
                  source: "button";
                  action: PARAM_SET "entry" "text" "bla!";
               }
            }
         }
      }
   }

}}}



SVN revision: 47635
2010-03-31 20:48:51 +00:00
Carsten Haitzler 6b60d6d1ee avoid errors - calling more lua calls afre the pcall failed... bad!
SVN revision: 47619
2010-03-31 10:02:51 +00:00
Gustavo Sverzut Barbieri 5f4784e49c call me stupid, need to expose it... not in a good day :-/
SVN revision: 47574
2010-03-30 01:30:51 +00:00
Gustavo Sverzut Barbieri 3d206d92f6 oops, embryo limits names to 31 chars!
SVN revision: 47572
2010-03-30 00:39:14 +00:00
Gustavo Sverzut Barbieri 0b231e99ce Add CHOICES to EXTERNAL support.
Choices are useful to represent enumerations and restricted set of
elements to user. Usually this is displayed in hoversel/comboboxes.



SVN revision: 47570
2010-03-29 21:51:40 +00:00
Gustavo Sverzut Barbieri 1bb3339188 another useful function
SVN revision: 47564
2010-03-29 19:32:45 +00:00
Gustavo Sverzut Barbieri 4981652e8c set ecore_app arguments, edje external will use it to init elm_init()
SVN revision: 47563
2010-03-29 18:45:18 +00:00
Gustavo Sverzut Barbieri acadc5e210 export useful function.
SVN revision: 47562
2010-03-29 18:44:42 +00:00
Iván Briano a5c6fd883d More safety removing stuff from lists
SVN revision: 47554
2010-03-29 07:13:35 +00:00
Iván Briano 202d3765cf Use safe macros to walk the lists when we may remove something from it
SVN revision: 47553
2010-03-29 07:03:36 +00:00
Rui Seabra b5c3618813 New file.
SVN revision: 47535
2010-03-28 18:46:57 +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
Carsten Haitzler 66881b93ee password mode - dont allow selections
SVN revision: 47466
2010-03-26 04:42:39 +00:00
Carsten Haitzler a3281c13be fix markup insert to be the same as normal text entry code - except given
text markup.



SVN revision: 47465
2010-03-26 04:22:30 +00:00
Gustavo Sverzut Barbieri 430d792e27 allow setting parameters from embryo!
SVN revision: 47459
2010-03-25 20:18:24 +00:00
Gustavo Sverzut Barbieri cfecbc912b Edje EXTERNAL API break, for good.
I'm now introducing a couple of goodies to make externals more useful,
they are:

 * add: extra parameter with the part name. This may be used by
   external objects to emit signals in the name of that part.

 * param_set/param_get: set parameters at runtime, given their names
   and types. This avoids requiring users to get the actual object and
   call methods. This abstraction is also good because it let one uses
   Elementary without even linking to it ;-) (this have limits, like
   complex types are not supported).  Right now this is just exposed
   to C, but goal is to have it exposed in Embryo and Lua as well.

 * translate: new method to translate previously strings that are
   specified statically, such as the parameters names.


Four new functions got added to the Edje API:

 * edje_object_part_external_object_get() so we don't have to abuse
   edje_object_part_swallow_get()

 * edje_object_part_external_param_set() and
   edje_object_part_external_param_get() that call the external type's
   functions.

 * edje_external_param_type_str() to convert types to string and
   provide nicer debugs :-)


TODO:
  * expose external_param_set()/external_param_get() to Embryo and Lua.




SVN revision: 47456
2010-03-25 18:05:42 +00:00
Gustavo Sverzut Barbieri 49da44bf6f convert some printfs to eina error.
SVN revision: 47451
2010-03-25 17:30:59 +00:00
Tiago Rezende Campos Falcao ee58900290 Fix wrong names below<->above
SVN revision: 47446
2010-03-25 16:41:46 +00:00
Iván Briano 3f1e51e008 Dirty copy/paste to delete individual targets from a program
SVN revision: 47444
2010-03-25 11:19:46 +00:00
Carsten Haitzler b0af679619 fix entry delete.
SVN revision: 47443
2010-03-25 08:17:51 +00:00
Tiago Rezende Campos Falcao 6556fa5273 above and below get
SVN revision: 47435
2010-03-24 19:21:03 +00:00
Gustavo Sverzut Barbieri 11b1398008 allows basic interaction from automated scripts and signal/message debug.
SVN revision: 47347
2010-03-19 19:04:50 +00:00
Gustavo Sverzut Barbieri 2cdac2a9bd edje_player gets in.
I almost rewrote it to be cleaner and use more modern technologies
such as box and ecore_evas_object_associate.



SVN revision: 47343
2010-03-19 16:19:50 +00:00
Gustavo Sverzut Barbieri 71a3bb5cfe copy edje_player, it will be changed to use Ecore_Getopt and then enabled in compile...
SVN revision: 47341
2010-03-19 13:23:24 +00:00
Vincent Torri d1c0ea07fc force gcc to use C preprocessor (otherwise the file extension (.edc) is
breaking that behavior)


SVN revision: 47338
2010-03-18 22:52:28 +00:00
Vincent Torri a8e1557dbc fix edje_cc on Mac OS X: c++ comments were not removed, so pass
gcc -E on the edc file a second time. As Linux gcc does not like
it, compile that part only on Mac OS X.


SVN revision: 47280
2010-03-16 05:49:13 +00:00
Carsten Haitzler 82fabb0f16 bug--
SVN revision: 47275
2010-03-16 04:10:03 +00:00
Carsten Haitzler 089e7842db bug--
SVN revision: 47267
2010-03-16 00:57:04 +00:00
Carsten Haitzler 9ba5929163 bug--
SVN revision: 47232
2010-03-15 09:45:02 +00:00
Carsten Haitzler e8906368d5 and emit signals on cursor changes etc.
SVN revision: 47231
2010-03-15 03:02:14 +00:00
Carsten Haitzler 6e66ed5a65 more bug --
SVN revision: 47202
2010-03-14 12:24:54 +00:00
Carsten Haitzler 9c495f390d one more end of line cursor issue fixed.
SVN revision: 47175
2010-03-13 13:25:40 +00:00
Carsten Haitzler 557434639e we have printf debugging right now - in the middle of chasing entry issues,
so keeep this in.



SVN revision: 47133
2010-03-11 14:28:44 +00:00
Carsten Haitzler 3492583ed4 also do imf stuff on cursor fiddling api's
SVN revision: 47132
2010-03-11 10:16:32 +00:00
Carsten Haitzler d4d781227e disable the extar newline stuff... seems to be ok without. i'm sure i put it
in for a reason... hrrrm..



SVN revision: 47129
2010-03-11 08:07:55 +00:00
Carsten Haitzler cbde94b4e3 calls for entry users to use.
SVN revision: 47126
2010-03-11 06:34:20 +00:00
Carsten Haitzler c20360eaea aaaah there it is! fix 1 small bug - sel all in edje entry - more there. will
fix.



SVN revision: 47103
2010-03-10 13:32:49 +00:00
Davide Andreoli aad74ff4ca * Document mouse event callback system in LUA
SVN revision: 47063
2010-03-09 00:55:36 +00:00
Davide Andreoli 976ea97214 * Add a new basic lua example: Set part state from LUA. (and a small fix in the doxy)
SVN revision: 47054
2010-03-08 22:25:40 +00:00
Davide Andreoli 707cabbaf9 * More LUA doxy, now all the Classes,Methods and Attributes are documented (...at least listed). Still have some examples and some more info to write.
* fix the use of lua table in the example

SVN revision: 47048
2010-03-08 19:09:15 +00:00
Davide Andreoli 6185b64a11 Put examples in dist package
SVN revision: 46970
2010-03-07 23:10:21 +00:00
Davide Andreoli ea7915a537 Put examples in dist package
SVN revision: 46956
2010-03-07 19:41:41 +00:00
Davide Andreoli 6bd9299cf7 Add the examples/ folder in edje/doc/ and put in the first 2 lua examples
SVN revision: 46955
2010-03-07 19:34:28 +00:00
Davide Andreoli dbd7badb2f * Add a doxy page for LUA scripting in edje documentation, not complete yet, but a good structure
SVN revision: 46954
2010-03-07 18:05:12 +00:00
Viktor Kojouharov 2ae2d6c7bc docu typos
SVN revision: 46952
2010-03-07 15:53:46 +00:00
Viktor Kojouharov 804728fb77 updated vimball with complete syntax and improved completion
SVN revision: 46951
2010-03-07 15:53:02 +00:00
Gustavo Sverzut Barbieri 40a7b9aa38 color class lookup speedups by using stringshare properties.
with stringshare, we can just compare pointers instead of
strcmp. Since we'll need the stringshare later, this is a good
optimization.



SVN revision: 46925
2010-03-07 04:50:12 +00:00
Tiago Rezende Campos Falcao d51e56f5a7 Reverting the previous commit, dont fix properly.
SVN revision: 46894
2010-03-05 18:22:17 +00:00
Gustavo Lima Chaves 2571227fc4 Sorry for assuming o bool return on that function.
Thanks for pointing out, JaMa.



SVN revision: 46893
2010-03-05 17:31:29 +00:00
Tiago Rezende Campos Falcao c9cdddd683 Removing seg fault. By Fidencio
Author:    Fabiano Fidencio <fidencio at profusion.mobi>

SVN revision: 46877
2010-03-04 20:40:59 +00:00
Tiago Rezende Campos Falcao 16b4338a5d Adding edje_object_parts_extends_calc, to calc the geometry used by parts
SVN revision: 46876
2010-03-04 20:40:54 +00:00
Cedric BAIL ae586e291e * edje: Only register callback once for external.
SVN revision: 46868
2010-03-04 14:44:20 +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
Mikhail Gusarov b0b1fa40fa edje: Document several puzzling Edje_External_Type callbacks
SVN revision: 46697
2010-03-01 14:41:49 +00:00
Gustavo Sverzut Barbieri 15ee9e8847 documentation improvements:
- quick access in the huuuuuuuge edcref
 - block name is top-aligned to its example fragment



SVN revision: 46668
2010-02-28 19:25:10 +00:00
Gustavo Sverzut Barbieri cc5e332525 remove warnings from edje binaries.
SVN revision: 46647
2010-02-28 16:14:50 +00:00
Gustavo Sverzut Barbieri fcb71a4b3b Edje now uses Eina_Bool where it should.
SVN revision: 46646
2010-02-28 15:57:17 +00:00
Gustavo Sverzut Barbieri 19a99eecab Edje needs to detect files changed on disk before considering cache.
If file changed on disc (mtime), then make the reference dangling so
it is not reused anymore on subsequent open. If it is in cache, just
free it as it is not useful anymore.

This solves the following problem:


     edje_object_file_set(ed, path, group);
     ecore_file_cp(new_gen_file, path);
     edje_object_file_set(ed, path, group); /* still uses the old one! */


By: Bruno Dilly <bdilly@profusion.mobi>




SVN revision: 46548
2010-02-27 03:47:04 +00:00
Gustavo Sverzut Barbieri 456f222a0f [PATCH2/2] Improve edje documentation.
This reorder couple of functions so the generated documentation makes
sense.

By: Eduardo Felipe < eduardofelipe87@gmail.com>



SVN revision: 46541
2010-02-27 00:25:32 +00:00
Gustavo Sverzut Barbieri 46f0a73003 [PATCH1/2] Improve edje documentation.
This fixes the documentation, but they are still in the wrong order.

By: Eduardo Felipe <eduardofelipe87@gmail.com>


SVN revision: 46540
2010-02-27 00:15:41 +00:00
Gustavo Sverzut Barbieri 6e00c5f84a update docs to say EINA_(TRUE|FALSE)
By: Lucas De Marchi


SVN revision: 46538
2010-02-26 23:59:47 +00:00
Christopher Michael a4571eb6bb Fix FALSE...should be EINA_FALSE.
SVN revision: 46504
2010-02-26 06:01:09 +00:00
Cedric BAIL fc20b4541e * edje: Use fixed point for tween too.
SVN revision: 46429
2010-02-24 15:37:16 +00:00
Cedric BAIL 41b6529e00 * edje: Fix typo preventing creation of multiple edje box layout.
SVN revision: 46425
2010-02-24 14:50:07 +00:00
Carsten Haitzler beb1b3820c oooh that was bad! oops. fix!
SVN revision: 46423
2010-02-24 05:47:23 +00:00
Cedric BAIL 3eaea2b9fa * edje: Fix naming for amalgamation and make static functions
that should.


SVN revision: 46394
2010-02-23 15:55:04 +00:00
Cedric BAIL 51de26862a * edje: Add more focus event in edje. A start for a focus layout work.
SVN revision: 46389
2010-02-23 13:39:19 +00:00
Carsten Haitzler 79b6821f90 fix moving edje obj aroudn with maps in it.
SVN revision: 46385
2010-02-23 08:37:30 +00:00
Carsten Haitzler 1ddbe5c5b1 ahhh and if parts are images.. use the right uv coords.
SVN revision: 46384
2010-02-23 07:56:59 +00:00
Carsten Haitzler a952803f13 aaaah missing map smooth and alpha flags.
SVN revision: 46383
2010-02-23 05:45:24 +00:00
Rui Seabra c8908d3ed4 Adjust for ver-pre-svn support
Add two missing files.


SVN revision: 46348
2010-02-21 18:40:56 +00:00
Carsten Haitzler 3243fb1170 add embryo to manipulate map stuff.
SVN revision: 46343
2010-02-21 10:55:45 +00:00
Carsten Haitzler ea37c003f3 docs++
SVN revision: 46342
2010-02-21 09:39:58 +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 d590d0dbb0 * edje: Fix a warning.
Please review as I am not sure why this code was written as the beginning.


SVN revision: 46318
2010-02-19 18:43:08 +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
Iván Briano 0b816d85e6 Forgot to copy image id
SVN revision: 46273
2010-02-18 14:05:58 +00:00
Gustavo Sverzut Barbieri 1ad4337878 proper shutdown of entries.
* must disconnect connected callbacks, particularly those to
   canvas. The object we previously connect will die anyway, but
   canvas continues alive, dispatching its
   EVAS_CALLBACK_CANVAS_FOCUS_IN and EVAS_CALLBACK_CANVAS_FOCUS_OUT,
   causing nasty segmentation faults!

 * must call _edje_clean_objects() *AFTER* the entry is shut
   down. Otherwise ed->evas will be NULL and
   evas_event_callback_del_full() will fail. I left extra checks on
   those, since this call will return the given data (in our case
   "ed") and NULL when callback connection was not found.

 * flag existence of entries and if they were already initalized and
   shutdown before, avoid redoing such work.

This fixes a stupid crash that bugged editje for a while now.



SVN revision: 46263
2010-02-17 23:43:31 +00:00
Vincent Torri a50bb3acf8 m4 quoting
SVN revision: 46258
2010-02-17 19:50:19 +00:00
Cedric BAIL 06f7da42f9 * edje: Fix fixed point use in map.
Note: ep->description_pos is a FLOAT_T.


SVN revision: 46245
2010-02-17 13:21:50 +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
Iván Briano 4419ccc84d Move to new canvas callbacks signature
SVN revision: 46210
2010-02-16 13:43:44 +00:00
Carsten Haitzler 04ca0cb31e fix freeze/thaw to use less ... cpu.
SVN revision: 46181
2010-02-15 06:40:58 +00:00
Gustavo Lima Chaves 50c346b37a The former test was giving false positives.
SVN revision: 46113
2010-02-12 14:00:31 +00:00
Gustavo Sverzut Barbieri 97ebfc5f2b proper error logging for _edje_lua_error()
ERR() should not be used there, because _edje_lua_error() is already
an error logging function. Instead we should call eina_log_print()
directly, handling the source of the error.



SVN revision: 46058
2010-02-10 20:23:27 +00:00
Gustavo Lima Chaves 62d9d8bc92 Preventing former strdup()-ed string to be eina_string_del()-ted.
SVN revision: 46053
2010-02-10 17:18:34 +00:00
김지훈 66df4d6c61 From: 김지훈 <jihoon48.kim@samsung.com>
This is edje_entry.c patch for supporting to switch the focus of ecore_imf
when the other window is clicked.



SVN revision: 46050
2010-02-10 15:12:35 +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
Boris Faure 44de2046c0 edje: edc property is elipsis and not text_elipsis (update doc + vim syntax file)
SVN revision: 46031
2010-02-09 22:28:07 +00:00