mImpl.reset( new Impl( buffer, dataSize, mode ) );
}
-FileStream::~FileStream() = default;
+FileStream::FileStream(FileStream&&) = default;
FileStream& FileStream::operator=(FileStream&&) = default;
+FileStream::~FileStream() = default;
+
std::iostream& FileStream::GetStream()
{
return mImpl->GetStream();
/**
* Default move constructor
*/
- FileStream(FileStream&&) = default;
+ FileStream(FileStream&&);
/**
* Non copyable
namespace Network\r
{\r
\r
-void CurlEnvironment::GetThreadId( CRYPTO_THREADID* tid )\r
-{\r
- // If dali uses c++ thread, we may replace pthread_self() to this_thread::get_id()\r
- tid->val = Internal::Adaptor::WindowsPlatformImplementation::GetCurrentThreadId();\r
-}\r
}\r
}\r
}\r
static size_t __cdecl WriteFunction( void *input, size_t uSize, size_t uCount, void *avg )
{
- fwrite( input, uSize, uCount, (FILE*)avg );
+ fwrite( (const char*)input, uSize, uCount, (FILE*)avg );
return uSize * uCount;
}
{
case Dali::NativeImageSource::COLOR_DEPTH_DEFAULT:
{
- return WindowsPlatformImplementation::GetColorDepth();
+ return 32;
}
case Dali::NativeImageSource::COLOR_DEPTH_8:
{
*/
// EXTERNAL INCLUDES
+#include <functional>
+#include <memory>
#include <dali/public-api/actors/actor.h>
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/object/base-object.h>
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/input-method-context.h>
-#include <memory>
-
namespace Dali
{
+++ /dev/null
-/*\r
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- *\r
- */\r
-\r
-// Internal\r
-#include <dali/integration-api/debug.h>\r
-#include <dali/public-api/common/dali-vector.h>\r
-#include <dali/internal/system/common/file-closer.h>\r
-\r
-// External\r
-#include <CustomFile.h>\r
-#include <string>\r
-\r
-namespace Dali\r
-{\r
-\r
-namespace Internal\r
-{\r
-\r
-namespace Platform\r
-{\r
-\r
-namespace InternalFile\r
-{\r
-\r
-std::string GetRealName( const char *name )\r
-{\r
- if( NULL != name && '*' == name[0] )\r
- {\r
- std::string envName;\r
-\r
- const char *p = name + 1;\r
- \r
- while( 0 != *p && '*' != *p )\r
- {\r
- envName.push_back( *p );\r
- p++;\r
- }\r
-\r
- p++;\r
-\r
- char *envValue = std::getenv( envName.c_str() );\r
-\r
- std::string realName = envValue;\r
- realName += p;\r
-\r
- return realName;\r
- }\r
- else\r
- {\r
- return "";\r
- }\r
-}\r
-\r
-FILE *FOpen( const char *name, const char *mode )\r
-{\r
- if( NULL != name && '*' == name[0] )\r
- {\r
- std::string realName = GetRealName( name );\r
- return (FILE*)CustomFile::FOpen( realName.c_str(), mode );\r
- }\r
- else\r
- {\r
- return (FILE*)CustomFile::FOpen( name, mode );\r
- }\r
-}\r
-\r
-FILE *FMemopen( void *__s, size_t __len, const char *__modes )\r
-{\r
- FILE *ret = (FILE*)CustomFile::FMemopen( __s, __len, __modes );\r
- return ret;\r
-}\r
-\r
-size_t FRead( void* _Buffer, size_t _ElementSize, size_t _ElementCount, FILE* _Stream )\r
-{\r
- return CustomFile::FRead( _Buffer, _ElementSize, _ElementCount, _Stream );\r
-}\r
-\r
-int FClose( FILE *__stream )\r
-{\r
- return CustomFile::FClose( __stream );\r
-}\r
-\r
-void FWrite( void *buf, int size, int count, FILE *fp )\r
-{\r
- CustomFile::FWrite( buf, size * count, fp );\r
-}\r
-\r
-int FSeek( FILE *fp, int offset, int origin )\r
-{\r
- return CustomFile::FSeek( fp, offset, origin );\r
-}\r
-\r
-int FTell( FILE *fp )\r
-{\r
- return CustomFile::FTell( fp );\r
-}\r
-\r
-bool FEof( FILE *fp )\r
-{\r
- return CustomFile::FEof( fp );\r
-}\r
-} //InternalFile\r
-} //Platform\r
-} //Internal\r
-} //Dali\r
{\r
DALI_LOG_ERROR("Unable to create TriggerEvent File descriptor\n");\r
}\r
+\r
+ mSelfCallback = MakeCallback( this, &TriggerEvent::Triggered );\r
}\r
\r
TriggerEvent::~TriggerEvent()\r
{\r
delete mCallback;\r
+ delete mSelfCallback;\r
\r
if ( mThreadID >= 0)\r
{\r
// Increment event counter by 1.\r
// Writing to the file descriptor triggers the Dispatch() method in the other thread\r
// (if in multi-threaded environment).\r
- CallbackBase *callback = MakeCallback( this, &TriggerEvent::Triggered );\r
- WindowsPlatformImplementation::PostWinThreadMessage( WIN_CALLBACK_EVENT, reinterpret_cast<uint64_t>( callback ), 0, mThreadID );\r
+ WindowsPlatformImplementation::PostWinThreadMessage( WIN_CALLBACK_EVENT, reinterpret_cast<uint64_t>( mSelfCallback ), 0, mThreadID );\r
}\r
else\r
{\r
private:
CallbackBase* mCallback;
+ CallbackBase* mSelfCallback;
int32_t mThreadID;
TriggerEventInterface::Options mOptions;
};
} // namespace Dali
-#endif // DALI_INTERNAL_TRIGGER_EVENT_IMPL_H
+#endif // DALI_INTERNAL_TRIGGER_EVENT_IMPL_H
\ No newline at end of file
#include <dali/internal/window-system/windows/platform-implement-win.h>\r
\r
// EXTERNAL INCLUDES\r
+#include <map>\r
#include <windows.h>\r
\r
// INTERNAL INCLUDES\r
}\r
}\r
\r
-void GetDPI( uint64_t hWnd, float &xDpi, float &yDpi )\r
+LRESULT CALLBACK WinProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )\r
{\r
- HDC hdcScreen = GetDC( reinterpret_cast<HWND>( hWnd ) );\r
-\r
- int32_t iX = GetDeviceCaps( hdcScreen, HORZRES ); // pixel\r
- int32_t iY = GetDeviceCaps( hdcScreen, VERTRES ); // pixel\r
- int32_t iPhsX = GetDeviceCaps( hdcScreen, HORZSIZE ); // mm\r
- int32_t iPhsY = GetDeviceCaps( hdcScreen, VERTSIZE ); // mm\r
-\r
- xDpi = static_cast<float>( iX ) / static_cast<float>( iPhsX ) * INCH;\r
- yDpi = static_cast<float>( iY ) / static_cast<float>( iPhsY ) * INCH;\r
-}\r
-\r
-CallbackBase *listener = NULL;\r
-\r
-LRESULT CALLBACK WinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)\r
-{\r
- if( NULL != listener )\r
- {\r
- TWinEventInfo eventInfo( reinterpret_cast<uint64_t>( hWnd ), uMsg, wParam, lParam);\r
- CallbackBase::Execute( *listener, &eventInfo );\r
- }\r
+ WindowImpl::ProcWinMessge( reinterpret_cast<uint64_t>( hWnd ), uMsg, wParam, lParam );\r
\r
LRESULT ret = DefWindowProc( hWnd, uMsg, wParam, lParam );\r
return ret;\r
}\r
\r
-DWORD windowStyle = WS_OVERLAPPED;\r
+std::map<uint64_t, WindowImpl*> mHWndToListener;\r
\r
-int32_t GetEdgeWidth()\r
+WindowImpl::WindowImpl()\r
{\r
- switch( windowStyle )\r
- {\r
- case WS_OVERLAPPED:\r
- {\r
- return 8;\r
- }\r
- default:\r
- {\r
- return 0;\r
- }\r
- }\r
+ colorDepth = -1;\r
+ mHWnd = 0;\r
+ mHdc = 0;\r
+ listener = NULL;\r
+ windowStyle = WS_OVERLAPPED;\r
}\r
\r
-int32_t GetEdgeHeight()\r
+WindowImpl::~WindowImpl()\r
{\r
- switch( windowStyle )\r
- {\r
- case WS_OVERLAPPED:\r
- {\r
- return 18;\r
- }\r
- default:\r
- {\r
- return 0;\r
- }\r
- }\r
+ mHWndToListener.erase( mHWnd );\r
}\r
\r
-class WindowsDisplayInfo\r
+void WindowImpl::ProcWinMessge( uint64_t hWnd, uint32_t uMsg, uint64_t wParam, uint64_t lParam )\r
{\r
-public:\r
- static int GetColorDepth()\r
- {\r
- DALI_ASSERT_DEBUG(colorDepth >= 0 && "HWND hasn't been created, no color depth");\r
- return colorDepth;\r
- }\r
+ std::map<uint64_t, WindowImpl*>::iterator x = mHWndToListener.find( hWnd );\r
\r
- static void SetHWND( HWND inHWnd )\r
+ if( mHWndToListener.end() != x )\r
{\r
- if( hWnd != inHWnd )\r
+ CallbackBase* listener = x->second->listener;\r
+\r
+ if( NULL != listener )\r
{\r
- hWnd = inHWnd;\r
- hdc = GetDC( hWnd );\r
- colorDepth = GetDeviceCaps( WindowsDisplayInfo::hdc, BITSPIXEL ) * GetDeviceCaps( WindowsDisplayInfo::hdc, PLANES );\r
+ TWinEventInfo eventInfo( hWnd, uMsg, wParam, lParam );\r
+ CallbackBase::Execute( *listener, &eventInfo );\r
}\r
}\r
+}\r
\r
-private:\r
- static int colorDepth;\r
- static HWND hWnd;\r
- static HDC hdc;\r
-};\r
+void WindowImpl::GetDPI( float &xDpi, float &yDpi )\r
+{\r
+ HDC hdcScreen = GetDC( reinterpret_cast<HWND>( mHWnd ) );\r
\r
-int WindowsDisplayInfo::colorDepth = -1;\r
-HWND WindowsDisplayInfo::hWnd = NULL;\r
-HDC WindowsDisplayInfo::hdc = NULL;\r
+ int32_t iX = GetDeviceCaps( hdcScreen, HORZRES ); // pixel\r
+ int32_t iY = GetDeviceCaps( hdcScreen, VERTRES ); // pixel\r
+ int32_t iPhsX = GetDeviceCaps( hdcScreen, HORZSIZE ); // mm\r
+ int32_t iPhsY = GetDeviceCaps( hdcScreen, VERTSIZE ); // mm\r
+\r
+ xDpi = static_cast<float>( iX ) / static_cast<float>( iPhsX ) * INCH;\r
+ yDpi = static_cast<float>( iY ) / static_cast<float>( iPhsY ) * INCH;\r
+}\r
\r
-int GetColorDepth()\r
+int WindowImpl::GetColorDepth()\r
{\r
- return WindowsDisplayInfo::GetColorDepth();\r
+ DALI_ASSERT_DEBUG( colorDepth >= 0 && "HWND hasn't been created, no color depth" );\r
+ return colorDepth;\r
}\r
\r
-uint64_t CreateHwnd(\r
- _In_opt_ const char *lpClassName,\r
- _In_opt_ const char *lpWindowName,\r
- _In_ int X,\r
- _In_ int Y,\r
- _In_ int nWidth,\r
- _In_ int nHeight,\r
- _In_opt_ uint64_t parent)\r
+uint64_t WindowImpl::CreateHwnd(\r
+ _In_opt_ const char *lpClassName,\r
+ _In_opt_ const char *lpWindowName,\r
+ _In_ int X,\r
+ _In_ int Y,\r
+ _In_ int nWidth,\r
+ _In_ int nHeight,\r
+ _In_opt_ uint64_t parent )\r
{\r
WNDCLASS cs = { 0 };\r
cs.cbClsExtra = 0;\r
RegisterClass( &cs );\r
\r
HWND hWnd = CreateWindow( lpClassName, lpWindowName, windowStyle, X, Y, nWidth + 2 * GetEdgeWidth(), nHeight + 2 * GetEdgeHeight(), NULL, NULL, cs.hInstance, NULL );\r
- ShowWindow( hWnd, SW_SHOW );\r
+ ::ShowWindow( hWnd, SW_SHOW );\r
\r
- WindowsDisplayInfo::SetHWND( hWnd );\r
+ SetHWND( reinterpret_cast<uint64_t>(hWnd) );\r
\r
- return reinterpret_cast<uint64_t>( hWnd );\r
+ return mHWnd;\r
}\r
\r
-void SetListener( CallbackBase *callback )\r
+void WindowImpl::SetListener( CallbackBase *callback )\r
{\r
listener = callback;\r
}\r
\r
-bool PostWinMessage(\r
- _In_ uint32_t Msg,\r
- _In_ uint32_t wParam,\r
- _In_ uint64_t lParam,\r
- _In_ uint64_t hWnd)\r
+bool WindowImpl::PostWinMessage(\r
+ _In_ uint32_t Msg,\r
+ _In_ uint32_t wParam,\r
+ _In_ uint64_t lParam )\r
{\r
- return (bool)PostMessage( reinterpret_cast<HWND>( hWnd ), Msg, wParam, lParam );\r
+ return (bool)PostMessage( reinterpret_cast<HWND>( mHWnd ), Msg, wParam, lParam );\r
}\r
\r
-bool PostWinThreadMessage(\r
- _In_ uint32_t Msg,\r
- _In_ uint32_t wParam,\r
- _In_ uint64_t lParam,\r
- _In_ uint64_t threadID/* = -1*/ )\r
+int32_t WindowImpl::GetEdgeWidth()\r
{\r
- if( -1 == threadID )\r
+ switch( windowStyle )\r
{\r
- threadID = GetCurrentThreadId();\r
+ case WS_OVERLAPPED:\r
+ {\r
+ return 8;\r
}\r
+ default:\r
+ {\r
+ return 0;\r
+ }\r
+ }\r
+}\r
\r
- return (bool)PostThreadMessage( threadID, Msg, wParam, lParam );\r
+int32_t WindowImpl::GetEdgeHeight()\r
+{\r
+ switch( windowStyle )\r
+ {\r
+ case WS_OVERLAPPED:\r
+ {\r
+ return 18;\r
+ }\r
+ default:\r
+ {\r
+ return 0;\r
+ }\r
+ }\r
}\r
\r
-void ShowWindow( uint64_t hWnd)\r
+void WindowImpl::SetHWND( uint64_t inHWnd )\r
{\r
- ::ShowWindow( reinterpret_cast<HWND>( hWnd ), SW_SHOW);\r
+ if( mHWnd != inHWnd )\r
+ {\r
+ mHWnd = inHWnd;\r
+ mHdc = reinterpret_cast<uint64_t>( GetDC( reinterpret_cast<HWND>( mHWnd ) ) );\r
+ colorDepth = GetDeviceCaps( reinterpret_cast<HDC>( mHdc ), BITSPIXEL ) * GetDeviceCaps( reinterpret_cast<HDC>( mHdc ), PLANES );\r
+\r
+ std::map<uint64_t, WindowImpl*>::iterator x = mHWndToListener.find( mHWnd );\r
+\r
+ if( mHWndToListener.end() == x )\r
+ {\r
+ mHWndToListener.insert( std::make_pair( mHWnd, this ) );\r
+ }\r
+ else\r
+ {\r
+ x->second = this;\r
+ }\r
+ }\r
}\r
\r
-void HideWindow( uint64_t hWnd)\r
+bool PostWinThreadMessage(\r
+ _In_ uint32_t Msg,\r
+ _In_ uint32_t wParam,\r
+ _In_ uint64_t lParam,\r
+ _In_ uint64_t threadID/* = -1*/ )\r
{\r
- ::ShowWindow( reinterpret_cast<HWND>( hWnd ), SW_HIDE);\r
+ if( -1 == threadID )\r
+ {\r
+ threadID = GetCurrentThreadId();\r
+ }\r
+\r
+ return (bool)PostThreadMessage( threadID, Msg, wParam, lParam );\r
}\r
\r
struct TTimerCallbackInfo\r
#ifndef PLATFORM_IMPLEMENT_WIN_INCLUDE\r
#define PLATFORM_IMPLEMENT_WIN_INCLUDE\r
\r
-/*
-* Copyright (c) 2018 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.
-*
+/*\r
+* Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+*\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
*/\r
\r
// EXTERNAL_HEADERS\r
typedef uint64_t WinWindowHandle;\r
typedef uint64_t WinPixmap;\r
\r
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
+namespace Dali\r
+{\r
+\r
+namespace Internal\r
+{\r
+\r
+namespace Adaptor\r
+{\r
\r
namespace WindowsPlatformImplementation\r
{\r
\r
void RunLoop();\r
\r
-int GetEdgeHeight();\r
+bool PostWinThreadMessage(\r
+ _In_ uint32_t Msg,\r
+ _In_ uint32_t wParam,\r
+ _In_ uint64_t lParam,\r
+ _In_ uint64_t threadID = -1 );\r
+\r
+using timerCallback = bool(*)(void *data);\r
+\r
+int SetTimer(int interval, timerCallback callback, void *data);\r
+\r
+void KillTimer(int id);\r
+\r
+const char* GetKeyName( int keyCode );\r
+\r
+uint64_t GetCurrentThreadId();\r
+\r
+void GetNanoseconds( uint64_t& timeInNanoseconds );\r
+\r
+unsigned int GetCurrentMilliSeconds( void );\r
+\r
+class WindowImpl\r
+{\r
+public:\r
+ WindowImpl();\r
+\r
+ virtual ~WindowImpl();\r
+\r
+ static void ProcWinMessge( uint64_t hWnd, uint32_t uMsg, uint64_t wParam, uint64_t lParam );\r
\r
-int GetColorDepth();\r
+ void GetDPI( float &xDpi, float &yDpi );\r
\r
-uint64_t CreateHwnd(\r
+ int GetColorDepth();\r
+\r
+ uint64_t CreateHwnd(\r
_In_opt_ const char *lpClassName,\r
_In_opt_ const char *lpWindowName,\r
_In_ int X,\r
_In_ int Y,\r
_In_ int nWidth,\r
_In_ int nHeight,\r
- _In_opt_ uint64_t parent);\r
+ _In_opt_ uint64_t parent );\r
\r
-void SetListener( CallbackBase *callback );\r
+ void SetListener( CallbackBase *callback );\r
\r
-bool PostWinMessage(\r
+ bool PostWinMessage(\r
_In_ uint32_t Msg,\r
_In_ uint32_t wParam,\r
- _In_ uint64_t lParam,\r
- _In_ uint64_t hWnd);\r
+ _In_ uint64_t lParam );\r
\r
-bool PostWinThreadMessage(\r
- _In_ uint32_t Msg,\r
- _In_ uint32_t wParam,\r
- _In_ uint64_t lParam,\r
- _In_ uint64_t threadID = -1 );\r
+ int32_t GetEdgeWidth();\r
\r
-void ShowWindow( uint64_t hWnd );\r
-void HideWindow( uint64_t hWnd );\r
+ int32_t GetEdgeHeight();\r
\r
-using timerCallback = bool(*)(void *data);\r
+protected:\r
\r
-int SetTimer(int interval, timerCallback callback, void *data);\r
+private:\r
\r
-void KillTimer(int id);\r
+ void SetHWND( uint64_t inHWnd );\r
\r
-void GetDPI( uint64_t hWnd, float &xDpi, float &yDpi );\r
+ unsigned long windowStyle;\r
\r
-const char* GetKeyName( int keyCode );\r
+ int colorDepth;\r
+ uint64_t mHWnd;\r
+ uint64_t mHdc;\r
\r
-uint64_t GetCurrentThreadId();\r
+ CallbackBase *listener;\r
+};\r
\r
-void GetNanoseconds( uint64_t& timeInNanoseconds );\r
+} // namespace WindowsPlatformImplement\r
\r
-unsigned int GetCurrentMilliSeconds( void );\r
+} // namespace Adaptor\r
+\r
+} // namespace internal\r
+\r
+} // namespace Dali\r
\r
-} // namespace WindowsPlatformImplement
-
-} // namespace Adaptor
-
-} // namespace internal
-
-} // namespace Dali
-
#endif // WIN32_WINDOWS_SYSTEM_INCLUDE\r
WindowBaseWin::~WindowBaseWin()
{
- WindowsPlatformImplementation::PostWinMessage( WM_CLOSE, 0, 0, mWin32Window );
+ mWindowImpl.PostWinMessage( WM_CLOSE, 0, 0 );
}
void WindowBaseWin::Initialize( PositionSize positionSize, Any surface, bool isTransparent )
mWin32Window = static_cast< WinWindowHandle >( surfaceId );
}
- WindowsPlatformImplementation::SetListener( MakeCallback( this, &WindowBaseWin::EventEntry ) );
+ mWindowImpl.SetListener( MakeCallback( this, &WindowBaseWin::EventEntry ) );
}
void WindowBaseWin::OnDeleteRequest()
Integration::Point point;
point.SetDeviceId( touchEvent.multi.device );
point.SetState( state );
- point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + WindowsPlatformImplementation::GetEdgeHeight() ) );
+ point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + mWindowImpl.GetEdgeHeight() ) );
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 ) );
Integration::Point point;
point.SetDeviceId( touchEvent.multi.device );
point.SetState( state );
- point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + WindowsPlatformImplementation::GetEdgeHeight() ) );
+ point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + mWindowImpl.GetEdgeHeight() ) );
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 ) );
Integration::Point point;
point.SetDeviceId( touchEvent.multi.device );
point.SetState( state );
- point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + WindowsPlatformImplementation::GetEdgeHeight() ) );
+ point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + mWindowImpl.GetEdgeHeight() ) );
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 ) );
// Ensure key event string is not NULL as keys like SHIFT have a null string.
keyString.push_back( event->wParam );
- Integration::KeyEvent keyEvent( keyName, emptyString, keyString, keyCode, modifier, time, Integration::KeyEvent::Down, emptyString, emptyString, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
+ Integration::KeyEvent keyEvent( keyName, emptyString, keyString, keyCode, modifier, time, Integration::KeyEvent::Up, emptyString, emptyString, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
mKeyEventSignal.Emit( keyEvent );
}
void WindowBaseWin::Resize( PositionSize positionSize )
{
+ ::SetWindowPos( (HWND)mWin32Window, NULL, positionSize.x, positionSize.y, positionSize.width, positionSize.height, SWP_SHOWWINDOW );
}
void WindowBaseWin::MoveResize( PositionSize positionSize )
float xres, yres;
//// 1 inch = 25.4 millimeters
- WindowsPlatformImplementation::GetDPI( mWin32Window, xres, yres );
+ mWindowImpl.GetDPI( xres, yres );
xres *= 1.5f;
yres *= 1.5f;
void WindowBaseWin::CreateWinWindow( PositionSize positionSize, bool isTransparent )
{
- long hWnd = WindowsPlatformImplementation::CreateHwnd( "Demo", "Demo", positionSize.x, positionSize.y, positionSize.width, positionSize.height, NULL );
-
- WindowsPlatformImplementation::ShowWindow( hWnd );
+ long hWnd = mWindowImpl.CreateHwnd( "Demo", "Demo", positionSize.x, positionSize.y, positionSize.width, positionSize.height, NULL );
mWin32Window = (WinWindowHandle)hWnd;
DALI_ASSERT_ALWAYS( mWin32Window != 0 && "There is no Windows window" );
bool mOwnSurface:1; ///< Whether we own the surface (responsible for deleting it)
bool mIsTransparent:1; ///< Whether the window is transparent (32 bit or 24 bit)
bool mRotationAppSet:1;
+
+ WindowsPlatformImplementation::WindowImpl mWindowImpl;
};
} // namespace Adaptor