michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_dom_DragEvent_h_ michael@0: #define mozilla_dom_DragEvent_h_ michael@0: michael@0: #include "nsIDOMDragEvent.h" michael@0: #include "mozilla/dom/MouseEvent.h" michael@0: #include "mozilla/dom/DragEventBinding.h" michael@0: #include "mozilla/EventForwards.h" michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: michael@0: class DataTransfer; michael@0: michael@0: class DragEvent : public MouseEvent, michael@0: public nsIDOMDragEvent michael@0: { michael@0: public: michael@0: DragEvent(EventTarget* aOwner, michael@0: nsPresContext* aPresContext, michael@0: WidgetDragEvent* aEvent); michael@0: michael@0: NS_DECL_ISUPPORTS_INHERITED michael@0: michael@0: NS_DECL_NSIDOMDRAGEVENT michael@0: michael@0: NS_FORWARD_TO_MOUSEEVENT michael@0: michael@0: virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE michael@0: { michael@0: return DragEventBinding::Wrap(aCx, this); michael@0: } michael@0: michael@0: DataTransfer* GetDataTransfer(); michael@0: michael@0: void InitDragEvent(const nsAString& aType, michael@0: bool aCanBubble, bool aCancelable, michael@0: nsIDOMWindow* aView, int32_t aDetail, michael@0: int32_t aScreenX, int32_t aScreenY, michael@0: int32_t aClientX, int32_t aClientY, michael@0: bool aCtrlKey, bool aAltKey, bool aShiftKey, michael@0: bool aMetaKey, uint16_t aButton, michael@0: EventTarget* aRelatedTarget, michael@0: DataTransfer* aDataTransfer, michael@0: ErrorResult& aError); michael@0: }; michael@0: michael@0: } // namespace dom michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozilla_dom_DragEvent_h_