Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/widget/nsIDragSession.idl
*/
#ifndef __gen_nsIDragSession_h__
#define __gen_nsIDragSession_h__
#include "nsISupports.h"
#include "nsITransferable.h"
#include "mozilla/AlreadyAddRefed.h"
#include "mozilla/Assertions.h"
#include "mozilla/DebugOnly.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
#include "mozilla/EventForwards.h"
#include "nsIWidget.h"
#include "nsSize.h"
#include "Units.h"
class nsIFrame;
class nsIWidget;
namespace mozilla {
namespace dom {
class BrowserParent;
} // namespace dom
} // namespace mozilla
class nsIContentSecurityPolicy; /* forward declaration */
namespace mozilla {
namespace dom {
class DataTransfer; /* webidl DataTransfer */
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
class DragEvent; /* webidl DragEvent */
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
class Element; /* webidl Element */
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
class WindowContext; /* webidl WindowContext */
} // namespace dom
} // namespace mozilla
class nsINode; /* webidl Node */
namespace mozilla {
namespace dom {
class Selection; /* webidl Selection */
} // namespace dom
} // namespace mozilla
/* starting interface: nsIDragSession */
#define NS_IDRAGSESSION_IID_STR "25bce737-73f0-43c7-bc20-c71044a73c5a"
#define NS_IDRAGSESSION_IID \
{0x25bce737, 0x73f0, 0x43c7, \
{ 0xbc, 0x20, 0xc7, 0x10, 0x44, 0xa7, 0x3c, 0x5a }}
class NS_NO_VTABLE nsIDragSession : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDRAGSESSION_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIDragSession;
/* attribute boolean canDrop; */
NS_IMETHOD GetCanDrop(bool *aCanDrop) = 0;
NS_IMETHOD SetCanDrop(bool aCanDrop) = 0;
/* attribute boolean onlyChromeDrop; */
NS_IMETHOD GetOnlyChromeDrop(bool *aOnlyChromeDrop) = 0;
NS_IMETHOD SetOnlyChromeDrop(bool aOnlyChromeDrop) = 0;
/* attribute unsigned long dragAction; */
NS_IMETHOD GetDragAction(uint32_t *aDragAction) = 0;
NS_IMETHOD SetDragAction(uint32_t aDragAction) = 0;
/* readonly attribute unsigned long numDropItems; */
NS_IMETHOD GetNumDropItems(uint32_t *aNumDropItems) = 0;
/* [infallible] attribute WindowContext sourceWindowContext; */
NS_IMETHOD GetSourceWindowContext(mozilla::dom::WindowContext **aSourceWindowContext) = 0;
inline already_AddRefed<mozilla::dom::WindowContext> GetSourceWindowContext()
{
mozilla::dom::WindowContext* result = nullptr;
mozilla::DebugOnly<nsresult> rv = GetSourceWindowContext(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return already_AddRefed<mozilla::dom::WindowContext>(result);
}
NS_IMETHOD SetSourceWindowContext(mozilla::dom::WindowContext *aSourceWindowContext) = 0;
/* [infallible] attribute WindowContext sourceTopWindowContext; */
NS_IMETHOD GetSourceTopWindowContext(mozilla::dom::WindowContext **aSourceTopWindowContext) = 0;
inline already_AddRefed<mozilla::dom::WindowContext> GetSourceTopWindowContext()
{
mozilla::dom::WindowContext* result = nullptr;
mozilla::DebugOnly<nsresult> rv = GetSourceTopWindowContext(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return already_AddRefed<mozilla::dom::WindowContext>(result);
}
NS_IMETHOD SetSourceTopWindowContext(mozilla::dom::WindowContext *aSourceTopWindowContext) = 0;
/* readonly attribute Node sourceNode; */
NS_IMETHOD GetSourceNode(nsINode **aSourceNode) = 0;
/* [nostdcall,notxpcom] void updateSource (in Node aNewSourceNode, in Selection aNewSelection); */
virtual void UpdateSource(nsINode *aNewSourceNode, mozilla::dom::Selection *aNewSelection) = 0;
/* attribute nsIPrincipal triggeringPrincipal; */
NS_IMETHOD GetTriggeringPrincipal(nsIPrincipal **aTriggeringPrincipal) = 0;
NS_IMETHOD SetTriggeringPrincipal(nsIPrincipal *aTriggeringPrincipal) = 0;
/* attribute nsIContentSecurityPolicy csp; */
NS_IMETHOD GetCsp(nsIContentSecurityPolicy **aCsp) = 0;
NS_IMETHOD SetCsp(nsIContentSecurityPolicy *aCsp) = 0;
/* [binaryname(DataTransferXPCOM)] attribute DataTransfer dataTransfer; */
NS_IMETHOD GetDataTransferXPCOM(mozilla::dom::DataTransfer **aDataTransfer) = 0;
NS_IMETHOD SetDataTransferXPCOM(mozilla::dom::DataTransfer *aDataTransfer) = 0;
/* [nostdcall,notxpcom] DataTransfer getDataTransfer (); */
virtual mozilla::dom::DataTransfer * GetDataTransfer(void) = 0;
/* [nostdcall,notxpcom] void setDataTransfer (in DataTransfer aDataTransfer); */
virtual void SetDataTransfer(mozilla::dom::DataTransfer *aDataTransfer) = 0;
/* void getData (in nsITransferable aTransferable, in unsigned long aItemIndex); */
NS_IMETHOD GetData(nsITransferable *aTransferable, uint32_t aItemIndex) = 0;
/* boolean isDataFlavorSupported (in string aDataFlavor); */
NS_IMETHOD IsDataFlavorSupported(const char * aDataFlavor, bool *_retval) = 0;
/* void userCancelled (); */
NS_IMETHOD UserCancelled(void) = 0;
/* void dragEventDispatchedToChildProcess (); */
NS_IMETHOD DragEventDispatchedToChildProcess(void) = 0;
/* void updateDragEffect (); */
NS_IMETHOD UpdateDragEffect(void) = 0;
/* void updateDragImage (in Node aImage, in long aImageX, in long aImageY); */
NS_IMETHOD UpdateDragImage(nsINode *aImage, int32_t aImageX, int32_t aImageY) = 0;
/* [noscript] void InitForTests (in uint32_t aAllowedEffect); */
NS_IMETHOD InitForTests(uint32_t aAllowedEffect) = 0;
/* [nostdcall,notxpcom] unsigned long getEffectAllowedForTests (); */
virtual uint32_t GetEffectAllowedForTests(void) = 0;
/* [nostdcall,notxpcom] boolean isSynthesizedForTests (); */
virtual bool IsSynthesizedForTests(void) = 0;
/* void setDragEndPoint (in long aScreenX, in long aScreenY); */
NS_IMETHOD SetDragEndPoint(int32_t aScreenX, int32_t aScreenY) = 0;
/* void setDragEndPointForTests (in long aScreenX, in long aScreenY); */
NS_IMETHOD SetDragEndPointForTests(int32_t aScreenX, int32_t aScreenY) = 0;
/* [nostdcall,notxpcom] boolean isDraggingTextInTextControl (); */
virtual bool IsDraggingTextInTextControl(void) = 0;
/* [noscript] void maybeEditorDeletedSourceNode (in Element aEditingHost); */
NS_IMETHOD MaybeEditorDeletedSourceNode(mozilla::dom::Element *aEditingHost) = 0;
/* [noscript] void dragMoved (in long aX, in long aY); */
NS_IMETHOD DragMoved(int32_t aX, int32_t aY) = 0;
/* [can_run_script,noscript] void fireDragEventAtSource (in EventMessage aEventMessage, in unsigned long aKeyModifiers); */
MOZ_CAN_RUN_SCRIPT NS_IMETHOD FireDragEventAtSource(mozilla::EventMessage aEventMessage, uint32_t aKeyModifiers) = 0;
/* [nostdcall,notxpcom] boolean maybeAddBrowser (in BrowserParentPtr aBP); */
virtual bool MaybeAddBrowser(mozilla::dom::BrowserParent * aBP) = 0;
/* [nostdcall,notxpcom] boolean removeAllBrowsers (); */
virtual bool RemoveAllBrowsers(void) = 0;
/* [can_run_script] void endDragSession (in boolean aDoneDrag, [optional] in unsigned long aKeyModifiers); */
MOZ_CAN_RUN_SCRIPT NS_IMETHOD EndDragSession(bool aDoneDrag, uint32_t aKeyModifiers) = 0;
/* void sendStoreDropTargetAndDelayEndDragSession (in DragEvent aEvent); */
NS_IMETHOD SendStoreDropTargetAndDelayEndDragSession(mozilla::dom::DragEvent *aEvent) = 0;
/* void sendDispatchToDropTargetAndResumeEndDragSession (in boolean aShouldDrop); */
NS_IMETHOD SendDispatchToDropTargetAndResumeEndDragSession(bool aShouldDrop) = 0;
/* [noscript] void storeDropTargetAndDelayEndDragSession (in Element aElement, in nsIFramePtr aDocFrame); */
NS_IMETHOD StoreDropTargetAndDelayEndDragSession(mozilla::dom::Element *aElement, nsIFrame * aDocFrame) = 0;
/* [can_run_script,noscript] void dispatchToDropTargetAndResumeEndDragSession (in nsIWidgetPtr aWidget, [const] in LayoutDeviceIntPoint aPt, in boolean aShouldDrop); */
MOZ_CAN_RUN_SCRIPT NS_IMETHOD DispatchToDropTargetAndResumeEndDragSession(nsIWidget * aWidget, const mozilla::LayoutDeviceIntPoint & aPt, bool aShouldDrop) = 0;
/* [nostdcall,notxpcom] boolean mustUpdateDataTransfer (in EventMessage aMessage); */
virtual bool MustUpdateDataTransfer(mozilla::EventMessage aMessage) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDragSession, NS_IDRAGSESSION_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDRAGSESSION \
NS_IMETHOD GetCanDrop(bool *aCanDrop) override; \
NS_IMETHOD SetCanDrop(bool aCanDrop) override; \
NS_IMETHOD GetOnlyChromeDrop(bool *aOnlyChromeDrop) override; \
NS_IMETHOD SetOnlyChromeDrop(bool aOnlyChromeDrop) override; \
NS_IMETHOD GetDragAction(uint32_t *aDragAction) override; \
NS_IMETHOD SetDragAction(uint32_t aDragAction) override; \
NS_IMETHOD GetNumDropItems(uint32_t *aNumDropItems) override; \
using nsIDragSession::GetSourceWindowContext; \
NS_IMETHOD GetSourceWindowContext(mozilla::dom::WindowContext **aSourceWindowContext) override; \
NS_IMETHOD SetSourceWindowContext(mozilla::dom::WindowContext *aSourceWindowContext) override; \
using nsIDragSession::GetSourceTopWindowContext; \
NS_IMETHOD GetSourceTopWindowContext(mozilla::dom::WindowContext **aSourceTopWindowContext) override; \
NS_IMETHOD SetSourceTopWindowContext(mozilla::dom::WindowContext *aSourceTopWindowContext) override; \
NS_IMETHOD GetSourceNode(nsINode **aSourceNode) override; \
virtual void UpdateSource(nsINode *aNewSourceNode, mozilla::dom::Selection *aNewSelection) override; \
NS_IMETHOD GetTriggeringPrincipal(nsIPrincipal **aTriggeringPrincipal) override; \
NS_IMETHOD SetTriggeringPrincipal(nsIPrincipal *aTriggeringPrincipal) override; \
NS_IMETHOD GetCsp(nsIContentSecurityPolicy **aCsp) override; \
NS_IMETHOD SetCsp(nsIContentSecurityPolicy *aCsp) override; \
NS_IMETHOD GetDataTransferXPCOM(mozilla::dom::DataTransfer **aDataTransfer) override; \
NS_IMETHOD SetDataTransferXPCOM(mozilla::dom::DataTransfer *aDataTransfer) override; \
virtual mozilla::dom::DataTransfer * GetDataTransfer(void) override; \
virtual void SetDataTransfer(mozilla::dom::DataTransfer *aDataTransfer) override; \
NS_IMETHOD GetData(nsITransferable *aTransferable, uint32_t aItemIndex) override; \
NS_IMETHOD IsDataFlavorSupported(const char * aDataFlavor, bool *_retval) override; \
NS_IMETHOD UserCancelled(void) override; \
NS_IMETHOD DragEventDispatchedToChildProcess(void) override; \
NS_IMETHOD UpdateDragEffect(void) override; \
NS_IMETHOD UpdateDragImage(nsINode *aImage, int32_t aImageX, int32_t aImageY) override; \
NS_IMETHOD InitForTests(uint32_t aAllowedEffect) override; \
virtual uint32_t GetEffectAllowedForTests(void) override; \
virtual bool IsSynthesizedForTests(void) override; \
NS_IMETHOD SetDragEndPoint(int32_t aScreenX, int32_t aScreenY) override; \
NS_IMETHOD SetDragEndPointForTests(int32_t aScreenX, int32_t aScreenY) override; \
virtual bool IsDraggingTextInTextControl(void) override; \
NS_IMETHOD MaybeEditorDeletedSourceNode(mozilla::dom::Element *aEditingHost) override; \
NS_IMETHOD DragMoved(int32_t aX, int32_t aY) override; \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD FireDragEventAtSource(mozilla::EventMessage aEventMessage, uint32_t aKeyModifiers) override; \
virtual bool MaybeAddBrowser(mozilla::dom::BrowserParent * aBP) override; \
virtual bool RemoveAllBrowsers(void) override; \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD EndDragSession(bool aDoneDrag, uint32_t aKeyModifiers) override; \
NS_IMETHOD SendStoreDropTargetAndDelayEndDragSession(mozilla::dom::DragEvent *aEvent) override; \
NS_IMETHOD SendDispatchToDropTargetAndResumeEndDragSession(bool aShouldDrop) override; \
NS_IMETHOD StoreDropTargetAndDelayEndDragSession(mozilla::dom::Element *aElement, nsIFrame * aDocFrame) override; \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD DispatchToDropTargetAndResumeEndDragSession(nsIWidget * aWidget, const mozilla::LayoutDeviceIntPoint & aPt, bool aShouldDrop) override; \
virtual bool MustUpdateDataTransfer(mozilla::EventMessage aMessage) override;
/* Use this macro when declaring the members of this interface when the
class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIDRAGSESSION \
nsresult GetCanDrop(bool *aCanDrop); \
nsresult SetCanDrop(bool aCanDrop); \
nsresult GetOnlyChromeDrop(bool *aOnlyChromeDrop); \
nsresult SetOnlyChromeDrop(bool aOnlyChromeDrop); \
nsresult GetDragAction(uint32_t *aDragAction); \
nsresult SetDragAction(uint32_t aDragAction); \
nsresult GetNumDropItems(uint32_t *aNumDropItems); \
using nsIDragSession::GetSourceWindowContext; \
nsresult GetSourceWindowContext(mozilla::dom::WindowContext **aSourceWindowContext); \
nsresult SetSourceWindowContext(mozilla::dom::WindowContext *aSourceWindowContext); \
using nsIDragSession::GetSourceTopWindowContext; \
nsresult GetSourceTopWindowContext(mozilla::dom::WindowContext **aSourceTopWindowContext); \
nsresult SetSourceTopWindowContext(mozilla::dom::WindowContext *aSourceTopWindowContext); \
nsresult GetSourceNode(nsINode **aSourceNode); \
void UpdateSource(nsINode *aNewSourceNode, mozilla::dom::Selection *aNewSelection); \
nsresult GetTriggeringPrincipal(nsIPrincipal **aTriggeringPrincipal); \
nsresult SetTriggeringPrincipal(nsIPrincipal *aTriggeringPrincipal); \
nsresult GetCsp(nsIContentSecurityPolicy **aCsp); \
nsresult SetCsp(nsIContentSecurityPolicy *aCsp); \
nsresult GetDataTransferXPCOM(mozilla::dom::DataTransfer **aDataTransfer); \
nsresult SetDataTransferXPCOM(mozilla::dom::DataTransfer *aDataTransfer); \
mozilla::dom::DataTransfer * GetDataTransfer(void); \
void SetDataTransfer(mozilla::dom::DataTransfer *aDataTransfer); \
nsresult GetData(nsITransferable *aTransferable, uint32_t aItemIndex); \
nsresult IsDataFlavorSupported(const char * aDataFlavor, bool *_retval); \
nsresult UserCancelled(void); \
nsresult DragEventDispatchedToChildProcess(void); \
nsresult UpdateDragEffect(void); \
nsresult UpdateDragImage(nsINode *aImage, int32_t aImageX, int32_t aImageY); \
nsresult InitForTests(uint32_t aAllowedEffect); \
uint32_t GetEffectAllowedForTests(void); \
bool IsSynthesizedForTests(void); \
nsresult SetDragEndPoint(int32_t aScreenX, int32_t aScreenY); \
nsresult SetDragEndPointForTests(int32_t aScreenX, int32_t aScreenY); \
bool IsDraggingTextInTextControl(void); \
nsresult MaybeEditorDeletedSourceNode(mozilla::dom::Element *aEditingHost); \
nsresult DragMoved(int32_t aX, int32_t aY); \
MOZ_CAN_RUN_SCRIPT nsresult FireDragEventAtSource(mozilla::EventMessage aEventMessage, uint32_t aKeyModifiers); \
bool MaybeAddBrowser(mozilla::dom::BrowserParent * aBP); \
bool RemoveAllBrowsers(void); \
MOZ_CAN_RUN_SCRIPT nsresult EndDragSession(bool aDoneDrag, uint32_t aKeyModifiers); \
nsresult SendStoreDropTargetAndDelayEndDragSession(mozilla::dom::DragEvent *aEvent); \
nsresult SendDispatchToDropTargetAndResumeEndDragSession(bool aShouldDrop); \
nsresult StoreDropTargetAndDelayEndDragSession(mozilla::dom::Element *aElement, nsIFrame * aDocFrame); \
MOZ_CAN_RUN_SCRIPT nsresult DispatchToDropTargetAndResumeEndDragSession(nsIWidget * aWidget, const mozilla::LayoutDeviceIntPoint & aPt, bool aShouldDrop); \
bool MustUpdateDataTransfer(mozilla::EventMessage aMessage);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDRAGSESSION(_to) \
NS_IMETHOD GetCanDrop(bool *aCanDrop) override { return _to GetCanDrop(aCanDrop); } \
NS_IMETHOD SetCanDrop(bool aCanDrop) override { return _to SetCanDrop(aCanDrop); } \
NS_IMETHOD GetOnlyChromeDrop(bool *aOnlyChromeDrop) override { return _to GetOnlyChromeDrop(aOnlyChromeDrop); } \
NS_IMETHOD SetOnlyChromeDrop(bool aOnlyChromeDrop) override { return _to SetOnlyChromeDrop(aOnlyChromeDrop); } \
NS_IMETHOD GetDragAction(uint32_t *aDragAction) override { return _to GetDragAction(aDragAction); } \
NS_IMETHOD SetDragAction(uint32_t aDragAction) override { return _to SetDragAction(aDragAction); } \
NS_IMETHOD GetNumDropItems(uint32_t *aNumDropItems) override { return _to GetNumDropItems(aNumDropItems); } \
using nsIDragSession::GetSourceWindowContext; \
NS_IMETHOD GetSourceWindowContext(mozilla::dom::WindowContext **aSourceWindowContext) override { return _to GetSourceWindowContext(aSourceWindowContext); } \
NS_IMETHOD SetSourceWindowContext(mozilla::dom::WindowContext *aSourceWindowContext) override { return _to SetSourceWindowContext(aSourceWindowContext); } \
using nsIDragSession::GetSourceTopWindowContext; \
NS_IMETHOD GetSourceTopWindowContext(mozilla::dom::WindowContext **aSourceTopWindowContext) override { return _to GetSourceTopWindowContext(aSourceTopWindowContext); } \
NS_IMETHOD SetSourceTopWindowContext(mozilla::dom::WindowContext *aSourceTopWindowContext) override { return _to SetSourceTopWindowContext(aSourceTopWindowContext); } \
NS_IMETHOD GetSourceNode(nsINode **aSourceNode) override { return _to GetSourceNode(aSourceNode); } \
virtual void UpdateSource(nsINode *aNewSourceNode, mozilla::dom::Selection *aNewSelection) override { return _to UpdateSource(aNewSourceNode, aNewSelection); } \
NS_IMETHOD GetTriggeringPrincipal(nsIPrincipal **aTriggeringPrincipal) override { return _to GetTriggeringPrincipal(aTriggeringPrincipal); } \
NS_IMETHOD SetTriggeringPrincipal(nsIPrincipal *aTriggeringPrincipal) override { return _to SetTriggeringPrincipal(aTriggeringPrincipal); } \
NS_IMETHOD GetCsp(nsIContentSecurityPolicy **aCsp) override { return _to GetCsp(aCsp); } \
NS_IMETHOD SetCsp(nsIContentSecurityPolicy *aCsp) override { return _to SetCsp(aCsp); } \
NS_IMETHOD GetDataTransferXPCOM(mozilla::dom::DataTransfer **aDataTransfer) override { return _to GetDataTransferXPCOM(aDataTransfer); } \
NS_IMETHOD SetDataTransferXPCOM(mozilla::dom::DataTransfer *aDataTransfer) override { return _to SetDataTransferXPCOM(aDataTransfer); } \
virtual mozilla::dom::DataTransfer * GetDataTransfer(void) override { return _to GetDataTransfer(); } \
virtual void SetDataTransfer(mozilla::dom::DataTransfer *aDataTransfer) override { return _to SetDataTransfer(aDataTransfer); } \
NS_IMETHOD GetData(nsITransferable *aTransferable, uint32_t aItemIndex) override { return _to GetData(aTransferable, aItemIndex); } \
NS_IMETHOD IsDataFlavorSupported(const char * aDataFlavor, bool *_retval) override { return _to IsDataFlavorSupported(aDataFlavor, _retval); } \
NS_IMETHOD UserCancelled(void) override { return _to UserCancelled(); } \
NS_IMETHOD DragEventDispatchedToChildProcess(void) override { return _to DragEventDispatchedToChildProcess(); } \
NS_IMETHOD UpdateDragEffect(void) override { return _to UpdateDragEffect(); } \
NS_IMETHOD UpdateDragImage(nsINode *aImage, int32_t aImageX, int32_t aImageY) override { return _to UpdateDragImage(aImage, aImageX, aImageY); } \
NS_IMETHOD InitForTests(uint32_t aAllowedEffect) override { return _to InitForTests(aAllowedEffect); } \
virtual uint32_t GetEffectAllowedForTests(void) override { return _to GetEffectAllowedForTests(); } \
virtual bool IsSynthesizedForTests(void) override { return _to IsSynthesizedForTests(); } \
NS_IMETHOD SetDragEndPoint(int32_t aScreenX, int32_t aScreenY) override { return _to SetDragEndPoint(aScreenX, aScreenY); } \
NS_IMETHOD SetDragEndPointForTests(int32_t aScreenX, int32_t aScreenY) override { return _to SetDragEndPointForTests(aScreenX, aScreenY); } \
virtual bool IsDraggingTextInTextControl(void) override { return _to IsDraggingTextInTextControl(); } \
NS_IMETHOD MaybeEditorDeletedSourceNode(mozilla::dom::Element *aEditingHost) override { return _to MaybeEditorDeletedSourceNode(aEditingHost); } \
NS_IMETHOD DragMoved(int32_t aX, int32_t aY) override { return _to DragMoved(aX, aY); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD FireDragEventAtSource(mozilla::EventMessage aEventMessage, uint32_t aKeyModifiers) override { return _to FireDragEventAtSource(aEventMessage, aKeyModifiers); } \
virtual bool MaybeAddBrowser(mozilla::dom::BrowserParent * aBP) override { return _to MaybeAddBrowser(aBP); } \
virtual bool RemoveAllBrowsers(void) override { return _to RemoveAllBrowsers(); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD EndDragSession(bool aDoneDrag, uint32_t aKeyModifiers) override { return _to EndDragSession(aDoneDrag, aKeyModifiers); } \
NS_IMETHOD SendStoreDropTargetAndDelayEndDragSession(mozilla::dom::DragEvent *aEvent) override { return _to SendStoreDropTargetAndDelayEndDragSession(aEvent); } \
NS_IMETHOD SendDispatchToDropTargetAndResumeEndDragSession(bool aShouldDrop) override { return _to SendDispatchToDropTargetAndResumeEndDragSession(aShouldDrop); } \
NS_IMETHOD StoreDropTargetAndDelayEndDragSession(mozilla::dom::Element *aElement, nsIFrame * aDocFrame) override { return _to StoreDropTargetAndDelayEndDragSession(aElement, aDocFrame); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD DispatchToDropTargetAndResumeEndDragSession(nsIWidget * aWidget, const mozilla::LayoutDeviceIntPoint & aPt, bool aShouldDrop) override { return _to DispatchToDropTargetAndResumeEndDragSession(aWidget, aPt, aShouldDrop); } \
virtual bool MustUpdateDataTransfer(mozilla::EventMessage aMessage) override { return _to MustUpdateDataTransfer(aMessage); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDRAGSESSION(_to) \
NS_IMETHOD GetCanDrop(bool *aCanDrop) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCanDrop(aCanDrop); } \
NS_IMETHOD SetCanDrop(bool aCanDrop) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCanDrop(aCanDrop); } \
NS_IMETHOD GetOnlyChromeDrop(bool *aOnlyChromeDrop) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnlyChromeDrop(aOnlyChromeDrop); } \
NS_IMETHOD SetOnlyChromeDrop(bool aOnlyChromeDrop) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnlyChromeDrop(aOnlyChromeDrop); } \
NS_IMETHOD GetDragAction(uint32_t *aDragAction) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDragAction(aDragAction); } \
NS_IMETHOD SetDragAction(uint32_t aDragAction) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDragAction(aDragAction); } \
NS_IMETHOD GetNumDropItems(uint32_t *aNumDropItems) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNumDropItems(aNumDropItems); } \
NS_IMETHOD GetSourceWindowContext(mozilla::dom::WindowContext **aSourceWindowContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSourceWindowContext(aSourceWindowContext); } \
NS_IMETHOD SetSourceWindowContext(mozilla::dom::WindowContext *aSourceWindowContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSourceWindowContext(aSourceWindowContext); } \
NS_IMETHOD GetSourceTopWindowContext(mozilla::dom::WindowContext **aSourceTopWindowContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSourceTopWindowContext(aSourceTopWindowContext); } \
NS_IMETHOD SetSourceTopWindowContext(mozilla::dom::WindowContext *aSourceTopWindowContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSourceTopWindowContext(aSourceTopWindowContext); } \
NS_IMETHOD GetSourceNode(nsINode **aSourceNode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSourceNode(aSourceNode); } \
virtual void UpdateSource(nsINode *aNewSourceNode, mozilla::dom::Selection *aNewSelection) override; \
NS_IMETHOD GetTriggeringPrincipal(nsIPrincipal **aTriggeringPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTriggeringPrincipal(aTriggeringPrincipal); } \
NS_IMETHOD SetTriggeringPrincipal(nsIPrincipal *aTriggeringPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTriggeringPrincipal(aTriggeringPrincipal); } \
NS_IMETHOD GetCsp(nsIContentSecurityPolicy **aCsp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCsp(aCsp); } \
NS_IMETHOD SetCsp(nsIContentSecurityPolicy *aCsp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCsp(aCsp); } \
NS_IMETHOD GetDataTransferXPCOM(mozilla::dom::DataTransfer **aDataTransfer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDataTransferXPCOM(aDataTransfer); } \
NS_IMETHOD SetDataTransferXPCOM(mozilla::dom::DataTransfer *aDataTransfer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDataTransferXPCOM(aDataTransfer); } \
virtual mozilla::dom::DataTransfer * GetDataTransfer(void) override; \
virtual void SetDataTransfer(mozilla::dom::DataTransfer *aDataTransfer) override; \
NS_IMETHOD GetData(nsITransferable *aTransferable, uint32_t aItemIndex) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aTransferable, aItemIndex); } \
NS_IMETHOD IsDataFlavorSupported(const char * aDataFlavor, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsDataFlavorSupported(aDataFlavor, _retval); } \
NS_IMETHOD UserCancelled(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UserCancelled(); } \
NS_IMETHOD DragEventDispatchedToChildProcess(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DragEventDispatchedToChildProcess(); } \
NS_IMETHOD UpdateDragEffect(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateDragEffect(); } \
NS_IMETHOD UpdateDragImage(nsINode *aImage, int32_t aImageX, int32_t aImageY) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateDragImage(aImage, aImageX, aImageY); } \
NS_IMETHOD InitForTests(uint32_t aAllowedEffect) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitForTests(aAllowedEffect); } \
virtual uint32_t GetEffectAllowedForTests(void) override; \
virtual bool IsSynthesizedForTests(void) override; \
NS_IMETHOD SetDragEndPoint(int32_t aScreenX, int32_t aScreenY) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDragEndPoint(aScreenX, aScreenY); } \
NS_IMETHOD SetDragEndPointForTests(int32_t aScreenX, int32_t aScreenY) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDragEndPointForTests(aScreenX, aScreenY); } \
virtual bool IsDraggingTextInTextControl(void) override; \
NS_IMETHOD MaybeEditorDeletedSourceNode(mozilla::dom::Element *aEditingHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MaybeEditorDeletedSourceNode(aEditingHost); } \
NS_IMETHOD DragMoved(int32_t aX, int32_t aY) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DragMoved(aX, aY); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD FireDragEventAtSource(mozilla::EventMessage aEventMessage, uint32_t aKeyModifiers) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FireDragEventAtSource(aEventMessage, aKeyModifiers); } \
virtual bool MaybeAddBrowser(mozilla::dom::BrowserParent * aBP) override; \
virtual bool RemoveAllBrowsers(void) override; \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD EndDragSession(bool aDoneDrag, uint32_t aKeyModifiers) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EndDragSession(aDoneDrag, aKeyModifiers); } \
NS_IMETHOD SendStoreDropTargetAndDelayEndDragSession(mozilla::dom::DragEvent *aEvent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SendStoreDropTargetAndDelayEndDragSession(aEvent); } \
NS_IMETHOD SendDispatchToDropTargetAndResumeEndDragSession(bool aShouldDrop) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SendDispatchToDropTargetAndResumeEndDragSession(aShouldDrop); } \
NS_IMETHOD StoreDropTargetAndDelayEndDragSession(mozilla::dom::Element *aElement, nsIFrame * aDocFrame) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StoreDropTargetAndDelayEndDragSession(aElement, aDocFrame); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD DispatchToDropTargetAndResumeEndDragSession(nsIWidget * aWidget, const mozilla::LayoutDeviceIntPoint & aPt, bool aShouldDrop) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DispatchToDropTargetAndResumeEndDragSession(aWidget, aPt, aShouldDrop); } \
virtual bool MustUpdateDataTransfer(mozilla::EventMessage aMessage) override;
#endif /* __gen_nsIDragSession_h__ */