Fix conversion warnings for event refactor 64/202264/8
authorDaniel McEwen <d.mcewen@partner.samsung.com>
Tue, 26 Mar 2019 10:38:28 +0000 (10:38 +0000)
committerDaniel McEwen <d.mcewen@partner.samsung.com>
Wed, 27 Mar 2019 17:24:38 +0000 (17:24 +0000)
Some driveby changes are also included to slowly reduce the total
conversion warnings in adaptor - the goal being to turn that
warning back on

Change-Id: I2d7f52456f963c7c40985660256466646cd72623

71 files changed:
dali/internal/accessibility/common/accessibility-adaptor-impl.cpp
dali/internal/accessibility/common/accessibility-adaptor-impl.h
dali/internal/accessibility/tizen-wayland/tizen-ivi/accessibility-adaptor-impl-ivi.cpp
dali/internal/accessibility/tizen-wayland/tizen-mobile/accessibility-adaptor-impl-mobile.cpp
dali/internal/accessibility/tizen-wayland/tizen-wearable/accessibility-adaptor-impl-wearable.cpp
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/combined-update-render-controller.h
dali/internal/adaptor/tizen-wayland/adaptor-impl-tizen.cpp
dali/internal/adaptor/tizen-wayland/dali-ecore-wayland.h [new file with mode: 0644]
dali/internal/adaptor/tizen-wayland/dali-ecore-wl2.h [new file with mode: 0644]
dali/internal/adaptor/tizen-wayland/framework-tizen.cpp
dali/internal/adaptor/ubuntu/framework-ubuntu.cpp
dali/internal/clipboard/tizen-wayland/clipboard-impl-ecore-wl.cpp
dali/internal/clipboard/ubuntu-x11/clipboard-impl-x.cpp
dali/internal/imaging/common/image-operations.cpp
dali/internal/imaging/common/pixel-manipulation.cpp
dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp
dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.h
dali/internal/input/common/drag-and-drop-detector-impl.h
dali/internal/input/common/gesture-detector.h
dali/internal/input/common/gesture-manager.h
dali/internal/input/common/key-impl.h
dali/internal/input/common/long-press-gesture-detector.cpp
dali/internal/input/common/long-press-gesture-detector.h
dali/internal/input/common/pan-gesture-detector-base.cpp
dali/internal/input/common/pan-gesture-detector-base.h
dali/internal/input/common/pan-gesture-detector.h
dali/internal/input/common/physical-keyboard-impl.h
dali/internal/input/common/pinch-gesture-detector.cpp
dali/internal/input/common/pinch-gesture-detector.h
dali/internal/input/common/tap-gesture-detector.cpp
dali/internal/input/common/tap-gesture-detector.h
dali/internal/input/common/virtual-keyboard-impl.h
dali/internal/input/linux/dali-ecore-imf.h [new file with mode: 0644]
dali/internal/input/tizen-wayland/ecore-virtual-keyboard.cpp
dali/internal/input/tizen-wayland/ecore-virtual-keyboard.h
dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.cpp
dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.h
dali/internal/input/tizen-wayland/virtual-keyboard-impl-ecore-wl.cpp
dali/internal/input/ubuntu-x11/dali-ecore-input.h [new file with mode: 0644]
dali/internal/input/ubuntu-x11/input-method-context-impl-x.cpp
dali/internal/input/ubuntu-x11/input-method-context-impl-x.h
dali/internal/input/ubuntu-x11/virtual-keyboard-impl-x.cpp
dali/internal/system/linux/callback-manager-ecore.cpp
dali/internal/system/linux/dali-ecore-x.h [new file with mode: 0644]
dali/internal/system/linux/dali-ecore.h [new file with mode: 0644]
dali/internal/system/linux/dali-elementary.h [new file with mode: 0644]
dali/internal/system/linux/file-descriptor-monitor-ecore.cpp
dali/internal/system/linux/timer-impl-ecore.cpp
dali/internal/system/ubuntu-x11/system-settings-x.cpp
dali/internal/window-system/common/damage-observer.h
dali/internal/window-system/common/ecore-server-connection.cpp [deleted file]
dali/internal/window-system/common/ecore-server-connection.h [deleted file]
dali/internal/window-system/common/event-handler.cpp
dali/internal/window-system/common/event-handler.h
dali/internal/window-system/common/orientation-impl.h
dali/internal/window-system/common/rotation-observer.h
dali/internal/window-system/common/window-base.cpp
dali/internal/window-system/common/window-base.h
dali/internal/window-system/common/window-event-interface.h
dali/internal/window-system/common/window-visibility-observer.h
dali/internal/window-system/file.list
dali/internal/window-system/ubuntu-x11/display-connection-impl-x.cpp
dali/internal/window-system/ubuntu-x11/ecore-x-types.h
dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h
dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp
dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h
dali/internal/window-system/ubuntu-x11/window-interface-ecore-x.h
dali/internal/window-system/ubuntu-x11/window-system-ecore-x.cpp
third-party/glyphy/glyphy-geometry.hh
third-party/glyphy/vector-font-cache.cpp

index 728fd87..7f2aa76 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -160,8 +160,8 @@ bool AccessibilityAdaptor::HandleActionReadEvent(unsigned int x, unsigned int y,
 
   DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %d , %d\n", __FUNCTION__, __LINE__, x, y);
 
-  mReadPosition.x = x;
-  mReadPosition.y = y;
+  mReadPosition.x = static_cast< float > (x);
+  mReadPosition.y = static_cast< float > (y);
 
   if( mActionHandler )
   {
@@ -242,7 +242,7 @@ bool AccessibilityAdaptor::HandleActionClearFocusEvent()
   return ret;
 }
 
-bool AccessibilityAdaptor::HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp)
+bool AccessibilityAdaptor::HandleActionScrollEvent(const TouchPoint& point, uint32_t timeStamp)
 {
   bool ret = false;
 
@@ -271,7 +271,7 @@ bool AccessibilityAdaptor::HandleActionScrollEvent(const TouchPoint& point, unsi
   return ret;
 }
 
-bool AccessibilityAdaptor::HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp)
+bool AccessibilityAdaptor::HandleActionTouchEvent(const TouchPoint& point, uint32_t timeStamp)
 {
   bool ret = false;
 
index a997dac..06dff1f 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_ACCESSIBILITY_ADAPTOR_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -141,12 +141,12 @@ public:
   /**
    * @copydoc Dali::AccessibilityAdaptor::HandleActionScrollEvent()
    */
-  bool HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp);
+  bool HandleActionScrollEvent(const TouchPoint& point, uint32_t timeStamp);
 
   /**
    * @copydoc Dali::AccessibilityAdaptor::HandleActionTouchEvent()
    */
-  bool HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp);
+  bool HandleActionTouchEvent(const TouchPoint& point, uint32_t timeStamp);
 
   /**
    * @copydoc Dali::AccessibilityAdaptor::HandleActionBackEvent()
index f2f50e6..b8c9e1d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -22,8 +22,8 @@
 #include <vconf.h>
 
 #ifndef WAYLAND
-#include <Ecore_X.h>
-#include <Elementary.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
+#include <dali/internal/system/linux/dali-elementary.h>
 #endif
 
 #include <vconf.h>
index f2f50e6..b8c9e1d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -22,8 +22,8 @@
 #include <vconf.h>
 
 #ifndef WAYLAND
-#include <Ecore_X.h>
-#include <Elementary.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
+#include <dali/internal/system/linux/dali-elementary.h>
 #endif
 
 #include <vconf.h>
index a849963..c33fafd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -22,8 +22,8 @@
 #include <vconf.h>
 
 #ifndef WAYLAND
-#include <Ecore_X.h>
-#include <Elementary.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
+#include <dali/internal/system/linux/dali-elementary.h>
 #endif
 
 #include <vconf.h>
index fe220af..0bdf2c7 100755 (executable)
@@ -161,7 +161,7 @@ void Adaptor::Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration:
 
   PositionSize size = defaultWindow->GetSurface()->GetPositionSize();
 
-  mGestureManager = new GestureManager(*this, Vector2(size.width, size.height), mCallbackManager, *mEnvironmentOptions);
+  mGestureManager = new GestureManager(*this, Vector2(static_cast<float>(size.width), static_cast<float>(size.height)), mCallbackManager, *mEnvironmentOptions);
 
   mGraphics = &( graphicsFactory.Create() );
   mGraphics->Initialize( mEnvironmentOptions );
index bdb51b0..a8cb5f2 100644 (file)
@@ -315,6 +315,7 @@ private:
   pthread_t*                        mUpdateRenderThread;               ///< The Update/Render thread.
 
   float                             mDefaultFrameDelta;                ///< Default time delta between each frame (used for animations). Not protected by lock, but written to rarely so not worth adding a lock when reading.
+  // TODO: mDefaultFrameDurationMilliseconds is defined as uint64_t, the only place where it is used, it is converted to an unsigned int!!!
   uint64_t                          mDefaultFrameDurationMilliseconds; ///< Default duration of a frame (used for predicting the time of the next frame). Not protected by lock, but written to rarely so not worth adding a lock when reading.
   uint64_t                          mDefaultFrameDurationNanoseconds;  ///< Default duration of a frame (used for sleeping if not enough time elapsed). Not protected by lock, but written to rarely so not worth adding a lock when reading.
   uint64_t                          mDefaultHalfFrameNanoseconds;      ///< Is half of mDefaultFrameDurationNanoseconds. Using a member variable avoids having to do the calculation every frame. Not protected by lock, but written to rarely so not worth adding a lock when reading.
index 029a86f..3e2865d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -27,9 +27,9 @@
 #endif
 
 #ifdef ECORE_WAYLAND2
-#include <Ecore_Wl2.h>
+#include <dali/internal/adaptor/tizen-wayland/dali-ecore-wl2.h>
 #else
-#include <Ecore_Wayland.h>
+#include <dali/internal/adaptor/tizen-wayland/dali-ecore-wayland.h>
 #endif
 
 
diff --git a/dali/internal/adaptor/tizen-wayland/dali-ecore-wayland.h b/dali/internal/adaptor/tizen-wayland/dali-ecore-wayland.h
new file mode 100644 (file)
index 0000000..6eb6038
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef DALI_INTERNAL_ADAPTOR_TIZEN_WAYLAND_DALI_ECORE_WAYLAND_H
+#define DALI_INTERNAL_ADAPTOR_TIZEN_WAYLAND_DALI_ECORE_WAYLAND_H
+
+/*
+ * Copyright (c) 2019 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.
+ *
+ */
+
+#pragma GCC system_header
+#include <Ecore_Wayland.h>
+
+
+
+#endif /* DALI_INTERNAL_ADAPTOR_TIZEN_WAYLAND_DALI_ECORE_WAYLAND_H */
diff --git a/dali/internal/adaptor/tizen-wayland/dali-ecore-wl2.h b/dali/internal/adaptor/tizen-wayland/dali-ecore-wl2.h
new file mode 100644 (file)
index 0000000..c733e31
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef DALI_INTERNAL_ADAPTOR_TIZEN_WAYLAND_DALI_ECORE_WL2_H
+#define DALI_INTERNAL_ADAPTOR_TIZEN_WAYLAND_DALI_ECORE_WL2_H
+
+/*
+ * Copyright (c) 2019 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.
+ *
+ */
+
+#pragma GCC system_header
+#include <Ecore_Wl2.h>
+
+
+
+#endif /* DALI_INTERNAL_ADAPTOR_TIZEN_WAYLAND_DALI_ECORE_WL2_H */
index 8e6d5be..09ee3fb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -23,7 +23,7 @@
 #include <app_control_internal.h>
 #include <app_common.h>
 #include <bundle.h>
-#include <Ecore.h>
+#include <dali/internal/system/linux/dali-ecore.h>
 
 #include <system_info.h>
 #include <system_settings.h>
index 1cc0ce6..6588896 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -19,8 +19,8 @@
 #include <dali/internal/adaptor/common/framework.h>
 
 // EXTERNAL INCLUDES
-#include <Ecore.h>
-#include <Elementary.h>
+#include <dali/internal/system/linux/dali-ecore.h>
+#include <dali/internal/system/linux/dali-elementary.h>
 #include <X11/Xlib.h>
 
 #include <dali/integration-api/debug.h>
index 77b48de..8721844 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
 #include <dali/internal/clipboard/common/clipboard-impl.h>
 
 // EXTERNAL INCLUDES
-// Ecore is littered with C style cast
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
-#include <Ecore.h>
+#include <dali/internal/system/linux/dali-ecore.h>
 
 #ifdef ECORE_WAYLAND2
-#include <Ecore_Wl2.h>
+#include <dali/internal/adaptor/tizen-wayland/dali-ecore-wl2.h>
 #else
-#include <Ecore_Wayland.h>
+#include <dali/internal/adaptor/tizen-wayland/dali-ecore-wayland.h>
 #endif
 
 #include <dali/public-api/object/any.h>
@@ -135,9 +132,9 @@ struct Clipboard::Impl
   char *ExcuteSend( void *event )
   {
 #ifdef ECORE_WAYLAND2
-    Ecore_Wl2_Event_Data_Source_Send *ev = (Ecore_Wl2_Event_Data_Source_Send *)event;
+    Ecore_Wl2_Event_Data_Source_Send *ev = reinterpret_cast<Ecore_Wl2_Event_Data_Source_Send *>( event );
 #else
-    Ecore_Wl_Event_Data_Source_Send *ev = (Ecore_Wl_Event_Data_Source_Send *)event;
+    Ecore_Wl_Event_Data_Source_Send *ev = reinterpret_cast<Ecore_Wl_Event_Data_Source_Send *>( event );
 #endif
 
     int len_buf = mSendBuffer.length();
@@ -160,12 +157,12 @@ struct Clipboard::Impl
   char *ExcuteReceive( void *event )
   {
 #ifdef ECORE_WAYLAND2
-    Ecore_Wl2_Event_Selection_Data_Ready *ev = (Ecore_Wl2_Event_Selection_Data_Ready *)event;
+    Ecore_Wl2_Event_Selection_Data_Ready *ev = reinterpret_cast<Ecore_Wl2_Event_Selection_Data_Ready *>( event );
 #else
-    Ecore_Wl_Event_Selection_Data_Ready *ev = (Ecore_Wl_Event_Selection_Data_Ready *)event;
+    Ecore_Wl_Event_Selection_Data_Ready *ev = reinterpret_cast<Ecore_Wl_Event_Selection_Data_Ready *>( event );
 #endif
 
-    return (char *)ev->data;
+    return reinterpret_cast<char *>( ev->data );
   }
 
   int GetCount()
@@ -328,5 +325,3 @@ char* Clipboard::ExcuteBuffered( bool type, void *event )
 } // namespace Internal
 
 } // namespace Dali
-
-#pragma GCC diagnostic pop
index 0a6b1f4..38a488e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -19,7 +19,7 @@
 #include <dali/internal/clipboard/common/clipboard-impl.h>
 
 // EXTERNAL INCLUDES
-#include <Ecore_X.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
 #include <dali/public-api/object/any.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/integration-api/debug.h>
index ae88aef..2fdeb4f 100755 (executable)
@@ -1268,9 +1268,9 @@ void HalveScanlineInPlaceRGB888( unsigned char * const pixels, const unsigned in
     const unsigned int c23 = pixels[pixel * 3 + 5];
 
     // Save the averaged byte pixel components:
-    pixels[outPixel * 3]     = AverageComponent( c11, c21 );
-    pixels[outPixel * 3 + 1] = AverageComponent( c12, c22 );
-    pixels[outPixel * 3 + 2] = AverageComponent( c13, c23 );
+    pixels[outPixel * 3]     = static_cast<unsigned char>( AverageComponent( c11, c21 ) );
+    pixels[outPixel * 3 + 1] = static_cast<unsigned char>( AverageComponent( c12, c22 ) );
+    pixels[outPixel * 3 + 2] = static_cast<unsigned char>( AverageComponent( c13, c23 ) );
   }
 }
 
@@ -1321,8 +1321,8 @@ void HalveScanlineInPlace2Bytes( unsigned char * const pixels, const unsigned in
     const unsigned int c22 = pixels[pixel * 2 + 3];
 
     // Save the averaged byte pixel components:
-    pixels[outPixel * 2]     = AverageComponent( c11, c21 );
-    pixels[outPixel * 2 + 1] = AverageComponent( c12, c22 );
+    pixels[outPixel * 2]     = static_cast<unsigned char>( AverageComponent( c11, c21 ) );
+    pixels[outPixel * 2 + 1] = static_cast<unsigned char>( AverageComponent( c12, c22 ) );
   }
 }
 
@@ -1339,7 +1339,7 @@ void HalveScanlineInPlace1Byte( unsigned char * const pixels, const unsigned int
     const unsigned int c2 = pixels[pixel + 1];
 
     // Save the averaged byte pixel component:
-    pixels[outPixel] = AverageComponent( c1, c2 );
+    pixels[outPixel] = static_cast<unsigned char>( AverageComponent( c1, c2 ) );
   }
 }
 
@@ -1356,7 +1356,7 @@ void AverageScanlines1( const unsigned char * const scanline1,
 
   for( unsigned int component = 0; component < width; ++component )
   {
-    outputScanline[component] = AverageComponent( scanline1[component], scanline2[component] );
+    outputScanline[component] = static_cast<unsigned char>( AverageComponent( scanline1[component], scanline2[component] ) );
   }
 }
 
@@ -1369,7 +1369,7 @@ void AverageScanlines2( const unsigned char * const scanline1,
 
   for( unsigned int component = 0; component < width * 2; ++component )
   {
-    outputScanline[component] = AverageComponent( scanline1[component], scanline2[component] );
+    outputScanline[component] = static_cast<unsigned char>( AverageComponent( scanline1[component], scanline2[component] ) );
   }
 }
 
@@ -1382,7 +1382,7 @@ void AverageScanlines3( const unsigned char * const scanline1,
 
   for( unsigned int component = 0; component < width * 3; ++component )
   {
-    outputScanline[component] = AverageComponent( scanline1[component], scanline2[component] );
+    outputScanline[component] = static_cast<unsigned char>( AverageComponent( scanline1[component], scanline2[component] ) );
   }
 }
 
@@ -1684,9 +1684,9 @@ void PointSample3BPP( const uint8_t * inPixels,
       ///@ToDo: Optimise - Benchmark one 32bit load that will be unaligned 2/3 of the time + 3 rotate and masks, versus these three aligned byte loads, versus using an RGB packed, aligned(1) struct and letting compiler pick a strategy.
 
       // Output the pixel components:
-      outScanline[outX]     = c0;
-      outScanline[outX + 1] = c1;
-      outScanline[outX + 2] = c2;
+      outScanline[outX]     = static_cast<uint8_t>( c0 );
+      outScanline[outX + 1] = static_cast<uint8_t>( c1 );
+      outScanline[outX + 2] = static_cast<uint8_t>( c2 );
 
       // Increment the fixed-point input coordinate:
       inX += deltaX;
@@ -1743,15 +1743,15 @@ namespace
 /** @brief Blend 4 pixels together using horizontal and vertical weights. */
 inline uint8_t BilinearFilter1BPPByte( uint8_t tl, uint8_t tr, uint8_t bl, uint8_t br, unsigned int fractBlendHorizontal, unsigned int fractBlendVertical )
 {
-  return BilinearFilter1Component( tl, tr, bl, br, fractBlendHorizontal, fractBlendVertical );
+  return static_cast<uint8_t>( BilinearFilter1Component( tl, tr, bl, br, fractBlendHorizontal, fractBlendVertical ) );
 }
 
 /** @copydoc BilinearFilter1BPPByte */
 inline Pixel2Bytes BilinearFilter2Bytes( Pixel2Bytes tl, Pixel2Bytes tr, Pixel2Bytes bl, Pixel2Bytes br, unsigned int fractBlendHorizontal, unsigned int fractBlendVertical )
 {
   Pixel2Bytes pixel;
-  pixel.l = BilinearFilter1Component( tl.l, tr.l, bl.l, br.l, fractBlendHorizontal, fractBlendVertical );
-  pixel.a = BilinearFilter1Component( tl.a, tr.a, bl.a, br.a, fractBlendHorizontal, fractBlendVertical );
+  pixel.l = static_cast<uint8_t>( BilinearFilter1Component( tl.l, tr.l, bl.l, br.l, fractBlendHorizontal, fractBlendVertical ) );
+  pixel.a = static_cast<uint8_t>( BilinearFilter1Component( tl.a, tr.a, bl.a, br.a, fractBlendHorizontal, fractBlendVertical ) );
   return pixel;
 }
 
@@ -1759,18 +1759,18 @@ inline Pixel2Bytes BilinearFilter2Bytes( Pixel2Bytes tl, Pixel2Bytes tr, Pixel2B
 inline Pixel3Bytes BilinearFilterRGB888( Pixel3Bytes tl, Pixel3Bytes tr, Pixel3Bytes bl, Pixel3Bytes br, unsigned int fractBlendHorizontal, unsigned int fractBlendVertical )
 {
   Pixel3Bytes pixel;
-  pixel.r = BilinearFilter1Component( tl.r, tr.r, bl.r, br.r, fractBlendHorizontal, fractBlendVertical );
-  pixel.g = BilinearFilter1Component( tl.g, tr.g, bl.g, br.g, fractBlendHorizontal, fractBlendVertical );
-  pixel.b = BilinearFilter1Component( tl.b, tr.b, bl.b, br.b, fractBlendHorizontal, fractBlendVertical );
+  pixel.r = static_cast<uint8_t>( BilinearFilter1Component( tl.r, tr.r, bl.r, br.r, fractBlendHorizontal, fractBlendVertical ) );
+  pixel.g = static_cast<uint8_t>( BilinearFilter1Component( tl.g, tr.g, bl.g, br.g, fractBlendHorizontal, fractBlendVertical ) );
+  pixel.b = static_cast<uint8_t>( BilinearFilter1Component( tl.b, tr.b, bl.b, br.b, fractBlendHorizontal, fractBlendVertical ) );
   return pixel;
 }
 
 /** @copydoc BilinearFilter1BPPByte */
 inline PixelRGB565 BilinearFilterRGB565( PixelRGB565 tl, PixelRGB565 tr, PixelRGB565 bl, PixelRGB565 br, unsigned int fractBlendHorizontal, unsigned int fractBlendVertical )
 {
-  const PixelRGB565 pixel = (BilinearFilter1Component( tl >> 11u, tr >> 11u, bl >> 11u, br >> 11u, fractBlendHorizontal, fractBlendVertical ) << 11u) +
+  const PixelRGB565 pixel = static_cast<PixelRGB565>( (BilinearFilter1Component( tl >> 11u, tr >> 11u, bl >> 11u, br >> 11u, fractBlendHorizontal, fractBlendVertical ) << 11u) +
                             (BilinearFilter1Component( (tl >> 5u) & 63u, (tr >> 5u) & 63u, (bl >> 5u) & 63u, (br >> 5u) & 63u, fractBlendHorizontal, fractBlendVertical ) << 5u) +
-                             BilinearFilter1Component( tl & 31u, tr & 31u, bl & 31u, br & 31u, fractBlendHorizontal, fractBlendVertical );
+                             BilinearFilter1Component( tl & 31u, tr & 31u, bl & 31u, br & 31u, fractBlendHorizontal, fractBlendVertical ) );
   return pixel;
 }
 
@@ -1778,10 +1778,10 @@ inline PixelRGB565 BilinearFilterRGB565( PixelRGB565 tl, PixelRGB565 tr, PixelRG
 inline Pixel4Bytes BilinearFilter4Bytes( Pixel4Bytes tl, Pixel4Bytes tr, Pixel4Bytes bl, Pixel4Bytes br, unsigned int fractBlendHorizontal, unsigned int fractBlendVertical )
 {
   Pixel4Bytes pixel;
-  pixel.r = BilinearFilter1Component( tl.r, tr.r, bl.r, br.r, fractBlendHorizontal, fractBlendVertical );
-  pixel.g = BilinearFilter1Component( tl.g, tr.g, bl.g, br.g, fractBlendHorizontal, fractBlendVertical );
-  pixel.b = BilinearFilter1Component( tl.b, tr.b, bl.b, br.b, fractBlendHorizontal, fractBlendVertical );
-  pixel.a = BilinearFilter1Component( tl.a, tr.a, bl.a, br.a, fractBlendHorizontal, fractBlendVertical );
+  pixel.r = static_cast<uint8_t>( BilinearFilter1Component( tl.r, tr.r, bl.r, br.r, fractBlendHorizontal, fractBlendVertical ) );
+  pixel.g = static_cast<uint8_t>( BilinearFilter1Component( tl.g, tr.g, bl.g, br.g, fractBlendHorizontal, fractBlendVertical ) );
+  pixel.b = static_cast<uint8_t>( BilinearFilter1Component( tl.b, tr.b, bl.b, br.b, fractBlendHorizontal, fractBlendVertical ) );
+  pixel.a = static_cast<uint8_t>( BilinearFilter1Component( tl.a, tr.a, bl.a, br.a, fractBlendHorizontal, fractBlendVertical ) );
   return pixel;
 }
 
index f115f02..e37c88e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -413,20 +413,20 @@ void WriteChannel( unsigned char* pixelData,
     {
       if( channel == RED )
       {
-        *pixelData &= ~0xF8;
+        *pixelData &= static_cast<unsigned char>( ~0xF8 );
         *pixelData |= static_cast<unsigned char>( (channelValue << 3) & 0xF8 );
       }
       else if( channel == GREEN )
       {
-        *pixelData &= ~0x07;
+        *pixelData &= static_cast<unsigned char>( ~0x07 );
         *pixelData |= static_cast<unsigned char>( (channelValue >> 3) & 0x07 );
 
-        *(pixelData+1) &= ~0xE0;
+        *(pixelData+1) &= static_cast<unsigned char>( ~0xE0 );
         *(pixelData+1) |= static_cast<unsigned char>( (channelValue << 5) & 0xE0 );
       }
       else if( channel == BLUE )
       {
-        *(pixelData+1) &= ~0x1F;
+        *(pixelData+1) &= static_cast<unsigned char>( ~0x1F );
         *(pixelData+1) |= static_cast<unsigned char>( channelValue & 0x1F );
       }
       break;
@@ -436,20 +436,20 @@ void WriteChannel( unsigned char* pixelData,
     {
       if( channel == BLUE )
       {
-        *pixelData &= ~0xF8;
+        *pixelData &= static_cast<unsigned char>( ~0xF8 );
         *pixelData |= static_cast<unsigned char>( (channelValue << 3) & 0xF8 );
       }
       else if( channel == GREEN )
       {
-        *pixelData &= ~0x07;
+        *pixelData &= static_cast<unsigned char>( ~0x07 );
         *pixelData |= static_cast<unsigned char>( (channelValue >> 3) & 0x07 );
 
-        *(pixelData+1) &= ~0xE0;
+        *(pixelData+1) &= static_cast<unsigned char>( ~0xE0 );
         *(pixelData+1) |= static_cast<unsigned char>( (channelValue << 5) & 0xE0 );
       }
       else if( channel == RED )
       {
-        *(pixelData+1) &= ~0x1F;
+        *(pixelData+1) &= static_cast<unsigned char>( ~0x1F );
         *(pixelData+1) |= static_cast<unsigned char>( channelValue & 0x1F );
       }
       break;
@@ -536,22 +536,22 @@ void WriteChannel( unsigned char* pixelData,
     {
       if( channel == RED )
       {
-        *pixelData &= ~0xF0;
+        *pixelData &= static_cast<unsigned char>( ~0xF0 );
         *pixelData |= static_cast<unsigned char>( (channelValue << 4) & 0xF0 );
       }
       else if( channel == GREEN )
       {
-        *pixelData &= ~0x0F;
+        *pixelData &= static_cast<unsigned char>( ~0x0F );
         *pixelData |= static_cast<unsigned char>( channelValue & 0x0F );
       }
       else if( channel == BLUE )
       {
-        *(pixelData+1) &= ~0xF0;
+        *(pixelData+1) &= static_cast<unsigned char>( ~0xF0 );
         *(pixelData+1) |= static_cast<unsigned char>( (channelValue << 4) & 0xF0 );
       }
       else if( channel == ALPHA )
       {
-        *(pixelData+1) &= ~0x0F;
+        *(pixelData+1) &= static_cast<unsigned char>( ~0x0F );
         *(pixelData+1) |= static_cast<unsigned char>( channelValue & 0x0F );
       }
       break;
@@ -561,22 +561,22 @@ void WriteChannel( unsigned char* pixelData,
     {
       if( channel == BLUE )
       {
-        *pixelData &= ~0xF0;
+        *pixelData &= static_cast<unsigned char>( ~0xF0 );
         *pixelData |= static_cast<unsigned char>( (channelValue << 4) & 0xF0 );
       }
       else if( channel == GREEN )
       {
-        *pixelData &= ~0x0F;
+        *pixelData &= static_cast<unsigned char>( ~0x0F );
         *pixelData |= static_cast<unsigned char>( channelValue & 0x0F );
       }
       else if( channel == RED )
       {
-        *(pixelData+1) &= ~0xF0;
+        *(pixelData+1) &= static_cast<unsigned char>( ~0xF0 );
         *(pixelData+1) |= static_cast<unsigned char>( (channelValue << 4) & 0xF0 );
       }
       else if( channel == ALPHA )
       {
-        *(pixelData+1) &= ~0x0F;
+        *(pixelData+1) &= static_cast<unsigned char>( ~0x0F );
         *(pixelData+1) |= static_cast<unsigned char>( channelValue & 0x0F );
       }
       break;
@@ -588,25 +588,25 @@ void WriteChannel( unsigned char* pixelData,
       //    F8  7 C0  3E 1
       if( channel == RED )
       {
-        *pixelData &= ~0xF8;
+        *pixelData &= static_cast<unsigned char>( ~0xF8 );
         *pixelData |= static_cast<unsigned char>( (channelValue << 3) & 0xF8 );
       }
       else if( channel == GREEN )
       {
-        *pixelData &= ~0x07;
+        *pixelData &= static_cast<unsigned char>( ~0x07 );
         *pixelData |= static_cast<unsigned char>( (channelValue >> 2) & 0x07 );
 
-        *(pixelData+1) &= ~0xC0;
+        *(pixelData+1) &= static_cast<unsigned char>( ~0xC0 );
         *(pixelData+1) |= static_cast<unsigned char>( (channelValue << 6) & 0xC0 );
       }
       else if( channel == BLUE )
       {
-        *(pixelData+1) &= ~0x3E;
+        *(pixelData+1) &= static_cast<unsigned char>( ~0x3E );
         *(pixelData+1) |= static_cast<unsigned char>( (channelValue << 1) & 0x3E );
       }
       else if( channel == ALPHA )
       {
-        *(pixelData+1) &= ~0x01;
+        *(pixelData+1) &= static_cast<unsigned char>( ~0x01 );
         *(pixelData+1) |= static_cast<unsigned char>( channelValue & 0x01 );
       }
       break;
@@ -616,25 +616,25 @@ void WriteChannel( unsigned char* pixelData,
     {
       if( channel == BLUE )
       {
-        *pixelData &= ~0xF8;
+        *pixelData &= static_cast<unsigned char>( ~0xF8 );
         *pixelData |= static_cast<unsigned char>( (channelValue << 3) & 0xF8 );
       }
       else if( channel == GREEN )
       {
-        *pixelData &= ~0x07;
+        *pixelData &= static_cast<unsigned char>( ~0x07 );
         *pixelData |= static_cast<unsigned char>( (channelValue >> 2) & 0x07 );
 
-        *(pixelData+1) &= ~0xC0;
+        *(pixelData+1) &= static_cast<unsigned char>( ~0xC0 );
         *(pixelData+1) |= static_cast<unsigned char>( (channelValue << 6) & 0xC0 );
       }
       else if( channel == RED )
       {
-        *(pixelData+1) &= ~0x3E;
+        *(pixelData+1) &= static_cast<unsigned char>( ~0x3E );
         *(pixelData+1) |= static_cast<unsigned char>( (channelValue << 1 ) & 0x3E );
       }
       else if( channel == ALPHA )
       {
-        *(pixelData+1) &= ~0x01;
+        *(pixelData+1) &= static_cast<unsigned char>( ~0x01 );
         *(pixelData+1) |= static_cast<unsigned char>( channelValue & 0x01 );
       }
       break;
index 18e8f1c..82518f5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -19,7 +19,7 @@
 #include <dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.h>
 
 // EXTERNAL INCLUDES
-#include <Ecore_X.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
 #include <X11/Xutil.h>
 #include <X11/Xlib.h>
 #include <dali/integration-api/debug.h>
index 0cb3bca..fb8ae29 100755 (executable)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H__
-#define __DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H__
+#ifndef DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H
+#define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -19,7 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
-#include <Ecore_X.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
 
 // INTERNAL INCLUDES
 #include <dali/internal/graphics/common/graphics-interface.h>
@@ -197,4 +197,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H__
+#endif // DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H
index ddfa5aa..cc755be 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_DRAG_AND_DROP_DETECTOR_H__
-#define __DALI_INTERNAL_DRAG_AND_DROP_DETECTOR_H__
+#ifndef DALI_INTERNAL_DRAG_AND_DROP_DETECTOR_H
+#define DALI_INTERNAL_DRAG_AND_DROP_DETECTOR_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -201,4 +201,4 @@ inline const Internal::Adaptor::DragAndDropDetector& GetImplementation(const Dal
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_DRAG_AND_DROP_DETECTOR_H__
+#endif // DALI_INTERNAL_DRAG_AND_DROP_DETECTOR_H
index d4e3ab7..e4b90a4 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_GESTURE_DETECTOR_H__
-#define __DALI_INTERNAL_GESTURE_DETECTOR_H__
+#ifndef DALI_INTERNAL_GESTURE_DETECTOR_H
+#define DALI_INTERNAL_GESTURE_DETECTOR_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -106,4 +106,4 @@ typedef IntrusivePtr<GestureDetector> GestureDetectorPtr;
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_GESTURE_DETECTOR_H__
+#endif // DALI_INTERNAL_GESTURE_DETECTOR_H
index 5d2d287..82a203d 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_GESTURE_MANAGER_H__
-#define __DALI_INTERNAL_GESTURE_MANAGER_H__
+#ifndef DALI_INTERNAL_GESTURE_MANAGER_H
+#define DALI_INTERNAL_GESTURE_MANAGER_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -132,4 +132,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_GESTURE_MANAGER_H__
+#endif // DALI_INTERNAL_GESTURE_MANAGER_H
index 983ec73..474fe1b 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_KEY_IMPL_H__
-#define __DALI_KEY_IMPL_H__
+#ifndef DALI_KEY_IMPL_H
+#define DALI_KEY_IMPL_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -82,4 +82,4 @@ int GetDaliKeyCode( const char* keyName );
 
 } // namespace Dali
 
-#endif // __DALI_KEY_IMPL_H__
+#endif // DALI_KEY_IMPL_H
index 7fc75fe..2716cf4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -209,7 +209,7 @@ bool LongPressGestureDetector::TimerCallback()
 
 void LongPressGestureDetector::EmitGesture(Gesture::State state)
 {
-  unsigned int touchPoints ( mTouchPositions.size() );
+  unsigned int touchPoints ( static_cast<unsigned int>( mTouchPositions.size() ) );
 
   // We should tell Core about the Possible and Cancelled states regardless of whether we have satisfied long press requirements.
   if ( (state == Gesture::Possible) ||
@@ -224,7 +224,7 @@ void LongPressGestureDetector::EmitGesture(Gesture::State state)
     {
       longPress.point += iter->second;
     }
-    longPress.point /= touchPoints;
+    longPress.point /= static_cast<float>( touchPoints );
 
     longPress.time = mTouchTime;
     if ( state != Gesture::Possible )
index a885002..595e0e8 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_LONG_PRESS_GESTURE_DETECTOR_H__
-#define __DALI_INTERNAL_LONG_PRESS_GESTURE_DETECTOR_H__
+#ifndef DALI_INTERNAL_LONG_PRESS_GESTURE_DETECTOR_H
+#define DALI_INTERNAL_LONG_PRESS_GESTURE_DETECTOR_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -116,7 +116,7 @@ private:
   unsigned int mMaximumTouchesRequired;   ///< The maximum touches allowable. Any more and a long press is not emitted.
 
   std::map<int, Vector2> mTouchPositions; ///< A map with all the touch down positions.
-  unsigned long mTouchTime;               ///< The time we first pressed down.
+  uint32_t mTouchTime;               ///< The time we first pressed down.
 
   Dali::Timer mTimer;                     ///< The timer used to determine a long press.
   SlotDelegate< LongPressGestureDetector > mTimerSlot;
@@ -128,4 +128,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_LONG_PRESS_GESTURE_DETECTOR_H__
+#endif // DALI_INTERNAL_LONG_PRESS_GESTURE_DETECTOR_H
index cef2a34..ad4774e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -69,7 +69,8 @@ PanGestureDetectorBase::PanGestureDetectorBase(Vector2 screenSize, const Integra
 
       // Usually, we do not want to apply the threshold straight away, but phased over the first few pans
       // Set our distance to threshold adjustments ratio here.
-      mThresholdTotalAdjustments = minimumDistance * MINIMUM_MOTION_DISTANCE_TO_THRESHOLD_ADJUSTMENTS_RATIO;
+      float fMinimumDistance = static_cast<float>( minimumDistance );
+      mThresholdTotalAdjustments = static_cast<unsigned int>( fMinimumDistance * MINIMUM_MOTION_DISTANCE_TO_THRESHOLD_ADJUSTMENTS_RATIO );
     }
 
     int minimumEvents = environmentOptions->GetMinimumPanEvents();
@@ -135,7 +136,7 @@ void PanGestureDetectorBase::SendEvent(const Integration::TouchEvent& event)
             Vector2 delta(event.points[0].GetScreenPosition() - mPrimaryTouchDownLocation);
 
             if ( ( mMotionEvents >= mMinimumMotionEvents ) &&
-                 ( delta.LengthSquared() >= mMinimumDistanceSquared ) )
+                 ( delta.LengthSquared() >= static_cast<float>( mMinimumDistanceSquared ) ) )
             {
               // If the touch point(s) have moved enough distance to be considered a pan, then tell Core that the pan gesture has started and change our state accordingly.
               mState = Started;
@@ -145,7 +146,7 @@ void PanGestureDetectorBase::SendEvent(const Integration::TouchEvent& event)
           else if (primaryPointState == PointState::UP)
           {
             Vector2 delta(event.points[0].GetScreenPosition() - mPrimaryTouchDownLocation);
-            if(delta.LengthSquared() >= mMinimumDistanceSquared)
+            if (delta.LengthSquared() >= static_cast<float>( mMinimumDistanceSquared ) )
             {
               SendPan(Gesture::Started, event);
               mTouchEvents.push_back(event);
@@ -277,7 +278,7 @@ void PanGestureDetectorBase::SendPan(Gesture::State state, const Integration::To
     const Integration::TouchEvent& previousEvent( *( mTouchEvents.rbegin() + 1 ) );
 
     Vector2 previousPosition( mPreviousPosition );
-    unsigned long previousTime( previousEvent.time );
+    uint32_t previousTime( previousEvent.time );
 
     // If we've just started then we want to remove the threshold from Core calculations.
     if ( state == Gesture::Started )
@@ -290,7 +291,7 @@ void PanGestureDetectorBase::SendPan(Gesture::State state, const Integration::To
       if ( ( currentEvent.time - previousTime ) > MINIMUM_TIME_BEFORE_THRESHOLD_ADJUSTMENTS )
       {
         mThresholdAdjustmentsRemaining = mThresholdTotalAdjustments;
-        mThresholdAdjustmentPerFrame = ( gesture.currentPosition - previousPosition ) / mThresholdTotalAdjustments;
+        mThresholdAdjustmentPerFrame = ( gesture.currentPosition - previousPosition ) / static_cast<float>( mThresholdTotalAdjustments );
       }
       else
       {
@@ -306,7 +307,7 @@ void PanGestureDetectorBase::SendPan(Gesture::State state, const Integration::To
     if ( mThresholdAdjustmentsRemaining > 0 )
     {
       --mThresholdAdjustmentsRemaining;
-      gesture.currentPosition -= mThresholdAdjustmentPerFrame * mThresholdAdjustmentsRemaining;
+      gesture.currentPosition -= mThresholdAdjustmentPerFrame * static_cast<float>( mThresholdAdjustmentsRemaining );
     }
 
     mPreviousPosition = gesture.currentPosition;
index 933e311..ea35e6a 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_PAN_GESTURE_DETECTOR_BASE_H__
-#define __DALI_INTERNAL_PAN_GESTURE_DETECTOR_BASE_H__
+#ifndef DALI_INTERNAL_PAN_GESTURE_DETECTOR_BASE_H
+#define DALI_INTERNAL_PAN_GESTURE_DETECTOR_BASE_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -19,6 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
+#include <cstdint> // uint32_t
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/math/vector2.h>
 #include <dali/integration-api/events/pan-gesture-event.h>
@@ -116,7 +117,7 @@ private:
   unsigned int mThresholdAdjustmentsRemaining; ///< No. of threshold adjustments still to apply (for a slow-pan).
   unsigned int mThresholdTotalAdjustments;     ///< The total number of adjustments required.
 
-  unsigned long mPrimaryTouchDownTime;  ///< The initial touch down time.
+  uint32_t mPrimaryTouchDownTime;       ///< The initial touch down time.
   unsigned int mMinimumTouchesRequired; ///< The minimum touches required before a pan should be emitted.
   unsigned int mMaximumTouchesRequired; ///< The maximum touches after which a pan should not be emitted.
 
@@ -131,4 +132,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_PAN_GESTURE_DETECTOR_BASE_H__
+#endif // DALI_INTERNAL_PAN_GESTURE_DETECTOR_BASE_H
index c7ae582..e64574a 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_PAN_GESTURE_DETECTOR_H__
-#define __DALI_INTERNAL_PAN_GESTURE_DETECTOR_H__
+#ifndef DALI_INTERNAL_PAN_GESTURE_DETECTOR_H
+#define DALI_INTERNAL_PAN_GESTURE_DETECTOR_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -83,4 +83,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_PAN_GESTURE_DETECTOR_H__
+#endif // DALI_INTERNAL_PAN_GESTURE_DETECTOR_H
index fab20ff..7bf323b 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_PHYSICAL_KEYBOARD_H__
-#define __DALI_INTERNAL_PHYSICAL_KEYBOARD_H__
+#ifndef DALI_INTERNAL_PHYSICAL_KEYBOARD_H
+#define DALI_INTERNAL_PHYSICAL_KEYBOARD_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -116,4 +116,4 @@ inline static const  Internal::Adaptor::PhysicalKeyboard& GetImplementation( con
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_PHYSICAL_KEYBOARD_H__
+#endif // DALI_INTERNAL_PHYSICAL_KEYBOARD_H
index baeaaa0..1f7732b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -233,8 +233,8 @@ void PinchGestureDetector::SendPinch(Gesture::State state, const Integration::To
     gesture.scale = currentDistance / mStartingDistance;
 
     float distanceDelta = fabsf(firstDistance - currentDistance);
-    unsigned long timeDelta = currentEvent.time - firstEvent.time;
-    gesture.speed = (distanceDelta / timeDelta) * 1000.0f;
+    float timeDelta = static_cast<float> ( currentEvent.time - firstEvent.time );
+    gesture.speed = ( distanceDelta / timeDelta ) * 1000.0f;
 
     gesture.centerPoint = GetCenterPoint(currentPoint1, currentPoint2);
   }
index 9e17eab..547950f 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_PINCH_GESTURE_DETECTOR_H__
-#define __DALI_INTERNAL_PINCH_GESTURE_DETECTOR_H__
+#ifndef DALI_INTERNAL_PINCH_GESTURE_DETECTOR_H
+#define DALI_INTERNAL_PINCH_GESTURE_DETECTOR_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -115,4 +115,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_PINCH_GESTURE_DETECTOR_H__
+#endif // DALI_INTERNAL_PINCH_GESTURE_DETECTOR_H
index 320f3ce..060a12d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -82,7 +82,7 @@ void TapGestureDetector::SendEvent(const Integration::TouchEvent& event)
 
       case Touched:
       {
-        unsigned long deltaBetweenTouchDownTouchUp = abs( event.time - mTouchTime ) ;
+        uint32_t deltaBetweenTouchDownTouchUp = event.time - mTouchTime;
 
         if ( pointState == PointState::UP )
         {
@@ -108,12 +108,12 @@ void TapGestureDetector::SendEvent(const Integration::TouchEvent& event)
       {
         if ( pointState == PointState::UP )
         {
-          unsigned long deltaBetweenTouchDownTouchUp = abs( event.time - mTouchTime ) ;
+          uint32_t deltaBetweenTouchDownTouchUp = event.time - mTouchTime;
 
           if ( deltaBetweenTouchDownTouchUp < MAXIMUM_TIME_ALLOWED )
           {
             // This is a possible multiple tap, so has it been quick enough ?
-            unsigned long timeDelta = abs( event.time - mLastTapTime );
+            uint32_t timeDelta = event.time - mLastTapTime;
             if ( timeDelta > MAXIMUM_TIME_ALLOWED ) // If exceeded time between taps then just a single tap.
             {
               mLastTapTime = event.time;
@@ -138,7 +138,7 @@ void TapGestureDetector::SendEvent(const Integration::TouchEvent& event)
           Vector2 distanceDelta(abs(mTouchPosition.x - screen.x),
                                 abs(mTouchPosition.y - screen.y));
 
-          unsigned long timeDelta = abs( event.time - mLastTapTime );
+          uint32_t timeDelta = event.time - mLastTapTime;
 
           if (distanceDelta.x > MAXIMUM_MOTION_ALLOWED ||
               distanceDelta.y > MAXIMUM_MOTION_ALLOWED ||
@@ -201,7 +201,7 @@ void TapGestureDetector::Update(const Integration::GestureRequest& request)
   mMaximumTapsRequired = tap.maxTaps;
 }
 
-void TapGestureDetector::EmitGesture( Gesture::State state, unsigned int time )
+void TapGestureDetector::EmitGesture( Gesture::State state, uint32_t time )
 {
   if ( (state == Gesture::Cancelled) ||
        (mTapsRegistered >= mMinimumTapsRequired && mTapsRegistered <= mMaximumTapsRequired) )
@@ -212,7 +212,7 @@ void TapGestureDetector::EmitGesture( Gesture::State state, unsigned int time )
   }
 }
 
-void TapGestureDetector::EmitSingleTap( unsigned int time, const Integration::Point& point )
+void TapGestureDetector::EmitSingleTap( uint32_t time, const Integration::Point& point )
 {
   Integration::TapGestureEvent event( Gesture::Started );
   const Vector2& screen( point.GetScreenPosition() );
@@ -228,7 +228,7 @@ void TapGestureDetector::EmitSingleTap( unsigned int time, const Integration::Po
   EmitTap( time, event );
 }
 
-void TapGestureDetector::EmitTap( unsigned int time, Integration::TapGestureEvent& event )
+void TapGestureDetector::EmitTap( uint32_t time, Integration::TapGestureEvent& event )
 {
   event.numberOfTaps = mTapsRegistered;
   event.point = mTouchPosition;
index 8090eae..4dd5e55 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_TAP_GESTURE_DETECTOR_H__
-#define __DALI_INTERNAL_TAP_GESTURE_DETECTOR_H__
+#ifndef DALI_INTERNAL_TAP_GESTURE_DETECTOR_H
+#define DALI_INTERNAL_TAP_GESTURE_DETECTOR_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -19,6 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
+#include <cstdint> // uint32_t
 #include <dali/integration-api/events/tap-gesture-event.h>
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/integration-api/events/point.h>
@@ -83,7 +84,7 @@ private:
    * @param[in] state current state of incomplete gesture
    * @param[in] time time of this latest touch event
    */
-  void EmitGesture( Gesture::State state, unsigned int time );
+  void EmitGesture( Gesture::State state, uint32_t time );
 
   /**
    * Initialises tap gesture detector for next tap sequence
@@ -106,7 +107,7 @@ private:
    * @param[in] time time of this latest touch event
    * @param[in] point position touch event occurred
     */
-  void EmitSingleTap( unsigned int time, const Integration::Point& point );
+  void EmitSingleTap( uint32_t time, const Integration::Point& point );
 
   /**
    * Emit a tap event
@@ -114,7 +115,7 @@ private:
    * @param[in] time time of this latest touch event
    * @param[in] event registered touch event
    */
-  void EmitTap( unsigned int time, Integration::TapGestureEvent& event );
+  void EmitTap( uint32_t time, Integration::TapGestureEvent& event );
 
 private:
 
@@ -137,8 +138,8 @@ private:
   int mTapsRegistered;      ///< In current detection, the number of taps registered.
 
   Vector2 mTouchPosition;   ///< The initial touch down position.
-  unsigned long mTouchTime; ///< The initial touch down time.
-  unsigned long mLastTapTime; ///< Time last tap gesture was registered
+  uint32_t mTouchTime;      ///< The initial touch down time.
+  uint32_t mLastTapTime;    ///< Time last tap gesture was registered
 
 };
 
@@ -148,4 +149,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_TAP_GESTURE_DETECTOR_H__
+#endif // DALI_INTERNAL_TAP_GESTURE_DETECTOR_H
index 711a21b..da0fccb 100755 (executable)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_VIRTUAL_KEYBOARD_H__
-#define __DALI_INTERNAL_VIRTUAL_KEYBOARD_H__
+#ifndef DALI_INTERNAL_VIRTUAL_KEYBOARD_H
+#define DALI_INTERNAL_VIRTUAL_KEYBOARD_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -99,4 +99,4 @@ Dali::VirtualKeyboard::TextDirection GetTextDirection();
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_VIRTUAL_KEYBOARD_H__
+#endif // DALI_INTERNAL_VIRTUAL_KEYBOARD_H
diff --git a/dali/internal/input/linux/dali-ecore-imf.h b/dali/internal/input/linux/dali-ecore-imf.h
new file mode 100644 (file)
index 0000000..62aef33
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef DALI_INTERNAL_INPUT_LINUX_DALI_ECORE_IMF_H
+#define DALI_INTERNAL_INPUT_LINUX_DALI_ECORE_IMF_H
+
+/*
+ * Copyright (c) 2019 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.
+ *
+ */
+
+#pragma GCC system_header
+#include <Ecore_IMF.h>
+
+
+
+#endif /* DALI_INTERNAL_INPUT_LINUX_DALI_ECORE_IMF_H */
index ed453a4..1a63ccf 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -24,9 +24,6 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-// Ecore is littered with C style cast
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
 #include <dali/internal/input/tizen-wayland/ecore-virtual-keyboard.h>
 #include <dali/integration-api/adaptor.h>
 #include <dali/internal/system/common/locale-utils.h>
@@ -154,7 +151,7 @@ void ApplySettings( const Property::Map& settingsMap )
 {
   using namespace InputMethod; // Allows exclusion of namespace in TOKEN_STRING.
 
-  for ( unsigned int i = 0, count = settingsMap.Count(); i < count; ++i )
+  for ( unsigned long i = 0, count = settingsMap.Count(); i < count; ++i )
   {
     Property::Key key = settingsMap.GetKeyAt( i );
     if( key.type == Property::Key::INDEX )
@@ -211,5 +208,3 @@ Dali::VirtualKeyboard::TextDirection GetTextDirection()
 } // namespace Internal
 
 } // namespace Dali
-
-#pragma GCC diagnostic pop
index 85e9b74..0226342 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_ECORE_VIRTUAL_KEYBOARD_H__
-#define __DALI_INTERNAL_ECORE_VIRTUAL_KEYBOARD_H__
+#ifndef DALI_INTERNAL_ECORE_VIRTUAL_KEYBOARD_H
+#define DALI_INTERNAL_ECORE_VIRTUAL_KEYBOARD_H
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -19,7 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
-#include <Ecore_IMF.h>
+#include <dali/internal/input/linux/dali-ecore-imf.h>
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/virtual-keyboard.h>
@@ -61,4 +61,4 @@ void DisconnectCallbacks( Ecore_IMF_Context *imfContext );
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_ECORE_VIRTUAL_KEYBOARD_H__
+#endif // DALI_INTERNAL_ECORE_VIRTUAL_KEYBOARD_H
index 34255a5..ef4fc15 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -16,9 +16,6 @@
  */
 
 // CLASS HEADER
-// Ecore is littered with C style cast
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
 
 #include <dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.h>
 
@@ -977,7 +974,7 @@ bool InputMethodContextEcoreWl::ProcessEventKeyDown( const KeyEvent& keyEvent )
     {
       eventHandled = ecore_imf_context_filter_event(mIMFContext,
                                                     ECORE_IMF_EVENT_KEY_DOWN,
-                                                    (Ecore_IMF_Event *) &ecoreKeyDownEvent);
+                                                    reinterpret_cast<Ecore_IMF_Event *>( &ecoreKeyDownEvent ) );
     }
 
     // If the event has not been handled by InputMethodContext then check if we should reset our input method context
@@ -1020,7 +1017,7 @@ bool InputMethodContextEcoreWl::ProcessEventKeyUp( const KeyEvent& keyEvent )
 
     eventHandled = ecore_imf_context_filter_event(mIMFContext,
                                                   ECORE_IMF_EVENT_KEY_UP,
-                                                  (Ecore_IMF_Event *) &ecoreKeyUpEvent);
+                                                  reinterpret_cast<Ecore_IMF_Event *>( &ecoreKeyUpEvent ) );
   }
   return eventHandled;
 }
@@ -1084,5 +1081,3 @@ Ecore_IMF_Keyboard_Locks InputMethodContextEcoreWl::EcoreInputModifierToEcoreIMF
 } // Internal
 
 } // Dali
-
-#pragma GCC diagnostic pop
index 4630637..eca83cd 100755 (executable)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_ECORE_WL_H
-#define __DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_ECORE_WL_H
+#ifndef DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_ECORE_WL_H
+#define DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_ECORE_WL_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -19,8 +19,8 @@
  */
 
 // EXTERNAL INCLUDES
-#include <Ecore_IMF.h>
-#include <Ecore.h>
+#include <dali/internal/input/linux/dali-ecore-imf.h>
+#include <dali/internal/system/linux/dali-ecore.h>
 
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/object/base-object.h>
@@ -317,4 +317,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_ECORE_WL_H
+#endif // DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_ECORE_WL_H
index f1fe613..4c664ac 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -19,8 +19,8 @@
 #include <dali/internal/input/common/virtual-keyboard-impl.h>
 
 // EXTERNAL INCLUDES
-#include <Ecore.h>
-#include <Ecore_IMF.h>
+#include <dali/internal/system/linux/dali-ecore.h>
+#include <dali/internal/input/linux/dali-ecore-imf.h>
 #include <algorithm>
 
 #include <dali/public-api/common/vector-wrapper.h>
diff --git a/dali/internal/input/ubuntu-x11/dali-ecore-input.h b/dali/internal/input/ubuntu-x11/dali-ecore-input.h
new file mode 100644 (file)
index 0000000..4598b70
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef DALI_INTERNAL_INPUT_UBUNTU_X11_DALI_ECORE_INPUT_H
+#define DALI_INTERNAL_INPUT_UBUNTU_X11_DALI_ECORE_INPUT_H
+
+/*
+ * Copyright (c) 2019 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.
+ *
+ */
+
+#pragma GCC system_header
+#include <Ecore_Input.h>
+
+
+
+#endif /* DALI_INTERNAL_INPUT_UBUNTU_X11_DALI_ECORE_INPUT_H */
index 7a2ab0e..add026d 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -19,8 +19,8 @@
 #include <dali/internal/input/ubuntu-x11/input-method-context-impl-x.h>
 
 // EXTERNAL INCLUDES
-#include <Ecore_IMF.h>
-#include <Ecore_Input.h>
+#include <dali/internal/input/linux/dali-ecore-imf.h>
+#include <dali/internal/input/ubuntu-x11/dali-ecore-input.h>
 #include <dali/public-api/events/key-event.h>
 #include <dali/public-api/adaptor-framework/key.h>
 #include <dali/public-api/object/type-registry.h>
@@ -33,9 +33,6 @@
 #include <dali/internal/system/common/singleton-service-impl.h>
 #include <dali/internal/input/common/virtual-keyboard-impl.h>
 #include <dali/internal/input/common/key-impl.h>
-// Ecore is littered with C style cast
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
 #include <dali/internal/input/tizen-wayland/ecore-virtual-keyboard.h>
 
 namespace Dali
@@ -357,7 +354,7 @@ void InputMethodContextX::PreEditChanged( void*, ImfContext* imfContext, void* e
           const size_t currentSequenceLength = Utf8SequenceLength( leadByte ); // returns number of bytes used to represent character.
           if ( byteIndex == attr->end_index )
           {
-            cursorPosition = visualCharacterIndex;
+            cursorPosition = static_cast<int>( visualCharacterIndex );
             break;
             // end loop as found cursor position that matches byte position
           }
@@ -785,7 +782,7 @@ bool InputMethodContextX::ProcessEventKeyDown( const KeyEvent& keyEvent )
     {
       eventHandled = ecore_imf_context_filter_event(mIMFContext,
                                                     ECORE_IMF_EVENT_KEY_DOWN,
-                                                    (Ecore_IMF_Event *) &ecoreKeyDownEvent);
+                                                    reinterpret_cast<Ecore_IMF_Event *>( &ecoreKeyDownEvent ));
     }
 
     // If the event has not been handled by InputMethodContext then check if we should reset our IMFcontext
@@ -827,7 +824,7 @@ bool InputMethodContextX::ProcessEventKeyUp( const KeyEvent& keyEvent )
 
     eventHandled = ecore_imf_context_filter_event(mIMFContext,
                                                   ECORE_IMF_EVENT_KEY_UP,
-                                                  (Ecore_IMF_Event *) &ecoreKeyUpEvent);
+                                                  reinterpret_cast<Ecore_IMF_Event *>( &ecoreKeyUpEvent ));
   }
   return eventHandled;
 }
@@ -891,5 +888,3 @@ Ecore_IMF_Keyboard_Locks InputMethodContextX::EcoreInputModifierToEcoreIMFLock(
 } // Internal
 
 } // Dali
-
-#pragma GCC diagnostic pop
index 95ea0d5..c12d777 100755 (executable)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_X_H
-#define __DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_X_H
+#ifndef DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_X_H
+#define DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_X_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -19,8 +19,8 @@
  */
 
 // EXTERNAL INCLUDES
-#include <Ecore_IMF.h>
-#include <Ecore_X.h>
+#include <dali/internal/input/linux/dali-ecore-imf.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
 
 #include <dali/public-api/object/base-object.h>
 
@@ -317,4 +317,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_X_H
+#endif // DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_X_H
index 7271fd3..864814d 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <X11/Xlib.h>
-#include <Ecore_X.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
 #include <algorithm>
 
 #include <dali/integration-api/debug.h>
@@ -75,7 +75,7 @@ void RotateTo(int angle)
     // Get Focus window
     XGetInputFocus(display, &focusWindow, &revert);
 
-    ecore_x_window_prop_property_set( focusWindow,
+    ecore_x_window_prop_property_set( static_cast<Ecore_X_Window>( focusWindow ),
                                       ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
                                       ECORE_X_ATOM_CARDINAL, 32, &angle, 1 );
     XCloseDisplay(display);
index 8398a75..286c946 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
 #include <dali/internal/system/linux/callback-manager-ecore.h>
 
 // EXTERNAL INCLUDES
-// Ecore is littered with C style cast
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
-#include <Ecore.h>
+#include <dali/internal/system/linux/dali-ecore.h>
 
 #include <dali/integration-api/debug.h>
 
@@ -270,5 +267,3 @@ CallbackManager* CallbackManager::New()
 } // namespace Internal
 
 } // namespace Dali
-
-#pragma GCC diagnostic pop
diff --git a/dali/internal/system/linux/dali-ecore-x.h b/dali/internal/system/linux/dali-ecore-x.h
new file mode 100644 (file)
index 0000000..e9c0cd9
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef DALI_INTERNAL_SYSTEM_LINUX_DALI_ECORE_X_H
+#define DALI_INTERNAL_SYSTEM_LINUX_DALI_ECORE_X_H
+
+/*
+ * Copyright (c) 2019 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.
+ *
+ */
+
+#pragma GCC system_header
+#include <Ecore_X.h>
+
+
+
+#endif /* DALI_INTERNAL_SYSTEM_LINUX_DALI_ECORE_X_H */
diff --git a/dali/internal/system/linux/dali-ecore.h b/dali/internal/system/linux/dali-ecore.h
new file mode 100644 (file)
index 0000000..61fb714
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef DALI_INTERNAL_SYSTEM_LINUX_DALI_ECORE_H
+#define DALI_INTERNAL_SYSTEM_LINUX_DALI_ECORE_H
+
+/*
+ * Copyright (c) 2019 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.
+ *
+ */
+
+#pragma GCC system_header
+#include <Ecore.h>
+
+
+
+#endif /* DALI_INTERNAL_SYSTEM_LINUX_DALI_ECORE_H */
diff --git a/dali/internal/system/linux/dali-elementary.h b/dali/internal/system/linux/dali-elementary.h
new file mode 100644 (file)
index 0000000..1621aff
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef DALI_INTERNAL_SYSTEM_LINUX_DALI_ELEMENTARY_H
+#define DALI_INTERNAL_SYSTEM_LINUX_DALI_ELEMENTARY_H
+
+/*
+ * Copyright (c) 2019 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.
+ *
+ */
+#pragma GCC system_header
+#include <Elementary.h>
+
+
+
+#endif /* DALI_INTERNAL_SYSTEM_LINUX_DALI_ELEMENTARY_H */
index 2cfa602..88e9de3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
 #include <dali/internal/system/common/file-descriptor-monitor.h>
 
 // EXTERNAL INCLUDES
-// Ecore is littered with C style cast
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
-#include <Ecore.h>
+#include <dali/internal/system/linux/dali-ecore.h>
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
@@ -147,5 +144,3 @@ FileDescriptorMonitor::~FileDescriptorMonitor()
 } // namespace Internal
 
 } // namespace Dali
-
-#pragma GCC diagnostic pop
index 46ef603..fde050d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
 #include <dali/internal/adaptor/common/adaptor-impl.h>
 #include <dali/public-api/dali-adaptor-common.h>
 
-// Ecore is littered with C style cast
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
-#include <Ecore.h>
+#include <dali/internal/system/linux/dali-ecore.h>
 
 namespace Dali
 {
@@ -90,7 +87,8 @@ void Timer::Start()
   {
     Stop();
   }
-  mImpl->mId = ecore_timer_add( (double)mImpl->mInterval/1000.0f, (Ecore_Task_Cb)TimerSourceFunc, this );
+  double interval = static_cast<double> ( mImpl->mInterval ) / 1000.0f;
+  mImpl->mId = ecore_timer_add( interval, reinterpret_cast<Ecore_Task_Cb>( TimerSourceFunc ), this );
 }
 
 void Timer::Stop()
@@ -196,5 +194,3 @@ bool Timer::IsRunning() const
 } // namespace Internal
 
 } // namespace Dali
-
-#pragma GCC diagnostic pop
index 2e612e1..e0b9b57 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
  *
  */
 
-// EXTERNAL INCLUDES
-#ifndef DALI_PROFILE_UBUNTU
-#include <system_settings.h>
-#endif // DALI_PROFILE_UBUNTU
-#include <Elementary.h>
-
 // INTERNAL INCLUDES
 #include <dali/internal/system/common/system-settings.h>
 
@@ -35,12 +29,7 @@ namespace Adaptor
 
 int GetElmAccessActionOver()
 {
-#ifndef DALI_PROFILE_UBUNTU
-  // ELM_ACCESS_ACTION_OVER not available in common profile
-  return ELM_ACCESS_ACTION_LAST;
-#else // DALI_PROFILE_UBUNTU
   return 0;
-#endif // DALI_PROFILE_UBUNTU
 }
 
 int GetLongPressTime( int defaultTime )
index d0a2316..b6442a7 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_DAMAGE_OBSERVER_H__
-#define __DALI_INTERNAL_DAMAGE_OBSERVER_H__
+#ifndef DALI_INTERNAL_DAMAGE_OBSERVER_H
+#define DALI_INTERNAL_DAMAGE_OBSERVER_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -69,4 +69,4 @@ protected:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_DAMAGE_OBSERVER_H__
+#endif // DALI_INTERNAL_DAMAGE_OBSERVER_H
diff --git a/dali/internal/window-system/common/ecore-server-connection.cpp b/dali/internal/window-system/common/ecore-server-connection.cpp
deleted file mode 100644 (file)
index 61b48e2..0000000
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright (c) 2017 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.
- *
- */
-
-// CLASS HEADER
-#include <dali/internal/window-system/common/ecore-server-connection.h>
-
-// EXTERNAL INCLUDES
-// Ecore is littered with C style cast
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
-#include <Ecore.h>
-
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-
-namespace
-{
-// Copied from ecore_evas_extn_engine.h
-// procotol version - change this as needed
-const int MAJOR( 0x2011 );
-}
-
-
-namespace Dali
-{
-namespace Internal
-{
-namespace Adaptor
-{
-#if defined(DEBUG_ENABLED)
-Debug::Filter* gServerConnectionLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_SERVER_CONNECTION");
-#endif
-
-ServerConnection::ServerConnection(
-  const char*                 serviceName,
-  int                         serviceNumber,
-  bool                        isSystem,
-  ServerConnection::Observer* observer)
-
-: mConnected(false),
-  mObserver(observer)
-{
-  Ecore_Ipc_Type ipctype = ECORE_IPC_LOCAL_USER;
-
-  ecore_ipc_init();
-  mService.name = eina_stringshare_add(serviceName);
-  mService.num = serviceNumber;
-  mService.isSystem = isSystem;
-
-  if( mService.isSystem )
-  {
-    ipctype = ECORE_IPC_LOCAL_SYSTEM;
-  }
-
-  DALI_LOG_INFO( gServerConnectionLogFilter, Debug::General, "ServerConnection: Connecting to %s %d\n", mService.name, mService.num );
-
-  mIpcServer = ecore_ipc_server_connect( ipctype, (char *)mService.name, mService.num, this );
-
-  if( !mIpcServer )
-  {
-    DALI_LOG_INFO( gServerConnectionLogFilter, Debug::General, "mIpcServer is null\n" );
-    ecore_ipc_shutdown();
-  }
-  else
-  {
-    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_ADD,
-                                                     &ServerConnection::IpcServerAdd,
-                                                     this ) );
-
-    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DEL,
-                                                     &ServerConnection::IpcServerDel,
-                                                     this ) );
-
-    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DATA,
-                                                     &ServerConnection::IpcServerData,
-                                                     this));
-
-    mConnected = true;
-  }
-}
-
-ServerConnection::~ServerConnection()
-{
-  CloseConnection();
-
-  if( mService.name != NULL )
-  {
-    eina_stringshare_del(mService.name);
-  }
-
-  for( Handlers::iterator iter = mIpcHandlers.begin(); iter != mIpcHandlers.end(); ++iter )
-  {
-    ecore_event_handler_del(*iter);
-  }
-  mIpcHandlers.clear();
-}
-
-bool ServerConnection::IsConnected()
-{
-  return mConnected;
-}
-
-void ServerConnection::OnDisconnect()
-{
-  mConnected = false;
-  mIpcServer = NULL;
-  ecore_ipc_shutdown();
-  if( mObserver )
-  {
-    mObserver->ConnectionClosed();
-  }
-}
-
-bool ServerConnection::SendEvent( int event, const void *data, int size )
-{
-  return SendEvent(event, 0, 0, data, size);
-}
-
-bool ServerConnection::SendEvent( int event, int ref, int ref_to, const void *data, int size )
-{
-  if( mIpcServer != NULL  && ecore_ipc_server_send(mIpcServer, MAJOR, event, ref, ref_to, 0, data, size) )
-  {
-    return true;
-  }
-  else
-  {
-    return false;
-  }
-}
-
-Eina_Bool ServerConnection::IpcServerAdd( void *data, int /*type*/, void *event )
-{
-  DALI_LOG_INFO(gServerConnectionLogFilter, Debug::General, "ServerConnection: IpcServerAdd\n" );
-
-  return ECORE_CALLBACK_PASS_ON;
-}
-
-Eina_Bool ServerConnection::IpcServerDel( void *data, int /*type*/, void *event )
-{
-  DALI_LOG_INFO( gServerConnectionLogFilter, Debug::General, "ServerConnection: IpcServerDel\n" );
-
-  Ecore_Ipc_Event_Server_Del *e = static_cast<Ecore_Ipc_Event_Server_Del *>( event );
-  ServerConnection* connection = static_cast<ServerConnection*>( data );
-
-  if( connection != NULL )
-  {
-    if( connection->mIpcServer == e->server)
-    {
-      // No longer have a server connection
-      connection->OnDisconnect();
-    }
-  }
-
-  return ECORE_CALLBACK_PASS_ON;
-}
-
-Eina_Bool ServerConnection::IpcServerData( void *data, int /*type*/, void *event )
-{
-  DALI_LOG_INFO( gServerConnectionLogFilter, Debug::General, "ServerConnection: IpcServerData\n" );
-
-  Ecore_Ipc_Event_Server_Data *e = static_cast<Ecore_Ipc_Event_Server_Data *>( event );
-  ServerConnection* connection = static_cast<ServerConnection*>( data );
-
-  if( connection != NULL )
-  {
-    if( connection != ecore_ipc_server_data_get( e->server ) )
-    {
-      return ECORE_CALLBACK_PASS_ON;
-    }
-
-    if( e->major != MAJOR )
-    {
-      return ECORE_CALLBACK_PASS_ON;
-    }
-
-    if( connection->mObserver )
-    {
-      connection->mObserver->DataReceived( event );
-    }
-  }
-  return ECORE_CALLBACK_PASS_ON;
-}
-
-void ServerConnection::CloseConnection()
-{
-  if( mConnected )
-  {
-    DALI_LOG_INFO( gServerConnectionLogFilter, Debug::General, "ServerConnection: CloseConnection\n" );
-
-    if( mIpcServer )
-    {
-      ecore_ipc_server_del( mIpcServer );
-      mIpcServer = NULL;
-    }
-
-    ecore_ipc_shutdown();
-    mConnected = false;
-  }
-}
-
-} // Adaptor
-
-} // Internal
-
-} // Dali
-
-#pragma GCC diagnostic pop
diff --git a/dali/internal/window-system/common/ecore-server-connection.h b/dali/internal/window-system/common/ecore-server-connection.h
deleted file mode 100644 (file)
index d81cdfe..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-#ifndef __DALI_INTERNAL_ADAPTOR_ECORE_SERVER_CONNECTION_H_
-#define __DALI_INTERNAL_ADAPTOR_ECORE_SERVER_CONNECTION_H_
-
-/*
- * Copyright (c) 2016 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <Ecore.h>
-#include <Ecore_Ipc.h>
-
-#include <dali/public-api/common/vector-wrapper.h>
-
-namespace Dali
-{
-namespace Internal
-{
-namespace Adaptor
-{
-
-/**
- * Makes a connection to a given service as a client
- */
-class ServerConnection
-{
-public:
-  /**
-   * Observes the connection for data and connection closure
-   */
-  class Observer
-  {
-  public:
-    /**
-     * Inform that data has been received on the connection
-     * @param[in] event The event that has been received
-     */
-    virtual void DataReceived(void* event) = 0;
-
-    /**
-     * Inform the observer that the connection has closed
-     */
-    virtual void ConnectionClosed() = 0;
-  };
-
-public:
-  /**
-   * Constructor
-   * @param[in] serviceName The name of the service
-   * @param[in] serviceNumber The number of the service
-   * @param[in] isSystem Whether to connect as local user or system user
-   * @param[in] observer The connection observer
-   */
-  ServerConnection(const char *serviceName, int serviceNumber, bool isSystem, Observer* observer);
-
-  /**
-   * Destructor
-   */
-  ~ServerConnection();
-
-  /**
-   * Test if the connection is still alive
-   * @return True if the connection is still alive
-   */
-  bool IsConnected();
-
-  /**
-   * Disconnect from the server. Will trigger ConnectionClosed() observer callback
-   */
-  void OnDisconnect();
-
-  /**
-   * Send an event to the server.
-   * @param[in] event Event id
-   * @param[in] data  Pointer to the event data
-   * @param[in] size  Size of the event data
-   * @return whether the event is sent successfully or not
-   */
-  bool SendEvent( int event, const void *data, int size );
-
-  /**
-   * Send an event to the server.
-   * @param[in] event Event id
-   * @param[in] ref   Message Reference number
-   * @param[in] refTo Reference number of the message this refers to
-   * @param[in] data  Pointer to the event data
-   * @param[in] size  Size of the event data
-   * @return whether the event is sent successfully or not
-   */
-  bool SendEvent( int event, int ref, int refTo, const void *data, int size );
-
-private: // Class callbacks
-  /**
-   * Callback when server added
-   */
-  static Eina_Bool IpcServerAdd(void *data, int type, void *event);
-
-  /**
-   * Callback when server deleted
-   */
-  static Eina_Bool IpcServerDel(void *data, int type, void *event);
-
-  /**
-   * Callback when data available from server
-   */
-  static Eina_Bool IpcServerData(void *data, int type, void *event);
-
-private:
-
-  ServerConnection( const ServerConnection& ); ///< Undefined
-  ServerConnection& operator=( const ServerConnection& ); ///< Undefined
-
-  void CloseConnection();
-
-private:
-  typedef std::vector<Ecore_Event_Handler *> Handlers;
-
-  struct Service
-  {
-    const char *name;
-    int         num;
-    bool        isSystem;
-  };
-
-  Service           mService;
-  bool              mConnected;
-  Observer*         mObserver;
-  Ecore_Ipc_Server* mIpcServer;
-  Handlers          mIpcHandlers;
-};
-
-} // Adaptor
-} // Internal
-} // Dali
-
-#endif // __DALI_INTERNAL_ADAPTOR_ECORE_SERVER_CONNECTION_H_
index 692c1b4..0c21cf4 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -61,7 +61,7 @@ namespace
 {
 
 // Copied from x server
-static unsigned int GetCurrentMilliSeconds(void)
+static uint32_t GetCurrentMilliSeconds(void)
 {
   struct timeval tv;
 
@@ -89,11 +89,11 @@ static unsigned int GetCurrentMilliSeconds(void)
   }
   if (clockid != ~0L && clock_gettime(clockid, &tp) == 0)
   {
-    return (tp.tv_sec * 1000) + (tp.tv_nsec / 1000000L);
+    return static_cast<uint32_t>( (tp.tv_sec * 1000 ) + (tp.tv_nsec / 1000000L) );
   }
 
   gettimeofday(&tv, NULL);
-  return (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
+  return static_cast<uint32_t>( (tv.tv_sec * 1000 ) + (tv.tv_usec / 1000) );
 }
 
 } // unnamed namespace
@@ -138,7 +138,7 @@ EventHandler::~EventHandler()
   mGestureManager.Stop();
 }
 
-void EventHandler::SendEvent( Integration::Point& point, unsigned long timeStamp )
+void EventHandler::SendEvent( Integration::Point& point, uint32_t timeStamp )
 {
   if( timeStamp < 1 )
   {
@@ -224,7 +224,7 @@ void EventHandler::SendRotationRequestEvent( )
   // No need to separate event into prepare and request
 }
 
-void EventHandler::FeedTouchPoint( TouchPoint& point, int timeStamp)
+void EventHandler::FeedTouchPoint( TouchPoint& point, uint32_t timeStamp)
 {
   Integration::Point convertedPoint( point );
   SendEvent( convertedPoint, timeStamp );
@@ -283,7 +283,7 @@ void EventHandler::SetRotationObserver( RotationObserver* observer )
   mRotationObserver = observer;
 }
 
-void EventHandler::OnTouchEvent( Integration::Point& point, unsigned long timeStamp )
+void EventHandler::OnTouchEvent( Integration::Point& point, uint32_t timeStamp )
 {
   SendEvent( point, timeStamp );
 }
@@ -627,20 +627,20 @@ void EventHandler::ConvertTouchPosition( Integration::Point& point )
   {
     case 90:
     {
-      convertedPosition.x = mWindowWidth - position.y;
+      convertedPosition.x = static_cast<float>( mWindowWidth ) - position.y;
       convertedPosition.y = position.x;
       break;
     }
     case 180:
     {
-      convertedPosition.x = mWindowWidth - position.x;
-      convertedPosition.y = mWindowHeight - position.y;
+      convertedPosition.x = static_cast<float>( mWindowWidth ) - position.x;
+      convertedPosition.y = static_cast<float>( mWindowHeight ) - position.y;
       break;
     }
     case 270:
     {
       convertedPosition.x = position.y;
-      convertedPosition.y = mWindowHeight - position.x;
+      convertedPosition.y = static_cast<float>( mWindowHeight ) - position.x;
       break;
     }
     default:
index d0f73e7..9005530 100755 (executable)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_EVENT_HANDLER_H__
-#define __DALI_INTERNAL_EVENT_HANDLER_H__
+#ifndef DALI_INTERNAL_EVENT_HANDLER_H
+#define DALI_INTERNAL_EVENT_HANDLER_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -19,6 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
+#include <cstdint> // uint32_t
 #include <dali/public-api/common/intrusive-ptr.h>
 
 #include <dali/integration-api/events/key-event-integ.h>
@@ -83,7 +84,7 @@ public:
    * Feed (Send) touch event to core and gesture manager
    * @param[in] touchEvent  The touch event holding the touch point information.
    */
-  void FeedTouchPoint( TouchPoint& point, int timeStamp );
+  void FeedTouchPoint( TouchPoint& point, uint32_t timeStamp );
 
   /**
    * Feed (Send) wheel event to core and gesture manager
@@ -126,7 +127,7 @@ private:
    * @param[in]  point      The touch point information.
    * @param[in]  timeStamp  The time the touch occurred.
    */
-  void SendEvent(Integration::Point& point, unsigned long timeStamp);
+  void SendEvent(Integration::Point& point, uint32_t timeStamp);
 
   /**
    * Send key event to core.
@@ -172,7 +173,7 @@ private:
   /**
    * Called when a touch event is received.
    */
-  void OnTouchEvent( Integration::Point& point, unsigned long timeStamp );
+  void OnTouchEvent( Integration::Point& point, uint32_t timeStamp );
 
   /**
    * Called when a mouse wheel is received.
@@ -256,4 +257,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_EVENT_HANDLER_H__
+#endif // DALI_INTERNAL_EVENT_HANDLER_H
index e48ff0e..47c058d 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_ORIENTATION_H__
-#define __DALI_INTERNAL_ORIENTATION_H__
+#ifndef DALI_INTERNAL_ORIENTATION_H
+#define DALI_INTERNAL_ORIENTATION_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -149,4 +149,4 @@ inline const Orientation& GetImplementation(const Dali::Orientation& orientation
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_ORIENTATION_H__
+#endif // DALI_INTERNAL_ORIENTATION_H
index 034b082..46ad874 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_ROTATION_OBSERVER_H__
-#define __DALI_INTERNAL_ROTATION_OBSERVER_H__
+#ifndef DALI_INTERNAL_ROTATION_OBSERVER_H
+#define DALI_INTERNAL_ROTATION_OBSERVER_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -79,4 +79,4 @@ protected:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_ROTATION_OBSERVER_H__
+#endif // DALI_INTERNAL_ROTATION_OBSERVER_H
index bd1337a..8c63be3 100644 (file)
@@ -118,5 +118,3 @@ WindowBase::AccessibilitySignalType& WindowBase::AccessibilitySignal()
 } // namespace Internal
 
 } // namespace Dali
-
-#pragma GCC diagnostic pop
index 1642a3e..e93287e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_BASE_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -32,6 +32,7 @@
 #include <dali/public-api/events/wheel-event.h>
 #include <string>
 #include <vector>
+#include <cstdint>
 
 namespace Dali
 {
@@ -70,7 +71,7 @@ public:
   typedef Signal< void ( const RotationEvent& ) > RotationSignalType;
 
   // Input events
-  typedef Signal< void ( Integration::Point&, unsigned long ) > TouchEventSignalType;
+  typedef Signal< void ( Integration::Point&, uint32_t ) > TouchEventSignalType;
   typedef Signal< void ( WheelEvent& ) > WheelEventSignalType;
   typedef Signal< void( Integration::KeyEvent& ) > KeyEventSignalType;
 
index e8dc98d..c9d9c8b 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_BASE_WINDOW_EVENT_INTERFACE_H__
-#define __DALI_INTERNAL_BASE_WINDOW_EVENT_INTERFACE_H__
+#ifndef DALI_INTERNAL_BASE_WINDOW_EVENT_INTERFACE_H
+#define DALI_INTERNAL_BASE_WINDOW_EVENT_INTERFACE_H
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -107,4 +107,4 @@ protected:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_BASE_WINDOW_EVENT_INTERFACE_H__
+#endif // DALI_INTERNAL_BASE_WINDOW_EVENT_INTERFACE_H
index 0c8a9c8..179c0de 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_WINDOW_VISIBILITY_OBSERVER_H__
-#define __DALI_INTERNAL_WINDOW_VISIBILITY_OBSERVER_H__
+#ifndef DALI_INTERNAL_WINDOW_VISIBILITY_OBSERVER_H
+#define DALI_INTERNAL_WINDOW_VISIBILITY_OBSERVER_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -67,4 +67,4 @@ protected:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_WINDOW_VISIBILITY_OBSERVER_H__
+#endif // DALI_INTERNAL_WINDOW_VISIBILITY_OBSERVER_H
index b52444d..ef02bc9 100644 (file)
@@ -3,7 +3,6 @@
 # module: window-system, backend: common
 adaptor_window_system_common_src_files=\
     ${adaptor_window_system_dir}/common/display-connection.cpp \
-    ${adaptor_window_system_dir}/common/ecore-server-connection.cpp \
     ${adaptor_window_system_dir}/common/event-handler.cpp \
     ${adaptor_window_system_dir}/common/native-render-surface-factory.cpp \
     ${adaptor_window_system_dir}/common/orientation-impl.cpp \
index ba1af14..1e85ebe 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -19,7 +19,7 @@
 #include <dali/internal/window-system/ubuntu-x11/display-connection-impl-x.h>
 
 // EXTERNAL_HEADERS
-#include <Ecore_X.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL HEADERS
index f425033..e5bc6c9 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_X11_TYPES_H__
-#define __DALI_X11_TYPES_H__
+#ifndef DALI_X11_TYPES_H
+#define DALI_X11_TYPES_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -31,4 +31,4 @@ typedef ::Screen XScreen;
 
 } // namespace Dali
 
-#endif /* __DALI_X11_TYPES_H__ */
+#endif /* DALI_X11_TYPES_H */
index 1f4a305..1e51708 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_ECORE_X_PIXMAP_RENDER_SURFACE_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -28,7 +28,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/threading/conditional-wait.h>
-#include <Ecore_X.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
 
 
 namespace Dali
index cc99dfd..e2f650b 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
  *
  */
 
-// Ecore is littered with C style cast
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
-
 // CLASS HEADER
 #include <dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h>
 
@@ -31,7 +27,7 @@
 #include <dali/public-api/object/any.h>
 #include <dali/public-api/events/mouse-button.h>
 #include <dali/integration-api/debug.h>
-#include <Ecore_Input.h>
+#include <dali/internal/input/ubuntu-x11/dali-ecore-input.h>
 
 namespace Dali
 {
@@ -468,7 +464,7 @@ void WindowBaseEcoreX::OnMouseButtonUp( void* data, int type, void* event )
     point.SetScreenPosition( Vector2( touchEvent->x, touchEvent->y ) );
     point.SetRadius( touchEvent->multi.radius, Vector2( touchEvent->multi.radius_x, touchEvent->multi.radius_y ) );
     point.SetPressure( touchEvent->multi.pressure );
-    point.SetAngle( Degree( touchEvent->multi.angle ) );
+    point.SetAngle( Degree( static_cast<float>( touchEvent->multi.angle ) ) );
     if( touchEvent->buttons)
     {
       point.SetMouseButton( static_cast< MouseButton::Type >( touchEvent->buttons) );
@@ -487,10 +483,10 @@ void WindowBaseEcoreX::OnMouseButtonMove( void* data, int type, void* event )
     Integration::Point point;
     point.SetDeviceId( touchEvent->multi.device );
     point.SetState( PointState::MOTION );
-    point.SetScreenPosition( Vector2( touchEvent->x, touchEvent->y ) );
-    point.SetRadius( touchEvent->multi.radius, Vector2( touchEvent->multi.radius_x, touchEvent->multi.radius_y ) );
-    point.SetPressure( touchEvent->multi.pressure );
-    point.SetAngle( Degree( touchEvent->multi.angle ) );
+    point.SetScreenPosition( Vector2( static_cast<float>( touchEvent->x ), static_cast<float>( touchEvent->y ) ) );
+    point.SetRadius( static_cast<float>( touchEvent->multi.radius ), Vector2( static_cast<float>( touchEvent->multi.radius_x ), static_cast<float>( touchEvent->multi.radius_y ) ) );
+    point.SetPressure( static_cast<float>( touchEvent->multi.pressure ) );
+    point.SetAngle( Degree( static_cast<float>( touchEvent->multi.angle ) ) );
 
     mTouchEventSignal.Emit( point, touchEvent->timestamp );
   }
@@ -504,7 +500,7 @@ void WindowBaseEcoreX::OnMouseWheel( void* data, int type, void* event )
   {
     DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreX::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z );
 
-    WheelEvent wheelEvent( WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2( mouseWheelEvent->x, mouseWheelEvent->y ), mouseWheelEvent->z, mouseWheelEvent->timestamp );
+    WheelEvent wheelEvent( WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2( static_cast<float>( mouseWheelEvent->x ), static_cast<float>( mouseWheelEvent->y ) ), mouseWheelEvent->z, mouseWheelEvent->timestamp );
 
     mWheelEventSignal.Emit( wheelEvent );
   }
@@ -826,15 +822,11 @@ bool WindowBaseEcoreX::UngrabKeyList( const Dali::Vector< Dali::KEY >& key, Dali
 
 void WindowBaseEcoreX::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical )
 {
-  // calculate DPI
-  float xres, yres;
-
   // 1 inch = 25.4 millimeters
-  xres = ecore_x_dpi_get();
-  yres = ecore_x_dpi_get();
+  // ecore does not account for differing DPI in the x and y axes, so only get for x is available
 
-  dpiHorizontal = int( xres + 0.5f );  // rounding
-  dpiVertical   = int( yres + 0.5f );
+  dpiHorizontal = ecore_x_dpi_get();
+  dpiVertical   = ecore_x_dpi_get();
 }
 
 int WindowBaseEcoreX::GetScreenRotationAngle()
@@ -870,7 +862,7 @@ unsigned int WindowBaseEcoreX::GetSurfaceId( Any surface ) const
     }
     else
     {
-      surfaceId = AnyCast< XWindow >( surface );
+      surfaceId = static_cast<unsigned int>( AnyCast< XWindow >( surface ) );
     }
   }
   return surfaceId;
@@ -901,5 +893,3 @@ void WindowBaseEcoreX::CreateWindow( PositionSize positionSize, bool isTranspare
 } // namespace Internal
 
 } // namespace Dali
-
-#pragma GCC diagnostic pop
index 7b29723..c30eba6 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_ECOREX_WINDOW_BASE_ECORE_X_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -22,8 +22,8 @@
 #include <dali/internal/window-system/common/window-base.h>
 
 // EXTERNAL HEADERS
-#include <Ecore.h>
-#include <Ecore_X.h>
+#include <dali/internal/system/linux/dali-ecore.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
 
 namespace Dali
 {
index e28fa28..b9e0b3b 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_ECORE_X_RENDER_SURFACE_H__
-#define __DALI_INTERNAL_ECORE_X_RENDER_SURFACE_H__
+#ifndef DALI_INTERNAL_ECORE_X_RENDER_SURFACE_H
+#define DALI_INTERNAL_ECORE_X_RENDER_SURFACE_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -21,7 +21,7 @@
 // EXTERNAL INCLUDES
 #include <string>
 
-#include <Ecore_X.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
 #include <X11/Xlib.h>
 
 // INTERNAL INCLUDES
@@ -83,4 +83,4 @@ namespace WindowInterface
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_ECORE_X_RENDER_SURFACE_H__
+#endif // DALI_INTERNAL_ECORE_X_RENDER_SURFACE_H
index 23341c5..20b141c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -20,7 +20,7 @@
 #include <dali/devel-api/adaptor-framework/keyboard.h>
 
 // EXTERNAL_HEADERS
-#include <Ecore_X.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
 
 namespace Dali
 {
index c9b26ef..bf76761 100644 (file)
@@ -588,7 +588,10 @@ inline double Arc::extended_dist (const Point &p) const {
   Point m = p0.lerp (.5, p1);
   Vector dp = p1 - p0;
   Vector pp = dp.ortho ();
-  float d2 = tan2atan (d);
+  /*
+   * In the original file, there was no explicit cast to float.
+   */
+  float d2 = static_cast<float>( tan2atan (d) );
   if ((p - m) * (p1 - m) < 0)
     return (p - p0) * (pp + dp * d2).normalized ();
   else
index 9f48f9e..434d9e9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -104,15 +104,15 @@ struct VectorGlyph
 
     if( endpoints.size() )
     {
-      glyphy_outline_winding_from_even_odd( &endpoints[0], endpoints.size (), false );
+      glyphy_outline_winding_from_even_odd( &endpoints[0], static_cast<unsigned int>( endpoints.size() ), false );
     }
 
     unsigned int blobLength( 0 );
     double averageFetchAchieved( 0.0 );
     if (!glyphy_arc_list_encode_blob( endpoints.size() ? &endpoints[0] : NULL,
-                                      endpoints.size(),
+                                      static_cast<unsigned int>( endpoints.size() ),
                                       &newGlyph->blobData[0],
-                                      newGlyph->blobData.capacity(),
+                                      static_cast<unsigned int>( newGlyph->blobData.capacity() ),
                                       upem / ( MIN_FONT_SIZE * M_SQRT2 ),
                                       4,
                                       &averageFetchAchieved,
@@ -142,14 +142,14 @@ struct VectorGlyph
     }
     else
     {
-      newGlyph->glyphInfo.width  = (newGlyph->extents.max_x - newGlyph->extents.min_x);
-      newGlyph->glyphInfo.height = (newGlyph->extents.max_y - newGlyph->extents.min_y);
+      newGlyph->glyphInfo.width  = static_cast<float>( newGlyph->extents.max_x - newGlyph->extents.min_x );
+      newGlyph->glyphInfo.height = static_cast<float>( newGlyph->extents.max_y - newGlyph->extents.min_y );
 
-      newGlyph->glyphInfo.xBearing = newGlyph->extents.min_x;
-      newGlyph->glyphInfo.yBearing = newGlyph->glyphInfo.height + (newGlyph->extents.min_y);
+      newGlyph->glyphInfo.xBearing = static_cast<float>( newGlyph->extents.min_x );
+      newGlyph->glyphInfo.yBearing = newGlyph->glyphInfo.height + static_cast<float>( newGlyph->extents.min_y );
     }
 
-    newGlyph->glyphInfo.advance = face->glyph->metrics.horiAdvance / upem;
+    newGlyph->glyphInfo.advance = static_cast<float>( static_cast<double>( face->glyph->metrics.horiAdvance ) / upem );
     newGlyph->glyphInfo.scaleFactor = 0.0f;
 
     return newGlyph;
@@ -332,7 +332,7 @@ void VectorFontCache::GetVectorBlob( FontId vectorFontId,
         VectorGlyph* glyph = cache[foundIndex];
 
         blob          = &glyph->blobData[0];
-        blobLength    = glyph->blobData.size();
+        blobLength    = static_cast<unsigned int>( glyph->blobData.size() );
         nominalWidth  = glyph->nominalWidth;
         nominalHeight = glyph->nominalHeight;
       }
@@ -343,7 +343,7 @@ void VectorFontCache::GetVectorBlob( FontId vectorFontId,
         if( newGlyph )
         {
           blob          = &newGlyph->blobData[0];
-          blobLength    = newGlyph->blobData.size();
+          blobLength    = static_cast<unsigned int>( newGlyph->blobData.size() );
           nominalWidth  = newGlyph->nominalWidth;
           nominalHeight = newGlyph->nominalHeight;
 
@@ -386,7 +386,7 @@ FontId VectorFontCache::CreateFont( const string& url )
   if( FT_Err_Ok == error )
   {
     mImpl->mIdLookup.push_back( url );
-    id = mImpl->mIdLookup.size();
+    id = static_cast<FontId>( mImpl->mIdLookup.size() );
 
     VectorFont* newFont = new VectorFont( face );
     mImpl->mVectorFonts.push_back( newFont );