From: Jahangir Date: Thu, 10 Nov 2016 16:17:35 +0000 (-0500) Subject: [TBT][DALi][Added TC according to HQ] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3671c6968e5b37e2f1184954889a02e0e8ebd51d;p=test%2Ftct%2Fnative%2Fbehavior.git [TBT][DALi][Added TC according to HQ] Change-Id: Icd3a110b2d8ea37ab5d2667f5582df64636c9ce3 --- 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 64639af..222b27b 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-armv7l/org.tizen.tbtcoreapp-dali-1.0.0-arm.tpk b/release/binary-armv7l/org.tizen.tbtcoreapp-dali-1.0.0-arm.tpk index be45a6d..25d5402 100644 Binary files a/release/binary-armv7l/org.tizen.tbtcoreapp-dali-1.0.0-arm.tpk and b/release/binary-armv7l/org.tizen.tbtcoreapp-dali-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 8402707..cc76e97 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/release/binary-x86/org.tizen.tbtcoreapp-dali-1.0.0-i386.tpk b/release/binary-x86/org.tizen.tbtcoreapp-dali-1.0.0-i386.tpk index ad30fe4..38471f0 100644 Binary files a/release/binary-x86/org.tizen.tbtcoreapp-dali-1.0.0-i386.tpk and b/release/binary-x86/org.tizen.tbtcoreapp-dali-1.0.0-i386.tpk differ diff --git a/tbtcoreapp-dali/.cproject b/tbtcoreapp-dali/.cproject index 438b55e..6dba1fb 100644 --- a/tbtcoreapp-dali/.cproject +++ b/tbtcoreapp-dali/.cproject @@ -16,7 +16,7 @@ - + @@ -32,6 +32,12 @@ @@ -139,6 +148,12 @@ @@ -244,7 +262,6 @@ - @@ -295,7 +312,7 @@ - + @@ -311,6 +328,12 @@ @@ -417,6 +443,12 @@ @@ -521,7 +556,6 @@ - diff --git a/tbtcoreapp-dali/.rds_delta b/tbtcoreapp-dali/.rds_delta index 68afa54..1727f30 100644 --- a/tbtcoreapp-dali/.rds_delta +++ b/tbtcoreapp-dali/.rds_delta @@ -4,3 +4,26 @@ author-signature.xml signature1.xml bin/tbtcoreapp-dali +res/dali-toolkit-test-theme_720x1280.json +res/images/Default_home.png +res/images/customTextFieldBgImage.jpg +res/images/gallery-medium-1.jpg +res/images/gallery-medium-10.jpg +res/images/gallery-medium-11.jpg +res/images/gallery-medium-12.jpg +res/images/gallery-medium-13.jpg +res/images/gallery-medium-14.jpg +res/images/gallery-medium-2.jpg +res/images/gallery-medium-3.jpg +res/images/gallery-medium-4.jpg +res/images/gallery-medium-5.jpg +res/images/gallery-medium-6.jpg +res/images/gallery-medium-7.jpg +res/images/gallery-medium-8.jpg +res/images/gallery-medium-9.jpg +res/images/innerButtonSelected.png +res/images/innerButtonUnselected.png +res/images/text-field-bg.9.png +res/images/top-bar.png +shared/res/tbtcoreapp-dali.png +tizen-manifest.xml diff --git a/tbtcoreapp-dali/.sdk_delta.info b/tbtcoreapp-dali/.sdk_delta.info index bf2301c..23e34c5 100644 Binary files a/tbtcoreapp-dali/.sdk_delta.info and b/tbtcoreapp-dali/.sdk_delta.info differ diff --git a/tbtcoreapp-dali/.sign/.manifest.tmp b/tbtcoreapp-dali/.sign/.manifest.tmp index 1368cf1..10744a4 100644 --- a/tbtcoreapp-dali/.sign/.manifest.tmp +++ b/tbtcoreapp-dali/.sign/.manifest.tmp @@ -1,4 +1,4 @@ -bin/tbtcoreapp-dali__DEL__FWyvPfqgfssOkfEMJ12Ojkek1k7uEO1rRuj5bGNAPNU= +bin/tbtcoreapp-dali__DEL__vIs1vm+NfHeJ41pE8IswvjYoqOV03bj6+tgQPeccsMo= res/dali-toolkit-test-theme_720x1280.json__DEL__DCzB9UIk8miYUX+Ll21N0W0mefzt37DPTsrTRPo4PfE= res/images/Default_home.png__DEL__G5tVggT06pLAhU2qhwPAmVTMSNTBF3T5sqkIydsMt44= res/images/customTextFieldBgImage.jpg__DEL__tRuXc9qO5C064IhIkuWVtgw2OiQ1R6sCYm0KA+AbmGU= @@ -22,4 +22,4 @@ res/images/text-field-bg.9.png__DEL__MB7LhGWONfE9F3kWbkkHJNgQ4SIfT3U+WND+9+siVpU res/images/top-bar.png__DEL__gvQ+T+R9lVRmJmRoRaYoeIHhzxEwsXgRSr4wjnbEokM= shared/res/tbtcoreapp-dali.png__DEL__1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs= tizen-manifest.xml__DEL__jVCHDxVZ/eHQqLpBXF33+IyKIcQTWevk9pMnSecwrsE= -author-signature.xml__DEL__Fn8W8MQveXlwDKIR98cZUgmGilvrLqA7ldWn5XjpTWI= +author-signature.xml__DEL__UIwebnLktoZqXAe2HOZvindIa5c1iHNHKtxUBinePjI= diff --git a/tbtcoreapp-dali/.sign/author-signature.xml b/tbtcoreapp-dali/.sign/author-signature.xml index 49b83ce..3d37fa5 100644 --- a/tbtcoreapp-dali/.sign/author-signature.xml +++ b/tbtcoreapp-dali/.sign/author-signature.xml @@ -4,7 +4,7 @@ -FWyvPfqgfssOkfEMJ12Ojkek1k7uEO1rRuj5bGNAPNU= +vIs1vm+NfHeJ41pE8IswvjYoqOV03bj6+tgQPeccsMo= @@ -107,25 +107,25 @@ -IzTrn/hel9oCkkujQaXdBzMmKNoirMS/J0sLcoZec53fuqPB+ChdtSfjxaGRy0SjOfvZ8w2d0gma -AqrXggJRgiL9mPx6hcQD4CdBec4S1f2lyuFI+IPUueq6KCPwMPkqjo5KIfmABh9OeFY1CMo6KmS9 -8AjMSAhKabl2auB1g/o= +bRPdZqpTPQ2mP0xx/CyLCTfdrRTyQNM0RdBPnhGET8rM32SW0WHajGQchWdod9jrqyhGQntPmz3M ++CTwLixzTZIKVeXBMqNbeFTxdCQpx98zUK+yuTgHkhnJXhWQep+Zs1onIq7BnnjR60RoXfNysbwM +zj4PRJ5H9c7NMtoALP4= -MIIClTCCAX2gAwIBAgIGAVaU7TxzMA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz +MIICkzCCAXugAwIBAgIGAVgqf55jMA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz c29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2 -ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMBExDzANBgNVBAMMBmF1 -dGhvcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAl7hQZEvuy8qFP+j/h/AKXAaO/H1Kv98w -iDuu35EgiBkQwm0LkhY29csiO8ii5dN/8qKaYs7f6rUlfmROXm13QLSOPCadEzt8lm7Z4oPCXWl1 -1guSBLiPubuuH3HFg4PkPG/Mg0RcUD4UiuqUgYFEdRoPFarq3dpGpXEHkvvCE4ECAwEAAaMyMDAw -DAYDVR0TAQH/BAIwADALBgNVHQ8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwMwDQYJKoZIhvcN -AQEFBQADggEBADNLE1In6hcib8Rrv7HSRrs7FJoOby3AWILQZv5afg/wWQ2IfjqzZcMh1x7RLlyQ -F+u2fXf0mPEXt038uoOkmXPOZ9AWcxshHEczjy6DTkyYSFq55QsCRxt6A3K3jggAOKmPK1wufXPj -xy4dvDsS3hqfyLnYGKODrdHS0Y2qmj3hoOPFEl3wbYqd3/Zd8jD7aq2uMVjDNfsPpY9sPtK58isQ -0DfTWtJ2FEOUHrVj/gncF3kYL+khSuFbvS+wa4nC2Td7/Kj0YW7G7XnxMOQSFdIGDbfOeHSWYHCD -sOa76yXPmbUSkk98oTeSd9KAzkEiJo12yj8T0KH3PKmJ4Aux2/A= +ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMA8xDTALBgNVBAMMBHRl +c3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIHnHARWWGpYuPhkonFdVmCFP7fy8kzMiGYV +ijU1llWA6p2lzd1VFVfkGFEqQlPYYrlJS0zdHbT46QzZAwSB0rSpDwjJp3ieukcCcGRH93TIXLn+ +SltiGQQL2dsA67QsglXAyMLBy5DpftchXdAThPK/hrCdDVy+aE/l8VNnZ6TrAgMBAAGjMjAwMAwG +A1UdEwEB/wQCMAAwCwYDVR0PBAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUFBwMDMA0GCSqGSIb3DQEB +BQUAA4IBAQCMrIoL+OaDhYIJUzzYirjJ3B5x0ibKvPTs1+c6Z2Dk2YO9g9/5s5lQMjCf7gkB0G8q +l0PLVIeduxVtH/X8KbQJvunTuf7L2Lio8XbJ9dg0lB36SQBwFNz7MjBWa86e3lLfmoMBbJbfDo6J +Cc5H/8Mu3wgumtxu1j6iaZQ4TZEI7zXDx8c9kHuhhIfAI0QtXf0ZVUYlVNryT8pFcCtTC8TRz07B +8RsDycdlkpSVMYdR9oa2Yq7ve6a/DadtZ3l07tRIvQK5it/fW9p51m/BWuQgyb0XLElCJgBLzV+y +3VakY+lPFqk6RzLaj8vmxcKu9gpilemVtGR59rteviKRdW4H MIIDOTCCAiGgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMRowGAYDVQQKDBFUaXplbiBBc3NvY2lh diff --git a/tbtcoreapp-dali/.sign/signature1.xml b/tbtcoreapp-dali/.sign/signature1.xml index 1d8c055..278dae7 100644 --- a/tbtcoreapp-dali/.sign/signature1.xml +++ b/tbtcoreapp-dali/.sign/signature1.xml @@ -4,11 +4,11 @@ -Fn8W8MQveXlwDKIR98cZUgmGilvrLqA7ldWn5XjpTWI= +UIwebnLktoZqXAe2HOZvindIa5c1iHNHKtxUBinePjI= -FWyvPfqgfssOkfEMJ12Ojkek1k7uEO1rRuj5bGNAPNU= +vIs1vm+NfHeJ41pE8IswvjYoqOV03bj6+tgQPeccsMo= @@ -111,9 +111,9 @@ -Q0Eyl1XVAMv4eK0ofMzMSfv6uhE6zLS5wNJBe09HXHH6WMa65+g20uQXXkQWE7od4XmF7nEuQpky -Hq1BI9StyQW3GxtC8JdZUyMxrn95QsRQ6VRI2GUil4x/3MO8yFVzr29LbhBDhmXmKjVhKC7QaTzG -Dx9eW3GTrZ0/+O0vTuQ= +mdQYlwY6tlPgarPJHiGuJjBXgwiGVqNjbHeuK18/oLxKjFfPYsNdHB3OUQ08JZT5fjokfi4o1GZE +uvqTRB0tHy5oSg7kcheZfvgvCfzTXN7xZat24EgQOHNLLAKyDdUJKLn4jb1kSly7aVB80rjVOVar +hAP3aYBMfP/vcNzW5Pw= diff --git a/tbtcoreapp-dali/inc/view/tbt-dali-actor-view.h b/tbtcoreapp-dali/inc/view/tbt-dali-actor-view.h index 6dead41..375c6aa 100644 --- a/tbtcoreapp-dali/inc/view/tbt-dali-actor-view.h +++ b/tbtcoreapp-dali/inc/view/tbt-dali-actor-view.h @@ -56,6 +56,7 @@ private: TextLabel txtHovered; TextLabel txtHoveredData; TextLabel txtWheel; + TextLabel txtWheelData; //button PushButton btnButton; }; diff --git a/tbtcoreapp-dali/inc/view/tbt-dali-app-view.h b/tbtcoreapp-dali/inc/view/tbt-dali-app-view.h index 473ffcc..2f83bc2 100644 --- a/tbtcoreapp-dali/inc/view/tbt-dali-app-view.h +++ b/tbtcoreapp-dali/inc/view/tbt-dali-app-view.h @@ -64,9 +64,9 @@ public: void OnTerminate(Application& app); void OnPause(Application& app); void OnIdle(); - void OnApplicationBatteryLowSignalCallback(Application& app); + //void OnApplicationBatteryLowSignalCallback(Application& app); void OnApplicationLanguageChangedSignalCallback(Application&); - void OnApplicationMemoryLowSignalCallback(Application& app); + //void OnApplicationMemoryLowSignalCallback(Application& app); void OnApplicationRegionChangedSignalCallback(Application& app); void OnApplicationResetSignalCallback(Application& app); void OnApplicationResumeSignalCallback(Application& app); diff --git a/tbtcoreapp-dali/inc/view/tbt-dali-gesture-detector-view.h b/tbtcoreapp-dali/inc/view/tbt-dali-gesture-detector-view.h deleted file mode 100644 index 6a35564..0000000 --- a/tbtcoreapp-dali/inc/view/tbt-dali-gesture-detector-view.h +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *******************************************************************************/ -/** - * @file tbt-dali-gesture-detector-view.h - * @brief To test functionality of dali gesture-detector - * - * @author Jahangir Alam(ja.alam@samsung.com) - * @date July, 2016 - * @credit - * - */ - -#ifndef __TBT_MODULE_APP_DALI_GESTURE_DETECTOR -#define __TBT_MODULE_APP_DALI_GESTURE_DETECTOR -#include - -#include "utils/logger.h" -#include "utils/config.h" -#include "utils/ui-utils.h" -#include "utils/dali-ui-utils.h" - -class TBTDaliGestureDetectorView: public UiUtils { - -private: - //testlabel - TextLabel lblLongPress; - TextLabel lblPinch; - TextLabel lblpan; - - LongPressGestureDetector longpressgesture; - PinchGestureDetector pinchgesture; - PanGestureDetector panGesture; -public: - TBTDaliGestureDetectorView(Application& mApplication, app_control_h _control); - //signal - void OnLongPressGestureDetector(Actor actor, const LongPressGesture& gesture); - void OnPinchGestureDetector(Actor actor, const PinchGesture& gesture); - void OnPanGestureDetector(Actor actor, const PanGesture& gesture); -}; - -#endif // __TBT_MODULE_APP_DALI_GESTURE_DETECTOR - diff --git a/tbtcoreapp-dali/inc/view/tbt-dali-long-press-gesture-double-view.h b/tbtcoreapp-dali/inc/view/tbt-dali-long-press-gesture-double-view.h new file mode 100644 index 0000000..5b0fc82 --- /dev/null +++ b/tbtcoreapp-dali/inc/view/tbt-dali-long-press-gesture-double-view.h @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-long-press-gesture-double-view.h + * @brief To test functionality of dali long press gesture and detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date October, 2016 + * @credit + * + */ + +#ifndef __TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_DOUBLE +#define __TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_DOUBLE +#include + +#include "utils/logger.h" +#include "utils/config.h" +#include "utils/ui-utils.h" +#include "utils/dali-ui-utils.h" + +class TBTDaliLongPressGestureDoubleView: public UiUtils { + +private: + + //testlabel + TextLabel lblLongPress; + TextLabel lblPressData; + + LongPressGestureDetector longpressgesturedetector; + + unsigned int touchesRequired; + +public: + TBTDaliLongPressGestureDoubleView(Application& mApplication, app_control_h _control); + //signal + void OnLongPressGestureDetector(Actor actor, const LongPressGesture& gesture); +}; + +#endif // __TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_DOUBLE + diff --git a/tbtcoreapp-dali/inc/view/tbt-dali-long-press-gesture-multiple-view.h b/tbtcoreapp-dali/inc/view/tbt-dali-long-press-gesture-multiple-view.h new file mode 100644 index 0000000..d11dbae --- /dev/null +++ b/tbtcoreapp-dali/inc/view/tbt-dali-long-press-gesture-multiple-view.h @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-long-press-gesture-multiple-view.h + * @brief To test functionality of dali long press gesture and detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date October, 2016 + * @credit + * + */ + +#ifndef __TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_MULTIPLE +#define __TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_MULTIPLE +#include + +#include "utils/logger.h" +#include "utils/config.h" +#include "utils/ui-utils.h" +#include "utils/dali-ui-utils.h" + +class TBTDaliLongPressGestureMultipleView: public UiUtils { + +private: + + //testlabel + TextLabel lblLongPress; + TextLabel lblPressData; + + LongPressGestureDetector longpressgesturedetector; + + unsigned int minTouchesRequired; + unsigned int maxTouchesRequired; + +public: + TBTDaliLongPressGestureMultipleView(Application& mApplication, app_control_h _control); + //signal + void OnLongPressGestureDetector(Actor actor, const LongPressGesture& gesture); +}; + +#endif // __TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_MULTIPLE + diff --git a/tbtcoreapp-dali/inc/view/tbt-dali-long-press-gesture-single-view.h b/tbtcoreapp-dali/inc/view/tbt-dali-long-press-gesture-single-view.h new file mode 100644 index 0000000..1e69255 --- /dev/null +++ b/tbtcoreapp-dali/inc/view/tbt-dali-long-press-gesture-single-view.h @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-long-press-gesture-single-view.h + * @brief To test functionality of dali long press gesture and detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date July, 2016 + * @credit + * + */ + +#ifndef __TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_SINGLE +#define __TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_SINGLE +#include + +#include "utils/logger.h" +#include "utils/config.h" +#include "utils/ui-utils.h" +#include "utils/dali-ui-utils.h" + +class TBTDaliLongPressGestureSingleView: public UiUtils { + +private: + + //testlabel + TextLabel lblLongPress; + TextLabel lblPressData; + //TextLabel lblpan; + + LongPressGestureDetector longpressgesturedetector; + + unsigned int touchesRequired; + +public: + TBTDaliLongPressGestureSingleView(Application& mApplication, app_control_h _control); + //signal + void OnLongPressGestureDetector(Actor actor, const LongPressGesture& gesture); + //void OnPinchGestureDetector(Actor actor, const PinchGesture& gesture); + //void OnPanGestureDetector(Actor actor, const PanGesture& gesture); +}; + +#endif // __TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_SINGLE + diff --git a/tbtcoreapp-dali/inc/view/tbt-dali-pan-gesture-angle-direction-view.h b/tbtcoreapp-dali/inc/view/tbt-dali-pan-gesture-angle-direction-view.h new file mode 100644 index 0000000..d2f2b63 --- /dev/null +++ b/tbtcoreapp-dali/inc/view/tbt-dali-pan-gesture-angle-direction-view.h @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-pan-gesture-angle-direction-view.h + * @brief To test functionality of dali pan gesture and detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date October, 2016 + * @credit + * + */ + +#ifndef __TBT_MODULE_APP_PAN_PRESS_GESTURE_ANGLE_DIRECTION +#define __TBT_MODULE_APP_PAN_PRESS_GESTURE_ANGLE_DIRECTION +#include + +#include "utils/logger.h" +#include "utils/config.h" +#include "utils/ui-utils.h" +#include "utils/dali-ui-utils.h" +#include "utils/constrants.h" + +class TBTDaliPanGestureAngleDirectionView: public UiUtils { + +private: + + //testlabel + TextLabel lblPan; + TextLabel lblPressData; + PushButton btnAddremove; + //TextLabel lblpan; + + PanGestureDetector pangesturedetector; + + unsigned int mintouchesRequired; + unsigned int maxtouchesRequired; + float fSetAngle; + float fSetThreshold; + bool flag; + +public: + TBTDaliPanGestureAngleDirectionView(Application& mApplication, app_control_h _control); + //signal + void OnPanGestureDetector(Actor actor, const PanGesture& gesture); + void setUnset(); + bool OnSetunSetButtonClick(Button button); +}; + +#endif // __TBT_MODULE_APP_PAN_PRESS_GESTURE_ANGLE_DIRECTION + diff --git a/tbtcoreapp-dali/inc/view/tbt-dali-pan-gesture-double-view.h b/tbtcoreapp-dali/inc/view/tbt-dali-pan-gesture-double-view.h new file mode 100644 index 0000000..7232ecb --- /dev/null +++ b/tbtcoreapp-dali/inc/view/tbt-dali-pan-gesture-double-view.h @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-pan-gesture-double-view.h + * @brief To test functionality of dali pan gesture and detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date October, 2016 + * @credit + * + */ + +#ifndef __TBT_MODULE_APP_PAN_PRESS_GESTURE_DOUBLE +#define __TBT_MODULE_APP_PAN_PRESS_GESTURE_DOUBLE +#include + +#include "utils/logger.h" +#include "utils/config.h" +#include "utils/ui-utils.h" +#include "utils/dali-ui-utils.h" + +class TBTDaliPanGestureDoubleView: public UiUtils { + +private: + + //testlabel + TextLabel lblPan; + TextLabel lblPressData; + //TextLabel lblpan; + + PanGestureDetector pangesturedetector; + + unsigned int mintouchesRequired; + unsigned int maxtouchesRequired; + +public: + TBTDaliPanGestureDoubleView(Application& mApplication, app_control_h _control); + //signal + void OnPanGestureDetector(Actor actor, const PanGesture& gesture); +}; + +#endif // __TBT_MODULE_APP_PAN_PRESS_GESTURE_DOUBLE + diff --git a/tbtcoreapp-dali/inc/view/tbt-dali-pan-gesture-single-view.h b/tbtcoreapp-dali/inc/view/tbt-dali-pan-gesture-single-view.h new file mode 100644 index 0000000..fecccba --- /dev/null +++ b/tbtcoreapp-dali/inc/view/tbt-dali-pan-gesture-single-view.h @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-pan-gesture-single-view.h + * @brief To test functionality of dali pan gesture and detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date October, 2016 + * @credit + * + */ + +#ifndef __TBT_MODULE_APP_PAN_PRESS_GESTURE_SINGLE +#define __TBT_MODULE_APP_PAN_PRESS_GESTURE_SINGLE +#include + +#include "utils/logger.h" +#include "utils/config.h" +#include "utils/ui-utils.h" +#include "utils/dali-ui-utils.h" + +class TBTDaliPanGestureSingleView: public UiUtils { + +private: + + //testlabel + TextLabel lblPan; + TextLabel lblPressData; + //TextLabel lblpan; + + PanGestureDetector pangesturedetector; + + unsigned int mintouchesRequired; + unsigned int maxtouchesRequired; + +public: + TBTDaliPanGestureSingleView(Application& mApplication, app_control_h _control); + //signal + void OnPanGestureDetector(Actor actor, const PanGesture& gesture); +}; + +#endif // __TBT_MODULE_APP_PAN_PRESS_GESTURE_SINGLE + diff --git a/tbtcoreapp-dali/inc/view/tbt-dali-pinch-gesture-single-view.h b/tbtcoreapp-dali/inc/view/tbt-dali-pinch-gesture-single-view.h new file mode 100644 index 0000000..e41fc58 --- /dev/null +++ b/tbtcoreapp-dali/inc/view/tbt-dali-pinch-gesture-single-view.h @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-pinch-gesture-single-view.h + * @brief To test functionality of dali pinch gesture and detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date November, 2016 + * @credit + * + */ + +#ifndef __TBT_MODULE_APP_DALI_PINCH_GESTURE_SINGLE +#define __TBT_MODULE_APP_DALI_PINCH_GESTURE_SINGLE +#include + +#include "utils/logger.h" +#include "utils/config.h" +#include "utils/ui-utils.h" +#include "utils/dali-ui-utils.h" + +class TBTDaliPinchGestureSingleView: public UiUtils { + +private: + + //testlabel + TextLabel lblPinch; + TextLabel lblPinchData; + //TextLabel lblpan; + + PinchGestureDetector pinchgesturedetector; + +public: + TBTDaliPinchGestureSingleView(Application& mApplication, app_control_h _control); + //signal + void OnPinchGestureDetector(Actor actor, const PinchGesture& gesture); +}; + +#endif // __TBT_MODULE_APP_DALI_PINCH_GESTURE_SINGLE + diff --git a/tbtcoreapp-dali/inc/view/tbt-dali-tap-gesture-multiple-view.h b/tbtcoreapp-dali/inc/view/tbt-dali-tap-gesture-multiple-view.h new file mode 100644 index 0000000..f12393e --- /dev/null +++ b/tbtcoreapp-dali/inc/view/tbt-dali-tap-gesture-multiple-view.h @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-tap-gesture-multiple-view.h + * @brief To test functionality of dali tap gesture and detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date November, 2016 + * @credit + * + */ + +#ifndef __TBT_MODULE_APP_DALI_TAP_GESTURE_MULTIPLE +#define __TBT_MODULE_APP_DALI_TAP_GESTURE_MULTIPLE +#include + +#include "utils/logger.h" +#include "utils/config.h" +#include "utils/ui-utils.h" +#include "utils/dali-ui-utils.h" + +class TBTDaliTapGestureMultipleView: public UiUtils { + +private: + + //testlabel + TextLabel lblTap; + TextLabel lblTapData; + + TapGestureDetector tapgesturedetector; + + unsigned int minTabRequired; + unsigned int maxTabRequired; + +public: + TBTDaliTapGestureMultipleView(Application& mApplication, app_control_h _control); + //signal + void OnTapGestureDetector(Actor actor, const TapGesture& gesture); +}; + +#endif // __TBT_MODULE_APP_DALI_TAP_GESTURE_MULTIPLE + diff --git a/tbtcoreapp-dali/inc/view/tbt-dali-tap-gesture-single-view.h b/tbtcoreapp-dali/inc/view/tbt-dali-tap-gesture-single-view.h new file mode 100644 index 0000000..7807d8d --- /dev/null +++ b/tbtcoreapp-dali/inc/view/tbt-dali-tap-gesture-single-view.h @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-tap-gesture-single-view.h + * @brief To test functionality of dali tap gesture and detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date November, 2016 + * @credit + * + */ + +#ifndef __TBT_MODULE_APP_DALI_TAP_GESTURE_SINGLE +#define __TBT_MODULE_APP_DALI_TAP_GESTURE_SINGLE +#include + +#include "utils/logger.h" +#include "utils/config.h" +#include "utils/ui-utils.h" +#include "utils/dali-ui-utils.h" + +class TBTDaliTapGestureSingleView: public UiUtils { + +private: + + //testlabel + TextLabel lblTap; + TextLabel lblTapData; + //TextLabel lblpan; + + TapGestureDetector tapgesturedetector; + + unsigned int minTabRequired; + unsigned int maxTabRequired; + +public: + TBTDaliTapGestureSingleView(Application& mApplication, app_control_h _control); + //signal + void OnTapGestureDetector(Actor actor, const TapGesture& gesture); +}; + +#endif // __TBT_MODULE_APP_DALI_TAP_GESTURE_SINGLE + diff --git a/tbtcoreapp-dali/src/tbtcoreapp-dali.cpp b/tbtcoreapp-dali/src/tbtcoreapp-dali.cpp index 30a2899..621279a 100644 --- a/tbtcoreapp-dali/src/tbtcoreapp-dali.cpp +++ b/tbtcoreapp-dali/src/tbtcoreapp-dali.cpp @@ -38,7 +38,15 @@ #include "view/tbt-dali-text-control-view.h" #include "view/tbt-dali-keyboard-focus-manager-view.h" #include "view/tbt-dali-accessibility-manager-view.h" -#include "view/tbt-dali-gesture-detector-view.h" +#include "view/tbt-dali-long-press-gesture-single-view.h" +#include "view/tbt-dali-long-press-gesture-double-view.h" +#include "view/tbt-dali-long-press-gesture-multiple-view.h" +#include "view/tbt-dali-pan-gesture-single-view.h" +#include "view/tbt-dali-pan-gesture-double-view.h" +#include "view/tbt-dali-pan-gesture-angle-direction-view.h" +#include "view/tbt-dali-pinch-gesture-single-view.h" +#include "view/tbt-dali-tap-gesture-single-view.h" +#include "view/tbt-dali-tap-gesture-multiple-view.h" #include "view/tbt-dali-style-manager-view.h" #include "view/tbt-dali-app-view.h" @@ -138,9 +146,41 @@ public: { parentView = new TBTDaliAccessibilityManagerView(mApplication, _control); } - else if(strcmp(moduleName, "TBT_APP_DALI_GESTURE_DETECTOR") == 0) + else if(strcmp(moduleName, "TBT_APP_DALI_LONG_PRESS_GESTURE_SINGLE") == 0) { - parentView = new TBTDaliGestureDetectorView(mApplication, _control); + parentView = new TBTDaliLongPressGestureSingleView(mApplication, _control); + } + else if(strcmp(moduleName, "TBT_APP_DALI_LONG_PRESS_GESTURE_DOUBLE") == 0) + { + parentView = new TBTDaliLongPressGestureDoubleView(mApplication, _control); + } + else if(strcmp(moduleName, "TBT_APP_DALI_LONG_PRESS_GESTURE_MULTIPLE") == 0) + { + parentView = new TBTDaliLongPressGestureMultipleView(mApplication, _control); + } + else if(strcmp(moduleName, "TBT_APP_DALI_PAN_GESTURE_SINGLE") == 0) + { + parentView = new TBTDaliPanGestureSingleView(mApplication, _control); + } + else if(strcmp(moduleName, "TBT_APP_DALI_PAN_GESTURE_DOUBLE") == 0) + { + parentView = new TBTDaliPanGestureDoubleView(mApplication, _control); + } + else if(strcmp(moduleName, "TBT_APP_DALI_PAN_GESTURE_ANGLE_DIRECTION") == 0) + { + parentView = new TBTDaliPanGestureAngleDirectionView(mApplication, _control); + } + else if(strcmp(moduleName, "TBT_APP_DALI_PINCH_GESTURE_SINGLE") == 0) + { + parentView = new TBTDaliPinchGestureSingleView(mApplication, _control); + } + else if(strcmp(moduleName, "TBT_APP_DALI_TAP_GESTURE_SINGLE") == 0) + { + parentView = new TBTDaliTapGestureSingleView(mApplication, _control); + } + else if(strcmp(moduleName, "TBT_APP_DALI_TAP_GESTURE_MULIPLE") == 0) + { + parentView = new TBTDaliTapGestureMultipleView(mApplication, _control); } else if(strcmp(moduleName, "TBT_APP_DALI_STYLE_MANAGER") == 0) { diff --git a/tbtcoreapp-dali/src/view/tbt-dali-actor-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-actor-view.cpp index de1c9e7..481f9fa 100644 --- a/tbtcoreapp-dali/src/view/tbt-dali-actor-view.cpp +++ b/tbtcoreapp-dali/src/view/tbt-dali-actor-view.cpp @@ -126,8 +126,9 @@ TBTDaliActorView::TBTDaliActorView(Application& mApplication, app_control_h _con ctl["lbl1"]="Touched signal not call"; ctl["lbl2"]="Touched event data"; ctl["lbl3"]="Hover signal not call"; - ctl["lbl4"]="Hover data"; + ctl["lbl4"]="Hover event data"; ctl["lbl5"]="Wheel signal not call"; + ctl["lbl6"]="Wheel event data"; Property::Map size; size["lbl1"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); @@ -135,6 +136,7 @@ TBTDaliActorView::TBTDaliActorView(Application& mApplication, app_control_h _con size["lbl3"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); size["lbl4"]=Vector2(bodySize.width, 2*TEXTLABEL_HEIGHT * bodySize.height); size["lbl5"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + size["lbl6"]=Vector2(bodySize.width, 2*TEXTLABEL_HEIGHT * bodySize.height); CreateLabelList(ctl,size);//create textlabel list txtTouched=TextLabel::DownCast(ctlBody.GetChildAt(0)); @@ -142,6 +144,7 @@ TBTDaliActorView::TBTDaliActorView(Application& mApplication, app_control_h _con txtHovered=TextLabel::DownCast(ctlBody.GetChildAt(2)); txtHoveredData=TextLabel::DownCast(ctlBody.GetChildAt(3)); txtWheel=TextLabel::DownCast(ctlBody.GetChildAt(4)); + txtWheelData=TextLabel::DownCast(ctlBody.GetChildAt(5)); Vector2 buttonSize=Vector2(bodySize.width, BUTTON_HEIGHT*bodySize.height); Vector2 position=Vector2(0.0f, bodySize.height - (buttonSize.height + VERTICAL_SPACE*bodySize.height)); @@ -166,7 +169,7 @@ bool TBTDaliActorView::cbTouchedSignal(Actor actor, const TouchEvent& event) txt.append(IntToString(pointcount)); //getpoint by index - TouchPoint touchpoint=event.GetPoint(0); + TouchPoint touchpoint=event.GetPoint(pointcount-1); //device id int deviceId=touchpoint.deviceId; txt.append(" DeviceId: "); @@ -212,6 +215,14 @@ bool TBTDaliActorView::cbTouchedSignal(Actor actor, const TouchEvent& event) txt.append(", Touch list count: "); txt.append(IntToString(touchcontainer.size())); + TouchPoint touchPoint1(pointcount-1, TouchPoint::Started, 100.0f, 100.0f); + if(touchPoint1.deviceId != pointcount-1) + DBG("device id mismatch for touch point"); + + TouchPoint touchPoint2(pointcount-1, TouchPoint::Started, 100.0f, 100.0f, 200.0f, 200.0f); + if(touchPoint2.deviceId != pointcount-1) + DBG("device id mismatch for touch point"); + this->txtTouchEventData.SetProperty( TextLabel::Property::TEXT, txt ); this->txtTouchEventData.SetProperty( TextLabel::Property::POINT_SIZE, 7.0f ); this->txtTouchEventData.SetProperty(TextLabel::Property::TEXT_COLOR,Color::CYAN); @@ -225,19 +236,20 @@ bool TBTDaliActorView::cbHoveredSignal(Actor actor, const HoverEvent& event) this->txtHovered.SetProperty( TextLabel::Property::TEXT, "Hover Signal is Called" ); this->txtHovered.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); - TouchPoint touchpoint=event.GetPoint(0); std::string txt=""; - - //device id - int deviceId=touchpoint.deviceId; - txt.append("DeviceId: "); - txt.append(IntToString(deviceId)); //touch point count int touchcount=event.GetPointCount(); if(touchcount<1) DBG("Unable to get GetPointCount"); - txt.append(", Point count: "); + txt.append("Point count: "); txt.append(IntToString(touchcount)); + TouchPoint touchpoint=event.GetPoint(touchcount-1); + + + //device id + int deviceId=touchpoint.deviceId; + txt.append("DeviceId: "); + txt.append(IntToString(deviceId)); // Actor hitActor=touchpoint.hitActor; @@ -284,6 +296,48 @@ bool TBTDaliActorView::cbWheelEventSignal(Actor actor, const WheelEvent& event) DBG("In cbWheelEventSignal"); this->txtWheel.SetProperty( TextLabel::Property::TEXT, "Wheel Signal is Called" ); this->txtWheel.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + + string txt; + if(event.IsAltModifier()) + { + DBG("Is alt modified"); + txt.append("\n Alt Modifier: Yes"); + } + else + txt.append("\n Alt Modifier: No"); + + if(event.IsCtrlModifier()) + { + DBG("Is ctrl modified"); + txt.append("\n Ctrl Modifier: Yes"); + } + else + txt.append("\n Ctrl Modifier: No"); + + if(event.IsShiftModifier()) + { + DBG("Is Shift modified"); + txt.append("\n Shift Modifier: Yes"); + } + else + txt.append(" Shift Modifier: No"); + + WheelEvent wheelevent1; + WheelEvent wheelevent2(WheelEvent::MOUSE_WHEEL,1,DALI_KEY_SHIFT_LEFT,Vector2(100.0f,100.0f),1,12121212); + if(wheelevent2.direction != 1) + DBG("wheel event constructor failed"); + + txt.append("\n Wheel direction: "); + txt.append(IntToString(event.direction)); + + if(event.type == WheelEvent::MOUSE_WHEEL) + txt.append("\n Wheel type: MOUSE_WHEEL"); + if(event.type == WheelEvent::CUSTOM_WHEEL) + txt.append("\n Wheel type: CUSTOM_WHEEL"); + + this->txtWheelData.SetProperty( TextLabel::Property::TEXT, txt ); + this->txtWheelData.SetProperty( TextLabel::Property::POINT_SIZE, 7.0f ); + this->txtWheelData.SetProperty(TextLabel::Property::TEXT_COLOR,Color::CYAN); return true; } bool TBTDaliActorView::cbButtonClicked(Button button) diff --git a/tbtcoreapp-dali/src/view/tbt-dali-app-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-app-view.cpp index 78fd6bf..8b9b115 100644 --- a/tbtcoreapp-dali/src/view/tbt-dali-app-view.cpp +++ b/tbtcoreapp-dali/src/view/tbt-dali-app-view.cpp @@ -42,25 +42,25 @@ TBTDaliAppView::TBTDaliAppView(Application& mApplication, app_control_h _control Property::Map ctl; Property::Map size; - ctl["lbl1"]=" Terminate signal not call"; + //ctl["lbl1"]=" Terminate signal not call"; ctl["lbl2"]=" Pause signal not call"; ctl["lbl3"]=" Idle signal not call"; ctl["lbl4"]=" AppControl signal not call"; - ctl["lbl5"]=" Battery low signal not call"; + //ctl["lbl5"]=" Battery low signal not call"; ctl["lbl6"]=" Language changed signal not call"; - ctl["lbl7"]=" Memory low signal not call"; + //ctl["lbl7"]=" Memory low signal not call"; ctl["lbl8"]=" Region changed signal not call"; //ctl["lbl9"]=" Reset signal not call"; ctl["lbl10"]=" Resume signal not call"; //ctl["lbl11"]=" Resize signal not call"; - size["lbl1"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + //size["lbl1"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); size["lbl2"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); size["lbl3"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); size["lbl4"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); - size["lbl5"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + //size["lbl5"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); size["lbl6"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); - size["lbl7"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + //size["lbl7"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); size["lbl8"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); //size["lbl9"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); size["lbl10"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); @@ -68,24 +68,24 @@ TBTDaliAppView::TBTDaliAppView(Application& mApplication, app_control_h _control CreateLabelList(ctl,size);//create textlabel list - lblTerminateSignal=TextLabel::DownCast(ctlBody.GetChildAt(0)); - lblPauseSignal=TextLabel::DownCast(ctlBody.GetChildAt(1)); - lblIdleSignal=TextLabel::DownCast(ctlBody.GetChildAt(2)); - lblAppControlSignal=TextLabel::DownCast(ctlBody.GetChildAt(3)); - lblBatteryLowSignal=TextLabel::DownCast(ctlBody.GetChildAt(4)); - lblLanguageChangedSignal=TextLabel::DownCast(ctlBody.GetChildAt(5)); - lblMemoryLowSignal=TextLabel::DownCast(ctlBody.GetChildAt(6)); - lblRegionChangedSignal=TextLabel::DownCast(ctlBody.GetChildAt(7)); + //lblTerminateSignal=TextLabel::DownCast(ctlBody.GetChildAt(0)); + lblPauseSignal=TextLabel::DownCast(ctlBody.GetChildAt(0)); + lblIdleSignal=TextLabel::DownCast(ctlBody.GetChildAt(1)); + lblAppControlSignal=TextLabel::DownCast(ctlBody.GetChildAt(2)); + //lblBatteryLowSignal=TextLabel::DownCast(ctlBody.GetChildAt(4)); + lblLanguageChangedSignal=TextLabel::DownCast(ctlBody.GetChildAt(3)); + //lblMemoryLowSignal=TextLabel::DownCast(ctlBody.GetChildAt(6)); + lblRegionChangedSignal=TextLabel::DownCast(ctlBody.GetChildAt(4)); //lblResetSignal=TextLabel::DownCast(ctlBody.GetChildAt(8)); - lblResumeSignal=TextLabel::DownCast(ctlBody.GetChildAt(8)); + lblResumeSignal=TextLabel::DownCast(ctlBody.GetChildAt(5)); //lblResizeSignal=TextLabel::DownCast(ctlBody.GetChildAt(10)); mApplication.TerminateSignal().Connect( this, &TBTDaliAppView::OnTerminate); mApplication.PauseSignal().Connect( this, &TBTDaliAppView::OnPause ); mApplication.AddIdle( MakeCallback( this, &TBTDaliAppView::OnIdle ) ); - mApplication.BatteryLowSignal().Connect( this, &TBTDaliAppView::OnApplicationBatteryLowSignalCallback ); + //mApplication.BatteryLowSignal().Connect( this, &TBTDaliAppView::OnApplicationBatteryLowSignalCallback ); mApplication.LanguageChangedSignal().Connect(this, &TBTDaliAppView::OnApplicationLanguageChangedSignalCallback ); - mApplication.MemoryLowSignal().Connect(this, &TBTDaliAppView::OnApplicationMemoryLowSignalCallback); + //mApplication.MemoryLowSignal().Connect(this, &TBTDaliAppView::OnApplicationMemoryLowSignalCallback); mApplication.RegionChangedSignal().Connect(this, &TBTDaliAppView::OnApplicationRegionChangedSignalCallback); //mApplication.ResetSignal().Connect(this, &TBTDaliAppView::OnApplicationResetSignalCallback); mApplication.ResumeSignal().Connect(this, &TBTDaliAppView::OnApplicationResumeSignalCallback); @@ -94,7 +94,7 @@ TBTDaliAppView::TBTDaliAppView(Application& mApplication, app_control_h _control stage.ContextLostSignal().Connect(this,&TBTDaliAppView::onContextLost); stage.ContextRegainedSignal().Connect(this,&TBTDaliAppView::onContextRegain); - lblAppControlSignal.SetProperty(TextLabel::Property::TEXT," App control signal called"); + lblAppControlSignal.SetProperty(TextLabel::Property::TEXT," App control signal called"); lblAppControlSignal.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); lblAppControlSignal.SetProperty(TextLabel::Property::POINT_SIZE,8); } @@ -136,9 +136,9 @@ bool TBTDaliAppView::resizeButtonClicked(Button) void TBTDaliAppView::OnTerminate(Application& app) { DBG("DaliTestController::OnTerminate"); - lblTerminateSignal.SetProperty(TextLabel::Property::TEXT," Terminate signal called"); - lblTerminateSignal.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); - lblTerminateSignal.SetProperty(TextLabel::Property::POINT_SIZE, 8); +// lblTerminateSignal.SetProperty(TextLabel::Property::TEXT," Terminate signal called"); +// lblTerminateSignal.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); +// lblTerminateSignal.SetProperty(TextLabel::Property::POINT_SIZE, 8); } void TBTDaliAppView::OnPause(Application& app) { @@ -155,13 +155,13 @@ void TBTDaliAppView::OnIdle() lblIdleSignal.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); lblIdleSignal.SetProperty(TextLabel::Property::POINT_SIZE, 8); } -void TBTDaliAppView::OnApplicationBatteryLowSignalCallback(Application& app) -{ - DBG("DaliTestController::OnApplicationBatteryLowSignalCallback"); - lblBatteryLowSignal.SetProperty(TextLabel::Property::TEXT," Battery signal called"); - lblBatteryLowSignal.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); - lblBatteryLowSignal.SetProperty(TextLabel::Property::POINT_SIZE, 8); -} +//void TBTDaliAppView::OnApplicationBatteryLowSignalCallback(Application& app) +//{ +// DBG("DaliTestController::OnApplicationBatteryLowSignalCallback"); +// lblBatteryLowSignal.SetProperty(TextLabel::Property::TEXT," Battery signal called"); +// lblBatteryLowSignal.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); +// lblBatteryLowSignal.SetProperty(TextLabel::Property::POINT_SIZE, 8); +//} void TBTDaliAppView::OnApplicationLanguageChangedSignalCallback(Application&) { DBG("DaliTestController::OnApplicationLanguageChangedSignalCallback"); @@ -169,13 +169,13 @@ void TBTDaliAppView::OnApplicationLanguageChangedSignalCallback(Application&) lblLanguageChangedSignal.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); lblLanguageChangedSignal.SetProperty(TextLabel::Property::POINT_SIZE, 8); } -void TBTDaliAppView::OnApplicationMemoryLowSignalCallback(Application& app) -{ - DBG("DaliTestController::OnApplicationMemoryLowSignalCallback"); - lblMemoryLowSignal.SetProperty(TextLabel::Property::TEXT," Memory low signal called"); - lblMemoryLowSignal.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); - lblMemoryLowSignal.SetProperty(TextLabel::Property::POINT_SIZE, 8); -} +//void TBTDaliAppView::OnApplicationMemoryLowSignalCallback(Application& app) +//{ +// DBG("DaliTestController::OnApplicationMemoryLowSignalCallback"); +// lblMemoryLowSignal.SetProperty(TextLabel::Property::TEXT," Memory low signal called"); +// lblMemoryLowSignal.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); +// lblMemoryLowSignal.SetProperty(TextLabel::Property::POINT_SIZE, 8); +//} void TBTDaliAppView::OnApplicationRegionChangedSignalCallback(Application& app) { DBG("DaliTestController::OnApplicationRegionChangedSignalCallback"); diff --git a/tbtcoreapp-dali/src/view/tbt-dali-gesture-detector-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-gesture-detector-view.cpp deleted file mode 100644 index 5140b4d..0000000 --- a/tbtcoreapp-dali/src/view/tbt-dali-gesture-detector-view.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *******************************************************************************/ -/** - * @file tbt-dali-gesture-detector-view.cpp - * @brief To test functionality of dali gesture detector - * - * @author Jahangir Alam(ja.alam@samsung.com) - * @date July, 2016 - * @credit - * - */ - -#include "view/tbt-dali-gesture-detector-view.h" - -TBTDaliGestureDetectorView::TBTDaliGestureDetectorView(Application& mApplication, app_control_h _control) : - UiUtils(mApplication, _control) { - - Init("Gesture Detector");//initialize the common view - mInfoText=std::string("")+ - "\nTo perform the test:" - "\n1. Run DALi Gesture Detector." - "\n2. Perform the long press, pinch and pan gesture." - "\n3. If the corresponding event signals mgs" - " are changed then press Pass. " - "Otherwise, press Fail"; - - Stage stage = Stage::GetCurrent(); - Vector2 stageSize = stage.GetSize(); - - Property::Map ctl; - ctl["lbl1"]="Long press gesture detector signal not call"; - ctl["lbl2"]="Pinch gesture detector signal not call"; - ctl["lbl3"]="Pan gesture detector signal not call"; - - Property::Map size; - size["lbl1"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); - size["lbl2"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); - size["lbl3"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); - - CreateLabelList(ctl,size);//create textlabel list - lblLongPress=TextLabel::DownCast(ctlBody.GetChildAt(0)); - lblPinch=TextLabel::DownCast(ctlBody.GetChildAt(1)); - lblpan=TextLabel::DownCast(ctlBody.GetChildAt(2)); - - longpressgesture=LongPressGestureDetector::New(); - longpressgesture.Attach(ctlBody); - longpressgesture.DetectedSignal().Connect(this, &TBTDaliGestureDetectorView::OnLongPressGestureDetector); - - pinchgesture=PinchGestureDetector::New(); - pinchgesture.Attach(ctlBody); - pinchgesture.DetectedSignal().Connect(this, &TBTDaliGestureDetectorView::OnPinchGestureDetector); - - panGesture=PanGestureDetector::New(); - panGesture.Attach(ctlBody); - panGesture.DetectedSignal().Connect(this, &TBTDaliGestureDetectorView::OnPanGestureDetector); -} -void TBTDaliGestureDetectorView::OnLongPressGestureDetector(Actor actor, const LongPressGesture& gesture) -{ - DBG("In TBTDaliGestureDetectorView::OnLongPressGestureDetector"); - lblLongPress.SetProperty(TextLabel::Property::TEXT," Long press gesture detector signal called"); - lblLongPress.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); - lblLongPress.SetProperty(TextLabel::Property::POINT_SIZE,9); -} -void TBTDaliGestureDetectorView::OnPinchGestureDetector(Actor actor, const PinchGesture& gesture) -{ - DBG("In TBTDaliGestureDetectorView::OnPinchGestureDetector"); - lblPinch.SetProperty(TextLabel::Property::TEXT," Pinch gesture detector signal called"); - lblPinch.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); - lblPinch.SetProperty(TextLabel::Property::POINT_SIZE,9); -} - -void TBTDaliGestureDetectorView::OnPanGestureDetector(Actor actor, const PanGesture& gesture) -{ - DBG("In TBTDaliGestureDetectorView::OnPanGestureDetector"); - lblpan.SetProperty(TextLabel::Property::TEXT," Pan gesture detector signal called"); - lblpan.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); - lblpan.SetProperty(TextLabel::Property::POINT_SIZE,9); -} diff --git a/tbtcoreapp-dali/src/view/tbt-dali-long-press-gesture-double-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-long-press-gesture-double-view.cpp new file mode 100644 index 0000000..0cd9208 --- /dev/null +++ b/tbtcoreapp-dali/src/view/tbt-dali-long-press-gesture-double-view.cpp @@ -0,0 +1,120 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-long-press-gesture-double-view.cpp + * @brief To test functionality of dali gesture detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date October, 2016 + * @credit + * + */ + +#include "view/tbt-dali-long-press-gesture-double-view.h" + +TBTDaliLongPressGestureDoubleView::TBTDaliLongPressGestureDoubleView(Application& mApplication, app_control_h _control) : + UiUtils(mApplication, _control) { + + Init("Long Press Gesture Double Touch");//initialize the common view + mInfoText=std::string("")+ + "\nTo perform the test:" + "\n1. Run DALi Long Press Gesture Double Touch." + "\n2. Perform the long press gesture with double touch" + "\n3. If the corresponding event signals mgs and touch data" + " are changed then press Pass. " + "Otherwise, press Fail"; + + Stage stage = Stage::GetCurrent(); + + Property::Map ctl; + ctl["lbl1"]="Long press gesture detector signal not call"; + ctl["lbl2"]=""; + //ctl["lbl3"]="Pan gesture detector signal not call"; + + Property::Map size; + size["lbl1"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + size["lbl2"]=Vector2(bodySize.width, 5*TEXTLABEL_HEIGHT * bodySize.height); + //size["lbl3"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + + CreateLabelList(ctl,size);//create textlabel list + lblLongPress=TextLabel::DownCast(ctlBody.GetChildAt(0)); + lblPressData=TextLabel::DownCast(ctlBody.GetChildAt(1)); + //lblpan=TextLabel::DownCast(ctlBody.GetChildAt(2)); + + touchesRequired=2; + longpressgesturedetector=LongPressGestureDetector::New(touchesRequired); + longpressgesturedetector.Attach(ctlBody); + longpressgesturedetector.DetectedSignal().Connect(this, &TBTDaliLongPressGestureDoubleView::OnLongPressGestureDetector); +} +void TBTDaliLongPressGestureDoubleView::OnLongPressGestureDetector(Actor actor, const LongPressGesture& gesture) +{ + DBG("In TBTDaliLongPressGestureDoubleView::OnLongPressGestureDetector"); + string txt; + + lblLongPress.SetProperty(TextLabel::Property::TEXT," Long press gesture detector signal called"); + lblLongPress.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblLongPress.SetProperty(TextLabel::Property::POINT_SIZE,9); + + LongPressGesture gestureCpy(gesture); + LongPressGesture gestureAss=gesture; + + if(gestureCpy.numberOfTouches != gestureAss.numberOfTouches) + DBG("LongPressGesture copy constructor and assignment operation not work properly."); + + //touch count + if(gestureCpy.numberOfTouches != touchesRequired) + DBG(" number Of touches mismatch"); + txt.append("\n #of touch fingers= "); + txt.append(IntToString(gestureCpy.numberOfTouches)); + + DBG("Number of touch = %d",gestureCpy.numberOfTouches); + //screen touch point + txt.append("\n Screen coordinate (x,y)= "); + txt.append(FloatToString(gestureCpy.screenPoint.x)); + txt.append(","+FloatToString(gestureCpy.screenPoint.y)); + //local actor touch point + txt.append("\n Local actor coordinate (x,y)= "); + txt.append(FloatToString(gestureCpy.localPoint.x)); + txt.append(","+FloatToString(gestureCpy.localPoint.y)); + + LongPressGestureDetector longpressgesturedetectorCopy(longpressgesturedetector); + LongPressGestureDetector longpressgesturedetectorAssign=longpressgesturedetector; + + if(longpressgesturedetectorCopy.GetMaximumTouchesRequired() != longpressgesturedetectorAssign.GetMaximumTouchesRequired()) + DBG("Maximum touch required mismatch"); + if(longpressgesturedetectorCopy.GetMinimumTouchesRequired() != longpressgesturedetectorAssign.GetMinimumTouchesRequired()) + DBG("Minimum touch required mismatch"); + + //get min touch point + int min=longpressgesturedetector.GetMinimumTouchesRequired(); + if(min != touchesRequired) + DBG("Minimum touches required mismatch"); + txt.append("\n Minimum Touches Required= "); + txt.append(IntToString(min)); + + //get max touch point + int max=longpressgesturedetector.GetMaximumTouchesRequired(); + if(max != touchesRequired) + DBG("Maximum touches required mismatch"); + txt.append("\n Maximum Touches Required= "); + txt.append(IntToString(max)); + + lblPressData.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblPressData.SetProperty(TextLabel::Property::POINT_SIZE,9); + lblPressData.SetProperty(TextLabel::Property::TEXT,txt); + + longpressgesturedetector.SetTouchesRequired(touchesRequired); +} diff --git a/tbtcoreapp-dali/src/view/tbt-dali-long-press-gesture-multiple-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-long-press-gesture-multiple-view.cpp new file mode 100644 index 0000000..72c391e --- /dev/null +++ b/tbtcoreapp-dali/src/view/tbt-dali-long-press-gesture-multiple-view.cpp @@ -0,0 +1,121 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-long-press-gesture-multiple-view.cpp + * @brief To test functionality of dali gesture detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date October, 2016 + * @credit + * + */ + +#include "view/tbt-dali-long-press-gesture-multiple-view.h" + +TBTDaliLongPressGestureMultipleView::TBTDaliLongPressGestureMultipleView(Application& mApplication, app_control_h _control) : + UiUtils(mApplication, _control) { + + Init("Long Press Gesture Multiple Touch");//initialize the common view + mInfoText=std::string("")+ + "\nTo perform the test:" + "\n1. Run DALi Long Press Gesture Multiple Touches." + "\n2. Perform the long press gesture with multiple fingers" + "\n3. If the corresponding event signals mgs and touch data" + " are changed then press Pass. " + "Otherwise, press Fail"; + + Stage stage = Stage::GetCurrent(); + + Property::Map ctl; + ctl["lbl1"]="Long press gesture detector signal not call"; + ctl["lbl2"]=""; + //ctl["lbl3"]="Pan gesture detector signal not call"; + + Property::Map size; + size["lbl1"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + size["lbl2"]=Vector2(bodySize.width, 5*TEXTLABEL_HEIGHT * bodySize.height); + //size["lbl3"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + + CreateLabelList(ctl,size);//create textlabel list + lblLongPress=TextLabel::DownCast(ctlBody.GetChildAt(0)); + lblPressData=TextLabel::DownCast(ctlBody.GetChildAt(1)); + //lblpan=TextLabel::DownCast(ctlBody.GetChildAt(2)); + + minTouchesRequired=1; + maxTouchesRequired=3; + longpressgesturedetector=LongPressGestureDetector::New(minTouchesRequired,maxTouchesRequired); + longpressgesturedetector.Attach(ctlBody); + longpressgesturedetector.DetectedSignal().Connect(this, &TBTDaliLongPressGestureMultipleView::OnLongPressGestureDetector); +} +void TBTDaliLongPressGestureMultipleView::OnLongPressGestureDetector(Actor actor, const LongPressGesture& gesture) +{ + DBG("In TBTDaliLongPressGestureMultipleView::OnLongPressGestureDetector"); + string txt; + + lblLongPress.SetProperty(TextLabel::Property::TEXT," Long press gesture detector signal called"); + lblLongPress.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblLongPress.SetProperty(TextLabel::Property::POINT_SIZE,9); + + LongPressGesture gestureCpy(gesture); + LongPressGesture gestureAss=gesture; + + if(gestureCpy.numberOfTouches != gestureAss.numberOfTouches) + DBG("LongPressGesture copy constructor and assignment operation not work properly."); + + //touch count + if(gestureCpy.numberOfTouches <1 && gestureCpy.numberOfTouches > 3) + DBG(" number Of touches mismatch"); + txt.append("\n #of touch fingers= "); + txt.append(IntToString(gestureCpy.numberOfTouches)); + + DBG("Number of touch = %d",gestureCpy.numberOfTouches); + //screen touch point + txt.append("\n Screen coordinate (x,y)= "); + txt.append(FloatToString(gestureCpy.screenPoint.x)); + txt.append(","+FloatToString(gestureCpy.screenPoint.y)); + //local actor touch point + txt.append("\n Local actor coordinate (x,y)= "); + txt.append(FloatToString(gestureCpy.localPoint.x)); + txt.append(","+FloatToString(gestureCpy.localPoint.y)); + + LongPressGestureDetector longpressgesturedetectorCopy(longpressgesturedetector); + LongPressGestureDetector longpressgesturedetectorAssign=longpressgesturedetector; + + if(longpressgesturedetectorCopy.GetMaximumTouchesRequired() != longpressgesturedetectorAssign.GetMaximumTouchesRequired()) + DBG("Maximum touch required mismatch"); + if(longpressgesturedetectorCopy.GetMinimumTouchesRequired() != longpressgesturedetectorAssign.GetMinimumTouchesRequired()) + DBG("Minimum touch required mismatch"); + + //get min touch point + int min=longpressgesturedetector.GetMinimumTouchesRequired(); + if(min != minTouchesRequired) + DBG("Minimum touches required mismatch"); + txt.append("\n Minimum Touches Required= "); + txt.append(IntToString(min)); + + //get max touch point + int max=longpressgesturedetector.GetMaximumTouchesRequired(); + if(max != maxTouchesRequired) + DBG("Maximum touches required mismatch"); + txt.append("\n Maximum Touches Required= "); + txt.append(IntToString(max)); + + lblPressData.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblPressData.SetProperty(TextLabel::Property::POINT_SIZE,9); + lblPressData.SetProperty(TextLabel::Property::TEXT,txt); + + longpressgesturedetector.SetTouchesRequired(minTouchesRequired,maxTouchesRequired); +} diff --git a/tbtcoreapp-dali/src/view/tbt-dali-long-press-gesture-single-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-long-press-gesture-single-view.cpp new file mode 100644 index 0000000..31e3bc8 --- /dev/null +++ b/tbtcoreapp-dali/src/view/tbt-dali-long-press-gesture-single-view.cpp @@ -0,0 +1,148 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-long-press-gesture-single-view.cpp + * @brief To test functionality of dali gesture detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date July, 2016 + * @credit + * + */ + +#include "view/tbt-dali-long-press-gesture-single-view.h" + +TBTDaliLongPressGestureSingleView::TBTDaliLongPressGestureSingleView(Application& mApplication, app_control_h _control) : + UiUtils(mApplication, _control) { + + Init("Long Press Gesture Single Touch");//initialize the common view + mInfoText=std::string("")+ + "\nTo perform the test:" + "\n1. Run DALi Long Press Gesture Single Touch." + "\n2. Perform the long press gesture with single touch" + "\n3. If the corresponding event signals mgs and touch data" + " are changed then press Pass. " + "Otherwise, press Fail"; + + Stage stage = Stage::GetCurrent(); + + Property::Map ctl; + ctl["lbl1"]="Long press gesture detector signal not call"; + ctl["lbl2"]=""; + //ctl["lbl3"]="Pan gesture detector signal not call"; + + Property::Map size; + size["lbl1"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + size["lbl2"]=Vector2(bodySize.width, 5*TEXTLABEL_HEIGHT * bodySize.height); + //size["lbl3"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + + CreateLabelList(ctl,size);//create textlabel list + lblLongPress=TextLabel::DownCast(ctlBody.GetChildAt(0)); + lblPressData=TextLabel::DownCast(ctlBody.GetChildAt(1)); + //lblpan=TextLabel::DownCast(ctlBody.GetChildAt(2)); + + touchesRequired=1; + longpressgesturedetector=LongPressGestureDetector::New(); + longpressgesturedetector.Attach(ctlBody); + longpressgesturedetector.DetectedSignal().Connect(this, &TBTDaliLongPressGestureSingleView::OnLongPressGestureDetector); + +// pinchgesture=PinchGestureDetector::New(); +// pinchgesture.Attach(ctlBody); +// pinchgesture.DetectedSignal().Connect(this, &TBTDaliGestureDetectorView::OnPinchGestureDetector); +// +// panGesture=PanGestureDetector::New(); +// panGesture.Attach(ctlBody); +// panGesture.DetectedSignal().Connect(this, &TBTDaliGestureDetectorView::OnPanGestureDetector); +} +void TBTDaliLongPressGestureSingleView::OnLongPressGestureDetector(Actor actor, const LongPressGesture& gesture) +{ + DBG("In TBTDaliLongPressGestureSingleView::OnLongPressGestureDetector"); + string txt; + + lblLongPress.SetProperty(TextLabel::Property::TEXT," Long press gesture detector signal called"); + lblLongPress.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblLongPress.SetProperty(TextLabel::Property::POINT_SIZE,9); + + LongPressGesture gestureCpy(gesture); + LongPressGesture gestureAss(Gesture::Started); + gestureAss=gesture; + + if(gestureCpy.numberOfTouches != gestureAss.numberOfTouches) + DBG("LongPressGesture copy constructor and assignment operation not work properly."); + + //touch count + if(gestureCpy.numberOfTouches != touchesRequired) + DBG(" number Of touches mismatch"); + txt.append("\n #of touch fingers= "); + txt.append(IntToString(gestureCpy.numberOfTouches)); + + DBG("Number of touch = %d",gestureCpy.numberOfTouches); + //screen touch point + txt.append("\n Screen coordinate (x,y)= "); + txt.append(FloatToString(gestureCpy.screenPoint.x)); + txt.append(","+FloatToString(gestureCpy.screenPoint.y)); + //local actor touch point + txt.append("\n Local actor coordinate (x,y)= "); + txt.append(FloatToString(gestureCpy.localPoint.x)); + txt.append(","+FloatToString(gestureCpy.localPoint.y)); + + BaseHandle handle( longpressgesturedetector ); + LongPressGestureDetector downCast=LongPressGestureDetector::DownCast(handle); + + LongPressGestureDetector longpressgesturedetectorCopy(longpressgesturedetector); + LongPressGestureDetector longpressgesturedetectorAssign; + longpressgesturedetectorAssign=longpressgesturedetector; + + if(longpressgesturedetectorCopy.GetMaximumTouchesRequired() != longpressgesturedetectorAssign.GetMaximumTouchesRequired()) + DBG("Maximum touch required mismatch"); + if(longpressgesturedetectorCopy.GetMinimumTouchesRequired() != longpressgesturedetectorAssign.GetMinimumTouchesRequired()) + DBG("Minimum touch required mismatch"); + + //get min touch point + int min=downCast.GetMinimumTouchesRequired(); + if(min != touchesRequired) + DBG("Minimum touches required mismatch"); + txt.append("\n Minimum Touches Required= "); + txt.append(IntToString(min)); + + //get max touch point + int max=downCast.GetMaximumTouchesRequired(); + if(max != touchesRequired) + DBG("Maximum touches required mismatch"); + txt.append("\n Maximum Touches Required= "); + txt.append(IntToString(max)); + + lblPressData.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblPressData.SetProperty(TextLabel::Property::POINT_SIZE,9); + lblPressData.SetProperty(TextLabel::Property::TEXT,txt); + + longpressgesturedetector.SetTouchesRequired(touchesRequired); +} +//void TBTDaliLongPressGestureView::OnPinchGestureDetector(Actor actor, const PinchGesture& gesture) +//{ +// DBG("In TBTDaliLongPressGestureView::OnPinchGestureDetector"); +// lblPinch.SetProperty(TextLabel::Property::TEXT," Pinch gesture detector signal called"); +// lblPinch.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); +// lblPinch.SetProperty(TextLabel::Property::POINT_SIZE,9); +//} +// +//void TBTDaliLongPressGestureView::OnPanGestureDetector(Actor actor, const PanGesture& gesture) +//{ +// DBG("In TBTDaliLongPressGestureView::OnPanGestureDetector"); +// lblpan.SetProperty(TextLabel::Property::TEXT," Pan gesture detector signal called"); +// lblpan.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); +// lblpan.SetProperty(TextLabel::Property::POINT_SIZE,9); +//} diff --git a/tbtcoreapp-dali/src/view/tbt-dali-pan-gesture-angle-direction-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-pan-gesture-angle-direction-view.cpp new file mode 100644 index 0000000..e20f2fa --- /dev/null +++ b/tbtcoreapp-dali/src/view/tbt-dali-pan-gesture-angle-direction-view.cpp @@ -0,0 +1,152 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-pan-gesture-angle-direction-view.cpp + * @brief To test functionality of dali pan gesture and detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date October, 2016 + * @credit + * + */ + +#include "view/tbt-dali-pan-gesture-angle-direction-view.h" + +TBTDaliPanGestureAngleDirectionView::TBTDaliPanGestureAngleDirectionView(Application& mApplication, app_control_h _control) : + UiUtils(mApplication, _control) { + + Init("Pan Gesture With Angle and Direction");//initialize the common view + mInfoText=std::string("")+ + "\nTo perform the test:" + "\n1. Run DALi Pan Gesture Angle and Direction." + "\n2. Perform the pan gesture with right diagonal" + "\n3. Add/Remove angle and direction of pan gesture" + "\n4. If the corresponding event signals mgs and touch data" + " are changed then press Pass. " + "Otherwise, press Fail"; + flag=false; + + Stage stage = Stage::GetCurrent(); + + Property::Map ctl; + ctl["lbl1"]="Pan gesture detector signal not call"; + ctl["lbl2"]=""; + //ctl["lbl3"]="Pan gesture detector signal not call"; + + Property::Map size; + size["lbl1"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + size["lbl2"]=Vector2(bodySize.width, 5*TEXTLABEL_HEIGHT * bodySize.height); + //size["lbl3"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + + CreateLabelList(ctl,size);//create textlabel list + lblPan=TextLabel::DownCast(ctlBody.GetChildAt(0)); + lblPressData=TextLabel::DownCast(ctlBody.GetChildAt(1)); + //lblpan=TextLabel::DownCast(ctlBody.GetChildAt(2)); + + mintouchesRequired=1; + maxtouchesRequired=1; + + pangesturedetector=PanGestureDetector::New(); + //set max min touch required + pangesturedetector.SetMinimumTouchesRequired(mintouchesRequired); + pangesturedetector.SetMaximumTouchesRequired(maxtouchesRequired); + fSetAngle = -0.25f; + fSetThreshold = 0.25f; + + pangesturedetector.Attach(ctlBody); + pangesturedetector.DetectedSignal().Connect(this, &TBTDaliPanGestureAngleDirectionView::OnPanGestureDetector); + + //button + btnAddremove=PushButton::New(); + btnAddremove.SetAnchorPoint(AnchorPoint::BOTTOM_CENTER); + btnAddremove.SetParentOrigin(ParentOrigin::BOTTOM_CENTER); + btnAddremove.SetPosition(0.0f, -10.0f); + btnAddremove.ClickedSignal().Connect(this, &TBTDaliPanGestureAngleDirectionView::OnSetunSetButtonClick); + btnAddremove.SetProperty(Button::Property::UNSELECTED_COLOR, selectedColor); + btnAddremove.SetProperty(Button::Property::SELECTED_COLOR, unSelectedColor); + btnAddremove.SetSize(this->bodySize.width, BUTTON_HEIGHT * bodySize.height); + this->ctlBody.Add(btnAddremove); + if(flag==false) + btnAddremove.SetLabelText("Remove Angle & Direction"); + setUnset(); +} +void TBTDaliPanGestureAngleDirectionView::setUnset() +{ + DBG("In TBTDaliPanGestureAngleDirectionView::setUnset"); + Radian angle = Radian( Math::PI * ( fSetAngle ) ); + Radian threshold = Radian( Math::PI * ( fSetThreshold ) ); + if(flag==false) + { + DBG("flag==false"); + pangesturedetector.AddAngle(angle,threshold); + pangesturedetector.AddDirection( PanGestureDetector::DIRECTION_LEFT, Radian( Math::PI * 0.25 ) ); + flag=true; + btnAddremove.SetLabelText("Remove Angle & Direction"); + } + else + { + DBG("flag==true"); + pangesturedetector.RemoveAngle(angle); + pangesturedetector.RemoveDirection(PanGestureDetector::DIRECTION_LEFT); + pangesturedetector.ClearAngles(); + flag=false; + btnAddremove.SetLabelText("Add Angle & Direction"); + } +} +void TBTDaliPanGestureAngleDirectionView::OnPanGestureDetector(Actor actor, const PanGesture& gesture) +{ + DBG("In TBTDaliPanGestureAngleDirectionView::OnPanGestureDetector"); + lblPan.SetProperty(TextLabel::Property::TEXT," Pan gesture detector signal called"); + lblPan.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblPan.SetProperty(TextLabel::Property::POINT_SIZE,9); + + string txt; + + //check min touch required + unsigned int min=pangesturedetector.GetMinimumTouchesRequired(); + txt.append("\n Min Touch Required: "); + txt.append(IntToString(min)); + if(mintouchesRequired != min) + DBG("Min touch required mismatch with set value (set value=%d, get value=%d)",mintouchesRequired,min); + + //check max touch required + unsigned int max=pangesturedetector.GetMaximumTouchesRequired(); + txt.append("\n Max Touch Required: "); + txt.append(IntToString(max)); + if(maxtouchesRequired != max) + DBG("Max touch required mismatch with set value (set value=%d, get value=%d)",maxtouchesRequired,max); + + //get angle + + size_t i=pangesturedetector.GetAngleCount(); + PanGestureDetector::AngleThresholdPair angle = pangesturedetector.GetAngle( i-1 ); + float value=fabs( (angle.first - ( Radian( Math::PI * ( fSetAngle ) ) ) ) ); + txt.append("\n Pan Angle: "); + txt.append(FloatToString(value)); + + + lblPressData.SetProperty(TextLabel::Property::TEXT, txt); + lblPressData.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblPressData.SetProperty(TextLabel::Property::POINT_SIZE,9); +} +bool TBTDaliPanGestureAngleDirectionView::OnSetunSetButtonClick(Button button) +{ + DBG("In TBTDaliPanGestureAngleDirectionView::OnSetunSetButtonClick"); + + setUnset(); + + return true; +} diff --git a/tbtcoreapp-dali/src/view/tbt-dali-pan-gesture-double-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-pan-gesture-double-view.cpp new file mode 100644 index 0000000..ec089d1 --- /dev/null +++ b/tbtcoreapp-dali/src/view/tbt-dali-pan-gesture-double-view.cpp @@ -0,0 +1,108 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-pan-gesture-double-view.cpp + * @brief To test functionality of dali pan gesture and detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date October, 2016 + * @credit + * + */ + +#include "view/tbt-dali-pan-gesture-double-view.h" + +TBTDaliPanGestureDoubleView::TBTDaliPanGestureDoubleView(Application& mApplication, app_control_h _control) : + UiUtils(mApplication, _control) { + + Init("Pan Gesture Double Touch");//initialize the common view + mInfoText=std::string("")+ + "\nTo perform the test:" + "\n1. Run DALi Pan Gesture Double Touch." + "\n2. Perform the pan gesture with double touch" + "\n3. If the corresponding event signals mgs and touch data" + " are changed then press Pass. " + "Otherwise, press Fail"; + + Stage stage = Stage::GetCurrent(); + + Property::Map ctl; + ctl["lbl1"]="Pan gesture detector signal not call"; + ctl["lbl2"]=""; + //ctl["lbl3"]="Pan gesture detector signal not call"; + + Property::Map size; + size["lbl1"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + size["lbl2"]=Vector2(bodySize.width, 5*TEXTLABEL_HEIGHT * bodySize.height); + //size["lbl3"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + + CreateLabelList(ctl,size);//create textlabel list + lblPan=TextLabel::DownCast(ctlBody.GetChildAt(0)); + lblPressData=TextLabel::DownCast(ctlBody.GetChildAt(1)); + //lblpan=TextLabel::DownCast(ctlBody.GetChildAt(2)); + + mintouchesRequired=2; + maxtouchesRequired=5; + + pangesturedetector=PanGestureDetector::New(); + //set max min touch required + pangesturedetector.SetMinimumTouchesRequired(mintouchesRequired); + pangesturedetector.SetMaximumTouchesRequired(maxtouchesRequired); + + pangesturedetector.Attach(ctlBody); + pangesturedetector.DetectedSignal().Connect(this, &TBTDaliPanGestureDoubleView::OnPanGestureDetector); +} +void TBTDaliPanGestureDoubleView::OnPanGestureDetector(Actor actor, const PanGesture& gesture) +{ + DBG("In TBTDaliPanGestureDoubleView::OnPanGestureDetector"); + lblPan.SetProperty(TextLabel::Property::TEXT," Pan gesture detector signal called"); + lblPan.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblPan.SetProperty(TextLabel::Property::POINT_SIZE,9); + + string txt; + + //check min touch required + unsigned int min=pangesturedetector.GetMinimumTouchesRequired(); + txt.append("\n Min Touch Required: "); + txt.append(IntToString(min)); + if(mintouchesRequired != min) + DBG("Min touch required mismatch with set value (set value=%d, get value=%d)",mintouchesRequired,min); + + //check max touch required + unsigned int max=pangesturedetector.GetMaximumTouchesRequired(); + txt.append("\n Max Touch Required: "); + txt.append(IntToString(max)); + if(maxtouchesRequired != max) + DBG("Max touch required mismatch with set value (set value=%d, get value=%d)",maxtouchesRequired,max); + + //set pan properties + + PanGesture pan(Gesture::Started); + pan.velocity=Vector2(100.0f,100.0f); + pan.screenVelocity=Vector2(100.0f,100.0f); + pan.position=Vector2(100.0f,100.0f); + pan.screenPosition=Vector2(100.0f,100.0f); + pan.numberOfTouches=2; + + BaseHandle handle( pangesturedetector ); + PanGestureDetector downCast=PanGestureDetector::DownCast(handle); + + downCast.SetPanGestureProperties(pan); + + lblPressData.SetProperty(TextLabel::Property::TEXT, txt); + lblPressData.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblPressData.SetProperty(TextLabel::Property::POINT_SIZE,9); +} diff --git a/tbtcoreapp-dali/src/view/tbt-dali-pan-gesture-single-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-pan-gesture-single-view.cpp new file mode 100644 index 0000000..b53cef1 --- /dev/null +++ b/tbtcoreapp-dali/src/view/tbt-dali-pan-gesture-single-view.cpp @@ -0,0 +1,147 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-pan-gesture-single-view.cpp + * @brief To test functionality of dali pan gesture and detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date October, 2016 + * @credit + * + */ + +#include "view/tbt-dali-pan-gesture-single-view.h" + +TBTDaliPanGestureSingleView::TBTDaliPanGestureSingleView(Application& mApplication, app_control_h _control) : + UiUtils(mApplication, _control) { + + Init("Pan Gesture Single Touch");//initialize the common view + mInfoText=std::string("")+ + "\nTo perform the test:" + "\n1. Run DALi Pan Gesture Single Touch." + "\n2. Perform the pan gesture with single touch" + "\n3. If the corresponding event signals mgs and touch data" + " are changed then press Pass. " + "Otherwise, press Fail"; + + Stage stage = Stage::GetCurrent(); + + Property::Map ctl; + ctl["lbl1"]="Pan gesture detector signal not call"; + ctl["lbl2"]=""; + //ctl["lbl3"]="Pan gesture detector signal not call"; + + Property::Map size; + size["lbl1"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + size["lbl2"]=Vector2(bodySize.width, 5*TEXTLABEL_HEIGHT * bodySize.height); + //size["lbl3"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + + CreateLabelList(ctl,size);//create textlabel list + lblPan=TextLabel::DownCast(ctlBody.GetChildAt(0)); + lblPressData=TextLabel::DownCast(ctlBody.GetChildAt(1)); + //lblpan=TextLabel::DownCast(ctlBody.GetChildAt(2)); + + mintouchesRequired=1; + maxtouchesRequired=1; + + pangesturedetector=PanGestureDetector::New(); + pangesturedetector.Attach(ctlBody); + pangesturedetector.DetectedSignal().Connect(this, &TBTDaliPanGestureSingleView::OnPanGestureDetector); +} +void TBTDaliPanGestureSingleView::OnPanGestureDetector(Actor actor, const PanGesture& gesture) +{ + DBG("In TBTDaliPanGestureSingleView::OnPanGestureDetector"); + lblPan.SetProperty(TextLabel::Property::TEXT," Pan gesture detector signal called"); + lblPan.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblPan.SetProperty(TextLabel::Property::POINT_SIZE,9); + + string txt; + + //copy constructor and assignment operator + + PanGestureDetector copy(pangesturedetector); + PanGestureDetector assign; + assign=pangesturedetector; + + if(copy.GetMinimumTouchesRequired() != mintouchesRequired | copy.GetMaximumTouchesRequired() != maxtouchesRequired) + DBG("Pan gesture copy constructor failed."); + if(assign.GetMinimumTouchesRequired() != mintouchesRequired | assign.GetMaximumTouchesRequired() != maxtouchesRequired) + DBG("Pan gesture assignment operator failed."); + + //check default min touch + unsigned int min=pangesturedetector.GetMinimumTouchesRequired(); + if(mintouchesRequired != min) + DBG("Default min touch required is not 1 get value is %d",min); + txt.append("\n Min Touch Required: "); + txt.append(IntToString(min)); + + //check default max touch + unsigned int max=pangesturedetector.GetMaximumTouchesRequired(); + if(maxtouchesRequired != max) + DBG("Default max touch required is not 1 get value is %d",max); + txt.append("\n Max Touch Required: "); + txt.append(IntToString(max)); + + //set max min touch required + pangesturedetector.SetMinimumTouchesRequired(mintouchesRequired); + pangesturedetector.SetMaximumTouchesRequired(maxtouchesRequired); + + min=pangesturedetector.GetMinimumTouchesRequired(); + if(mintouchesRequired != min) + DBG("Min touch required mismatch with set value (set value=%d, get value=%d)",mintouchesRequired,min); + max=pangesturedetector.GetMaximumTouchesRequired(); + if(maxtouchesRequired != max) + DBG("Max touch required mismatch with set value (set value=%d, get value=%d)",maxtouchesRequired,max); + + //Pan Gesture + + //check copy,default constructor & assignment operator + PanGesture copyPan(gesture); + PanGesture assignPan(Gesture::Started); + assignPan=gesture; + + PanGesture defaultPan; + defaultPan=gesture; + + float speed=gesture.GetSpeed(); + + if(speed != copyPan.GetSpeed()) + DBG("Pan gesture copy constructor failed."); + if(speed != assignPan.GetSpeed()) + DBG("Pan gesture assignment operator failed."); + if(speed != defaultPan.GetSpeed()) + DBG("Pan gesture default constructor failed."); + + //speed + txt.append("\n Gesture speed: "); + txt.append(FloatToString(speed)); + //distance + float distance=gesture.GetDistance(); + txt.append("\n Gesture distance: "); + txt.append(FloatToString(distance)); + //screen speed + float screenSpeed=gesture.GetScreenSpeed(); + txt.append("\n Gesture screen speed: "); + txt.append(FloatToString(screenSpeed)); + // + float screenDistance=gesture.GetScreenDistance(); + txt.append("\n Gesture screen distance: "); + txt.append(FloatToString(screenDistance)); + + lblPressData.SetProperty(TextLabel::Property::TEXT, txt); + lblPressData.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblPressData.SetProperty(TextLabel::Property::POINT_SIZE,9); +} diff --git a/tbtcoreapp-dali/src/view/tbt-dali-pinch-gesture-single-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-pinch-gesture-single-view.cpp new file mode 100644 index 0000000..030265c --- /dev/null +++ b/tbtcoreapp-dali/src/view/tbt-dali-pinch-gesture-single-view.cpp @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-pinch-gesture-single-view.cpp + * @brief To test functionality of dali pinch gesture detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date November, 2016 + * @credit + * + */ + +#include "view/tbt-dali-pinch-gesture-single-view.h" + +TBTDaliPinchGestureSingleView::TBTDaliPinchGestureSingleView(Application& mApplication, app_control_h _control) : + UiUtils(mApplication, _control) { + + Init("Pinch Gesture");//initialize the common view + mInfoText=std::string("")+ + "\nTo perform the test:" + "\n1. Run DALi Pinch Gesture." + "\n2. Perform the pinch gesture" + "\n3. If the corresponding event signals mgs and touch data" + " are changed then press Pass. " + "Otherwise, press Fail"; + + Stage stage = Stage::GetCurrent(); + + Property::Map ctl; + ctl["lbl1"]="Pinch gesture detector signal not call"; + ctl["lbl2"]=""; + //ctl["lbl3"]="Pan gesture detector signal not call"; + + Property::Map size; + size["lbl1"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + size["lbl2"]=Vector2(bodySize.width, 5*TEXTLABEL_HEIGHT * bodySize.height); + //size["lbl3"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + + CreateLabelList(ctl,size);//create textlabel list + lblPinch=TextLabel::DownCast(ctlBody.GetChildAt(0)); + lblPinchData=TextLabel::DownCast(ctlBody.GetChildAt(1)); + //lblpan=TextLabel::DownCast(ctlBody.GetChildAt(2)); + + pinchgesturedetector=PinchGestureDetector::New(); + pinchgesturedetector.Attach(ctlBody); + pinchgesturedetector.DetectedSignal().Connect(this, &TBTDaliPinchGestureSingleView::OnPinchGestureDetector); +} +void TBTDaliPinchGestureSingleView::OnPinchGestureDetector(Actor actor, const PinchGesture& gesture) +{ + DBG("In TBTDaliPinchGestureSingleView::OnLongPressGestureDetector"); + string txt; + + lblPinch.SetProperty(TextLabel::Property::TEXT," Pinch gesture detector signal called"); + lblPinch.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblPinch.SetProperty(TextLabel::Property::POINT_SIZE,9); + + BaseHandle handle( pinchgesturedetector ); + PinchGestureDetector downCast=PinchGestureDetector::DownCast(handle); + + if(!downCast) + DBG("Pinch gesture detector downcast failed."); + + PinchGestureDetector copy(pinchgesturedetector); + if(copy != pinchgesturedetector) + DBG("Pinch gesture detector copy constructor failed."); + + PinchGestureDetector assign; + assign=pinchgesturedetector; + + if(assign != pinchgesturedetector) + DBG("Pinch gesture detector assignment operator failed."); + + PinchGesture asignpinch(Gesture::Started); + asignpinch=gesture; + + PinchGesture copyPinch(gesture); + + lblPinchData.SetProperty(TextLabel::Property::TEXT,txt); + lblPinchData.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblPinchData.SetProperty(TextLabel::Property::POINT_SIZE,9); +} diff --git a/tbtcoreapp-dali/src/view/tbt-dali-scroll-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-scroll-view.cpp index c10de19..3c262b7 100644 --- a/tbtcoreapp-dali/src/view/tbt-dali-scroll-view.cpp +++ b/tbtcoreapp-dali/src/view/tbt-dali-scroll-view.cpp @@ -87,10 +87,10 @@ TBTDaliScrollView::TBTDaliScrollView(Application& mApplication, app_control_h _c scrollView.SetMaxOvershoot(1, 1); scrollView.SetAxisAutoLock(true); - //scrollView.RemoveScrollingDirection( Radian(0)); + scrollView.RemoveScrollingDirection( Radian(0)); if(scrollView.GetAxisAutoLock() == false) { - DBG("Error"); + DBG("Error in GetAxisAutoLock()"); } scrollBar = ScrollBar::New(Toolkit::ScrollBar::Horizontal); scrollBar.SetParentOrigin(ParentOrigin::TOP_LEFT); diff --git a/tbtcoreapp-dali/src/view/tbt-dali-stage-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-stage-view.cpp index 6afeb3a..0b16e1a 100644 --- a/tbtcoreapp-dali/src/view/tbt-dali-stage-view.cpp +++ b/tbtcoreapp-dali/src/view/tbt-dali-stage-view.cpp @@ -153,6 +153,50 @@ void TBTDaliStageView::NewWindow(void) void TBTDaliStageView::onKeyEvent(const KeyEvent& keyevent) { DBG("In TBTDaliStageView::onKeyEvent"); + string txt; + int keycode=keyevent.keyCode; + txt.append("keyCode: "); + txt.append(IntToString(keycode)); + DBG("%s",txt.c_str()); + + int keymoddifier=keyevent.keyModifier; + txt.append("keyModifier: "); + txt.append(IntToString(keymoddifier)); + DBG("%s",txt.c_str()); + + string keypress=keyevent.keyPressed; + txt.append("keyPressed: "); + txt.append(keypress); + DBG("%s",txt.c_str()); + + string keyname=keyevent.keyPressedName; + txt.append("keyPressedName: "); + txt.append(keyname); + DBG("%s",txt.c_str()); + + KeyEvent::State state=keyevent.state; + + if(state == keyevent.Down) + DBG("Key Down"); + if(state == keyevent.Up) + DBG("Key Up"); + + unsigned long int time= keyevent.time; + txt.append("time: "); + txt.append(LongToString(time)); + DBG("%s",txt.c_str()); + + bool alt=keyevent.IsAltModifier(); + if(alt) + DBG("Press Alt Modifier"); + bool ctrl=keyevent.IsCtrlModifier(); + if(ctrl) + DBG("Press ctrl Modifier"); + + bool shift=keyevent.IsShiftModifier(); + if(shift) + DBG("Press shift Modifier"); + txtKeyEvent.SetProperty(TextLabel::Property::TEXT," Key event is called"); txtKeyEvent.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); } diff --git a/tbtcoreapp-dali/src/view/tbt-dali-tap-gesture-muliple-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-tap-gesture-muliple-view.cpp new file mode 100644 index 0000000..0824c3e --- /dev/null +++ b/tbtcoreapp-dali/src/view/tbt-dali-tap-gesture-muliple-view.cpp @@ -0,0 +1,126 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-tap-gesture-multiple-view.cpp + * @brief To test functionality of dali gesture detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date November, 2016 + * @credit + * + */ + +#include "view/tbt-dali-tap-gesture-multiple-view.h" + +TBTDaliTapGestureMultipleView::TBTDaliTapGestureMultipleView(Application& mApplication, app_control_h _control) : + UiUtils(mApplication, _control) { + + Init("Tap Gesture Multiple Tap");//initialize the common view + mInfoText=std::string("")+ + "\nTo perform the test:" + "\n1. Run DALi Tap Press Gesture Multiple." + "\n2. Perform the tap gesture with multiple tap" + "\n3. If the corresponding event signals mgs and touch data" + " are changed then press Pass. " + "Otherwise, press Fail"; + + Stage stage = Stage::GetCurrent(); + + Property::Map ctl; + ctl["lbl1"]="Tap gesture detector signal not call"; + ctl["lbl2"]=""; + + Property::Map size; + size["lbl1"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + size["lbl2"]=Vector2(bodySize.width, 5*TEXTLABEL_HEIGHT * bodySize.height); + //size["lbl3"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + + CreateLabelList(ctl,size);//create textlabel list + lblTap=TextLabel::DownCast(ctlBody.GetChildAt(0)); + lblTapData=TextLabel::DownCast(ctlBody.GetChildAt(1)); + //lblpan=TextLabel::DownCast(ctlBody.GetChildAt(2)); + + minTabRequired=2; + maxTabRequired=5; + tapgesturedetector=TapGestureDetector::New(); + tapgesturedetector.SetMaximumTapsRequired(maxTabRequired); + tapgesturedetector.SetMinimumTapsRequired(minTabRequired); + tapgesturedetector.Attach(ctlBody); + tapgesturedetector.DetectedSignal().Connect(this, &TBTDaliTapGestureMultipleView::OnTapGestureDetector); +} +void TBTDaliTapGestureMultipleView::OnTapGestureDetector(Actor actor, const TapGesture& gesture) +{ + DBG("In TBTDaliTapGestureMultipleView::OnTapGestureDetector"); + string txt; + + lblTap.SetProperty(TextLabel::Property::TEXT," Tap gesture detector signal called"); + lblTap.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblTap.SetProperty(TextLabel::Property::POINT_SIZE,9); + + TapGesture gestureCpy(gesture); + TapGesture gestureAss; + gestureAss=gesture; + + if(gestureCpy.numberOfTouches != gestureAss.numberOfTouches) + DBG("TapGesture copy constructor and assignment operation not work properly."); + + //touch count + txt.append("\n #of touch fingers= "); + txt.append(IntToString(gestureCpy.numberOfTouches)); + //tap count + txt.append("\n #of Tap count= "); + txt.append(IntToString(gestureCpy.numberOfTaps)); + + + //screen touch point + txt.append("\n Screen coordinate (x,y)= "); + txt.append(FloatToString(gestureCpy.screenPoint.x)); + txt.append(","+FloatToString(gestureCpy.screenPoint.y)); + //local actor touch point + txt.append("\n Local actor coordinate (x,y)= "); + txt.append(FloatToString(gestureCpy.localPoint.x)); + txt.append(","+FloatToString(gestureCpy.localPoint.y)); + + BaseHandle handle( tapgesturedetector ); + TapGestureDetector downCast=TapGestureDetector::DownCast(handle); + + TapGestureDetector tapgesturedetectorCopy(tapgesturedetector); + TapGestureDetector tapgesturedetectorAssign; + tapgesturedetectorAssign=tapgesturedetector; + + if(tapgesturedetectorCopy.GetMaximumTapsRequired() != tapgesturedetectorAssign.GetMaximumTapsRequired()) + DBG("Maximum touch required mismatch"); + if(tapgesturedetectorCopy.GetMinimumTapsRequired() != tapgesturedetectorAssign.GetMinimumTapsRequired()) + DBG("Minimum touch required mismatch"); + + //get min touch point + int min=downCast.GetMinimumTapsRequired(); + if(min != minTabRequired) + DBG("Minimum touches required mismatch"); + txt.append("\n Minimum Touches Required= "); + txt.append(IntToString(min)); + + //get max touch point + int max=downCast.GetMaximumTapsRequired(); + if(max != maxTabRequired) + DBG("Maximum touches required mismatch"); + txt.append("\n Maximum Touches Required= "); + txt.append(IntToString(max)); + + lblTapData.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblTapData.SetProperty(TextLabel::Property::POINT_SIZE,9); + lblTapData.SetProperty(TextLabel::Property::TEXT,txt); +} diff --git a/tbtcoreapp-dali/src/view/tbt-dali-tap-gesture-single-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-tap-gesture-single-view.cpp new file mode 100644 index 0000000..6776522 --- /dev/null +++ b/tbtcoreapp-dali/src/view/tbt-dali-tap-gesture-single-view.cpp @@ -0,0 +1,124 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-dali-tap-gesture-single-view.cpp + * @brief To test functionality of dali gesture detector + * + * @author Jahangir Alam(ja.alam@samsung.com) + * @date November, 2016 + * @credit + * + */ + +#include "view/tbt-dali-tap-gesture-single-view.h" + +TBTDaliTapGestureSingleView::TBTDaliTapGestureSingleView(Application& mApplication, app_control_h _control) : + UiUtils(mApplication, _control) { + + Init("Tap Gesture Single Tap");//initialize the common view + mInfoText=std::string("")+ + "\nTo perform the test:" + "\n1. Run DALi Tap Press Gesture Single." + "\n2. Perform the tap gesture with single tap" + "\n3. If the corresponding event signals mgs and touch data" + " are changed then press Pass. " + "Otherwise, press Fail"; + + Stage stage = Stage::GetCurrent(); + + Property::Map ctl; + ctl["lbl1"]="Tap gesture detector signal not call"; + ctl["lbl2"]=""; + + Property::Map size; + size["lbl1"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + size["lbl2"]=Vector2(bodySize.width, 5*TEXTLABEL_HEIGHT * bodySize.height); + //size["lbl3"]=Vector2(bodySize.width, TEXTLABEL_HEIGHT * bodySize.height); + + CreateLabelList(ctl,size);//create textlabel list + lblTap=TextLabel::DownCast(ctlBody.GetChildAt(0)); + lblTapData=TextLabel::DownCast(ctlBody.GetChildAt(1)); + //lblpan=TextLabel::DownCast(ctlBody.GetChildAt(2)); + + minTabRequired=1; + maxTabRequired=1; + tapgesturedetector=TapGestureDetector::New(minTabRequired); + tapgesturedetector.Attach(ctlBody); + tapgesturedetector.DetectedSignal().Connect(this, &TBTDaliTapGestureSingleView::OnTapGestureDetector); +} +void TBTDaliTapGestureSingleView::OnTapGestureDetector(Actor actor, const TapGesture& gesture) +{ + DBG("In TBTDaliTapGestureSingleView::OnTapGestureDetector"); + string txt; + + lblTap.SetProperty(TextLabel::Property::TEXT," Tap gesture detector signal called"); + lblTap.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblTap.SetProperty(TextLabel::Property::POINT_SIZE,9); + + TapGesture gestureCpy(gesture); + TapGesture gestureAss; + gestureAss=gesture; + + if(gestureCpy.numberOfTouches != gestureAss.numberOfTouches) + DBG("TapGesture copy constructor and assignment operation not work properly."); + + //touch count + txt.append("\n #of touch fingers= "); + txt.append(IntToString(gestureCpy.numberOfTouches)); + //tap count + txt.append("\n #of Tap count= "); + txt.append(IntToString(gestureCpy.numberOfTaps)); + + + //screen touch point + txt.append("\n Screen coordinate (x,y)= "); + txt.append(FloatToString(gestureCpy.screenPoint.x)); + txt.append(","+FloatToString(gestureCpy.screenPoint.y)); + //local actor touch point + txt.append("\n Local actor coordinate (x,y)= "); + txt.append(FloatToString(gestureCpy.localPoint.x)); + txt.append(","+FloatToString(gestureCpy.localPoint.y)); + + BaseHandle handle( tapgesturedetector ); + TapGestureDetector downCast=TapGestureDetector::DownCast(handle); + + TapGestureDetector tapgesturedetectorCopy(tapgesturedetector); + TapGestureDetector tapgesturedetectorAssign; + tapgesturedetectorAssign=tapgesturedetector; + + if(tapgesturedetectorCopy.GetMaximumTapsRequired() != tapgesturedetectorAssign.GetMaximumTapsRequired()) + DBG("Maximum touch required mismatch"); + if(tapgesturedetectorCopy.GetMinimumTapsRequired() != tapgesturedetectorAssign.GetMinimumTapsRequired()) + DBG("Minimum touch required mismatch"); + + //get min touch point + int min=downCast.GetMinimumTapsRequired(); + if(min != minTabRequired) + DBG("Minimum touches required mismatch"); + txt.append("\n Minimum Touches Required= "); + txt.append(IntToString(min)); + + //get max touch point + int max=downCast.GetMaximumTapsRequired(); + if(max != maxTabRequired) + DBG("Maximum touches required mismatch"); + txt.append("\n Maximum Touches Required= "); + txt.append(IntToString(max)); + + lblTapData.SetProperty(TextLabel::Property::TEXT_COLOR,Color::GREEN); + lblTapData.SetProperty(TextLabel::Property::POINT_SIZE,9); + lblTapData.SetProperty(TextLabel::Property::TEXT,txt); +} diff --git a/tbtcoreapp-dali/src/view/tbt-dali-touch-data-view.cpp b/tbtcoreapp-dali/src/view/tbt-dali-touch-data-view.cpp index 15c7d04..eacc984 100644 --- a/tbtcoreapp-dali/src/view/tbt-dali-touch-data-view.cpp +++ b/tbtcoreapp-dali/src/view/tbt-dali-touch-data-view.cpp @@ -134,10 +134,10 @@ void TBTDaliTouchDataView::onTouchEvent(const TouchData& touchdata) DBG("In TBTDaliTouchDataView::onTouchEvrnt"); std::string txt=""; - txt.append("**Touch event is called** "); + txt.append(" **Touch event is called** "); //time unsigned long time=touchdata.GetTime()/1000; - txt.append("Touch time: "); + txt.append("\n Touch time: "); int hr=(time/3600)%24; int sec=time%3600; int min=sec/60; @@ -146,60 +146,62 @@ void TBTDaliTouchDataView::onTouchEvent(const TouchData& touchdata) //point count int count=touchdata.GetPointCount(); - txt.append(", Point count: "); + txt.append("\n Point count: "); txt.append(IntToString(count)); // - int id=touchdata.GetDeviceId(touchdata.GetPointCount()); - txt.append(", DeviceId: "); + int id=touchdata.GetDeviceId(count-1); + txt.append("\n DeviceId: "); txt.append(IntToString(id)); //state - txt.append(", State: "); - txt.append(GetTouchDataPointState(touchdata.GetState(touchdata.GetPointCount()))); + txt.append("\n State: "); + txt.append(GetTouchDataPointState(touchdata.GetState(count-1))); //HitActor - Actor actor=touchdata.GetHitActor(0); + //Actor actor=touchdata.GetHitActor(0); // TableView table=TableView::DownCast(actor); - txt.append(", Hit Actor: "); - txt.append(typeid(touchdata.GetHitActor(0)).name()); + txt.append("\n Hit Actor: "); + txt.append(typeid(touchdata.GetHitActor(count-1)).name()); // txt.append(table.GetName()); // txt.append(", Hit Actor child count: "); // txt.append(IntToString(table.GetChildCount())); //local point - Vector2 vec=touchdata.GetLocalPosition(0); - txt.append(", Local Point: "); + Vector2 vec=touchdata.GetLocalPosition(count-1); + txt.append("\n Local Point: "); txt.append("X:"+FloatToString(vec.x)+" Y:"+FloatToString(vec.y)); //screen point - Vector2 vec1=touchdata.GetScreenPosition(0); - txt.append(", Screen Point: "); + Vector2 vec1=touchdata.GetScreenPosition(count-1); + txt.append("\n Screen Point: "); txt.append("X:"+FloatToString(vec1.x)+" Y:"+FloatToString(vec1.y)); //radius - int radius=touchdata.GetRadius(0); - txt.append(", Radius: "); + int radius=touchdata.GetRadius(count-1); + txt.append("\n Radius: "); txt.append(IntToString(radius)); // - Vector2 vec2=touchdata.GetEllipseRadius(0); - txt.append(", Radii: "); + Vector2 vec2=touchdata.GetEllipseRadius(count-1); + txt.append("\n Radii: "); txt.append("horizontal:"+FloatToString(vec2.x)+" vertical:"+FloatToString(vec2.y)); // - float pressure=touchdata.GetPressure(0); - txt.append(", Pressure: "); + float pressure=touchdata.GetPressure(count-1); + txt.append("\n Pressure: "); txt.append(FloatToString(pressure)); // - Degree deg= touchdata.GetAngle(0); - txt.append(", Degree: "); + Degree deg= touchdata.GetAngle(count-1); + txt.append("\n Degree: "); txt.append(FloatToString(deg.degree)); + this->txtTouch.SetSize(this->bodySize); this->txtTouch.SetProperty( TextLabel::Property::TEXT, txt ); + this->txtTouch.SetProperty( TextLabel::Property::ENABLE_MARKUP, true ); this->txtTouch.SetProperty( TextLabel::Property::POINT_SIZE, 8.0f ); this->txtTouch.SetProperty( TextLabel::Property::TEXT_COLOR,Color::CYAN); - + this->txtTouch.SetProperty( TextLabel::Property::MULTI_LINE,true); } diff --git a/tbtcoreapp/.cproject b/tbtcoreapp/.cproject index c169f68..036df82 100644 --- a/tbtcoreapp/.cproject +++ b/tbtcoreapp/.cproject @@ -16,7 +16,7 @@ - + @@ -31,6 +31,12 @@ @@ -140,6 +149,12 @@ @@ -246,7 +264,6 @@ - @@ -296,7 +313,7 @@ - + @@ -311,6 +328,12 @@ @@ -416,6 +442,12 @@ @@ -518,7 +553,6 @@ - @@ -569,10 +603,10 @@ - + - + diff --git a/tbtcoreapp/.sdk_delta.info b/tbtcoreapp/.sdk_delta.info index ca0748b..77f5bba 100644 Binary files a/tbtcoreapp/.sdk_delta.info and b/tbtcoreapp/.sdk_delta.info differ diff --git a/tbtcoreapp/inc/model/tbt-info.h b/tbtcoreapp/inc/model/tbt-info.h index a59ca73..d1769aa 100644 --- a/tbtcoreapp/inc/model/tbt-info.h +++ b/tbtcoreapp/inc/model/tbt-info.h @@ -271,7 +271,23 @@ typedef enum { TBT_APP_DALI_ACCESSIBILITY_MANAGER, - TBT_APP_DALI_GESTURE_DETECTOR, + TBT_APP_DALI_LONG_PRESS_GESTURE_SINGLE, + + TBT_APP_DALI_LONG_PRESS_GESTURE_DOUBLE, + + TBT_APP_DALI_LONG_PRESS_GESTURE_MULTIPLE, + + TBT_APP_DALI_PAN_GESTURE_SINGLE, + + TBT_APP_DALI_PAN_GESTURE_DOUBLE, + + TBT_APP_DALI_PAN_GESTURE_ANGLE_DIRECTION, + + TBT_APP_DALI_PINCH_GESTURE_SINGLE, + + TBT_APP_DALI_TAP_GESTURE_SINGLE, + + TBT_APP_DALI_TAP_GESTURE_MULTIPLE, TBT_APP_DALI_STYLE_MANAGER, diff --git a/tbtcoreapp/inc/utils/app_module_config.h b/tbtcoreapp/inc/utils/app_module_config.h index 3a16632..c8dcb69 100644 --- a/tbtcoreapp/inc/utils/app_module_config.h +++ b/tbtcoreapp/inc/utils/app_module_config.h @@ -258,7 +258,15 @@ #define TBT_MODULE_APP_DALI_TEXT_CONTROL #define TBT_MODULE_APP_DALI_KEY_BOARD_FOCUS_MANAGER #define TBT_MODULE_APP_DALI_ACCESSIBILITY_MANAGER -#define TBT_MODULE_APP_DALI_GESTURE_DETECTOR +#define TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_SINGLE +#define TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_DOUBLE +#define TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_MULTIPLE +#define TBT_MODULE_APP_DALI_PAN_GESTURE_SINGLE +#define TBT_MODULE_APP_DALI_PAN_GESTURE_DOUBLE +#define TBT_MODULE_APP_DALI_PAN_GESTURE_ANGLE_DIRECTION +#define TBT_MODULE_APP_DALI_PINCH_GESTURE_SINGLE +#define TBT_MODULE_APP_DALI_TAP_GESTURE_SINGLE +#define TBT_MODULE_APP_DALI_TAP_GESTURE_MULTIPLE #define TBT_MODULE_APP_DALI_STYLE_MANAGER #define TBT_MODULE_APP_DALI_TTS #define TBT_MODULE_APP_DALI_SCROLL diff --git a/tbtcoreapp/src/model/tbt-list.c b/tbtcoreapp/src/model/tbt-list.c index 106b86d..45498a5 100644 --- a/tbtcoreapp/src/model/tbt-list.c +++ b/tbtcoreapp/src/model/tbt-list.c @@ -2538,15 +2538,111 @@ static tbt_info tbtapps[] = .result = 0 }, #endif - #ifdef TBT_MODULE_APP_DALI_GESTURE_DETECTOR + #ifdef TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_SINGLE //DALi Test { - .name = "DALi Gesture Detector", + .name = "DALi Long Press Gesture Single", .parent = "DALi", - .apptype = TBT_APP_DALI_GESTURE_DETECTOR, + .apptype = TBT_APP_DALI_LONG_PRESS_GESTURE_SINGLE, .icon_name = "dummy", - .info = "DALi Gesture Detector Signals", + .info = "DALi Long Press Gesture Detector Signals", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_DOUBLE + + //DALi Test + { + .name = "DALi Long Press Gesture Double", + .parent = "DALi", + .apptype = TBT_APP_DALI_LONG_PRESS_GESTURE_DOUBLE, + .icon_name = "dummy", + .info = "DALi Long Press Gesture Detector Signals", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_DALI_LONG_PRESS_GESTURE_MULTIPLE + + //DALi Test + { + .name = "DALi Long Press Gesture Multiple", + .parent = "DALi", + .apptype = TBT_APP_DALI_LONG_PRESS_GESTURE_MULTIPLE, + .icon_name = "dummy", + .info = "DALi Long Press Gesture Detector Signals", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_DALI_PAN_GESTURE_SINGLE + + //DALi Test + { + .name = "DALi Pan Gesture Single", + .parent = "DALi", + .apptype = TBT_APP_DALI_PAN_GESTURE_SINGLE, + .icon_name = "dummy", + .info = "DALi Pan Gesture Detector Signals", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_DALI_PAN_GESTURE_DOUBLE + + //DALi Test + { + .name = "DALi Pan Gesture Double", + .parent = "DALi", + .apptype = TBT_APP_DALI_PAN_GESTURE_DOUBLE, + .icon_name = "dummy", + .info = "DALi Pan Gesture Detector Signals", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_DALI_PAN_GESTURE_ANGLE_DIRECTION + + //DALi Test + { + .name = "DALi Pan Gesture Angle & Direction", + .parent = "DALi", + .apptype = TBT_APP_DALI_PAN_GESTURE_ANGLE_DIRECTION, + .icon_name = "dummy", + .info = "DALi Pan Gesture Detector Signals", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_DALI_PINCH_GESTURE_SINGLE + + //DALi Test + { + .name = "DALi Pinch Gesture Single", + .parent = "DALi", + .apptype = TBT_APP_DALI_PINCH_GESTURE_SINGLE, + .icon_name = "dummy", + .info = "DALi Pinch Gesture Detector Signals", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_DALI_TAP_GESTURE_SINGLE + + //DALi Test + { + .name = "DALi Tap Gesture Single", + .parent = "DALi", + .apptype = TBT_APP_DALI_TAP_GESTURE_SINGLE, + .icon_name = "dummy", + .info = "DALi tap Gesture Detector Signals", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_DALI_TAP_GESTURE_MULTIPLE + + //DALi Test + { + .name = "DALi Tap Gesture Multiple", + .parent = "DALi", + .apptype = TBT_APP_DALI_TAP_GESTURE_MULTIPLE, + .icon_name = "dummy", + .info = "DALi tap Gesture Detector Signals", .result = 0 }, #endif diff --git a/tbtcoreapp/src/view/tbt-genlist-view.c b/tbtcoreapp/src/view/tbt-genlist-view.c index b5930b5..6409c67 100644 --- a/tbtcoreapp/src/view/tbt-genlist-view.c +++ b/tbtcoreapp/src/view/tbt-genlist-view.c @@ -1182,8 +1182,32 @@ static void _gl_item_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void case TBT_APP_DALI_ACCESSIBILITY_MANAGER: dali_view_add(view->navi, info, it, "TBT_APP_DALI_ACCESSIBILITY_MANAGER"); break; - case TBT_APP_DALI_GESTURE_DETECTOR: - dali_view_add(view->navi, info, it, "TBT_APP_DALI_GESTURE_DETECTOR"); + case TBT_APP_DALI_LONG_PRESS_GESTURE_SINGLE: + dali_view_add(view->navi, info, it, "TBT_APP_DALI_LONG_PRESS_GESTURE_SINGLE"); + break; + case TBT_APP_DALI_LONG_PRESS_GESTURE_DOUBLE: + dali_view_add(view->navi, info, it, "TBT_APP_DALI_LONG_PRESS_GESTURE_DOUBLE"); + break; + case TBT_APP_DALI_LONG_PRESS_GESTURE_MULTIPLE: + dali_view_add(view->navi, info, it, "TBT_APP_DALI_LONG_PRESS_GESTURE_MULTIPLE"); + break; + case TBT_APP_DALI_PAN_GESTURE_SINGLE: + dali_view_add(view->navi, info, it, "TBT_APP_DALI_PAN_GESTURE_SINGLE"); + break; + case TBT_APP_DALI_PAN_GESTURE_DOUBLE: + dali_view_add(view->navi, info, it, "TBT_APP_DALI_PAN_GESTURE_DOUBLE"); + break; + case TBT_APP_DALI_PAN_GESTURE_ANGLE_DIRECTION: + dali_view_add(view->navi, info, it, "TBT_APP_DALI_PAN_GESTURE_ANGLE_DIRECTION"); + break; + case TBT_APP_DALI_PINCH_GESTURE_SINGLE: + dali_view_add(view->navi, info, it, "TBT_APP_DALI_PINCH_GESTURE_SINGLE"); + break; + case TBT_APP_DALI_TAP_GESTURE_SINGLE: + dali_view_add(view->navi, info, it, "TBT_APP_DALI_TAP_GESTURE_SINGLE"); + break; + case TBT_APP_DALI_TAP_GESTURE_MULTIPLE: + dali_view_add(view->navi, info, it, "TBT_APP_DALI_TAP_GESTURE_MULIPLE"); break; case TBT_APP_DALI_STYLE_MANAGER: dali_view_add(view->navi, info, it, "TBT_APP_DALI_STYLE_MANAGER");