From 3061a706c4ca02eb876799da07dae72c24cf4507 Mon Sep 17 00:00:00 2001 From: Tae-Hwan Kim Date: Thu, 20 Mar 2014 13:00:20 +0900 Subject: [PATCH] Add new PLUGIN_RUN action type and new plugins.plugin handlers 1. If external library is commerical source and not opensource, we cannot include/build the library within edje. 2. If external library does not use general encodable sources, we... Summary: ...cannot encode those things into edje. In our case, we need vibration when longpressed. But those files are not audio or image and cannot be encoded into edje. Also, this library is not opensource so should not be linked directly with edje. So we should call vibration API by using this plug-in. Reviewers: raster, cedric, seoz, Hermet CC: cedric Differential Revision: https://phab.enlightenment.org/D588 --- data/edje/include/edje.inc | 1 + src/bin/edje/edje_cc.c | 7 ++ src/bin/edje/edje_cc.h | 1 + src/bin/edje/edje_cc_handlers.c | 158 +++++++++++++++++++++++++++++++- src/bin/edje/edje_cc_out.c | 101 ++++++++++++++++++++ src/bin/edje/edje_decc.c | 43 +++++++++ src/bin/edje/edje_pick.c | 103 ++++++++++++++++++++- src/lib/edje/Edje_Common.h | 3 +- src/lib/edje/edje_data.c | 21 +++++ src/lib/edje/edje_embryo.c | 22 +++++ src/lib/edje/edje_load.c | 16 ++++ src/lib/edje/edje_multisense.c | 13 +++ src/lib/edje/edje_private.h | 19 ++++ src/lib/edje/edje_program.c | 5 + 14 files changed, 509 insertions(+), 4 deletions(-) diff --git a/data/edje/include/edje.inc b/data/edje/include/edje.inc index 828380b830..0d29c0b6df 100644 --- a/data/edje/include/edje.inc +++ b/data/edje/include/edje.inc @@ -237,6 +237,7 @@ native get_state_val(part_id, State_Param:p, ...); /* Multisense */ native play_sample (sample_name[], Float:speed, ...); native play_tone (tone_name[], Float:duration, ...); +native play_vibration (sample_name[], ...); /***********************************************************/ /* Edje physics calls. */ diff --git a/src/bin/edje/edje_cc.c b/src/bin/edje/edje_cc.c index 422ff676fd..5f36270c6a 100644 --- a/src/bin/edje/edje_cc.c +++ b/src/bin/edje/edje_cc.c @@ -13,6 +13,7 @@ static void main_help(void); Eina_Prefix *pfx = NULL; Eina_List *snd_dirs = NULL; +Eina_List *vibration_dirs = NULL; Eina_List *img_dirs = NULL; Eina_List *fnt_dirs = NULL; Eina_List *data_dirs = NULL; @@ -91,6 +92,7 @@ main_help(void) "-id image/directory Add a directory to look in for relative path images\n" "-fd font/directory Add a directory to look in for relative path fonts\n" "-sd sound/directory Add a directory to look in for relative path sounds samples\n" + "-vd vbiration/directory Add a directory to look in for relative path vibration samples\n" "-dd data/directory Add a directory to look in for relative path data.file entries\n" "-td temp/directory Directory to store temporary files\n" "-l license Specify the license of a theme\n" @@ -188,6 +190,11 @@ main(int argc, char **argv) i++; snd_dirs = eina_list_append(snd_dirs, argv[i]); } + else if ((!strcmp(argv[i], "-vd") || !strcmp(argv[i], "--vibration_dir")) && (i < (argc - 1))) + { + i++; + vibration_dirs = eina_list_append(vibration_dirs, argv[i]); + } else if ((!strcmp(argv[i], "-dd") || !strcmp(argv[i], "--data_dir")) && (i < (argc - 1))) { i++; diff --git a/src/bin/edje/edje_cc.h b/src/bin/edje/edje_cc.h index 48bb023976..226c455c26 100644 --- a/src/bin/edje/edje_cc.h +++ b/src/bin/edje/edje_cc.h @@ -222,6 +222,7 @@ extern Eina_List *ext_dirs; extern Eina_List *img_dirs; extern Eina_List *fnt_dirs; extern Eina_List *snd_dirs; +extern Eina_List *vibration_dirs; extern Eina_List *data_dirs; extern char *file_in; extern char *tmp_dir; diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index bdac6d8adf..c1cfa5c97d 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -68,6 +68,10 @@ * + *
  • @ref sec_collections_vibrations "Vibrations"
  • + * *
  • @ref sec_collections_group "Group"
  • *