/* 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"

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 oldURL;
  nsAutoString newURL;
};

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);

  bool wasClean;
  PRUint16 code;
  nsAutoString reason;
};

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);

  nsCOMPtr<nsIDOMWindow> view;
  PRInt32 detail;
};

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);

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

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);

  JS::Value keyPath;
  bool autoIncrement;
};

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 unique;
  bool multiEntry;
};

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 oldValue;
  nsAutoString newValue;
  nsAutoString url;
  nsCOMPtr<nsIDOMStorage> storageArea;
};

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 type;
  nsAutoString endings;
};

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;
};

}
}
#endif
