michael@0: /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */ 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: #ifndef mozilla_dom_FocusEvent_h_ michael@0: #define mozilla_dom_FocusEvent_h_ michael@0: michael@0: #include "mozilla/dom/FocusEventBinding.h" michael@0: #include "mozilla/dom/UIEvent.h" michael@0: #include "mozilla/EventForwards.h" michael@0: #include "nsIDOMFocusEvent.h" michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: michael@0: class FocusEvent : public UIEvent, michael@0: public nsIDOMFocusEvent michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIDOMFOCUSEVENT michael@0: michael@0: // Forward to base class michael@0: NS_FORWARD_TO_UIEVENT michael@0: michael@0: virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE michael@0: { michael@0: return FocusEventBinding::Wrap(aCx, this); michael@0: } michael@0: michael@0: FocusEvent(EventTarget* aOwner, michael@0: nsPresContext* aPresContext, michael@0: InternalFocusEvent* aEvent); michael@0: michael@0: EventTarget* GetRelatedTarget(); michael@0: michael@0: static already_AddRefed Constructor(const GlobalObject& aGlobal, michael@0: const nsAString& aType, michael@0: const FocusEventInit& aParam, michael@0: ErrorResult& aRv); michael@0: protected: michael@0: nsresult InitFocusEvent(const nsAString& aType, michael@0: bool aCanBubble, michael@0: bool aCancelable, michael@0: nsIDOMWindow* aView, michael@0: int32_t aDetail, michael@0: EventTarget* aRelatedTarget); michael@0: }; michael@0: michael@0: } // namespace dom michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozilla_dom_FocusEvent_h_