Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes
nsNativeDragSource Class Reference

#include <nsNativeDragSource.h>

List of all members.

Public Member Functions

 nsNativeDragSource ()
 ~nsNativeDragSource ()
STDMETHODIMP QueryInterface (REFIID, void **)
 STDMETHODIMP_ (ULONG) AddRef()
 STDMETHODIMP_ (ULONG) Release()
STDMETHODIMP GiveFeedback (DWORD dEffect)
STDMETHODIMP QueryContinueDrag (BOOL fESC, DWORD grfKeyState)

Protected Attributes

ULONG m_cRef

Detailed Description

Definition at line 49 of file nsNativeDragSource.h.


Constructor & Destructor Documentation

Definition at line 46 of file nsNativeDragSource.cpp.

  : m_cRef(0)
{
}

Definition at line 51 of file nsNativeDragSource.cpp.

{
}

Member Function Documentation

STDMETHODIMP nsNativeDragSource::GiveFeedback ( DWORD  dEffect)

Definition at line 119 of file nsNativeDragSource.cpp.

{
#ifdef DEBUG
  //printf("GiveFeedback\n");
#endif
       return ResultFromScode(DRAGDROP_S_USEDEFAULTCURSORS);
}
STDMETHODIMP nsNativeDragSource::QueryContinueDrag ( BOOL  fESC,
DWORD  grfKeyState 
)

Definition at line 93 of file nsNativeDragSource.cpp.

{
#ifdef DEBUG
  //printf("QueryContinueDrag: ");
#endif
  if (fEsc) {
#ifdef DEBUG
    //printf("fEsc\n");
#endif
    return ResultFromScode(DRAGDROP_S_CANCEL);
  }

  if (!(grfKeyState & MK_LBUTTON) || (grfKeyState & MK_RBUTTON)) {
#ifdef DEBUG
    //printf("grfKeyState & MK_LBUTTON\n");
#endif
    return ResultFromScode(DRAGDROP_S_DROP);
  }

#ifdef DEBUG
  //printf("NOERROR\n");
#endif
       return NOERROR;
}
STDMETHODIMP nsNativeDragSource::QueryInterface ( REFIID  riid,
void **  ppv 
)

Definition at line 56 of file nsNativeDragSource.cpp.

{
  *ppv=NULL;

  if (IID_IUnknown==riid || IID_IDropSource==riid)
    *ppv=this;

  if (NULL!=*ppv) {
    ((LPUNKNOWN)*ppv)->AddRef();
    return NOERROR;
  }

  return ResultFromScode(E_NOINTERFACE);
}

Member Data Documentation

Definition at line 78 of file nsNativeDragSource.h.


The documentation for this class was generated from the following files: