diff options
Diffstat (limited to 'src/script_handler.c')
-rw-r--r-- | src/script_handler.c | 225 |
1 files changed, 113 insertions, 112 deletions
diff --git a/src/script_handler.c b/src/script_handler.c index 0d973f8..da53581 100644 --- a/src/script_handler.c +++ b/src/script_handler.c @@ -32,7 +32,9 @@ #include <dlog.h> #include <packet.h> -#include <livebox-errno.h> +#include <dynamicbox_errno.h> +#include <dynamicbox_service.h> +#include <dynamicbox_conf.h> #include "slave_life.h" #include "slave_rpc.h" @@ -76,10 +78,10 @@ int errno; static struct info { Eina_List *script_port_list; - enum buffer_type env_buf_type; + enum dynamicbox_fb_type env_buf_type; } s_info = { .script_port_list = NULL, - .env_buf_type = BUFFER_TYPE_FILE, + .env_buf_type = DBOX_FB_TYPE_FILE, }; struct script_port { @@ -174,10 +176,10 @@ static int load_all_ports(void) char *path; int pathlen; - dir = opendir(SCRIPT_PORT_PATH); + dir = opendir(DYNAMICBOX_CONF_SCRIPT_PORT_PATH); if (!dir) { ErrPrint("Error: %s\n", strerror(errno)); - return LB_STATUS_ERROR_IO; + return DBOX_STATUS_ERROR_IO_ERROR; } while ((ent = readdir(dir))) { @@ -185,17 +187,17 @@ static int load_all_ports(void) continue; } - pathlen = strlen(ent->d_name) + strlen(SCRIPT_PORT_PATH) + 1; + pathlen = strlen(ent->d_name) + strlen(DYNAMICBOX_CONF_SCRIPT_PORT_PATH) + 1; path = malloc(pathlen); if (!path) { ErrPrint("Heap: %s %d\n", strerror(errno), pathlen); if (closedir(dir) < 0) { ErrPrint("closedir: %s\n", strerror(errno)); } - return LB_STATUS_ERROR_MEMORY; + return DBOX_STATUS_ERROR_OUT_OF_MEMORY; } - snprintf(path, pathlen, "%s%s", SCRIPT_PORT_PATH, ent->d_name); + snprintf(path, pathlen, "%s%s", DYNAMICBOX_CONF_SCRIPT_PORT_PATH, ent->d_name); item = malloc(sizeof(*item)); if (!item) { @@ -204,7 +206,7 @@ static int load_all_ports(void) if (closedir(dir) < 0) { ErrPrint("closedir: %s\n", strerror(errno)); } - return LB_STATUS_ERROR_MEMORY; + return DBOX_STATUS_ERROR_OUT_OF_MEMORY; } DbgPrint("Open SCRIPT PORT: %s\n", path); @@ -216,7 +218,7 @@ static int load_all_ports(void) if (closedir(dir) < 0) { ErrPrint("closedir: %s\n", strerror(errno)); } - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } item->magic_id = dlsym(item->handle, "script_magic_id"); @@ -311,7 +313,7 @@ static int load_all_ports(void) goto errout; } - if (item->init(SCALE_WIDTH_FACTOR, PREMULTIPLIED_COLOR) < 0) { + if (item->init(DYNAMICBOX_CONF_SCALE_WIDTH_FACTOR, DYNAMICBOX_CONF_PREMULTIPLIED_COLOR) < 0) { ErrPrint("Failed to initialize script engine\n"); goto errout; } @@ -323,7 +325,7 @@ static int load_all_ports(void) ErrPrint("closedir: %s\n", strerror(errno)); } - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; errout: ErrPrint("Error: %s\n", dlerror()); @@ -334,7 +336,7 @@ errout: if (closedir(dir) < 0) { ErrPrint("closedir: %s\n", strerror(errno)); } - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } static inline struct script_port *find_port(const char *magic_id) @@ -382,29 +384,29 @@ static int render_post_cb(void *_buffer_handle, void *data) if (instance_state(inst) != INST_ACTIVATED) { ErrPrint("Render post invoked but instance is not activated\n"); PERF_MARK(__func__); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } - info = instance_lb_script(inst); + info = instance_dbox_script(inst); if (info && info == data) { buffer_handler_flush(buffer_handle); - instance_lb_updated_by_instance(inst, NULL); + instance_dbox_updated_by_instance(inst, NULL, info->x, info->y, info->w, info->h); PERF_MARK("lb,update"); - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } - info = instance_pd_script(inst); + info = instance_gbar_script(inst); if (info && info == data) { buffer_handler_flush(buffer_handle); - instance_pd_updated_by_instance(inst, NULL); + instance_gbar_updated_by_instance(inst, NULL, info->x, info->y, info->w, info->h); PERF_MARK("pd,update"); - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } out: ErrPrint("Failed to sync\n"); PERF_MARK(__func__); - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } /*! @@ -422,18 +424,18 @@ EAPI int script_signal_emit(void *buffer_handle, const char *part, const char *s if (!buffer_handle) { ErrPrint("Invalid handle\n"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } info = buffer_handler_data(buffer_handle); if (!info) { ErrPrint("Invalid handle\n"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } inst = buffer_handler_instance(buffer_handle); if (!inst) { - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } if (!signal || strlen(signal) == 0) { @@ -467,7 +469,7 @@ static inline void flushing_cached_block(struct script_info *info) return; } - is_pd = instance_pd_script(inst) == info; + is_pd = instance_gbar_script(inst) == info; EINA_LIST_FREE(info->cached_blocks, block) { consuming_parsed_block(inst, is_pd, block); @@ -480,17 +482,17 @@ HAPI int script_handler_load(struct script_info *info, int is_pd) if (!info || !info->port) { ErrPrint("Script handler is not created\n"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } if (info->loaded > 0) { info->loaded++; - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } if (info->port->load(info->port_data, NULL, render_post_cb, info) < 0) { ErrPrint("Unable to load the script\n"); - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } info->loaded = 1; @@ -499,10 +501,10 @@ HAPI int script_handler_load(struct script_info *info, int is_pd) inst = buffer_handler_instance(info->buffer_handle); if (inst) { script_signal_emit(info->buffer_handle, instance_id(inst), - is_pd ? "pd,show" : "lb,show", 0.0f, 0.0f, 0.0f, 0.0f); + is_pd ? "gbar,show" : "dbox,show", 0.0f, 0.0f, 0.0f, 0.0f); } buffer_handler_flush(info->buffer_handle); - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } HAPI int script_handler_unload(struct script_info *info, int is_pd) @@ -510,30 +512,30 @@ HAPI int script_handler_unload(struct script_info *info, int is_pd) struct inst_info *inst; if (!info || !info->port) { - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } info->loaded--; if (info->loaded > 0) { - return LB_STATUS_ERROR_BUSY; + return DBOX_STATUS_ERROR_BUSY; } if (info->loaded < 0) { info->loaded = 0; - return LB_STATUS_ERROR_ALREADY; + return DBOX_STATUS_ERROR_ALREADY; } inst = buffer_handler_instance(info->buffer_handle); if (inst) { script_signal_emit(info->buffer_handle, instance_id(inst), - is_pd ? "pd,hide" : "lb,hide", 0.0f, 0.0f, 0.0f, 0.0f); + is_pd ? "gbar,hide" : "dbox,hide", 0.0f, 0.0f, 0.0f, 0.0f); } if (info->port->unload(info->port_data) < 0) { ErrPrint("Failed to unload script object. but go ahead\n"); } - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } HAPI struct script_info *script_handler_create(struct inst_info *inst, const char *file, const char *option, int w, int h) @@ -552,7 +554,7 @@ HAPI struct script_info *script_handler_create(struct inst_info *inst, const cha return NULL; } - info->buffer_handle = buffer_handler_create(inst, s_info.env_buf_type, w, h, DEFAULT_PIXELS); + info->buffer_handle = buffer_handler_create(inst, s_info.env_buf_type, w, h, DYNAMICBOX_CONF_DEFAULT_PIXELS); if (!info->buffer_handle) { /* buffer_handler_create will prints some log */ DbgFree(info); @@ -564,7 +566,7 @@ HAPI struct script_info *script_handler_create(struct inst_info *inst, const cha info->port = find_port(package_script(instance_package(inst))); if (!info->port) { ErrPrint("Failed to find a proper port for [%s]%s\n", - instance_package(inst), package_script(instance_package(inst))); + instance_package(inst), package_script(instance_package(inst))); buffer_handler_destroy(info->buffer_handle); DbgFree(info); return NULL; @@ -588,12 +590,12 @@ HAPI int script_handler_destroy(struct script_info *info) if (!info || !info->port) { ErrPrint("port is not valid\n"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } if (info->loaded != 0) { ErrPrint("Script handler is not unloaded\n"); - return LB_STATUS_ERROR_BUSY; + return DBOX_STATUS_ERROR_BUSY; } ret = info->port->destroy(info->port_data); @@ -608,7 +610,7 @@ HAPI int script_handler_destroy(struct script_info *info) } DbgFree(info); - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } HAPI int script_handler_is_loaded(struct script_info *info) @@ -635,20 +637,20 @@ static int update_script_color(struct inst_info *inst, struct block *block, int if (!block || !block->part || !block->data) { ErrPrint("Block or part or data is not valid\n"); PERF_MARK("color"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } - info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst); + info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst); if (!info) { ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst)); PERF_MARK("color"); - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } if (!info->port) { ErrPrint("info->port is NIL (%d, %s)\n", is_pd, instance_id(inst)); PERF_MARK("color"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } ret = info->port->update_color(info->port_data, block->id, block->part, block->data); @@ -666,25 +668,25 @@ static int update_script_text(struct inst_info *inst, struct block *block, int i if (!block || !block->part || !block->data) { ErrPrint("Block or part or data is not valid\n"); PERF_MARK("text"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } - info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst); + info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst); if (!info) { ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst)); PERF_MARK("text"); - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } if (!info->port) { ErrPrint("info->port is NIL\n"); PERF_MARK("text"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } DbgPrint("[%s] %s (%s)\n", block->id, block->part, block->data); ret = info->port->update_text(info->port_data, block->id, block->part, block->data); - + PERF_MARK("text"); return ret; } @@ -699,20 +701,20 @@ static int update_script_image(struct inst_info *inst, struct block *block, int if (!block || !block->part) { ErrPrint("Block or part is not valid\n"); PERF_MARK("image"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } - info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst); + info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst); if (!info) { ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst)); PERF_MARK("image"); - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } if (!info->port) { ErrPrint("info->port is NIL\n"); PERF_MARK("image"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } DbgPrint("[%s] %s (%s)\n", block->id, block->part, block->data); @@ -731,20 +733,20 @@ static int update_access(struct inst_info *inst, struct block *block, int is_pd) if (!block || !block->part) { ErrPrint("Block or block->part is NIL\n"); PERF_MARK("access"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } - info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst); + info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst); if (!info) { ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst)); PERF_MARK("access"); - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } if (!info->port) { ErrPrint("info->port is NIL\n"); PERF_MARK("access"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } ret = info->port->update_access(info->port_data, block->id, block->part, block->data, block->option); @@ -762,20 +764,20 @@ static int operate_access(struct inst_info *inst, struct block *block, int is_pd if (!block || !block->part) { ErrPrint("Block or block->part is NIL\n"); PERF_MARK("operate_access"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } - info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst); + info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst); if (!info) { ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst)); PERF_MARK("operate_access"); - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } if (!info->port) { ErrPrint("info->port is NIL\n"); PERF_MARK("operate_access"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } ret = info->port->operate_access(info->port_data, block->id, block->part, block->data, block->option); @@ -793,20 +795,20 @@ static int update_script_script(struct inst_info *inst, struct block *block, int if (!block || !block->part) { ErrPrint("Block or part is NIL\n"); PERF_MARK("script"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } - info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst); + info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst); if (!info) { ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst)); PERF_MARK("script"); - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } if (!info->port) { ErrPrint("info->port is NIL\n"); PERF_MARK("script"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } ret = info->port->update_script(info->port_data, block->id, block->target, block->part, block->data, block->option); @@ -824,20 +826,20 @@ static int update_script_signal(struct inst_info *inst, struct block *block, int if (!block) { ErrPrint("block is NIL\n"); PERF_MARK("signal"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } - info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst); + info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst); if (!info) { ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst)); PERF_MARK("signal"); - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } if (!info->port) { ErrPrint("info->port is NIL\n"); PERF_MARK("signal"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } ret = info->port->update_signal(info->port_data, block->id, block->part, block->data); @@ -856,26 +858,26 @@ static int update_script_drag(struct inst_info *inst, struct block *block, int i if (!block || !block->data || !block->part) { ErrPrint("block or block->data or block->part is NIL\n"); PERF_MARK("drag"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } - info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst); + info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst); if (!info) { ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst)); PERF_MARK("drag"); - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } if (sscanf(block->data, "%lfx%lf", &dx, &dy) != 2) { ErrPrint("Invalid format of data (DRAG data [%s])\n", block->data); PERF_MARK("drag"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } if (!info->port) { ErrPrint("info->port is NIL\n"); PERF_MARK("drag"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } ret = info->port->update_drag(info->port_data, block->id, block->part, dx, dy); @@ -897,10 +899,10 @@ static void update_size_for_script(struct script_info *info, struct inst_info *i (void)info->port->update_size(info->port_data, NULL, w, h); } - if (instance_lb_script(inst) == info) { - instance_set_lb_size(inst, w, h); - } else if (instance_pd_script(inst) == info) { - instance_set_pd_size(inst, w, h); + if (instance_dbox_script(inst) == info) { + instance_set_dbox_size(inst, w, h); + } else if (instance_gbar_script(inst) == info) { + instance_set_gbar_size(inst, w, h); } else { ErrPrint("Unknown script\n"); } @@ -915,20 +917,20 @@ HAPI int script_handler_resize(struct script_info *info, int w, int h) if (!info) { ErrPrint("info[%p] resize is ignored\n", info); PERF_MARK("resize"); - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } inst = buffer_handler_instance(info->buffer_handle); if (!inst) { ErrPrint("Instance is not valid\n"); PERF_MARK("resize"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } update_size_for_script(info, inst, w, h); PERF_MARK("resize"); - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } HAPI const char *script_handler_buffer_id(struct script_info *info) @@ -950,20 +952,20 @@ static int update_info(struct inst_info *inst, struct block *block, int is_pd) if (!block || !block->part || !block->data) { ErrPrint("block or block->part or block->data is NIL\n"); PERF_MARK("info"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } - info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst); + info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst); if (!info) { ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst)); PERF_MARK("info"); - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } if (!info->port) { ErrPrint("info->port is NIL\n"); PERF_MARK("info"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } if (!strcasecmp(block->part, INFO_SIZE)) { @@ -972,7 +974,7 @@ static int update_info(struct inst_info *inst, struct block *block, int is_pd) if (sscanf(block->data, "%dx%d", &w, &h) != 2) { ErrPrint("Invalid format for SIZE(%s)\n", block->data); PERF_MARK("info"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } if (!block->id) { @@ -985,7 +987,7 @@ static int update_info(struct inst_info *inst, struct block *block, int is_pd) } PERF_MARK("info"); - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } static inline void consuming_parsed_block(struct inst_info *inst, int is_pd, struct block *block) @@ -1005,7 +1007,7 @@ static inline void consuming_parsed_block(struct inst_info *inst, int is_pd, str NULL }; - info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst); + info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst); if (!info) { ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst)); goto free_out; @@ -1029,13 +1031,13 @@ free_out: HAPI int script_init(void) { - if (!strcasecmp(PROVIDER_METHOD, "shm")) { - s_info.env_buf_type = BUFFER_TYPE_SHM; - } else if (!strcasecmp(PROVIDER_METHOD, "pixmap")) { - s_info.env_buf_type = BUFFER_TYPE_PIXMAP; + if (!strcasecmp(DYNAMICBOX_CONF_PROVIDER_METHOD, "shm")) { + s_info.env_buf_type = DBOX_FB_TYPE_SHM; + } else if (!strcasecmp(DYNAMICBOX_CONF_PROVIDER_METHOD, "pixmap")) { + s_info.env_buf_type = DBOX_FB_TYPE_PIXMAP; } - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } HAPI int script_fini(void) @@ -1058,7 +1060,7 @@ HAPI int script_fini(void) HAPI int script_handler_update_pointer(struct script_info *info, int x, int y, int down) { if (!info) { - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } info->x = x; @@ -1070,18 +1072,18 @@ HAPI int script_handler_update_pointer(struct script_info *info, int x, int y, i info->down = 1; } - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } HAPI int script_handler_update_keycode(struct script_info *info, unsigned int keycode) { if (!info) { - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } info->keycode = keycode; - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } HAPI int script_handler_feed_event(struct script_info *info, int event, double timestamp) @@ -1090,7 +1092,7 @@ HAPI int script_handler_feed_event(struct script_info *info, int event, double t if (!info->port) { ErrPrint("info->port is NIL\n"); - return LB_STATUS_ERROR_INVALID; + return DBOX_STATUS_ERROR_INVALID_PARAMETER; } ret = info->port->feed_event(info->port_data, event, info->x, info->y, info->down, info->keycode, timestamp); @@ -1187,7 +1189,6 @@ static Eina_Bool apply_changes_cb(void *_data) } #endif - HAPI int script_handler_parse_desc(struct inst_info *inst, const char *filename, int is_pd) { PERF_INIT(); @@ -1212,7 +1213,7 @@ HAPI int script_handler_parse_desc(struct inst_info *inst, const char *filename, filebuf = load_file(filename); if (!filebuf) { - return LB_STATUS_ERROR_IO; + return DBOX_STATUS_ERROR_IO_ERROR; } fileptr = filebuf; @@ -1426,10 +1427,10 @@ HAPI int script_handler_parse_desc(struct inst_info *inst, const char *filename, case DONE: if (isspace(*fileptr)) { } else if (*fileptr == '}') { - state = BEGIN; - block->filename = filename; - block_list = eina_list_append(block_list, block); - block = NULL; + state = BEGIN; + block->filename = filename; + block_list = eina_list_append(block_list, block); + block = NULL; } else { state = FIELD; continue; @@ -1454,7 +1455,7 @@ HAPI int script_handler_parse_desc(struct inst_info *inst, const char *filename, } PERF_MARK("parser"); - return LB_STATUS_ERROR_FAULT; + return DBOX_STATUS_ERROR_FAULT; } block = eina_list_data_get(eina_list_last(block_list)); @@ -1497,15 +1498,15 @@ HAPI int script_handler_parse_desc(struct inst_info *inst, const char *filename, /*! * Doesn't need to force to render the contents. - struct script_info *info; - info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst); - if (info && info->ee) { - ecore_evas_manual_render(info->ee); - } - */ + struct script_info *info; + info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst); + if (info && info->ee) { + ecore_evas_manual_render(info->ee); + } + */ #endif - return LB_STATUS_SUCCESS; + return DBOX_STATUS_ERROR_NONE; } /* End of a file */ |