LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom - OscillatorNodeBinding.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 11 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 5 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* THIS FILE IS AUTOGENERATED FROM OscillatorNode.webidl BY Codegen.py - DO NOT EDIT */
       2             : 
       3             : #ifndef mozilla_dom_OscillatorNodeBinding_h
       4             : #define mozilla_dom_OscillatorNodeBinding_h
       5             : 
       6             : #include "AudioNodeBinding.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/PeriodicWave.h"
      13             : 
      14             : namespace mozilla {
      15             : namespace dom {
      16             : 
      17             : struct NativePropertyHooks;
      18             : class OscillatorNode;
      19             : struct OscillatorNodeAtoms;
      20             : struct OscillatorOptionsAtoms;
      21             : class PeriodicWave;
      22             : class ProtoAndIfaceCache;
      23             : 
      24             : } // namespace dom
      25             : } // namespace mozilla
      26             : 
      27             : namespace mozilla {
      28             : namespace dom {
      29             : 
      30             : enum class OscillatorType : uint8_t {
      31             :   Sine,
      32             :   Square,
      33             :   Sawtooth,
      34             :   Triangle,
      35             :   Custom,
      36             :   EndGuard_
      37             : };
      38             : 
      39             : namespace OscillatorTypeValues {
      40             : extern const EnumEntry strings[6];
      41             : } // namespace OscillatorTypeValues
      42             : 
      43             : bool
      44             : ToJSValue(JSContext* aCx, OscillatorType aArgument, JS::MutableHandle<JS::Value> aValue);
      45             : 
      46             : 
      47           0 : struct OscillatorOptions : public AudioNodeOptions
      48             : {
      49             :   MOZ_INIT_OUTSIDE_CTOR float mDetune;
      50             :   MOZ_INIT_OUTSIDE_CTOR float mFrequency;
      51             :   MOZ_INIT_OUTSIDE_CTOR Optional<OwningNonNull<mozilla::dom::PeriodicWave>> mPeriodicWave;
      52             :   MOZ_INIT_OUTSIDE_CTOR OscillatorType mType;
      53             : 
      54             :   OscillatorOptions();
      55             : 
      56           0 :   explicit inline OscillatorOptions(const FastDictionaryInitializer& )
      57           0 :     : AudioNodeOptions(FastDictionaryInitializer())
      58             :   {
      59             :     // Do nothing here; this is used by our "Fast" subclass
      60           0 :   }
      61             : 
      62             :   explicit inline OscillatorOptions(const OscillatorOptions& aOther)
      63             :   {
      64             :     *this = aOther;
      65             :   }
      66             : 
      67             :   bool
      68             :   Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
      69             : 
      70             :   bool
      71             :   ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
      72             : 
      73             :   void
      74             :   TraceDictionary(JSTracer* trc);
      75             : 
      76             :   OscillatorOptions&
      77             :   operator=(const OscillatorOptions& aOther);
      78             : 
      79             : private:
      80             :   static bool
      81             :   InitIds(JSContext* cx, OscillatorOptionsAtoms* atomsCache);
      82             : };
      83             : 
      84             : namespace binding_detail {
      85           0 : struct FastOscillatorOptions : public OscillatorOptions
      86             : {
      87           0 :   inline FastOscillatorOptions()
      88           0 :     : OscillatorOptions(FastDictionaryInitializer())
      89             :   {
      90             :     // Doesn't matter what int we pass to the parent constructor
      91           0 :   }
      92             : };
      93             : } // namespace binding_detail
      94             : 
      95             : 
      96             : namespace OscillatorNodeBinding {
      97             : 
      98             :   typedef mozilla::dom::OscillatorNode NativeType;
      99             : 
     100             :   bool
     101             :   ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
     102             : 
     103             :   JSObject*
     104             :   DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
     105             : 
     106             :   const JSClass*
     107             :   GetJSClass();
     108             : 
     109             :   bool
     110             :   Wrap(JSContext* aCx, mozilla::dom::OscillatorNode* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
     111             : 
     112             :   template <class T>
     113           0 :   inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
     114             :   {
     115           0 :     JS::Rooted<JSObject*> reflector(aCx);
     116           0 :     return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
     117             :   }
     118             : 
     119             :   // We declare this as an array so that retrieving a pointer to this
     120             :   // binding's property hooks only requires compile/link-time resolvable
     121             :   // address arithmetic.  Declaring it as a pointer instead would require
     122             :   // doing a run-time load to fetch a pointer to this binding's property
     123             :   // hooks.  And then structures which embedded a pointer to this structure
     124             :   // would require a run-time load for proper initialization, which would
     125             :   // then induce static constructors.  Lots of static constructors.
     126             :   extern const NativePropertyHooks sNativePropertyHooks[];
     127             : 
     128             :   void
     129             :   CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
     130             : 
     131             :   JS::Handle<JSObject*>
     132             :   GetProtoObjectHandle(JSContext* aCx);
     133             : 
     134             :   JS::Handle<JSObject*>
     135             :   GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
     136             : 
     137             :   JSObject*
     138             :   GetConstructorObject(JSContext* aCx);
     139             : 
     140             : } // namespace OscillatorNodeBinding
     141             : 
     142             : 
     143             : 
     144             : } // namespace dom
     145             : } // namespace mozilla
     146             : 
     147             : #endif // mozilla_dom_OscillatorNodeBinding_h

Generated by: LCOV version 1.13