Skip to content
Snippets Groups Projects
Commit 9430b8de authored by Rick Pasetto's avatar Rick Pasetto
Browse files

dos2unix these files

parent 83356a77
No related branches found
No related tags found
No related merge requests found
# -*- cmake -*- # -*- cmake -*-
if (VIEWER) if (VIEWER)
set(OS_DRAG_DROP ON CACHE BOOL "Build the viewer with OS level drag and drop turned on or off") set(OS_DRAG_DROP ON CACHE BOOL "Build the viewer with OS level drag and drop turned on or off")
if (OS_DRAG_DROP) if (OS_DRAG_DROP)
if (WINDOWS) if (WINDOWS)
add_definitions(-DLL_OS_DRAGDROP_ENABLED=1) add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
endif (WINDOWS) endif (WINDOWS)
if (DARWIN) if (DARWIN)
add_definitions(-DLL_OS_DRAGDROP_ENABLED=1) add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
endif (DARWIN) endif (DARWIN)
if (LINUX) if (LINUX)
add_definitions(-DLL_OS_DRAGDROP_ENABLED=0) add_definitions(-DLL_OS_DRAGDROP_ENABLED=0)
endif (LINUX) endif (LINUX)
endif (OS_DRAG_DROP) endif (OS_DRAG_DROP)
endif (VIEWER) endif (VIEWER)
/** /**
* @file lldragdrop32.cpp * @file lldragdrop32.cpp
* @brief Handler for Windows specific drag and drop (OS to client) code * @brief Handler for Windows specific drag and drop (OS to client) code
* *
* $LicenseInfo:firstyear=2001&license=viewergpl$ * $LicenseInfo:firstyear=2001&license=viewergpl$
* *
* Copyright (c) 2001-2009, Linden Research, Inc. * Copyright (c) 2001-2009, Linden Research, Inc.
* *
* Second Life Viewer Source Code * Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab * The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0 * to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement * ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of * ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or * the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* *
* There are special exceptions to the terms and conditions of the GPL as * There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception * it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or * in the file doc/FLOSS-exception.txt in this software distribution, or
* online at * online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception * http://secondlifegrid.net/programs/open_source/licensing/flossexception
* *
* By copying, modifying or distributing this software, you acknowledge * By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above, * that you have read and understood your obligations described above,
* and agree to abide by those obligations. * and agree to abide by those obligations.
* *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE. * COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$ * $/LicenseInfo$
*/ */
#if LL_WINDOWS #if LL_WINDOWS
#if LL_OS_DRAGDROP_ENABLED #if LL_OS_DRAGDROP_ENABLED
#include "linden_common.h" #include "linden_common.h"
#include "llwindowwin32.h" #include "llwindowwin32.h"
#include "llkeyboardwin32.h" #include "llkeyboardwin32.h"
#include "llwindowcallbacks.h" #include "llwindowcallbacks.h"
#include "lldragdropwin32.h" #include "lldragdropwin32.h"
class LLDragDropWin32Target: class LLDragDropWin32Target:
public IDropTarget public IDropTarget
{ {
public: public:
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
LLDragDropWin32Target( HWND hWnd ) : LLDragDropWin32Target( HWND hWnd ) :
mRefCount( 1 ), mRefCount( 1 ),
mAppWindowHandle( hWnd ), mAppWindowHandle( hWnd ),
mAllowDrop( false) mAllowDrop( false)
{ {
}; };
virtual ~LLDragDropWin32Target() virtual ~LLDragDropWin32Target()
{ {
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
ULONG __stdcall AddRef( void ) ULONG __stdcall AddRef( void )
{ {
return InterlockedIncrement( &mRefCount ); return InterlockedIncrement( &mRefCount );
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
ULONG __stdcall Release( void ) ULONG __stdcall Release( void )
{ {
LONG count = InterlockedDecrement( &mRefCount ); LONG count = InterlockedDecrement( &mRefCount );
if ( count == 0 ) if ( count == 0 )
{ {
delete this; delete this;
return 0; return 0;
} }
else else
{ {
return count; return count;
}; };
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
HRESULT __stdcall QueryInterface( REFIID iid, void** ppvObject ) HRESULT __stdcall QueryInterface( REFIID iid, void** ppvObject )
{ {
if ( iid == IID_IUnknown || iid == IID_IDropTarget ) if ( iid == IID_IUnknown || iid == IID_IDropTarget )
{ {
AddRef(); AddRef();
*ppvObject = this; *ppvObject = this;
return S_OK; return S_OK;
} }
else else
{ {
*ppvObject = 0; *ppvObject = 0;
return E_NOINTERFACE; return E_NOINTERFACE;
}; };
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
HRESULT __stdcall DragEnter( IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect ) HRESULT __stdcall DragEnter( IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect )
{ {
FORMATETC fmtetc = { CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; FORMATETC fmtetc = { CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
// support CF_TEXT using a HGLOBAL? // support CF_TEXT using a HGLOBAL?
if ( S_OK == pDataObject->QueryGetData( &fmtetc ) ) if ( S_OK == pDataObject->QueryGetData( &fmtetc ) )
{ {
mAllowDrop = true; mAllowDrop = true;
mDropUrl = std::string(); mDropUrl = std::string();
mIsSlurl = false; mIsSlurl = false;
STGMEDIUM stgmed; STGMEDIUM stgmed;
if( S_OK == pDataObject->GetData( &fmtetc, &stgmed ) ) if( S_OK == pDataObject->GetData( &fmtetc, &stgmed ) )
{ {
PVOID data = GlobalLock( stgmed.hGlobal ); PVOID data = GlobalLock( stgmed.hGlobal );
mDropUrl = std::string( (char*)data ); mDropUrl = std::string( (char*)data );
// XXX MAJOR MAJOR HACK! // XXX MAJOR MAJOR HACK!
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mAppWindowHandle, GWL_USERDATA); LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mAppWindowHandle, GWL_USERDATA);
if (NULL != window_imp) if (NULL != window_imp)
{ {
LLCoordGL gl_coord( 0, 0 ); LLCoordGL gl_coord( 0, 0 );
POINT pt2; POINT pt2;
pt2.x = pt.x; pt2.x = pt.x;
pt2.y = pt.y; pt2.y = pt.y;
ScreenToClient( mAppWindowHandle, &pt2 ); ScreenToClient( mAppWindowHandle, &pt2 );
LLCoordWindow cursor_coord_window( pt2.x, pt2.y ); LLCoordWindow cursor_coord_window( pt2.x, pt2.y );
window_imp->convertCoords(cursor_coord_window, &gl_coord); window_imp->convertCoords(cursor_coord_window, &gl_coord);
MASK mask = gKeyboard->currentMask(TRUE); MASK mask = gKeyboard->currentMask(TRUE);
LLWindowCallbacks::DragNDropResult result = window_imp->completeDragNDropRequest( gl_coord, mask, LLWindowCallbacks::DragNDropResult result = window_imp->completeDragNDropRequest( gl_coord, mask,
LLWindowCallbacks::DNDA_START_TRACKING, mDropUrl ); LLWindowCallbacks::DNDA_START_TRACKING, mDropUrl );
switch (result) switch (result)
{ {
case LLWindowCallbacks::DND_COPY: case LLWindowCallbacks::DND_COPY:
*pdwEffect = DROPEFFECT_COPY; *pdwEffect = DROPEFFECT_COPY;
break; break;
case LLWindowCallbacks::DND_LINK: case LLWindowCallbacks::DND_LINK:
*pdwEffect = DROPEFFECT_LINK; *pdwEffect = DROPEFFECT_LINK;
break; break;
case LLWindowCallbacks::DND_MOVE: case LLWindowCallbacks::DND_MOVE:
*pdwEffect = DROPEFFECT_MOVE; *pdwEffect = DROPEFFECT_MOVE;
break; break;
case LLWindowCallbacks::DND_NONE: case LLWindowCallbacks::DND_NONE:
default: default:
*pdwEffect = DROPEFFECT_NONE; *pdwEffect = DROPEFFECT_NONE;
break; break;
} }
}; };
GlobalUnlock( stgmed.hGlobal ); GlobalUnlock( stgmed.hGlobal );
ReleaseStgMedium( &stgmed ); ReleaseStgMedium( &stgmed );
}; };
SetFocus( mAppWindowHandle ); SetFocus( mAppWindowHandle );
} }
else else
{ {
mAllowDrop = false; mAllowDrop = false;
*pdwEffect = DROPEFFECT_NONE; *pdwEffect = DROPEFFECT_NONE;
}; };
return S_OK; return S_OK;
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
HRESULT __stdcall DragOver( DWORD grfKeyState, POINTL pt, DWORD* pdwEffect ) HRESULT __stdcall DragOver( DWORD grfKeyState, POINTL pt, DWORD* pdwEffect )
{ {
if ( mAllowDrop ) if ( mAllowDrop )
{ {
// XXX MAJOR MAJOR HACK! // XXX MAJOR MAJOR HACK!
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mAppWindowHandle, GWL_USERDATA); LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mAppWindowHandle, GWL_USERDATA);
if (NULL != window_imp) if (NULL != window_imp)
{ {
LLCoordGL gl_coord( 0, 0 ); LLCoordGL gl_coord( 0, 0 );
POINT pt2; POINT pt2;
pt2.x = pt.x; pt2.x = pt.x;
pt2.y = pt.y; pt2.y = pt.y;
ScreenToClient( mAppWindowHandle, &pt2 ); ScreenToClient( mAppWindowHandle, &pt2 );
LLCoordWindow cursor_coord_window( pt2.x, pt2.y ); LLCoordWindow cursor_coord_window( pt2.x, pt2.y );
window_imp->convertCoords(cursor_coord_window, &gl_coord); window_imp->convertCoords(cursor_coord_window, &gl_coord);
MASK mask = gKeyboard->currentMask(TRUE); MASK mask = gKeyboard->currentMask(TRUE);
LLWindowCallbacks::DragNDropResult result = window_imp->completeDragNDropRequest( gl_coord, mask, LLWindowCallbacks::DragNDropResult result = window_imp->completeDragNDropRequest( gl_coord, mask,
LLWindowCallbacks::DNDA_TRACK, mDropUrl ); LLWindowCallbacks::DNDA_TRACK, mDropUrl );
switch (result) switch (result)
{ {
case LLWindowCallbacks::DND_COPY: case LLWindowCallbacks::DND_COPY:
*pdwEffect = DROPEFFECT_COPY; *pdwEffect = DROPEFFECT_COPY;
break; break;
case LLWindowCallbacks::DND_LINK: case LLWindowCallbacks::DND_LINK:
*pdwEffect = DROPEFFECT_LINK; *pdwEffect = DROPEFFECT_LINK;
break; break;
case LLWindowCallbacks::DND_MOVE: case LLWindowCallbacks::DND_MOVE:
*pdwEffect = DROPEFFECT_MOVE; *pdwEffect = DROPEFFECT_MOVE;
break; break;
case LLWindowCallbacks::DND_NONE: case LLWindowCallbacks::DND_NONE:
default: default:
*pdwEffect = DROPEFFECT_NONE; *pdwEffect = DROPEFFECT_NONE;
break; break;
} }
}; };
} }
else else
{ {
*pdwEffect = DROPEFFECT_NONE; *pdwEffect = DROPEFFECT_NONE;
}; };
return S_OK; return S_OK;
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
HRESULT __stdcall DragLeave( void ) HRESULT __stdcall DragLeave( void )
{ {
// XXX MAJOR MAJOR HACK! // XXX MAJOR MAJOR HACK!
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mAppWindowHandle, GWL_USERDATA); LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mAppWindowHandle, GWL_USERDATA);
if (NULL != window_imp) if (NULL != window_imp)
{ {
LLCoordGL gl_coord( 0, 0 ); LLCoordGL gl_coord( 0, 0 );
MASK mask = gKeyboard->currentMask(TRUE); MASK mask = gKeyboard->currentMask(TRUE);
window_imp->completeDragNDropRequest( gl_coord, mask, LLWindowCallbacks::DNDA_STOP_TRACKING, mDropUrl ); window_imp->completeDragNDropRequest( gl_coord, mask, LLWindowCallbacks::DNDA_STOP_TRACKING, mDropUrl );
}; };
return S_OK; return S_OK;
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
HRESULT __stdcall Drop( IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect ) HRESULT __stdcall Drop( IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect )
{ {
if ( mAllowDrop ) if ( mAllowDrop )
{ {
// window impl stored in Window data (neat!) // window impl stored in Window data (neat!)
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong( mAppWindowHandle, GWL_USERDATA ); LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong( mAppWindowHandle, GWL_USERDATA );
if ( NULL != window_imp ) if ( NULL != window_imp )
{ {
LLCoordGL gl_coord( 0, 0 ); LLCoordGL gl_coord( 0, 0 );
POINT pt_client; POINT pt_client;
pt_client.x = pt.x; pt_client.x = pt.x;
pt_client.y = pt.y; pt_client.y = pt.y;
ScreenToClient( mAppWindowHandle, &pt_client ); ScreenToClient( mAppWindowHandle, &pt_client );
LLCoordWindow cursor_coord_window( pt_client.x, pt_client.y ); LLCoordWindow cursor_coord_window( pt_client.x, pt_client.y );
window_imp->convertCoords(cursor_coord_window, &gl_coord); window_imp->convertCoords(cursor_coord_window, &gl_coord);
llinfos << "### (Drop) URL is: " << mDropUrl << llendl; llinfos << "### (Drop) URL is: " << mDropUrl << llendl;
llinfos << "### raw coords are: " << pt.x << " x " << pt.y << llendl; llinfos << "### raw coords are: " << pt.x << " x " << pt.y << llendl;
llinfos << "### client coords are: " << pt_client.x << " x " << pt_client.y << llendl; llinfos << "### client coords are: " << pt_client.x << " x " << pt_client.y << llendl;
llinfos << "### GL coords are: " << gl_coord.mX << " x " << gl_coord.mY << llendl; llinfos << "### GL coords are: " << gl_coord.mX << " x " << gl_coord.mY << llendl;
llinfos << llendl; llinfos << llendl;
// no keyboard modifier option yet but we could one day // no keyboard modifier option yet but we could one day
MASK mask = gKeyboard->currentMask( TRUE ); MASK mask = gKeyboard->currentMask( TRUE );
// actually do the drop // actually do the drop
LLWindowCallbacks::DragNDropResult result = window_imp->completeDragNDropRequest( gl_coord, mask, LLWindowCallbacks::DragNDropResult result = window_imp->completeDragNDropRequest( gl_coord, mask,
LLWindowCallbacks::DNDA_DROPPED, mDropUrl ); LLWindowCallbacks::DNDA_DROPPED, mDropUrl );
switch (result) switch (result)
{ {
case LLWindowCallbacks::DND_COPY: case LLWindowCallbacks::DND_COPY:
*pdwEffect = DROPEFFECT_COPY; *pdwEffect = DROPEFFECT_COPY;
break; break;
case LLWindowCallbacks::DND_LINK: case LLWindowCallbacks::DND_LINK:
*pdwEffect = DROPEFFECT_LINK; *pdwEffect = DROPEFFECT_LINK;
break; break;
case LLWindowCallbacks::DND_MOVE: case LLWindowCallbacks::DND_MOVE:
*pdwEffect = DROPEFFECT_MOVE; *pdwEffect = DROPEFFECT_MOVE;
break; break;
case LLWindowCallbacks::DND_NONE: case LLWindowCallbacks::DND_NONE:
default: default:
*pdwEffect = DROPEFFECT_NONE; *pdwEffect = DROPEFFECT_NONE;
break; break;
} }
}; };
} }
else else
{ {
*pdwEffect = DROPEFFECT_NONE; *pdwEffect = DROPEFFECT_NONE;
}; };
return S_OK; return S_OK;
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
private: private:
LONG mRefCount; LONG mRefCount;
HWND mAppWindowHandle; HWND mAppWindowHandle;
bool mAllowDrop; bool mAllowDrop;
std::string mDropUrl; std::string mDropUrl;
bool mIsSlurl; bool mIsSlurl;
friend class LLWindowWin32; friend class LLWindowWin32;
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
LLDragDropWin32::LLDragDropWin32() : LLDragDropWin32::LLDragDropWin32() :
mDropTarget( NULL ), mDropTarget( NULL ),
mDropWindowHandle( NULL ) mDropWindowHandle( NULL )
{ {
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
LLDragDropWin32::~LLDragDropWin32() LLDragDropWin32::~LLDragDropWin32()
{ {
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
bool LLDragDropWin32::init( HWND hWnd ) bool LLDragDropWin32::init( HWND hWnd )
{ {
if ( NOERROR != OleInitialize( NULL ) ) if ( NOERROR != OleInitialize( NULL ) )
return FALSE; return FALSE;
mDropTarget = new LLDragDropWin32Target( hWnd ); mDropTarget = new LLDragDropWin32Target( hWnd );
if ( mDropTarget ) if ( mDropTarget )
{ {
HRESULT result = CoLockObjectExternal( mDropTarget, TRUE, FALSE ); HRESULT result = CoLockObjectExternal( mDropTarget, TRUE, FALSE );
if ( S_OK == result ) if ( S_OK == result )
{ {
result = RegisterDragDrop( hWnd, mDropTarget ); result = RegisterDragDrop( hWnd, mDropTarget );
if ( S_OK != result ) if ( S_OK != result )
{ {
// RegisterDragDrop failed // RegisterDragDrop failed
return false; return false;
}; };
// all ok // all ok
mDropWindowHandle = hWnd; mDropWindowHandle = hWnd;
} }
else else
{ {
// Unable to lock OLE object // Unable to lock OLE object
return false; return false;
}; };
}; };
// success // success
return true; return true;
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
void LLDragDropWin32::reset() void LLDragDropWin32::reset()
{ {
if ( mDropTarget ) if ( mDropTarget )
{ {
RevokeDragDrop( mDropWindowHandle ); RevokeDragDrop( mDropWindowHandle );
CoLockObjectExternal( mDropTarget, FALSE, TRUE ); CoLockObjectExternal( mDropTarget, FALSE, TRUE );
mDropTarget->Release(); mDropTarget->Release();
}; };
OleUninitialize(); OleUninitialize();
} }
#endif // LL_OS_DRAGDROP_ENABLED #endif // LL_OS_DRAGDROP_ENABLED
#endif // LL_WINDOWS #endif // LL_WINDOWS
/** /**
* @file lldragdrop32.cpp * @file lldragdrop32.cpp
* @brief Handler for Windows specific drag and drop (OS to client) code * @brief Handler for Windows specific drag and drop (OS to client) code
* *
* $LicenseInfo:firstyear=2004&license=viewergpl$ * $LicenseInfo:firstyear=2004&license=viewergpl$
* *
* Copyright (c) 2004-2009, Linden Research, Inc. * Copyright (c) 2004-2009, Linden Research, Inc.
* *
* Second Life Viewer Source Code * Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab * The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0 * to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement * ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of * ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or * the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* *
* There are special exceptions to the terms and conditions of the GPL as * There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception * it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or * in the file doc/FLOSS-exception.txt in this software distribution, or
* online at * online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception * http://secondlifegrid.net/programs/open_source/licensing/flossexception
* *
* By copying, modifying or distributing this software, you acknowledge * By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above, * that you have read and understood your obligations described above,
* and agree to abide by those obligations. * and agree to abide by those obligations.
* *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE. * COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$ * $/LicenseInfo$
*/ */
#if LL_WINDOWS #if LL_WINDOWS
#if LL_OS_DRAGDROP_ENABLED #if LL_OS_DRAGDROP_ENABLED
#ifndef LL_LLDRAGDROP32_H #ifndef LL_LLDRAGDROP32_H
#define LL_LLDRAGDROP32_H #define LL_LLDRAGDROP32_H
#include <windows.h> #include <windows.h>
#include <ole2.h> #include <ole2.h>
class LLDragDropWin32 class LLDragDropWin32
{ {
public: public:
LLDragDropWin32(); LLDragDropWin32();
~LLDragDropWin32(); ~LLDragDropWin32();
bool init( HWND hWnd ); bool init( HWND hWnd );
void reset(); void reset();
private: private:
IDropTarget* mDropTarget; IDropTarget* mDropTarget;
HWND mDropWindowHandle; HWND mDropWindowHandle;
}; };
#endif // LL_LLDRAGDROP32_H #endif // LL_LLDRAGDROP32_H
#else // LL_OS_DRAGDROP_ENABLED #else // LL_OS_DRAGDROP_ENABLED
#ifndef LL_LLDRAGDROP32_H #ifndef LL_LLDRAGDROP32_H
#define LL_LLDRAGDROP32_H #define LL_LLDRAGDROP32_H
#include <windows.h> #include <windows.h>
#include <ole2.h> #include <ole2.h>
// imposter class that does nothing // imposter class that does nothing
class LLDragDropWin32 class LLDragDropWin32
{ {
public: public:
LLDragDropWin32() {}; LLDragDropWin32() {};
~LLDragDropWin32() {}; ~LLDragDropWin32() {};
bool init( HWND hWnd ) { return false; }; bool init( HWND hWnd ) { return false; };
void reset() { }; void reset() { };
}; };
#endif // LL_LLDRAGDROP32_H #endif // LL_LLDRAGDROP32_H
#endif // LL_OS_DRAGDROP_ENABLED #endif // LL_OS_DRAGDROP_ENABLED
#endif // LL_WINDOWS #endif // LL_WINDOWS
Source diff could not be displayed: it is too large. Options to address this: view the blob.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment