CSSTranslate.h (1788B)
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_CSSTRANSLATE_H_ 8 #define LAYOUT_STYLE_TYPEDOM_CSSTRANSLATE_H_ 9 10 #include "js/TypeDecls.h" 11 #include "mozilla/dom/CSSNumericValueBindingFwd.h" 12 #include "mozilla/dom/CSSTransformComponent.h" 13 14 template <class T> 15 struct already_AddRefed; 16 template <class T> 17 class nsCOMPtr; 18 class nsISupports; 19 20 namespace mozilla { 21 22 class ErrorResult; 23 24 namespace dom { 25 26 class GlobalObject; 27 template <typename T> 28 class NonNull; 29 template <typename T> 30 class Optional; 31 32 class CSSTranslate final : public CSSTransformComponent { 33 public: 34 explicit CSSTranslate(nsCOMPtr<nsISupports> aParent); 35 36 JSObject* WrapObject(JSContext* aCx, 37 JS::Handle<JSObject*> aGivenProto) override; 38 39 // start of CSSTranslate Web IDL declarations 40 41 static already_AddRefed<CSSTranslate> Constructor( 42 const GlobalObject& aGlobal, CSSNumericValue& aX, CSSNumericValue& aY, 43 const Optional<NonNull<CSSNumericValue>>& aZ, ErrorResult& aRv); 44 45 CSSNumericValue* GetX(ErrorResult& aRv) const; 46 47 void SetX(CSSNumericValue& aArg, ErrorResult& aRv); 48 49 CSSNumericValue* GetY(ErrorResult& aRv) const; 50 51 void SetY(CSSNumericValue& aArg, ErrorResult& aRv); 52 53 CSSNumericValue* GetZ(ErrorResult& aRv) const; 54 55 void SetZ(CSSNumericValue& aArg, ErrorResult& aRv); 56 57 // end of CSSTranslate Web IDL declarations 58 59 protected: 60 virtual ~CSSTranslate() = default; 61 }; 62 63 } // namespace dom 64 } // namespace mozilla 65 66 #endif // LAYOUT_STYLE_TYPEDOM_CSSTRANSLATE_H_