summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2014-03-24 10:58:48 -0400
committerMike Blumenkrantz <zmike@samsung.com>2014-03-24 10:58:48 -0400
commit8d30e71e8bc60f6ff4e090a85980430f5577d987 (patch)
tree036caa8fb76023f0600ded7924f7407c2962acf0 /src
parent4cfff903c267882b61ebc0156378a8eca63c1fc8 (diff)
edje_cc prevents sequence users from failing to sequence
Diffstat (limited to 'src')
-rw-r--r--src/bin/edje/edje_cc_handlers.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index ccf8928..2702103 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -9122,6 +9122,15 @@ st_collections_group_parts_part_description_params_choice(void)
9122} 9122}
9123 9123
9124static void 9124static void
9125_program_sequence_check(void)
9126{
9127 if (sequencing != current_program) return;
9128 ERR("parse error %s:%i. cannot set sequence parent program attributes within sequence block",
9129 file_in, line - 1);
9130 exit(-1);
9131}
9132
9133static void
9125_program_after(const char *name) 9134_program_after(const char *name)
9126{ 9135{
9127 Edje_Part_Collection *pc; 9136 Edje_Part_Collection *pc;
@@ -9245,6 +9254,8 @@ st_collections_group_programs_program_name(void)
9245 9254
9246 check_arg_count(1); 9255 check_arg_count(1);
9247 9256
9257 _program_sequence_check();
9258
9248 pc = eina_list_data_get(eina_list_last(edje_collections)); 9259 pc = eina_list_data_get(eina_list_last(edje_collections));
9249 if (current_program->name) free((void *)current_program->name); 9260 if (current_program->name) free((void *)current_program->name);
9250 current_program->name = parse_str(0); 9261 current_program->name = parse_str(0);
@@ -9281,6 +9292,8 @@ st_collections_group_programs_program_signal(void)
9281 9292
9282 check_arg_count(1); 9293 check_arg_count(1);
9283 9294
9295 _program_sequence_check();
9296
9284 pc = eina_list_data_get(eina_list_last(edje_collections)); 9297 pc = eina_list_data_get(eina_list_last(edje_collections));
9285 9298
9286 _edje_program_remove(pc, current_program); 9299 _edje_program_remove(pc, current_program);
@@ -9307,6 +9320,8 @@ st_collections_group_programs_program_source(void)
9307 9320
9308 check_arg_count(1); 9321 check_arg_count(1);
9309 9322
9323 _program_sequence_check();
9324
9310 pc = eina_list_data_get(eina_list_last(edje_collections)); 9325 pc = eina_list_data_get(eina_list_last(edje_collections));
9311 9326
9312 _edje_program_remove(pc, current_program); 9327 _edje_program_remove(pc, current_program);
@@ -9331,6 +9346,8 @@ st_collections_group_programs_program_filter(void)
9331{ 9346{
9332 check_min_arg_count(1); 9347 check_min_arg_count(1);
9333 9348
9349 _program_sequence_check();
9350
9334 if(is_param(1)) { 9351 if(is_param(1)) {
9335 current_program->filter.part = parse_str(0); 9352 current_program->filter.part = parse_str(0);
9336 current_program->filter.state = parse_str(1); 9353 current_program->filter.state = parse_str(1);
@@ -9355,6 +9372,8 @@ st_collections_group_programs_program_in(void)
9355{ 9372{
9356 check_arg_count(2); 9373 check_arg_count(2);
9357 9374
9375 _program_sequence_check();
9376
9358 current_program->in.from = parse_float_range(0, 0.0, 999999999.0); 9377 current_program->in.from = parse_float_range(0, 0.0, 999999999.0);
9359 current_program->in.range = parse_float_range(1, 0.0, 999999999.0); 9378 current_program->in.range = parse_float_range(1, 0.0, 999999999.0);
9360} 9379}
@@ -9654,6 +9673,8 @@ st_collections_group_programs_program_transition(void)
9654{ 9673{
9655 check_min_arg_count(2); 9674 check_min_arg_count(2);
9656 9675
9676 _program_sequence_check();
9677
9657 current_program->tween.mode = parse_enum(0, 9678 current_program->tween.mode = parse_enum(0,
9658 // short names 9679 // short names
9659 "LIN", EDJE_TWEEN_MODE_LINEAR, 9680 "LIN", EDJE_TWEEN_MODE_LINEAR,
@@ -9824,6 +9845,8 @@ st_collections_group_programs_program_target(void)
9824{ 9845{
9825 check_arg_count(1); 9846 check_arg_count(1);
9826 9847
9848 _program_sequence_check();
9849
9827 _program_target_add(parse_str(0)); 9850 _program_target_add(parse_str(0));
9828} 9851}
9829 9852
@@ -9845,6 +9868,10 @@ st_collections_group_programs_program_targets(void)
9845{ 9868{
9846 int n, argc; 9869 int n, argc;
9847 9870
9871 check_min_arg_count(1);
9872
9873 _program_sequence_check();
9874
9848 for (n = 0, argc = get_arg_count(); n < argc; n++) 9875 for (n = 0, argc = get_arg_count(); n < argc; n++)
9849 _program_target_add(parse_str(n)); 9876 _program_target_add(parse_str(n));
9850} 9877}
@@ -9867,6 +9894,7 @@ st_collections_group_programs_program_after(void)
9867 char *name; 9894 char *name;
9868 9895
9869 check_arg_count(1); 9896 check_arg_count(1);
9897 _program_sequence_check();
9870 name = parse_str(0); 9898 name = parse_str(0);
9871 _program_after(name); 9899 _program_after(name);
9872 free(name); 9900 free(name);
@@ -9890,6 +9918,8 @@ st_collections_group_programs_program_api(void)
9890{ 9918{
9891 check_min_arg_count(1); 9919 check_min_arg_count(1);
9892 9920
9921 _program_sequence_check();
9922
9893 current_program->api.name = parse_str(0); 9923 current_program->api.name = parse_str(0);
9894 9924
9895 if (is_param(1)) 9925 if (is_param(1))
@@ -9975,6 +10005,8 @@ ob_collections_group_programs_program_script(void)
9975 Edje_Part_Collection *pc; 10005 Edje_Part_Collection *pc;
9976 Code *cd; 10006 Code *cd;
9977 10007
10008 _program_sequence_check();
10009
9978 pc = eina_list_data_get(eina_list_last(edje_collections)); 10010 pc = eina_list_data_get(eina_list_last(edje_collections));
9979 cd = eina_list_data_get(eina_list_last(codes)); 10011 cd = eina_list_data_get(eina_list_last(codes));
9980 10012