CSSMatrixComponent.h (1550B)
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 #ifndef LAYOUT_STYLE_TYPEDOM_CSSMATRIXCOMPONENT_H_ 8 #define LAYOUT_STYLE_TYPEDOM_CSSMATRIXCOMPONENT_H_ 9 10 #include "js/TypeDecls.h" 11 #include "mozilla/dom/CSSMatrixComponentBindingFwd.h" 12 #include "mozilla/dom/CSSTransformComponent.h" 13 #include "mozilla/dom/DOMMatrixBindingFwd.h" 14 15 template <class T> 16 struct already_AddRefed; 17 template <class T> 18 class nsCOMPtr; 19 class nsISupports; 20 21 namespace mozilla { 22 23 class ErrorResult; 24 25 namespace dom { 26 27 class GlobalObject; 28 29 class CSSMatrixComponent final : public CSSTransformComponent { 30 public: 31 explicit CSSMatrixComponent(nsCOMPtr<nsISupports> aParent); 32 33 JSObject* WrapObject(JSContext* aCx, 34 JS::Handle<JSObject*> aGivenProto) override; 35 36 // start of CSSMatrixComponent Web IDL declarations 37 38 static already_AddRefed<CSSMatrixComponent> Constructor( 39 const GlobalObject& aGlobal, DOMMatrixReadOnly& aMatrix, 40 const CSSMatrixComponentOptions& aOptions); 41 42 DOMMatrix* GetMatrix(ErrorResult& aRv) const; 43 44 void SetMatrix(DOMMatrix& aArg); 45 46 // end of CSSMatrixComponent Web IDL declarations 47 48 protected: 49 virtual ~CSSMatrixComponent() = default; 50 }; 51 52 } // namespace dom 53 } // namespace mozilla 54 55 #endif // LAYOUT_STYLE_TYPEDOM_CSSMATRIXCOMPONENT_H_