Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/ScreenOrientationBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM ScreenOrientation.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_ScreenOrientationBinding_h
4
#define mozilla_dom_ScreenOrientationBinding_h
5
6
#include "GeckoProfiler.h"
7
#include "js/RootingAPI.h"
8
#include "jspubtd.h"
9
#include "mozilla/ErrorResult.h"
10
#include "mozilla/dom/BindingDeclarations.h"
11
#include "mozilla/dom/Nullable.h"
12
#include "mozilla/dom/PrototypeList.h"
13
14
namespace mozilla {
15
namespace dom {
16
17
struct NativePropertyHooks;
18
class ProtoAndIfaceCache;
19
class ScreenOrientation;
20
struct ScreenOrientationAtoms;
21
22
} // namespace dom
23
} // namespace mozilla
24
25
namespace mozilla {
26
namespace dom {
27
28
enum class OrientationType : uint8_t {
29
  Portrait_primary,
30
  Portrait_secondary,
31
  Landscape_primary,
32
  Landscape_secondary,
33
  EndGuard_
34
};
35
36
namespace OrientationTypeValues {
37
extern const EnumEntry strings[5];
38
} // namespace OrientationTypeValues
39
40
bool
41
ToJSValue(JSContext* aCx, OrientationType aArgument, JS::MutableHandle<JS::Value> aValue);
42
43
44
enum class OrientationLockType : uint8_t {
45
  Any,
46
  Natural,
47
  Landscape,
48
  Portrait,
49
  Portrait_primary,
50
  Portrait_secondary,
51
  Landscape_primary,
52
  Landscape_secondary,
53
  EndGuard_
54
};
55
56
namespace OrientationLockTypeValues {
57
extern const EnumEntry strings[9];
58
} // namespace OrientationLockTypeValues
59
60
bool
61
ToJSValue(JSContext* aCx, OrientationLockType aArgument, JS::MutableHandle<JS::Value> aValue);
62
63
64
namespace ScreenOrientation_Binding {
65
66
  typedef mozilla::dom::ScreenOrientation NativeType;
67
68
  const JSClass*
69
  GetJSClass();
70
71
  bool
72
  Wrap(JSContext* aCx, mozilla::dom::ScreenOrientation* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
73
74
  template <class T>
75
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
76
0
  {
77
0
    JS::Rooted<JSObject*> reflector(aCx);
78
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
79
0
  }
80
81
  // We declare this as an array so that retrieving a pointer to this
82
  // binding's property hooks only requires compile/link-time resolvable
83
  // address arithmetic.  Declaring it as a pointer instead would require
84
  // doing a run-time load to fetch a pointer to this binding's property
85
  // hooks.  And then structures which embedded a pointer to this structure
86
  // would require a run-time load for proper initialization, which would
87
  // then induce static constructors.  Lots of static constructors.
88
  extern const NativePropertyHooks sNativePropertyHooks[];
89
90
  void
91
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
92
93
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
94
0
  {
95
0
    /* Get the interface prototype object for this class.  This will create the
96
0
       object as needed. */
97
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::ScreenOrientation,
98
0
                                       &CreateInterfaceObjects,
99
0
                                       /* aDefineOnGlobal = */ true);
100
0
101
0
  }
102
103
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
104
0
  {
105
0
    /* Get the interface object for this class.  This will create the object as
106
0
       needed. */
107
0
108
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::ScreenOrientation,
109
0
                                       &CreateInterfaceObjects,
110
0
                                       aDefineOnGlobal);
111
0
  }
112
113
  JSObject*
114
  GetConstructorObject(JSContext* aCx);
115
116
} // namespace ScreenOrientation_Binding
117
118
119
120
} // namespace dom
121
} // namespace mozilla
122
123
#endif // mozilla_dom_ScreenOrientationBinding_h