From: Victor Cebollada Date: Fri, 17 Jan 2020 08:51:24 +0000 (+0000) Subject: MS Windows - Fix compile errors when debug is enabled. X-Git-Tag: dali_1.4.55~6^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F26%2F222726%2F3;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git MS Windows - Fix compile errors when debug is enabled. * Builds with VCPKG Change-Id: I2f03382580e79be8067e14090a2887a39a67f622 Signed-off-by: Victor Cebollada --- diff --git a/dali/integration-api/adaptor-framework/egl-interface.h b/dali/integration-api/adaptor-framework/egl-interface.h index 9c988a4..a203fc6 100644 --- a/dali/integration-api/adaptor-framework/egl-interface.h +++ b/dali/integration-api/adaptor-framework/egl-interface.h @@ -18,8 +18,8 @@ * */ -// EXTERNAL INCLUDES -#include +// INTERNAL INCLUDES +#include namespace Dali { diff --git a/dali/internal/accessibility/file.list b/dali/internal/accessibility/file.list index 1e45bd5..65a527a 100755 --- a/dali/internal/accessibility/file.list +++ b/dali/internal/accessibility/file.list @@ -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 diff --git a/dali/internal/adaptor/common/combined-update-render-controller.h b/dali/internal/adaptor/common/combined-update-render-controller.h index 571485b..b558831 100644 --- a/dali/internal/adaptor/common/combined-update-render-controller.h +++ b/dali/internal/adaptor/common/combined-update-render-controller.h @@ -19,6 +19,7 @@ */ // EXTERNAL INCLUDES +#include #include #include #include diff --git a/dali/internal/graphics/common/egl-image-extensions.h b/dali/internal/graphics/common/egl-image-extensions.h index 464eaba..82f8459 100644 --- a/dali/internal/graphics/common/egl-image-extensions.h +++ b/dali/internal/graphics/common/egl-image-extensions.h @@ -19,10 +19,11 @@ */ // EXTERNAL INCLUDES -#include - #include +// INTERNAL INCLUDES +#include + 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 index 0000000..d0d1cad --- /dev/null +++ b/dali/internal/graphics/common/egl-include.h @@ -0,0 +1,21 @@ +#ifndef EGL_INCLUDE_H +#define EGL_INCLUDE_H + +// EXTERNAL INCLUDES +#include + +// 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 + +#endif // EGL_INCLUDE_H diff --git a/dali/internal/graphics/gles/egl-context-helper-implementation.h b/dali/internal/graphics/gles/egl-context-helper-implementation.h index ecdd772..9236e81 100644 --- a/dali/internal/graphics/gles/egl-context-helper-implementation.h +++ b/dali/internal/graphics/gles/egl-context-helper-implementation.h @@ -18,8 +18,8 @@ * */ +#include // EXTERNAL INCLUDES -#include #include // INTERNAL INCLUDES diff --git a/dali/internal/graphics/gles/egl-debug.h b/dali/internal/graphics/gles/egl-debug.h index 84bc988..81b6a5e 100644 --- a/dali/internal/graphics/gles/egl-debug.h +++ b/dali/internal/graphics/gles/egl-debug.h @@ -18,8 +18,7 @@ * */ -#include -#include +#include namespace Dali { diff --git a/dali/internal/graphics/gles/egl-implementation.h b/dali/internal/graphics/gles/egl-implementation.h index ad890ed..efb9754 100644 --- a/dali/internal/graphics/gles/egl-implementation.h +++ b/dali/internal/graphics/gles/egl-implementation.h @@ -19,8 +19,7 @@ */ // EXTERNAL INCLUDES -#include -#include +#include #include #include #include diff --git a/dali/internal/graphics/gles/egl-sync-implementation.h b/dali/internal/graphics/gles/egl-sync-implementation.h index 7042c06..fbb3bdb 100644 --- a/dali/internal/graphics/gles/egl-sync-implementation.h +++ b/dali/internal/graphics/gles/egl-sync-implementation.h @@ -19,8 +19,7 @@ */ // EXTERNAL INCLUDES -#include -#include +#include #include #include diff --git a/dali/internal/graphics/gles/gl-extensions.cpp b/dali/internal/graphics/gles/gl-extensions.cpp index 553a570..429cbd5 100644 --- a/dali/internal/graphics/gles/gl-extensions.cpp +++ b/dali/internal/graphics/gles/gl-extensions.cpp @@ -19,9 +19,9 @@ #include // EXTERNAL INCLUDES -#include -#include +#include +// INTERNAL INCLUDES #include namespace Dali diff --git a/dali/internal/imaging/common/image-operations.cpp b/dali/internal/imaging/common/image-operations.cpp index e9b8f51..d75e027 100755 --- a/dali/internal/imaging/common/image-operations.cpp +++ b/dali/internal/imaging/common/image-operations.cpp @@ -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( sourceSize.GetWidth() ) ); + const int sourceHeight( static_cast(sourceSize.GetHeight() ) ); const float targetAspect( static_cast< float >( requestedSize.GetWidth() ) / static_cast< float >( requestedSize.GetHeight() ) ); int finalWidth = 0; int finalHeight = 0; diff --git a/dali/internal/imaging/windows/curl-environment-win.cpp b/dali/internal/imaging/windows/curl-environment-win.cpp index 7c377e5..8e4dbed 100755 --- a/dali/internal/imaging/windows/curl-environment-win.cpp +++ b/dali/internal/imaging/windows/curl-environment-win.cpp @@ -19,6 +19,9 @@ #include #include +#undef TRANSPARENT +#undef CopyMemory + // INTERNAL INCLUDES #include #include diff --git a/dali/internal/input/windows/input-method-context-impl-win.cpp b/dali/internal/input/windows/input-method-context-impl-win.cpp index 3902cb0..ea75acb 100755 --- a/dali/internal/input/windows/input-method-context-impl-win.cpp +++ b/dali/internal/input/windows/input-method-context-impl-win.cpp @@ -41,6 +41,13 @@ namespace Internal namespace Adaptor { +namespace +{ +#if defined(DEBUG_ENABLED) +Debug::Filter* gLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_INPUT_METHOD_CONTEXT" ); +#endif +} + InputMethodContextPtr InputMethodContextWin::New( Dali::Actor actor ) { InputMethodContextPtr manager; diff --git a/dali/internal/network/common/socket-interface.h b/dali/internal/network/common/socket-interface.h index b2eb301..6f0dabd 100644 --- a/dali/internal/network/common/socket-interface.h +++ b/dali/internal/network/common/socket-interface.h @@ -20,6 +20,8 @@ #include +#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 index 0000000..9244e99 --- /dev/null +++ b/dali/internal/system/windows/logging-win.cpp @@ -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 + +// EXTERNAL INCLUDES +#include + +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 diff --git a/dali/internal/text/text-abstraction/font-client-impl.cpp b/dali/internal/text/text-abstraction/font-client-impl.cpp index 5eae5ba..862ff7b 100755 --- a/dali/internal/text/text-abstraction/font-client-impl.cpp +++ b/dali/internal/text/text-abstraction/font-client-impl.cpp @@ -19,7 +19,7 @@ #include // EXTERNAL INCLUDES -#if !(defined(DALI_PROFILE_UBUNTU) || defined(ANDROID)) +#if !(defined(DALI_PROFILE_UBUNTU) || defined(ANDROID) || defined(WIN32)) #include #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 diff --git a/dali/public-api/adaptor-framework/window.h b/dali/public-api/adaptor-framework/window.h index c65f460..c127f61 100755 --- a/dali/public-api/adaptor-framework/window.h +++ b/dali/public-api/adaptor-framework/window.h @@ -31,6 +31,9 @@ // INTERNAL INCLUDES #include +#undef OPAQUE +#undef TRANSPARENT + namespace Dali { /**