Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef mozilla_dom_InputEvent_h_
8 : #define mozilla_dom_InputEvent_h_
9 :
10 : #include "mozilla/dom/UIEvent.h"
11 : #include "mozilla/dom/InputEventBinding.h"
12 : #include "mozilla/EventForwards.h"
13 :
14 : namespace mozilla {
15 : namespace dom {
16 :
17 : class InputEvent : public UIEvent
18 : {
19 : public:
20 : InputEvent(EventTarget* aOwner,
21 : nsPresContext* aPresContext,
22 : InternalEditorInputEvent* aEvent);
23 :
24 : NS_DECL_ISUPPORTS_INHERITED
25 :
26 : // Forward to base class
27 0 : NS_FORWARD_TO_UIEVENT
28 :
29 :
30 : static already_AddRefed<InputEvent> Constructor(const GlobalObject& aGlobal,
31 : const nsAString& aType,
32 : const InputEventInit& aParam,
33 : ErrorResult& aRv);
34 :
35 0 : virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
36 : {
37 0 : return InputEventBinding::Wrap(aCx, this, aGivenProto);
38 : }
39 :
40 : bool IsComposing();
41 :
42 : protected:
43 0 : ~InputEvent() {}
44 : };
45 :
46 : } // namespace dom
47 : } // namespace mozilla
48 :
49 : already_AddRefed<mozilla::dom::InputEvent>
50 : NS_NewDOMInputEvent(mozilla::dom::EventTarget* aOwner,
51 : nsPresContext* aPresContext,
52 : mozilla::InternalEditorInputEvent* aEvent);
53 :
54 : #endif // mozilla_dom_InputEvent_h_
|