Kaydet (Commit) 2bd890e1 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

-Werror,-Wint-to-pointer-cast

Change-Id: Iec98a5a3df5dcfcd3fcf658bf27e9b5fe57ffc44
(cherry picked from commit 6cd09d31)
üst 8b36af7e
......@@ -113,7 +113,7 @@ Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
Player::~Player()
{
if( mnFrameWnd )
::DestroyWindow( (HWND) mnFrameWnd );
::DestroyWindow( mnFrameWnd );
::CoUninitialize();
}
......@@ -207,7 +207,7 @@ const IVideoWindow* Player::getVideoWindow() const
return mpVW;
}
void Player::setNotifyWnd( int nNotifyWnd )
void Player::setNotifyWnd( HWND nNotifyWnd )
{
mbAddWindow = false;
if( mpME )
......@@ -266,14 +266,14 @@ void SAL_CALL Player::start( )
}
if ( !mnFrameWnd )
{
mnFrameWnd = (int) ::CreateWindow( mpWndClass->lpszClassName, NULL,
mnFrameWnd = ::CreateWindow( mpWndClass->lpszClassName, NULL,
0,
0, 0, 0, 0,
(HWND) NULL, NULL, mpWndClass->hInstance, 0 );
if ( mnFrameWnd )
{
::ShowWindow((HWND) mnFrameWnd, SW_HIDE);
::SetWindowLong( (HWND) mnFrameWnd, 0, (DWORD) this );
::ShowWindow(mnFrameWnd, SW_HIDE);
::SetWindowLong( mnFrameWnd, 0, (DWORD) this );
// mpVW->put_Owner( (OAHWND) mnFrameWnd );
setNotifyWnd( mnFrameWnd );
}
......
......@@ -20,6 +20,10 @@
#ifndef INCLUDED_AVMEDIA_SOURCE_WIN_PLAYER_HXX
#define INCLUDED_AVMEDIA_SOURCE_WIN_PLAYER_HXX
#include <sal/config.h>
#include <WinDef.h>
#include "wincommon.hxx"
#include "com/sun/star/media/XPlayer.hpp"
......@@ -59,7 +63,7 @@ public:
bool create( const OUString& rURL );
void setNotifyWnd( int nNotifyWnd );
void setNotifyWnd( HWND nNotifyWnd );
long processEvent();
const IVideoWindow* getVideoWindow() const;
......@@ -105,7 +109,7 @@ private:
IVideoWindow* mpVW;
IDDrawExclModeVideo* mpEV;
long mnUnmutedVolume;
int mnFrameWnd;
HWND mnFrameWnd;
bool mbMuted;
bool mbLooping;
bool mbAddWindow;
......
......@@ -195,7 +195,7 @@ Window::Window( const uno::Reference< lang::XMultiServiceFactory >& rxMgr, Playe
Window::~Window()
{
if( mnFrameWnd )
::DestroyWindow( (HWND) mnFrameWnd );
::DestroyWindow( mnFrameWnd );
}
void Window::ImplLayoutVideoWindow()
......@@ -296,16 +296,16 @@ bool Window::create( const uno::Sequence< uno::Any >& rArguments )
rArguments[ 0 ] >>= nWnd;
rArguments[ 1 ] >>= aRect;
mnParentWnd = static_cast<int>(nWnd);
mnParentWnd = reinterpret_cast<HWND>(nWnd);
mnFrameWnd = (int) ::CreateWindow( mpWndClass->lpszClassName, NULL,
mnFrameWnd = ::CreateWindow( mpWndClass->lpszClassName, NULL,
WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
aRect.X, aRect.Y, aRect.Width, aRect.Height,
(HWND) mnParentWnd, NULL, mpWndClass->hInstance, 0 );
mnParentWnd, NULL, mpWndClass->hInstance, 0 );
if( mnFrameWnd )
{
::SetWindowLong( (HWND) mnFrameWnd, 0, (DWORD) this );
::SetWindowLong( mnFrameWnd, 0, (DWORD) this );
pVideoWindow->put_Owner( (OAHWND) mnFrameWnd );
pVideoWindow->put_MessageDrain( (OAHWND) mnFrameWnd );
......@@ -387,7 +387,7 @@ void SAL_CALL Window::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal
{
if( mnFrameWnd )
{
::SetWindowPos( (HWND) mnFrameWnd, HWND_TOP, X, Y, Width, Height, 0 );
::SetWindowPos( mnFrameWnd, HWND_TOP, X, Y, Width, Height, 0 );
ImplLayoutVideoWindow();
}
}
......@@ -401,7 +401,7 @@ awt::Rectangle SAL_CALL Window::getPosSize()
{
::RECT aWndRect;
if( ::GetClientRect( (HWND) mnFrameWnd, &aWndRect ) )
if( ::GetClientRect( mnFrameWnd, &aWndRect ) )
{
aRet.X = aWndRect.left;
aRet.Y = aWndRect.top;
......@@ -423,7 +423,7 @@ void SAL_CALL Window::setVisible( sal_Bool bVisible )
if( pVideoWindow )
pVideoWindow->put_Visible( bVisible ? OATRUE : OAFALSE );
::ShowWindow( (HWND) mnFrameWnd, bVisible ? SW_SHOW : SW_HIDE );
::ShowWindow( mnFrameWnd, bVisible ? SW_SHOW : SW_HIDE );
}
}
......@@ -431,14 +431,14 @@ void SAL_CALL Window::setEnable( sal_Bool bEnable )
throw (uno::RuntimeException)
{
if( mnFrameWnd )
::EnableWindow( (HWND) mnFrameWnd, bEnable );
::EnableWindow( mnFrameWnd, bEnable );
}
void SAL_CALL Window::setFocus( )
throw (uno::RuntimeException)
{
if( mnFrameWnd )
::SetFocus( (HWND) mnFrameWnd );
::SetFocus( mnFrameWnd );
}
void SAL_CALL Window::addWindowListener( const uno::Reference< awt::XWindowListener >& xListener )
......
......@@ -20,6 +20,10 @@
#ifndef INCLUDED_AVMEDIA_SOURCE_WIN_WINDOW_HXX
#define INCLUDED_AVMEDIA_SOURCE_WIN_WINDOW_HXX
#include <sal/config.h>
#include <WinDef.h>
#include "wincommon.hxx"
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/interfacecontainer.h>
......@@ -101,8 +105,8 @@ private:
::cppu::OMultiTypeInterfaceContainerHelper maListeners;
css::media::ZoomLevel meZoomLevel;
Player& mrPlayer;
int mnFrameWnd;
int mnParentWnd;
HWND mnFrameWnd;
HWND mnParentWnd;
int mnPointerType;
void ImplLayoutVideoWindow();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment