MS Windows - Fix compile errors when debug is enabled. 26/222726/3
authorVictor Cebollada <v.cebollada@samsung.com>
Fri, 17 Jan 2020 08:51:24 +0000 (08:51 +0000)
committerVictor Cebollada <v.cebollada@samsung.com>
Mon, 20 Jan 2020 11:50:52 +0000 (11:50 +0000)
* Builds with VCPKG

Change-Id: I2f03382580e79be8067e14090a2887a39a67f622
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
17 files changed:
dali/integration-api/adaptor-framework/egl-interface.h
dali/internal/accessibility/file.list
dali/internal/adaptor/common/combined-update-render-controller.h
dali/internal/graphics/common/egl-image-extensions.h
dali/internal/graphics/common/egl-include.h [new file with mode: 0644]
dali/internal/graphics/gles/egl-context-helper-implementation.h
dali/internal/graphics/gles/egl-debug.h
dali/internal/graphics/gles/egl-implementation.h
dali/internal/graphics/gles/egl-sync-implementation.h
dali/internal/graphics/gles/gl-extensions.cpp
dali/internal/imaging/common/image-operations.cpp
dali/internal/imaging/windows/curl-environment-win.cpp
dali/internal/input/windows/input-method-context-impl-win.cpp
dali/internal/network/common/socket-interface.h
dali/internal/system/windows/logging-win.cpp [new file with mode: 0644]
dali/internal/text/text-abstraction/font-client-impl.cpp
dali/public-api/adaptor-framework/window.h

index 9c988a4..a203fc6 100644 (file)
@@ -18,8 +18,8 @@
  *
  */
 
-// EXTERNAL INCLUDES
-#include <EGL/egl.h>
+// INTERNAL INCLUDES
+#include <dali/internal/graphics/common/egl-include.h>
 
 namespace Dali
 {
index 1e45bd5..65a527a 100755 (executable)
@@ -54,7 +54,7 @@ SET( adaptor_accessibility_tizen_wearable_src_files
     ${adaptor_accessibility_dir}/tizen-wayland/tizen-wearable/accessibility-adaptor-impl-wearable.cpp
 )
 
-# module: accessibility, backend: generic
+# module: accessibility, backend: ubuntu
 SET( adaptor_accessibility_ubuntu_src_files 
     ${adaptor_accessibility_dir}/generic/accessibility-adaptor-impl-generic.cpp 
     ${adaptor_accessibility_dir}/generic/atspi-accessibility-generic.cpp 
@@ -62,7 +62,7 @@ SET( adaptor_accessibility_ubuntu_src_files
     ${adaptor_accessibility_dir}/generic/tts-player-impl-generic.cpp
 )
 
-# module: accessibility, backend: generic
+# module: accessibility, backend: android
 SET( adaptor_accessibility_android_src_files 
     ${adaptor_accessibility_dir}/generic/accessibility-adaptor-impl-generic.cpp 
     ${adaptor_accessibility_dir}/generic/tts-player-factory-generic.cpp 
index 571485b..b558831 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
+#include <pthread.h>
 #include <semaphore.h>
 #include <stdint.h>
 #include <dali/devel-api/threading/conditional-wait.h>
index 464eaba..82f8459 100644 (file)
  */
 
 // EXTERNAL INCLUDES
-#include <EGL/egl.h>
-
 #include <dali/public-api/images/pixel.h>
 
+// INTERNAL INCLUDES
+#include <dali/internal/graphics/common/egl-include.h>
+
 namespace Dali
 {
 namespace Internal
diff --git a/dali/internal/graphics/common/egl-include.h b/dali/internal/graphics/common/egl-include.h
new file mode 100644 (file)
index 0000000..d0d1cad
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef EGL_INCLUDE_H
+#define EGL_INCLUDE_H
+
+// EXTERNAL INCLUDES
+#include <EGL/egl.h>
+
+// Undef unneded symbols that fail to compile on MS Windows
+#undef ERROR
+
+#undef OPAQUE
+#undef TRANSPARENT
+
+#undef TRUE
+#undef FALSE
+
+#undef CopyMemory
+#undef CreateWindow
+
+#include <EGL/eglext.h>
+
+#endif // EGL_INCLUDE_H
index ecdd772..9236e81 100644 (file)
@@ -18,8 +18,8 @@
  *
  */
 
+#include <dali/internal/graphics/common/egl-include.h>
 // EXTERNAL INCLUDES
-#include <EGL/egl.h>
 #include <dali/integration-api/gl-context-helper-abstraction.h>
 
 // INTERNAL INCLUDES
index 84bc988..81b6a5e 100644 (file)
@@ -18,8 +18,7 @@
  *
  */
 
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
+#include <dali/internal/graphics/common/egl-include.h>
 
 namespace Dali
 {
index ad890ed..efb9754 100644 (file)
@@ -19,8 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
+#include <dali/internal/graphics/common/egl-include.h>
 #include <dali/public-api/common/dali-vector.h>
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/integration-api/core-enumerations.h>
index 7042c06..fbb3bdb 100644 (file)
@@ -19,8 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
+#include <dali/internal/graphics/common/egl-include.h>
 #include <dali/public-api/common/dali-vector.h>
 #include <dali/integration-api/gl-sync-abstraction.h>
 
index 553a570..429cbd5 100644 (file)
@@ -19,9 +19,9 @@
 #include <dali/internal/graphics/gles/gl-extensions.h>
 
 // EXTERNAL INCLUDES
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
+#include <dali/internal/graphics/common/egl-include.h>
 
+// INTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
 
 namespace Dali
index e9b8f51..d75e027 100755 (executable)
@@ -339,8 +339,8 @@ ImageDimensions FitToScalingMode( ImageDimensions requestedSize, ImageDimensions
  */
 void CalculateBordersFromFittingMode(  ImageDimensions sourceSize, FittingMode::Type fittingMode, ImageDimensions& requestedSize, int& scanlinesToCrop, int& columnsToCrop )
 {
-  const unsigned int sourceWidth( sourceSize.GetWidth() );
-  const unsigned int sourceHeight( sourceSize.GetHeight() );
+  const int sourceWidth( static_cast<int>( sourceSize.GetWidth() ) );
+  const int sourceHeight( static_cast<int>(sourceSize.GetHeight() ) );
   const float targetAspect( static_cast< float >( requestedSize.GetWidth() ) / static_cast< float >( requestedSize.GetHeight() ) );
   int finalWidth = 0;
   int finalHeight = 0;
index 7c377e5..8e4dbed 100755 (executable)
@@ -19,6 +19,9 @@
 #include <string>\r
 #include <curl/curl.h>\r
 \r
+#undef TRANSPARENT\r
+#undef CopyMemory\r
+\r
 // INTERNAL INCLUDES\r
 #include <dali/internal/imaging/common/file-download.h>\r
 #include <dali/integration-api/debug.h>\r
index 3902cb0..ea75acb 100755 (executable)
@@ -41,6 +41,13 @@ namespace Internal
 namespace Adaptor\r
 {\r
 \r
+namespace\r
+{\r
+#if defined(DEBUG_ENABLED)\r
+Debug::Filter* gLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_INPUT_METHOD_CONTEXT" );\r
+#endif\r
+}\r
+\r
 InputMethodContextPtr InputMethodContextWin::New( Dali::Actor actor )\r
 {\r
   InputMethodContextPtr manager;\r
index b2eb301..6f0dabd 100644 (file)
@@ -20,6 +20,8 @@
 
 #include <stdint.h>
 
+#undef ERROR
+
 namespace Dali
 {
 namespace Internal
diff --git a/dali/internal/system/windows/logging-win.cpp b/dali/internal/system/windows/logging-win.cpp
new file mode 100644 (file)
index 0000000..9244e99
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ *
+ */
+
+// FUNCTION HEADER
+#include <dali/internal/system/common/logging.h>
+
+// EXTERNAL INCLUDES
+#include <cstdio>
+
+namespace Dali
+{
+
+namespace TizenPlatform
+{
+
+void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message)
+{
+  const char* DALI_TAG = "DALI";
+
+  const char *format = NULL;
+  switch(level)
+  {
+    case Dali::Integration::Log::DebugInfo:
+      format = "\e[1;34mINFO:\e[21m %s: %s\e[0m";
+      break;
+    case Dali::Integration::Log::DebugWarning:
+      format = "\e[1;33mWARN:\e[21m %s: %s\e[0m";
+      break;
+    case Dali::Integration::Log::DebugError:
+      format = "\e[1;91mERROR:\e[21m %s: %s\e[0m";
+      break;
+    default:
+      format = ":\e[21m %s: %s\e[0m";
+      break;
+  }
+  printf(format, DALI_TAG, message.c_str());
+
+}
+
+} // namespace TizenPlatform
+
+} // namespace Dali
index 5eae5ba..862ff7b 100755 (executable)
@@ -19,7 +19,7 @@
 #include <dali/internal/text/text-abstraction/font-client-impl.h>
 
 // EXTERNAL INCLUDES
-#if !(defined(DALI_PROFILE_UBUNTU) || defined(ANDROID))
+#if !(defined(DALI_PROFILE_UBUNTU) || defined(ANDROID) || defined(WIN32))
 #include <vconf.h>
 #endif
 
@@ -106,7 +106,7 @@ int FontClient::GetDefaultFontSize()
 {
   int fontSize( -1 );
 
-#if !(defined(DALI_PROFILE_UBUNTU) || defined(ANDROID))
+#if !(defined(DALI_PROFILE_UBUNTU) || defined(ANDROID) || defined(WIN32))
   vconf_get_int( VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &fontSize );
 #endif
 
index c65f460..c127f61 100755 (executable)
@@ -31,6 +31,9 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/dali-adaptor-common.h>
 
+#undef OPAQUE
+#undef TRANSPARENT
+
 namespace Dali
 {
 /**