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 WebGLContextEvent.webidl BY Codegen.py - DO NOT EDIT */
8 :
9 : #include "EventBinding.h"
10 : #include "WebGLContextEvent.h"
11 : #include "WebGLContextEventBinding.h"
12 : #include "js/GCAPI.h"
13 : #include "mozilla/dom/Nullable.h"
14 : #include "mozilla/dom/OffscreenCanvas.h"
15 : #include "mozilla/dom/PrimitiveConversions.h"
16 : #include "mozilla/dom/WebGLContextEvent.h"
17 :
18 : namespace mozilla {
19 : namespace dom {
20 :
21 :
22 : NS_IMPL_CYCLE_COLLECTION_CLASS(WebGLContextEvent)
23 :
24 0 : NS_IMPL_ADDREF_INHERITED(WebGLContextEvent, Event)
25 0 : NS_IMPL_RELEASE_INHERITED(WebGLContextEvent, Event)
26 :
27 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(WebGLContextEvent, Event)
28 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
29 :
30 0 : NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(WebGLContextEvent, Event)
31 0 : NS_IMPL_CYCLE_COLLECTION_TRACE_END
32 :
33 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(WebGLContextEvent, Event)
34 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK_END
35 :
36 0 : NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(WebGLContextEvent)
37 0 : NS_INTERFACE_MAP_END_INHERITING(Event)
38 :
39 0 : WebGLContextEvent::WebGLContextEvent(mozilla::dom::EventTarget* aOwner)
40 0 : : Event(aOwner, nullptr, nullptr)
41 : {
42 0 : }
43 :
44 0 : WebGLContextEvent::~WebGLContextEvent()
45 : {
46 0 : }
47 :
48 : WebGLContextEvent*
49 0 : WebGLContextEvent::AsWebGLContextEvent()
50 : {
51 0 : return this;
52 : }
53 :
54 : JSObject*
55 0 : WebGLContextEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
56 : {
57 0 : return WebGLContextEventBinding::Wrap(aCx, this, aGivenProto);
58 : }
59 :
60 : already_AddRefed<WebGLContextEvent>
61 0 : WebGLContextEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const WebGLContextEventInit& aEventInit)
62 : {
63 0 : RefPtr<WebGLContextEvent> e = new WebGLContextEvent(aOwner);
64 0 : bool trusted = e->Init(aOwner);
65 0 : e->InitEvent(aType, aEventInit.mBubbles, aEventInit.mCancelable);
66 0 : e->mStatusMessage = aEventInit.mStatusMessage;
67 0 : e->SetTrusted(trusted);
68 0 : e->SetComposed(aEventInit.mComposed);
69 0 : return e.forget();
70 : }
71 :
72 : already_AddRefed<WebGLContextEvent>
73 0 : WebGLContextEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const WebGLContextEventInit& aEventInit, ErrorResult& aRv)
74 : {
75 0 : nsCOMPtr<mozilla::dom::EventTarget> owner = do_QueryInterface(aGlobal.GetAsSupports());
76 0 : return Constructor(owner, aType, aEventInit);
77 : }
78 :
79 : void
80 0 : WebGLContextEvent::GetStatusMessage(nsString& aRetVal) const
81 : {
82 0 : aRetVal = mStatusMessage;
83 0 : }
84 :
85 :
86 : } // namespace dom
87 : } // namespace mozilla
|