CSSTransformValue.h (1906B)
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_CSSTRANSFORMVALUE_H_ 8 #define LAYOUT_STYLE_TYPEDOM_CSSTRANSFORMVALUE_H_ 9 10 #include <stdint.h> 11 12 #include "js/TypeDecls.h" 13 #include "mozilla/dom/CSSStyleValue.h" 14 #include "mozilla/dom/CSSTransformComponentBindingFwd.h" 15 #include "mozilla/dom/DOMMatrixBindingFwd.h" 16 17 template <class T> 18 struct already_AddRefed; 19 template <class T> 20 class nsCOMPtr; 21 class nsISupports; 22 23 namespace mozilla { 24 25 class ErrorResult; 26 template <class T> 27 class OwningNonNull; 28 29 namespace dom { 30 31 class GlobalObject; 32 template <typename T> 33 class Sequence; 34 35 class CSSTransformValue final : public CSSStyleValue { 36 public: 37 explicit CSSTransformValue(nsCOMPtr<nsISupports> aParent); 38 39 JSObject* WrapObject(JSContext* aCx, 40 JS::Handle<JSObject*> aGivenProto) override; 41 42 // start of CSSTransformValue Web IDL declarations 43 44 static already_AddRefed<CSSTransformValue> Constructor( 45 const GlobalObject& aGlobal, 46 const Sequence<OwningNonNull<CSSTransformComponent>>& aTransforms, 47 ErrorResult& aRv); 48 49 uint32_t Length() const; 50 51 bool Is2D() const; 52 53 already_AddRefed<DOMMatrix> ToMatrix(ErrorResult& aRv); 54 55 CSSTransformComponent* IndexedGetter(uint32_t aIndex, bool& aFound, 56 ErrorResult& aRv); 57 58 void IndexedSetter(uint32_t aIndex, CSSTransformComponent& aVal, 59 ErrorResult& aRv); 60 61 // end of CSSTransformValue Web IDL declarations 62 63 private: 64 virtual ~CSSTransformValue() = default; 65 }; 66 67 } // namespace dom 68 } // namespace mozilla 69 70 #endif // LAYOUT_STYLE_TYPEDOM_CSSTRANSFORMVALUE_H_