LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom - UIEventBinding.h (source / functions) Hit Total Coverage
Test: output.info Lines: 3 15 20.0 %
Date: 2017-07-14 16:53:18 Functions: 1 7 14.3 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* THIS FILE IS AUTOGENERATED FROM UIEvent.webidl BY Codegen.py - DO NOT EDIT */
       2             : 
       3             : #ifndef mozilla_dom_UIEventBinding_h
       4             : #define mozilla_dom_UIEventBinding_h
       5             : 
       6             : #include "EventBinding.h"
       7             : #include "UIEventBinding.h"
       8             : #include "js/RootingAPI.h"
       9             : #include "jspubtd.h"
      10             : #include "mozilla/ErrorResult.h"
      11             : #include "mozilla/dom/BindingDeclarations.h"
      12             : #include "mozilla/dom/Nullable.h"
      13             : #include "nsGlobalWindow.h"
      14             : 
      15             : class nsGlobalWindow;
      16             : 
      17             : namespace mozilla {
      18             : namespace dom {
      19             : 
      20             : struct EventModifierInitAtoms;
      21             : struct NativePropertyHooks;
      22             : class ProtoAndIfaceCache;
      23             : class UIEvent;
      24             : struct UIEventAtoms;
      25             : struct UIEventInitAtoms;
      26             : 
      27             : } // namespace dom
      28             : } // namespace mozilla
      29             : 
      30             : namespace mozilla {
      31             : namespace dom {
      32             : 
      33           0 : struct UIEventInit : public EventInit
      34             : {
      35             :   MOZ_INIT_OUTSIDE_CTOR int32_t mDetail;
      36             :   MOZ_INIT_OUTSIDE_CTOR RefPtr<nsGlobalWindow> mView;
      37             : 
      38             :   UIEventInit();
      39             : 
      40           0 :   explicit inline UIEventInit(const FastDictionaryInitializer& )
      41           0 :     : EventInit(FastDictionaryInitializer())
      42             :   {
      43             :     // Do nothing here; this is used by our "Fast" subclass
      44           0 :   }
      45             : 
      46             :   explicit inline UIEventInit(const UIEventInit& aOther)
      47             :   {
      48             :     *this = aOther;
      49             :   }
      50             : 
      51             :   bool
      52             :   Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
      53             : 
      54             :   bool
      55             :   ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
      56             : 
      57             :   void
      58             :   TraceDictionary(JSTracer* trc);
      59             : 
      60             :   UIEventInit&
      61             :   operator=(const UIEventInit& aOther);
      62             : 
      63             : private:
      64             :   static bool
      65             :   InitIds(JSContext* cx, UIEventInitAtoms* atomsCache);
      66             : };
      67             : 
      68             : namespace binding_detail {
      69           0 : struct FastUIEventInit : public UIEventInit
      70             : {
      71           0 :   inline FastUIEventInit()
      72           0 :     : UIEventInit(FastDictionaryInitializer())
      73             :   {
      74             :     // Doesn't matter what int we pass to the parent constructor
      75           0 :   }
      76             : };
      77             : } // namespace binding_detail
      78             : 
      79             : 
      80           0 : struct EventModifierInit : public UIEventInit
      81             : {
      82             :   MOZ_INIT_OUTSIDE_CTOR bool mAltKey;
      83             :   MOZ_INIT_OUTSIDE_CTOR bool mCtrlKey;
      84             :   MOZ_INIT_OUTSIDE_CTOR bool mMetaKey;
      85             :   MOZ_INIT_OUTSIDE_CTOR bool mModifierAltGraph;
      86             :   MOZ_INIT_OUTSIDE_CTOR bool mModifierCapsLock;
      87             :   MOZ_INIT_OUTSIDE_CTOR bool mModifierFn;
      88             :   MOZ_INIT_OUTSIDE_CTOR bool mModifierFnLock;
      89             :   MOZ_INIT_OUTSIDE_CTOR bool mModifierNumLock;
      90             :   MOZ_INIT_OUTSIDE_CTOR bool mModifierOS;
      91             :   MOZ_INIT_OUTSIDE_CTOR bool mModifierScrollLock;
      92             :   MOZ_INIT_OUTSIDE_CTOR bool mModifierSymbol;
      93             :   MOZ_INIT_OUTSIDE_CTOR bool mModifierSymbolLock;
      94             :   MOZ_INIT_OUTSIDE_CTOR bool mShiftKey;
      95             : 
      96             :   EventModifierInit();
      97             : 
      98           0 :   explicit inline EventModifierInit(const FastDictionaryInitializer& )
      99           0 :     : UIEventInit(FastDictionaryInitializer())
     100             :   {
     101             :     // Do nothing here; this is used by our "Fast" subclass
     102           0 :   }
     103             : 
     104             :   explicit inline EventModifierInit(const EventModifierInit& aOther)
     105             :   {
     106             :     *this = aOther;
     107             :   }
     108             : 
     109             :   bool
     110             :   Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
     111             : 
     112             :   bool
     113             :   Init(const nsAString& aJSON);
     114             : 
     115             :   bool
     116             :   ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
     117             : 
     118             :   bool
     119             :   ToJSON(nsAString& aJSON) const;
     120             : 
     121             :   void
     122             :   TraceDictionary(JSTracer* trc);
     123             : 
     124             :   EventModifierInit&
     125             :   operator=(const EventModifierInit& aOther);
     126             : 
     127             : private:
     128             :   static bool
     129             :   InitIds(JSContext* cx, EventModifierInitAtoms* atomsCache);
     130             : };
     131             : 
     132             : namespace binding_detail {
     133             : struct FastEventModifierInit : public EventModifierInit
     134             : {
     135             :   inline FastEventModifierInit()
     136             :     : EventModifierInit(FastDictionaryInitializer())
     137             :   {
     138             :     // Doesn't matter what int we pass to the parent constructor
     139             :   }
     140             : };
     141             : } // namespace binding_detail
     142             : 
     143             : 
     144             : namespace UIEventBinding {
     145             : 
     146             :   typedef mozilla::dom::UIEvent NativeType;
     147             : 
     148             :   JSObject*
     149             :   DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
     150             : 
     151             :   const JSClass*
     152             :   GetJSClass();
     153             : 
     154             :   bool
     155             :   Wrap(JSContext* aCx, mozilla::dom::UIEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
     156             : 
     157             :   template <class T>
     158           8 :   inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
     159             :   {
     160          16 :     JS::Rooted<JSObject*> reflector(aCx);
     161          16 :     return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
     162             :   }
     163             : 
     164             :   // We declare this as an array so that retrieving a pointer to this
     165             :   // binding's property hooks only requires compile/link-time resolvable
     166             :   // address arithmetic.  Declaring it as a pointer instead would require
     167             :   // doing a run-time load to fetch a pointer to this binding's property
     168             :   // hooks.  And then structures which embedded a pointer to this structure
     169             :   // would require a run-time load for proper initialization, which would
     170             :   // then induce static constructors.  Lots of static constructors.
     171             :   extern const NativePropertyHooks sNativePropertyHooks[];
     172             : 
     173             :   void
     174             :   CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
     175             : 
     176             :   JS::Handle<JSObject*>
     177             :   GetProtoObjectHandle(JSContext* aCx);
     178             : 
     179             :   JSObject*
     180             :   GetProtoObject(JSContext* aCx);
     181             : 
     182             :   JS::Handle<JSObject*>
     183             :   GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
     184             : 
     185             :   JSObject*
     186             :   GetConstructorObject(JSContext* aCx);
     187             : 
     188             : } // namespace UIEventBinding
     189             : 
     190             : 
     191             : 
     192             : } // namespace dom
     193             : } // namespace mozilla
     194             : 
     195             : #endif // mozilla_dom_UIEventBinding_h

Generated by: LCOV version 1.13