From 01cbd1f5849f3a6afdf9550b85bd271d60b876cf Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Wed, 18 Sep 2013 22:11:17 +0900 Subject: Update script engine init ABI Give the current scale factor to the script engine Change-Id: I51fbc2c4db3a18e68c45e6beb9c2a17e8487f39a --- packaging/data-provider-master.spec | 2 +- src/conf.c | 1 + src/script_handler.c | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packaging/data-provider-master.spec b/packaging/data-provider-master.spec index 7111562..fe2df9f 100644 --- a/packaging/data-provider-master.spec +++ b/packaging/data-provider-master.spec @@ -1,6 +1,6 @@ Name: data-provider-master Summary: Master service provider for liveboxes. -Version: 0.25.13 +Version: 0.25.14 Release: 1 Group: HomeTF/Livebox License: Flora License diff --git a/src/conf.c b/src/conf.c index e572d85..ba04f34 100644 --- a/src/conf.c +++ b/src/conf.c @@ -77,6 +77,7 @@ HAPI struct conf g_conf; HAPI void conf_update_size(void) { ecore_x_window_size_get(0, &g_conf.width, &g_conf.height); + g_conf.scale_width_factor = (double)g_conf.width / (double)BASE_W; g_conf.scale_height_factor = (double)g_conf.height / (double)BASE_H; } diff --git a/src/script_handler.c b/src/script_handler.c index badcdbb..13eec96 100644 --- a/src/script_handler.c +++ b/src/script_handler.c @@ -87,7 +87,7 @@ struct script_port { int (*load)(void *handle, Evas *e, int w, int h); int (*unload)(void *handle, Evas *e); - int (*init)(void); + int (*init)(double scale); int (*fini)(void); }; @@ -112,6 +112,8 @@ struct block { char *target_id; int target_len; + + int (*handler)(struct inst_info *inst, struct block *block, int is_pd); }; struct script_info { @@ -275,7 +277,7 @@ static int load_all_ports(void) goto errout; } - if (item->init() < 0) { + if (item->init(SCALE_WIDTH_FACTOR) < 0) { ErrPrint("Failed to initialize script engine\n"); goto errout; } -- cgit v1.2.3