Update script engine init ABI
authorSung-jae Park <nicesj.park@samsung.com>
Wed, 18 Sep 2013 13:11:17 +0000 (22:11 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Wed, 18 Sep 2013 13:11:17 +0000 (22:11 +0900)
Give the current scale factor to the script engine

Change-Id: I51fbc2c4db3a18e68c45e6beb9c2a17e8487f39a

packaging/data-provider-master.spec
src/conf.c
src/script_handler.c

index 7111562..fe2df9f 100644 (file)
@@ -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
index e572d85..ba04f34 100644 (file)
@@ -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;
 }
index badcdbb..13eec96 100644 (file)
@@ -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;
                }