1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/events/FocusEvent.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,53 @@ 1.4 +/* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 +#ifndef mozilla_dom_FocusEvent_h_ 1.9 +#define mozilla_dom_FocusEvent_h_ 1.10 + 1.11 +#include "mozilla/dom/FocusEventBinding.h" 1.12 +#include "mozilla/dom/UIEvent.h" 1.13 +#include "mozilla/EventForwards.h" 1.14 +#include "nsIDOMFocusEvent.h" 1.15 + 1.16 +namespace mozilla { 1.17 +namespace dom { 1.18 + 1.19 +class FocusEvent : public UIEvent, 1.20 + public nsIDOMFocusEvent 1.21 +{ 1.22 +public: 1.23 + NS_DECL_ISUPPORTS 1.24 + NS_DECL_NSIDOMFOCUSEVENT 1.25 + 1.26 + // Forward to base class 1.27 + NS_FORWARD_TO_UIEVENT 1.28 + 1.29 + virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE 1.30 + { 1.31 + return FocusEventBinding::Wrap(aCx, this); 1.32 + } 1.33 + 1.34 + FocusEvent(EventTarget* aOwner, 1.35 + nsPresContext* aPresContext, 1.36 + InternalFocusEvent* aEvent); 1.37 + 1.38 + EventTarget* GetRelatedTarget(); 1.39 + 1.40 + static already_AddRefed<FocusEvent> Constructor(const GlobalObject& aGlobal, 1.41 + const nsAString& aType, 1.42 + const FocusEventInit& aParam, 1.43 + ErrorResult& aRv); 1.44 +protected: 1.45 + nsresult InitFocusEvent(const nsAString& aType, 1.46 + bool aCanBubble, 1.47 + bool aCancelable, 1.48 + nsIDOMWindow* aView, 1.49 + int32_t aDetail, 1.50 + EventTarget* aRelatedTarget); 1.51 +}; 1.52 + 1.53 +} // namespace dom 1.54 +} // namespace mozilla 1.55 + 1.56 +#endif // mozilla_dom_FocusEvent_h_