From: nazib.ullah Date: Thu, 29 Dec 2016 12:02:14 +0000 (+0600) Subject: [TBT][tizen_3.0_wearable][D2D Module updated, IME edc added] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddb0643ebaccee824a8fe6c99d849ec3523f14bf;p=test%2Ftct%2Fnative%2Fbehavior.git [TBT][tizen_3.0_wearable][D2D Module updated, IME edc added] Change-Id: I2c25ef65aebe3907f2df5b71625c56982b95028c Signed-off-by: nazib.ullah --- diff --git a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk index 8934c55..6fb4dbc 100644 Binary files a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk and b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk differ diff --git a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk index 4127dba..5ae8f4c 100644 Binary files a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk and b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk differ diff --git a/tbt-ime/.gitignore b/tbt-ime/.gitignore index d023e87..ffab4a7 100644 --- a/tbt-ime/.gitignore +++ b/tbt-ime/.gitignore @@ -1,4 +1,3 @@ /SA_Report /Debug /.sign -/res diff --git a/tbt-ime/res/edje/tbt_ime.edc b/tbt-ime/res/edje/tbt_ime.edc new file mode 100644 index 0000000..5298482 --- /dev/null +++ b/tbt-ime/res/edje/tbt_ime.edc @@ -0,0 +1,953 @@ +collections { + base_scale: 1.0; + group { "main"; + + parts { + part { + name:"panel.bg"; + type: RECT; + description{ + state: "default" 0.0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + color: 59 89 152 255; + } + } + + + part { + name: "btn_00"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1/5 1/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_01"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 1/5 0.0; + } + rel2 { + relative: 2/5 1/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_02"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 2/5 0.0; + } + rel2 { + relative: 3/5 1/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_03"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 3/5 0.0; + } + rel2 { + relative: 5/5 1/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_10"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 0.0 1/4; + } + rel2 { + relative: 1/5 2/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_11"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 1/5 1/4; + } + rel2 { + relative: 2/5 2/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_12"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 2/5 1/4; + } + rel2 { + relative: 3/5 2/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_13"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 3/5 1/4; + } + rel2 { + relative: 4/5 2/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_14"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 4/5 1/4; + } + rel2 { + relative: 5/5 2/4; + } + fixed: 1 1; + } + } + + + part { + name: "btn_20"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 0.0 2/4; + } + rel2 { + relative: 1/5 3/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_21"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 1/5 2/4; + } + rel2 { + relative: 2/5 3/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_22"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 2/5 2/4; + } + rel2 { + relative: 3/5 3/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_23"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 3/5 2/4; + } + rel2 { + relative: 4/5 3/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_24"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 4/5 2/4; + } + rel2 { + relative: 5/5 3/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_30"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 0.0 3/4; + } + rel2 { + relative: 5/5 4/4; + } + fixed: 1 1; + } + } + } + } + + group { "group_1"; + + parts { + part { + name:"panel.bg"; + type: RECT; + description{ + state: "default" 0.0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + color: 59 89 152 255; + } + } + + + part { + name: "btn_00"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1/3 1/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_01"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 1/3 0.0; + } + rel2 { + relative: 2/3 1/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_02"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 2/3 0.0; + } + rel2 { + relative: 3/3 1/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_10"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 0.0 1/4; + } + rel2 { + relative: 1/3 2/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_11"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 1/3 1/4; + } + rel2 { + relative: 2/3 2/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_12"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 2/3 1/4; + } + rel2 { + relative: 3/3 2/4; + } + fixed: 1 1; + } + } + + + part { + name: "btn_20"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 0.0 2/4; + } + rel2 { + relative: 1/3 3/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_21"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 1/3 2/4; + } + rel2 { + relative: 2/3 3/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_22"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 2/3 2/4; + } + rel2 { + relative: 3/3 3/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_30"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 0.0 3/4; + } + rel2 { + relative: 1/3 4/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_31"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 1/3 3/4; + } + rel2 { + relative: 2/3 4/4; + } + fixed: 1 1; + } + } + + part { + name: "btn_32"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 2/3 3/4; + } + rel2 { + relative: 3/3 4/4; + } + fixed: 1 1; + } + } + } + } + + group { "group_2"; + + parts { + part { + name:"panel.bg"; + type: RECT; + description{ + state: "default" 0.0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + color: 59 89 152 255; + } + } + + part { + name: "btn_00"; + type:SWALLOW; + description{ + state: "default" 0.0; + rel1 { + relative: 0 0; + } + rel2 { + relative: 1 1; + } + fixed: 1 1; + } + } + } + } + group { name: "elm/button/base/transparent"; + data { + item: "focus_highlight" "on"; + } + images { + image: image_normal COMP; + } + script { + public mouse_down = 0; + public multi_down = 0; + } + parts { + part { name: "elm.swallow.content"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + } + } + part { name: "over2"; + type: RECT; + repeat_events: 1; + ignore_flags: ON_HOLD; + description { state: "default" 0.0; + color: 0 0 0 0; + } + } + part { name: "over3"; + type: RECT; + repeat_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + } + } + } + programs { + program { name: "button_press"; + signal: "mouse,down,1*"; + source: "over2"; + script { + if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0)) + { + set_int(mouse_down, 1); + emit("elm,action,press", ""); + } + } + } + program { name: "button_unpress"; + signal: "mouse,up,1*"; + source: "over3"; + script { + if (get_int(mouse_down) == 1) + { + set_int(mouse_down, 0); + emit("elm,action,unpress", ""); + } + } + } + program { name: "button_click"; + signal: "mouse,clicked,1"; + source: "over2"; + script { + if (get_int(multi_down) == 0) { + emit("elm,action,click", ""); + } + } + } + program { name: "multi_down"; + signal: "elm,action,multi,down"; + source: "elm"; + script { + set_int(multi_down, 1); + } + } + program { + name: "multi_up"; + signal: "elm,action,multi,up"; + source: "elm"; + script { + set_int(multi_down, 0); + } + } + } + } + + group { name: "elm/button/base/chucknorris"; + + alias: "elm/button/base/default"; + + parts { + + part { name: "border"; + + type: RECT; + + description { state: "default" 0.0; + + color: 0 0 0 255; + + } + + description { state: "in" 0.0; + + color: 50 180 180 255; + + } + + } + + part { name: "base"; + + type: RECT; + + mouse_events: 1; + + description { state: "default" 0.0; + + rel1.to: "border"; + + rel1.offset: 1 1; + + rel2.to: "border"; + + rel2.offset: -2 -2; + color: 59 89 152 255; + + } + + description { state: "disabled" 0.0; + + inherit: "default" 0.0; + + color: 59 89 152 255; + + } + + } + + part { name: "elm.swallow.content"; + + type: SWALLOW; + + mouse_events: 0; + + description { state: "default" 0.0; + + fixed: 1 0; + + visible: 0; + + align: 0.0 0.5; + + rel1.offset: 4 4; + + rel2.offset: 3 -5; + + rel2.relative: 0.0 1.0; + + } + + description { state: "visible" 0.0; + + inherit: "default" 0.0; + + visible: 1; + + aspect: 1.0 1.0; + + aspect_preference: VERTICAL; + + rel2.offset: 4 -5; + + } + + description { state: "icononly" 0.0; + + inherit: "default" 0.0; + + fixed: 0 0; + + visible: 1; + + align: 0.5 0.5; + + aspect: 1.0 1.0; + + aspect_preference: VERTICAL; + + rel2.offset: -5 -5; + + rel2.relative: 1.0 1.0; + + } + + } + + part { name: "elm.text"; + + type: TEXT; + + mouse_events: 0; + + scale: 1; + + description { state: "default" 0.0; + + visible: 0; + + rel1.to_x: "elm.swallow.content"; + + rel1.relative: 1.0 0.0; + + rel1.offset: 0 4; + + rel2.offset: -5 -5; + + color: 255 255 255 255; + + text { + + font: "Sans"; + + size: 10; + + min: 0 0; + + text_class: "button"; + + } + + } + + description { state: "visible" 0.0; + + inherit: "default" 0.0; + + visible: 1; + + text.min: 1 1; + + } + + description { state: "disabled" 0.0; + + inherit: "default" 0.0; + + } + + description { state: "disabled_visible" 0.0; + + inherit: "default" 0.0; + + visible: 1; + + text.min: 1 1; + + } + + } + + programs { + + program { name: "button_mouse_in"; + + signal: "mouse,in"; + + source: "base"; + + action: STATE_SET "in" 0.0; + + target: "border"; + + } + + program { name: "button_mouse_out"; + + signal: "mouse,out"; + + source: "base"; + + action: STATE_SET "default" 0.0; + + target: "border"; + + } + + program { name: "button_unclick"; + + signal: "mouse,up,1"; + + source: "base"; + + action: SIGNAL_EMIT "elm,action,click" ""; + + } + + program { name: "button_click"; + + signal: "mouse,down,1"; + + source: "base"; + + } + + program { name: "text_show"; + + signal: "elm,state,text,visible"; + + source: "elm"; + + script { + + new st[31]; + + new Float:vl; + + get_state(PART:"elm.swallow.content", st, 30, vl); + + if (!strcmp(st, "icononly")) + + set_state(PART:"elm.swallow.content", "visible", 0.0); + + set_state(PART:"elm.text", "visible", 0.0); + + } + + } + + program { name: "text_hide"; + + signal: "elm,state,text,hidden"; + + source: "elm"; + + script { + + new st[31]; + + new Float:vl; + + get_state(PART:"elm.swallow.content", st, 30, vl); + + if (!strcmp(st, "visible")) + + set_state(PART:"elm.swallow.content", "icononly", 0.0); + + set_state(PART:"elm.text", "default", 0.0); + + } + + } + + program { name: "icon_show"; + + signal: "elm,state,icon,visible"; + + source: "elm"; + + script { + + new st[31]; + + new Float:vl; + + get_state(PART:"elm.text", st, 30, vl); + + if (!strcmp(st, "visible")) + + set_state(PART:"elm.swallow.content", "visible", 0.0); + + else + + set_state(PART:"elm.swallow.content", "icononly", 0.0); + + } + + } + + program { name: "icon_hide"; + + signal: "elm,state,icon,hidden"; + + source: "elm"; + + action: STATE_SET "default" 0.0; + + target: "elm.swallow.content"; + + } + + program { name: "disable"; + + signal: "elm,state,disabled"; + + source: "elm"; + + action: STATE_SET "disabled" 0.0; + + target: "base"; + + after: "disable_text"; + + } + + program { name: "disable_text"; + + script { + + new st[31]; + + new Float:vl; + + get_state(PART:"elm.text", st, 30, vl); + + if (!strcmp(st, "visible")) + + set_state(PART:"elm.text", "disabled_visible", 0.0); + + else + + set_state(PART:"elm.text", "disabled", 0.0); + + } + + } + + program { name: "enable"; + + signal: "elm,state,enabled"; + + source: "elm"; + + action: STATE_SET "default" 0.0; + + target: "base"; + + after: "enable_text"; + + } + + program { name: "enable_text"; + + script { + + new st[31]; + + new Float:vl; + + get_state(PART:"elm.text", st, 30, vl); + + if (!strcmp(st, "disabled_visible")) + + set_state(PART:"elm.text", "visible", 0.0); + + else + + set_state(PART:"elm.text", "default", 0.0); + + } + + } + + } + + } + + } +} + diff --git a/tbtcoreapp/src/view/tbt-d2d-view.c b/tbtcoreapp/src/view/tbt-d2d-view.c index 0374d8d..ce8d361 100644 --- a/tbtcoreapp/src/view/tbt-d2d-view.c +++ b/tbtcoreapp/src/view/tbt-d2d-view.c @@ -32,7 +32,7 @@ #include "utils/ui-utils.h" #include "view/tbt-d2d-view.h" #include "view/tbt-common-view.h" - +#include #include struct _d2d_view @@ -41,9 +41,14 @@ struct _d2d_view Evas_Object *server_list; Evas_Object *client_msg_list; conv_h gl_conv_h; - conv_device_h selected_device; + GList *devices_list; }; +typedef struct _device_data{ + d2d_view *this; + conv_device_h selected_device; +}device_data; + typedef struct _service_data{ d2d_view *view; conv_service_h service_handle; @@ -164,7 +169,7 @@ static void start_discovery_cb(void *data, Evas_Object *obj, void *event_info) int ret = conv_create(&this->gl_conv_h); RETM_IF(ret != CONV_ERROR_NONE, "conv_create failed with error : %s", get_d2d_error(ret)); - ret = conv_discovery_start(this->gl_conv_h, 30, discovery_cb, this);/*Timeout 30 seconds*/ + ret = conv_discovery_start(this->gl_conv_h, 90, discovery_cb, this);/*Timeout 90 seconds*/ RETM_IF(ret != CONV_ERROR_NONE, "conv_discovery_start failed with error : %s", get_d2d_error(ret)); } @@ -316,11 +321,15 @@ static void service_foreach_cb(conv_service_h service_handle, void *user_data) static void device_selected_cb(void *data, Evas_Object *obj, void *event_info) { - d2d_view* this = (d2d_view*) data; + device_data* new_device_data = (device_data*) data; + d2d_view* this = new_device_data->this; + char* device_name; + conv_device_get_property_string(new_device_data->selected_device, CONV_DEVICE_NAME, &device_name); + DBG("%s is the device name inside device_selected_cb.", device_name ); elm_list_clear(this->server_list); conv_device_h clone_device; - int ret = conv_device_clone(this->selected_device, &clone_device); + int ret = conv_device_clone(new_device_data->selected_device, &clone_device); RETM_IF(ret != CONV_ERROR_NONE, "conv_device_clone failed with error : %s", get_d2d_error(ret)); ret = conv_device_foreach_service(clone_device, service_foreach_cb, this); @@ -347,11 +356,17 @@ static void discovery_cb(conv_device_h device, int result, void* user_data) DBG("conv_device_get_property_string failed with error : %s", get_d2d_error(ret)); DBG( "device TYPE = %s", value); - this->selected_device = device; +// this->selected_device = device; + if( device_name!=NULL) { - elm_list_item_append(found_device_list, device_name, NULL, NULL, device_selected_cb, this); + //FIX_ME + device_data *new_device_data = (device_data*) malloc(sizeof(device_data)); + new_device_data->this = this; + new_device_data->selected_device = device; + this->devices_list = g_list_append(this->devices_list, (gpointer) new_device_data); + elm_list_item_append(found_device_list, device_name, NULL, NULL, device_selected_cb, new_device_data); elm_list_go(found_device_list); elm_object_part_content_set(this->view->layout, "list_container", found_device_list); @@ -374,7 +389,14 @@ static void _app_destroy_cb(void* this) view = (d2d_view*)this; RETM_IF(NULL == view, "view is NULL"); - conv_device_destroy(view->selected_device); + GList *l; + device_data *d; + for(l = view->devices_list; l != NULL; l = l->next) + { + d = (device_data*)l->data; + conv_device_destroy(d->selected_device); + SAFE_DELETE(d); + } SAFE_DELETE(view->view); SAFE_DELETE(view);