Commit Graph

955 Commits

Author SHA1 Message Date
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 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
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
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 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
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
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 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 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
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
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
Sebastian Dransfeld 5847c6f245 string_remove -> string_steal
Better naming

SVN revision: 46028
2010-02-09 21:06:27 +00:00
Sebastian Dransfeld c4ac21cc74 Use eina_strbuf_reset to reduce realloc
SVN revision: 45953
2010-02-06 21:43:32 +00:00
Sebastian Dransfeld fc5f097b7e internal strbuf -> eina_strbuf
SVN revision: 45951
2010-02-06 21:43:12 +00:00
Sebastian Dransfeld b7e2624123 internal strbuf -> eina_strbuf
SVN revision: 45948
2010-02-06 21:42:37 +00:00
Gustavo Lima Chaves f61a15fba9 Group-level data edc blocks manipulation API for Edje_Edit.
SVN revision: 45903
2010-02-05 16:39:06 +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
Sebastian Dransfeld 79b1c3728a Ecore_Str.h -> Eina
SVN revision: 45748
2010-01-30 22:29:31 +00:00
Iván Briano e3554033a7 Edje_Edit API break.
Change group_del() to receive the name of the group to be deleted, and
change the function to not delete a group currently loaded. This causes
problems at the time of deleting the Evas_Object.
Also changed a bit the save() function and added save_all(), which saves
every group loaded, not only the one set to the object. This is mainly so
at the time of deleting a group, we can save the whole file and thus avoid
it getting out of sync with references if a group is deleted and the file
not saved afterwards.


SVN revision: 45720
2010-01-29 20:44:34 +00:00
Iván Briano dbba97152d Don't allow recursive clipping
SVN revision: 45672
2010-01-28 20:44:03 +00:00
Tiago Rezende Campos Falcao b4e731abf7 Removing "GENERATE EDC SOURCE" print
SVN revision: 45659
2010-01-28 11:20:14 +00:00
Tiago Rezende Campos Falcao 4a34a3dd77 Fix group add references
SVN revision: 45647
2010-01-27 20:43:44 +00:00
Iván Briano 54c7294476 Move variable declarations to the top of the function and don't leak when saving files.
SVN revision: 45640
2010-01-27 20:10:57 +00:00
Boris Faure 93dc9bb769 edje: remove useless code (Composing is done in xlib, in ecore_x, you need
to compile ecore with --enable-xim)

SVN revision: 45605
2010-01-26 22:34:52 +00:00
Cedric BAIL c92d5e37f9 * edje: Fix amalgamation without Ecore_Job.
SVN revision: 45597
2010-01-26 18:25:00 +00:00
Cedric BAIL 44193541f7 * ecore: Move ecore_job inside ecore.
Patch from Albin "Lutin" Tonnerre <albin.tonnerre@gmail.com>.


SVN revision: 45570
2010-01-25 21:59:21 +00:00
Tiago Rezende Campos Falcao 0e0534c564 Adding Module Name to Externals
SVN revision: 45565
2010-01-25 20:30:02 +00:00
Iván Briano 5e3f56bafc Avoid crashing if there was no clipper set.
Oh, and the two exciting icon patches were by Fabiano Fidencio


SVN revision: 45453
2010-01-22 20:21:46 +00:00
Vincent Torri 6304974ff4 * fix a warning in an error message
* make some private functions as static
patch by Albin Tonnerre


SVN revision: 45429
2010-01-22 06:42:25 +00:00
Carsten Haitzler f5fe48fe5d fix from jihoon!
SVN revision: 45425
2010-01-22 04:39:50 +00:00
Sebastian Dransfeld 7c3f53b364 value can't be < 0 and > 255 at the same time
SVN revision: 45380
2010-01-21 08:08:02 +00:00
Gustavo Lima Chaves 2cca9e9b62 Fixing program addition on edje_edit: data was missing for the globs.
On regressions, please contact me.



SVN revision: 45340
2010-01-19 20:14:14 +00:00
Sebastian Dransfeld 3a0af1226e make clang happy
SVN revision: 45194
2010-01-15 19:57:17 +00:00
Vincent Torri d1632dfd52 use HUGE_VAL instead of a strange double/float numerical value
do I have to add -lm to Libs in edje.pc ?


SVN revision: 45119
2010-01-14 19:47:08 +00:00
Iván Briano ad2988b7fd Bunch of functions changed to return Eina_Bool.
More of this can be done, and some may even be too much, but I'm losing
perspective over it and either I'm inclined to move all of them or none
at all.
Reviews, comment, fixes and reverts are welcome.



SVN revision: 45115
2010-01-14 18:07:24 +00:00
Cedric BAIL 0d6cb5f95e * edje: Fix edje drag with fixed point enabled.
SVN revision: 45060
2010-01-12 15:37:39 +00:00
Carsten Haitzler 85bef8469a patch from sehwan@samsung.com for small issues in evas/edje
SVN revision: 45056
2010-01-12 01:50:00 +00:00