Line data Source code
1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim:set ts=2 sw=2 sts=2 et cindent: */
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 : /* THIS FILE IS AUTOGENERATED FROM CaretStateChangedEvent.webidl BY Codegen.py - DO NOT EDIT */
8 :
9 : #include "CaretStateChangedEvent.h"
10 : #include "CaretStateChangedEventBinding.h"
11 : #include "EventBinding.h"
12 : #include "js/GCAPI.h"
13 : #include "mozilla/dom/CaretStateChangedEvent.h"
14 : #include "mozilla/dom/DOMRect.h"
15 : #include "mozilla/dom/Nullable.h"
16 : #include "mozilla/dom/PrimitiveConversions.h"
17 :
18 : namespace mozilla {
19 : namespace dom {
20 :
21 :
22 : NS_IMPL_CYCLE_COLLECTION_CLASS(CaretStateChangedEvent)
23 :
24 0 : NS_IMPL_ADDREF_INHERITED(CaretStateChangedEvent, Event)
25 0 : NS_IMPL_RELEASE_INHERITED(CaretStateChangedEvent, Event)
26 :
27 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(CaretStateChangedEvent, Event)
28 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mBoundingClientRect)
29 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
30 :
31 0 : NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(CaretStateChangedEvent, Event)
32 0 : NS_IMPL_CYCLE_COLLECTION_TRACE_END
33 :
34 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(CaretStateChangedEvent, Event)
35 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK(mBoundingClientRect)
36 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK_END
37 :
38 0 : NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(CaretStateChangedEvent)
39 0 : NS_INTERFACE_MAP_END_INHERITING(Event)
40 :
41 0 : CaretStateChangedEvent::CaretStateChangedEvent(mozilla::dom::EventTarget* aOwner)
42 0 : : Event(aOwner, nullptr, nullptr)
43 : {
44 0 : }
45 :
46 0 : CaretStateChangedEvent::~CaretStateChangedEvent()
47 : {
48 0 : }
49 :
50 : CaretStateChangedEvent*
51 0 : CaretStateChangedEvent::AsCaretStateChangedEvent()
52 : {
53 0 : return this;
54 : }
55 :
56 : JSObject*
57 0 : CaretStateChangedEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
58 : {
59 0 : return CaretStateChangedEventBinding::Wrap(aCx, this, aGivenProto);
60 : }
61 :
62 : already_AddRefed<CaretStateChangedEvent>
63 0 : CaretStateChangedEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const CaretStateChangedEventInit& aEventInit)
64 : {
65 0 : RefPtr<CaretStateChangedEvent> e = new CaretStateChangedEvent(aOwner);
66 0 : bool trusted = e->Init(aOwner);
67 0 : e->InitEvent(aType, aEventInit.mBubbles, aEventInit.mCancelable);
68 0 : e->mCollapsed = aEventInit.mCollapsed;
69 0 : e->mBoundingClientRect = aEventInit.mBoundingClientRect;
70 0 : e->mReason = aEventInit.mReason;
71 0 : e->mCaretVisible = aEventInit.mCaretVisible;
72 0 : e->mCaretVisuallyVisible = aEventInit.mCaretVisuallyVisible;
73 0 : e->mSelectionVisible = aEventInit.mSelectionVisible;
74 0 : e->mSelectionEditable = aEventInit.mSelectionEditable;
75 0 : e->mSelectedTextContent = aEventInit.mSelectedTextContent;
76 0 : e->SetTrusted(trusted);
77 0 : e->SetComposed(aEventInit.mComposed);
78 0 : return e.forget();
79 : }
80 :
81 : already_AddRefed<CaretStateChangedEvent>
82 0 : CaretStateChangedEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const CaretStateChangedEventInit& aEventInit, ErrorResult& aRv)
83 : {
84 0 : nsCOMPtr<mozilla::dom::EventTarget> owner = do_QueryInterface(aGlobal.GetAsSupports());
85 0 : return Constructor(owner, aType, aEventInit);
86 : }
87 :
88 : bool
89 0 : CaretStateChangedEvent::Collapsed() const
90 : {
91 0 : return mCollapsed;
92 : }
93 :
94 : DOMRectReadOnly*
95 0 : CaretStateChangedEvent::GetBoundingClientRect() const
96 : {
97 0 : return mBoundingClientRect;
98 : }
99 :
100 : CaretChangedReason
101 0 : CaretStateChangedEvent::Reason() const
102 : {
103 0 : return mReason;
104 : }
105 :
106 : bool
107 0 : CaretStateChangedEvent::CaretVisible() const
108 : {
109 0 : return mCaretVisible;
110 : }
111 :
112 : bool
113 0 : CaretStateChangedEvent::CaretVisuallyVisible() const
114 : {
115 0 : return mCaretVisuallyVisible;
116 : }
117 :
118 : bool
119 0 : CaretStateChangedEvent::SelectionVisible() const
120 : {
121 0 : return mSelectionVisible;
122 : }
123 :
124 : bool
125 0 : CaretStateChangedEvent::SelectionEditable() const
126 : {
127 0 : return mSelectionEditable;
128 : }
129 :
130 : void
131 0 : CaretStateChangedEvent::GetSelectedTextContent(nsString& aRetVal) const
132 : {
133 0 : aRetVal = mSelectedTextContent;
134 0 : }
135 :
136 :
137 : } // namespace dom
138 : } // namespace mozilla
|