From fdd75c6ce2dce26d54ef81998ab1861ae1b1ebf8 Mon Sep 17 00:00:00 2001 From: "vidur%netscape.com" Date: Tue, 4 May 1999 20:47:00 +0000 Subject: [PATCH] Added Option constructor and resultant nsIDOMOption interface git-svn-id: svn://10.0.0.236/trunk@30189 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/dom/public/MANIFEST | 1 + mozilla/dom/public/Makefile.in | 1 + mozilla/dom/public/html/MANIFEST | 1 + mozilla/dom/public/html/Makefile.in | 1 + mozilla/dom/public/html/makefile.win | 3 +- mozilla/dom/public/html/nsIDOMOption.h | 45 ++++++++++++++++++ mozilla/dom/public/idl/base/makefile.win | 1 - .../dom/public/idl/html/HTMLOptionElement.idl | 9 ++++ mozilla/dom/public/makefile.win | 1 + mozilla/dom/public/nsIJSNativeInitializer.h | 46 +++++++++++++++++++ mozilla/dom/public/nsIJSScriptObject.h | 3 +- 11 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 mozilla/dom/public/html/nsIDOMOption.h create mode 100644 mozilla/dom/public/nsIJSNativeInitializer.h diff --git a/mozilla/dom/public/MANIFEST b/mozilla/dom/public/MANIFEST index 9179c8408ef..5d976cbad6e 100644 --- a/mozilla/dom/public/MANIFEST +++ b/mozilla/dom/public/MANIFEST @@ -18,6 +18,7 @@ nsIScriptContext.h nsIJSScriptObject.h +nsIJSNativeInitializer.h nsIScriptObjectOwner.h nsIScriptContextOwner.h nsIScriptGlobalObject.h diff --git a/mozilla/dom/public/Makefile.in b/mozilla/dom/public/Makefile.in index 1aeb8833b35..39a5c0da3f4 100644 --- a/mozilla/dom/public/Makefile.in +++ b/mozilla/dom/public/Makefile.in @@ -30,6 +30,7 @@ EXPORTS = \ nsIScriptContext.h \ nsIScriptContextOwner.h \ nsIJSScriptObject.h \ + nsIJSNativeInitializer.h \ nsIScriptEventListener.h \ nsIScriptObjectOwner.h \ nsIScriptGlobalObject.h \ diff --git a/mozilla/dom/public/html/MANIFEST b/mozilla/dom/public/html/MANIFEST index 83eb75327c1..fefd07f911b 100644 --- a/mozilla/dom/public/html/MANIFEST +++ b/mozilla/dom/public/html/MANIFEST @@ -61,3 +61,4 @@ nsIDOMHTMLUListElement.h nsIDOMImage.h nsIDOMNSHTMLButtonElement.h nsIDOMNSHTMLDocument.h +nsIDOMOption.h diff --git a/mozilla/dom/public/html/Makefile.in b/mozilla/dom/public/html/Makefile.in index dfa8b250346..ffff963964f 100644 --- a/mozilla/dom/public/html/Makefile.in +++ b/mozilla/dom/public/html/Makefile.in @@ -85,6 +85,7 @@ EXPORTS = \ nsIDOMImage.h \ nsIDOMNSHTMLButtonElement.h \ nsIDOMNSHTMLDocument.h \ + nsIDOMOption.h \ $(NULL) EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) diff --git a/mozilla/dom/public/html/makefile.win b/mozilla/dom/public/html/makefile.win index 0c403b6c284..c373f66570c 100644 --- a/mozilla/dom/public/html/makefile.win +++ b/mozilla/dom/public/html/makefile.win @@ -82,7 +82,8 @@ EXPORTS2= \ nsIDOMHTMLUListElement.h \ nsIDOMImage.h \ nsIDOMNSHTMLButtonElement.h \ - nsIDOMNSHTMLDocument.h + nsIDOMNSHTMLDocument.h \ + nsIDOMOption.h MODULE=dom diff --git a/mozilla/dom/public/html/nsIDOMOption.h b/mozilla/dom/public/html/nsIDOMOption.h new file mode 100644 index 00000000000..007cea86341 --- /dev/null +++ b/mozilla/dom/public/html/nsIDOMOption.h @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#ifndef nsIDOMOption_h__ +#define nsIDOMOption_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" + + +#define NS_IDOMOPTION_IID \ + { 0xa6cf90f3, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } + +class nsIDOMOption : public nsISupports { +public: + static const nsIID& GetIID() { static nsIID iid = NS_IDOMOPTION_IID; return iid; } +}; + + +#define NS_DECL_IDOMOPTION \ + + + +#define NS_FORWARD_IDOMOPTION(_to) \ + + +#endif // nsIDOMOption_h__ diff --git a/mozilla/dom/public/idl/base/makefile.win b/mozilla/dom/public/idl/base/makefile.win index 032411c7e46..f5a15317439 100644 --- a/mozilla/dom/public/idl/base/makefile.win +++ b/mozilla/dom/public/idl/base/makefile.win @@ -23,7 +23,6 @@ MODULE=raptor IDLSRCS= Navigator.idl Location.idl WindowCollection.idl Screen.idl History.idl \ PluginArray.idl MimeTypeArray.idl Plugin.idl MimeType.idl - GLOBAL_IDLSRC= Window.idl XPCOM_DESTDIR=$(DEPTH)\dom\public\base diff --git a/mozilla/dom/public/idl/html/HTMLOptionElement.idl b/mozilla/dom/public/idl/html/HTMLOptionElement.idl index 26b1a16e6a0..8bf415e755f 100644 --- a/mozilla/dom/public/idl/html/HTMLOptionElement.idl +++ b/mozilla/dom/public/idl/html/HTMLOptionElement.idl @@ -2,6 +2,8 @@ /* IID: { 0xa6cf9092, 0x15b3, 0x11d2, \ { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + void HTMLOptionElement(); + readonly attribute HTMLFormElement form; attribute boolean defaultSelected; readonly attribute DOMString text; @@ -11,3 +13,10 @@ readonly attribute boolean selected; attribute DOMString value; }; + + interface Option { + /* IID: { 0xa6cf90f3, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + void Option(); + }; diff --git a/mozilla/dom/public/makefile.win b/mozilla/dom/public/makefile.win index c07a90a995b..f020dac7eb9 100644 --- a/mozilla/dom/public/makefile.win +++ b/mozilla/dom/public/makefile.win @@ -22,6 +22,7 @@ DIRS=base coreDom coreEvents range events html css DEFINES=-D_IMPL_NS_DOM EXPORTS=nsIScriptContext.h \ nsIJSScriptObject.h \ + nsIJSNativeInitializer.h \ nsIScriptObjectOwner.h \ nsIScriptGlobalObject.h \ nsIScriptContextOwner.h \ diff --git a/mozilla/dom/public/nsIJSNativeInitializer.h b/mozilla/dom/public/nsIJSNativeInitializer.h new file mode 100644 index 00000000000..0cf726b5285 --- /dev/null +++ b/mozilla/dom/public/nsIJSNativeInitializer.h @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +#ifndef nsIJSNativeInitializer_h__ +#define nsIJSNativeInitializer_h__ + +#include "nsISupports.h" +#include "jsapi.h" + +#define NS_IJSNATIVEINITIALIZER_IID \ +{0xa6cf90f4, 0x15b3, 0x11d2, \ + {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}} + +/** + * A JavaScript specific interface used to initialize new + * native objects, created as a result of calling a + * JavaScript constructor. The arguments are passed in + * their raw form as jsval's. + */ + +class nsIJSNativeInitializer : public nsISupports { +public: + /** + * Intialize a newly created native instance using the parameters + * passed into the JavaScript constructor. + */ + NS_IMETHOD Initialize(JSContext* cx, PRUint32 argc, jsval *argv) = 0; +}; + + +#endif // nsIJSNativeInitializer_h__ diff --git a/mozilla/dom/public/nsIJSScriptObject.h b/mozilla/dom/public/nsIJSScriptObject.h index 073edc47dff..ec2f1abac3d 100644 --- a/mozilla/dom/public/nsIJSScriptObject.h +++ b/mozilla/dom/public/nsIJSScriptObject.h @@ -28,7 +28,7 @@ {0xb7, 0x24, 0x00, 0x60, 0x08, 0x91, 0xd8, 0xc9} } /** - * A java script specific interface. + * A JavaScript specific interface. *

* It's implemented by an object that has to execute specific java script * behavior like the array semantic. @@ -36,6 +36,7 @@ * It is used by the script runtime to collect information about an object */ class nsIJSScriptObject : public nsISupports { + static const nsIID& GetIID() { static nsIID iid = NS_IJSSCRIPTOBJECT_IID; return iid; } public: virtual PRBool AddProperty(JSContext *aContext, jsval aID, jsval *aVp) = 0;