Bug 1472338: part 2) Change `clipboard.readText()` to read from the clipboard asynchr...
[gecko.git] / dom / grid / GridLine.h
blob5fc7321b8c248e654813cb020c37c5dd09c0197c
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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/. */
7 #ifndef mozilla_dom_GridLine_h
8 #define mozilla_dom_GridLine_h
10 #include "mozilla/dom/GridBinding.h"
11 #include "nsString.h"
12 #include "nsTArray.h"
13 #include "nsWrapperCache.h"
15 class nsAtom;
17 namespace mozilla {
18 namespace dom {
20 class GridLines;
22 class GridLine : public nsISupports, public nsWrapperCache {
23 public:
24 explicit GridLine(GridLines* aParent);
26 protected:
27 virtual ~GridLine();
29 public:
30 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
31 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(GridLine)
33 void GetNames(nsTArray<nsString>& aNames) const;
34 const nsTArray<RefPtr<nsAtom>>& Names() const { return mNames; }
36 virtual JSObject* WrapObject(JSContext* aCx,
37 JS::Handle<JSObject*> aGivenProto) override;
38 GridLines* GetParentObject() { return mParent; }
40 double Start() const;
41 double Breadth() const;
42 GridDeclaration Type() const;
43 uint32_t Number() const;
44 int32_t NegativeNumber() const;
46 void SetLineValues(const nsTArray<RefPtr<nsAtom>>& aNames, double aStart,
47 double aBreadth, uint32_t aNumber, int32_t aNegativeNumber,
48 GridDeclaration aType);
50 void SetLineNames(const nsTArray<RefPtr<nsAtom>>& aNames);
52 protected:
53 RefPtr<GridLines> mParent;
54 nsTArray<RefPtr<nsAtom>> mNames;
55 double mStart;
56 double mBreadth;
57 GridDeclaration mType;
58 uint32_t mNumber;
59 int32_t mNegativeNumber;
62 } // namespace dom
63 } // namespace mozilla
65 #endif /* mozilla_dom_GridLine_h */