remove InvokeDragSessionSingle.

This commit is contained in:
pinkerton%netscape.com 1999-08-19 19:48:18 +00:00
parent 18e26727b6
commit 38ebcd20fd
8 changed files with 3 additions and 51 deletions

View File

@ -49,7 +49,6 @@ public:
//nsIDragService
NS_IMETHOD InvokeDragSession (nsISupportsArray * anArrayTransferables, nsIRegion * aRegion, PRUint32 aActionType);
//NS_IMETHOD InvokeDragSessionSingle (nsITransferable * aTransferable, nsIRegion * aRegion, PRUint32 aActionType);
//nsIDragSession
NS_IMETHOD GetData (nsITransferable * aTransferable, PRUint32 aItemIndex);

View File

@ -153,26 +153,6 @@ nsresult nsDragService::InvokeDragSession( nsISupportsArray *aTransArray,
return rc;
}
// Even though it says single, it may well be multiple 'cos of the files thing.
nsresult nsDragService::InvokeDragSessionSingle( nsITransferable *aTransferable,
nsIRegion *aRegion,
PRUint32 aActionType)
{
PDRAGITEM pDragItems = 0;
ULONG cDragItems = 0;
CreateDragItems( &cDragItems, &pDragItems, aTransferable);
nsresult rc = NS_ERROR_FAILURE;
if( cDragItems)
{
rc = InvokeDrag( pDragItems, cDragItems, aActionType);
delete [] pDragItems;
}
return rc;
}
nsresult nsDragService::GetData( nsITransferable *aTransferable,
PRUint32 aItemIndex)

View File

@ -44,8 +44,6 @@ class nsDragService : public nsBaseDragService
// nsIDragService
NS_IMETHOD InvokeDragSession( nsISupportsArray *anArrayTransferables,
nsIRegion *aRegion, PRUint32 aActionType);
NS_IMETHOD InvokeDragSessionSingle( nsITransferable *aTransferable,
nsIRegion *aRegion, PRUint32 aActionType);
// nsIDragSession
NS_IMETHOD GetData( nsITransferable *aTransferable, PRUint32 aItemIndex);

View File

@ -118,30 +118,14 @@ NS_IMETHODIMP nsDragService::InvokeDragSession (nsISupportsArray * anArrayTransf
NS_RELEASE(supports);
nsClipboard::CreateNativeDataObject(trans, &dataObj);
dataObjCollection->AddDataObject(dataObj);
NS_IF_RELEASE(dataObj);
}
StartInvokingDragSession((IDataObject *)dataObjCollection, aActionType);
NS_IF_RELEASE(dataObj);
return NS_OK;
}
//-------------------------------------------------------------------------
NS_IMETHODIMP nsDragService::InvokeDragSessionSingle (nsITransferable * aTransferable, nsIRegion * aRegion, PRUint32 aActionType)
{
// The clipboard class contains some static utility methods
// that we can use to create an IDataObject from the transferable
IDataObject * dataObj = nsnull;
nsClipboard::CreateNativeDataObject(aTransferable, &dataObj);
StartInvokingDragSession(dataObj, aActionType);
NS_IF_RELEASE(dataObj);
return NS_OK;
}
//-------------------------------------------------------------------------
NS_IMETHODIMP nsDragService::StartInvokingDragSession(IDataObject * aDataObj, PRUint32 aActionType)
{

View File

@ -42,7 +42,6 @@ public:
// nsIDragService
NS_IMETHOD InvokeDragSession (nsISupportsArray * anArrayTransferables, nsIRegion * aRegion, PRUint32 aActionType);
NS_IMETHOD InvokeDragSessionSingle (nsITransferable * aTransferable, nsIRegion * aRegion, PRUint32 aActionType);
NS_IMETHOD GetCurrentSession (nsIDragSession ** aSession);
// nsIDragSession

View File

@ -36,10 +36,7 @@ NS_IMPL_RELEASE(nsBaseDragService)
//
//-------------------------------------------------------------------------
nsBaseDragService::nsBaseDragService() :
mCanDrop(PR_FALSE),
mDoingDrag(PR_FALSE),
mTargetSize(0,0),
mDragAction(DRAGDROP_ACTION_NONE)
mCanDrop(PR_FALSE), mDoingDrag(PR_FALSE), mTargetSize(0,0), mDragAction(DRAGDROP_ACTION_NONE)
{
NS_INIT_REFCNT();
nsresult result = NS_NewISupportsArray(getter_AddRefs(mTransArray));
@ -161,11 +158,6 @@ NS_IMETHODIMP nsBaseDragService::InvokeDragSession (nsISupportsArray * anArrayTr
return NS_ERROR_FAILURE;
}
//-------------------------------------------------------------------------
NS_IMETHODIMP nsBaseDragService::InvokeDragSessionSingle (nsITransferable * aTransferable, nsIRegion * aRegion, PRUint32 aActionType)
{
return NS_ERROR_FAILURE;
}
//-------------------------------------------------------------------------
NS_IMETHODIMP nsBaseDragService::GetCurrentSession (nsIDragSession ** aSession)

View File

@ -42,7 +42,6 @@ public:
//nsIDragService
NS_IMETHOD InvokeDragSession (nsISupportsArray * anArrayTransferables, nsIRegion * aRegion, PRUint32 aActionType);
NS_IMETHOD InvokeDragSessionSingle (nsITransferable * aTransferable, nsIRegion * aRegion, PRUint32 aActionType);
NS_IMETHOD GetCurrentSession (nsIDragSession ** aSession);
NS_IMETHOD StartDragSession ();
NS_IMETHOD EndDragSession ();

View File

@ -824,6 +824,7 @@ case _value: eventName = _name ; break
_ASSIGN_eventName(NS_CONTROL_CHANGE,"NS_CONTROL_CHANGE");
_ASSIGN_eventName(NS_CREATE,"NS_CREATE");
_ASSIGN_eventName(NS_DESTROY,"NS_DESTROY");
_ASSIGN_eventName(NS_DRAGDROP_GESTURE,"NS_DRAGDROP_GESTURE");
_ASSIGN_eventName(NS_DRAGDROP_DROP,"NS_DRAGDROP_DROP");
_ASSIGN_eventName(NS_DRAGDROP_ENTER,"NS_DRAGDROP_ENTER");
_ASSIGN_eventName(NS_DRAGDROP_EXIT,"NS_DRAGDROP_EXIT");