/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */

#ifndef _gen_mozilla_idl_dictionary_helpers_h_
#define _gen_mozilla_idl_dictionary_helpers_h_

#include "jsapi.h"
#include "nsString.h"
#include "nsCOMPtr.h"

#undef near


class nsIVariant;
class nsIDOMWindow;
class nsIDOMEventTarget;
class nsIDOMStorage;

namespace mozilla {
namespace dom {

class EventInit
{
public:
  EventInit();
  ~EventInit();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  bool bubbles;
  bool cancelable;
};

class CustomEventInit : public EventInit
{
public:
  CustomEventInit();
  ~CustomEventInit();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  nsCOMPtr<nsIVariant> detail;
};

class PopStateEventInit : public EventInit
{
public:
  PopStateEventInit();
  ~PopStateEventInit();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  nsCOMPtr<nsIVariant> state;
};

class HashChangeEventInit : public EventInit
{
public:
  HashChangeEventInit();
  ~HashChangeEventInit();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  nsAutoString newURL;
  nsAutoString oldURL;
};

class PageTransitionEventInit : public EventInit
{
public:
  PageTransitionEventInit();
  ~PageTransitionEventInit();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  bool persisted;
};

class CloseEventInit : public EventInit
{
public:
  CloseEventInit();
  ~CloseEventInit();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  PRUint16 code;
  nsAutoString reason;
  bool wasClean;
};

class UIEventInit : public EventInit
{
public:
  UIEventInit();
  ~UIEventInit();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  PRInt32 detail;
  nsCOMPtr<nsIDOMWindow> view;
};

class MouseEventInit : public UIEventInit
{
public:
  MouseEventInit();
  ~MouseEventInit();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  bool altKey;
  PRUint16 button;
  PRUint16 buttons;
  PRInt32 clientX;
  PRInt32 clientY;
  bool ctrlKey;
  bool metaKey;
  nsCOMPtr<nsIDOMEventTarget> relatedTarget;
  PRInt32 screenX;
  PRInt32 screenY;
  bool shiftKey;
};

class IDBObjectStoreParameters
{
public:
  IDBObjectStoreParameters();
  ~IDBObjectStoreParameters();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  bool autoIncrement;
  JS::Value keyPath;
};

class IDBIndexParameters
{
public:
  IDBIndexParameters();
  ~IDBIndexParameters();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  bool multiEntry;
  bool unique;
};

class StorageEventInit : public EventInit
{
public:
  StorageEventInit();
  ~StorageEventInit();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  nsAutoString key;
  nsAutoString newValue;
  nsAutoString oldValue;
  nsCOMPtr<nsIDOMStorage> storageArea;
  nsAutoString url;
};

class BlobPropertyBag
{
public:
  BlobPropertyBag();
  ~BlobPropertyBag();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  nsAutoString endings;
  nsAutoString type;
};

class MutationObserverInit
{
public:
  MutationObserverInit();
  ~MutationObserverInit();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  JS::Value attributeFilter;
  bool attributeOldValue;
  bool attributes;
  bool characterData;
  bool characterDataOldValue;
  bool childList;
  bool subtree;
};

class MozSettingsEventInit : public EventInit
{
public:
  MozSettingsEventInit();
  ~MozSettingsEventInit();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  nsAutoString settingName;
  nsCOMPtr<nsIVariant> settingValue;
};

class GeoPositionOptions
{
public:
  GeoPositionOptions();
  ~GeoPositionOptions();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  bool enableHighAccuracy;
  PRInt32 maximumAge;
  PRInt32 timeout;
};

class DeviceProximityEventInit : public EventInit
{
public:
  DeviceProximityEventInit();
  ~DeviceProximityEventInit();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  double max;
  double min;
  double value;
};

class UserProximityEventInit : public EventInit
{
public:
  UserProximityEventInit();
  ~UserProximityEventInit();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  bool near;
};

class DeviceLightEventInit : public EventInit
{
public:
  DeviceLightEventInit();
  ~DeviceLightEventInit();

  // If aCx or aVal is null, NS_OK is returned and 
  // dictionary will use the default values. 
  nsresult Init(JSContext* aCx, const jsval* aVal);

  double value;
};

}
}
#endif
