Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
nsDragService.cpp File Reference
#include <Gestalt.h>
#include "nsDragService.h"
#include "nsITransferable.h"
#include "nsString.h"
#include "nsMimeMapper.h"
#include "nsClipboard.h"
#include "nsIRegion.h"
#include "nsXPCOM.h"
#include "nsISupportsPrimitives.h"
#include "nsCOMPtr.h"
#include "nsCRT.h"
#include "nsPrimitiveHelpers.h"
#include "nsLinebreakConverter.h"
#include "nsIMacUtils.h"
#include "nsIContent.h"
#include "nsIDOMNode.h"
#include "nsIDocument.h"
#include "nsIPresShell.h"
#include "nsPresContext.h"
#include "nsIFrame.h"
#include "nsIView.h"
#include "nsRect.h"
#include "nsPoint.h"
#include "nsIWidget.h"
#include "nsCarbonHelpers.h"
#include "nsGfxUtils.h"
#include "nsNetUtil.h"
#include "nsILocalFileMac.h"
#include "nsIDOMElement.h"
#include "nsIImageMac.h"
#include "nsIImage.h"
#include "nsMacNativeUnicodeConverter.h"
#include "nsICharsetConverterManager.h"
#include "nsStylClipboardUtils.h"

Go to the source code of this file.

Functions

 NS_IMPL_QUERY_INTERFACE4 (nsDragService, nsIDragService, nsIDragService_1_8_BRANCH, nsIDragSession, nsIDragSessionMac) nsDragService
static OSErr GetDropDirectory (DragReference dragRef, FSSpecPtr fssOut)

Variables

static const PRUint32 kPrivateFlavorMask = 0xffff0000
static const PRUint32 kPrivateFlavorTag = 'MZ..' & kPrivateFlavorMask

Function Documentation

static OSErr GetDropDirectory ( DragReference  dragRef,
FSSpecPtr  fssOut 
) [static]

Definition at line 1181 of file nsDragService.cpp.

{
  OSErr err;

  AEDesc dropLocAlias = { typeNull, nil };
  err = ::GetDropLocation(dragRef, &dropLocAlias);
  if (err != noErr) return err;
  
  if (dropLocAlias.descriptorType != typeAlias)
    return paramErr;

  AEDesc dropLocFSS = { typeNull, nil };
  if ((err = ::AECoerceDesc(&dropLocAlias, typeFSS, &dropLocFSS)) == noErr)
  {
    err = ::AEGetDescData(&dropLocFSS, fssOut, sizeof(FSSpec));
    (void)::AEDisposeDesc(&dropLocFSS);
  }

  if (dropLocAlias.dataHandle)
    (void)::AEDisposeDesc(&dropLocAlias);

  return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 95 of file nsDragService.cpp.

  : mDragSendDataUPP(nsnull)
  , mDragRef(0)
  , mDataItems(nsnull)
  , mImageDraggingSupported(PR_FALSE)
{
#if USE_TRANSLUCENT_DRAGS
  // check if the Drag Manager supports image dragging
  // however, it doesn't really work too well, so let's back off (pinkerton)
  long response;
  OSErr err = Gestalt(gestaltDragMgrAttr, &response); 
  if (err == noErr && (response & (1L << gestaltDragMgrHasImageSupport))) {
    mImageDraggingSupported = PR_TRUE;
  }
#endif
  
  mDragSendDataUPP = NewDragSendDataUPP(DragSendDataProc);
}

Variable Documentation

const PRUint32 kPrivateFlavorMask = 0xffff0000 [static]

Definition at line 88 of file nsDragService.cpp.

Definition at line 89 of file nsDragService.cpp.