new program action PARAM_SET, complements PARAM_COPY.
authorbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 31 Mar 2010 20:48:51 +0000 (20:48 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 31 Mar 2010 20:48:51 +0000 (20:48 +0000)
commitd59aa40e854b52926b500345cea3e9c8404997fa
tree9093c8fb7fcefa89844554b6aac4d0448b7953e6
parente57b1c4f269e6330ba52164c7e1d70d98bf6cbec
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!";
               }
            }
         }
      }
   }

}}}

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@47635 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
src/bin/edje_cc_handlers.c
src/lib/Edje.h
src/lib/edje_program.c