Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
nsDragService.cpp File Reference
#include <stdio.h>
#include "nsDragService.h"
#include "nsIDocument.h"
#include "nsIRegion.h"
#include "nsITransferable.h"
#include "nsIServiceManager.h"
#include "nsISupportsPrimitives.h"
#include "nsVoidArray.h"
#include "nsXPIDLString.h"
#include "nsPrimitiveHelpers.h"
#include "nsUnitConversion.h"
#include "nsWidgetsCID.h"
#include "nsCRT.h"
#include <AppDefs.h>
#include <TypeConstants.h>
#include <DataIO.h>
#include <Mime.h>
#include <Rect.h>
#include <Region.h>
#include <String.h>
#include <View.h>
#include "prlog.h"
#include "nsIPresShell.h"
#include "nsPresContext.h"
#include "nsIFrame.h"
#include "nsIView.h"
#include "nsIWidget.h"

Go to the source code of this file.

Functions

static NS_DEFINE_CID (kCDragServiceCID, NS_DRAGSERVICE_CID)
static nsIFrameGetPrimaryFrameFor (nsIDOMNode *aDOMNode)
static bool IsInternalDrag (BMessage *aMsg)
 NS_IMPL_THREADSAFE_ISUPPORTS4 (nsDragService, nsIDragService, nsIDragService_1_8_BRANCH, nsIDragSession, nsIDragSessionBeOS) nsDragService

Variables

static PRLogModuleInfosDragLm = NULL

Function Documentation

static nsIFrame* GetPrimaryFrameFor ( nsIDOMNode aDOMNode) [static]

Definition at line 85 of file nsDragService.cpp.

{
    nsCOMPtr<nsIContent> aContent = do_QueryInterface(aDOMNode);
    if (nsnull == aContent)
        return nsnull;

    nsIDocument* doc = aContent->GetCurrentDoc();
    if (nsnull == doc)
        return nsnull;
    nsIPresShell* presShell = doc->GetShellAt(0);
    if ( nsnull == presShell) 
        return nsnull;
    nsIFrame *frame;
    presShell->GetPrimaryFrameFor(aContent, &frame);
       return frame;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static bool IsInternalDrag ( BMessage *  aMsg) [static]

Definition at line 103 of file nsDragService.cpp.

{
    BString orig;
    // We started this drag if originater is 'BeZilla'
    return (nsnull != aMsg && B_OK == aMsg->FindString("be:originator", &orig) &&
           0 == orig.Compare("BeZilla"));
}

Here is the caller graph for this function:

static NS_DEFINE_CID ( kCDragServiceCID  ,
NS_DRAGSERVICE_CID   
) [static]

Definition at line 111 of file nsDragService.cpp.

{
    // set up our logging module
    if (!sDragLm)
        sDragLm = PR_NewLogModule("nsDragService");
    PR_LOG(sDragLm, PR_LOG_DEBUG, ("\n\nnsDragService::nsDragService"));

    mDragMessage = NULL;
    mCanDrop = PR_FALSE;
}

Variable Documentation

Definition at line 82 of file nsDragService.cpp.