From 6d69b52359f4a6ccaea9c9c517b09684081052f0 Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Tue, 25 Aug 2020 10:34:50 +0100 Subject: [PATCH] KeyEvent class pimpling Change-Id: I9911157a22a5fc941c7fd2d5aff838131f328dd1 --- builder/dali-builder.cpp | 2 +- .../alpha-blending-cpu-example.cpp | 2 +- .../animated-gradient-call-active.cpp | 2 +- .../animated-gradient-card-active.cpp | 2 +- .../animated-images/animated-images-example.cpp | 2 +- .../animated-shapes/animated-shapes-example.cpp | 2 +- .../animated-vector-images-example.cpp | 2 +- examples/arc-visual/arc-visual-example.cpp | 2 +- examples/benchmark/benchmark.cpp | 2 +- examples/bezier-curve/bezier-curve-example.cpp | 2 +- examples/blocks/blocks-example.cpp | 2 +- examples/bloom-view/bloom-view-example.cpp | 2 +- examples/bubble-effect/bubble-effect-example.cpp | 2 +- examples/builder/examples.cpp | 2 +- examples/buttons/buttons-example.cpp | 2 +- .../clipping-draw-order/clipping-draw-order.cpp | 2 +- examples/clipping/clipping-example.cpp | 2 +- examples/color-visual/color-visual-example.cpp | 2 +- .../compressed-texture-formats-example.cpp | 2 +- examples/contact-cards/contact-card.cpp | 2 +- examples/contact-cards/contact-cards-example.cpp | 2 +- .../cube-transition-effect-example.cpp | 2 +- examples/deferred-shading/deferred-shading.cpp | 2 +- .../dissolve-effect/dissolve-effect-example.cpp | 2 +- examples/drag-and-drop/drag-and-drop-example.cpp | 2 +- examples/effects-view/effects-view-example.cpp | 2 +- examples/flex-container/flex-container-example.cpp | 2 +- examples/focus-integration/focus-integration.cpp | 2 +- examples/fpp-game/fpp-game-example.cpp | 2 +- examples/frame-callback/frame-callback-example.cpp | 2 +- .../gaussian-blur-view-example.cpp | 2 +- examples/gestures/gesture-example.cpp | 2 +- examples/gradients/gradients-example.cpp | 2 +- examples/hello-world/hello-world-example.cpp | 2 +- .../homescreen-benchmark/homescreen-benchmark.cpp | 2 +- examples/image-policies/image-policies-example.cpp | 2 +- .../image-scaling-and-filtering-example.cpp | 22 +++++++++++----------- .../image-scaling-irregular-grid-example.cpp | 2 +- .../image-view-alpha-blending-example.cpp | 2 +- .../image-view-pixel-area-example.cpp | 2 +- examples/image-view-svg/image-view-svg-example.cpp | 4 ++-- examples/image-view-url/image-view-url-example.cpp | 2 +- examples/image-view/image-view-example.cpp | 2 +- examples/item-view/item-view-example.cpp | 2 +- examples/line-mesh/line-mesh-example.cpp | 2 +- examples/magnifier/magnifier-example.cpp | 2 +- examples/mesh-morph/mesh-morph-example.cpp | 2 +- examples/mesh-visual/mesh-visual-example.cpp | 2 +- .../metaball-explosion-example.cpp | 2 +- .../metaball-refrac/metaball-refrac-example.cpp | 2 +- examples/model3d-view/model3d-view-example.cpp | 2 +- examples/motion-blur/motion-blur-example.cpp | 2 +- examples/motion-stretch/motion-stretch-example.cpp | 2 +- .../native-image-source-example.cpp | 2 +- examples/page-turn-view/page-turn-view-example.cpp | 2 +- examples/perf-scroll/perf-scroll.cpp | 2 +- examples/pivot/pivot-example.cpp | 2 +- examples/point-mesh/point-mesh-example.cpp | 2 +- examples/popup/popup-example.cpp | 2 +- .../pre-render-callback-example.cpp | 8 ++++---- .../primitive-shapes/primitive-shapes-example.cpp | 2 +- examples/progress-bar/progress-bar-example.cpp | 2 +- .../property-notification-example.cpp | 2 +- examples/ray-marching/ray-marching-example.cpp | 2 +- examples/reflection-demo/reflection-example.cpp | 2 +- .../refraction-effect-example.cpp | 2 +- .../remote-image-loading-example.cpp | 12 ++++++------ .../renderer-stencil/renderer-stencil-example.cpp | 2 +- .../rendering-basic-light-example.cpp | 2 +- .../rendering-basic-pbr-example.cpp | 2 +- examples/rendering-cube/rendering-cube.cpp | 2 +- examples/rendering-line/rendering-line.cpp | 2 +- .../rendering-radial-progress/radial-progress.cpp | 2 +- examples/rendering-skybox/rendering-skybox.cpp | 2 +- .../rendering-textured-cube.cpp | 2 +- examples/rendering-triangle/rendering-triangle.cpp | 2 +- examples/scroll-view/scroll-view-example.cpp | 2 +- .../shadows-and-lights-example.cpp | 2 +- .../simple-text-label-example.cpp | 2 +- .../simple-scroll-view-example.cpp | 2 +- examples/simple-text-field/simple-text-field.cpp | 2 +- .../simple-text-label-example.cpp | 2 +- .../simple-text-renderer-example.cpp | 2 +- .../simple-text-visual-example.cpp | 2 +- .../simple-visuals-application.cpp | 8 ++++---- .../size-negotiation/size-negotiation-example.cpp | 2 +- examples/sparkle/sparkle-effect-example.cpp | 2 +- examples/styling/styling-application.cpp | 8 ++++---- .../super-blur-view/super-blur-view-example.cpp | 2 +- examples/text-editor/text-editor-example.cpp | 2 +- examples/text-field/text-field-example.cpp | 2 +- examples/text-fonts/text-fonts-example.cpp | 2 +- examples/text-label-emojis/text-label-emojis.cpp | 2 +- .../text-label-multi-language-example.cpp | 2 +- examples/text-label/text-label-example.cpp | 6 +++--- .../text-memory-profiling-example.cpp | 2 +- examples/text-overlap/text-overlap-example.cpp | 2 +- examples/text-scrolling/text-scrolling-example.cpp | 4 ++-- examples/textured-mesh/textured-mesh-example.cpp | 2 +- examples/tilt/tilt-example.cpp | 2 +- examples/tooltip/tooltip-example.cpp | 2 +- examples/transitions/transition-application.cpp | 8 ++++---- examples/video-view/video-view-example.cpp | 2 +- .../visual-fitting-mode-example.cpp | 2 +- .../visual-transitions/transition-application.cpp | 8 ++++---- examples/web-view/web-view-example.cpp | 2 +- shared/dali-table-view.cpp | 2 +- 107 files changed, 141 insertions(+), 141 deletions(-) diff --git a/builder/dali-builder.cpp b/builder/dali-builder.cpp index 0f9d5bf..2ffdaaa 100644 --- a/builder/dali-builder.cpp +++ b/builder/dali-builder.cpp @@ -280,7 +280,7 @@ private: // Process Key events to Quit on back-key void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp b/examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp index 6ed10ed..8360197 100644 --- a/examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp +++ b/examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp @@ -131,7 +131,7 @@ private: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/animated-gradient-call-active/animated-gradient-call-active.cpp b/examples/animated-gradient-call-active/animated-gradient-call-active.cpp index 1ce69a8..ab8842a 100644 --- a/examples/animated-gradient-call-active/animated-gradient-call-active.cpp +++ b/examples/animated-gradient-call-active/animated-gradient-call-active.cpp @@ -163,7 +163,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/animated-gradient-card-active/animated-gradient-card-active.cpp b/examples/animated-gradient-card-active/animated-gradient-card-active.cpp index 9861aa4..f5e5b40 100644 --- a/examples/animated-gradient-card-active/animated-gradient-card-active.cpp +++ b/examples/animated-gradient-card-active/animated-gradient-card-active.cpp @@ -425,7 +425,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/animated-images/animated-images-example.cpp b/examples/animated-images/animated-images-example.cpp index 13ca64a..3f0c0b8 100644 --- a/examples/animated-images/animated-images-example.cpp +++ b/examples/animated-images/animated-images-example.cpp @@ -291,7 +291,7 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/animated-shapes/animated-shapes-example.cpp b/examples/animated-shapes/animated-shapes-example.cpp index 59871ef..5a0e193 100644 --- a/examples/animated-shapes/animated-shapes-example.cpp +++ b/examples/animated-shapes/animated-shapes-example.cpp @@ -445,7 +445,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if( event.state == KeyEvent::Down && (IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK )) ) + if( event.GetState() == KeyEvent::Down && (IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK )) ) { mApplication.Quit(); } diff --git a/examples/animated-vector-images/animated-vector-images-example.cpp b/examples/animated-vector-images/animated-vector-images-example.cpp index 77c2705..b44a162 100644 --- a/examples/animated-vector-images/animated-vector-images-example.cpp +++ b/examples/animated-vector-images/animated-vector-images-example.cpp @@ -201,7 +201,7 @@ private: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/arc-visual/arc-visual-example.cpp b/examples/arc-visual/arc-visual-example.cpp index 88e4253..0e98dc0 100644 --- a/examples/arc-visual/arc-visual-example.cpp +++ b/examples/arc-visual/arc-visual-example.cpp @@ -229,7 +229,7 @@ private: void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Up ) + if( event.GetState() == KeyEvent::Up ) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/benchmark/benchmark.cpp b/examples/benchmark/benchmark.cpp index 7a12692..75bd619 100644 --- a/examples/benchmark/benchmark.cpp +++ b/examples/benchmark/benchmark.cpp @@ -451,7 +451,7 @@ public: void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/bezier-curve/bezier-curve-example.cpp b/examples/bezier-curve/bezier-curve-example.cpp index 677152e..2726845 100644 --- a/examples/bezier-curve/bezier-curve-example.cpp +++ b/examples/bezier-curve/bezier-curve-example.cpp @@ -573,7 +573,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if( event.state == KeyEvent::Down && (IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK )) ) + if( event.GetState() == KeyEvent::Down && (IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK )) ) { mApplication.Quit(); } diff --git a/examples/blocks/blocks-example.cpp b/examples/blocks/blocks-example.cpp index 300f057..828a85a 100644 --- a/examples/blocks/blocks-example.cpp +++ b/examples/blocks/blocks-example.cpp @@ -826,7 +826,7 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/bloom-view/bloom-view-example.cpp b/examples/bloom-view/bloom-view-example.cpp index 5ec9ce5..e3caff7 100644 --- a/examples/bloom-view/bloom-view-example.cpp +++ b/examples/bloom-view/bloom-view-example.cpp @@ -130,7 +130,7 @@ public: void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/bubble-effect/bubble-effect-example.cpp b/examples/bubble-effect/bubble-effect-example.cpp index 58c7888..0ae5145 100644 --- a/examples/bubble-effect/bubble-effect-example.cpp +++ b/examples/bubble-effect/bubble-effect-example.cpp @@ -270,7 +270,7 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/builder/examples.cpp b/examples/builder/examples.cpp index 3d9803a..42aef41 100644 --- a/examples/builder/examples.cpp +++ b/examples/builder/examples.cpp @@ -532,7 +532,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/buttons/buttons-example.cpp b/examples/buttons/buttons-example.cpp index 61dd217..97217f3 100644 --- a/examples/buttons/buttons-example.cpp +++ b/examples/buttons/buttons-example.cpp @@ -359,7 +359,7 @@ class ButtonsController: public ConnectionTracker void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/clipping-draw-order/clipping-draw-order.cpp b/examples/clipping-draw-order/clipping-draw-order.cpp index 363ef09..a23b9d4 100644 --- a/examples/clipping-draw-order/clipping-draw-order.cpp +++ b/examples/clipping-draw-order/clipping-draw-order.cpp @@ -216,7 +216,7 @@ public: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/clipping/clipping-example.cpp b/examples/clipping/clipping-example.cpp index 2e42cbb..2dda716 100644 --- a/examples/clipping/clipping-example.cpp +++ b/examples/clipping/clipping-example.cpp @@ -172,7 +172,7 @@ private: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/color-visual/color-visual-example.cpp b/examples/color-visual/color-visual-example.cpp index 27c85d2..fee90fd 100644 --- a/examples/color-visual/color-visual-example.cpp +++ b/examples/color-visual/color-visual-example.cpp @@ -117,7 +117,7 @@ public: void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/compressed-texture-formats/compressed-texture-formats-example.cpp b/examples/compressed-texture-formats/compressed-texture-formats-example.cpp index 912d6f4..a0c6079 100644 --- a/examples/compressed-texture-formats/compressed-texture-formats-example.cpp +++ b/examples/compressed-texture-formats/compressed-texture-formats-example.cpp @@ -190,7 +190,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/contact-cards/contact-card.cpp b/examples/contact-cards/contact-card.cpp index 3d77260..9d67eab 100644 --- a/examples/contact-cards/contact-card.cpp +++ b/examples/contact-cards/contact-card.cpp @@ -327,7 +327,7 @@ void ContactCard::OnAnimationFinished( Animation& animation ) void ContactCard::OnKeyEvent( const KeyEvent& event ) { if( ( ! mFolded ) && // If we're folded then there's no need to do any more checking - ( event.state == KeyEvent::Down ) ) + ( event.GetState() == KeyEvent::Down ) ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/contact-cards/contact-cards-example.cpp b/examples/contact-cards/contact-cards-example.cpp index c8eb8eb..087c53a 100644 --- a/examples/contact-cards/contact-cards-example.cpp +++ b/examples/contact-cards/contact-cards-example.cpp @@ -98,7 +98,7 @@ private: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { KeyInputFocusManager keyInputFocusManager = KeyInputFocusManager::Get(); if( ! keyInputFocusManager.GetCurrentFocusControl() ) // Don't quit if a control has focus diff --git a/examples/cube-transition-effect/cube-transition-effect-example.cpp b/examples/cube-transition-effect/cube-transition-effect-example.cpp index 08f0228..bd65bb8 100644 --- a/examples/cube-transition-effect/cube-transition-effect-example.cpp +++ b/examples/cube-transition-effect/cube-transition-effect-example.cpp @@ -403,7 +403,7 @@ Texture CubeTransitionApp::LoadWindowFillingTexture( const char* filepath ) void CubeTransitionApp::OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/deferred-shading/deferred-shading.cpp b/examples/deferred-shading/deferred-shading.cpp index 8e8324a..e09032f 100644 --- a/examples/deferred-shading/deferred-shading.cpp +++ b/examples/deferred-shading/deferred-shading.cpp @@ -777,7 +777,7 @@ private: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/dissolve-effect/dissolve-effect-example.cpp b/examples/dissolve-effect/dissolve-effect-example.cpp index 8ceec26..870cfda 100644 --- a/examples/dissolve-effect/dissolve-effect-example.cpp +++ b/examples/dissolve-effect/dissolve-effect-example.cpp @@ -327,7 +327,7 @@ void DissolveEffectApp::StartTransition(Vector2 position, Vector2 displacement) void DissolveEffectApp::OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/drag-and-drop/drag-and-drop-example.cpp b/examples/drag-and-drop/drag-and-drop-example.cpp index 0c56042..2444913 100644 --- a/examples/drag-and-drop/drag-and-drop-example.cpp +++ b/examples/drag-and-drop/drag-and-drop-example.cpp @@ -118,7 +118,7 @@ public: void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/effects-view/effects-view-example.cpp b/examples/effects-view/effects-view-example.cpp index 25d1779..dab07ea 100644 --- a/examples/effects-view/effects-view-example.cpp +++ b/examples/effects-view/effects-view-example.cpp @@ -234,7 +234,7 @@ bool EffectsViewApp::ChangeEffectSize( Button button ) void EffectsViewApp::OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/flex-container/flex-container-example.cpp b/examples/flex-container/flex-container-example.cpp index 62deb04..843227c 100644 --- a/examples/flex-container/flex-container-example.cpp +++ b/examples/flex-container/flex-container-example.cpp @@ -330,7 +330,7 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/focus-integration/focus-integration.cpp b/examples/focus-integration/focus-integration.cpp index 2d2759e..82bd570 100644 --- a/examples/focus-integration/focus-integration.cpp +++ b/examples/focus-integration/focus-integration.cpp @@ -175,7 +175,7 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/fpp-game/fpp-game-example.cpp b/examples/fpp-game/fpp-game-example.cpp index 9d209fa..03cf099 100644 --- a/examples/fpp-game/fpp-game-example.cpp +++ b/examples/fpp-game/fpp-game-example.cpp @@ -114,7 +114,7 @@ public: // Handle a quit key event void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/frame-callback/frame-callback-example.cpp b/examples/frame-callback/frame-callback-example.cpp index 0c530d3..b19ac5de 100644 --- a/examples/frame-callback/frame-callback-example.cpp +++ b/examples/frame-callback/frame-callback-example.cpp @@ -165,7 +165,7 @@ private: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/gaussian-blur-view/gaussian-blur-view-example.cpp b/examples/gaussian-blur-view/gaussian-blur-view-example.cpp index d93703d..fd3bf27 100644 --- a/examples/gaussian-blur-view/gaussian-blur-view-example.cpp +++ b/examples/gaussian-blur-view/gaussian-blur-view-example.cpp @@ -142,7 +142,7 @@ private: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/gestures/gesture-example.cpp b/examples/gestures/gesture-example.cpp index fb5b4a7..b0d7eb5 100644 --- a/examples/gestures/gesture-example.cpp +++ b/examples/gestures/gesture-example.cpp @@ -456,7 +456,7 @@ private: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/gradients/gradients-example.cpp b/examples/gradients/gradients-example.cpp index 2125c95..fb0250b 100644 --- a/examples/gradients/gradients-example.cpp +++ b/examples/gradients/gradients-example.cpp @@ -183,7 +183,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/hello-world/hello-world-example.cpp b/examples/hello-world/hello-world-example.cpp index 8e19077..8fc6997 100644 --- a/examples/hello-world/hello-world-example.cpp +++ b/examples/hello-world/hello-world-example.cpp @@ -63,7 +63,7 @@ public: void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/homescreen-benchmark/homescreen-benchmark.cpp b/examples/homescreen-benchmark/homescreen-benchmark.cpp index cde8ee0..fbcf209 100644 --- a/examples/homescreen-benchmark/homescreen-benchmark.cpp +++ b/examples/homescreen-benchmark/homescreen-benchmark.cpp @@ -446,7 +446,7 @@ public: void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/image-policies/image-policies-example.cpp b/examples/image-policies/image-policies-example.cpp index bc82b2f..fd4b732 100644 --- a/examples/image-policies/image-policies-example.cpp +++ b/examples/image-policies/image-policies-example.cpp @@ -525,7 +525,7 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp b/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp index ea8290f..4365ef9 100644 --- a/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp +++ b/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp @@ -566,7 +566,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { @@ -580,50 +580,50 @@ public: mApplication.Quit(); } } - else if ( event.keyPressedName == "Right" ) + else if ( event.GetKeyName() == "Right" ) { mImageWindowScale.x = std::max( 0.05f, std::min( 1.0f, mImageWindowScale.x * 1.1f ) ); } - else if ( event.keyPressedName == "Left" ) + else if ( event.GetKeyName() == "Left" ) { mImageWindowScale.x = std::max( 0.05f, mImageWindowScale.x * 0.9f ); } - else if ( event.keyPressedName == "Up" ) + else if ( event.GetKeyName() == "Up" ) { mImageWindowScale.y = std::max( 0.05f, std::min( 1.0f, mImageWindowScale.y * 1.1f ) ); } - else if ( event.keyPressedName == "Down" ) + else if ( event.GetKeyName() == "Down" ) { mImageWindowScale.y = std::max( 0.05f, mImageWindowScale.y * 0.9f ); } - else if ( event.keyPressedName == "o" ) + else if ( event.GetKeyName() == "o" ) { mImageWindowScale.x = std::max( 0.05f, mImageWindowScale.x * 0.9f ); mImageWindowScale.y = std::max( 0.05f, mImageWindowScale.y * 0.9f ); } - else if ( event.keyPressedName == "p" ) + else if ( event.GetKeyName() == "p" ) { mImageWindowScale.x = std::max( 0.05f, std::min( 1.0f, mImageWindowScale.x * 1.1f ) ); mImageWindowScale.y = std::max( 0.05f, std::min( 1.0f, mImageWindowScale.y * 1.1f ) ); } - else if ( event.keyPressedName == "n" ) + else if ( event.GetKeyName() == "n" ) { mCurrentPath = mCurrentPath + 1; mCurrentPath = mCurrentPath < NUM_IMAGE_PATHS ? mCurrentPath : 0; } - else if ( event.keyPressedName == "b" ) + else if ( event.GetKeyName() == "b" ) { mCurrentPath = mCurrentPath - 1; mCurrentPath = mCurrentPath >= 0 ? mCurrentPath : NUM_IMAGE_PATHS - 1; } // Cycle filter and scaling modes: - else if ( event.keyPressedName == "f" ) + else if ( event.GetKeyName() == "f" ) { mSamplingMode = NextFilterMode( mSamplingMode ); mSamplingModeButton.SetProperty( Toolkit::Button::Property::LABEL, StringFromFilterMode( mSamplingMode ) ); } // Cycle filter and scaling modes: - else if ( event.keyPressedName == "s" ) + else if ( event.GetKeyName() == "s" ) { mFittingMode = NextScalingMode( mFittingMode ); mFittingModeButton.SetProperty( Toolkit::Button::Property::LABEL, StringFromScalingMode( mFittingMode ) ); diff --git a/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp b/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp index 567c569..47aa49a 100644 --- a/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp +++ b/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp @@ -542,7 +542,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) diff --git a/examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp b/examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp index 13dcc0a..96e8a34 100644 --- a/examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp +++ b/examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp @@ -88,7 +88,7 @@ private: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/image-view-pixel-area/image-view-pixel-area-example.cpp b/examples/image-view-pixel-area/image-view-pixel-area-example.cpp index 8de9d5b..528c82d 100644 --- a/examples/image-view-pixel-area/image-view-pixel-area-example.cpp +++ b/examples/image-view-pixel-area/image-view-pixel-area-example.cpp @@ -213,7 +213,7 @@ private: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/image-view-svg/image-view-svg-example.cpp b/examples/image-view-svg/image-view-svg-example.cpp index 7ca18d9..07a2ca9 100644 --- a/examples/image-view-svg/image-view-svg-example.cpp +++ b/examples/image-view-svg/image-view-svg-example.cpp @@ -209,7 +209,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { @@ -217,7 +217,7 @@ public: } else { - const char* keyName = event.keyPressedName.c_str(); + const char* keyName = event.GetKeyName().c_str(); if( strcmp(keyName, "Left") == 0 ) { if( mScale > MIN_SCALE ) diff --git a/examples/image-view-url/image-view-url-example.cpp b/examples/image-view-url/image-view-url-example.cpp index a5bef1a..590a90e 100644 --- a/examples/image-view-url/image-view-url-example.cpp +++ b/examples/image-view-url/image-view-url-example.cpp @@ -186,7 +186,7 @@ private: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/image-view/image-view-example.cpp b/examples/image-view/image-view-example.cpp index 84085e9..ebad860 100644 --- a/examples/image-view/image-view-example.cpp +++ b/examples/image-view/image-view-example.cpp @@ -260,7 +260,7 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/item-view/item-view-example.cpp b/examples/item-view/item-view-example.cpp index 4e7a77a..f7e3eba 100644 --- a/examples/item-view/item-view-example.cpp +++ b/examples/item-view/item-view-example.cpp @@ -963,7 +963,7 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/line-mesh/line-mesh-example.cpp b/examples/line-mesh/line-mesh-example.cpp index ff3aace..b13f71b 100644 --- a/examples/line-mesh/line-mesh-example.cpp +++ b/examples/line-mesh/line-mesh-example.cpp @@ -310,7 +310,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/magnifier/magnifier-example.cpp b/examples/magnifier/magnifier-example.cpp index 305485a..ab87c6b 100644 --- a/examples/magnifier/magnifier-example.cpp +++ b/examples/magnifier/magnifier-example.cpp @@ -376,7 +376,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/mesh-morph/mesh-morph-example.cpp b/examples/mesh-morph/mesh-morph-example.cpp index af8662c..4e5c117 100644 --- a/examples/mesh-morph/mesh-morph-example.cpp +++ b/examples/mesh-morph/mesh-morph-example.cpp @@ -326,7 +326,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/mesh-visual/mesh-visual-example.cpp b/examples/mesh-visual/mesh-visual-example.cpp index 9697649..a2bf17f 100644 --- a/examples/mesh-visual/mesh-visual-example.cpp +++ b/examples/mesh-visual/mesh-visual-example.cpp @@ -572,7 +572,7 @@ public: //If escape or the back button is pressed, quit the application (and return to the launcher) void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/metaball-explosion/metaball-explosion-example.cpp b/examples/metaball-explosion/metaball-explosion-example.cpp index 0eae70b..62fb2cd 100644 --- a/examples/metaball-explosion/metaball-explosion-example.cpp +++ b/examples/metaball-explosion/metaball-explosion-example.cpp @@ -667,7 +667,7 @@ bool MetaballExplosionController::OnTouch( Actor actor, const TouchEvent& touch void MetaballExplosionController::OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/metaball-refrac/metaball-refrac-example.cpp b/examples/metaball-refrac/metaball-refrac-example.cpp index e66ecde..73b39c6 100644 --- a/examples/metaball-refrac/metaball-refrac-example.cpp +++ b/examples/metaball-refrac/metaball-refrac-example.cpp @@ -759,7 +759,7 @@ bool MetaballRefracController::OnTouch( Actor actor, const TouchEvent& touch ) void MetaballRefracController::OnKeyEvent(const KeyEvent& event) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/model3d-view/model3d-view-example.cpp b/examples/model3d-view/model3d-view-example.cpp index 0e251a4..c02d526 100644 --- a/examples/model3d-view/model3d-view-example.cpp +++ b/examples/model3d-view/model3d-view-example.cpp @@ -262,7 +262,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/motion-blur/motion-blur-example.cpp b/examples/motion-blur/motion-blur-example.cpp index 7f2c733..3937d31 100644 --- a/examples/motion-blur/motion-blur-example.cpp +++ b/examples/motion-blur/motion-blur-example.cpp @@ -400,7 +400,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/motion-stretch/motion-stretch-example.cpp b/examples/motion-stretch/motion-stretch-example.cpp index be2e9fa..89a8ab2 100644 --- a/examples/motion-stretch/motion-stretch-example.cpp +++ b/examples/motion-stretch/motion-stretch-example.cpp @@ -372,7 +372,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/native-image-source/native-image-source-example.cpp b/examples/native-image-source/native-image-source-example.cpp index c5aca03..1c887a8 100644 --- a/examples/native-image-source/native-image-source-example.cpp +++ b/examples/native-image-source/native-image-source-example.cpp @@ -384,7 +384,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/page-turn-view/page-turn-view-example.cpp b/examples/page-turn-view/page-turn-view-example.cpp index 3e90935..03391e0 100644 --- a/examples/page-turn-view/page-turn-view-example.cpp +++ b/examples/page-turn-view/page-turn-view-example.cpp @@ -267,7 +267,7 @@ void PageTurnExample::Rotate( DemoOrientation orientation ) */ void PageTurnExample::OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/perf-scroll/perf-scroll.cpp b/examples/perf-scroll/perf-scroll.cpp index 35dca01..0261ab3 100644 --- a/examples/perf-scroll/perf-scroll.cpp +++ b/examples/perf-scroll/perf-scroll.cpp @@ -445,7 +445,7 @@ public: void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/pivot/pivot-example.cpp b/examples/pivot/pivot-example.cpp index 82cfa2f..231f3ed 100644 --- a/examples/pivot/pivot-example.cpp +++ b/examples/pivot/pivot-example.cpp @@ -136,7 +136,7 @@ private: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/point-mesh/point-mesh-example.cpp b/examples/point-mesh/point-mesh-example.cpp index 312a07b..09922aa 100644 --- a/examples/point-mesh/point-mesh-example.cpp +++ b/examples/point-mesh/point-mesh-example.cpp @@ -203,7 +203,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/popup/popup-example.cpp b/examples/popup/popup-example.cpp index 1022112..b85b74b 100644 --- a/examples/popup/popup-example.cpp +++ b/examples/popup/popup-example.cpp @@ -671,7 +671,7 @@ public: void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/pre-render-callback/pre-render-callback-example.cpp b/examples/pre-render-callback/pre-render-callback-example.cpp index 908bf94..faeef29 100644 --- a/examples/pre-render-callback/pre-render-callback-example.cpp +++ b/examples/pre-render-callback/pre-render-callback-example.cpp @@ -187,21 +187,21 @@ private: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { mApplication.Quit(); } - else if( event.keyPressedName.compare("1") == 0) + else if( event.GetKeyName().compare("1") == 0) { Adaptor::Get().SetPreRenderCallback( MakeCallback( this, &PreRenderCallbackController::OnPreRender ) ); } - else if( event.keyPressedName.compare("2") == 0) + else if( event.GetKeyName().compare("2") == 0) { Adaptor::Get().SetPreRenderCallback( NULL ); } - else if( event.keyPressedName.compare("3") == 0) + else if( event.GetKeyName().compare("3") == 0) { mKeepPreRender = !mKeepPreRender; } diff --git a/examples/primitive-shapes/primitive-shapes-example.cpp b/examples/primitive-shapes/primitive-shapes-example.cpp index 00e3926..b613980 100644 --- a/examples/primitive-shapes/primitive-shapes-example.cpp +++ b/examples/primitive-shapes/primitive-shapes-example.cpp @@ -676,7 +676,7 @@ public: //If escape or the back button is pressed, quit the application (and return to the launcher) void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/progress-bar/progress-bar-example.cpp b/examples/progress-bar/progress-bar-example.cpp index 1364790..60433e1 100644 --- a/examples/progress-bar/progress-bar-example.cpp +++ b/examples/progress-bar/progress-bar-example.cpp @@ -234,7 +234,7 @@ private: } void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/property-notification/property-notification-example.cpp b/examples/property-notification/property-notification-example.cpp index 28287b2..c54e239 100644 --- a/examples/property-notification/property-notification-example.cpp +++ b/examples/property-notification/property-notification-example.cpp @@ -88,7 +88,7 @@ public: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/ray-marching/ray-marching-example.cpp b/examples/ray-marching/ray-marching-example.cpp index 0660bec..189a84b 100644 --- a/examples/ray-marching/ray-marching-example.cpp +++ b/examples/ray-marching/ray-marching-example.cpp @@ -149,7 +149,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/reflection-demo/reflection-example.cpp b/examples/reflection-demo/reflection-example.cpp index 4f04401..e43147a 100644 --- a/examples/reflection-demo/reflection-example.cpp +++ b/examples/reflection-demo/reflection-example.cpp @@ -625,7 +625,7 @@ private: void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/refraction-effect/refraction-effect-example.cpp b/examples/refraction-effect/refraction-effect-example.cpp index 804e784..11a4900 100644 --- a/examples/refraction-effect/refraction-effect-example.cpp +++ b/examples/refraction-effect/refraction-effect-example.cpp @@ -561,7 +561,7 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/remote-image-loading/remote-image-loading-example.cpp b/examples/remote-image-loading/remote-image-loading-example.cpp index a58abf4..2e3f9bf 100644 --- a/examples/remote-image-loading/remote-image-loading-example.cpp +++ b/examples/remote-image-loading/remote-image-loading-example.cpp @@ -127,7 +127,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { @@ -138,9 +138,9 @@ public: void OnKey(const KeyEvent &event) { - if (event.state == KeyEvent::Down) + if (event.GetState() == KeyEvent::Down) { - std::cout<<"Window key : " << event.keyCode << std::endl; + std::cout<<"Window key : " << event.GetKeyCode() << std::endl; } } @@ -154,13 +154,13 @@ public: bool OnControlKeyEvent(Toolkit::Control control, const KeyEvent &event) { - if (event.state == KeyEvent::Down) + if (event.GetState() == KeyEvent::Down) { - std::cout<<"Control down key : " << control.GetProperty< std::string >( Dali::Actor::Property::NAME ) << ", keyCode : " << event.keyCode << std::endl; + std::cout<<"Control down key : " << control.GetProperty< std::string >( Dali::Actor::Property::NAME ) << ", keyCode : " << event.GetKeyCode() << std::endl; } else { - std::cout<<"Control up key : " << control.GetProperty< std::string >( Dali::Actor::Property::NAME ) << ", keyCode : " << event.keyCode << std::endl; + std::cout<<"Control up key : " << control.GetProperty< std::string >( Dali::Actor::Property::NAME ) << ", keyCode : " << event.GetKeyCode() << std::endl; } return false; } diff --git a/examples/renderer-stencil/renderer-stencil-example.cpp b/examples/renderer-stencil/renderer-stencil-example.cpp index e9004db..ed1b0ab 100644 --- a/examples/renderer-stencil/renderer-stencil-example.cpp +++ b/examples/renderer-stencil/renderer-stencil-example.cpp @@ -731,7 +731,7 @@ private: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/rendering-basic-light/rendering-basic-light-example.cpp b/examples/rendering-basic-light/rendering-basic-light-example.cpp index 7d89a77..1146243 100644 --- a/examples/rendering-basic-light/rendering-basic-light-example.cpp +++ b/examples/rendering-basic-light/rendering-basic-light-example.cpp @@ -237,7 +237,7 @@ public: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp b/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp index 7d15eab..c2faf03 100644 --- a/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp +++ b/examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp @@ -252,7 +252,7 @@ public: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/rendering-cube/rendering-cube.cpp b/examples/rendering-cube/rendering-cube.cpp index 9b4260f..97285a7 100644 --- a/examples/rendering-cube/rendering-cube.cpp +++ b/examples/rendering-cube/rendering-cube.cpp @@ -120,7 +120,7 @@ public: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/rendering-line/rendering-line.cpp b/examples/rendering-line/rendering-line.cpp index 1f421ad..ecf4616 100644 --- a/examples/rendering-line/rendering-line.cpp +++ b/examples/rendering-line/rendering-line.cpp @@ -113,7 +113,7 @@ public: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/rendering-radial-progress/radial-progress.cpp b/examples/rendering-radial-progress/radial-progress.cpp index e3133ca..14fdb90 100644 --- a/examples/rendering-radial-progress/radial-progress.cpp +++ b/examples/rendering-radial-progress/radial-progress.cpp @@ -294,7 +294,7 @@ public: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/rendering-skybox/rendering-skybox.cpp b/examples/rendering-skybox/rendering-skybox.cpp index db94cfe..dba92df 100644 --- a/examples/rendering-skybox/rendering-skybox.cpp +++ b/examples/rendering-skybox/rendering-skybox.cpp @@ -186,7 +186,7 @@ public: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/rendering-textured-cube/rendering-textured-cube.cpp b/examples/rendering-textured-cube/rendering-textured-cube.cpp index be22567..7a6a4bc 100644 --- a/examples/rendering-textured-cube/rendering-textured-cube.cpp +++ b/examples/rendering-textured-cube/rendering-textured-cube.cpp @@ -126,7 +126,7 @@ public: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/rendering-triangle/rendering-triangle.cpp b/examples/rendering-triangle/rendering-triangle.cpp index c69f323..ddad128 100644 --- a/examples/rendering-triangle/rendering-triangle.cpp +++ b/examples/rendering-triangle/rendering-triangle.cpp @@ -113,7 +113,7 @@ public: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/scroll-view/scroll-view-example.cpp b/examples/scroll-view/scroll-view-example.cpp index e9c65d0..bee21c7 100644 --- a/examples/scroll-view/scroll-view-example.cpp +++ b/examples/scroll-view/scroll-view-example.cpp @@ -547,7 +547,7 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/shadows-and-lights/shadows-and-lights-example.cpp b/examples/shadows-and-lights/shadows-and-lights-example.cpp index 8ce3e83..a4aec57 100644 --- a/examples/shadows-and-lights/shadows-and-lights-example.cpp +++ b/examples/shadows-and-lights/shadows-and-lights-example.cpp @@ -413,7 +413,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/simple-bitmap-font-text-label/simple-text-label-example.cpp b/examples/simple-bitmap-font-text-label/simple-text-label-example.cpp index e86cf13..31e32c0 100644 --- a/examples/simple-bitmap-font-text-label/simple-text-label-example.cpp +++ b/examples/simple-bitmap-font-text-label/simple-text-label-example.cpp @@ -172,7 +172,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/simple-scroll-view/simple-scroll-view-example.cpp b/examples/simple-scroll-view/simple-scroll-view-example.cpp index 93c4f2c..b821911 100644 --- a/examples/simple-scroll-view/simple-scroll-view-example.cpp +++ b/examples/simple-scroll-view/simple-scroll-view-example.cpp @@ -150,7 +150,7 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/simple-text-field/simple-text-field.cpp b/examples/simple-text-field/simple-text-field.cpp index fcd3d8b..ef8be2c 100644 --- a/examples/simple-text-field/simple-text-field.cpp +++ b/examples/simple-text-field/simple-text-field.cpp @@ -74,7 +74,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/simple-text-label/simple-text-label-example.cpp b/examples/simple-text-label/simple-text-label-example.cpp index 3c00db9..8ef5bb4 100644 --- a/examples/simple-text-label/simple-text-label-example.cpp +++ b/examples/simple-text-label/simple-text-label-example.cpp @@ -71,7 +71,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/simple-text-renderer/simple-text-renderer-example.cpp b/examples/simple-text-renderer/simple-text-renderer-example.cpp index 8135fd3..ed64a11 100644 --- a/examples/simple-text-renderer/simple-text-renderer-example.cpp +++ b/examples/simple-text-renderer/simple-text-renderer-example.cpp @@ -327,7 +327,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/simple-text-visual/simple-text-visual-example.cpp b/examples/simple-text-visual/simple-text-visual-example.cpp index 1327a71..89ba3e2 100644 --- a/examples/simple-text-visual/simple-text-visual-example.cpp +++ b/examples/simple-text-visual/simple-text-visual-example.cpp @@ -80,7 +80,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/simple-visuals-control/simple-visuals-application.cpp b/examples/simple-visuals-control/simple-visuals-application.cpp index 8536c5a..30b1765 100644 --- a/examples/simple-visuals-control/simple-visuals-application.cpp +++ b/examples/simple-visuals-control/simple-visuals-application.cpp @@ -77,23 +77,23 @@ void SimpleVisualsApplication::OnKeyEvent( const KeyEvent& keyEvent ) { static int keyPressed = 0; - if( keyEvent.state == KeyEvent::Down) + if( keyEvent.GetState() == KeyEvent::Down) { if( keyPressed == 0 ) // Is this the first down event? { - printf("Key pressed: %s %d\n", keyEvent.keyPressedName.c_str(), keyEvent.keyCode ); + printf("Key pressed: %s %d\n", keyEvent.GetKeyName().c_str(), keyEvent.GetKeyCode() ); if( IsKey( keyEvent, DALI_KEY_ESCAPE) || IsKey( keyEvent, DALI_KEY_BACK ) ) { mApplication.Quit(); } - else if( keyEvent.keyPressedName.compare("Return") == 0 ) + else if( keyEvent.GetKeyName().compare("Return") == 0 ) { } } keyPressed = 1; } - else if( keyEvent.state == KeyEvent::Up ) + else if( keyEvent.GetState() == KeyEvent::Up ) { keyPressed = 0; } diff --git a/examples/size-negotiation/size-negotiation-example.cpp b/examples/size-negotiation/size-negotiation-example.cpp index 20dc4e2..8fff2d3 100644 --- a/examples/size-negotiation/size-negotiation-example.cpp +++ b/examples/size-negotiation/size-negotiation-example.cpp @@ -765,7 +765,7 @@ public: void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/sparkle/sparkle-effect-example.cpp b/examples/sparkle/sparkle-effect-example.cpp index a1444fa..e66247a 100644 --- a/examples/sparkle/sparkle-effect-example.cpp +++ b/examples/sparkle/sparkle-effect-example.cpp @@ -248,7 +248,7 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/styling/styling-application.cpp b/examples/styling/styling-application.cpp index c6aaaea..220ca24 100644 --- a/examples/styling/styling-application.cpp +++ b/examples/styling/styling-application.cpp @@ -635,17 +635,17 @@ void StylingApplication::OnKeyEvent( const KeyEvent& keyEvent ) { static int keyPressed = 0; - if( keyEvent.state == KeyEvent::Down) + if( keyEvent.GetState() == KeyEvent::Down) { if( keyPressed == 0 ) // Is this the first down event? { - printf("Key pressed: %s %d\n", keyEvent.keyPressedName.c_str(), keyEvent.keyCode ); + printf("Key pressed: %s %d\n", keyEvent.GetKeyName().c_str(), keyEvent.GetKeyCode() ); if( IsKey( keyEvent, DALI_KEY_ESCAPE) || IsKey( keyEvent, DALI_KEY_BACK ) ) { mApplication.Quit(); } - else if( keyEvent.keyPressedName.compare("Return") == 0 ) + else if( keyEvent.GetKeyName().compare("Return") == 0 ) { mCurrentTheme++; mCurrentTheme %= NUMBER_OF_THEMES; @@ -676,7 +676,7 @@ void StylingApplication::OnKeyEvent( const KeyEvent& keyEvent ) } keyPressed = 1; } - else if( keyEvent.state == KeyEvent::Up ) + else if( keyEvent.GetState() == KeyEvent::Up ) { keyPressed = 0; } diff --git a/examples/super-blur-view/super-blur-view-example.cpp b/examples/super-blur-view/super-blur-view-example.cpp index 22b885b..17a1e41 100644 --- a/examples/super-blur-view/super-blur-view-example.cpp +++ b/examples/super-blur-view/super-blur-view-example.cpp @@ -91,7 +91,7 @@ private: void OnKeyEvent( const KeyEvent& event ) { - if ( event.state == KeyEvent::Down ) + if ( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/text-editor/text-editor-example.cpp b/examples/text-editor/text-editor-example.cpp index 4fb9fc9..d2d781f 100644 --- a/examples/text-editor/text-editor-example.cpp +++ b/examples/text-editor/text-editor-example.cpp @@ -220,7 +220,7 @@ public: void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/text-field/text-field-example.cpp b/examples/text-field/text-field-example.cpp index e0e8ceb..4d2b251 100644 --- a/examples/text-field/text-field-example.cpp +++ b/examples/text-field/text-field-example.cpp @@ -185,7 +185,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/text-fonts/text-fonts-example.cpp b/examples/text-fonts/text-fonts-example.cpp index 7559df8..2f0a43d 100644 --- a/examples/text-fonts/text-fonts-example.cpp +++ b/examples/text-fonts/text-fonts-example.cpp @@ -206,7 +206,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/text-label-emojis/text-label-emojis.cpp b/examples/text-label-emojis/text-label-emojis.cpp index 6068e61..e2460c2 100644 --- a/examples/text-label-emojis/text-label-emojis.cpp +++ b/examples/text-label-emojis/text-label-emojis.cpp @@ -116,7 +116,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/text-label-multi-language/text-label-multi-language-example.cpp b/examples/text-label-multi-language/text-label-multi-language-example.cpp index a1a9b8e..0edaf8b 100644 --- a/examples/text-label-multi-language/text-label-multi-language-example.cpp +++ b/examples/text-label-multi-language/text-label-multi-language-example.cpp @@ -118,7 +118,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/text-label/text-label-example.cpp b/examples/text-label/text-label-example.cpp index a19531b..0811209 100644 --- a/examples/text-label/text-label-example.cpp +++ b/examples/text-label/text-label-example.cpp @@ -619,7 +619,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { @@ -627,13 +627,13 @@ public: } else if( event.IsCtrlModifier() ) { - switch( event.keyCode ) + switch( event.GetKeyCode() ) { // Select rendering back-end case KEY_ZERO: // fall through case KEY_ONE: { - mLabel.SetProperty( DevelTextLabel::Property::RENDERING_BACKEND, event.keyCode - 10 ); + mLabel.SetProperty( DevelTextLabel::Property::RENDERING_BACKEND, event.GetKeyCode() - 10 ); break; } case KEY_A: // Animate text colour diff --git a/examples/text-memory-profiling/text-memory-profiling-example.cpp b/examples/text-memory-profiling/text-memory-profiling-example.cpp index 37d45a5..a6768e3 100644 --- a/examples/text-memory-profiling/text-memory-profiling-example.cpp +++ b/examples/text-memory-profiling/text-memory-profiling-example.cpp @@ -329,7 +329,7 @@ public: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/text-overlap/text-overlap-example.cpp b/examples/text-overlap/text-overlap-example.cpp index 97d7141..dbcf030 100644 --- a/examples/text-overlap/text-overlap-example.cpp +++ b/examples/text-overlap/text-overlap-example.cpp @@ -120,7 +120,7 @@ bool TextOverlapController::OnClicked( Button button ) void TextOverlapController::OnKeyEvent( const KeyEvent& keyEvent ) { - if( keyEvent.state == KeyEvent::Down && + if( keyEvent.GetState() == KeyEvent::Down && ( IsKey( keyEvent, DALI_KEY_BACK ) || IsKey( keyEvent, DALI_KEY_ESCAPE ) ) ) { diff --git a/examples/text-scrolling/text-scrolling-example.cpp b/examples/text-scrolling/text-scrolling-example.cpp index 13de7dd..0350418 100644 --- a/examples/text-scrolling/text-scrolling-example.cpp +++ b/examples/text-scrolling/text-scrolling-example.cpp @@ -354,7 +354,7 @@ public: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { @@ -362,7 +362,7 @@ public: } else { - if ( event.keyPressedName == "2" ) + if ( event.GetKeyName() == "2" ) { mAnimation.AnimateTo( Property( mSmallLabel, Actor::Property::SCALE ), Vector3(1.2f, 1.2f, 0.0f), AlphaFunction::BOUNCE, TimePeriod( 1.0f, 1.0f ) ); mAnimation.AnimateTo( Property( mLargeLabel, Actor::Property::SCALE ), Vector3(1.2f, 1.2f, 0.0f), AlphaFunction::BOUNCE, TimePeriod( 1.0f, 1.0f ) ); diff --git a/examples/textured-mesh/textured-mesh-example.cpp b/examples/textured-mesh/textured-mesh-example.cpp index 31bd22a..32a1c76 100644 --- a/examples/textured-mesh/textured-mesh-example.cpp +++ b/examples/textured-mesh/textured-mesh-example.cpp @@ -183,7 +183,7 @@ public: void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { diff --git a/examples/tilt/tilt-example.cpp b/examples/tilt/tilt-example.cpp index aaee512..c558023 100644 --- a/examples/tilt/tilt-example.cpp +++ b/examples/tilt/tilt-example.cpp @@ -97,7 +97,7 @@ public: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/tooltip/tooltip-example.cpp b/examples/tooltip/tooltip-example.cpp index 6d599f6..cbd6667 100644 --- a/examples/tooltip/tooltip-example.cpp +++ b/examples/tooltip/tooltip-example.cpp @@ -117,7 +117,7 @@ private: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/transitions/transition-application.cpp b/examples/transitions/transition-application.cpp index 9872397..a0913fe 100644 --- a/examples/transitions/transition-application.cpp +++ b/examples/transitions/transition-application.cpp @@ -198,23 +198,23 @@ void TransitionApplication::OnKeyEvent( const KeyEvent& keyEvent ) { static int keyPressed = 0; - if( keyEvent.state == KeyEvent::Down) + if( keyEvent.GetState() == KeyEvent::Down) { if( keyPressed == 0 ) // Is this the first down event? { - printf("Key pressed: %s %d\n", keyEvent.keyPressedName.c_str(), keyEvent.keyCode ); + printf("Key pressed: %s %d\n", keyEvent.GetKeyName().c_str(), keyEvent.GetKeyCode() ); if( IsKey( keyEvent, DALI_KEY_ESCAPE) || IsKey( keyEvent, DALI_KEY_BACK ) ) { mApplication.Quit(); } - else if( keyEvent.keyPressedName.compare("Return") == 0 ) + else if( keyEvent.GetKeyName().compare("Return") == 0 ) { } } keyPressed = 1; } - else if( keyEvent.state == KeyEvent::Up ) + else if( keyEvent.GetState() == KeyEvent::Up ) { keyPressed = 0; } diff --git a/examples/video-view/video-view-example.cpp b/examples/video-view/video-view-example.cpp index f9d999c..6a39047 100644 --- a/examples/video-view/video-view-example.cpp +++ b/examples/video-view/video-view-example.cpp @@ -262,7 +262,7 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.state == KeyEvent::Down) + if(event.GetState() == KeyEvent::Down) { if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) ) { diff --git a/examples/visual-fitting-mode/visual-fitting-mode-example.cpp b/examples/visual-fitting-mode/visual-fitting-mode-example.cpp index 5f55145..48e921f 100644 --- a/examples/visual-fitting-mode/visual-fitting-mode-example.cpp +++ b/examples/visual-fitting-mode/visual-fitting-mode-example.cpp @@ -197,7 +197,7 @@ private: */ void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/examples/visual-transitions/transition-application.cpp b/examples/visual-transitions/transition-application.cpp index 70b330d..0c08afe 100644 --- a/examples/visual-transitions/transition-application.cpp +++ b/examples/visual-transitions/transition-application.cpp @@ -324,23 +324,23 @@ void TransitionApplication::OnKeyEvent( const KeyEvent& keyEvent ) { static int keyPressed = 0; - if( keyEvent.state == KeyEvent::Down) + if( keyEvent.GetState() == KeyEvent::Down) { if( keyPressed == 0 ) // Is this the first down event? { - printf("Key pressed: %s %d\n", keyEvent.keyPressedName.c_str(), keyEvent.keyCode ); + printf("Key pressed: %s %d\n", keyEvent.GetKeyName().c_str(), keyEvent.GetKeyCode() ); if( IsKey( keyEvent, DALI_KEY_ESCAPE) || IsKey( keyEvent, DALI_KEY_BACK ) ) { mApplication.Quit(); } - else if( keyEvent.keyPressedName.compare("Return") == 0 ) + else if( keyEvent.GetKeyName().compare("Return") == 0 ) { } } keyPressed = 1; } - else if( keyEvent.state == KeyEvent::Up ) + else if( keyEvent.GetState() == KeyEvent::Up ) { keyPressed = 0; } diff --git a/examples/web-view/web-view-example.cpp b/examples/web-view/web-view-example.cpp index bd371dd..13cc242 100644 --- a/examples/web-view/web-view-example.cpp +++ b/examples/web-view/web-view-example.cpp @@ -114,7 +114,7 @@ public: void OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) { diff --git a/shared/dali-table-view.cpp b/shared/dali-table-view.cpp index 869bc7b..6efc3da 100644 --- a/shared/dali-table-view.cpp +++ b/shared/dali-table-view.cpp @@ -699,7 +699,7 @@ void DaliTableView::SetupInnerPageCubeEffect() void DaliTableView::OnKeyEvent( const KeyEvent& event ) { - if( event.state == KeyEvent::Down ) + if( event.GetState() == KeyEvent::Down ) { if ( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) { -- 2.7.4