# HG changeset patch # User John Reimer # Date 1217984578 25200 # Node ID 4c1340edee0d6c78a0c6675c8debed74e2abe6f7 # Parent a67ca5131db1766fc597334db40d147f78463016# Parent 75cb516e281e47e8ad64094ff575e8fe3190dcaf merge diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/AppFileLocProvider.d --- a/dwt/browser/AppFileLocProvider.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/AppFileLocProvider.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,103 +7,91 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Port to the D programming language: - * John Reimer + * Port to the D programming language: + * John Reimer *******************************************************************************/ +module dwt.browser.AppFileLocProvider; -module dwt.browser.AppFileLocProvider; +import tango.sys.Environment; +import tango.text.Util; import dwt.dwthelper.utils; import dwt.internal.Compatibility; - +import dwt.internal.mozilla.XPCOM; +import dwt.internal.mozilla.XPCOMObject; import dwt.internal.mozilla.nsEmbedString; import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsIDirectoryService; +import dwt.internal.mozilla.nsIDirectoryServiceProvider; +import dwt.internal.mozilla.nsIDirectoryServiceProvider2; import dwt.internal.mozilla.nsIFile; import dwt.internal.mozilla.nsILocalFile; import dwt.internal.mozilla.nsISupports; -class AppFileLocProvider : nsISupports, nsIDirectoryServiceProvider2 -{ - // XPCOMObject supports; - // XPCOMObject directoryServiceProvider; - // XPCOMObject directoryServiceProvider2; - nsrefcnt _refCount = 0; - String mozillaPath, profilePath; +class AppFileLocProvider : directoryServiceProvider2 { + int refCount = 0; + String mozillaPath, profilePath; String[] pluginDirs; - bool isXULRunner; + bool isXULRunner; - static String SEPARATOR_OS = System.getProperty ("file.separator"); //$NON-NLS-1$ - static String CHROME_DIR = "chrome"; //$NON-NLS-1$ - static String COMPONENTS_DIR = "components"; //$NON-NLS-1$ - static String HISTORY_FILE = "history.dat"; //$NON-NLS-1$ - static String LOCALSTORE_FILE = "localstore.rdf"; //$NON-NLS-1$ - static String MIMETYPES_FILE = "mimeTypes.rdf"; //$NON-NLS-1$ - static String PLUGINS_DIR = "plugins"; //$NON-NLS-1$ - static String USER_PLUGINS_DIR = ".mozilla" + SEPARATOR_OS + "plugins"; //$NON-NLS-1$ //$NON-NLS-2$ - static String PREFERENCES_FILE = "prefs.js"; //$NON-NLS-1$ + static final String SEPARATOR_OS = System.getProperty ("file.separator"); //$NON-NLS-1$ + static final String CHROME_DIR = "chrome"; //$NON-NLS-1$ + static final String COMPONENTS_DIR = "components"; //$NON-NLS-1$ + static final String HISTORY_FILE = "history.dat"; //$NON-NLS-1$ + static final String LOCALSTORE_FILE = "localstore.rdf"; //$NON-NLS-1$ + static final String MIMETYPES_FILE = "mimeTypes.rdf"; //$NON-NLS-1$ + static final String PLUGINS_DIR = "plugins"; //$NON-NLS-1$ + static final String USER_PLUGINS_DIR = ".mozilla" ~ SEPARATOR_OS ~ "plugins"; //$NON-NLS-1$ //$NON-NLS-2$ + static final String PREFERENCES_FILE = "prefs.js"; //$NON-NLS-1$ -AppFileLocProvider (String path) { - mozillaPath = path + SEPARATOR_OS; - createCOMInterfaces (); +this (String path) { + mozillaPath = path ~ SEPARATOR_OS;f +} + +int AddRef () { + refCount++; + return refCount; } - int AddRef () - { - refCount++; - return refCount; - } - - nsresult QueryInterface ( nsIID* riid, void** ppvObject) - { - if (riid is null || ppvObject is null) - return NS_ERROR_NO_INTERFACE; - - if (riid == nsISupports.IID) - { - *ppvObject =cast(void*)cast(nsISupports)this; - AddRef (); - return NS_OK; - } +int QueryInterface (nsID* riid, int void** ppvObject) { + if (riid is null || ppvObject is null) return XPCOM.NS_ERROR_NO_INTERFACE; - if (riid == nsIDirectoryServiceProvider.IID) - { - *ppvObject = cast(void*)cast(nsIDirectoryServiceProvider)this; - AddRef (); - return NS_OK; - } + if (*riid == nsISupports.IID)) { + *ppvObject = cast(void*)cast(nsISupports)this; + AddRef (); + return XPCOM.NS_OK; + } + if (*riid == nsIDirectoryServiceProvider.IID) { + *ppvObject = cast(void*)cast(nsIDirectoryServiceProvider)this; + AddRef (); + return XPCOM.NS_OK; + } + if (*riid == nsIDirectoryServiceProvider2.IID) { + *ppvObject = cast(void*)cast(nsIDirectoryServiceProvider2)this; + AddRef (); + return XPCOM.NS_OK; + } + + *ppvObject = null; + return XPCOM.NS_ERROR_NO_INTERFACE; +} - if (riid == nsDirectoryServiceProvider2.IID) { - *ppvObject = cast(void*)cast(nsIDirectoryServiceProvider2)this; - AddRef (); - return NS_OK; - } - - *ppvObject = null; - return NS_ERROR_NO_INTERFACE; - } - - nsrefcnt Release () - { - _refCount--; - if (_refCount is 0) - return 0; - return _refCount; - } +int Release () { + refCount--; + if (refCount is 0) return 0; + return refCount; +} void setProfilePath (String path) { profilePath = path; if (!Compatibility.fileExists (path, "")) { //$NON-NLS-1$ - int /*long*/[] result = new int /*long*/[1]; - nsEmbedString pathString = new nsEmbedString (path); - int rc = XPCOM.NS_NewLocalFile (pathString.getAddress (), 1, result); + nsILocalFile result; + scope auto nsEmbedString pathString = new nsEmbedString (path); + int rc = XPCOM.NS_NewLocalFile (cast(nsAString*)pathString, 1, &result); if (rc !is XPCOM.NS_OK) Mozilla.error (rc); - if (result[0] is 0) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER); - pathString.dispose (); + if (result is null) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER); - nsILocalFile file = new nsILocalFile (result [0]); - rc = file.Create (nsILocalFile.DIRECTORY_TYPE, 0700); + rc = result.Create (nsILocalFile.DIRECTORY_TYPE, 0700); if (rc !is XPCOM.NS_OK) Mozilla.error (rc); file.Release (); } @@ -111,43 +99,20 @@ /* nsIDirectoryServiceProvider2 */ -int getFiles (int /*long*/ prop, int /*long*/ _retval) { - int size = XPCOM.strlen (prop); - byte[] bytes = new byte[size]; - XPCOM.memmove (bytes, prop, size); - String propertyName = new String (MozillaDelegate.mbcsToWcs (null, bytes)); +nsresult GetFiles (char* prop, nsISimpleEnumerator* _retval) { + String propertyName = tango.stdc.stringz.fromStringz( prop ); String[] propertyValues = null; - if (propertyName.equals (XPCOM.NS_APP_PLUGINS_DIR_LIST)) { + if (propertyName == XPCOM.NS_APP_PLUGINS_DIR_LIST) { if (pluginDirs is null) { int index = 0; /* set the first value(s) to the MOZ_PLUGIN_PATH environment variable value if it's defined */ - int /*long*/ ptr = C.getenv (MozillaDelegate.wcsToMbcs (null, XPCOM.MOZILLA_PLUGIN_PATH, true)); - if (ptr !is 0) { - int length = C.strlen (ptr); - byte[] buffer = new byte[length]; - C.memmove (buffer, ptr, length); - String value = new String (MozillaDelegate.mbcsToWcs (null, buffer)); - if (value.length () > 0) { + String value = Environment.get (XPCOM.MOZILLA_PLUGIN_PATH); + if (ptr !is null) { + if (value.length > 0) { String separator = System.getProperty ("path.separator"); // $NON-NLS-1$ - Vector segments = new Vector (); - int start, end = -1; - do { - start = end + 1; - end = value.indexOf (separator, start); - String segment; - if (end is -1) { - segment = value.substring (start); - } else { - segment = value.substring (start, end); - } - if (segment.length () > 0) segments.addElement (segment); - } while (end !is -1); - int segmentsSize = segments.size (); - pluginDirs = new String [segmentsSize + 2]; - for (index = 0; index < segmentsSize; index++) { - pluginDirs[index] = (String)segments.elementAt (index); - } + foreach (segment; delimiter(value, separator)) + pluginDirs ~= segment; } } if (pluginDirs is null) { @@ -155,39 +120,36 @@ } /* set the next value to the GRE path + "plugins" */ - pluginDirs[index++] = mozillaPath + PLUGINS_DIR; + pluginDirs ~= mozillaPath ~ PLUGINS_DIR; /* set the next value to the home directory + "/.mozilla/plugins" */ - pluginDirs[index++] = System.getProperty("user.home") + SEPARATOR_OS + USER_PLUGINS_DIR; + pluginDirs ~= System.getProperty("user.home") ~ SEPARATOR_OS ~ USER_PLUGINS_DIR; } propertyValues = pluginDirs; } - XPCOM.memmove(_retval, new int /*long*/[] {0}, C.PTR_SIZEOF); + *_retval = null; + //XPCOM.memmove(_retval, new int /*long*/[] {0}, C.PTR_SIZEOF); if (propertyValues !is null) { - int /*long*/[] result = new int /*long*/[1]; + nsILocalFile localFile; + nsIFile file; nsISupports[] files = new nsISupports [propertyValues.length]; int index = 0; for (int i = 0; i < propertyValues.length; i++) { - nsEmbedString pathString = new nsEmbedString (propertyValues[i]); - int rc = XPCOM.NS_NewLocalFile (pathString.getAddress (), 1, result); + scope auto pathString = new nsEmbedString (propertyValues[i]); + int rc = XPCOM.NS_NewLocalFile (cast(nsAString*)pathString, 1, &(cast(void*)localFile)); if (rc !is XPCOM.NS_ERROR_FILE_UNRECOGNIZED_PATH) { /* value appears to be a valid pathname */ if (rc !is XPCOM.NS_OK) Mozilla.error (rc); - if (result[0] is 0) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER); + if (localFile is null) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER); - nsILocalFile localFile = new nsILocalFile (result[0]); - result[0] = 0; - rc = localFile.QueryInterface (nsIFile.NS_IFILE_IID, result); + rc = localFile.QueryInterface (nsIFile.NS_IFILE_IID, &(cast(void*)file)); if (rc !is XPCOM.NS_OK) Mozilla.error (rc); - if (result[0] is 0) Mozilla.error (XPCOM.NS_ERROR_NO_INTERFACE); + if (file is null) Mozilla.error (XPCOM.NS_ERROR_NO_INTERFACE); localFile.Release (); - nsIFile file = new nsIFile (result[0]); - files[index++] = file; + files[index++] = cast(nsISupports)file; } - pathString.dispose (); - result[0] = 0; } if (index < propertyValues.length) { @@ -197,9 +159,9 @@ files = temp; } - SimpleEnumerator enumerator = new SimpleEnumerator (files); + auto enumerator = new SimpleEnumerator (files); enumerator.AddRef (); - XPCOM.memmove (_retval, new int /*long*/[] {enumerator.getAddress ()}, C.PTR_SIZEOF); + *_retval = cast(nsISimpleEnumerator)enumerator; return XPCOM.NS_OK; } @@ -208,46 +170,43 @@ /* nsIDirectoryServiceProvider implementation */ -int getFile(int /*long*/ prop, int /*long*/ persistent, int /*long*/ _retval) { - int size = XPCOM.strlen (prop); - byte[] bytes = new byte[size]; - XPCOM.memmove (bytes, prop, size); - String propertyName = new String (MozillaDelegate.mbcsToWcs (null, bytes)); +nsresult GetFile(char* prop, PRBool* persistent, nsIFile* _retval) { + String propertyName = tango.stdc.stringz.fromStringz( prop ); String propertyValue = null; - if (propertyName.equals (XPCOM.NS_APP_HISTORY_50_FILE)) { - propertyValue = profilePath + HISTORY_FILE; - } else if (propertyName.equals (XPCOM.NS_APP_USER_MIMETYPES_50_FILE)) { - propertyValue = profilePath + MIMETYPES_FILE; - } else if (propertyName.equals (XPCOM.NS_APP_PREFS_50_FILE)) { - propertyValue = profilePath + PREFERENCES_FILE; - } else if (propertyName.equals (XPCOM.NS_APP_PREFS_50_DIR)) { + if (propertyName == (XPCOM.NS_APP_HISTORY_50_FILE)) { + propertyValue = profilePath ~ HISTORY_FILE; + } else if (propertyName == (XPCOM.NS_APP_USER_MIMETYPES_50_FILE)) { + propertyValue = profilePath ~ MIMETYPES_FILE; + } else if (propertyName == (XPCOM.NS_APP_PREFS_50_FILE)) { + propertyValue = profilePath ~ PREFERENCES_FILE; + } else if (propertyName == (XPCOM.NS_APP_PREFS_50_DIR)) { propertyValue = profilePath; - } else if (propertyName.equals (XPCOM.NS_APP_USER_CHROME_DIR)) { - propertyValue = profilePath + CHROME_DIR; - } else if (propertyName.equals (XPCOM.NS_APP_USER_PROFILE_50_DIR)) { + } else if (propertyName == (XPCOM.NS_APP_USER_CHROME_DIR)) { + propertyValue = profilePath ~ CHROME_DIR; + } else if (propertyName == (XPCOM.NS_APP_USER_PROFILE_50_DIR)) { propertyValue = profilePath; - } else if (propertyName.equals (XPCOM.NS_APP_LOCALSTORE_50_FILE)) { - propertyValue = profilePath + LOCALSTORE_FILE; - } else if (propertyName.equals (XPCOM.NS_APP_CACHE_PARENT_DIR)) { + } else if (propertyName == (XPCOM.NS_APP_LOCALSTORE_50_FILE)) { + propertyValue = profilePath ~ LOCALSTORE_FILE; + } else if (propertyName == (XPCOM.NS_APP_CACHE_PARENT_DIR)) { propertyValue = profilePath; - } else if (propertyName.equals (XPCOM.NS_OS_HOME_DIR)) { + } else if (propertyName == (XPCOM.NS_OS_HOME_DIR)) { propertyValue = System.getProperty("user.home"); //$NON-NLS-1$ - } else if (propertyName.equals (XPCOM.NS_OS_TEMP_DIR)) { + } else if (propertyName == (XPCOM.NS_OS_TEMP_DIR)) { propertyValue = System.getProperty("java.io.tmpdir"); //$NON-NLS-1$ - } else if (propertyName.equals (XPCOM.NS_GRE_DIR)) { + } else if (propertyName == (XPCOM.NS_GRE_DIR)) { propertyValue = mozillaPath; - } else if (propertyName.equals (XPCOM.NS_GRE_COMPONENT_DIR)) { - propertyValue = mozillaPath + COMPONENTS_DIR; - } else if (propertyName.equals (XPCOM.NS_XPCOM_INIT_CURRENT_PROCESS_DIR)) { + } else if (propertyName == (XPCOM.NS_GRE_COMPONENT_DIR)) { + propertyValue = mozillaPath ~ COMPONENTS_DIR; + } else if (propertyName == (XPCOM.NS_XPCOM_INIT_CURRENT_PROCESS_DIR)) { propertyValue = mozillaPath; - } else if (propertyName.equals (XPCOM.NS_OS_CURRENT_PROCESS_DIR)) { + } else if (propertyName == (XPCOM.NS_OS_CURRENT_PROCESS_DIR)) { propertyValue = mozillaPath; - } else if (propertyName.equals (XPCOM.NS_XPCOM_COMPONENT_DIR)) { - propertyValue = mozillaPath + COMPONENTS_DIR; - } else if (propertyName.equals (XPCOM.NS_XPCOM_CURRENT_PROCESS_DIR)) { + } else if (propertyName == (XPCOM.NS_XPCOM_COMPONENT_DIR)) { + propertyValue = mozillaPath ~ COMPONENTS_DIR; + } else if (propertyName == (XPCOM.NS_XPCOM_CURRENT_PROCESS_DIR)) { propertyValue = mozillaPath; - } else if (propertyName.equals (XPCOM.NS_APP_PREF_DEFAULTS_50_DIR)) { + } else if (propertyName == (XPCOM.NS_APP_PREF_DEFAULTS_50_DIR)) { /* * Answering a value for this property causes problems in Mozilla versions * < 1.7. Unfortunately this property is queried early enough in the @@ -261,23 +220,21 @@ if (isXULRunner) propertyValue = profilePath; } - XPCOM.memmove (persistent, new int[] {1}, 4); /* PRBool */ - XPCOM.memmove (_retval, new int /*long*/[] {0}, C.PTR_SIZEOF); - if (propertyValue !is null && propertyValue.length () > 0) { - int /*long*/[] result = new int /*long*/[1]; - nsEmbedString pathString = new nsEmbedString (propertyValue); - int rc = XPCOM.NS_NewLocalFile (pathString.getAddress (), 1, result); + *persistent = true; /* PRBool */ + *_retval = null; + if (propertyValue !is null && propertyValue.length > 0) { + nsILocalFile localFile; + scope auto pathString = new nsEmbedString (propertyValue); + int rc = XPCOM.NS_NewLocalFile (cast(nsAString*)pathString, 1, &(cast(void*)localFile)); if (rc !is XPCOM.NS_OK) Mozilla.error (rc); - if (result[0] is 0) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER); - pathString.dispose (); + if (localFile is null) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER); - nsILocalFile localFile = new nsILocalFile (result [0]); - result[0] = 0; - rc = localFile.QueryInterface (nsIFile.NS_IFILE_IID, result); + nsIFile file; + rc = localFile.QueryInterface (nsIFile.NS_IFILE_IID, &(cast(void*)file)); if (rc !is XPCOM.NS_OK) Mozilla.error (rc); - if (result[0] is 0) Mozilla.error (XPCOM.NS_ERROR_NO_INTERFACE); + if (file is null) Mozilla.error (XPCOM.NS_ERROR_NO_INTERFACE); - XPCOM.memmove (_retval, new int /*long*/[] {result[0]}, C.PTR_SIZEOF); + *_retval = file; localFile.Release (); return XPCOM.NS_OK; } diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/Browser.d --- a/dwt/browser/Browser.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/Browser.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,6 +7,8 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Port to the D programming language: + * John Reimer *******************************************************************************/ module dwt.browser.Browser; @@ -40,7 +42,7 @@ * @since 3.0 */ -public class Browser extends Composite { +public class Browser : Composite { WebBrowser webBrowser; int userStyle; @@ -77,40 +79,23 @@ * * @since 3.0 */ -public Browser (Composite parent, int style) { +public this (Composite parent, int style) { super (checkParent (parent), checkStyle (style)); userStyle = style; String platform = DWT.getPlatform (); Display display = parent.getDisplay (); - if ("gtk".equals (platform)) display.setData (NO_INPUT_METHOD, null); //$NON-NLS-1$ + if ("gtk" == platform) display.setData (NO_INPUT_METHOD, null); //$NON-NLS-1$ + /* String className = null; if ((style & DWT.MOZILLA) !is 0) { className = "dwt.browser.Mozilla"; //$NON-NLS-1$ } else { - if ("win32".equals (platform) || "wpf".equals (platform)) { //$NON-NLS-1$ $NON-NLS-2$ - className = "dwt.browser.IE"; //$NON-NLS-1$ - } else if ("motif".equals (platform)) { //$NON-NLS-1$ - className = "dwt.browser.Mozilla"; //$NON-NLS-1$ - } else if ("gtk".equals (platform)) { //$NON-NLS-1$ - className = "dwt.browser.Mozilla"; //$NON-NLS-1$ - } else if ("carbon".equals (platform) || "cocoa".equals (platform)) { //$NON-NLS-1$ - className = "dwt.browser.Safari"; //$NON-NLS-1$ - } else if ("photon".equals (platform)) { //$NON-NLS-1$ - className = "dwt.browser.Voyager"; //$NON-NLS-1$ - } else { - dispose (); - DWT.error (DWT.ERROR_NO_HANDLES); - } + dispose(); + DWT.error(DWT.ERROR_NO_HANDLES); } - - try { - Class clazz = Class.forName (className); - webBrowser = (WebBrowser)clazz.newInstance (); - } catch (ClassNotFoundException e) { - } catch (IllegalAccessException e) { - } catch (InstantiationException e) { - } + */ + auto webBrowser = new Mozilla; if (webBrowser is null) { dispose (); DWT.error (DWT.ERROR_NO_HANDLES); @@ -122,7 +107,7 @@ static Composite checkParent (Composite parent) { String platform = DWT.getPlatform (); - if (!"gtk".equals (platform)) return parent; //$NON-NLS-1$ + if (!("gtk" == platform)) return parent; //$NON-NLS-1$ /* * Note. Mozilla provides all IM support needed for text input in web pages. @@ -144,18 +129,18 @@ static int checkStyle(int style) { String platform = DWT.getPlatform (); if ((style & DWT.MOZILLA) !is 0) { - if ("carbon".equals (platform)) return style | DWT.EMBEDDED; //$NON-NLS-1$ - if ("motif".equals (platform)) return style | DWT.EMBEDDED; //$NON-NLS-1$ + if ("carbon" == platform) return style | DWT.EMBEDDED; //$NON-NLS-1$ + if ("motif" == platform) return style | DWT.EMBEDDED; //$NON-NLS-1$ return style; } - if ("win32".equals (platform)) { //$NON-NLS-1$ + if ("win32" == platform) { //$NON-NLS-1$ /* * For IE on win32 the border is supplied by the embedded browser, so remove * the style so that the parent Composite will not draw a second border. */ return style & ~DWT.BORDER; - } else if ("motif".equals (platform)) { //$NON-NLS-1$ + } else if ("motif" == platform) { //$NON-NLS-1$ return style | DWT.EMBEDDED; } return style; @@ -371,9 +356,10 @@ } protected void checkSubclass () { - String name = getClass ().getName (); - int index = name.lastIndexOf ('.'); - if (!name.substring (0, index + 1).equals (PACKAGE_PREFIX)) { + String name = this.classinfo.name; + + int index = tango.text.Util.locatePrior(name, '.'); + if (!(name[0 .. index + 1] == PACKAGE_PREFIX)) { DWT.error (DWT.ERROR_INVALID_SUBCLASS); } } diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/CloseWindowListener.d --- a/dwt/browser/CloseWindowListener.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/CloseWindowListener.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,11 +7,11 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Port to the D programming language: + * John Reimer *******************************************************************************/ module dwt.browser.CloseWindowListener; -import dwt.dwthelper.utils; - import dwt.internal.DWTEventListener; /** @@ -47,5 +47,5 @@ * * @since 3.0 */ - public void close(WindowEvent event); +public void close(WindowEvent event); } diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/Download.d --- a/dwt/browser/Download.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/Download.d Tue Aug 05 18:02:58 2008 -0700 @@ -8,14 +8,14 @@ * Contributors: * IBM Corporation - initial API and implementation * Port to the D programming language: - * John Reimer + * John Reimer *******************************************************************************/ module dwt.browser.Download; import dwt.dwthelper.utils; import dwt.DWT; -import dwt.internal.C; + import dwt.internal.Compatibility; import dwt.internal.mozilla.XPCOM; import dwt.internal.mozilla.XPCOMObject; @@ -35,11 +35,7 @@ import dwt.widgets.Listener; import dwt.widgets.Shell; -class Download { - XPCOMObject supports; - XPCOMObject download; - XPCOMObject progressDialog; - XPCOMObject webProgressListener; +class Download : nsIProgressDialog { nsIHelperAppLauncher helperAppLauncher; int refCount = 0; @@ -47,8 +43,7 @@ Label status; Button cancel; -Download () { - createCOMInterfaces (); +this () { } int AddRef () { @@ -56,134 +51,46 @@ return refCount; } -void createCOMInterfaces () { - /* Create each of the interfaces that this object implements */ - supports = new XPCOMObject (new int[] {2, 0, 0}) { - public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} - public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} - public int /*long*/ method2 (int /*long*/[] args) {return Release ();} - }; - - download = new XPCOMObject (new int[] {2, 0, 0, 7, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1}) { - public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} - public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} - public int /*long*/ method2 (int /*long*/[] args) {return Release ();} - public int /*long*/ method3 (int /*long*/[] args) {return Init (args[0], args[1], args[2], args[3], args[4], args[5], args[6]);} - public int /*long*/ method4 (int /*long*/[] args) {return GetSource (args[0]);} - public int /*long*/ method5 (int /*long*/[] args) {return GetTarget (args[0]);} - public int /*long*/ method6 (int /*long*/[] args) {return GetPersist (args[0]);} - public int /*long*/ method7 (int /*long*/[] args) {return GetPercentComplete (args[0]);} - public int /*long*/ method8 (int /*long*/[] args) {return GetDisplayName (args[0]);} - public int /*long*/ method9 (int /*long*/[] args) {return SetDisplayName (args[0]);} - public int /*long*/ method10 (int /*long*/[] args) {return GetStartTime (args[0]);} - public int /*long*/ method11 (int /*long*/[] args) {return GetMIMEInfo (args[0]);} - public int /*long*/ method12 (int /*long*/[] args) {return GetListener (args[0]);} - public int /*long*/ method13 (int /*long*/[] args) {return SetListener (args[0]);} - public int /*long*/ method14 (int /*long*/[] args) {return GetObserver (args[0]);} - public int /*long*/ method15 (int /*long*/[] args) {return SetObserver (args[0]);} - }; - - progressDialog = new XPCOMObject (new int[] {2, 0, 0, 7, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) { - public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} - public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} - public int /*long*/ method2 (int /*long*/[] args) {return Release ();} - public int /*long*/ method3 (int /*long*/[] args) {return Init (args[0], args[1], args[2], args[3], args[4], args[5], args[6]);} - public int /*long*/ method4 (int /*long*/[] args) {return GetSource (args[0]);} - public int /*long*/ method5 (int /*long*/[] args) {return GetTarget (args[0]);} - public int /*long*/ method6 (int /*long*/[] args) {return GetPersist (args[0]);} - public int /*long*/ method7 (int /*long*/[] args) {return GetPercentComplete (args[0]);} - public int /*long*/ method8 (int /*long*/[] args) {return GetDisplayName (args[0]);} - public int /*long*/ method9 (int /*long*/[] args) {return SetDisplayName (args[0]);} - public int /*long*/ method10 (int /*long*/[] args) {return GetStartTime (args[0]);} - public int /*long*/ method11 (int /*long*/[] args) {return GetMIMEInfo (args[0]);} - public int /*long*/ method12 (int /*long*/[] args) {return GetListener (args[0]);} - public int /*long*/ method13 (int /*long*/[] args) {return SetListener (args[0]);} - public int /*long*/ method14 (int /*long*/[] args) {return GetObserver (args[0]);} - public int /*long*/ method15 (int /*long*/[] args) {return SetObserver (args[0]);} - public int /*long*/ method16 (int /*long*/[] args) {return Open (args[0]);} - public int /*long*/ method17 (int /*long*/[] args) {return GetCancelDownloadOnClose (args[0]);} - public int /*long*/ method18 (int /*long*/[] args) {return SetCancelDownloadOnClose ((int)/*64*/args[0]);} - public int /*long*/ method19 (int /*long*/[] args) {return GetDialog (args[0]);} - public int /*long*/ method20 (int /*long*/[] args) {return SetDialog (args[0]);} - }; - - webProgressListener = new XPCOMObject (new int[] {2, 0, 0, 4, 6, 3, 4, 3}) { - public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} - public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} - public int /*long*/ method2 (int /*long*/[] args) {return Release ();} - public int /*long*/ method3 (int /*long*/[] args) {return OnStateChange (args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3]);} - public int /*long*/ method4 (int /*long*/[] args) {return OnProgressChange (args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3], (int)/*64*/args[4], (int)/*64*/args[5]);} - public int /*long*/ method5 (int /*long*/[] args) {return OnLocationChange (args[0], args[1], args[2]);} - public int /*long*/ method6 (int /*long*/[] args) {return OnStatusChange (args[0], args[1], (int)/*64*/args[2], args[3]);} - public int /*long*/ method7 (int /*long*/[] args) {return OnSecurityChange (args[0], args[1], (int)/*64*/args[2]);} - }; -} - -void disposeCOMInterfaces () { - if (supports !is null) { - supports.dispose (); - supports = null; - } - if (download !is null) { - download.dispose (); - download = null; - } - if (progressDialog !is null) { - progressDialog.dispose (); - progressDialog = null; - } - if (webProgressListener !is null) { - webProgressListener.dispose (); - webProgressListener = null; - } -} - -int /*long*/ getAddress () { - return progressDialog.getAddress (); -} - -int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) { - if (riid is 0 || ppvObject is 0) return XPCOM.NS_ERROR_NO_INTERFACE; - nsID guid = new nsID (); - XPCOM.memmove (guid, riid, nsID.sizeof); - - if (guid.Equals (nsISupports.NS_ISUPPORTS_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {supports.getAddress ()}, C.PTR_SIZEOF); +int QueryInterface (nsID* riid, void** ppvObject) { + if (riid is null || ppvObject is null) return XPCOM.NS_ERROR_NO_INTERFACE; + + if (*riid == nsISupports.IID)) { + *ppvObject = cast(void*)cast(nsISupports)this; AddRef(); return XPCOM.NS_OK; } - if (guid.Equals (nsIDownload.NS_IDOWNLOAD_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {download.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsIDownload.IID) { + *ppvObject = cast(void*)cast(nsIDownload)this; AddRef(); return XPCOM.NS_OK; } - if (guid.Equals (nsIProgressDialog.NS_IPROGRESSDIALOG_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {progressDialog.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsIProgressDialog.IID) { + *ppvObject = cast(void*)cast(nsIProgressDialog)this; AddRef(); return XPCOM.NS_OK; } - if (guid.Equals (nsIWebProgressListener.NS_IWEBPROGRESSLISTENER_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {webProgressListener.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsIWebProgressListener.IID) { + *ppvObject = cast(void*)cast(nsIWebProgressListener)this; AddRef(); return XPCOM.NS_OK; } - XPCOM.memmove (ppvObject, new int /*long*/[] {0}, C.PTR_SIZEOF); + *ppvObject = null; return XPCOM.NS_ERROR_NO_INTERFACE; } int Release () { refCount--; - if (refCount is 0) disposeCOMInterfaces (); + if (refCount is 0) return 0; return refCount; } /* nsIDownload */ /* Note. The argument startTime is defined as a PRInt64. This translates into two java ints. */ -int Init (int /*long*/ aSource, int /*long*/ aTarget, int /*long*/ aDisplayName, int /*long*/ aMIMEInfo, int /*long*/ startTime1, int /*long*/ startTime2, int /*long*/ aPersist) { +int Init (nsIURI aSource, nsIURI aTarget, nsAString* aDisplayName, nsIMIMEInfo aMIMEInfo, PRTime startTime, PRBool aPersist) { nsIURI source = new nsIURI (aSource); - int /*long*/ aSpec = XPCOM.nsEmbedCString_new (); - int rc = source.GetHost (aSpec); + scope auto aSpec = new nsEmbedString; + int rc = source.GetHost (cast(nsAString*)aSpec); if (rc !is XPCOM.NS_OK) Mozilla.error (rc); int length = XPCOM.nsEmbedCString_Length (aSpec); int /*long*/ buffer = XPCOM.nsEmbedCString_get (aSpec); @@ -280,7 +187,7 @@ return XPCOM.NS_ERROR_NOT_IMPLEMENTED; } -int GetPersist (int /*long*/ aPersist) { +int GetPersist (PRBool* aPersist) { return XPCOM.NS_ERROR_NOT_IMPLEMENTED; } @@ -312,11 +219,11 @@ return XPCOM.NS_ERROR_NOT_IMPLEMENTED; } -int GetObserver (int /*long*/ aObserver) { +nsresult GetObserver (nsIObserver* aObserver) { return XPCOM.NS_ERROR_NOT_IMPLEMENTED; } -int SetObserver (int /*long*/ aObserver) { +nsresult SetObserver (nsIOBserver aObserver) { if (aObserver !is 0) { nsISupports supports = new nsISupports (aObserver); int /*long*/[] result = new int /*long*/[1]; @@ -329,7 +236,7 @@ } /* nsIProgressDialog */ -int Open (int /*long*/ aParent) { +nsresult Open (int /*long*/ aParent) { return XPCOM.NS_ERROR_NOT_IMPLEMENTED; } diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/DownloadFactory.d --- a/dwt/browser/DownloadFactory.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/DownloadFactory.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,72 +7,100 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Port to the D programming language: - * John Reimer *******************************************************************************/ module dwt.browser.DownloadFactory; import dwt.dwthelper.utils; -import dwt.browser.Download; - +import dwt.internal.C; +import dwt.internal.mozilla.XPCOM; +import dwt.internal.mozilla.XPCOMObject; import dwt.internal.mozilla.nsID; import dwt.internal.mozilla.nsIFactory; import dwt.internal.mozilla.nsISupports; -class DownloadFactory : nsIFactory -{ - int _refCount = 0; +class DownloadFactory { + XPCOMObject supports; + XPCOMObject factory; + int refCount = 0; + +DownloadFactory () { + createCOMInterfaces (); +} + +int AddRef () { + refCount++; + return refCount; +} - nsrefcnt AddRef () - { - _refCount++; - return _refCount; - } +void createCOMInterfaces () { + /* Create each of the interfaces that this object implements */ + supports = new XPCOMObject (new int[] {2, 0, 0}) { + public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} + public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} + public int /*long*/ method2 (int /*long*/[] args) {return Release ();} + }; + + factory = new XPCOMObject (new int[] {2, 0, 0, 3, 1}) { + public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} + public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} + public int /*long*/ method2 (int /*long*/[] args) {return Release ();} + public int /*long*/ method3 (int /*long*/[] args) {return CreateInstance (args[0], args[1], args[2]);} + public int /*long*/ method4 (int /*long*/[] args) {return LockFactory ((int)/*64*/args[0]);} + }; +} - int QueryInterface ( ref nsIID riid, void** ppvObject) - { - if (riid is null || ppvObject is null) - return NS_ERROR_NO_INTERFACE; - - if ( riid == nsISupports.IID) - { - *ppvObject = cast(void*)cast(nsISupports)this; - AddRef (); - return NS_OK; - } +void disposeCOMInterfaces () { + if (supports !is null) { + supports.dispose (); + supports = null; + } + if (factory !is null) { + factory.dispose (); + factory = null; + } +} + +int /*long*/ getAddress () { + return factory.getAddress (); +} - if ( riid == nsIFactory.IID) - { - *ppvObject = cast(void*)cast(nsIFactory)this; - AddRef (); - return NS_OK; - } +int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) { + if (riid is 0 || ppvObject is 0) return XPCOM.NS_ERROR_NO_INTERFACE; + nsID guid = new nsID (); + XPCOM.memmove (guid, riid, nsID.sizeof); - *ppvObject = null; - return NS_ERROR_NO_INTERFACE; + if (guid.Equals (nsISupports.NS_ISUPPORTS_IID)) { + XPCOM.memmove (ppvObject, new int /*long*/[] {supports.getAddress ()}, C.PTR_SIZEOF); + AddRef (); + return XPCOM.NS_OK; } + if (guid.Equals (nsIFactory.NS_IFACTORY_IID)) { + XPCOM.memmove (ppvObject, new int /*long*/[] {factory.getAddress ()}, C.PTR_SIZEOF); + AddRef (); + return XPCOM.NS_OK; + } + + XPCOM.memmove (ppvObject, new int /*long*/[] {0}, C.PTR_SIZEOF); + return XPCOM.NS_ERROR_NO_INTERFACE; +} - nsrefcnt Release () - { - _refCount--; - if (_refCount is 0) - _refCount = 0; - return _refCount; - } +int Release () { + refCount--; + if (refCount is 0) disposeCOMInterfaces (); + return refCount; +} /* nsIFactory */ - nsresult CreateInstance ( nsISupports aOuter, nsIID* iid, void** result) - { - Download download = new Download (); - download.AddRef (); - nsresult rv = download.QueryInterface( iid, result ); - return rv; - } +int CreateInstance (int /*long*/ aOuter, int /*long*/ iid, int /*long*/ result) { + Download download = new Download (); + download.AddRef (); + XPCOM.memmove (result, new int /*long*/[] {download.getAddress ()}, C.PTR_SIZEOF); + return XPCOM.NS_OK; +} - nsresult LockFactory (int lock) - { - return NS_OK; - } +int LockFactory (int lock) { + return XPCOM.NS_OK; } +} diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/DownloadFactory_1_8.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/Download_1_8.d --- a/dwt/browser/Download_1_8.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/Download_1_8.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,16 +7,17 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Port to the D programming language: + * John Reimer *******************************************************************************/ module dwt.browser.Download_1_8; import dwt.dwthelper.utils; import dwt.DWT; -import dwt.internal.C; + import dwt.internal.Compatibility; import dwt.internal.mozilla.XPCOM; -import dwt.internal.mozilla.XPCOMObject; import dwt.internal.mozilla.nsICancelable; import dwt.internal.mozilla.nsID; import dwt.internal.mozilla.nsIDownload_1_8; @@ -32,11 +33,7 @@ import dwt.widgets.Listener; import dwt.widgets.Shell; -class Download_1_8 { - XPCOMObject supports; - XPCOMObject download; - XPCOMObject progressDialog; - XPCOMObject webProgressListener; +class Download_1_8 : nsIProgressDialog_1_8 { nsICancelable cancelable; int refCount = 0; @@ -44,10 +41,9 @@ Label status; Button cancel; - static final bool is32 = C.PTR_SIZEOF is 4; + //static final bool is32 = C.PTR_SIZEOF is 4; //determine if 32 or 64 bit platform? -Download_1_8 () { - createCOMInterfaces (); +this () { } int AddRef () { @@ -55,158 +51,36 @@ return refCount; } -void createCOMInterfaces () { - /* Create each of the interfaces that this object implements */ - supports = new XPCOMObject (new int[] {2, 0, 0}) { - public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} - public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} - public int /*long*/ method2 (int /*long*/[] args) {return Release ();} - }; - - download = new XPCOMObject (new int[] {2, 0, 0, 4, 6, 3, 4, 3, is32 ? 10 : 6, is32 ? 8 : 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) { - public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} - public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} - public int /*long*/ method2 (int /*long*/[] args) {return Release ();} - public int /*long*/ method3 (int /*long*/[] args) {return OnStateChange (args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3]);} - public int /*long*/ method4 (int /*long*/[] args) {return OnProgressChange (args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3], (int)/*64*/args[4], (int)/*64*/args[5]);} - public int /*long*/ method5 (int /*long*/[] args) {return OnLocationChange (args[0], args[1], args[2]);} - public int /*long*/ method6 (int /*long*/[] args) {return OnStatusChange (args[0], args[1], (int)/*64*/args[2], args[3]);} - public int /*long*/ method7 (int /*long*/[] args) {return OnSecurityChange (args[0], args[1], (int)/*64*/args[2]);} - public int /*long*/ method8 (int /*long*/[] args) { - if (args.length is 10) { - return OnProgressChange64_32 (args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9]); - } else { - return OnProgressChange64 (args[0], args[1], args[2], args[3], args[4], args[5]); - } - } - public int /*long*/ method9 (int /*long*/[] args) { - if (args.length is 8) { - return Init_32 (args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]); - } else { - return Init (args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - } - public int /*long*/ method10 (int /*long*/[] args) {return GetTargetFile (args[0]);} - public int /*long*/ method11 (int /*long*/[] args) {return GetPercentComplete (args[0]);} - public int /*long*/ method12 (int /*long*/[] args) {return GetAmountTransferred (args[0]);} - public int /*long*/ method13 (int /*long*/[] args) {return GetSize (args[0]);} - public int /*long*/ method14 (int /*long*/[] args) {return GetSource (args[0]);} - public int /*long*/ method15 (int /*long*/[] args) {return GetTarget (args[0]);} - public int /*long*/ method16 (int /*long*/[] args) {return GetCancelable (args[0]);} - public int /*long*/ method17 (int /*long*/[] args) {return GetDisplayName (args[0]);} - public int /*long*/ method18 (int /*long*/[] args) {return GetStartTime (args[0]);} - public int /*long*/ method19 (int /*long*/[] args) {return GetMIMEInfo (args[0]);} - }; - - progressDialog = new XPCOMObject (new int[] {2, 0, 0, 4, 6, 3, 4, 3, is32 ? 10 : 6, is32 ? 8 : 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) { - public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} - public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} - public int /*long*/ method2 (int /*long*/[] args) {return Release ();} - public int /*long*/ method3 (int /*long*/[] args) {return OnStateChange (args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3]);} - public int /*long*/ method4 (int /*long*/[] args) {return OnProgressChange (args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3], (int)/*64*/args[4], (int)/*64*/args[5]);} - public int /*long*/ method5 (int /*long*/[] args) {return OnLocationChange (args[0], args[1], args[2]);} - public int /*long*/ method6 (int /*long*/[] args) {return OnStatusChange (args[0], args[1], (int)/*64*/args[2], args[3]);} - public int /*long*/ method7 (int /*long*/[] args) {return OnSecurityChange (args[0], args[1], (int)/*64*/args[2]);} - public int /*long*/ method8 (int /*long*/[] args) { - if (args.length is 10) { - return OnProgressChange64_32 (args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9]); - } else { - return OnProgressChange64 (args[0], args[1], args[2], args[3], args[4], args[5]); - } - } - public int /*long*/ method9 (int /*long*/[] args) { - if (args.length is 8) { - return Init_32 (args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]); - } else { - return Init (args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - } - public int /*long*/ method10 (int /*long*/[] args) {return GetTargetFile (args[0]);} - public int /*long*/ method11 (int /*long*/[] args) {return GetPercentComplete (args[0]);} - public int /*long*/ method12 (int /*long*/[] args) {return GetAmountTransferred (args[0]);} - public int /*long*/ method13 (int /*long*/[] args) {return GetSize (args[0]);} - public int /*long*/ method14 (int /*long*/[] args) {return GetSource (args[0]);} - public int /*long*/ method15 (int /*long*/[] args) {return GetTarget (args[0]);} - public int /*long*/ method16 (int /*long*/[] args) {return GetCancelable (args[0]);} - public int /*long*/ method17 (int /*long*/[] args) {return GetDisplayName (args[0]);} - public int /*long*/ method18 (int /*long*/[] args) {return GetStartTime (args[0]);} - public int /*long*/ method19 (int /*long*/[] args) {return GetMIMEInfo (args[0]);} - public int /*long*/ method20 (int /*long*/[] args) {return Open (args[0]);} - public int /*long*/ method21 (int /*long*/[] args) {return GetCancelDownloadOnClose (args[0]);} - public int /*long*/ method22 (int /*long*/[] args) {return SetCancelDownloadOnClose ((int)/*64*/args[0]);} - public int /*long*/ method23 (int /*long*/[] args) {return GetObserver (args[0]);} - public int /*long*/ method24 (int /*long*/[] args) {return SetObserver (args[0]);} - public int /*long*/ method25 (int /*long*/[] args) {return GetDialog (args[0]);} - public int /*long*/ method26 (int /*long*/[] args) {return SetDialog (args[0]);} - }; - - webProgressListener = new XPCOMObject (new int[] {2, 0, 0, 4, 6, 3, 4, 3}) { - public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} - public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} - public int /*long*/ method2 (int /*long*/[] args) {return Release ();} - public int /*long*/ method3 (int /*long*/[] args) {return OnStateChange (args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3]);} - public int /*long*/ method4 (int /*long*/[] args) {return OnProgressChange (args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3], (int)/*64*/args[4], (int)/*64*/args[5]);} - public int /*long*/ method5 (int /*long*/[] args) {return OnLocationChange (args[0], args[1], args[2]);} - public int /*long*/ method6 (int /*long*/[] args) {return OnStatusChange (args[0], args[1], (int)/*64*/args[2], args[3]);} - public int /*long*/ method7 (int /*long*/[] args) {return OnSecurityChange (args[0], args[1], (int)/*64*/args[2]);} - }; -} - -void disposeCOMInterfaces() { - if (supports !is null) { - supports.dispose (); - supports = null; - } - if (download !is null) { - download.dispose (); - download = null; - } - if (progressDialog !is null) { - progressDialog.dispose (); - progressDialog = null; - } - if (webProgressListener !is null) { - webProgressListener.dispose (); - webProgressListener = null; - } -} - -int /*long*/ getAddress () { - return progressDialog.getAddress (); -} - -int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) { - if (riid is 0 || ppvObject is 0) return XPCOM.NS_ERROR_NO_INTERFACE; - nsID guid = new nsID (); - XPCOM.memmove (guid, riid, nsID.sizeof); - - if (guid.Equals (nsISupports.NS_ISUPPORTS_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {supports.getAddress ()}, C.PTR_SIZEOF); +int QueryInterface ( nsID* riid, void** ppvObject) { + if (riid is null || ppvObject is null) return XPCOM.NS_ERROR_NO_INTERFACE; + + if (*riid == nsISupports.IID)) { + *ppvObject = cast(void*)cast(nsISupports)this; AddRef(); return XPCOM.NS_OK; } - if (guid.Equals (nsIDownload_1_8.NS_IDOWNLOAD_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {download.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsIDownload_1_8.IID)) { + *ppvObject = cast(void*)cast(nsIDownload_1_8)this; AddRef(); return XPCOM.NS_OK; } - if (guid.Equals (nsIProgressDialog_1_8.NS_IPROGRESSDIALOG_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {progressDialog.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsIProgressDialog_1_8.IID) { + *ppvObject = cast(void*)cast(nsIProgressDialog_1_8)this; AddRef(); return XPCOM.NS_OK; } - if (guid.Equals (nsIWebProgressListener.NS_IWEBPROGRESSLISTENER_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {webProgressListener.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsIWebProgressListener.IID) { + *ppvObject = cast(void*)cast(nsIWebProgressListener)this; AddRef(); return XPCOM.NS_OK; } - XPCOM.memmove (ppvObject, new int /*long*/[] {0}, C.PTR_SIZEOF); + *ppvObject = null; return XPCOM.NS_ERROR_NO_INTERFACE; } int Release () { refCount--; - if (refCount is 0) disposeCOMInterfaces (); + if (refCount is 0) return 0; return refCount; } diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/FilePicker.d --- a/dwt/browser/FilePicker.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/FilePicker.d Tue Aug 05 18:02:58 2008 -0700 @@ -8,446 +8,235 @@ * Contributors: * IBM Corporation - initial API and implementation * Port to the D programming language: - * John Reimer + * John Reimer *******************************************************************************/ - module dwt.browser.FilePicker; -import tango.io.model.IFile; -import Utf = tango.text.convert.Utf; - import dwt.dwthelper.utils; import dwt.DWT; -import XPCOM = dwt.internal.mozilla.nsXPCOM; - -import dwt.browser.Mozilla; -import dwt.browser.MozillaDelegate; - import dwt.internal.mozilla.nsEmbedString; -import dwt.internal.mozilla.nsIDOMWindow; import dwt.internal.mozilla.nsID; import dwt.internal.mozilla.nsIFilePicker; +import dwt.internal.mozilla.nsIFilePicker_1_8; import dwt.internal.mozilla.nsILocalFile; import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsSimpleEnumerator; -import dwt.internal.mozilla.nsStringAPI; -import dwt.internal.mozilla.nsError; - import dwt.widgets.DirectoryDialog; import dwt.widgets.Display; import dwt.widgets.FileDialog; import dwt.widgets.Shell; - -class FilePicker : nsISupports, nsIFilePicker -{ - /************************************************************************** - - **************************************************************************/ - - private - { - int _refCount = 0; - short _mode; - - nsIDOMWindow _parent; - - String[] _files; - String _masks; - String _defaultFilename, - _directory, - _title; - } - /************************************************************************** - - **************************************************************************/ - - static final String SEPARATOR = FileConst.FileSeparatorChar; - - /************************************************************************** - - **************************************************************************/ - - this () - { - } - - /************************************************************************** - - **************************************************************************/ +class FilePicker : nsIFilePicker { - nsrefcnt AddRef () - { - _refCount++; - return _refCount; - } - - /************************************************************************** - - **************************************************************************/ + int refCount = 0; + short mode; + nsIDOMWindow parentHandle; + String[] files, masks; + String defaultFilename, directory, title; - nsresult QueryInterface ( inout nsID riid, void** ppvObject) - { - if (riid is null || ppvObject is null) - return NS_ERROR_NO_INTERFACE; - - if (riid == nsISupports.IID) - { - *ppvObject = cast(void*)cast(nsISupports) this; - AddRef (); - return NS_OK; - } - - if (riid == nsIFilePicker.IID)) - { - *ppvObject = cast(void*)cast(nsIFilePicker) this; - AddRef (); - return NS_OK; - } - - if (riid == nsIFilePicker_1_8.IID) - { - *ppvObject = cast(void*)cast(nsIFilePicker_1_8) this; - AddRef (); - return NS_OK; - } - - *ppvObject = null; - return NS_ERROR_NO_INTERFACE; - } - - /************************************************************************** - - **************************************************************************/ + static final String SEPARATOR = System.getProperty ("file.separator"); //$NON-NLS-1$ - nsrefcnt Release () - { - _refCount--; - - if (_refCount is 0) - // No big deal here; just allow the GC to reap this object - // once all references are expired. -JJR - // delete this; - return 0; - - return _refCount; - } - - /************************************************************************** - - **************************************************************************/ - - /* SWT Comment: - * - * As of Mozilla 1.8 some of nsIFilePicker's string arguments changed type. This method - * answers a java string based on the type of string that is appropriate for the Mozilla - * version being used. - */ - - override String parseAString (nsEmbedString str) - { - return null; - } - - /************************************************************************** - - **************************************************************************/ - - /* nsIFilePicker */ - - nsresult Init (nsIDOMWindow parent, nsAString* title, PRInt16 mode) - { - _parent = parent; - _mode = mode; - _title = parseAString (title); - return XPCOM; - } - - /************************************************************************** - - **************************************************************************/ +this () { +} - nsresult Show (PRUint32* retval) - { - if (_mode is nsIFilePicker.modeGetFolder) - { - /* picking a directory */ - int result = this.showDirectoryPicker (); - *retval = result; - return NS_OK; - } - - /* picking a file */ - int style = _mode is nsIFilePicker.modeSave ? DWT.SAVE : DWT.OPEN; - - if (_mode is nsIFilePicker.modeOpenMultiple) - style |= DWT.MULTI; - - Display display = Display.getCurrent (); - Shell parent = null; // TODO compute parent - - if (parent is null) - { - parent = new Shell (display); - } +nsrefcnt AddRef () { + refCount++; + return refCount; +} - FileDialog dialog = new FileDialog (parent, style); - - if (_title !is null) - dialog.setText (_title); - - if (_directory !is null) - dialog.setFilterPath (_directory); - - if (_masks !is null) { - String[] str ~= _masks; - dialog.setFilterExtensions ( str ); - } - - if (_defaultFilename !is null) - dialog.setFileName (_defaultFilename); - - String filename = dialog.open (); - files = dialog.getFileNames (); - _directory = dialog.getFilterPath (); - _title = _defaultFilename = null; - _masks = null; - int result = filename is null ? nsIFilePicker.returnCancel : nsIFilePicker.returnOK; - *retval = result; +nsresult QueryInterface (nsID* riid, void** ppvObject) { + if (riid is null || ppvObject is null) return NS_ERROR_NO_INTERFACE; + + if (riid == nsISupports.IID) { + *ppvObject = cast(void*)cast(nsISupports) this; + AddRef (); return NS_OK; } - - /************************************************************************** - - **************************************************************************/ + if (riid == nsIFilePicker.IID)) { + *ppvObject = cast(void*)cast(nsIFilePicker) this; + AddRef (); + return NS_OK; + } + if (riid == nsIFilePicker_1_8.IID) { + *ppvObject = cast(void*)cast(nsIFilePicker_1_8) this; + AddRef (); + return NS_OK; + } + *ppvObject = null; + return NS_ERROR_NO_INTERFACE; +} + +nsrefcnt Release () { + refCount--; + if (refCount is 0) return 0; + return refCount; +} - int showDirectoryPicker () - { - Display display = Display.getCurrent (); - Shell parent = null; // TODO compute parent - - if (parent is null) - { - parent = new Shell (display); - } - - DirectoryDialog dialog = new DirectoryDialog (parent, DWT.NONE); - - if (_title !is null) - dialog.setText (_title); - if (_directory !is null) - dialog.setFilterPath (_directory); - _directory = dialog.open (); - _title = _defaultFilename = null; - _files = _masks = null; - return _directory is null ? nsIFilePicker.returnCancel : nsIFilePicker.returnOK; +/* + * As of Mozilla 1.8 some of nsIFilePicker's string arguments changed type. This method + * answers a java string based on the type of string that is appropriate for the Mozilla + * version being used. + */ +override String parseAString (nsAString* string) { + return null; +} + +/* nsIFilePicker */ + +nsresult Init (nsIDOMWindow parent, nsAString* title, PRInt16 mode) { + parentHandle = parent; + this.mode = mode; + this.title = parseAString (title); + return XPCOM.NS_OK; +} + +nsresult Show (PRUint32* _retval) { + if (mode is nsIFilePicker.modeGetFolder) { + /* picking a directory */ + int result = showDirectoryPicker (); + *_retval = cast(int)cast(short)result; /* PRInt16 */ + return XPCOM.NS_OK; } - /************************************************************************** - - **************************************************************************/ - - nsresult GetFiles ( nsISimpleEnumerator* aFiles) - { - return NS_ERROR_NOT_IMPLEMENTED; - } - - /************************************************************************** - - **************************************************************************/ - - nsresult GetFileURL (nsIFileURL aFileURL) - { - return NS_ERROR_NOT_IMPLEMENTED; + /* picking a file */ + int style = mode is nsIFilePicker.modeSave ? DWT.SAVE : DWT.OPEN; + if (mode is nsIFilePicker.modeOpenMultiple) style |= DWT.MULTI; + Display display = Display.getCurrent (); + Shell parent = null; // TODO compute parent + if (parent is null) { + parent = new Shell (display); } - - /************************************************************************** - - **************************************************************************/ - - nsresult GetFile (nsILocalFile* aFile) - { - String filename = ""; //$NON-NLS-1$ - - if (_directory !is null) - filename ~= _directory ~ SEPARATOR; - if (_files !is null && _files.length > 0) - filename ~= _files[0]; - - // Create a nsEmbedString which will be automatically disposed - // at the end of scope. - scope auto path = new nsEmbedString( filename ); - - nsresult rc = XPCOM.NS_NewLocalFile ( cast(nsAString*)path, 1, aFile); - - if (rc !is NS_OK) - Mozilla.error (rc); - if (aFile is null) - Mozilla.error (NS_ERROR_NULL_POINTER); - - return NS_OK; - } - - /************************************************************************** - - **************************************************************************/ + FileDialog dialog = new FileDialog (parent, style); + if (title !is null) dialog.setText (title); + if (directory !is null) dialog.setFilterPath (directory); + if (masks !is null) dialog.setFilterExtensions (masks); + if (defaultFilename !is null) dialog.setFileName (defaultFilename); + String filename = dialog.open (); + files = dialog.getFileNames (); + directory = dialog.getFilterPath (); + title = defaultFilename = null; + masks = null; + int result = filename is null ? nsIFilePicker.returnCancel : nsIFilePicker.returnOK; + *_retval = cast(int)cast(short)result;; /* PRInt16 */ + return XPCOM.NS_OK; +} - nsresult SetDisplayDirectory (nsILocalFile aDisplayDirectory) - { - if (aDisplayDirectory is null) - return NS_OK; - - scope auto pathname = new nsEmbedCString; - aDisplayDirectory.GetNativePath ( cast(nsACString*)pathname ); - // TODO: CHECK IF THIS DOES CORRECT STRING CONVERSION -JJR - char[] buffer = pathname.toString(); - char[] chars = MozillaDelegate.mbcsToWcs (null, buffer); - // "buffer" contains a dup'ed string so we can safely reuse - // it's memory for the _directory member. -JJR - _directory = buffer; - return NS_OK; +int showDirectoryPicker () { + Display display = Display.getCurrent (); + Shell parent = null; // TODO compute parent + if (parent is null) { + parent = new Shell (display); } + DirectoryDialog dialog = new DirectoryDialog (parent, DWT.NONE); + if (title !is null) dialog.setText (title); + if (directory !is null) dialog.setFilterPath (directory); + directory = dialog.open (); + title = defaultFilename = null; + files = masks = null; + return directory is null ? nsIFilePicker.returnCancel : nsIFilePicker.returnOK; +} - /************************************************************************** - - **************************************************************************/ +nsresult GetFiles (nsISimpleEnumerator* aFiles) { + return XPCOM.NS_ERROR_NOT_IMPLEMENTED; +} - nsresult GetDisplayDirectory (nsILocalFile* aDisplayDirectory) - { - String directoryName = _directory !is null ? _directory : ""; //$NON-NLS-1$ - scope auto path = new nsEmbedString (directoryName); - nsresult rc = XPCOM.NS_NewLocalFile ( cast(nsAString*)path, 1, aDisplayDirectory); - - if (rc !is NS_OK) - Mozilla.error (rc); - if (aDisplayDirectory is null) - Mozilla.error (NS_ERROR_NULL_POINTER); - return NS_OK; - } - - /************************************************************************** +nsresult GetFileURL ( nsIFileURL aFileURL ) { + return XPCOM.NS_ERROR_NOT_IMPLEMENTED; +} - **************************************************************************/ - - nsresult SetFilterIndex (PRInt32 aFilterIndex) - { - return NS_ERROR_NOT_IMPLEMENTED; - } - - /************************************************************************** +nsresult GetFile (nsILocalFile* aFile) { + String filename = ""; //$NON-NLS-1$ + if (directory !is null) filename ~= directory ~ SEPARATOR; + if (files !is null && files.length > 0) filename ~= files[0]; + scope auto path = new nsEmbedString (filename); + int rc = XPCOM.NS_NewLocalFile (cast(nsAString*)path, 1, aFile); + if (rc !is XPCOM.NS_OK) Mozilla.error (rc); + if (aFile is null) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER); + return XPCOM.NS_OK; +} - **************************************************************************/ - - nresult GetFilterIndex (PRInt32* aFilterIndex) - { - return NS_ERROR_NOT_IMPLEMENTED; - } - - /************************************************************************** +nsresult SetDisplayDirectory (nsILocalFile aDisplayDirectory) { + if (aDisplayDirectory is null) return XPCOM.NS_OK; + scope auto pathname = new nsEmbedCString(); + aDisplayDirectory.GetNativePath (cast(nsACString*)pathname); + // wchar[] chars = MozillaDelegate.mbcsToWcs (null, bytes); + directory = pathname.toString; + return XPCOM.NS_OK; +} - **************************************************************************/ - - int SetDefaultExtension (nsAString* aDefaultExtension) - { - /* note that the type of argument 1 changed as of Mozilla 1.8 */ - return NS_ERROR_NOT_IMPLEMENTED; - } - - /************************************************************************** +nsresult GetDisplayDirectory (nsILocalFile* aDisplayDirectory) { + String directoryName = directory !is null ? directory : ""; //$NON-NLS-1$ + scope auto path = new nsEmbedString (Utf.toString16(directoryName)); + int rc = XPCOM.NS_NewLocalFile (cast(nsAString*)path, 1, aDisplayDirectory); + if (rc !is XPCOM.NS_OK) Mozilla.error (rc); + if (aDisplayDirectory is null) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER); + return XPCOM.NS_OK; +} - **************************************************************************/ +nsresult SetFilterIndex (PRInt32 aFilterIndex) { + return XPCOM.NS_ERROR_NOT_IMPLEMENTED; +} - int GetDefaultExtension (nsAString* aDefaultExtension) - { - /* note that the type of argument 1 changed as of Mozilla 1.8 */ - return NS_ERROR_NOT_IMPLEMENTED; - } - - /************************************************************************** - - **************************************************************************/ +nsresult GetFilterIndex (PRInt32* aFilterIndex) { + return XPCOM.NS_ERROR_NOT_IMPLEMENTED; +} - nresult SetDefaultString (nsAString* aDefaultString) - { - defaultFilename = parseAString (aDefaultString); - return NS_OK; - } +nsresult SetDefaultExtension (nsAString* aDefaultExtension) { + /* note that the type of argument 1 changed as of Mozilla 1.8 */ + return XPCOM.NS_ERROR_NOT_IMPLEMENTED; +} - /************************************************************************** - - **************************************************************************/ +nsresult GetDefaultExtension (nsAString* aDefaultExtension) { + /* note that the type of argument 1 changed as of Mozilla 1.8 */ + return XPCOM.NS_ERROR_NOT_IMPLEMENTED; +} - nresult GetDefaultString (nsAString* aDefaultString) - { - /* note that the type of argument 1 changed as of Mozilla 1.8 */ - return NS_ERROR_NOT_IMPLEMENTED; - } - - /************************************************************************** - - **************************************************************************/ +nsresult SetDefaultString (nsAString* aDefaultString) { + defaultFilename = parseAString (aDefaultString); + return XPCOM.NS_OK; +} - nresult AppendFilter (nsAString* title, nsAString* filter) - { - /* note that the type of arguments 1 and 2 changed as of Mozilla 1.8 */ - return NS_ERROR_NOT_IMPLEMENTED; - } - - /************************************************************************** - - **************************************************************************/ +nsresult GetDefaultString (nsAString* aDefaultString) { + /* note that the type of argument 1 changed as of Mozilla 1.8 */ + return XPCOM.NS_ERROR_NOT_IMPLEMENTED; +} - nresult AppendFilters (PRInt32 filterMask) - { - String addFilters; - - switch (filterMask) - { - case nsIFilePicker.filterAll: - case nsIFilePicker.filterApps: - _masks = null; /* this is equivalent to no filter */ - break; - case nsIFilePicker.filterHTML: - addFilters = "*.htm;*.html" ; - break; - case nsIFilePicker.filterImages: - addFilters = "*.gif;*.jpeg;*.jpg;*.png"; - break; - case nsIFilePicker.filterText: - addFilters = "*.txt"; - break; - case nsIFilePicker.filterXML: - addFilters = "*.xml"; - break; - case nsIFilePicker.filterXUL: - addFilters = "*.xul"; - break; +nsresult AppendFilter (nsAString* title, nsAString* filter) { + /* note that the type of arguments 1 and 2 changed as of Mozilla 1.8 */ + return XPCOM.NS_ERROR_NOT_IMPLEMENTED; +} + +nsresult AppendFilters (PRInt32 filterMask) { + String[] addFilters = null; + switch (filterMask) { + case nsIFilePicker.filterAll: + case nsIFilePicker.filterApps: + masks = null; /* this is equivalent to no filter */ + break; + case nsIFilePicker.filterHTML: + addFilters[0] = "*.htm;*.html"; //$NON-NLS-1$ + break; + case nsIFilePicker.filterImages: + addFilters[0] = "*.gif;*.jpeg;*.jpg;*.png"; //$NON-NLS-1$ + break; + case nsIFilePicker.filterText: + addFilters[0] = "*.txt"; //$NON-NLS-1$ + break; + case nsIFilePicker.filterXML: + addFilters[0] = "*.xml"; //$NON-NLS-1$ + break; + case nsIFilePicker.filterXUL: + addFilters[0] = "*.xul"; //$NON-NLS-1$ + break; + } + if (masks is null) { + masks = addFilters; + } else { + if (addFilters !is null) { + masks ~= addFilters; } - - if (_masks is null) - { - _masks = addFilters; - } else { - if (addFilters !is null) - _masks ~= addFilters; - } - return NS_OK; } - -/****************************************************************************** - - FilePicker for Mozilla Version 1.8 - -******************************************************************************/ - -class FilePicker_1_8 : FilePicker -{ - String parseAString (nsEmbedString str) - { - if (str is null) - return null; - return Utf.toString( str.toString16() ); - } -} \ No newline at end of file + return XPCOM.NS_OK; +} +} diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/FilePickerFactory.d --- a/dwt/browser/FilePickerFactory.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/FilePickerFactory.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,121 +7,100 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Port to the D programming language: - * John Reimer *******************************************************************************/ - module dwt.browser.FilePickerFactory; import dwt.dwthelper.utils; +import dwt.internal.C; +import dwt.internal.mozilla.XPCOM; +import dwt.internal.mozilla.XPCOMObject; import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla. import dwt.internal.mozilla.nsIFactory; import dwt.internal.mozilla.nsISupports; -class FilePickerFactory : nsISupports, nsIFactory -{ - - /************************************************************************** - - **************************************************************************/ - - int _refCount = 0; - - /************************************************************************** - - **************************************************************************/ +class FilePickerFactory { + XPCOMObject supports; + XPCOMObject factory; + int refCount = 0; - this () - { - } - - /************************************************************************** - - **************************************************************************/ +FilePickerFactory () { + createCOMInterfaces (); +} - nsrefcnt AddRef () - { - _refCount++; - return _refCount; - } - - /************************************************************************** - - **************************************************************************/ +int AddRef () { + refCount++; + return refCount; +} - int QueryInterface ( ref nsID riid, void** ppvObject) - { - if (riid is null || ppvObject is null) - return NS_ERROR_NO_INTERFACE; - - if (guid == nsISupports.IID)) - { - *ppvObject = cast(void*)cast(nsISupports) this; - AddRef (); - return NS_OK; - } +void createCOMInterfaces () { + /* Create each of the interfaces that this object implements */ + supports = new XPCOMObject (new int[] {2, 0, 0}) { + public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} + public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} + public int /*long*/ method2 (int /*long*/[] args) {return Release ();} + }; - if (guid == nsIFactory.IID) - { - *ppvObject = cast(void*)cast(nsIFactory) this; - AddRef (); - return NS_OK; - } - - *ppvObject = null; - return NS_ERROR_NO_INTERFACE; - } + factory = new XPCOMObject (new int[] {2, 0, 0, 3, 1}) { + public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} + public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} + public int /*long*/ method2 (int /*long*/[] args) {return Release ();} + public int /*long*/ method3 (int /*long*/[] args) {return CreateInstance (args[0], args[1], args[2]);} + public int /*long*/ method4 (int /*long*/[] args) {return LockFactory ((int)/*64*/args[0]);} + }; +} - /************************************************************************** +void disposeCOMInterfaces () { + if (supports !is null) { + supports.dispose (); + supports = null; + } + if (factory !is null) { + factory.dispose (); + factory = null; + } +} - **************************************************************************/ +int /*long*/ getAddress () { + return factory.getAddress (); +} - nsrefcnt Release () - { - _refCount--; - if (_refCount is 0) - return 0; - return _refCount; +int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) { + if (riid is 0 || ppvObject is 0) return XPCOM.NS_ERROR_NO_INTERFACE; + nsID guid = new nsID (); + XPCOM.memmove (guid, riid, nsID.sizeof); + + if (guid.Equals (nsISupports.NS_ISUPPORTS_IID)) { + XPCOM.memmove (ppvObject, new int /*long*/[] {supports.getAddress ()}, C.PTR_SIZEOF); + AddRef (); + return XPCOM.NS_OK; + } + if (guid.Equals (nsIFactory.NS_IFACTORY_IID)) { + XPCOM.memmove (ppvObject, new int /*long*/[] {factory.getAddress ()}, C.PTR_SIZEOF); + AddRef (); + return XPCOM.NS_OK; } - /************************************************************************** - - **************************************************************************/ - - /* nsIFactory */ + XPCOM.memmove (ppvObject, new int /*long*/[] {0}, C.PTR_SIZEOF); + return XPCOM.NS_ERROR_NO_INTERFACE; +} - nsresult CreateInstance (nsISupports aOuter, nsIID* iid, void** result) - { - if (result is null) - return NS_ERROR_INVALID_ARG; - - FilePicker picker = new FilePicker (); - picker.AddRef (); +int Release () { + refCount--; + if (refCount is 0) disposeCOMInterfaces (); + return refCount; +} + +/* nsIFactory */ - nsresult rv = picker.QueryInterface( iid, result ); - - // TODO: If the query fails, the error should be checked and the - // newly created object deleted. In C++, this is done - // like so: - // - // if (NS_FAILED(rv)) { - // *result = nsnull; - // delete picker; - // } - // - // Deletion of the object really isn't critical here for D, but - // it may be considered "good habit" to do anyway for XPCOM objects. - // For now, just return the rv value. NS_FAILED needs to be - // ported first. -JJR +int CreateInstance (int /*long*/ aOuter, int /*long*/ iid, int /*long*/ result) { + FilePicker picker = new FilePicker (); + picker.AddRef (); + XPCOM.memmove (result, new int /*long*/[] {picker.getAddress ()}, C.PTR_SIZEOF); + return XPCOM.NS_OK; +} - return rv; - } - - nsresult LockFactory (int lock) - { - return NS_OK; - } - -} \ No newline at end of file +int LockFactory (int lock) { + return XPCOM.NS_OK; +} +} diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/FilePickerFactory_1_8.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/FilePicker_1_8.d --- a/dwt/browser/FilePicker_1_8.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/FilePicker_1_8.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,57 +7,21 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Port to the D programming language: + * John Reimer *******************************************************************************/ module dwt.browser.FilePicker_1_8; import dwt.dwthelper.utils; +import dwt.browser.FilePicker; import dwt.internal.mozilla.XPCOM; -import dwt.internal.mozilla.XPCOMObject; - -class FilePicker_1_8 extends FilePicker { - -void createCOMInterfaces () { - /* Create each of the interfaces that this object implements */ - supports = new XPCOMObject (new int[] {2, 0, 0}) { - public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} - public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} - public int /*long*/ method2 (int /*long*/[] args) {return Release ();} - }; +import dwt.internal.mozilla.nsStringAPI; - filePicker = new XPCOMObject (new int[] {2, 0, 0, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) { - public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} - public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} - public int /*long*/ method2 (int /*long*/[] args) {return Release ();} - public int /*long*/ method3 (int /*long*/[] args) {return Init (args[0], args[1], (short)args[2]);} - public int /*long*/ method4 (int /*long*/[] args) {return AppendFilters ((int)/*64*/args[0]);} - public int /*long*/ method5 (int /*long*/[] args) {return AppendFilter (args[0], args[1]);} - public int /*long*/ method6 (int /*long*/[] args) {return GetDefaultString (args[0]);} - public int /*long*/ method7 (int /*long*/[] args) {return SetDefaultString (args[0]);} - public int /*long*/ method8 (int /*long*/[] args) {return GetDefaultExtension (args[0]);} - public int /*long*/ method9 (int /*long*/[] args) {return SetDefaultExtension (args[0]);} - public int /*long*/ method10 (int /*long*/[] args) {return GetFilterIndex (args[0]);} - public int /*long*/ method11 (int /*long*/[] args) {return SetFilterIndex ((int)/*64*/args[0]);} - public int /*long*/ method12 (int /*long*/[] args) {return GetDisplayDirectory (args[0]);} - public int /*long*/ method13 (int /*long*/[] args) {return SetDisplayDirectory (args[0]);} - public int /*long*/ method14 (int /*long*/[] args) {return GetFile (args[0]);} - public int /*long*/ method15 (int /*long*/[] args) {return GetFileURL (args[0]);} - public int /*long*/ method16 (int /*long*/[] args) {return GetFiles (args[0]);} - public int /*long*/ method17 (int /*long*/[] args) {return Show (args[0]);} - }; -} +class FilePicker_1_8 : FilePicker { -/* - * As of Mozilla 1.8 some of nsIFilePicker's string arguments changed type. This method - * answers a java string based on the type of string that is appropriate for the Mozilla - * version being used. - */ -String parseAString (int /*long*/ string) { - if (string is 0) return null; - int length = XPCOM.nsEmbedString_Length (string); - int /*long*/ buffer = XPCOM.nsEmbedString_get (string); - char[] chars = new char[length]; - XPCOM.memmove (chars, buffer, length * 2); - return new String (chars); +String parseAString (nsAString* string) { + if (string is null) return null; + return Utf.toString(nsAString.getString16(string)); } } diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/HelperAppLauncherDialog.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/HelperAppLauncherDialogFactory.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/InputStream.d --- a/dwt/browser/InputStream.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/InputStream.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,171 +7,129 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Port to the D programming language: - * John Reimer *******************************************************************************/ - module dwt.browser.InputStream; import dwt.dwthelper.utils; -import dwt.internal.mozilla.nsError; +import dwt.internal.C; +import dwt.internal.mozilla.XPCOM; +import dwt.internal.mozilla.XPCOMObject; import dwt.internal.mozilla.nsID; import dwt.internal.mozilla.nsIInputStream; import dwt.internal.mozilla.nsISupports; -import Math = tango.math.Math; - -/****************************************************************************** - - COMMENTS: SWT implements this class as a replacement for the XPCOM - implementation; it may be possible to use the XPCOM one instead - (which also may be safer for D), but for now we'll follow SWT's example - and use this reimplementation of InputStream. It should be trivial to - move over to strict XPCOM implementation should the need arise. It appears - that the Java SWT source uses many workarounds in order to use the XPCOM - interface. For D, I remove much of the Java layered callback - approach since it is no longer necessary. -JJR - -******************************************************************************/ +class InputStream { + XPCOMObject inputStream; + int refCount = 0; -class InputStream : nsIInputStream -{ - int _refCount = 0; - int _index = 0; - byte[] _buffer; - - /************************************************************************** - - **************************************************************************/ + byte[] buffer; + int index = 0; + +InputStream (byte[] buffer) { + this.buffer = buffer; + index = 0; + createCOMInterfaces (); +} - this (byte[] buffer) - { - this._buffer = buffer; - index = 0; - } - - /************************************************************************** - - **************************************************************************/ +int AddRef () { + refCount++; + return refCount; +} - nsrefcnt AddRef () - { - _refCount++; - return _refCount; - } - - /************************************************************************** - - **************************************************************************/ +void createCOMInterfaces () { + /* Create each of the interfaces that this object implements */ + inputStream = new XPCOMObject (new int[] {2, 0, 0, 0, 1, 3, 4, 1}) { + public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} + public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} + public int /*long*/ method2 (int /*long*/[] args) {return Release ();} + public int /*long*/ method3 (int /*long*/[] args) {return Close ();} + public int /*long*/ method4 (int /*long*/[] args) {return Available (args[0]);} + public int /*long*/ method5 (int /*long*/[] args) {return Read (args[0], (int)/*64*/args[1], args[2]);} + public int /*long*/ method6 (int /*long*/[] args) {return ReadSegments (args[0], args[1], (int)/*64*/args[2], args[3]);} + public int /*long*/ method7 (int /*long*/[] args) {return IsNonBlocking (args[0]);} + }; +} - nsresult QueryInterface ( inout nsID riid, void** ppvObject) - { - if (riid is null || ppvObject is null) - return NS_ERROR_NO_INTERFACE; - - nsID guid = riid; - - if (guid == nsISupports.NS_ISUPPORTS_IID) - { - *ppvObject = cast(void*)cast(nsISupports) this; - this.AddRef (); - return NS_OK; - } +void disposeCOMInterfaces () { + if (inputStream !is null) { + inputStream.dispose (); + inputStream = null; + } +} - if (guid == nsIInputStream.NS_IINPUTSTREAM_IID) - { - *ppvObject = cast(void*)cast(nsIInputStream) this; - this.AddRef (); - return NS_OK; - } - - *ppvObject = null; - return NS_ERROR_NO_INTERFACE; - } - - /************************************************************************** - - **************************************************************************/ +int /*long*/ getAddress () { + return inputStream.getAddress (); +} - nsrefcnt Release () - { - _refCount--; - if (_refCount is 0) - return 0 - // delete this; - return _refCount; +int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) { + if (riid is 0 || ppvObject is 0) return XPCOM.NS_ERROR_NO_INTERFACE; + nsID guid = new nsID (); + XPCOM.memmove (guid, riid, nsID.sizeof); + + if (guid.Equals (nsISupports.NS_ISUPPORTS_IID)) { + XPCOM.memmove (ppvObject, new int /*long*/[] {inputStream.getAddress ()}, C.PTR_SIZEOF); + AddRef (); + return XPCOM.NS_OK; } + if (guid.Equals (nsIInputStream.NS_IINPUTSTREAM_IID)) { + XPCOM.memmove (ppvObject, new int /*long*/[] {inputStream.getAddress ()}, C.PTR_SIZEOF); + AddRef (); + return XPCOM.NS_OK; + } + XPCOM.memmove (ppvObject, new int /*long*/[] {0}, C.PTR_SIZEOF); + return XPCOM.NS_ERROR_NO_INTERFACE; +} + +int Release () { + refCount--; + if (refCount is 0) disposeCOMInterfaces (); + return refCount; +} - /************************************************************************** - - **************************************************************************/ +/* nsIInputStream implementation */ - nsresult Close () - { - _buffer = null; - _index = 0; - return NS_OK; - } - - /************************************************************************** - - **************************************************************************/ - - nsresult Available ( PRUint32* retval) - { - PRUint32 available = buffer is null ? 0 : buffer.length - _index; - *retval = available; - return NS_OK; - } - - /************************************************************************** - - **************************************************************************/ +int Close () { + buffer = null; + index = 0; + return XPCOM.NS_OK; +} - nsresult Read(byte* aBuf, PRUint32 aCount, PRUint32* retval) - { - int max = Math.min (aCount, _buffer is null ? 0 : _buffer.length - _index); - - if (max > 0) - { - aBuf[0..max] = _buffer[_index..$]; - _index += max; - } +int Available (int /*long*/ _retval) { + int available = buffer is null ? 0 : buffer.length - index; + XPCOM.memmove (_retval, new int[] {available}, 4); + return XPCOM.NS_OK; +} - *retval = max; - return NS_OK; +int Read(int /*long*/ aBuf, int aCount, int /*long*/ _retval) { + int max = Math.min (aCount, buffer is null ? 0 : buffer.length - index); + if (max > 0) { + byte[] src = new byte[max]; + System.arraycopy (buffer, index, src, 0, max); + XPCOM.memmove (aBuf, src, max); + index += max; } - - /************************************************************************** - - **************************************************************************/ + XPCOM.memmove(_retval, new int[] {max}, 4); + return XPCOM.NS_OK; +} - nsresult ReadSegments (nsWriteSegmentFun aWriter, void* aClosure, PRUint32 aCount, PRUint32* retval) - { - int max = Math.min (aCount, buffer is null ? 0 : buffer.length - _index); - PRUint32 cnt = max; - - while (cnt > 0) - { - PRUint32 aWriteCount; - nsresult rc = aWriter ( cast(nsIInputStream)this, aClosure, buffer.ptr, _index, cnt, &aWriteCount); - if (rc !is NS_OK) break; - _index += aWriteCount; - cnt -= aWriteCount; - } +int ReadSegments (int /*long*/ aWriter, int /*long*/ aClosure, int aCount, int /*long*/ _retval) { + int max = Math.min (aCount, buffer is null ? 0 : buffer.length - index); + int cnt = max; + while (cnt > 0) { + int[] aWriteCount = new int[1]; + int /*long*/ rc = XPCOM.Call (aWriter, getAddress (), aClosure, buffer, index, cnt, aWriteCount); + if (rc !is XPCOM.NS_OK) break; + index += aWriteCount[0]; + cnt -= aWriteCount[0]; + } + XPCOM.memmove (_retval, new int[] {max - cnt}, 4); + return XPCOM.NS_OK; +} - *retval = (max - cnt); - return NS_OK; - } - - /************************************************************************** - - **************************************************************************/ - - nsresult IsNonBlocking ( PRUint32* retval) - { - *retval = 0; - return NS_OK; - } +int IsNonBlocking (int /*long*/ _retval) { + /* blocking */ + XPCOM.memmove (_retval, new int[] {0}, 4); + return XPCOM.NS_OK; +} } diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/LocationAdapter.d --- a/dwt/browser/LocationAdapter.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/LocationAdapter.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,13 +7,9 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Port to the D programming language: - * John Reimer *******************************************************************************/ module dwt.browser.LocationAdapter; -import dwt.browser.LocationListener; -import dwt.browser.LocationEvent; import dwt.dwthelper.utils; /** @@ -27,11 +23,11 @@ * * @since 3.0 */ -public abstract class LocationAdapter : LocationListener { +public abstract class LocationAdapter implements LocationListener { - public void changing(LocationEvent event) { - } +public void changing(LocationEvent event) { +} - public void changed(LocationEvent event) { - } +public void changed(LocationEvent event) { } +} diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/LocationEvent.d --- a/dwt/browser/LocationEvent.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/LocationEvent.d Tue Aug 05 18:02:58 2008 -0700 @@ -8,7 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation * Port to the D programming language: - * John Reimer + * John Reimer *******************************************************************************/ module dwt.browser.LocationEvent; @@ -55,12 +55,8 @@ * * @return a string representation of the event */ -public String toString() { - String string = super.toString (); - return string.substring (0, string.length() - 1) // remove trailing '}' - + " location=" + location - + " top=" + top - + " doit=" + doit - + "}"; +public override String toString() { + return Format( "{} {location = {}, top = {}, doit = {}}", + super.toString[1 .. $-2], location, top, doit ); } } diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/LocationListener.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/Mozilla.d --- a/dwt/browser/Mozilla.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/Mozilla.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,13 +7,19 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Port to the D programming language: - * John Reimer *******************************************************************************/ module dwt.browser.Mozilla; import dwt.dwthelper.utils; +//import java.io.UnsupportedEncodingException; +//import java.lang.reflect.Constructor; +//import java.lang.reflect.InvocationTargetException; +//import java.lang.reflect.Method; +//import java.util.Enumeration; +//import java.util.Locale; +//import java.util.Vector; + import dwt.DWT; import dwt.DWTError; import dwt.graphics.Device; @@ -24,9 +30,10 @@ import dwt.internal.LONG; import dwt.internal.Library; +import dwt.internal.mozilla.XPCOM; +import dwt.internal.mozilla.XPCOMInit; + import dwt.internal.mozilla.nsEmbedString; -import dwt.internal.mozilla.nsError; - import dwt.internal.mozilla.nsIAppShell; import dwt.internal.mozilla.nsIBaseWindow; import dwt.internal.mozilla.nsICategoryManager; @@ -59,6 +66,7 @@ import dwt.internal.mozilla.nsIPrefLocalizedString; import dwt.internal.mozilla.nsIPrefService; import dwt.internal.mozilla.nsIProperties; +import dwt.internal.mozilla.nsIRequest; import dwt.internal.mozilla.nsIServiceManager; import dwt.internal.mozilla.nsISimpleEnumerator; import dwt.internal.mozilla.nsISupports; @@ -76,7 +84,6 @@ import dwt.internal.mozilla.nsIWebProgress; import dwt.internal.mozilla.nsIWebProgressListener; import dwt.internal.mozilla.nsIWindowWatcher; - import dwt.layout.FillLayout; import dwt.widgets.Composite; import dwt.widgets.Display; @@ -86,28 +93,45 @@ import dwt.widgets.Menu; import dwt.widgets.Shell; -class Mozilla : nsIWebBrowser, nsIWeakReference, - nsIWebProgressListener, nsIWebBrowserChrome, - nsIWebBrowserChromeFocus, nsIEmbeddingSiteWindow, - nsIInterfaceRequestor, nsISupportsWeakReference, - nsIContextMenuListener, nsIUriContentListener, - nsIToolTipListener, nsIDOMEventListener -{ - int /*long*/ embedHandle; - nsIWebBrowser webBrowser; - Object webBrowserObject; +class Mozilla : WebBrowser, + nsIWeakReference, + nsIWebProgressListener, + nsIWebBrowserChrome, + nsIWebBrowserFocus, + nsIEmbeddingSiteWindow, + nsIInterfaceRequestor, + nsISupportsWeakReference, + nsIContextMenuListener, + nsIUriContextListener, + nsITooltipListener, + nsIDomEventListener { + + GtkWidget* embedHandle; + nsIWebBrowser webBrowser; + Object webBrowserObject; MozillaDelegate mozDelegate; + /* Interfaces for this Mozilla embedding notification */ +// XPCOMObject supports; +// XPCOMObject weakReference; +// XPCOMObject webProgressListener; +// XPCOMObject webBrowserChrome; +// XPCOMObject webBrowserChromeFocus; +// XPCOMObject embeddingSiteWindow; +// XPCOMObject interfaceRequestor; +// XPCOMObject supportsWeakReference; +// XPCOMObject contextMenuListener; +// XPCOMObject uriContentListener; +// XPCOMObject tooltipListener; +// XPCOMObject domEventListener; int chromeFlags = nsIWebBrowserChrome.CHROME_DEFAULT; int refCount, lastKeyCode, lastCharCode; - int /*long*/ request; + nsIRequest request; Point location, size; bool visible, isChild, ignoreDispose, awaitingNavigate; Shell tip = null; Listener listener; - - // replace with appropriate D/Tango data structure - Vector unhookedDOMWindows = new Vector (); + nsIDOMWindow[] unhookedDOMWindows; static nsIAppShell AppShell; static AppFileLocProvider LocationProvider; @@ -154,7 +178,7 @@ // TEMPORARY CODE static final String GRE_INITIALIZED = "dwt.browser.XULRunnerInitialized"; //$NON-NLS-1$ - static { + static this () { MozillaClearSessions = new Runnable () { public void run () { if (!Initialized) return; @@ -2045,68 +2069,65 @@ /* nsISupports */ -int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) { - if (riid is 0 || ppvObject is 0) return XPCOM.NS_ERROR_NO_INTERFACE; +int QueryInterface (nsID* riid, void** ppvObject) { + if (riid is null || ppvObject is null) return XPCOM.NS_ERROR_NO_INTERFACE; - nsID guid = new nsID (); - XPCOM.memmove (guid, riid, nsID.sizeof); - - if (guid.Equals (nsISupports.NS_ISUPPORTS_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {supports.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsISupports.IID) { + *ppvObject = cast(void*)cast(nsISupports)this; + AddRef (); + return XPCOM.NS_OK; + } + if (*riid == nsIWeakReference.IID) { + *ppvObject = cast(void*)cast(nsIWeakReference)this; AddRef (); return XPCOM.NS_OK; } - if (guid.Equals (nsIWeakReference.NS_IWEAKREFERENCE_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {weakReference.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsIWebProgressListener.IID) { + *ppvObject = cast(void*)cast(nsIWebProgressListener)this; AddRef (); return XPCOM.NS_OK; } - if (guid.Equals (nsIWebProgressListener.NS_IWEBPROGRESSLISTENER_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {webProgressListener.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsIWebBrowserChrome.IID) { + *ppvObject = cast(void*)cast(nsIWebBrowserChrome)this; AddRef (); return XPCOM.NS_OK; } - if (guid.Equals (nsIWebBrowserChrome.NS_IWEBBROWSERCHROME_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {webBrowserChrome.getAddress ()}, C.PTR_SIZEOF); - AddRef (); - return XPCOM.NS_OK; - } - if (guid.Equals (nsIWebBrowserChromeFocus.NS_IWEBBROWSERCHROMEFOCUS_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {webBrowserChromeFocus.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsIWebBrowserChromeFocus.IID) { + *ppvObject = cast(void*)cast(nsIWebBrowserChromeFocus)this; AddRef (); return XPCOM.NS_OK; } - if (guid.Equals (nsIEmbeddingSiteWindow.NS_IEMBEDDINGSITEWINDOW_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {embeddingSiteWindow.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsIEmbeddingSiteWindow.IID) { + *ppvObject = cast(void*)cast(nsIEmbeddingSiteWindow)this; AddRef (); return XPCOM.NS_OK; } - if (guid.Equals (nsIInterfaceRequestor.NS_IINTERFACEREQUESTOR_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {interfaceRequestor.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsIInterfaceRequestor.IID) { + *ppvObject = cast(void*)cast(nsIInterfaceRequestor)this; AddRef (); return XPCOM.NS_OK; } - if (guid.Equals (nsISupportsWeakReference.NS_ISUPPORTSWEAKREFERENCE_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {supportsWeakReference.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsISupportsWeakReference.IID) { + *ppvObject = cast(void*)cast(nsISupportsWeakReference)this; AddRef (); return XPCOM.NS_OK; } - if (guid.Equals (nsIContextMenuListener.NS_ICONTEXTMENULISTENER_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {contextMenuListener.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsIContextMenuListener.IID) { + *ppvObject = cast(void*)cast(nsIContextMenuListener)this; AddRef (); return XPCOM.NS_OK; } - if (guid.Equals (nsIURIContentListener.NS_IURICONTENTLISTENER_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {uriContentListener.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsIURIContentListener.IID) { + *ppvObject = cast(void*)cast(nsIUriContentListener)this; AddRef (); return XPCOM.NS_OK; } - if (guid.Equals (nsITooltipListener.NS_ITOOLTIPLISTENER_IID)) { - XPCOM.memmove (ppvObject, new int /*long*/[] {tooltipListener.getAddress ()}, C.PTR_SIZEOF); + if (*riid == nsITooltipListener.IID)) { + *ppvObject = cast(void*)cast(nsITooltipListener)this; AddRef (); return XPCOM.NS_OK; } - XPCOM.memmove (ppvObject, new int /*long*/[] {0}, C.PTR_SIZEOF); + *ppvObject = null; return XPCOM.NS_ERROR_NO_INTERFACE; } @@ -2117,19 +2138,19 @@ int Release () { refCount--; - if (refCount is 0) disposeCOMInterfaces (); + if (refCount is 0) return 0; return refCount; } /* nsIWeakReference */ -int QueryReferent (int /*long*/ riid, int /*long*/ ppvObject) { +int QueryReferent (nsID* riid, void** ppvObject) { return QueryInterface (riid, ppvObject); } /* nsIInterfaceRequestor */ -int GetInterface (int /*long*/ riid, int /*long*/ ppvObject) { +int GetInterface ( nsID* riid, void** ppvObject) { if (riid is 0 || ppvObject is 0) return XPCOM.NS_ERROR_NO_INTERFACE; nsID guid = new nsID (); XPCOM.memmove (guid, riid, nsID.sizeof); diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/MozillaDelegate.d --- a/dwt/browser/MozillaDelegate.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/MozillaDelegate.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,6 +7,8 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Port to the D programming language: + * John Reimer *******************************************************************************/ module dwt.browser.MozillaDelegate; @@ -24,20 +26,21 @@ class MozillaDelegate { Browser browser; - int /*long*/ mozillaHandle, embedHandle; + gpointer mozillaHandle; + GtkWidget* embedHandle; bool hasFocus; Listener listener; - static Callback eventCallback; - static int /*long*/ eventProc; - static final int STOP_PROPOGATE = 1; + //static Callback eventCallback; + // static int /*long*/ eventProc; + static const gpointer STOP_PROPOGATE = cast(gpointer)1; static bool IsLinux; - static { - String osName = System.getProperty ("os.name").toLowerCase (); //$NON-NLS-1$ - IsLinux = osName.startsWith ("linux"); //$NON-NLS-1$ + static this { + String osName = System.getProperty ("os.name"); //$NON-NLS-1$ + IsLinux = tango.text.Util.containsPattern(osName, "linux"); //$NON-NLS-1$ } -MozillaDelegate (Browser browser) { +this (Browser browser) { super (); if (!IsLinux) { browser.dispose (); @@ -46,27 +49,27 @@ this.browser = browser; } -static int /*long*/ eventProc (int /*long*/ handle, int /*long*/ gdkEvent, int /*long*/ pointer) { - int /*long*/ parent = OS.gtk_widget_get_parent (handle); +static extern(C) int eventProc (GtkWidget* handle, GdkEvent* gdkEvent, gpointer pointer) { + GtkWidget* parent = OS.gtk_widget_get_parent (handle); parent = OS.gtk_widget_get_parent (parent); - if (parent is 0) return 0; + if (parent is null) return 0; Widget widget = Display.getCurrent ().findWidget (parent); - if (widget !is null && widget instanceof Browser) { - return ((Mozilla)((Browser)widget).webBrowser).delegate.gtk_event (handle, gdkEvent, pointer); + if (widget !is null && (cast(Browser)widget !is null) { + return (cast(Mozilla)(cast(Browser)widget).webBrowser).mozDelegate.gtk_event (handle, gdkEvent, pointer); } return 0; } -static Browser findBrowser (int /*long*/ handle) { +static Browser findBrowser (GtkWidget* handle) { /* * Note. On GTK, Mozilla is embedded into a GtkHBox handle * and not directly into the parent Composite handle. */ - int /*long*/ parent = OS.gtk_widget_get_parent (handle); + GtkWidget* parent = OS.gtk_widget_get_parent (handle); Display display = Display.getCurrent (); - return (Browser)display.findWidget (parent); + return cast(Browser)display.findWidget (parent); } - +/* static char[] mbcsToWcs (String codePage, byte [] buffer) { return Converter.mbcsToWcs (codePage, buffer); } @@ -74,8 +77,8 @@ static byte[] wcsToMbcs (String codePage, String string, bool terminate) { return Converter.wcsToMbcs (codePage, string, terminate); } - -int /*long*/ getHandle () { +*/ +GtkWidget* getHandle () { /* * Bug in Mozilla Linux GTK. Embedding Mozilla into a GtkFixed * handle causes problems with some Mozilla plug-ins. For some @@ -96,13 +99,13 @@ return "libxpcom.so"; //$NON-NLS-1$ } +/* String getSWTInitLibraryName () { return "swt-xpcominit"; //$NON-NLS-1$ } +*/ -int /*long*/ gtk_event (int /*long*/ handle, int /*long*/ gdkEvent, int /*long*/ pointer) { - GdkEvent event = new GdkEvent (); - OS.memmove (event, gdkEvent, GdkEvent.sizeof); +int gtk_event (GtkWidget* handle, GdkEvent* event, gpointer pointer) { if (event.type is OS.GDK_BUTTON_PRESS) { if (!hasFocus) browser.setFocus (); } @@ -121,7 +124,7 @@ listener = new Listener () { public void handleEvent (Event event) { if (event.widget is browser) return; - ((Mozilla)browser.webBrowser).Deactivate (); + (cast(Mozilla)(browser.webBrowser)).Deactivate (); hasFocus = false; browser.getDisplay ().removeFilter (DWT.FocusIn, this); browser.getShell ().removeListener (DWT.Deactivate, this); @@ -138,7 +141,7 @@ browser.getDisplay ().asyncExec (new Runnable () { public void run () { if (browser is null || browser.isDisposed ()) return; - ((Mozilla)browser.webBrowser).Activate (); + (cast(Mozilla)(browser.webBrowser)).Activate (); } }); } @@ -148,15 +151,15 @@ return false; } -void init () { +void init () { /* if (eventCallback is null) { eventCallback = new Callback (getClass (), "eventProc", 3); //$NON-NLS-1$ eventProc = eventCallback.getAddress (); - if (eventProc is 0) { + if (eventProc is null) { browser.dispose (); Mozilla.error (DWT.ERROR_NO_MORE_CALLBACKS); } - } + } */ /* * Feature in Mozilla. GtkEvents such as key down, key pressed may be consumed @@ -166,14 +169,14 @@ * forward the event to the parent embedder before Mozilla received and consumed * them. */ - int /*long*/ list = OS.gtk_container_get_children (embedHandle); - if (list !is 0) { + GList* list = OS.gtk_container_get_children (embedHandle); + if (list !is null) { mozillaHandle = OS.g_list_data (list); OS.g_list_free (list); - if (mozillaHandle !is 0) { + if (mozillaHandle !is null) { /* Note. Callback to get events before Mozilla receives and consumes them. */ - OS.g_signal_connect (mozillaHandle, OS.event, eventProc, 0); + OS.g_signal_connect (mozillaHandle, OS.event, cast(GCallback)&eventProc, null); /* * Note. Callback to get the events not consumed by Mozilla - and to block @@ -181,9 +184,9 @@ * This hook is set after Mozilla and is therefore called after Mozilla's * handler because GTK dispatches events in their order of registration. */ - OS.g_signal_connect (mozillaHandle, OS.key_press_event, eventProc, STOP_PROPOGATE); - OS.g_signal_connect (mozillaHandle, OS.key_release_event, eventProc, STOP_PROPOGATE); - OS.g_signal_connect (mozillaHandle, OS.button_press_event, eventProc, STOP_PROPOGATE); + OS.g_signal_connect (mozillaHandle, OS.key_press_event, cast(GCallback)&eventProc, STOP_PROPOGATE); + OS.g_signal_connect (mozillaHandle, OS.key_release_event, cast(GCallback)&eventProc, STOP_PROPOGATE); + OS.g_signal_connect (mozillaHandle, OS.button_press_event, cast(GCallback)&eventProc, STOP_PROPOGATE); } } } @@ -201,7 +204,7 @@ browser = null; } -void setSize (int /*long*/ embedHandle, int width, int height) { +void setSize (GtkWidget* embedHandle, int width, int height) { OS.gtk_widget_set_size_request (embedHandle, width, height); } diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/OpenWindowListener.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/ProgressAdapter.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/ProgressEvent.d --- a/dwt/browser/ProgressEvent.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/ProgressEvent.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,8 +7,6 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Port to the D programming language: - * John Reimer *******************************************************************************/ module dwt.browser.ProgressEvent; @@ -25,7 +23,7 @@ * * @since 3.0 */ -public class ProgressEvent : TypedEvent { +public class ProgressEvent extends TypedEvent { /** current value */ public int current; /** total value */ @@ -33,19 +31,21 @@ static final long serialVersionUID = 3977018427045393972L; - this(Widget w) { - super(w); - } +ProgressEvent(Widget w) { + super(w); +} - /** - * Returns a string containing a concise, human-readable - * description of the receiver. - * - * @return a string representation of the event - */ - - public override String toString () { - return Format( "ProgressEvent { current={} total={} }", - current, total ); - } +/** + * Returns a string containing a concise, human-readable + * description of the receiver. + * + * @return a string representation of the event + */ +public String toString() { + String string = super.toString (); + return string.substring (0, string.length() - 1) // remove trailing '}' + + " current=" + current + + " total=" + total + + "}"; } +} diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/ProgressListener.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/PromptDialog.d --- a/dwt/browser/PromptDialog.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/PromptDialog.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,6 +7,8 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Port to the D programming language: + * John Reimer *******************************************************************************/ module dwt.browser.PromptDialog; @@ -27,19 +29,19 @@ import dwt.widgets.Text; import dwt.widgets.Widget; -class PromptDialog extends Dialog { +class PromptDialog : Dialog { - PromptDialog(Shell parent, int style) { + this(Shell parent, int style) { super(parent, style); } - PromptDialog(Shell parent) { + this(Shell parent) { this(parent, 0); } - void alertCheck(String title, String text, String check, final int[] checkValue) { + void alertCheck(String title, String text, String check, /* final */ int[] checkValue) { Shell parent = getParent(); - final Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL); + /* final */ Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL); if (title !is null) shell.setText(title); GridLayout gridLayout = new GridLayout(); shell.setLayout(gridLayout); @@ -82,9 +84,9 @@ } } - void confirmEx(String title, String text, String check, String button0, String button1, String button2, int defaultIndex, final int[] checkValue, final int[] result) { + void confirmEx(String title, String text, String check, String button0, String button1, String button2, int defaultIndex, /* final */ int[] checkValue, /* final */ int[] result) { Shell parent = getParent(); - final Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL); + /* final */ Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL); shell.setText(title); GridLayout gridLayout = new GridLayout(); shell.setLayout(gridLayout); @@ -162,9 +164,9 @@ } } - void prompt(String title, String text, String check, final String[] value, final int[] checkValue, final int[] result) { + void prompt(String title, String text, String check, /* final */ String[] value, /* final */ int[] checkValue, /* final */ int[] result) { Shell parent = getParent(); - final Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL); + /* final */ Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL); if (title !is null) shell.setText(title); GridLayout gridLayout = new GridLayout(); shell.setLayout(gridLayout); @@ -227,9 +229,9 @@ } } - void promptUsernameAndPassword(String title, String text, String check, final String[] user, final String[] pass, final int[] checkValue, final int[] result) { + void promptUsernameAndPassword(String title, String text, String check, /* final */ String[] user, /* final */ String[] pass, /* final */ int[] checkValue, /* final */ int[] result) { Shell parent = getParent(); - final Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL); + /* final */ Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL); shell.setText(title); GridLayout gridLayout = new GridLayout(); shell.setLayout(gridLayout); diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/PromptService2.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/PromptService2Factory.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/SimpleEnumerator.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/StatusTextEvent.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/StatusTextListener.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/TitleEvent.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/TitleListener.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/VisibilityWindowAdapter.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/VisibilityWindowListener.d diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/WebBrowser.d --- a/dwt/browser/WebBrowser.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/WebBrowser.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,6 +7,8 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Port to the D programming language: + * John Reimer *******************************************************************************/ module dwt.browser.WebBrowser; @@ -17,13 +19,13 @@ abstract class WebBrowser { Browser browser; - CloseWindowListener[] closeWindowListeners = new CloseWindowListener[0]; - LocationListener[] locationListeners = new LocationListener[0]; - OpenWindowListener[] openWindowListeners = new OpenWindowListener[0]; - ProgressListener[] progressListeners = new ProgressListener[0]; - StatusTextListener[] statusTextListeners = new StatusTextListener[0]; - TitleListener[] titleListeners = new TitleListener[0]; - VisibilityWindowListener[] visibilityWindowListeners = new VisibilityWindowListener[0]; + CloseWindowListener[] closeWindowListeners; + LocationListener[] locationListeners; + OpenWindowListener[] openWindowListeners; + ProgressListener[] progressListeners; + StatusTextListener[] statusTextListeners; + TitleListener[] titleListeners; + VisibilityWindowListener[] visibilityWindowListeners; static Runnable MozillaClearSessions; static Runnable NativeClearSessions; diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/WindowCreator2.d --- a/dwt/browser/WindowCreator2.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/WindowCreator2.d Tue Aug 05 18:02:58 2008 -0700 @@ -7,16 +7,17 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Port to the D programming language: - * John Reimer *******************************************************************************/ module dwt.browser.WindowCreator2; import dwt.dwthelper.utils; +import dwt.DWT; +import dwt.graphics.Point; +import dwt.internal.C; import dwt.internal.Platform; - import dwt.internal.mozilla.XPCOM; +import dwt.internal.mozilla.XPCOMObject; import dwt.internal.mozilla.nsIBaseWindow; import dwt.internal.mozilla.nsID; import dwt.internal.mozilla.nsISupports; @@ -24,9 +25,7 @@ import dwt.internal.mozilla.nsIWebBrowser; import dwt.internal.mozilla.nsIWebBrowserChrome; import dwt.internal.mozilla.nsIWindowCreator; - -import dwt.DWT; -import dwt.graphics.Point; +import dwt.internal.mozilla.nsIWindowCreator2; import dwt.layout.FillLayout; import dwt.widgets.Shell; diff -r 75cb516e281e -r 4c1340edee0d dwt/browser/WindowEvent.d --- a/dwt/browser/WindowEvent.d Tue Aug 05 01:15:34 2008 +0200 +++ b/dwt/browser/WindowEvent.d Tue Aug 05 18:02:58 2008 -0700 @@ -8,7 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation * Port to the D programming language: - * John Reimer + * John Reimer *******************************************************************************/ module dwt.browser.WindowEvent; @@ -125,7 +125,6 @@ * * @since 3.0 */ - public class WindowEvent : TypedEvent { /** @@ -189,19 +188,22 @@ static final long serialVersionUID = 3617851997387174969L; - this(Widget w) { - super(w); - } +WindowEvent(Widget w) { + super(w); +} - /** - * Returns a string containing a concise, human-readable - * description of the receiver. - * - * @return a string representation of the event - */ +/** + * Returns a string containing a concise, human-readable + * description of the receiver. + * + * @return a string representation of the event + */ - public override String toString () { - return Format( "WindowEvent {required={} browser={} location={} size={} addressBar={} menuBar={} statusBar={} toolBar={} }", - required, browser, location, size, addressBar, menuBar, statusBar, tooBar ); - } +public String toString() { + return Format( "{} {required = {}, browser = {}, location = {}, size = {}, addressbar = {}, menubar = {}, statusbar = {}, toobar = {}}", + super.toString[1 .. $-2], + required, browser, + location, size, addressbar, + menubar, statusbar, toolbar ); } +} diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/Common.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/Common.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,105 @@ +module dwt.internal.mozilla.Common; + +version(Windows) { + const NS_WIN32 = 1; +} +version(linux) { + const NS_UNIX = 1; +} + +alias uint nsresult; +alias uint nsrefcnt; + +const nsnull = 0; + +/****************************************************************************** + + prtypes + +******************************************************************************/ + +extern (System): + +alias ubyte PRUint8; +alias byte PRInt8; + +const PR_INT8_MAX = 127; +const PR_UINT8_MAX = 255U; + +alias ushort PRUint16; +alias short PRInt16; + +const PR_INT16_MAX = 32767; +const PR_UINT16_MAX = 65535U; + +alias uint PRUint32; +alias int PRInt32; + +alias long PRInt64; +alias ulong PRUint64; + +alias int PRIntn; +alias uint PRUintn; + +alias double PRFloat64; +alias size_t PRSize; + +alias PRInt32 PROffset32; +alias PRInt64 PROffset64; + +alias ptrdiff_t PRPtrdiff; +alias uint PRUptrdiff; + +alias PRIntn PRBool; + +const PR_TRUE = 1; +const PR_FALSE = 0; + +alias PRUint8 PRPackedBool; + +enum +{ + PR_FAILURE = -1, + PR_SUCCESS, +} + +alias int PRStatus; + +alias wchar PRUnichar; + +alias int PRWord; +alias uint PRUword; + +/****************************************************************************** + + nscommon + +******************************************************************************/ + +alias void* nsIWidget; +alias void* nsILayoutHistoryState; +alias void* nsIDeviceContext; +alias void* nsPresContext; +alias void* nsEvent; +alias void* nsEventStatus; +alias void* nsIPresShell; +alias void* JSContext; + +alias void* PRThread; +alias void* PLEvent; +alias void* PLEventQueue; +alias void* PLHandleEventProc; +alias void* PLDestroyEventProc; + +/****************************************************************************** + + gfxtypes + +******************************************************************************/ + +alias PRUint32 gfx_color; +alias PRUint16 gfx_depth; +alias PRInt32 gfx_format; + +alias void* nsIntRect; +alias void* nsRect; \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/gfxIImageFrame.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/gfxIImageFrame.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,51 @@ +module dwt.internal.mozilla.gfxIImageFrame; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] GFXIIMAGEFRAME_IID_STR = "f6d00ee7-defc-4101-b2dc-e72cf4c37c3c"; + +const nsIID GFXIIMAGEFRAME_IID= + {0xf6d00ee7, 0xdefc, 0x4101, + [ 0xb2, 0xdc, 0xe7, 0x2c, 0xf4, 0xc3, 0x7c, 0x3c ]}; + +extern(System) + +interface gfxIImageFrame : nsISupports { + + static const char[] IID_STR = GFXIIMAGEFRAME_IID_STR; + static const nsIID IID = GFXIIMAGEFRAME_IID; + + nsresult Init(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight, gfx_format aFormat, gfx_depth aDepth); + nsresult GetMutable(PRBool *aMutable); + nsresult SetMutable(PRBool aMutable); + nsresult GetX(PRInt32 *aX); + nsresult GetY(PRInt32 *aY); + nsresult GetWidth(PRInt32 *aWidth); + nsresult GetHeight(PRInt32 *aHeight); + nsresult GetRect(nsIntRect * rect); + nsresult GetFormat(gfx_format *aFormat); + nsresult GetNeedsBackground(PRBool *aNeedsBackground); + nsresult GetImageBytesPerRow(PRUint32 *aImageBytesPerRow); + nsresult GetImageDataLength(PRUint32 *aImageDataLength); + nsresult GetImageData(PRUint8 **bits, PRUint32 *length); + nsresult SetImageData(PRUint8 *data, PRUint32 length, PRInt32 offset); + nsresult LockImageData(); + nsresult UnlockImageData(); + nsresult GetAlphaBytesPerRow(PRUint32 *aAlphaBytesPerRow); + nsresult GetAlphaDataLength(PRUint32 *aAlphaDataLength); + nsresult GetAlphaData(PRUint8 **bits, PRUint32 *length); + nsresult SetAlphaData(PRUint8 *data, PRUint32 length, PRInt32 offset); + nsresult LockAlphaData(); + nsresult UnlockAlphaData(); + nsresult DrawTo(gfxIImageFrame aDst, PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight); + nsresult GetTimeout(PRInt32 *aTimeout); + nsresult SetTimeout(PRInt32 aTimeout); + nsresult GetFrameDisposalMethod(PRInt32 *aFrameDisposalMethod); + nsresult SetFrameDisposalMethod(PRInt32 aFrameDisposalMethod); + nsresult GetBackgroundColor(gfx_color *aBackgroundColor); + nsresult SetBackgroundColor(gfx_color aBackgroundColor); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/imgIContainer.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/imgIContainer.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,49 @@ +module dwt.internal.mozilla.imgIContainer; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.gfxIImageFrame; +import dwt.internal.mozilla.imgIContainerObserver; + +const char[] IMGICONTAINER_IID_STR = "1a6290e6-8285-4e10-963d-d001f8d327b8"; + +const nsIID IMGICONTAINER_IID= + {0x1a6290e6, 0x8285, 0x4e10, + [ 0x96, 0x3d, 0xd0, 0x01, 0xf8, 0xd3, 0x27, 0xb8 ]}; + +extern(System) + +interface imgIContainer : nsISupports { + + static const char[] IID_STR = IMGICONTAINER_IID_STR; + static const nsIID IID = IMGICONTAINER_IID; + + nsresult Init(PRInt32 aWidth, PRInt32 aHeight, imgIContainerObserver aObserver); + nsresult GetPreferredAlphaChannelFormat(gfx_format *aPreferredAlphaChannelFormat); + nsresult GetWidth(PRInt32 *aWidth); + nsresult GetHeight(PRInt32 *aHeight); + nsresult GetCurrentFrame(gfxIImageFrame *aCurrentFrame); + nsresult GetNumFrames(PRUint32 *aNumFrames); + + enum { kNormalAnimMode = 0 }; + enum { kDontAnimMode = 1 }; + enum { kLoopOnceAnimMode = 2 }; + + nsresult GetAnimationMode(PRUint16 *aAnimationMode); + nsresult SetAnimationMode(PRUint16 aAnimationMode); + nsresult GetFrameAt(PRUint32 index, gfxIImageFrame *_retval); + nsresult AppendFrame(gfxIImageFrame item); + nsresult RemoveFrame(gfxIImageFrame item); + nsresult EndFrameDecode(PRUint32 framenumber, PRUint32 timeout); + nsresult DecodingComplete(); + nsresult Clear(); + nsresult StartAnimation(); + nsresult StopAnimation(); + nsresult ResetAnimation(); + nsresult GetLoopCount(PRInt32 *aLoopCount); + nsresult SetLoopCount(PRInt32 aLoopCount); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/imgIContainerObserver.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/imgIContainerObserver.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,26 @@ +module dwt.internal.mozilla.imgIContainerObserver; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.imgIContainer; +import dwt.internal.mozilla.gfxIImageFrame; + +const char[] IMGICONTAINEROBSERVER_IID_STR = "53102f15-0f53-4939-957e-aea353ad2700"; + +const nsIID IMGICONTAINEROBSERVER_IID= + {0x53102f15, 0x0f53, 0x4939, + [ 0x95, 0x7e, 0xae, 0xa3, 0x53, 0xad, 0x27, 0x00 ]}; + +extern(System) + +interface imgIContainerObserver : nsISupports { + + static const char[] IID_STR = IMGICONTAINEROBSERVER_IID_STR; + static const nsIID IID = IMGICONTAINEROBSERVER_IID; + + nsresult FrameChanged(imgIContainer aContainer, gfxIImageFrame aFrame, nsIntRect * aDirtyRect); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsEmbedString.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsEmbedString.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,99 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Communicator client code, released March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by Netscape are Copyright (C) 1998-1999 + * Netscape Communications Corporation. All Rights Reserved. + * + * Contributor(s): + * + * IBM + * - Binding to permit interfacing between Mozilla and DWT + * - Copyright (C) 2004 IBM Corp. All Rights Reserved. + * + * Port to the D programming language: + * John Reimer + * + * ***** END LICENSE BLOCK ***** */ + +module dwt.internal.mozilla.nsEmbedString; + +import dwt.dwthelper.utils; +import dwt.internal.mozilla.nsStringAPI; + +public class nsEmbedString +{ + int /*long*/ handle; + + /************************************************************************** + + **************************************************************************/ + + public this() + { + handle = XPCOM.nsEmbedString_new(); + } + + /************************************************************************** + + **************************************************************************/ + + public nsEmbedString(String string) + { + if (string !is null) + { + char[] aString = new char[string.length() + 1]; + string.getChars(0, string.length(), aString, 0); + handle = XPCOM.nsEmbedString_new(aString); + } + } + + /************************************************************************** + + **************************************************************************/ + + public int /*long*/ getAddress() + { + return handle; + } + + /************************************************************************** + + **************************************************************************/ + + public String toString() + { + if (handle is 0) + return null; + int length = XPCOM.nsEmbedString_Length(handle); + int /*long*/ buffer = XPCOM.nsEmbedString_get(handle); + char[] dest = new char[length]; + XPCOM.memmove(dest, buffer, length * 2); + return new String(dest); + } + + /************************************************************************** + + **************************************************************************/ + + public void dispose() + { + if (handle is 0) + return; + XPCOM.nsEmbedString_delete(handle); + handle = 0; + } +} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsEmbedString2.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsEmbedString2.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,86 @@ +module dwt.internal.mozilla.nsEmbedString; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsStringAPI; + +class nsEmbedString +{ + this(wchar[] s) + { + nsresult result; + result = NS_StringContainerInit2(&str, s.ptr, s.length, 0); + if (result != 0) // TODO: convert to XPCOM fail macro + throw new Exception("Init string container fail"); + } + + this() + { + nsresult result; + result = NS_StringContainerInit(&str); + if (result != 0) // TODO: convert to XPCOM fail macro + throw new Exception("Init string container fail"); + } + + nsAString* opCast() + { + return cast(nsAString*)&str; + } + + wchar[] toString16() + { + wchar* buffer = null; + PRBool terminated; + uint len = NS_StringGetData(cast(nsAString*)&str, &buffer, &terminated); + wchar[] result = buffer[0 .. len].dup; + return result; + } + + ~this() + { + NS_StringContainerFinish(&str); + } +private: + nsStringContainer str; +} + + +class nsEmbedCString +{ + this(char[] s) + { + nsresult result; + result = NS_CStringContainerInit2(&str, s.ptr, s.length, 0); + if (result != 0) // TODO: convert to XPCOM fail macro + throw new Exception("Init string container fail"); + } + + this() + { + nsresult result; + result = NS_CStringContainerInit(&str); + if (result != 0) // TODO: convert to XPCOM fail macro + throw new Exception("Init string container fail"); + } + + nsACString* opCast() + { + return cast(nsACString*)&str; + } + + char[] toString() + { + char* buffer = null; + PRBool terminated; + uint len = NS_CStringGetData(cast(nsACString*)&str, &buffer, &terminated); + char[] result = buffer[0 .. len].dup; + return result; + } + + ~this() + { + NS_CStringContainerFinish(&str); + } +private: + nsCStringContainer str; +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsError.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsError.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,67 @@ +module dwt.internal.mozilla.nsError; + +import dwt.internal.mozilla.Common; + +/** + * @name Standard Module Offset Code. Each Module should identify a unique number + * and then all errors associated with that module become offsets from the + * base associated with that module id. There are 16 bits of code bits for + * each module. + */ + +enum { + NS_ERROR_MODULE_XPCOM = 1, + NS_ERROR_MODULE_BASE = 2, + NS_ERROR_MODULE_GFX = 3, + NS_ERROR_MODULE_WIDGET = 4, + NS_ERROR_MODULE_CALENDAR = 5, + NS_ERROR_MODULE_NETWORK = 6, + NS_ERROR_MODULE_PLUGINS = 7, + NS_ERROR_MODULE_LAYOUT = 8, + NS_ERROR_MODULE_HTMLPARSER = 9, + NS_ERROR_MODULE_RDF = 10, + NS_ERROR_MODULE_UCONV = 11, + NS_ERROR_MODULE_REG = 12, + NS_ERROR_MODULE_FILES = 13, + NS_ERROR_MODULE_DOM = 14, + NS_ERROR_MODULE_IMGLIB = 15, + NS_ERROR_MODULE_MAILNEWS = 16, + NS_ERROR_MODULE_EDITOR = 17, + NS_ERROR_MODULE_XPCONNECT = 18, + NS_ERROR_MODULE_PROFILE = 19, + NS_ERROR_MODULE_LDAP = 20, + NS_ERROR_MODULE_SECURITY = 21, + NS_ERROR_MODULE_DOM_XPATH = 22, + NS_ERROR_MODULE_DOM_RANGE = 23, + NS_ERROR_MODULE_URILOADER = 24, + NS_ERROR_MODULE_CONTENT = 25, + NS_ERROR_MODULE_PYXPCOM = 26, + NS_ERROR_MODULE_XSLT = 27, + NS_ERROR_MODULE_IPC = 28, + NS_ERROR_MODULE_SVG = 29, + NS_ERROR_MODULE_STORAGE = 30, + NS_ERROR_MODULE_SCHEMA = 31, + NS_ERROR_MODULE_GENERAL = 51, + NS_ERROR_SEVERITY_ERROR = 1, + NS_ERROR_MODULE_BASE_OFFSET = 0x45, +} + +const nsresult NS_OK = cast(nsresult)0; +const nsresult NS_ERROR_BASE = cast(nsresult) 0xC1F30000; +const nsresult NS_ERROR_NOT_INITIALIZED = cast(nsresult)(NS_ERROR_BASE + 1); +const nsresult NS_ERROR_ALREADY_INITIALIZED = cast(nsresult)(NS_ERROR_BASE + 2); +const nsresult NS_NOINTERFACE = cast(nsresult)0x80004002L; + +alias NS_NOINTERFACE NS_ERROR_NO_INTERFACE; + +const nsresult NS_ERROR_INVALID_POINTER = cast(nsresult)0x80004003L; + +alias NS_ERROR_INVALID_POINTER NS_ERROR_NULL_POINTER; + +const nsresult NS_ERROR_ABORT = cast(nsresult)0x80004004L; +const nsresult NS_ERROR_FAILURE = cast(nsresult)0x80004005L; +const nsresult NS_ERROR_UNEXPECTED = cast(nsresult)0x8000ffffL; +const nsresult NS_ERROR_OUT_OF_MEMORY = cast(nsresult) 0x8007000eL; +const nsresult NS_ERROR_ILLEGAL_VALUE = cast(nsresult) 0x80070057L; + +alias NS_ERROR_ILLEGAL_VALUE NS_ERROR_INVALID_ARG; diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIAppShell.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIAppShell.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,29 @@ +module dwt.internal.mozilla.nsIAppShell; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIEventQueue; + +const char[] NS_IAPPSHELL_IID_STR = "a0757c31-eeac-11d1-9ec1-00aa002fb821"; + +const nsIID NS_IAPPSHELL_IID= + {0xa0757c31, 0xeeac, 0x11d1, + [ 0x9e, 0xc1, 0x00, 0xaa, 0x00, 0x2f, 0xb8, 0x21 ]}; + +extern(System) + +interface nsIAppShell : nsISupports { + static const char[] IID_STR = NS_IAPPSHELL_IID_STR; + static const nsIID IID = NS_IAPPSHELL_IID; + + nsresult Create(int *argc, char **argv); + nsresult Run(); + nsresult Spinup(); + nsresult Spindown(); + nsresult ListenToEventQueue(nsIEventQueue * aQueue, PRBool aListen); + nsresult GetNativeEvent(PRBool * aRealEvent, void * * aEvent); + nsresult DispatchNativeEvent(PRBool aRealEvent, void * aEvent); + nsresult Exit(); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIAtom.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIAtom.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,29 @@ +module dwt.internal.mozilla.nsIAtom; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IATOM_IID_STR = "3d1b15b0-93b4-11d1-895b-006008911b81"; + +const nsIID NS_IATOM_IID= + {0x3d1b15b0, 0x93b4, 0x11d1, + [ 0x89, 0x5b, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81 ]}; + +extern(System) + +interface nsIAtom : nsISupports { + + static const char[] IID_STR = NS_IATOM_IID_STR; + static const nsIID IID = NS_IATOM_IID; + + nsresult ToString(nsAString * _retval); + nsresult ToUTF8String(nsACString * _retval); + nsresult GetUTF8String(char **aResult); + nsresult Equals(nsAString * aString, PRBool *_retval); + nsresult EqualsUTF8(nsACString * aString, PRBool *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIAuthInformation.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIAuthInformation.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,36 @@ +module dwt.internal.mozilla.nsAuthInformation; + +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IAUTHINFORMATION_IID_STR = "0d73639c-2a92-4518-9f92-28f71fea5f20"; + +const nsIID NS_IAUTHINFORMATION_IID = + {0x0d73639c, 0x2a92, 0x4518, + [ 0x9f, 0x92, 0x28, 0xf7, 0x1f, 0xea, 0x5f, 0x20 ] }; + +extern(System) + +interface nsIAuthInformation : nsISupports { + + static const char[] IID_STR = NS_IAUTHINFORMATION_IID_STR; + static const nsIID IID = NS_IAUTHINFORMATION_IID; + + enum { AUTH_HOST = 1U } + enum { AUTH_PROXY = 2U } + enum { NEED_DOMAIN = 4U } + enum { ONLY_PASSWORD = 8U } + + nsresult GetFlags(PRUint32 *aFlags); + nsresult GetRealm(nsAString * aRealm);; + nsresult GetAuthenticationScheme(nsACString * aAuthenticationScheme); + nsresult GetUsername(nsAString * aUsername); + nsresult SetUsername(nsAString * aUsername); + nsresult GetPassword(nsAString * aPassword); + nsresult SetPassword(nsAString * aPassword); + nsresult GetDomain(nsAString * aDomain); + nsresult SetDomain(nsAString * aDomain); + +}; diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIAuthPrompt.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIAuthPrompt.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,31 @@ +module dwt.internal.mozilla.nsIAuthPrompt; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +// import dwt.internal.mozilla.nsIPrompt; + +const char[] NS_IAUTHPROMPT_IID_STR = "2f977d45-5485-11d4-87e2-0010a4e75ef2"; + +const nsIID NS_IAUTHPROMPT_IID= + {0x2f977d45, 0x5485, 0x11d4, + [ 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 ]}; + +extern(System) + +interface nsIAuthPrompt : nsISupports { + + static const char[] IID_STR = NS_IAUTHPROMPT_IID_STR; + static const nsIID IID = NS_IAUTHPROMPT_IID; + + enum { SAVE_PASSWORD_NEVER = 0U }; + enum { SAVE_PASSWORD_FOR_SESSION = 1U }; + enum { SAVE_PASSWORD_PERMANENTLY = 2U }; + + nsresult Prompt(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar *passwordRealm, PRUint32 savePassword, PRUnichar *defaultText, PRUnichar **result, PRBool *_retval); + nsresult PromptUsernameAndPassword(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar *passwordRealm, PRUint32 savePassword, PRUnichar **user, PRUnichar **pwd, PRBool *_retval); + nsresult PromptPassword(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar *passwordRealm, PRUint32 savePassword, PRUnichar **pwd, PRBool *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIBaseWindow.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIBaseWindow.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,48 @@ +module dwt.internal.mozilla.nsIBaseWindow; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +alias void * nativeWindow; + +const char[] NS_IBASEWINDOW_IID_STR = "046bc8a0-8015-11d3-af70-00a024ffc08c"; + +const nsIID NS_IBASEWINDOW_IID= + {0x046bc8a0, 0x8015, 0x11d3, + [ 0xaf, 0x70, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; + +extern(System) + +interface nsIBaseWindow : nsISupports { + + static const char[] IID_STR = NS_IBASEWINDOW_IID_STR; + static const nsIID IID = NS_IBASEWINDOW_IID; + + nsresult InitWindow(nativeWindow parentNativeWindow, nsIWidget * parentWidget, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy); + nsresult Create(); + nsresult Destroy(); + nsresult SetPosition(PRInt32 x, PRInt32 y); + nsresult GetPosition(PRInt32 *x, PRInt32 *y); + nsresult SetSize(PRInt32 cx, PRInt32 cy, PRBool fRepaint); + nsresult GetSize(PRInt32 *cx, PRInt32 *cy); + nsresult SetPositionAndSize(PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy, PRBool fRepaint); + nsresult GetPositionAndSize(PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy); + nsresult Repaint(PRBool force); + nsresult GetParentWidget(nsIWidget * *aParentWidget); + nsresult SetParentWidget(nsIWidget * aParentWidget); + nsresult GetParentNativeWindow(nativeWindow *aParentNativeWindow); + nsresult SetParentNativeWindow(nativeWindow aParentNativeWindow); + nsresult GetVisibility(PRBool *aVisibility); + nsresult SetVisibility(PRBool aVisibility); + nsresult GetEnabled(PRBool *aEnabled); + nsresult SetEnabled(PRBool aEnabled); + nsresult GetBlurSuppression(PRBool *aBlurSuppression); + nsresult SetBlurSuppression(PRBool aBlurSuppression); + nsresult GetMainWidget(nsIWidget * *aMainWidget); + nsresult SetFocus(); + nsresult GetTitle(PRUnichar * *aTitle); + nsresult SetTitle(PRUnichar * aTitle); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIBinaryInputStream.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIBinaryInputStream.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,37 @@ +module dwt.internal.mozilla.nsIBinaryInputStream; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIInputStream; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IBINARYINPUTSTREAM_IID_STR = "7b456cb0-8772-11d3-90cf-0040056a906e"; + +const nsIID NS_IBINARYINPUTSTREAM_IID= + {0x7b456cb0, 0x8772, 0x11d3, + [ 0x90, 0xcf, 0x00, 0x40, 0x05, 0x6a, 0x90, 0x6e ]}; + +extern(System) + +interface nsIBinaryInputStream : nsIInputStream { + + static const char[] IID_STR = NS_IBINARYINPUTSTREAM_IID_STR; + static const nsIID IID = NS_IBINARYINPUTSTREAM_IID; + + nsresult SetInputStream(nsIInputStream aInputStream); + nsresult ReadBoolean(PRBool *_retval); + nsresult Read8(PRUint8 *_retval); + nsresult Read16(PRUint16 *_retval); + nsresult Read32(PRUint32 *_retval); + nsresult Read64(PRUint64 *_retval); + nsresult ReadFloat(float *_retval); + nsresult ReadDouble(double *_retval); + nsresult ReadCString(nsACString * _retval); + nsresult ReadString(nsAString * _retval); + nsresult ReadBytes(PRUint32 aLength, char **aString); + nsresult ReadByteArray(PRUint32 aLength, PRUint8 **aBytes); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIBinaryOutputStream.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIBinaryOutputStream.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,37 @@ +module dwt.internal.mozilla.nsIBinaryOutputStream; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIOutputStream; + +const char[] NS_IBINARYOUTPUTSTREAM_IID_STR = "204ee610-8765-11d3-90cf-0040056a906e"; + +const nsIID NS_IBINARYOUTPUTSTREAM_IID= + {0x204ee610, 0x8765, 0x11d3, + [ 0x90, 0xcf, 0x00, 0x40, 0x05, 0x6a, 0x90, 0x6e ]}; + +extern(System) + +interface nsIBinaryOutputStream : nsIOutputStream { + + static const char[] IID_STR = NS_IBINARYOUTPUTSTREAM_IID_STR; + static const nsIID IID = NS_IBINARYOUTPUTSTREAM_IID; + + nsresult SetOutputStream(nsIOutputStream aOutputStream); + nsresult WriteBoolean(PRBool aBoolean); + nsresult Write8(PRUint8 aByte); + nsresult Write16(PRUint16 a16); + nsresult Write32(PRUint32 a32); + nsresult Write64(PRUint64 a64); + nsresult WriteFloat(float aFloat); + nsresult WriteDouble(double aDouble); + nsresult WriteStringZ(char *aString); + nsresult WriteWStringZ(PRUnichar *aString); + nsresult WriteUtf8Z(PRUnichar *aString); + nsresult WriteBytes(char *aString, PRUint32 aLength); + nsresult WriteByteArray(PRUint8 *aBytes, PRUint32 aLength); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsICancelable.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsICancelable.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,22 @@ +module dwt.internal.mozilla.nsICancelable; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_ICANCELABLE_IID_STR = "d94ac0a0-bb18-46b8-844e-84159064b0bd"; + +const nsIID NS_ICANCELABLE_IID= + {0xd94ac0a0, 0xbb18, 0x46b8, + [ 0x84, 0x4e, 0x84, 0x15, 0x90, 0x64, 0xb0, 0xbd ]}; + +extern(System) + +interface nsICancelable : nsISupports { + + static const char[] IID_STR = NS_ICANCELABLE_IID_STR; + static const nsIID IID = NS_ICANCELABLE_IID; + + nsresult Cancel(nsresult aReason); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsICategoryManager.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsICategoryManager.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,28 @@ +module dwt.internal.mozilla.nsICategoryManager; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsISimpleEnumerator; + +const char[] NS_ICATEGORYMANAGER_IID_STR = "3275b2cd-af6d-429a-80d7-f0c5120342ac"; + +const nsIID NS_ICATEGORYMANAGER_IID= + {0x3275b2cd, 0xaf6d, 0x429a, + [ 0x80, 0xd7, 0xf0, 0xc5, 0x12, 0x03, 0x42, 0xac ]}; + +extern(System) + +interface nsICategoryManager : nsISupports { + + static const char[] IID_STR = NS_ICATEGORYMANAGER_IID_STR; + static const nsIID IID = NS_ICATEGORYMANAGER_IID; + + nsresult GetCategoryEntry(char *aCategory, char *aEntry, char **_retval); + nsresult AddCategoryEntry(char *aCategory, char *aEntry, char *aValue, PRBool aPersist, PRBool aReplace, char **_retval); + nsresult DeleteCategoryEntry(char *aCategory, char *aEntry, PRBool aPersist); + nsresult DeleteCategory(char *aCategory); + nsresult EnumerateCategory(char *aCategory, nsISimpleEnumerator *_retval); + nsresult EnumerateCategories(nsISimpleEnumerator *_retval); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIChannel.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIChannel.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,51 @@ +module dwt.internal.mozilla.nsIChannel; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIRequest; +import dwt.internal.mozilla.nsIURI; +import dwt.internal.mozilla.nsIInterfaceRequestor; +import dwt.internal.mozilla.nsIInputStream; +import dwt.internal.mozilla.nsIStreamListener; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_ICHANNEL_IID_STR = "c63a055a-a676-4e71-bf3c-6cfa11082018"; +const nsIID NS_ICHANNEL_IID= + {0xc63a055a, 0xa676, 0x4e71, + [ 0xbf, 0x3c, 0x6c, 0xfa, 0x11, 0x08, 0x20, 0x18 ]}; + +extern(System) + +interface nsIChannel : nsIRequest { + + static const char[] IID_STR = NS_ICHANNEL_IID_STR; + static const nsIID IID = NS_ICHANNEL_IID; + + nsresult GetOriginalURI(nsIURI *aOriginalURI); + nsresult SetOriginalURI(nsIURI aOriginalURI); + nsresult GetURI(nsIURI *aURI); + nsresult GetOwner(nsISupports *aOwner); + nsresult SetOwner(nsISupports aOwner); + + nsresult GetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks); + nsresult SetNotificationCallbacks(nsIInterfaceRequestor aNotificationCallbacks); + nsresult GetSecurityInfo(nsISupports *aSecurityInfo); + nsresult GetContentType(nsACString * aContentType); + nsresult SetContentType(nsACString * aContentType); + nsresult GetContentCharset(nsACString * aContentCharset); + nsresult SetContentCharset(nsACString * aContentCharset); + nsresult GetContentLength(PRInt32 *aContentLength); + nsresult SetContentLength(PRInt32 aContentLength); + nsresult Open(nsIInputStream *_retval); + nsresult AsyncOpen(nsIStreamListener aListener, nsISupports aContext); + + enum { LOAD_DOCUMENT_URI = 65536U }; + enum { LOAD_RETARGETED_DOCUMENT_URI = 131072U }; + enum { LOAD_REPLACE = 262144U }; + enum { LOAD_INITIAL_DOCUMENT_URI = 524288U }; + enum { LOAD_TARGETED = 1048576U }; + enum { LOAD_CALL_CONTENT_SNIFFERS = 2097152U }; +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIChromeEventHandler.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIChromeEventHandler.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,25 @@ +module dwt.internal.mozilla.nsIChromeEventHandler; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMEvent; + +const char[] NS_ICHROMEEVENTHANDLER_IID_STR = "7bc08970-9e6c-11d3-afb2-00a024ffc08c"; + +const nsIID NS_ICHROMEEVENTHANDLER_IID= + {0x7bc08970, 0x9e6c, 0x11d3, + [ 0xaf, 0xb2, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; + +extern(System) + +interface nsIChromeEventHandler : nsISupports { + + static const char[] IID_STR = NS_ICHROMEEVENTHANDLER_IID_STR; + static const nsIID IID = NS_ICHROMEEVENTHANDLER_IID; + + nsresult HandleChromeEvent(nsPresContext * aPresContext, nsEvent * aEvent, nsIDOMEvent *aDOMEvent, PRUint32 aFlags, nsEventStatus *aStatus); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsICollection.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsICollection.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,33 @@ +module dwt.internal.mozilla.nsICollection; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsISerializable; +import dwt.internal.mozilla.nsIEnumerator; + +const char[] NS_ICOLLECTION_IID_STR = "83b6019c-cbc4-11d2-8cca-0060b0fc14a3"; + +const nsIID NS_ICOLLECTION_IID= + {0x83b6019c, 0xcbc4, 0x11d2, + [ 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 ]}; + +extern(System) + +interface nsICollection : nsISerializable { + + static const char[] IID_STR = NS_ICOLLECTION_IID_STR; + static const nsIID IID = NS_ICOLLECTION_IID; + + nsresult Count(PRUint32 *_retval); + nsresult GetElementAt(PRUint32 index, nsISupports *_retval); + nsresult QueryElementAt(PRUint32 index, nsIID * uuid, void * *result); + nsresult SetElementAt(PRUint32 index, nsISupports item); + nsresult AppendElement(nsISupports item); + nsresult RemoveElement(nsISupports item); + nsresult Enumerate(nsIEnumerator *_retval); + nsresult Clear(); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIComponentManager.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIComponentManager.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,25 @@ +module dwt.internal.mozilla.nsIComponentManager; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIFactory; + +const char[] NS_ICOMPONENTMANAGER_IID_STR = "a88e5a60-205a-4bb1-94e1-2628daf51eae"; + +const nsIID NS_ICOMPONENTMANAGER_IID= + {0xa88e5a60, 0x205a, 0x4bb1, + [ 0x94, 0xe1, 0x26, 0x28, 0xda, 0xf5, 0x1e, 0xae ]}; + +extern(System) + +interface nsIComponentManager : nsISupports { + static const char[] IID_STR = NS_ICOMPONENTMANAGER_IID_STR; + static const nsIID IID = NS_ICOMPONENTMANAGER_IID; + + nsresult GetClassObject(nsCID * aClass, nsIID * aIID, void * *result); + nsresult GetClassObjectByContractID(char *aContractID, nsIID * aIID, void * *result); + nsresult CreateInstance(nsCID * aClass, nsISupports aDelegate, nsIID * aIID, void * *result); + nsresult CreateInstanceByContractID(char *aContractID, nsISupports aDelegate, nsIID * aIID, void * *result); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIComponentRegistrar.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIComponentRegistrar.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,35 @@ +module dwt.internal.mozilla.nsIComponentRegistrar; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIFile; +import dwt.internal.mozilla.nsIFactory; +import dwt.internal.mozilla.nsISimpleEnumerator; + +const char[] NS_ICOMPONENTREGISTRAR_IID_STR = "2417cbfe-65ad-48a6-b4b6-eb84db174392"; + +const nsIID NS_ICOMPONENTREGISTRAR_IID= + {0x2417cbfe, 0x65ad, 0x48a6, + [ 0xb4, 0xb6, 0xeb, 0x84, 0xdb, 0x17, 0x43, 0x92 ]}; + +extern(System) + +interface nsIComponentRegistrar : nsISupports { + static const char[] IID_STR = NS_ICOMPONENTREGISTRAR_IID_STR; + static const nsIID IID = NS_ICOMPONENTREGISTRAR_IID; + + nsresult AutoRegister(nsIFile aSpec); + nsresult AutoUnregister(nsIFile aSpec); + nsresult RegisterFactory(nsCID * aClass, char *aClassName, char *aContractID, nsIFactory aFactory); + nsresult UnregisterFactory(nsCID * aClass, nsIFactory aFactory); + nsresult RegisterFactoryLocation(nsCID * aClass, char *aClassName, char *aContractID, nsIFile aFile, char *aLoaderStr, char *aType); + nsresult UnregisterFactoryLocation(nsCID * aClass, nsIFile aFile); + nsresult IsCIDRegistered(nsCID * aClass, PRBool *_retval); + nsresult IsContractIDRegistered(char *aContractID, PRBool *_retval); + nsresult EnumerateCIDs(nsISimpleEnumerator *_retval); + nsresult EnumerateContractIDs(nsISimpleEnumerator *_retval); + nsresult CIDToContractID(nsCID * aClass, char **_retval); + nsresult ContractIDToCID(char *aContractID, nsCID * *_retval); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIContentViewer.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIContentViewer.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,76 @@ +module dwt.internal.mozilla.nsIContentViewer; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMDocument; +import dwt.internal.mozilla.nsISHEntry; + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_ICONTENTVIEWER_IID_STR = "6a7ddb40-8a9e-4576-8ad1-71c5641d8780"; + +const nsIID NS_ICONTENTVIEWER_IID= + {0x6a7ddb40, 0x8a9e, 0x4576, + [ 0x8a, 0xd1, 0x71, 0xc5, 0x64, 0x1d, 0x87, 0x80 ]}; + +extern(System) + +interface nsIContentViewer : nsISupports { + + static const char[] IID_STR = NS_ICONTENTVIEWER_IID_STR; + static const nsIID IID = NS_ICONTENTVIEWER_IID; + + nsresult Init(nsIWidget * aParentWidget, nsIDeviceContext * aDeviceContext, nsRect * aBounds); + nsresult GetContainer(nsISupports *aContainer); + nsresult SetContainer(nsISupports aContainer); + nsresult LoadStart(nsISupports aDoc); + nsresult LoadComplete(PRUint32 aStatus); + nsresult PermitUnload(PRBool *_retval); + nsresult PageHide(PRBool isUnload); + nsresult Close(nsISHEntry historyEntry); + nsresult Destroy(); + nsresult Stop(); + nsresult GetDOMDocument(nsIDOMDocument *aDOMDocument); + nsresult SetDOMDocument(nsIDOMDocument aDOMDocument); + nsresult GetBounds(nsRect * aBounds); + nsresult SetBounds(nsRect * aBounds); + nsresult GetPreviousViewer(nsIContentViewer *aPreviousViewer); + nsresult SetPreviousViewer(nsIContentViewer aPreviousViewer); + nsresult Move(PRInt32 aX, PRInt32 aY); + nsresult Show(); + nsresult Hide(); + nsresult GetEnableRendering(PRBool *aEnableRendering); + nsresult SetEnableRendering(PRBool aEnableRendering); + nsresult GetSticky(PRBool *aSticky); + nsresult SetSticky(PRBool aSticky); + nsresult RequestWindowClose(PRBool *_retval); + nsresult Open(nsISupports aState); + nsresult ClearHistoryEntry(); + +} + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_ICONTENTVIEWER_MOZILLA_1_8_BRANCH_IID_STR = "51341ed4-a3bf-4fd5-ae17-5fd3ec59dcab"; + +const nsIID NS_ICONTENTVIEWER_MOZILLA_1_8_BRANCH_IID= + {0x51341ed4, 0xa3bf, 0x4fd5, + [ 0xae, 0x17, 0x5f, 0xd3, 0xec, 0x59, 0xdc, 0xab ]}; + +extern(System) + +interface nsIContentViewer_MOZILLA_1_8_BRANCH : nsISupports { + + static const char[] IID_STR = NS_ICONTENTVIEWER_MOZILLA_1_8_BRANCH_IID_STR; + static const nsIID IID = NS_ICONTENTVIEWER_MOZILLA_1_8_BRANCH_IID; + + nsresult OpenWithEntry(nsISupports aState, nsISHEntry aSHEntry); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIContextMenuListener.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIContextMenuListener.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,31 @@ +module dwt.internal.mozilla.nsIContextMenuListener; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIDOMEvent; +import dwt.internal.mozilla.nsIDOMNode; + +const char[] NS_ICONTEXTMENULISTENER_IID_STR = "3478b6b0-3875-11d4-94ef-0020183bf181"; + +const nsIID NS_ICONTEXTMENULISTENER_IID= + {0x3478b6b0, 0x3875, 0x11d4, + [ 0x94, 0xef, 0x00, 0x20, 0x18, 0x3b, 0xf1, 0x81 ]}; + +extern(System) + +interface nsIContextMenuListener : nsISupports { + + static const char[] IID_STR = NS_ICONTEXTMENULISTENER_IID_STR; + static const nsIID IID = NS_ICONTEXTMENULISTENER_IID; + + enum { CONTEXT_NONE = 0U }; + enum { CONTEXT_LINK = 1U }; + enum { CONTEXT_IMAGE = 2U }; + enum { CONTEXT_DOCUMENT = 4U }; + enum { CONTEXT_TEXT = 8U }; + enum { CONTEXT_INPUT = 16U }; + + nsresult OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent aEvent, nsIDOMNode aNode); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIContextMenuListener2.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIContextMenuListener2.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,61 @@ +module dwt.internal.mozilla.nsIContextMenuListener2; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIDOMEvent; +import dwt.internal.mozilla.nsIDOMNode; +import dwt.internal.mozilla.imgIContainer; +import dwt.internal.mozilla.nsIURI; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_ICONTEXTMENULISTENER2_IID_STR = "7fb719b3-d804-4964-9596-77cf924ee314"; + +const nsIID NS_ICONTEXTMENULISTENER2_IID= + {0x7fb719b3, 0xd804, 0x4964, + [ 0x95, 0x96, 0x77, 0xcf, 0x92, 0x4e, 0xe3, 0x14 ]}; + +extern(System) + +interface nsIContextMenuListener2 : nsISupports { + + static const char[] IID_STR = NS_ICONTEXTMENULISTENER2_IID_STR; + static const nsIID IID = NS_ICONTEXTMENULISTENER2_IID; + + enum { CONTEXT_NONE = 0U }; + enum { CONTEXT_LINK = 1U }; + enum { CONTEXT_IMAGE = 2U }; + enum { CONTEXT_DOCUMENT = 4U }; + enum { CONTEXT_TEXT = 8U }; + enum { CONTEXT_INPUT = 16U }; + enum { CONTEXT_BACKGROUND_IMAGE = 32U }; + + nsresult OnShowContextMenu(PRUint32 aContextFlags, nsIContextMenuInfo aUtils); +} + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_ICONTEXTMENUINFO_IID_STR = "2f977d56-5485-11d4-87e2-0010a4e75ef2"; + +const nsIID NS_ICONTEXTMENUINFO_IID= + {0x2f977d56, 0x5485, 0x11d4, + [ 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 ]}; + +extern(System) + +interface nsIContextMenuInfo : nsISupports { + + static const char[] IID_STR = NS_ICONTEXTMENUINFO_IID_STR; + static const nsIID IID = NS_ICONTEXTMENUINFO_IID; + + nsresult GetMouseEvent(nsIDOMEvent *aMouseEvent); + nsresult GetTargetNode(nsIDOMNode *aTargetNode); + nsresult GetAssociatedLink(nsAString * aAssociatedLink); + nsresult GetImageContainer(imgIContainer *aImageContainer); + nsresult GetImageSrc(nsIURI *aImageSrc); + nsresult GetBackgroundImageContainer(imgIContainer *aBackgroundImageContainer); + nsresult GetBackgroundImageSrc(nsIURI *aBackgroundImageSrc); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsICookie.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsICookie.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,49 @@ +module dwt.internal.mozilla.nsICookie; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsStringAPI; + +alias PRInt32 nsCookieStatus; +alias PRInt32 nsCookiePolicy; + +const char[] NS_ICOOKIE_IID_STR = "e9fcb9a4-d376-458f-b720-e65e7df593bc"; + +const nsIID NS_ICOOKIE_IID= + {0xe9fcb9a4, 0xd376, 0x458f, + [ 0xb7, 0x20, 0xe6, 0x5e, 0x7d, 0xf5, 0x93, 0xbc ]}; + +extern(System) + +interface nsICookie : nsISupports { + + static const char[] IID_STR = NS_ICOOKIE_IID_STR; + static const nsIID IID = NS_ICOOKIE_IID; + + nsresult GetName(nsACString * aName); + nsresult GetValue(nsACString * aValue); + nsresult GetIsDomain(PRBool *aIsDomain); + nsresult GetHost(nsACString * aHost); + nsresult GetPath(nsACString * aPath); + nsresult GetIsSecure(PRBool *aIsSecure); + nsresult GetExpires(PRUint64 *aExpires); + + enum { STATUS_UNKNOWN = 0 }; + enum { STATUS_ACCEPTED = 1 }; + enum { STATUS_DOWNGRADED = 2 }; + enum { STATUS_FLAGGED = 3 }; + enum { STATUS_REJECTED = 4 }; + + nsresult GetStatus(nsCookieStatus *aStatus); + + enum { POLICY_UNKNOWN = 0 }; + enum { POLICY_NONE = 1 }; + enum { POLICY_NO_CONSENT = 2 }; + enum { POLICY_IMPLICIT_CONSENT = 3 }; + enum { POLICY_EXPLICIT_CONSENT = 4 }; + enum { POLICY_NO_II = 5 }; + + nsresult GetPolicy(nsCookiePolicy *aPolicy); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsICookie2.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsICookie2.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,25 @@ +module dwt.internal.mozilla.nsICookie2; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsICookie; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_ICOOKIE2_IID_STR = "d3493503-7854-46ed-8284-8af54a847efb"; + +const nsIID NS_ICOOKIE2_IID= + {0xd3493503, 0x7854, 0x46ed, + [ 0x82, 0x84, 0x8a, 0xf5, 0x4a, 0x84, 0x7e, 0xfb ]}; + +extern(System) + +interface nsICookie2 : nsICookie { + + static const char[] IID_STR = NS_ICOOKIE2_IID_STR; + static const nsIID IID = NS_ICOOKIE2_IID; + + nsresult GetRawHost(nsACString * aRawHost); + nsresult GetIsSession(PRBool *aIsSession); + nsresult GetExpiry(PRInt64 *aExpiry); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsICookieManager.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsICookieManager.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,27 @@ +module dwt.internal.mozilla.nsICookieManager; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsISimpleEnumerator; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_ICOOKIEMANAGER_IID_STR = "aaab6710-0f2c-11d5-a53b-0010a401eb10"; + +const nsIID NS_ICOOKIEMANAGER_IID= + {0xaaab6710, 0x0f2c, 0x11d5, + [ 0xa5, 0x3b, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 ]}; + +extern(System) + +interface nsICookieManager : nsISupports { + + static const char[] IID_STR = NS_ICOOKIEMANAGER_IID_STR; + static const nsIID IID = NS_ICOOKIEMANAGER_IID; + + nsresult RemoveAll(); + nsresult GetEnumerator(nsISimpleEnumerator *aEnumerator); + nsresult Remove(nsACString * aDomain, nsACString * aName, nsACString * aPath, PRBool aBlocked); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsICookieManager2.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsICookieManager2.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,25 @@ +module dwt.internal.mozilla.nsICookieManager2; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsICookieManager; +import dwt.internal.mozilla.nsICookie2; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_ICOOKIEMANAGER2_IID_STR = "3e73ff5f-154e-494f-b640-3c654ba2cc2b"; + +const nsIID NS_ICOOKIEMANAGER2_IID= + {0x3e73ff5f, 0x154e, 0x494f, + [ 0xb6, 0x40, 0x3c, 0x65, 0x4b, 0xa2, 0xcc, 0x2b ]}; + +extern(System) + +interface nsICookieManager2 : nsICookieManager { + + static const char[] IID_STR = NS_ICOOKIEMANAGER2_IID_STR; + static const nsIID IID = NS_ICOOKIEMANAGER2_IID; + + nsresult Add(nsACString * aDomain, nsACString * aPath, nsACString * aName, nsACString * aValue, PRBool aSecure, PRBool aIsSession, PRInt64 aExpiry); + nsresult FindMatchingCookie(nsICookie2 aCookie, PRUint32 *aCountFromHost, PRBool *_retval); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsID.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsID.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,26 @@ +module dwt.internal.mozilla.nsID; + +import dwt.internal.mozilla.Common; + +align(1) +struct nsID +{ + PRUint32 m0; + PRUint16 m1; + PRUint16 m2; + PRUint8[8] m3; + + static nsID opCall(PRUint32 v0, PRUint16 v1, PRUint16 v2, PRUint8[8] v3) + { + nsID result; + result.m0 = v0; + result.m1 = v1; + result.m2 = v2; + for(int i=0; i<8; ++i) + result.m3[i] = v3[i]; + return result; + } +} + +alias nsID nsCID; +alias nsID nsIID; diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMAbstractView.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMAbstractView.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,27 @@ +module dwt.internal.mozilla.nsIDOMAbstractView; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMDocumentView; + +alias PRUint64 DOMTimeStamp; + +const char[] NS_IDOMABSTRACTVIEW_IID_STR = "f51ebade-8b1a-11d3-aae7-0010830123b4"; + +const nsIID NS_IDOMABSTRACTVIEW_IID= + {0xf51ebade, 0x8b1a, 0x11d3, + [ 0xaa, 0xe7, 0x00, 0x10, 0x83, 0x01, 0x23, 0xb4 ]}; + +extern(System) + +interface nsIDOMAbstractView : nsISupports { + + static const char[] IID_STR = NS_IDOMABSTRACTVIEW_IID_STR; + static const nsIID IID = NS_IDOMABSTRACTVIEW_IID; + + nsresult GetDocument(nsIDOMDocumentView *aDocument); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMAttr.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMAttr.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,29 @@ +module dwt.internal.mozilla.nsIDOMAttr; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsIDOMNode; +import dwt.internal.mozilla.nsIDOMElement; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IDOMATTR_IID_STR = "a6cf9070-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMATTR_IID= + {0xa6cf9070, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMAttr : nsIDOMNode { + + static const char[] IID_STR = NS_IDOMATTR_IID_STR; + static const nsIID IID = NS_IDOMATTR_IID; + + nsresult GetName(nsAString * aName); + nsresult GetSpecified(PRBool *aSpecified); + nsresult GetValue(nsAString * aValue); + nsresult SetValue(nsAString * aValue); + nsresult GetOwnerElement(nsIDOMElement *aOwnerElement); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMBarProp.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMBarProp.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,26 @@ +module dwt.internal.mozilla.nsIDOMBarProp; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +alias PRUint64 DOMTimeStamp; + +const char[] NS_IDOMBARPROP_IID_STR = "9eb2c150-1d56-11d3-8221-0060083a0bcf"; + +const nsIID NS_IDOMBARPROP_IID= + {0x9eb2c150, 0x1d56, 0x11d3, + [ 0x82, 0x21, 0x00, 0x60, 0x08, 0x3a, 0x0b, 0xcf ]}; + +extern(System) + +interface nsIDOMBarProp : nsISupports { + + static const char[] IID_STR = NS_IDOMBARPROP_IID_STR; + static const nsIID IID = NS_IDOMBARPROP_IID; + + nsresult GetVisible(PRBool *aVisible); + nsresult SetVisible(PRBool aVisible); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMCDATASection.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMCDATASection.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,22 @@ +module dwt.internal.mozilla.nsIDOMCDATASection; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +import dwt.internal.mozilla.nsIDOMText; + +const char[] NS_IDOMCDATASECTION_IID_STR = "a6cf9071-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMCDATASECTION_IID= + {0xa6cf9071, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMCDATASection : nsIDOMText { + + static const char[] IID_STR = NS_IDOMCDATASECTION_IID_STR; + static const nsIID IID = NS_IDOMCDATASECTION_IID; + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMCharacterData.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMCharacterData.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,32 @@ +module dwt.internal.mozilla.nsIDOMCharacterData; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +import dwt.internal.mozilla.nsIDOMNode; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IDOMCHARACTERDATA_IID_STR = "a6cf9072-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMCHARACTERDATA_IID= + {0xa6cf9072, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMCharacterData : nsIDOMNode { + + static const char[] IID_STR = NS_IDOMCHARACTERDATA_IID_STR; + static const nsIID IID = NS_IDOMCHARACTERDATA_IID; + + nsresult GetData(nsAString * aData); + nsresult SetData(nsAString * aData); + nsresult GetLength(PRUint32 *aLength); + nsresult SubstringData(PRUint32 offset, PRUint32 count, nsAString * _retval); + nsresult AppendData(nsAString * arg); + nsresult InsertData(PRUint32 offset, nsAString * arg); + nsresult DeleteData(PRUint32 offset, PRUint32 count); + nsresult ReplaceData(PRUint32 offset, PRUint32 count, nsAString * arg); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMComment.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMComment.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,22 @@ +module dwt.internal.mozilla.nsIDOMComment; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +import dwt.internal.mozilla.nsIDOMCharacterData; + +const char[] NS_IDOMCOMMENT_IID_STR = "a6cf9073-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMCOMMENT_IID= + {0xa6cf9073, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMComment : nsIDOMCharacterData { + + static const char[] IID_STR = NS_IDOMCOMMENT_IID_STR; + static const nsIID IID = NS_IDOMCOMMENT_IID; + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMDOMImplementation.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMDOMImplementation.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,29 @@ +module dwt.internal.mozilla.nsIDOMDOMImplementation; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMDocumentType; +import dwt.internal.mozilla.nsIDOMDocument; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IDOMDOMIMPLEMENTATION_IID_STR = "a6cf9074-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMDOMIMPLEMENTATION_IID= + {0xa6cf9074, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMDOMImplementation : nsISupports { + + static const char[] IID_STR = NS_IDOMDOMIMPLEMENTATION_IID_STR; + static const nsIID IID = NS_IDOMDOMIMPLEMENTATION_IID; + + nsresult HasFeature(nsAString * feature, nsAString * version_, PRBool *_retval); + nsresult CreateDocumentType(nsAString * qualifiedName, nsAString * publicId, nsAString * systemId, nsIDOMDocumentType *_retval); + nsresult CreateDocument(nsAString * namespaceURI, nsAString * qualifiedName, nsIDOMDocumentType doctype, nsIDOMDocument *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMDocument.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMDocument.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,53 @@ +module dwt.internal.mozilla.nsIDOMDocument; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsIDOMNode; +import dwt.internal.mozilla.nsStringAPI; + +import dwt.internal.mozilla.nsIDOMNode; +import dwt.internal.mozilla.nsIDOMNodeList; +import dwt.internal.mozilla.nsIDOMDocumentType; +import dwt.internal.mozilla.nsIDOMElement; +import dwt.internal.mozilla.nsIDOMDocumentFragment; +import dwt.internal.mozilla.nsIDOMText; +import dwt.internal.mozilla.nsIDOMComment; +import dwt.internal.mozilla.nsIDOMCDATASection; +import dwt.internal.mozilla.nsIDOMProcessingInstruction; +import dwt.internal.mozilla.nsIDOMDOMImplementation; +import dwt.internal.mozilla.nsIDOMAttr; +import dwt.internal.mozilla.nsIDOMEntityReference; + +const char[] NS_IDOMDOCUMENT_IID_STR = "a6cf9075-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMDOCUMENT_IID= + {0xa6cf9075, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMDocument : nsIDOMNode { + + static const char[] IID_STR = NS_IDOMDOCUMENT_IID_STR; + static const nsIID IID = NS_IDOMDOCUMENT_IID; + + nsresult GetDoctype(nsIDOMDocumentType *aDoctype); + nsresult GetImplementation(nsIDOMDOMImplementation *aImplementation); + nsresult GetDocumentElement(nsIDOMElement *aDocumentElement); + nsresult CreateElement(nsAString * tagName, nsIDOMElement *_retval); + nsresult CreateDocumentFragment(nsIDOMDocumentFragment *_retval); + nsresult CreateTextNode(nsAString * data, nsIDOMText *_retval); + nsresult CreateComment(nsAString * data, nsIDOMComment *_retval); + nsresult CreateCDATASection(nsAString * data, nsIDOMCDATASection *_retval); + nsresult CreateProcessingInstruction(nsAString * target, nsAString * data, nsIDOMProcessingInstruction *_retval); + nsresult CreateAttribute(nsAString * name, nsIDOMAttr *_retval); + nsresult CreateEntityReference(nsAString * name, nsIDOMEntityReference *_retval); + nsresult GetElementsByTagName(nsAString * tagname, nsIDOMNodeList *_retval); + nsresult ImportNode(nsIDOMNode importedNode, PRBool deep, nsIDOMNode *_retval); + nsresult CreateElementNS(nsAString * namespaceURI, nsAString * qualifiedName, nsIDOMElement *_retval); + nsresult CreateAttributeNS(nsAString * namespaceURI, nsAString * qualifiedName, nsIDOMAttr *_retval); + nsresult GetElementsByTagNameNS(nsAString * namespaceURI, nsAString * localName, nsIDOMNodeList *_retval); + nsresult GetElementById(nsAString * elementId, nsIDOMElement *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMDocumentFragment.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMDocumentFragment.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,20 @@ +module dwt.internal.mozilla.nsIDOMDocumentFragment; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +import dwt.internal.mozilla.nsIDOMNode; + +const char[] NS_IDOMDOCUMENTFRAGMENT_IID_STR = "a6cf9076-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMDOCUMENTFRAGMENT_IID= + {0xa6cf9076, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(Windows) +interface nsIDOMDocumentFragment : nsIDOMNode { + static const char[] IID_STR = NS_IDOMDOCUMENTFRAGMENT_IID_STR; + static const nsIID IID = NS_IDOMDOCUMENTFRAGMENT_IID; + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMDocumentType.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMDocumentType.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,31 @@ +module dwt.internal.mozilla.nsIDOMDocumentType; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +import dwt.internal.mozilla.nsIDOMNode; +import dwt.internal.mozilla.nsIDOMNamedNodeMap; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IDOMDOCUMENTTYPE_IID_STR = "a6cf9077-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMDOCUMENTTYPE_IID= + {0xa6cf9077, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMDocumentType : nsIDOMNode { + + static const char[] IID_STR = NS_IDOMDOCUMENTTYPE_IID_STR; + static const nsIID IID = NS_IDOMDOCUMENTTYPE_IID; + + nsresult GetName(nsAString * aName); + nsresult GetEntities(nsIDOMNamedNodeMap *aEntities); + nsresult GetNotations(nsIDOMNamedNodeMap *aNotations); + nsresult GetPublicId(nsAString * aPublicId); + nsresult GetSystemId(nsAString * aSystemId); + nsresult GetInternalSubset(nsAString * aInternalSubset); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMDocumentView.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMDocumentView.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,27 @@ +module dwt.internal.mozilla.nsIDOMDocumentView; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMAbstractView; + +alias PRUint64 DOMTimeStamp; + +const char[] NS_IDOMDOCUMENTVIEW_IID_STR = "1acdb2ba-1dd2-11b2-95bc-9542495d2569"; + +const nsIID NS_IDOMDOCUMENTVIEW_IID= + {0x1acdb2ba, 0x1dd2, 0x11b2, + [ 0x95, 0xbc, 0x95, 0x42, 0x49, 0x5d, 0x25, 0x69 ]}; + +extern(System) + +interface nsIDOMDocumentView : nsISupports { + + static const char[] IID_STR = NS_IDOMDOCUMENTVIEW_IID_STR; + static const nsIID IID = NS_IDOMDOCUMENTVIEW_IID; + + nsresult GetDefaultView(nsIDOMAbstractView *aDefaultView); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMElement.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMElement.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,42 @@ +module dwt.internal.mozilla.nsIDOMElement; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +import dwt.internal.mozilla.nsIDOMNode; +import dwt.internal.mozilla.nsIDOMNodeList; +import dwt.internal.mozilla.nsIDOMAttr; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IDOMELEMENT_IID_STR = "a6cf9078-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMELEMENT_IID= + {0xa6cf9078, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMElement : nsIDOMNode { + + static const char[] IID_STR = NS_IDOMELEMENT_IID_STR; + static const nsIID IID = NS_IDOMELEMENT_IID; + + nsresult GetTagName(nsAString * aTagName); + nsresult GetAttribute(nsAString * name, nsAString * _retval); + nsresult SetAttribute(nsAString * name, nsAString * value); + nsresult RemoveAttribute(nsAString * name); + nsresult GetAttributeNode(nsAString * name, nsIDOMAttr *_retval); + nsresult SetAttributeNode(nsIDOMAttr newAttr, nsIDOMAttr *_retval); + nsresult RemoveAttributeNode(nsIDOMAttr oldAttr, nsIDOMAttr *_retval); + nsresult GetElementsByTagName(nsAString * name, nsIDOMNodeList *_retval); + nsresult GetAttributeNS(nsAString * namespaceURI, nsAString * localName, nsAString * _retval); + nsresult SetAttributeNS(nsAString * namespaceURI, nsAString * qualifiedName, nsAString * value); + nsresult RemoveAttributeNS(nsAString * namespaceURI, nsAString * localName); + nsresult GetAttributeNodeNS(nsAString * namespaceURI, nsAString * localName, nsIDOMAttr *_retval); + nsresult SetAttributeNodeNS(nsIDOMAttr newAttr, nsIDOMAttr *_retval); + nsresult GetElementsByTagNameNS(nsAString * namespaceURI, nsAString * localName, nsIDOMNodeList *_retval); + nsresult HasAttribute(nsAString * name, PRBool *_retval); + nsresult HasAttributeNS(nsAString * namespaceURI, nsAString * localName, PRBool *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMEntityReference.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMEntityReference.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,22 @@ +module dwt.internal.mozilla.nsIDOMEntityReference; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +import dwt.internal.mozilla.nsIDOMNode; + +const char[] NS_IDOMENTITYREFERENCE_IID_STR = "a6cf907a-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMENTITYREFERENCE_IID= + {0xa6cf907a, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMEntityReference : nsIDOMNode { + + static const char[] IID_STR = NS_IDOMENTITYREFERENCE_IID_STR; + static const nsIID IID = NS_IDOMENTITYREFERENCE_IID; + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMEvent.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMEvent.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,40 @@ +module dwt.internal.mozilla.nsIDOMEvent; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIDOMEventTarget; +import dwt.internal.mozilla.nsStringAPI; + +alias PRUint64 DOMTimeStamp; + +const char[] NS_IDOMEVENT_IID_STR = "a66b7b80-ff46-bd97-0080-5f8ae38add32"; + +const nsIID NS_IDOMEVENT_IID= + {0xa66b7b80, 0xff46, 0xbd97, + [ 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMEvent : nsISupports { + + static const char[] IID_STR = NS_IDOMEVENT_IID_STR; + static const nsIID IID = NS_IDOMEVENT_IID; + + enum { CAPTURING_PHASE = 1U }; + enum { AT_TARGET = 2U }; + enum { BUBBLING_PHASE = 3U }; + + nsresult GetType(nsAString * aType); + nsresult GetTarget(nsIDOMEventTarget *aTarget); + nsresult GetCurrentTarget(nsIDOMEventTarget *aCurrentTarget); + nsresult GetEventPhase(PRUint16 *aEventPhase); + nsresult GetBubbles(PRBool *aBubbles); + nsresult GetCancelable(PRBool *aCancelable); + nsresult GetTimeStamp(DOMTimeStamp *aTimeStamp); + nsresult StopPropagation(); + nsresult PreventDefault(); + nsresult InitEvent(nsAString * eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMEventGroup.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMEventGroup.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,25 @@ +module dwt.internal.mozilla.nsIDOMEventGroup; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +alias PRUint64 DOMTimeStamp; + +const char[] NS_IDOMEVENTGROUP_IID_STR = "33347bee-6620-4841-8152-36091ae80c7e"; + +const nsIID NS_IDOMEVENTGROUP_IID= + {0x33347bee, 0x6620, 0x4841, + [ 0x81, 0x52, 0x36, 0x09, 0x1a, 0xe8, 0x0c, 0x7e ]}; + +extern(System) + +interface nsIDOMEventGroup : nsISupports { + + static const char[] IID_STR = NS_IDOMEVENTGROUP_IID_STR; + static const nsIID IID = NS_IDOMEVENTGROUP_IID; + + nsresult IsSameEventGroup(nsIDOMEventGroup other, PRBool *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMEventListener.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMEventListener.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,24 @@ +module dwt.internal.mozilla.nsIDOMEventListener; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIDOMEvent; + +alias PRUint64 DOMTimeStamp; + +const char[] NS_IDOMEVENTLISTENER_IID_STR = "df31c120-ded6-11d1-bd85-00805f8ae3f4"; +const nsIID NS_IDOMEVENTLISTENER_IID= + {0xdf31c120, 0xded6, 0x11d1, + [ 0xbd, 0x85, 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0xf4 ]}; + +extern(System) + +interface nsIDOMEventListener : nsISupports { + + static const char[] IID_STR = NS_IDOMEVENTLISTENER_IID_STR; + static const nsIID IID = NS_IDOMEVENTLISTENER_IID; + + nsresult HandleEvent(nsIDOMEvent event); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMEventTarget.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMEventTarget.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,30 @@ +module dwt.internal.mozilla.nsIDOMEventTarget; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIDOMEvent; +import dwt.internal.mozilla.nsIDOMEventListener; +import dwt.internal.mozilla.nsStringAPI; + +alias PRUint64 DOMTimeStamp; + +const char[] NS_IDOMEVENTTARGET_IID_STR = "1c773b30-d1cf-11d2-bd95-00805f8ae3f4"; + +const nsIID NS_IDOMEVENTTARGET_IID= + {0x1c773b30, 0xd1cf, 0x11d2, + [ 0xbd, 0x95, 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0xf4 ]}; + +extern(System) + +interface nsIDOMEventTarget : nsISupports { + + static const char[] IID_STR = NS_IDOMEVENTTARGET_IID_STR; + static const nsIID IID = NS_IDOMEVENTTARGET_IID; + + nsresult AddEventListener(nsAString * type, nsIDOMEventListener listener, PRBool useCapture); + nsresult RemoveEventListener(nsAString * type, nsIDOMEventListener listener, PRBool useCapture); + nsresult DispatchEvent(nsIDOMEvent evt, PRBool *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMKeyEvent.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMKeyEvent.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,149 @@ +module dwt.internal.mozilla.nsIDOMKeyEvent; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +import dwt.internal.mozilla.nsIDOMUIEvent; +import dwt.internal.mozilla.nsIDOMAbstractView; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IDOMKEYEVENT_IID_STR = "028e0e6e-8b01-11d3-aae7-0010838a3123"; + +const nsIID NS_IDOMKEYEVENT_IID= + {0x028e0e6e, 0x8b01, 0x11d3, + [ 0xaa, 0xe7, 0x00, 0x10, 0x83, 0x8a, 0x31, 0x23 ]}; + +extern(System) + +interface nsIDOMKeyEvent : nsIDOMUIEvent { + + static const char[] IID_STR = NS_IDOMKEYEVENT_IID_STR; + static const nsIID IID = NS_IDOMKEYEVENT_IID; + + enum { DOM_VK_CANCEL = 3U }; + enum { DOM_VK_HELP = 6U }; + enum { DOM_VK_BACK_SPACE = 8U }; + enum { DOM_VK_TAB = 9U }; + enum { DOM_VK_CLEAR = 12U }; + enum { DOM_VK_RETURN = 13U }; + enum { DOM_VK_ENTER = 14U }; + enum { DOM_VK_SHIFT = 16U }; + enum { DOM_VK_CONTROL = 17U }; + enum { DOM_VK_ALT = 18U }; + enum { DOM_VK_PAUSE = 19U }; + enum { DOM_VK_CAPS_LOCK = 20U }; + enum { DOM_VK_ESCAPE = 27U }; + enum { DOM_VK_SPACE = 32U }; + enum { DOM_VK_PAGE_UP = 33U }; + enum { DOM_VK_PAGE_DOWN = 34U }; + enum { DOM_VK_END = 35U }; + enum { DOM_VK_HOME = 36U }; + enum { DOM_VK_LEFT = 37U }; + enum { DOM_VK_UP = 38U }; + enum { DOM_VK_RIGHT = 39U }; + enum { DOM_VK_DOWN = 40U }; + enum { DOM_VK_PRINTSCREEN = 44U }; + enum { DOM_VK_INSERT = 45U }; + enum { DOM_VK_DELETE = 46U }; + enum { DOM_VK_0 = 48U }; + enum { DOM_VK_1 = 49U }; + enum { DOM_VK_2 = 50U }; + enum { DOM_VK_3 = 51U }; + enum { DOM_VK_4 = 52U }; + enum { DOM_VK_5 = 53U }; + enum { DOM_VK_6 = 54U }; + enum { DOM_VK_7 = 55U }; + enum { DOM_VK_8 = 56U }; + enum { DOM_VK_9 = 57U }; + enum { DOM_VK_SEMICOLON = 59U }; + enum { DOM_VK_EQUALS = 61U }; + enum { DOM_VK_A = 65U }; + enum { DOM_VK_B = 66U }; + enum { DOM_VK_C = 67U }; + enum { DOM_VK_D = 68U }; + enum { DOM_VK_E = 69U }; + enum { DOM_VK_F = 70U }; + enum { DOM_VK_G = 71U }; + enum { DOM_VK_H = 72U }; + enum { DOM_VK_I = 73U }; + enum { DOM_VK_J = 74U }; + enum { DOM_VK_K = 75U }; + enum { DOM_VK_L = 76U }; + enum { DOM_VK_M = 77U }; + enum { DOM_VK_N = 78U }; + enum { DOM_VK_O = 79U }; + enum { DOM_VK_P = 80U }; + enum { DOM_VK_Q = 81U }; + enum { DOM_VK_R = 82U }; + enum { DOM_VK_S = 83U }; + enum { DOM_VK_T = 84U }; + enum { DOM_VK_U = 85U }; + enum { DOM_VK_V = 86U }; + enum { DOM_VK_W = 87U }; + enum { DOM_VK_X = 88U }; + enum { DOM_VK_Y = 89U }; + enum { DOM_VK_Z = 90U }; + enum { DOM_VK_CONTEXT_MENU = 93U }; + enum { DOM_VK_NUMPAD0 = 96U }; + enum { DOM_VK_NUMPAD1 = 97U }; + enum { DOM_VK_NUMPAD2 = 98U }; + enum { DOM_VK_NUMPAD3 = 99U }; + enum { DOM_VK_NUMPAD4 = 100U }; + enum { DOM_VK_NUMPAD5 = 101U }; + enum { DOM_VK_NUMPAD6 = 102U }; + enum { DOM_VK_NUMPAD7 = 103U }; + enum { DOM_VK_NUMPAD8 = 104U }; + enum { DOM_VK_NUMPAD9 = 105U }; + enum { DOM_VK_MULTIPLY = 106U }; + enum { DOM_VK_ADD = 107U }; + enum { DOM_VK_SEPARATOR = 108U }; + enum { DOM_VK_SUBTRACT = 109U }; + enum { DOM_VK_DECIMAL = 110U }; + enum { DOM_VK_DIVIDE = 111U }; + enum { DOM_VK_F1 = 112U }; + enum { DOM_VK_F2 = 113U }; + enum { DOM_VK_F3 = 114U }; + enum { DOM_VK_F4 = 115U }; + enum { DOM_VK_F5 = 116U }; + enum { DOM_VK_F6 = 117U }; + enum { DOM_VK_F7 = 118U }; + enum { DOM_VK_F8 = 119U }; + enum { DOM_VK_F9 = 120U }; + enum { DOM_VK_F10 = 121U }; + enum { DOM_VK_F11 = 122U }; + enum { DOM_VK_F12 = 123U }; + enum { DOM_VK_F13 = 124U }; + enum { DOM_VK_F14 = 125U }; + enum { DOM_VK_F15 = 126U }; + enum { DOM_VK_F16 = 127U }; + enum { DOM_VK_F17 = 128U }; + enum { DOM_VK_F18 = 129U }; + enum { DOM_VK_F19 = 130U }; + enum { DOM_VK_F20 = 131U }; + enum { DOM_VK_F21 = 132U }; + enum { DOM_VK_F22 = 133U }; + enum { DOM_VK_F23 = 134U }; + enum { DOM_VK_F24 = 135U }; + enum { DOM_VK_NUM_LOCK = 144U }; + enum { DOM_VK_SCROLL_LOCK = 145U }; + enum { DOM_VK_COMMA = 188U }; + enum { DOM_VK_PERIOD = 190U }; + enum { DOM_VK_SLASH = 191U }; + enum { DOM_VK_BACK_QUOTE = 192U }; + enum { DOM_VK_OPEN_BRACKET = 219U }; + enum { DOM_VK_BACK_SLASH = 220U }; + enum { DOM_VK_CLOSE_BRACKET = 221U }; + enum { DOM_VK_QUOTE = 222U }; + enum { DOM_VK_META = 224U }; + + nsresult GetCharCode(PRUint32 *aCharCode); + nsresult GetKeyCode(PRUint32 *aKeyCode); + nsresult GetAltKey(PRBool *aAltKey); + nsresult GetCtrlKey(PRBool *aCtrlKey); + nsresult GetShiftKey(PRBool *aShiftKey); + nsresult GetMetaKey(PRBool *aMetaKey); + + nsresult InitKeyEvent(nsAString * typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView viewArg, PRBool ctrlKeyArg, PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint32 keyCodeArg, PRUint32 charCodeArg); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMMouseEvent.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMMouseEvent.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,37 @@ +module dwt.internal.mozilla.nsIDOMMouseEvent; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +import dwt.internal.mozilla.nsIDOMUIEvent; +import dwt.internal.mozilla.nsIDOMEventTarget; +import dwt.internal.mozilla.nsIDOMAbstractView; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IDOMMOUSEEVENT_IID_STR = "ff751edc-8b02-aae7-0010-8301838a3123"; + +const nsIID NS_IDOMMOUSEEVENT_IID= + {0xff751edc, 0x8b02, 0xaae7, + [ 0x00, 0x10, 0x83, 0x01, 0x83, 0x8a, 0x31, 0x23 ]}; + +extern(System) + +interface nsIDOMMouseEvent : nsIDOMUIEvent { + + static const char[] IID_STR = NS_IDOMMOUSEEVENT_IID_STR; + static const nsIID IID = NS_IDOMMOUSEEVENT_IID; + + nsresult GetScreenX(PRInt32 *aScreenX); + nsresult GetScreenY(PRInt32 *aScreenY); + nsresult GetClientX(PRInt32 *aClientX); + nsresult GetClientY(PRInt32 *aClientY); + nsresult GetCtrlKey(PRBool *aCtrlKey); + nsresult GetShiftKey(PRBool *aShiftKey); + nsresult GetAltKey(PRBool *aAltKey); + nsresult GetMetaKey(PRBool *aMetaKey); + nsresult GetButton(PRUint16 *aButton); + nsresult GetRelatedTarget(nsIDOMEventTarget *aRelatedTarget); + + nsresult InitMouseEvent(nsAString * typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView viewArg, PRInt32 detailArg, PRInt32 screenXArg, PRInt32 screenYArg, PRInt32 clientXArg, PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint16 buttonArg, nsIDOMEventTarget relatedTargetArg); + +} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMNamedNodeMap.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMNamedNodeMap.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,35 @@ +module dwt.internal.mozilla.nsIDOMNamedNodeMap; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMNode; +import dwt.internal.mozilla.nsStringAPI; + +alias PRUint64 DOMTimeStamp; + +const char[] NS_IDOMNAMEDNODEMAP_IID_STR = "a6cf907b-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMNAMEDNODEMAP_IID= + {0xa6cf907b, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMNamedNodeMap : nsISupports { + + static const char[] IID_STR = NS_IDOMNAMEDNODEMAP_IID_STR; + static const nsIID IID = NS_IDOMNAMEDNODEMAP_IID; + + nsresult GetNamedItem(nsAString * name, nsIDOMNode *_retval); + nsresult SetNamedItem(nsIDOMNode arg, nsIDOMNode *_retval); + nsresult RemoveNamedItem(nsAString * name, nsIDOMNode *_retval); + nsresult Item(PRUint32 index, nsIDOMNode *_retval); + nsresult GetLength(PRUint32 *aLength); + nsresult GetNamedItemNS(nsAString * namespaceURI, nsAString * localName, nsIDOMNode *_retval); + nsresult SetNamedItemNS(nsIDOMNode arg, nsIDOMNode *_retval); + nsresult RemoveNamedItemNS(nsAString * namespaceURI, nsAString * localName, nsIDOMNode *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMNode.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMNode.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,67 @@ +module dwt.internal.mozilla.nsIDOMNode; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMNodeList; +import dwt.internal.mozilla.nsIDOMNamedNodeMap; +import dwt.internal.mozilla.nsIDOMDocument; +import dwt.internal.mozilla.nsStringAPI; + +alias PRUint64 DOMTimeStamp; + +const char[] NS_IDOMNODE_IID_STR = "a6cf907c-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMNODE_IID= + {0xa6cf907c, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMNode : nsISupports { + + static const char[] IID_STR = NS_IDOMNODE_IID_STR; + static const nsIID IID = NS_IDOMNODE_IID; + + enum { ELEMENT_NODE = 1U }; + enum { ATTRIBUTE_NODE = 2U }; + enum { TEXT_NODE = 3U }; + enum { CDATA_SECTION_NODE = 4U }; + enum { ENTITY_REFERENCE_NODE = 5U }; + enum { ENTITY_NODE = 6U }; + enum { PROCESSING_INSTRUCTION_NODE = 7U }; + enum { COMMENT_NODE = 8U }; + enum { DOCUMENT_NODE = 9U }; + enum { DOCUMENT_TYPE_NODE = 10U }; + enum { DOCUMENT_FRAGMENT_NODE = 11U }; + enum { NOTATION_NODE = 12U }; + + nsresult GetNodeName(nsAString * aNodeName); + nsresult GetNodeValue(nsAString * aNodeValue); + nsresult SetNodeValue(nsAString * aNodeValue); + nsresult GetNodeType(PRUint16 *aNodeType); + nsresult GetParentNode(nsIDOMNode *aParentNode); + nsresult GetChildNodes(nsIDOMNodeList *aChildNodes); + nsresult GetFirstChild(nsIDOMNode *aFirstChild); + nsresult GetLastChild(nsIDOMNode *aLastChild); + nsresult GetPreviousSibling(nsIDOMNode *aPreviousSibling); + nsresult GetNextSibling(nsIDOMNode *aNextSibling); + nsresult GetAttributes(nsIDOMNamedNodeMap *aAttributes); + nsresult GetOwnerDocument(nsIDOMDocument *aOwnerDocument); + nsresult InsertBefore(nsIDOMNode newChild, nsIDOMNode refChild, nsIDOMNode *_retval); + nsresult ReplaceChild(nsIDOMNode newChild, nsIDOMNode oldChild, nsIDOMNode *_retval); + nsresult RemoveChild(nsIDOMNode oldChild, nsIDOMNode *_retval); + nsresult AppendChild(nsIDOMNode newChild, nsIDOMNode *_retval); + nsresult HasChildNodes(PRBool *_retval); + nsresult CloneNode(PRBool deep, nsIDOMNode *_retval); + nsresult Normalize(); + nsresult IsSupported(nsAString * feature, nsAString * version_, PRBool *_retval); + nsresult GetNamespaceURI(nsAString * aNamespaceURI); + nsresult GetPrefix(nsAString * aPrefix); + nsresult SetPrefix(nsAString * aPrefix); + nsresult GetLocalName(nsAString * aLocalName); + nsresult HasAttributes(PRBool *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMNodeList.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMNodeList.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,28 @@ +module dwt.internal.mozilla.nsIDOMNodeList; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMNode; + +alias PRUint64 DOMTimeStamp; + +const char[] NS_IDOMNODELIST_IID_STR = "a6cf907d-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMNODELIST_IID= + {0xa6cf907d, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMNodeList : nsISupports { + + static const char[] IID_STR = NS_IDOMNODELIST_IID_STR; + static const nsIID IID = NS_IDOMNODELIST_IID; + + nsresult Item(PRUint32 index, nsIDOMNode *_retval); + nsresult GetLength(PRUint32 *aLength); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMProcessingInstruction.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMProcessingInstruction.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,26 @@ +module dwt.internal.mozilla.nsIDOMProcessingInstruction; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsIDOMNode; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IDOMPROCESSINGINSTRUCTION_IID_STR = "a6cf907f-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMPROCESSINGINSTRUCTION_IID= + {0xa6cf907f, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMProcessingInstruction : nsIDOMNode { + + static const char[] IID_STR = NS_IDOMPROCESSINGINSTRUCTION_IID_STR; + static const nsIID IID = NS_IDOMPROCESSINGINSTRUCTION_IID; + + nsresult GetTarget(nsAString * aTarget); + nsresult GetData(nsAString * aData); + nsresult SetData(nsAString * aData); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMRange.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMRange.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,56 @@ +module dwt.internal.mozilla.nsIDOMRange; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMNode; +import dwt.internal.mozilla.nsIDOMDocumentFragment; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IDOMRANGE_IID_STR = "a6cf90ce-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMRANGE_IID= + {0xa6cf90ce, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMRange : nsISupports { + + static const char[] IID_STR = NS_IDOMRANGE_IID_STR; + static const nsIID IID = NS_IDOMRANGE_IID; + + nsresult GetStartContainer(nsIDOMNode *aStartContainer); + nsresult GetStartOffset(PRInt32 *aStartOffset); + nsresult GetEndContainer(nsIDOMNode *aEndContainer); + nsresult GetEndOffset(PRInt32 *aEndOffset); + nsresult GetCollapsed(PRBool *aCollapsed); + nsresult GetCommonAncestorContainer(nsIDOMNode *aCommonAncestorContainer); + nsresult SetStart(nsIDOMNode refNode, PRInt32 offset); + nsresult SetEnd(nsIDOMNode refNode, PRInt32 offset); + nsresult SetStartBefore(nsIDOMNode refNode); + nsresult SetStartAfter(nsIDOMNode refNode); + nsresult SetEndBefore(nsIDOMNode refNode); + nsresult SetEndAfter(nsIDOMNode refNode); + nsresult Collapse(PRBool toStart); + nsresult SelectNode(nsIDOMNode refNode); + nsresult SelectNodeContents(nsIDOMNode refNode); + + enum { START_TO_START = 0U }; + enum { START_TO_END = 1U }; + enum { END_TO_END = 2U }; + enum { END_TO_START = 3U }; + + nsresult CompareBoundaryPoints(PRUint16 how, nsIDOMRange sourceRange, PRInt16 *_retval); + nsresult DeleteContents(); + nsresult ExtractContents(nsIDOMDocumentFragment *_retval); + nsresult CloneContents(nsIDOMDocumentFragment *_retval); + nsresult InsertNode(nsIDOMNode newNode); + nsresult SurroundContents(nsIDOMNode newParent); + nsresult CloneRange(nsIDOMRange *_retval); + nsresult ToString(nsAString * _retval); + nsresult Detach(); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMSerializer.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMSerializer.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,27 @@ +module dwt.internal.mozilla.nsIDOMSerializer; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIOutputStream; +import dwt.internal.mozilla.nsIDOMNode; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IDOMSERIALIZER_IID_STR = "9fd4ba15-e67c-4c98-b52c-7715f62c9196"; + +const nsIID NS_IDOMSERIALIZER_IID= + {0x9fd4ba15, 0xe67c, 0x4c98, + [ 0xb5, 0x2c, 0x77, 0x15, 0xf6, 0x2c, 0x91, 0x96 ]}; + +extern(System) + +interface nsIDOMSerializer : nsISupports { + + static const char[] IID_STR = NS_IDOMSERIALIZER_IID_STR; + static const nsIID IID = NS_IDOMSERIALIZER_IID; + + nsresult SerializeToString(nsIDOMNode root, nsAString * _retval); + nsresult SerializeToStream(nsIDOMNode root, nsIOutputStream stream, nsACString * charset); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMStorage.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMStorage.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,32 @@ +module dwt.internal.mozilla.nsIDOMStorage; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsStringAPI; +import dwt.internal.mozilla.nsIDOMStorageItem; + +alias PRUint64 DOMTimeStamp; + +const char[] NS_IDOMSTORAGE_IID_STR = "95cc1383-3b62-4b89-aaef-1004a513ef47"; + +const nsIID NS_IDOMSTORAGE_IID= + {0x95cc1383, 0x3b62, 0x4b89, + [ 0xaa, 0xef, 0x10, 0x04, 0xa5, 0x13, 0xef, 0x47 ]}; + +extern(System) + +interface nsIDOMStorage : nsISupports { + + static const char[] IID_STR = NS_IDOMSTORAGE_IID_STR; + static const nsIID IID = NS_IDOMSTORAGE_IID; + + nsresult GetLength(PRUint32 *aLength); + nsresult Key(PRUint32 index, nsAString * _retval); + nsresult GetItem(nsAString * key, nsIDOMStorageItem *_retval); + nsresult SetItem(nsAString * key, nsAString * data); + nsresult RemoveItem(nsAString * key); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMStorageItem.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMStorageItem.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,30 @@ +module dwt.internal.mozilla.nsIDOMStorageItem; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsStringAPI; + +alias PRUint64 DOMTimeStamp; + +const char[] NS_IDOMSTORAGEITEM_IID_STR = "0cc37c78-4c5f-48e1-adfc-7480b8fe9dc4"; + +const nsIID NS_IDOMSTORAGEITEM_IID= + {0x0cc37c78, 0x4c5f, 0x48e1, + [ 0xad, 0xfc, 0x74, 0x80, 0xb8, 0xfe, 0x9d, 0xc4 ]}; + +extern(System) + +interface nsIDOMStorageItem : nsISupports { + + static const char[] IID_STR = NS_IDOMSTORAGEITEM_IID_STR; + static const nsIID IID = NS_IDOMSTORAGEITEM_IID; + + nsresult GetSecure(PRBool *aSecure); + nsresult SetSecure(PRBool aSecure); + nsresult GetValue(nsAString * aValue); + nsresult SetValue(nsAString * aValue); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMText.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMText.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,24 @@ +module dwt.internal.mozilla.nsIDOMText; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +import dwt.internal.mozilla.nsIDOMCharacterData; + +const char[] NS_IDOMTEXT_IID_STR = "a6cf9082-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMTEXT_IID= + {0xa6cf9082, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMText : nsIDOMCharacterData { + + static const char[] IID_STR = NS_IDOMTEXT_IID_STR; + static const nsIID IID = NS_IDOMTEXT_IID; + + nsresult SplitText(PRUint32 offset, nsIDOMText *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMUIEvent.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMUIEvent.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,28 @@ +module dwt.internal.mozilla.nsIDOMUIEvent; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +import dwt.internal.mozilla.nsIDOMEvent; +import dwt.internal.mozilla.nsStringAPI; +import dwt.internal.mozilla.nsIDOMAbstractView; + +const char[] NS_IDOMUIEVENT_IID_STR = "a6cf90c3-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMUIEVENT_IID= + {0xa6cf90c3, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMUIEvent : nsIDOMEvent { + + static const char[] IID_STR = NS_IDOMUIEVENT_IID_STR; + static const nsIID IID = NS_IDOMUIEVENT_IID; + + nsresult GetView(nsIDOMAbstractView *aView); + nsresult GetDetail(PRInt32 *aDetail); + nsresult InitUIEvent(nsAString * typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView viewArg, PRInt32 detailArg); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMWindow.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMWindow.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,47 @@ +module dwt.internal.mozilla.nsIDOMWindow; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMWindowCollection; +import dwt.internal.mozilla.nsIDOMDocument; +import dwt.internal.mozilla.nsIDOMBarProp; +import dwt.internal.mozilla.nsISelection; +import dwt.internal.mozilla.nsStringAPI; + +alias PRUint64 DOMTimeStamp; + +const char[] NS_IDOMWINDOW_IID_STR = "a6cf906b-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMWINDOW_IID= + {0xa6cf906b, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMWindow : nsISupports { + + static const char[] IID_STR = NS_IDOMWINDOW_IID_STR; + static const nsIID IID = NS_IDOMWINDOW_IID; + + nsresult GetDocument(nsIDOMDocument *aDocument); + nsresult GetParent(nsIDOMWindow *aParent); + nsresult GetTop(nsIDOMWindow *aTop); + nsresult GetScrollbars(nsIDOMBarProp *aScrollbars); + nsresult GetFrames(nsIDOMWindowCollection *aFrames); + nsresult GetName(nsAString * aName); + nsresult SetName(nsAString * aName); + nsresult GetTextZoom(float *aTextZoom); + nsresult SetTextZoom(float aTextZoom); + nsresult GetScrollX(PRInt32 *aScrollX); + nsresult GetScrollY(PRInt32 *aScrollY); + nsresult ScrollTo(PRInt32 xScroll, PRInt32 yScroll); + nsresult ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif); + nsresult GetSelection(nsISelection *_retval); + nsresult ScrollByLines(PRInt32 numLines); + nsresult ScrollByPages(PRInt32 numPages); + nsresult SizeToContent(); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMWindow2.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMWindow2.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,24 @@ +module dwt.internal.mozilla.nsIDOMWindow2; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsIDOMWindow; +import dwt.internal.mozilla.nsIDOMEventTarget; + +const char[] NS_IDOMWINDOW2_IID_STR = "65455132-b96a-40ec-adea-52fa22b1028c"; + +const nsIID NS_IDOMWINDOW2_IID= + {0x65455132, 0xb96a, 0x40ec, + [ 0xad, 0xea, 0x52, 0xfa, 0x22, 0xb1, 0x02, 0x8c ]}; + +extern(System) + +interface nsIDOMWindow2 : nsIDOMWindow { + + static const char[] IID_STR = NS_IDOMWINDOW2_IID_STR; + static const nsIID IID = NS_IDOMWINDOW2_IID; + + nsresult GetWindowRoot(nsIDOMEventTarget *aWindowRoot); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDOMWindowCollection.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDOMWindowCollection.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,29 @@ +module dwt.internal.mozilla.nsIDOMWindowCollection; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIDOMWindow; +import dwt.internal.mozilla.nsStringAPI; + +alias PRUint64 DOMTimeStamp; + +const char[] NS_IDOMWINDOWCOLLECTION_IID_STR = "a6cf906f-15b3-11d2-932e-00805f8add32"; + +const nsIID NS_IDOMWINDOWCOLLECTION_IID= + {0xa6cf906f, 0x15b3, 0x11d2, + [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; + +extern(System) + +interface nsIDOMWindowCollection : nsISupports { + + static const char[] IID_STR = NS_IDOMWINDOWCOLLECTION_IID_STR; + static const nsIID IID = NS_IDOMWINDOWCOLLECTION_IID; + + nsresult GetLength(PRUint32 *aLength); + nsresult Item(PRUint32 index, nsIDOMWindow *_retval); + nsresult NamedItem(nsAString * name, nsIDOMWindow *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDebug.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDebug.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,23 @@ +module dwt.internal.mozilla.nsIDebug; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_IDEBUG_IID_STR = "3bf0c3d7-3bd9-4cf2-a971-33572c503e1e"; + +const nsIID NS_IDEBUG_IID= + {0x3bf0c3d7, 0x3bd9, 0x4cf2, + [ 0xa9, 0x71, 0x33, 0x57, 0x2c, 0x50, 0x3e, 0x1e ]}; + +extern(System) +interface nsIDebug : nsISupports { + static const char[] IID_STR = NS_IDEBUG_IID_STR; + static const nsIID IID = NS_IDEBUG_IID; + + nsresult Assertion(char *aStr, char *aExpr, char *aFile, PRInt32 aLine); + nsresult Warning(char *aStr, char *aFile, PRInt32 aLine); + nsresult Break(char *aFile, PRInt32 aLine); + nsresult Abort(char *aFile, PRInt32 aLine); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDirectoryService.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDirectoryService.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,72 @@ +module dwt.internal.mozilla.nsIDirectoryService; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISimpleEnumerator; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIFile; + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IDIRECTORYSERVICEPROVIDER_IID_STR = "bbf8cab0-d43a-11d3-8cc2-00609792278c"; + +const nsIID NS_IDIRECTORYSERVICEPROVIDER_IID= + {0xbbf8cab0, 0xd43a, 0x11d3, + [ 0x8c, 0xc2, 0x00, 0x60, 0x97, 0x92, 0x27, 0x8c ]}; + +extern(System) + +interface nsIDirectoryServiceProvider : nsISupports { + + static const char[] IID_STR = NS_IDIRECTORYSERVICEPROVIDER_IID_STR; + static const nsIID IID = NS_IDIRECTORYSERVICEPROVIDER_IID; + + nsresult GetFile(char *prop, PRBool *persistent, nsIFile *_retval); + +} + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IDIRECTORYSERVICEPROVIDER2_IID_STR = "2f977d4b-5485-11d4-87e2-0010a4e75ef2"; + +const nsIID NS_IDIRECTORYSERVICEPROVIDER2_IID= + {0x2f977d4b, 0x5485, 0x11d4, + [ 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 ]}; + +extern(System) + +interface nsIDirectoryServiceProvider2 : nsIDirectoryServiceProvider { + + static const char[] IID_STR = NS_IDIRECTORYSERVICEPROVIDER2_IID_STR; + static const nsIID IID = NS_IDIRECTORYSERVICEPROVIDER2_IID; + + nsresult GetFiles(char *prop, nsISimpleEnumerator *_retval); + +} + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IDIRECTORYSERVICE_IID_STR = "57a66a60-d43a-11d3-8cc2-00609792278c"; + +const nsIID NS_IDIRECTORYSERVICE_IID= + {0x57a66a60, 0xd43a, 0x11d3, + [ 0x8c, 0xc2, 0x00, 0x60, 0x97, 0x92, 0x27, 0x8c ]}; + +extern(System) + +interface nsIDirectoryService : nsISupports { + + static const char[] IID_STR = NS_IDIRECTORYSERVICE_IID_STR; + static const nsIID IID = NS_IDIRECTORYSERVICE_IID; + + nsresult Init(); + nsresult RegisterProvider(nsIDirectoryServiceProvider prov); + nsresult UnregisterProvider(nsIDirectoryServiceProvider prov); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDocShell.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDocShell.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,173 @@ +// FIXME; IID's are not consistant with SWT version + +module dwt.internal.mozilla.nsIDocShell; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIURI; +import dwt.internal.mozilla.nsIChannel; +import dwt.internal.mozilla.nsIContentViewer; +import dwt.internal.mozilla.nsIURIContentListener; +import dwt.internal.mozilla.nsIChromeEventHandler; +import dwt.internal.mozilla.nsIDocShellLoadInfo; +import dwt.internal.mozilla.nsIDocumentCharsetInfo; +import dwt.internal.mozilla.nsIWebNavigation; +import dwt.internal.mozilla.nsISimpleEnumerator; +import dwt.internal.mozilla.nsIInputStream; +import dwt.internal.mozilla.nsIRequest; +import dwt.internal.mozilla.nsISHEntry; +import dwt.internal.mozilla.nsISecureBrowserUI; +import dwt.internal.mozilla.nsIDOMStorage; +import dwt.internal.mozilla.nsStringAPI; + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IDOCSHELL_IID_STR = "9f0c7461-b9a4-47f6-b88c-421dce1bce66"; + +const nsIID NS_IDOCSHELL_IID= + {0x9f0c7461, 0xb9a4, 0x47f6, + [ 0xb8, 0x8c, 0x42, 0x1d, 0xce, 0x1b, 0xce, 0x66 ]}; + +extern(System) + +interface nsIDocShell : nsISupports { + + static const char[] IID_STR = NS_IDOCSHELL_IID_STR; + static const nsIID IID = NS_IDOCSHELL_IID; + + nsresult LoadURI(nsIURI uri, nsIDocShellLoadInfo loadInfo, PRUint32 aLoadFlags, PRBool firstParty); + nsresult LoadStream(nsIInputStream aStream, nsIURI aURI, nsACString * aContentType, nsACString * aContentCharset, nsIDocShellLoadInfo aLoadInfo); + + enum { INTERNAL_LOAD_FLAGS_NONE = 0 }; + enum { INTERNAL_LOAD_FLAGS_INHERIT_OWNER = 1 }; + enum { INTERNAL_LOAD_FLAGS_DONT_SEND_REFERRER = 2 }; + enum { INTERNAL_LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 4 }; + enum { INTERNAL_LOAD_FLAGS_FIRST_LOAD = 8 }; + + nsresult InternalLoad(nsIURI aURI, nsIURI aReferrer, nsISupports aOwner, PRUint32 aFlags, PRUnichar *aWindowTarget, char *aTypeHint, nsIInputStream aPostDataStream, nsIInputStream aHeadersStream, PRUint32 aLoadFlags, nsISHEntry aSHEntry, PRBool firstParty, nsIDocShell *aDocShell, nsIRequest *aRequest); + + nsresult CreateLoadInfo(nsIDocShellLoadInfo *loadInfo); + nsresult PrepareForNewContentModel(); + nsresult SetCurrentURI(nsIURI aURI); + nsresult FirePageHideNotification(PRBool isUnload); + nsresult GetPresContext(nsPresContext * *aPresContext); + nsresult GetPresShell(nsIPresShell * *aPresShell); + nsresult GetEldestPresShell(nsIPresShell * *aEldestPresShell); + nsresult GetContentViewer(nsIContentViewer *aContentViewer); + nsresult GetChromeEventHandler(nsIChromeEventHandler *aChromeEventHandler); + nsresult SetChromeEventHandler(nsIChromeEventHandler aChromeEventHandler); + nsresult GetDocumentCharsetInfo(nsIDocumentCharsetInfo *aDocumentCharsetInfo); + nsresult SetDocumentCharsetInfo(nsIDocumentCharsetInfo aDocumentCharsetInfo); + nsresult GetAllowPlugins(PRBool *aAllowPlugins); + nsresult SetAllowPlugins(PRBool aAllowPlugins); + nsresult GetAllowJavascript(PRBool *aAllowJavascript); + nsresult SetAllowJavascript(PRBool aAllowJavascript); + nsresult GetAllowMetaRedirects(PRBool *aAllowMetaRedirects); + nsresult SetAllowMetaRedirects(PRBool aAllowMetaRedirects); + nsresult GetAllowSubframes(PRBool *aAllowSubframes); + nsresult SetAllowSubframes(PRBool aAllowSubframes); + nsresult GetAllowImages(PRBool *aAllowImages); + nsresult SetAllowImages(PRBool aAllowImages); + + enum { ENUMERATE_FORWARDS = 0 }; + enum { ENUMERATE_BACKWARDS = 1 }; + + nsresult GetDocShellEnumerator(PRInt32 aItemType, PRInt32 aDirection, nsISimpleEnumerator *_retval); + + enum { APP_TYPE_UNKNOWN = 0U }; + enum { APP_TYPE_MAIL = 1U }; + enum { APP_TYPE_EDITOR = 2U }; + + nsresult GetAppType(PRUint32 *aAppType); + nsresult SetAppType(PRUint32 aAppType); + nsresult GetAllowAuth(PRBool *aAllowAuth); + nsresult SetAllowAuth(PRBool aAllowAuth); + nsresult GetZoom(float *aZoom); + nsresult SetZoom(float aZoom); + nsresult GetMarginWidth(PRInt32 *aMarginWidth); + nsresult SetMarginWidth(PRInt32 aMarginWidth); + nsresult GetMarginHeight(PRInt32 *aMarginHeight); + nsresult SetMarginHeight(PRInt32 aMarginHeight); + nsresult GetHasFocus(PRBool *aHasFocus); + nsresult SetHasFocus(PRBool aHasFocus); + nsresult GetCanvasHasFocus(PRBool *aCanvasHasFocus); + nsresult SetCanvasHasFocus(PRBool aCanvasHasFocus); + nsresult TabToTreeOwner(PRBool forward, PRBool *tookFocus); + + enum { BUSY_FLAGS_NONE = 0U }; + enum { BUSY_FLAGS_BUSY = 1U }; + enum { BUSY_FLAGS_BEFORE_PAGE_LOAD = 2U }; + enum { BUSY_FLAGS_PAGE_LOADING = 4U }; + enum { LOAD_CMD_NORMAL = 1U }; + enum { LOAD_CMD_RELOAD = 2U }; + enum { LOAD_CMD_HISTORY = 4U }; + + nsresult GetBusyFlags(PRUint32 *aBusyFlags); + nsresult GetLoadType(PRUint32 *aLoadType); + nsresult SetLoadType(PRUint32 aLoadType); + nsresult IsBeingDestroyed(PRBool *_retval); + nsresult GetIsExecutingOnLoadHandler(PRBool *aIsExecutingOnLoadHandler); + nsresult GetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState); + nsresult SetLayoutHistoryState(nsILayoutHistoryState aLayoutHistoryState); + nsresult GetShouldSaveLayoutState(PRBool *aShouldSaveLayoutState); + nsresult GetSecurityUI(nsISecureBrowserUI *aSecurityUI); + nsresult SetSecurityUI(nsISecureBrowserUI aSecurityUI); + nsresult SuspendRefreshURIs(); + nsresult ResumeRefreshURIs(); + nsresult BeginRestore(nsIContentViewer viewer, PRBool top); + nsresult FinishRestore(); + nsresult GetRestoringDocument(PRBool *aRestoringDocument); + nsresult GetUseErrorPages(PRBool *aUseErrorPages); + nsresult SetUseErrorPages(PRBool aUseErrorPages); + nsresult GetPreviousTransIndex(PRInt32 *aPreviousTransIndex); + nsresult GetLoadedTransIndex(PRInt32 *aLoadedTransIndex); + nsresult HistoryPurged(PRInt32 numEntries); +} + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IDOCSHELL_MOZILLA_1_8_BRANCH_IID_STR = "45988a14-b240-4d07-ae64-50ecca26e6d8"; + +const nsIID NS_IDOCSHELL_MOZILLA_1_8_BRANCH_IID= + {0x45988a14, 0xb240, 0x4d07, + [ 0xae, 0x64, 0x50, 0xec, 0xca, 0x26, 0xe6, 0xd8 ]}; + +extern(System) + +interface nsIDocShell_MOZILLA_1_8_BRANCH : nsISupports { + + static const char[] IID_STR = NS_IDOCSHELL_MOZILLA_1_8_BRANCH_IID_STR; + static const nsIID IID = NS_IDOCSHELL_MOZILLA_1_8_BRANCH_IID; + + nsresult GetSessionStorageForURI(nsIURI uri, nsIDOMStorage *_retval); + nsresult AddSessionStorage(nsACString * aDomain, nsIDOMStorage storage); + nsresult GetCurrentDocumentChannel(nsIChannel *aCurrentDocumentChannel); +} + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IDOCSHELL_MOZILLA_1_9_BRANCH_IID_STR = "45988a14-b240-4d07-ae64-50ecca26e6d8"; + +const nsIID NS_IDOCSHELL_MOZILLA_1_9_BRANCH_IID = + {0x45988a14, 0xb240, 0x4d07, + [ 0xae, 0x64, 0x50, 0xec, 0xca, 0x26, 0xe6, 0xd8 ]}; + +extern(System) + +interface nsIDocShell_MOZILLA_1_9_BRANCH : nsISupports { + + static const char[] IID_STR = NS_IDOCSHELL_MOZILLA_1_9_BRANCH_IID_STR; + static const nsIID IID = NS_IDOCSHELL_MOZILLA_1_9_BRANCH_IID; + + nsresult GetSessionStorageForURI(nsIURI uri, nsIDOMStorage *_retval); + nsresult AddSessionStorage(nsACString * aDomain, nsIDOMStorage storage); + nsresult GetCurrentDocumentChannel(nsIChannel *aCurrentDocumentChannel); +} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDocShellLoadInfo.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDocShellLoadInfo.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,62 @@ +module dwt.internal.mozilla.nsIDocShellLoadInfo; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIURI; +import dwt.internal.mozilla.nsIInputStream; +import dwt.internal.mozilla.nsISHEntry; + +alias PRInt32 nsDocShellInfoLoadType; + +const char[] NS_IDOCSHELLLOADINFO_IID_STR = "4f813a88-7aca-4607-9896-d97270cdf15e"; + +const nsIID NS_IDOCSHELLLOADINFO_IID= + {0x4f813a88, 0x7aca, 0x4607, + [ 0x98, 0x96, 0xd9, 0x72, 0x70, 0xcd, 0xf1, 0x5e ]}; + +extern(System) + +interface nsIDocShellLoadInfo : nsISupports { + + static const char[] IID_STR = NS_IDOCSHELLLOADINFO_IID_STR; + static const nsIID IID = NS_IDOCSHELLLOADINFO_IID; + + nsresult GetReferrer(nsIURI *aReferrer); + nsresult SetReferrer(nsIURI aReferrer); + nsresult GetOwner(nsISupports *aOwner); + nsresult SetOwner(nsISupports aOwner); + nsresult GetInheritOwner(PRBool *aInheritOwner); + nsresult SetInheritOwner(PRBool aInheritOwner); + + enum { loadNormal = 0 }; + enum { loadNormalReplace = 1 }; + enum { loadHistory = 2 }; + enum { loadReloadNormal = 3 }; + enum { loadReloadBypassCache = 4 }; + enum { loadReloadBypassProxy = 5 }; + enum { loadReloadBypassProxyAndCache = 6 }; + enum { loadLink = 7 }; + enum { loadRefresh = 8 }; + enum { loadReloadCharsetChange = 9 }; + enum { loadBypassHistory = 10 }; + enum { loadStopContent = 11 }; + enum { loadStopContentAndReplace = 12 }; + enum { loadNormalExternal = 13 }; + + nsresult GetLoadType(nsDocShellInfoLoadType *aLoadType); + nsresult SetLoadType(nsDocShellInfoLoadType aLoadType); + nsresult GetSHEntry(nsISHEntry *aSHEntry); + nsresult SetSHEntry(nsISHEntry aSHEntry); + nsresult GetTarget(PRUnichar * *aTarget); + nsresult SetTarget(PRUnichar * aTarget); + nsresult GetPostDataStream(nsIInputStream *aPostDataStream); + nsresult SetPostDataStream(nsIInputStream aPostDataStream); + nsresult GetHeadersStream(nsIInputStream *aHeadersStream); + nsresult SetHeadersStream(nsIInputStream aHeadersStream); + nsresult GetSendReferrer(PRBool *aSendReferrer); + nsresult SetSendReferrer(PRBool aSendReferrer); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDocShellTreeItem.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDocShellTreeItem.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,45 @@ +module dwt.internal.mozilla.nsIDocShellTreeItem; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDocShellTreeOwner; + +const char[] NS_IDOCSHELLTREEITEM_IID_STR = "7d935d63-6d2a-4600-afb5-9a4f7d68b825"; + +const nsIID NS_IDOCSHELLTREEITEM_IID= + {0x7d935d63, 0x6d2a, 0x4600, + [ 0xaf, 0xb5, 0x9a, 0x4f, 0x7d, 0x68, 0xb8, 0x25 ]}; + +extern(System) + +interface nsIDocShellTreeItem : nsISupports { + + static const char[] IID_STR = NS_IDOCSHELLTREEITEM_IID_STR; + static const nsIID IID = NS_IDOCSHELLTREEITEM_IID; + + nsresult GetName(PRUnichar * *aName); + nsresult SetName(PRUnichar * aName); + nsresult NameEquals(PRUnichar *name, PRBool *_retval); + + enum { typeChrome = 0 }; + enum { typeContent = 1 }; + enum { typeContentWrapper = 2 }; + enum { typeChromeWrapper = 3 }; + enum { typeAll = 2147483647 }; + + nsresult GetItemType(PRInt32 *aItemType); + nsresult SetItemType(PRInt32 aItemType); + nsresult GetParent(nsIDocShellTreeItem *aParent); + nsresult GetSameTypeParent(nsIDocShellTreeItem *aSameTypeParent); + nsresult GetRootTreeItem(nsIDocShellTreeItem *aRootTreeItem); + nsresult GetSameTypeRootTreeItem(nsIDocShellTreeItem *aSameTypeRootTreeItem); + nsresult FindItemWithName(PRUnichar *name, nsISupports aRequestor, nsIDocShellTreeItem aOriginalRequestor, nsIDocShellTreeItem *_retval); + nsresult GetTreeOwner(nsIDocShellTreeOwner *aTreeOwner); + nsresult SetTreeOwner(nsIDocShellTreeOwner treeOwner); + nsresult GetChildOffset(PRInt32 *aChildOffset); + nsresult SetChildOffset(PRInt32 aChildOffset); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDocShellTreeOwner.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDocShellTreeOwner.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,57 @@ +module dwt.internal.mozilla.nsIDocShellTreeOwner; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDocShellTreeItem; +import dwt.internal.mozilla.nsStringAPI; + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IDOCSHELLTREEOWNER_IID_STR = "9e508466-5ebb-4618-abfa-9ad47bed0b2e"; + +const nsIID NS_IDOCSHELLTREEOWNER_IID= + {0x9e508466, 0x5ebb, 0x4618, + [ 0xab, 0xfa, 0x9a, 0xd4, 0x7b, 0xed, 0x0b, 0x2e ]}; + +extern(System) + +interface nsIDocShellTreeOwner : nsISupports { + + static const char[] IID_STR = NS_IDOCSHELLTREEOWNER_IID_STR; + static const nsIID IID = NS_IDOCSHELLTREEOWNER_IID; + + nsresult FindItemWithName(PRUnichar *name, nsIDocShellTreeItem aRequestor, nsIDocShellTreeItem aOriginalRequestor, nsIDocShellTreeItem *_retval); + nsresult ContentShellAdded(nsIDocShellTreeItem aContentShell, PRBool aPrimary, PRUnichar *aID); + nsresult GetPrimaryContentShell(nsIDocShellTreeItem *aPrimaryContentShell); + nsresult SizeShellTo(nsIDocShellTreeItem shell, PRInt32 cx, PRInt32 cy); + nsresult SetPersistence(PRBool aPersistPosition, PRBool aPersistSize, PRBool aPersistSizeMode); + nsresult GetPersistence(PRBool *aPersistPosition, PRBool *aPersistSize, PRBool *aPersistSizeMode); + +} + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IDOCSHELLTREEOWNER_MOZILLA_1_8_BRANCH_IID_STR = "3c2a6927-e923-4ea8-bbda-a335c768ce4e"; + +const nsIID NS_IDOCSHELLTREEOWNER_MOZILLA_1_8_BRANCH_IID= + {0x3c2a6927, 0xe923, 0x4ea8, + [ 0xbb, 0xda, 0xa3, 0x35, 0xc7, 0x68, 0xce, 0x4e ]}; + +extern(System) + +interface nsIDocShellTreeOwner_MOZILLA_1_8_BRANCH : nsIDocShellTreeOwner { + + static const char[] IID_STR = NS_IDOCSHELLTREEOWNER_MOZILLA_1_8_BRANCH_IID_STR; + static const nsIID IID = NS_IDOCSHELLTREEOWNER_MOZILLA_1_8_BRANCH_IID; + + nsresult ContentShellAdded2(nsIDocShellTreeItem aContentShell, PRBool aPrimary, PRBool aTargetable, nsAString * aID); + nsresult ContentShellRemoved(nsIDocShellTreeItem aContentShell); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDocumentCharsetInfo.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDocumentCharsetInfo.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,32 @@ +module dwt.internal.mozilla.nsIDocumentCharsetInfo; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIAtom; + +const char[] NS_IDOCUMENTCHARSETINFO_IID_STR = "2d40b291-01e1-11d4-9d0e-0050040007b2"; + +const nsIID NS_IDOCUMENTCHARSETINFO_IID= + {0x2d40b291, 0x01e1, 0x11d4, + [ 0x9d, 0x0e, 0x00, 0x50, 0x04, 0x00, 0x07, 0xb2 ]}; + +extern(System) + +interface nsIDocumentCharsetInfo : nsISupports { + + static const char[] IID_STR = NS_IDOCUMENTCHARSETINFO_IID_STR; + static const nsIID IID = NS_IDOCUMENTCHARSETINFO_IID; + + nsresult GetForcedCharset(nsIAtom *aForcedCharset); + nsresult SetForcedCharset(nsIAtom aForcedCharset); + nsresult GetForcedDetector(PRBool *aForcedDetector); + nsresult SetForcedDetector(PRBool aForcedDetector); + nsresult GetParentCharset(nsIAtom *aParentCharset); + nsresult SetParentCharset(nsIAtom aParentCharset); + nsresult GetParentCharsetSource(PRInt32 *aParentCharsetSource); + nsresult SetParentCharsetSource(PRInt32 aParentCharsetSource); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIDownload.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIDownload.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,54 @@ +module dwt.internal.mozilla.nsIDownload; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsITransfer; +import dwt.internal.mozilla.nsIURI; +import dwt.internal.mozilla.nsILocalFile; +import dwt.internal.mozilla.nsIObserver; +import dwt.internal.mozilla.nsICancelable; +import dwt.internal.mozilla.nsIMIMEInfo; + +const char[] NS_IDOWNLOAD_IID_STR = "9e1fd9f2-9727-4926-85cd-f16c375bba6d"; + +const nsIID NS_IDOWNLOAD_IID= + {0x9e1fd9f2, 0x9727, 0x4926, + [ 0x85, 0xcd, 0xf1, 0x6c, 0x37, 0x5b, 0xba, 0x6d ]}; + +extern(System) + +interface nsIDownload : nsITransfer { + + static const char[] IID_STR = NS_IDOWNLOAD_IID_STR; + static const nsIID IID = NS_IDOWNLOAD_IID; + + nsresult GetTargetFile(nsILocalFile *aTargetFile); + nsresult GetPercentComplete(PRInt32 *aPercentComplete); + nsresult GetAmountTransferred(PRUint64 *aAmountTransferred); + nsresult GetSize(PRUint64 *aSize); + nsresult GetSource(nsIURI *aSource); + nsresult GetTarget(nsIURI *aTarget); + nsresult GetCancelable(nsICancelable *aCancelable); + nsresult GetDisplayName(PRUnichar * *aDisplayName); + nsresult GetStartTime(PRInt64 *aStartTime); + nsresult GetMIMEInfo(nsIMIMEInfo *aMIMEInfo); + +} + +const char[] NS_IDOWNLOAD_MOZILLA_1_8_BRANCH_IID_STR = "ff76f0c7-caaf-4e64-8896-154348322696"; + +const nsIID NS_IDOWNLOAD_MOZILLA_1_8_BRANCH_IID= + {0xff76f0c7, 0xcaaf, 0x4e64, + [ 0x88, 0x96, 0x15, 0x43, 0x48, 0x32, 0x26, 0x96 ]}; + +extern(System) + +interface nsIDownload_MOZILLA_1_8_BRANCH : nsIDownload { + + static const char[] IID_STR = NS_IDOWNLOAD_MOZILLA_1_8_BRANCH_IID_STR; + static const nsIID IID = NS_IDOWNLOAD_MOZILLA_1_8_BRANCH_IID; + + nsresult GetSpeed(double *aSpeed); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIEmbeddingSiteWindow.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIEmbeddingSiteWindow.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,34 @@ +module dwt.internal.mozilla.nsIEmbeddingSiteWindow; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_IEMBEDDINGSITEWINDOW_IID_STR = "3e5432cd-9568-4bd1-8cbe-d50aba110743"; + +const nsIID NS_IEMBEDDINGSITEWINDOW_IID= + {0x3e5432cd, 0x9568, 0x4bd1, + [ 0x8c, 0xbe, 0xd5, 0x0a, 0xba, 0x11, 0x07, 0x43 ]}; + +extern(System) + +interface nsIEmbeddingSiteWindow : nsISupports { + + static const char[] IID_STR = NS_IEMBEDDINGSITEWINDOW_IID_STR; + static const nsIID IID = NS_IEMBEDDINGSITEWINDOW_IID; + + enum { DIM_FLAGS_POSITION = 1U }; + enum { DIM_FLAGS_SIZE_INNER = 2U }; + enum { DIM_FLAGS_SIZE_OUTER = 4U }; + + nsresult SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy); + nsresult GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy); + nsresult SetFocus(); + nsresult GetVisibility(PRBool *aVisibility); + nsresult SetVisibility(PRBool aVisibility); + nsresult GetTitle(PRUnichar * *aTitle); + nsresult SetTitle(PRUnichar * aTitle); + nsresult GetSiteWindow(void * *aSiteWindow); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIEmbeddingSiteWindow2.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIEmbeddingSiteWindow2.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,23 @@ +module dwt.internal.mozilla.nsIEmbeddingSiteWindow2; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsIEmbeddingSiteWindow; + +const char[] NS_IEMBEDDINGSITEWINDOW2_IID_STR = "e932bf55-0a64-4beb-923a-1f32d3661044"; + +const nsIID NS_IEMBEDDINGSITEWINDOW2_IID= + {0xe932bf55, 0x0a64, 0x4beb, + [ 0x92, 0x3a, 0x1f, 0x32, 0xd3, 0x66, 0x10, 0x44 ]}; + +extern(System) + +interface nsIEmbeddingSiteWindow2 : nsIEmbeddingSiteWindow { + + static const char[] IID_STR = NS_IEMBEDDINGSITEWINDOW2_IID_STR; + static const nsIID IID = NS_IEMBEDDINGSITEWINDOW2_IID; + + nsresult Blur(); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIEnumerator.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIEnumerator.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,52 @@ +module dwt.internal.mozilla.nsIEnumerator; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IENUMERATOR_IID_STR = "ad385286-cbc4-11d2-8cca-0060b0fc14a3"; + +const nsIID NS_IENUMERATOR_IID= + {0xad385286, 0xcbc4, 0x11d2, + [ 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 ]}; + +extern(System) + +interface nsIEnumerator : nsISupports { + + static const char[] IID_STR = NS_IENUMERATOR_IID_STR; + static const nsIID IID = NS_IENUMERATOR_IID; + + nsresult First(); + nsresult Next(); + nsresult CurrentItem(nsISupports *_retval); + nsresult IsDone(); + +} + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IBIDIRECTIONALENUMERATOR_IID_STR = "75f158a0-cadd-11d2-8cca-0060b0fc14a3"; + +const nsIID NS_IBIDIRECTIONALENUMERATOR_IID= + {0x75f158a0, 0xcadd, 0x11d2, + [ 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 ]}; + +extern(System) + +interface nsIBidirectionalEnumerator : nsIEnumerator { + + static const char[] IID_STR = NS_IBIDIRECTIONALENUMERATOR_IID_STR; + static const nsIID IID = NS_IBIDIRECTIONALENUMERATOR_IID; + + nsresult Last(); + nsresult Prev(); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIEventQueue.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIEventQueue.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,39 @@ +module dwt.internal.mozilla.nsIEventQueue; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsIEventTarget; + +const char[] NS_IEVENTQUEUE_IID_STR = "176afb41-00a4-11d3-9f2a-00400553eef0"; +const nsIID NS_IEVENTQUEUE_IID= + {0x176afb41, 0x00a4, 0x11d3, + [ 0x9f, 0x2a, 0x00, 0x40, 0x05, 0x53, 0xee, 0xf0 ]}; + +extern(System) + +interface nsIEventQueue : nsIEventTarget { + static const char[] IID_STR = NS_IEVENTQUEUE_IID_STR; + static const nsIID IID = NS_IEVENTQUEUE_IID; + + nsresult InitEvent(PLEvent * aEvent, void * owner, PLHandleEventProc handler, PLDestroyEventProc destructor); + nsresult PostSynchronousEvent(PLEvent * aEvent, void * *aResult); + nsresult PendingEvents(PRBool *_retval); + nsresult ProcessPendingEvents(); + nsresult EventLoop(); + nsresult EventAvailable(PRBool * aResult); + nsresult GetEvent(PLEvent * *_retval); + nsresult HandleEvent(PLEvent * aEvent); + nsresult WaitForEvent(PLEvent * *_retval); + PRInt32 GetEventQueueSelectFD(); + nsresult Init(PRBool aNative); + nsresult InitFromPRThread(PRThread * thread, PRBool aNative); + nsresult InitFromPLQueue(PLEventQueue * aQueue); + nsresult EnterMonitor(); + nsresult ExitMonitor(); + nsresult RevokeEvents(void * owner); + nsresult GetPLEventQueue(PLEventQueue * *_retval); + nsresult IsQueueNative(PRBool *_retval); + nsresult StopAcceptingEvents(); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIEventTarget.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIEventTarget.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,23 @@ +module dwt.internal.mozilla.nsIEventTarget; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsID; + +const char[] NS_IEVENTTARGET_IID_STR = "ea99ad5b-cc67-4efb-97c9-2ef620a59f2a"; + +const nsIID NS_IEVENTTARGET_IID= + {0xea99ad5b, 0xcc67, 0x4efb, + [ 0x97, 0xc9, 0x2e, 0xf6, 0x20, 0xa5, 0x9f, 0x2a ]}; + +extern(System) + +interface nsIEventTarget : nsISupports { + + static const char[] IID_STR = NS_IEVENTTARGET_IID_STR; + static const nsIID IID = NS_IEVENTTARGET_IID; + + nsresult PostEvent(PLEvent * aEvent); + nsresult IsOnCurrentThread(PRBool *_retval); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIExternalHelperAppService.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIExternalHelperAppService.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,89 @@ +module dwt.internal.mozilla.nsIExternalHelperAppService; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsICancelable; +import dwt.internal.mozilla.nsIURI; +import dwt.internal.mozilla.nsIRequest; +import dwt.internal.mozilla.nsIStreamListener; +import dwt.internal.mozilla.nsIFile; +import dwt.internal.mozilla.nsIMIMEInfo; +import dwt.internal.mozilla.nsIWebProgressListener2; +import dwt.internal.mozilla.nsIInterfaceRequestor; +import dwt.internal.mozilla.nsStringAPI; + +import dwt.internal.mozilla.prtime; + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IEXTERNALHELPERAPPSERVICE_IID_STR = "0ea90cf3-2dd9-470f-8f76-f141743c5678"; + +const nsIID NS_IEXTERNALHELPERAPPSERVICE_IID= + {0x0ea90cf3, 0x2dd9, 0x470f, + [ 0x8f, 0x76, 0xf1, 0x41, 0x74, 0x3c, 0x56, 0x78 ]}; + +extern(System) + +interface nsIExternalHelperAppService : nsISupports { + + static const char[] IID_STR = NS_IEXTERNALHELPERAPPSERVICE_IID_STR; + static const nsIID IID = NS_IEXTERNALHELPERAPPSERVICE_IID; + + nsresult DoContent(nsACString * aMimeContentType, nsIRequest aRequest, nsIInterfaceRequestor aWindowContext, nsIStreamListener *_retval); + nsresult ApplyDecodingForExtension(nsACString * aExtension, nsACString * aEncodingType, PRBool *_retval); + +} + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_PIEXTERNALAPPLAUNCHER_IID_STR = "d0b5d7d3-9565-403d-9fb5-e5089c4567c6"; + +const nsIID NS_PIEXTERNALAPPLAUNCHER_IID= + {0xd0b5d7d3, 0x9565, 0x403d, + [ 0x9f, 0xb5, 0xe5, 0x08, 0x9c, 0x45, 0x67, 0xc6 ]}; + +extern(System) + +interface nsPIExternalAppLauncher : nsISupports { + + static const char[] IID_STR = NS_PIEXTERNALAPPLAUNCHER_IID_STR; + static const nsIID IID = NS_PIEXTERNALAPPLAUNCHER_IID; + + nsresult DeleteTemporaryFileOnExit(nsIFile aTemporaryFile); + +} + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IHELPERAPPLAUNCHER_IID_STR = "99a0882d-2ff9-4659-9952-9ac531ba5592"; + +const nsIID NS_IHELPERAPPLAUNCHER_IID= + {0x99a0882d, 0x2ff9, 0x4659, + [ 0x99, 0x52, 0x9a, 0xc5, 0x31, 0xba, 0x55, 0x92 ]}; + +extern(System) + +interface nsIHelperAppLauncher : nsICancelable { + + static const char[] IID_STR = NS_IHELPERAPPLAUNCHER_IID_STR; + static const nsIID IID = NS_IHELPERAPPLAUNCHER_IID; + + nsresult GetMIMEInfo(nsIMIMEInfo *aMIMEInfo); + nsresult GetSource(nsIURI *aSource); + nsresult GetSuggestedFileName(nsAString * aSuggestedFileName); + nsresult SaveToDisk(nsIFile aNewFileLocation, PRBool aRememberThisPreference); + nsresult LaunchWithApplication(nsIFile aApplication, PRBool aRememberThisPreference); + nsresult SetWebProgressListener(nsIWebProgressListener2 aWebProgressListener); + nsresult CloseProgressWindow(); + nsresult GetTargetFile(nsIFile *aTargetFile); + nsresult GetTimeDownloadStarted(PRTime *aTimeDownloadStarted); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIFactory.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIFactory.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,23 @@ + +module dwt.internal.mozilla.nsIFactory; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_IFACTORY_IID_STR = "00000001-0000-0000-c000-000000000046"; + +const nsIID NS_IFACTORY_IID= + {0x00000001, 0x0000, 0x0000, + [ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 ]}; + +extern(System) + +interface nsIFactory : nsISupports { + + static const char[] IID_STR = NS_IFACTORY_IID_STR; + static const nsIID IID = NS_IFACTORY_IID; + + nsresult CreateInstance(nsISupports aOuter, nsIID * iid, void * *result); + nsresult LockFactory(PRBool lock); +} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIFile.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIFile.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,70 @@ +module dwt.internal.mozilla.nsIFile; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsISimpleEnumerator; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IFILE_IID_STR = "c8c0a080-0868-11d3-915f-d9d889d48e3c"; + +const nsIID NS_IFILE_IID= + {0xc8c0a080, 0x0868, 0x11d3, + [ 0x91, 0x5f, 0xd9, 0xd8, 0x89, 0xd4, 0x8e, 0x3c ]}; + +extern(System) + +interface nsIFile : nsISupports { + static const char[] IID_STR = NS_IFILE_IID_STR; + static const nsIID IID = NS_IFILE_IID; + + enum { NORMAL_FILE_TYPE = 0U }; + enum { DIRECTORY_TYPE = 1U }; + + nsresult Append(nsAString * node); + nsresult AppendNative(nsACString * node); + nsresult Normalize(); + nsresult Create(PRUint32 type, PRUint32 permissions); + nsresult GetLeafName(nsAString * aLeafName); + nsresult SetLeafName(nsAString * aLeafName); + nsresult GetNativeLeafName(nsACString * aNativeLeafName); + nsresult SetNativeLeafName(nsACString * aNativeLeafName); + nsresult CopyTo(nsIFile newParentDir, nsAString * newName); + nsresult CopyToNative(nsIFile newParentDir, nsACString * newName); + nsresult CopyToFollowingLinks(nsIFile newParentDir, nsAString * newName); + nsresult CopyToFollowingLinksNative(nsIFile newParentDir, nsACString * newName); + nsresult MoveTo(nsIFile newParentDir, nsAString * newName); + nsresult MoveToNative(nsIFile newParentDir, nsACString * newName); + nsresult Remove(PRBool recursive); + nsresult GetPermissions(PRUint32 *aPermissions); + nsresult SetPermissions(PRUint32 aPermissions); + nsresult GetPermissionsOfLink(PRUint32 *aPermissionsOfLink); + nsresult SetPermissionsOfLink(PRUint32 aPermissionsOfLink); + nsresult GetLastModifiedTime(PRInt64 *aLastModifiedTime); + nsresult SetLastModifiedTime(PRInt64 aLastModifiedTime); + nsresult GetLastModifiedTimeOfLink(PRInt64 *aLastModifiedTimeOfLink); + nsresult SetLastModifiedTimeOfLink(PRInt64 aLastModifiedTimeOfLink); + nsresult GetFileSize(PRInt64 *aFileSize); + nsresult SetFileSize(PRInt64 aFileSize); + nsresult GetFileSizeOfLink(PRInt64 *aFileSizeOfLink); + nsresult GetTarget(nsAString * aTarget); + nsresult GetNativeTarget(nsACString * aNativeTarget); + nsresult GetPath(nsAString * aPath); + nsresult GetNativePath(nsACString * aNativePath); + nsresult Exists(PRBool *_retval); + nsresult IsWritable(PRBool *_retval); + nsresult IsReadable(PRBool *_retval); + nsresult IsExecutable(PRBool *_retval); + nsresult IsHidden(PRBool *_retval); + nsresult IsDirectory(PRBool *_retval); + nsresult IsFile(PRBool *_retval); + nsresult IsSymlink(PRBool *_retval); + nsresult IsSpecial(PRBool *_retval); + nsresult CreateUnique(PRUint32 type, PRUint32 permissions); + nsresult Clone(nsIFile *_retval); + nsresult Equals(nsIFile inFile, PRBool *_retval); + nsresult Contains(nsIFile inFile, PRBool recur, PRBool *_retval); + nsresult GetParent(nsIFile *aParent); + nsresult GetDirectoryEntries(nsISimpleEnumerator *aDirectoryEntries); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIFilePicker.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIFilePicker.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,57 @@ +module dwt.internal.mozilla.nsIFilePicker; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsILocalFile; +import dwt.internal.mozilla.nsIFileURL; +import dwt.internal.mozilla.nsIDOMWindow; +import dwt.internal.mozilla.nsISimpleEnumerator; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IFILEPICKER_IID_STR = "80faf095-c807-4558-a2cc-185ed70754ea"; + +const nsIID NS_IFILEPICKER_IID= + {0x80faf095, 0xc807, 0x4558, + [ 0xa2, 0xcc, 0x18, 0x5e, 0xd7, 0x07, 0x54, 0xea ]}; + +extern(System) + +interface nsIFilePicker : nsISupports { + + static const char[] IID_STR = NS_IFILEPICKER_IID_STR; + static const nsIID IID = NS_IFILEPICKER_IID; + + enum { modeOpen = 0 }; + enum { modeSave = 1 }; + enum { modeGetFolder = 2 }; + enum { modeOpenMultiple = 3 }; + enum { returnOK = 0 }; + enum { returnCancel = 1 }; + enum { returnReplace = 2 }; + enum { filterAll = 1 }; + enum { filterHTML = 2 }; + enum { filterText = 4 }; + enum { filterImages = 8 }; + enum { filterXML = 16 }; + enum { filterXUL = 32 }; + enum { filterApps = 64 }; + + nsresult Init(nsIDOMWindow parent, nsAString * title, PRInt16 mode); + nsresult AppendFilters(PRInt32 filterMask); + nsresult AppendFilter(nsAString * title, nsAString * filter); + nsresult GetDefaultString(nsAString * aDefaultString); + nsresult SetDefaultString(nsAString * aDefaultString); + nsresult GetDefaultExtension(nsAString * aDefaultExtension); + nsresult SetDefaultExtension(nsAString * aDefaultExtension); + nsresult GetFilterIndex(PRInt32 *aFilterIndex); + nsresult SetFilterIndex(PRInt32 aFilterIndex); + nsresult GetDisplayDirectory(nsILocalFile *aDisplayDirectory); + nsresult SetDisplayDirectory(nsILocalFile aDisplayDirectory); + nsresult GetFile(nsILocalFile *aFile); + nsresult GetFileURL(nsIFileURL *aFileURL); + nsresult GetFiles(nsISimpleEnumerator *aFiles); + nsresult Show(PRInt16 *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIFileURL.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIFileURL.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,25 @@ +module dwt.internal.mozilla.nsIFileURL; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsIURL; +import dwt.internal.mozilla.nsIFile; + +const char[] NS_IFILEURL_IID_STR = "d26b2e2e-1dd1-11b2-88f3-8545a7ba7949"; + +const nsIID NS_IFILEURL_IID= + {0xd26b2e2e, 0x1dd1, 0x11b2, + [ 0x88, 0xf3, 0x85, 0x45, 0xa7, 0xba, 0x79, 0x49 ]}; + +extern(System) + +interface nsIFileURL : nsIURL { + + static const char[] IID_STR = NS_IFILEURL_IID_STR; + static const nsIID IID = NS_IFILEURL_IID; + + nsresult GetFile(nsIFile *aFile); + nsresult SetFile(nsIFile aFile); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIHelperAppLauncherDialog.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIHelperAppLauncherDialog.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,29 @@ +module dwt.internal.mozilla.nsIHelperAppLauncherDialog; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIExternalHelperAppService; +import dwt.internal.mozilla.nsILocalFile; + +const char[] NS_IHELPERAPPLAUNCHERDIALOG_IID_STR = "64355793-988d-40a5-ba8e-fcde78cac631"; + +const nsIID NS_IHELPERAPPLAUNCHERDIALOG_IID= + {0x64355793, 0x988d, 0x40a5, + [ 0xba, 0x8e, 0xfc, 0xde, 0x78, 0xca, 0xc6, 0x31 ]}; + +extern(System) + +interface nsIHelperAppLauncherDialog : nsISupports { + + static const char[] IID_STR = NS_IHELPERAPPLAUNCHERDIALOG_IID_STR; + static const nsIID IID = NS_IHELPERAPPLAUNCHERDIALOG_IID; + + enum { REASON_CANTHANDLE = 0U }; + enum { REASON_SERVERREQUEST = 1U }; + enum { REASON_TYPESNIFFED = 2U }; + nsresult Show(nsIHelperAppLauncher aLauncher, nsISupports aContext, PRUint32 aReason); + nsresult PromptForSaveToFile(nsIHelperAppLauncher aLauncher, nsISupports aWindowContext, PRUnichar *aDefaultFile, PRUnichar *aSuggestedFileExtension, nsILocalFile *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIHistoryEntry.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIHistoryEntry.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,27 @@ +module dwt.internal.mozilla.nsIHistoryEntry; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIURI; + +const char[] NS_IHISTORYENTRY_IID_STR = "a41661d4-1417-11d5-9882-00c04fa02f40"; + +const nsIID NS_IHISTORYENTRY_IID= + {0xa41661d4, 0x1417, 0x11d5, + [ 0x98, 0x82, 0x00, 0xc0, 0x4f, 0xa0, 0x2f, 0x40 ]}; + +extern(System) + +interface nsIHistoryEntry : nsISupports { + + static const char[] IID_STR = NS_IHISTORYENTRY_IID_STR; + static const nsIID IID = NS_IHISTORYENTRY_IID; + + nsresult GetURI(nsIURI *aURI); + nsresult GetTitle(PRUnichar * *aTitle); + nsresult GetIsSubFrame(PRBool *aIsSubFrame); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIIOService.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIIOService.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,37 @@ +module dwt.internal.mozilla.nsIIOService; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIProtocolHandler; +import dwt.internal.mozilla.nsIChannel; +import dwt.internal.mozilla.nsIURI; +import dwt.internal.mozilla.nsIFile; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IIOSERVICE_IID_STR = "bddeda3f-9020-4d12-8c70-984ee9f7935e"; + +const nsIID NS_IIOSERVICE_IID= + {0xbddeda3f, 0x9020, 0x4d12, + [ 0x8c, 0x70, 0x98, 0x4e, 0xe9, 0xf7, 0x93, 0x5e ]}; + +extern(System) + +interface nsIIOService : nsISupports { + + static const char[] IID_STR = NS_IIOSERVICE_IID_STR; + static const nsIID IID = NS_IIOSERVICE_IID; + + nsresult GetProtocolHandler(char *aScheme, nsIProtocolHandler *_retval); + nsresult GetProtocolFlags(char *aScheme, PRUint32 *_retval); + nsresult NewURI(nsACString * aSpec, char *aOriginCharset, nsIURI aBaseURI, nsIURI *_retval); + nsresult NewFileURI(nsIFile aFile, nsIURI *_retval); + nsresult NewChannelFromURI(nsIURI aURI, nsIChannel *_retval); + nsresult NewChannel(nsACString * aSpec, char *aOriginCharset, nsIURI aBaseURI, nsIChannel *_retval); + nsresult GetOffline(PRBool *aOffline); + nsresult SetOffline(PRBool aOffline); + nsresult AllowPort(PRInt32 aPort, char *aScheme, PRBool *_retval); + nsresult ExtractScheme(nsACString * urlString, nsACString * _retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIIOService2.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIIOService2.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,24 @@ +module dwt.internal.mozilla.nsIIOService2; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsIIOService; + +const char[] NS_IIOSERVICE2_IID_STR = "d44fe6d4-ee35-4789-886a-eb8f0554d04e"; + +const nsIID NS_IIOSERVICE2_IID= + {0xd44fe6d4, 0xee35, 0x4789, + [ 0x88, 0x6a, 0xeb, 0x8f, 0x05, 0x54, 0xd0, 0x4e ]}; + +extern(System) + +interface nsIIOService2 : nsIIOService { + + static const char[] IID_STR = NS_IIOSERVICE2_IID_STR; + static const nsIID IID = NS_IIOSERVICE2_IID; + + nsresult GetManageOfflineStatus(PRBool *aManageOfflineStatus); + nsresult SetManageOfflineStatus(PRBool aManageOfflineStatus); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIInputStream.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIInputStream.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,34 @@ +module dwt.internal.mozilla.nsIInputStream; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +typedef nsresult function(nsIInputStream aInStream, + void *aClosure, + byte *aFromSegment, + PRUint32 aToOffset, + PRUint32 aCount, + PRUint32 *aWriteCount) nsWriteSegmentFun; + +const char[] NS_IINPUTSTREAM_IID_STR = "fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a"; + +const nsIID NS_IINPUTSTREAM_IID= + {0xfa9c7f6c, 0x61b3, 0x11d4, + [ 0x98, 0x77, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a ]}; + +extern(System) + +interface nsIInputStream : nsISupports { + + static const char[] IID_STR = NS_IINPUTSTREAM_IID_STR; + static const nsIID IID = NS_IINPUTSTREAM_IID; + + nsresult Close(); + nsresult Available(PRUint32 *_retval); + nsresult Read(byte * aBuf, PRUint32 aCount, PRUint32 *_retval); + nsresult ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval); + nsresult IsNonBlocking(PRBool *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIInterfaceRequestor.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIInterfaceRequestor.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,23 @@ +module dwt.internal.mozilla.nsIInterfaceRequestor; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_IINTERFACEREQUESTOR_IID_STR = "033a1470-8b2a-11d3-af88-00a024ffc08c"; + +const nsIID NS_IINTERFACEREQUESTOR_IID= + {0x033a1470, 0x8b2a, 0x11d3, + [ 0xaf, 0x88, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; + +extern(System) + +interface nsIInterfaceRequestor : nsISupports { + + static const char[] IID_STR = NS_IINTERFACEREQUESTOR_IID_STR; + static const nsIID IID = NS_IINTERFACEREQUESTOR_IID; + + nsresult GetInterface(nsIID * uuid, void * *result); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIJSContextStack.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIJSContextStack.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,75 @@ +module dwt.internal.mozilla.nsIJSContextStack; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IJSCONTEXTSTACK_IID_STR = "c67d8270-3189-11d3-9885-006008962422"; + +const nsIID NS_IJSCONTEXTSTACK_IID= + {0xc67d8270, 0x3189, 0x11d3, + [ 0x98, 0x85, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 ]}; + +extern(System) + +interface nsIJSContextStack : nsISupports { + + static const char[] IID_STR = NS_IJSCONTEXTSTACK_IID_STR; + static const nsIID IID = NS_IJSCONTEXTSTACK_IID; + + nsresult GetCount(PRInt32 *aCount); + nsresult Peek(JSContext * *_retval); + nsresult Pop(JSContext * *_retval); + nsresult Push(JSContext * cx); + +} + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IJSCONTEXTSTACKITERATOR_IID_STR = "c7e6b7aa-fc12-4ca7-b140-98c38b698961"; + +const nsIID NS_IJSCONTEXTSTACKITERATOR_IID= + {0xc7e6b7aa, 0xfc12, 0x4ca7, + [ 0xb1, 0x40, 0x98, 0xc3, 0x8b, 0x69, 0x89, 0x61 ]}; + +extern(System) + +interface nsIJSContextStackIterator : nsISupports { + + static const char[] IID_STR = NS_IJSCONTEXTSTACKITERATOR_IID_STR; + static const nsIID IID = NS_IJSCONTEXTSTACKITERATOR_IID; + + nsresult Reset(nsIJSContextStack stack); + nsresult Done(PRBool *_retval); + nsresult Prev(JSContext * *_retval); + +} + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_ITHREADJSCONTEXTSTACK_IID_STR = "a1339ae0-05c1-11d4-8f92-0010a4e73d9a"; + +const nsIID NS_ITHREADJSCONTEXTSTACK_IID= + {0xa1339ae0, 0x05c1, 0x11d4, + [ 0x8f, 0x92, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a ]}; + +extern(System) + +interface nsIThreadJSContextStack : nsIJSContextStack { + + static const char[] IID_STR = NS_ITHREADJSCONTEXTSTACK_IID_STR; + static const nsIID IID = NS_ITHREADJSCONTEXTSTACK_IID; + + nsresult GetSafeJSContext(JSContext * *aSafeJSContext); + nsresult SetSafeJSContext(JSContext * aSafeJSContext); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsILoadGroup.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsILoadGroup.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,37 @@ +module dwt.internal.mozilla.nsILoadGroup; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIRequest; +import dwt.internal.mozilla.nsISimpleEnumerator; +import dwt.internal.mozilla.nsIRequestObserver; +import dwt.internal.mozilla.nsIInterfaceRequestor; + +const char[] NS_ILOADGROUP_IID_STR = "3de0a31c-feaf-400f-9f1e-4ef71f8b20cc"; + +const nsIID NS_ILOADGROUP_IID= + {0x3de0a31c, 0xfeaf, 0x400f, + [ 0x9f, 0x1e, 0x4e, 0xf7, 0x1f, 0x8b, 0x20, 0xcc ]}; + +extern(System) + +interface nsILoadGroup : nsIRequest { + + static const char[] IID_STR = NS_ILOADGROUP_IID_STR; + static const nsIID IID = NS_ILOADGROUP_IID; + + nsresult GetGroupObserver(nsIRequestObserver *aGroupObserver); + nsresult SetGroupObserver(nsIRequestObserver aGroupObserver); + nsresult GetDefaultLoadRequest(nsIRequest *aDefaultLoadRequest); + nsresult SetDefaultLoadRequest(nsIRequest aDefaultLoadRequest); + nsresult AddRequest(nsIRequest aRequest, nsISupports aContext); + nsresult RemoveRequest(nsIRequest aRequest, nsISupports aContext, nsresult aStatus); + nsresult GetRequests(nsISimpleEnumerator *aRequests); + nsresult GetActiveCount(PRUint32 *aActiveCount); + nsresult GetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks); + nsresult SetNotificationCallbacks(nsIInterfaceRequestor aNotificationCallbacks); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsILocalFile.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsILocalFile.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,44 @@ +module dwt.internal.mozilla.nsILocalFile; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.prlink; +import dwt.internal.mozilla.prio; +import dwt.internal.mozilla.prtime; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsIFile; +import dwt.internal.mozilla.nsStringAPI; + +import tango.stdc.stdio : FILE; + +const char[] NS_ILOCALFILE_IID_STR = "aa610f20-a889-11d3-8c81-000064657374"; + +const nsIID NS_ILOCALFILE_IID= + {0xaa610f20, 0xa889, 0x11d3, + [ 0x8c, 0x81, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 ]}; + +extern(System) + +interface nsILocalFile : nsIFile { + + static const char[] IID_STR = NS_ILOCALFILE_IID_STR; + static const nsIID IID = NS_ILOCALFILE_IID; + + nsresult InitWithPath(nsAString * filePath); + nsresult InitWithNativePath(nsACString * filePath); + nsresult InitWithFile(nsILocalFile aFile); + nsresult GetFollowLinks(PRBool *aFollowLinks); + nsresult SetFollowLinks(PRBool aFollowLinks); + nsresult OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc * *_retval); + nsresult OpenANSIFileDesc(char *mode, FILE * *_retval); + nsresult Load(PRLibrary * *_retval); + nsresult GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable); + nsresult AppendRelativePath(nsAString * relativeFilePath); + nsresult AppendRelativeNativePath(nsACString * relativeFilePath); + nsresult GetPersistentDescriptor(nsACString * aPersistentDescriptor); + nsresult SetPersistentDescriptor(nsACString * aPersistentDescriptor); + nsresult Reveal(); + nsresult Launch(); + nsresult GetRelativeDescriptor(nsILocalFile fromFile, nsACString * _retval); + nsresult SetRelativeDescriptor(nsILocalFile fromFile, nsACString * relativeDesc); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIMIMEInfo.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIMIMEInfo.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,60 @@ +module dwt.internal.mozilla.nsIMIMEInfo; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIURI; +import dwt.internal.mozilla.nsIFile; +import dwt.internal.mozilla.nsIStringEnumerator; +import dwt.internal.mozilla.nsStringAPI; + +alias PRInt32 nsMIMEInfoHandleAction; + +const char[] NS_IMIMEINFO_IID_STR = "1448b42f-cf0d-466e-9a15-64e876ebe857"; + +const nsIID NS_IMIMEINFO_IID= + {0x1448b42f, 0xcf0d, 0x466e, + [ 0x9a, 0x15, 0x64, 0xe8, 0x76, 0xeb, 0xe8, 0x57 ]}; + +extern(System) + +interface nsIMIMEInfo : nsISupports { + + static const char[] IID_STR = NS_IMIMEINFO_IID_STR; + static const nsIID IID = NS_IMIMEINFO_IID; + + nsresult GetFileExtensions(nsIUTF8StringEnumerator *_retval); + nsresult SetFileExtensions(nsACString * aExtensions); + nsresult ExtensionExists(nsACString * aExtension, PRBool *_retval); + nsresult AppendExtension(nsACString * aExtension); + nsresult GetPrimaryExtension(nsACString * aPrimaryExtension); + nsresult SetPrimaryExtension(nsACString * aPrimaryExtension); + nsresult GetMIMEType(nsACString * aMIMEType); + nsresult SetDescription(nsAString * aDescription); + nsresult GetMacType(PRUint32 *aMacType); + nsresult SetMacType(PRUint32 aMacType); + nsresult GetMacCreator(PRUint32 *aMacCreator); + nsresult SetMacCreator(PRUint32 aMacCreator); + nsresult Equals(nsIMIMEInfo aMIMEInfo, PRBool *_retval); + nsresult GetPreferredApplicationHandler(nsIFile *aPreferredApplicationHandler); + nsresult SetPreferredApplicationHandler(nsIFile aPreferredApplicationHandler); + nsresult GetApplicationDescription(nsAString * aApplicationDescription); + nsresult SetApplicationDescription(nsAString * aApplicationDescription); + nsresult GetHasDefaultHandler(PRBool *aHasDefaultHandler); + nsresult GetDefaultDescription(nsAString * aDefaultDescription); + nsresult LaunchWithFile(nsIFile aFile); + + enum { saveToDisk = 0 }; + enum { alwaysAsk = 1 }; + enum { useHelperApp = 2 }; + enum { handleInternally = 3 }; + enum { useSystemDefault = 4 }; + + nsresult GetPreferredAction(nsMIMEInfoHandleAction *aPreferredAction); + nsresult SetPreferredAction(nsMIMEInfoHandleAction aPreferredAction); + nsresult GetAlwaysAskBeforeHandling(PRBool *aAlwaysAskBeforeHandling); + nsresult SetAlwaysAskBeforeHandling(PRBool aAlwaysAskBeforeHandling); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIMemory.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIMemory.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,24 @@ +module dwt.internal.mozilla.nsIMemory; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_IMEMORY_IID_STR = "59e7e77a-38e4-11d4-8cf5-0060b0fc14a3"; + +const nsIID NS_IMEMORY_IID= + {0x59e7e77a, 0x38e4, 0x11d4, + [ 0x8c, 0xf5, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 ]}; + +extern(System) +interface nsIMemory : nsISupports { + static const char[] IID_STR = NS_IMEMORY_IID_STR; + static const nsIID IID = NS_IMEMORY_IID; + + void * Alloc(size_t size); + void * Realloc(void * ptr, size_t newSize); + void Free(void * ptr); + nsresult HeapMinimize(PRBool immediate); + nsresult IsLowMemory(PRBool *_retval); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIModule.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIModule.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,25 @@ +module dwt.internal.mozilla.nsIModule; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIFile; +import dwt.internal.mozilla.nsIComponentManager; + +const char[] NS_IMODULE_IID_STR = "7392d032-5371-11d3-994e-00805fd26fee"; + +const nsIID NS_IMODULE_IID= + {0x7392d032, 0x5371, 0x11d3, + [ 0x99, 0x4e, 0x00, 0x80, 0x5f, 0xd2, 0x6f, 0xee ]}; + +extern(System) +interface nsIModule : nsISupports { + static const char[] IID_STR = NS_IMODULE_IID_STR; + static const nsIID IID = NS_IMODULE_IID; + + nsresult GetClassObject(nsIComponentManager aCompMgr, nsCID * aClass, nsIID * aIID, void * *aResult); + nsresult RegisterSelf(nsIComponentManager aCompMgr, nsIFile aLocation, char *aLoaderStr, char *aType); + nsresult UnregisterSelf(nsIComponentManager aCompMgr, nsIFile aLocation, char *aLoaderStr); + nsresult CanUnload(nsIComponentManager aCompMgr, PRBool *_retval); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIObjectInputStream.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIObjectInputStream.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,28 @@ +module dwt.internal.mozilla.nsIObjectInputStream; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIBinaryInputStream; + +const char[] NS_IOBJECTINPUTSTREAM_IID_STR = "6c248606-4eae-46fa-9df0-ba58502368eb"; + +const nsIID NS_IOBJECTINPUTSTREAM_IID= + {0x6c248606, 0x4eae, 0x46fa, + [ 0x9d, 0xf0, 0xba, 0x58, 0x50, 0x23, 0x68, 0xeb ]}; + +extern(System) + +interface nsIObjectInputStream : nsIBinaryInputStream { + + static const char[] IID_STR = NS_IOBJECTINPUTSTREAM_IID_STR; + static const nsIID IID = NS_IOBJECTINPUTSTREAM_IID; + + nsresult ReadObject(PRBool aIsStrongRef, nsISupports *_retval); + nsresult ReadID(nsID *aID); + char * GetBuffer(PRUint32 aLength, PRUint32 aAlignMask); + void PutBuffer(char * aBuffer, PRUint32 aLength); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIObjectOutputStream.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIObjectOutputStream.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,30 @@ +module dwt.internal.mozilla.nsIObjectOutputStream; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIBinaryOutputStream; + +const char[] NS_IOBJECTOUTPUTSTREAM_IID_STR = "92c898ac-5fde-4b99-87b3-5d486422094b"; + +const nsIID NS_IOBJECTOUTPUTSTREAM_IID= + {0x92c898ac, 0x5fde, 0x4b99, + [ 0x87, 0xb3, 0x5d, 0x48, 0x64, 0x22, 0x09, 0x4b ]}; + +extern(System) + +interface nsIObjectOutputStream : nsIBinaryOutputStream { + + static const char[] IID_STR = NS_IOBJECTOUTPUTSTREAM_IID_STR; + static const nsIID IID = NS_IOBJECTOUTPUTSTREAM_IID; + + nsresult WriteObject(nsISupports aObject, PRBool aIsStrongRef); + nsresult WriteSingleRefObject(nsISupports aObject); + nsresult WriteCompoundObject(nsISupports aObject, nsIID * aIID, PRBool aIsStrongRef); + nsresult WriteID(nsID * aID); + char * GetBuffer(PRUint32 aLength, PRUint32 aAlignMask); + void PutBuffer(char * aBuffer, PRUint32 aLength); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIObserver.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIObserver.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,23 @@ +module dwt.internal.mozilla.nsIObserver; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_IOBSERVER_IID_STR = "db242e01-e4d9-11d2-9dde-000064657374"; + +const nsIID NS_IOBSERVER_IID= + {0xdb242e01, 0xe4d9, 0x11d2, + [ 0x9d, 0xde, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 ]}; + +extern(System) + +interface nsIObserver : nsISupports { + + static const char[] IID_STR = NS_IOBSERVER_IID_STR; + static const nsIID IID = NS_IOBSERVER_IID; + + nsresult Observe(nsISupports aSubject, char *aTopic, PRUnichar *aData); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIObserverService.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIObserverService.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,28 @@ +module dwt.internal.mozilla.nsIObserverService; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIObserver; +import dwt.internal.mozilla.nsISimpleEnumerator; + +const char[] NS_IOBSERVERSERVICE_IID_STR = "d07f5192-e3d1-11d2-8acd-00105a1b8860"; + +const nsIID NS_IOBSERVERSERVICE_IID= + {0xd07f5192, 0xe3d1, 0x11d2, + [ 0x8a, 0xcd, 0x00, 0x10, 0x5a, 0x1b, 0x88, 0x60 ]}; + +extern(System) + +interface nsIObserverService : nsISupports { + + static const char[] IID_STR = NS_IOBSERVERSERVICE_IID_STR; + static const nsIID IID = NS_IOBSERVERSERVICE_IID; + + nsresult AddObserver(nsIObserver anObserver, char *aTopic, PRBool ownsWeak); + nsresult RemoveObserver(nsIObserver anObserver, char *aTopic); + nsresult NotifyObservers(nsISupports aSubject, char *aTopic, PRUnichar *someData); + nsresult EnumerateObservers(char *aTopic, nsISimpleEnumerator *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIOutputStream.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIOutputStream.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,37 @@ +module dwt.internal.mozilla.nsIOutputStream; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIInputStream; + +typedef nsresult function(nsIOutputStream aOutStream, + void *aClosure, + char *aToSegment, + PRUint32 aFromOffset, + PRUint32 aCount, + PRUint32 *aReadCount) nsReadSegmentFun; + +const char[] NS_IOUTPUTSTREAM_IID_STR = "0d0acd2a-61b4-11d4-9877-00c04fa0cf4a"; + +const nsIID NS_IOUTPUTSTREAM_IID= + {0x0d0acd2a, 0x61b4, 0x11d4, + [ 0x98, 0x77, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a ]}; + +extern(System) + +interface nsIOutputStream : nsISupports { + + static const char[] IID_STR = NS_IOUTPUTSTREAM_IID_STR; + static const nsIID IID = NS_IOUTPUTSTREAM_IID; + + nsresult Close(); + nsresult Flush(); + nsresult Write(char *aBuf, PRUint32 aCount, PRUint32 *_retval); + nsresult WriteFrom(nsIInputStream aFromStream, PRUint32 aCount, PRUint32 *_retval); + nsresult WriteSegments(nsReadSegmentFun aReader, void * aClosure, PRUint32 aCount, PRUint32 *_retval); + nsresult IsNonBlocking(PRBool *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIPrefBranch.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIPrefBranch.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,45 @@ +module dwt.internal.mozilla.nsIPrefBranch; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_IPREFBRANCH_IID_STR = "56c35506-f14b-11d3-99d3-ddbfac2ccf65"; + +const nsIID NS_IPREFBRANCH_IID= + {0x56c35506, 0xf14b, 0x11d3, + [ 0x99, 0xd3, 0xdd, 0xbf, 0xac, 0x2c, 0xcf, 0x65 ]}; + +extern(System) + +interface nsIPrefBranch : nsISupports { + + static const char[] IID_STR = NS_IPREFBRANCH_IID_STR; + static const nsIID IID = NS_IPREFBRANCH_IID; + + enum { PREF_INVALID = 0 }; + enum { PREF_STRING = 32 }; + enum { PREF_INT = 64 }; + enum { PREF_BOOL = 128 }; + + nsresult GetRoot(char * *aRoot); + nsresult GetPrefType(char *aPrefName, PRInt32 *_retval); + nsresult GetBoolPref(char *aPrefName, PRBool *_retval); + nsresult SetBoolPref(char *aPrefName, PRInt32 aValue); + nsresult GetCharPref(char *aPrefName, char **_retval); + nsresult SetCharPref(char *aPrefName, char *aValue); + nsresult GetIntPref(char *aPrefName, PRInt32 *_retval); + nsresult SetIntPref(char *aPrefName, PRInt32 aValue); + nsresult GetComplexValue(char *aPrefName, nsIID * aType, void * *aValue); + nsresult SetComplexValue(char *aPrefName, nsIID * aType, nsISupports aValue); + nsresult ClearUserPref(char *aPrefName); + nsresult LockPref(char *aPrefName); + nsresult PrefHasUserValue(char *aPrefName, PRBool *_retval); + nsresult PrefIsLocked(char *aPrefName, PRBool *_retval); + nsresult UnlockPref(char *aPrefName); + nsresult DeleteBranch(char *aStartingAt); + nsresult GetChildList(char *aStartingAt, PRUint32 *aCount, char ***aChildArray); + nsresult ResetBranch(char *aStartingAt); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIPrefBranch2.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIPrefBranch2.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,26 @@ +module dwt.internal.mozilla.nsIPrefBranch2; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIPrefBranch; +import dwt.internal.mozilla.nsIObserver; + +const char[] NS_IPREFBRANCH2_IID_STR = "74567534-eb94-4b1c-8f45-389643bfc555"; + +const nsIID NS_IPREFBRANCH2_IID= + {0x74567534, 0xeb94, 0x4b1c, + [ 0x8f, 0x45, 0x38, 0x96, 0x43, 0xbf, 0xc5, 0x55 ]}; + +extern(System) + +interface nsIPrefBranch2 : nsIPrefBranch { + + static const char[] IID_STR = NS_IPREFBRANCH2_IID_STR; + static const nsIID IID = NS_IPREFBRANCH2_IID; + + nsresult AddObserver(char *aDomain, nsIObserver aObserver, PRBool aHoldWeak); + nsresult RemoveObserver(char *aDomain, nsIObserver aObserver); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIPrefLocalizedString.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIPrefLocalizedString.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,26 @@ +module dwt.internal.mozilla.nsIPrefLocalizedString; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_IPREFLOCALIZEDSTRING_IID_STR = "ae419e24-1dd1-11b2-b39a-d3e5e7073802"; + +const nsIID NS_IPREFLOCALIZEDSTRING_IID= + {0xae419e24, 0x1dd1, 0x11b2, + [ 0xb3, 0x9a, 0xd3, 0xe5, 0xe7, 0x07, 0x38, 0x02 ]}; + +extern(System) + +interface nsIPrefLocalizedString : nsISupports { + + static const char[] IID_STR = NS_IPREFLOCALIZEDSTRING_IID_STR; + static const nsIID IID = NS_IPREFLOCALIZEDSTRING_IID; + + nsresult GetData(PRUnichar * *aData); + nsresult SetData(PRUnichar * aData); + nsresult ToString(PRUnichar **_retval); + nsresult SetDataWithLength(PRUint32 length, PRUnichar *data); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIPrefService.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIPrefService.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,30 @@ +module dwt.internal.mozilla.nsIPrefService; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIPrefBranch; +import dwt.internal.mozilla.nsIFile; + +const char[] NS_IPREFSERVICE_IID_STR = "decb9cc7-c08f-4ea5-be91-a8fc637ce2d2"; + +const nsIID NS_IPREFSERVICE_IID= + {0xdecb9cc7, 0xc08f, 0x4ea5, + [ 0xbe, 0x91, 0xa8, 0xfc, 0x63, 0x7c, 0xe2, 0xd2 ]}; + +extern(System) + +interface nsIPrefService : nsISupports { + + static const char[] IID_STR = NS_IPREFSERVICE_IID_STR; + static const nsIID IID = NS_IPREFSERVICE_IID; + + nsresult ReadUserPrefs(nsIFile aFile); + nsresult ResetPrefs(); + nsresult ResetUserPrefs(); + nsresult SavePrefFile(nsIFile aFile); + nsresult GetBranch(char *aPrefRoot, nsIPrefBranch *_retval); + nsresult GetDefaultBranch(char *aPrefRoot, nsIPrefBranch *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIProgressDialog.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIProgressDialog.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,32 @@ +module dwt.internal.mozilla.nsIProgressDialog; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIDownload; +import dwt.internal.mozilla.nsIDOMWindow; +import dwt.internal.mozilla.nsIObserver; + +const char[] NS_IPROGRESSDIALOG_IID_STR = "20e790a2-76c6-462d-851a-22ab6cbbe48b"; + +const nsIID NS_IPROGRESSDIALOG_IID= + {0x20e790a2, 0x76c6, 0x462d, + [ 0x85, 0x1a, 0x22, 0xab, 0x6c, 0xbb, 0xe4, 0x8b ]}; + +extern(System) + +interface nsIProgressDialog : nsIDownload { + + static const char[] IID_STR = NS_IPROGRESSDIALOG_IID_STR; + static const nsIID IID = NS_IPROGRESSDIALOG_IID; + + nsresult Open(nsIDOMWindow aParent); + nsresult GetCancelDownloadOnClose(PRBool *aCancelDownloadOnClose); + nsresult SetCancelDownloadOnClose(PRBool aCancelDownloadOnClose); + nsresult GetObserver(nsIObserver *aObserver); + nsresult SetObserver(nsIObserver aObserver); + nsresult GetDialog(nsIDOMWindow *aDialog); + nsresult SetDialog(nsIDOMWindow aDialog); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIPrompt.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIPrompt.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,49 @@ +module dwt.internal.mozilla.nsIPrompt; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_IPROMPT_IID_STR = "a63f70c0-148b-11d3-9333-00104ba0fd40"; + +const nsIID NS_IPROMPT_IID= + {0xa63f70c0, 0x148b, 0x11d3, + [ 0x93, 0x33, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 ]}; + +extern(System) + +interface nsIPrompt : nsISupports { + + static const char[] IID_STR = NS_IPROMPT_IID_STR; + static const nsIID IID = NS_IPROMPT_IID; + + nsresult Alert(PRUnichar *dialogTitle, PRUnichar *text); + nsresult AlertCheck(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar *checkMsg, PRBool *checkValue); + nsresult Confirm(PRUnichar *dialogTitle, PRUnichar *text, PRBool *_retval); + nsresult ConfirmCheck(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval); + + enum { BUTTON_POS_0 = 1U }; + enum { BUTTON_POS_1 = 256U }; + enum { BUTTON_POS_2 = 65536U }; + enum { BUTTON_TITLE_OK = 1U }; + enum { BUTTON_TITLE_CANCEL = 2U }; + enum { BUTTON_TITLE_YES = 3U }; + enum { BUTTON_TITLE_NO = 4U }; + enum { BUTTON_TITLE_SAVE = 5U }; + enum { BUTTON_TITLE_DONT_SAVE = 6U }; + enum { BUTTON_TITLE_REVERT = 7U }; + enum { BUTTON_TITLE_IS_STRING = 127U }; + enum { BUTTON_POS_0_DEFAULT = 0U }; + enum { BUTTON_POS_1_DEFAULT = 16777216U }; + enum { BUTTON_POS_2_DEFAULT = 33554432U }; + enum { BUTTON_DELAY_ENABLE = 67108864U }; + enum { STD_OK_CANCEL_BUTTONS = 513U }; + + nsresult ConfirmEx(PRUnichar *dialogTitle, PRUnichar *text, PRUint32 buttonFlags, PRUnichar *button0Title, PRUnichar *button1Title, PRUnichar *button2Title, PRUnichar *checkMsg, PRBool *checkValue, PRInt32 *_retval); + nsresult Prompt(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar **value, PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval); + nsresult PromptPassword(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar **password, PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval); + nsresult PromptUsernameAndPassword(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar **username, PRUnichar **password, PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval); + nsresult Select(PRUnichar *dialogTitle, PRUnichar *text, PRUint32 count, PRUnichar **selectList, PRInt32 *outSelection, PRBool *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIPromptService.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIPromptService.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,52 @@ +module dwt.internal.mozilla.nsIPromptService; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMWindow; + +const char[] NS_IPROMPTSERVICE_IID_STR = "1630c61a-325e-49ca-8759-a31b16c47aa5"; + +const nsIID NS_IPROMPTSERVICE_IID= + {0x1630c61a, 0x325e, 0x49ca, + [ 0x87, 0x59, 0xa3, 0x1b, 0x16, 0xc4, 0x7a, 0xa5 ]}; + +extern(System) + +interface nsIPromptService : nsISupports { + + static const char[] IID_STR = NS_IPROMPTSERVICE_IID_STR; + static const nsIID IID = NS_IPROMPTSERVICE_IID; + + nsresult Alert(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText); + nsresult AlertCheck(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRUnichar *aCheckMsg, PRBool *aCheckState); + nsresult Confirm(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRBool *_retval); + nsresult ConfirmCheck(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); + + enum { BUTTON_POS_0 = 1U }; + enum { BUTTON_POS_1 = 256U }; + enum { BUTTON_POS_2 = 65536U }; + enum { BUTTON_TITLE_OK = 1U }; + enum { BUTTON_TITLE_CANCEL = 2U }; + enum { BUTTON_TITLE_YES = 3U }; + enum { BUTTON_TITLE_NO = 4U }; + enum { BUTTON_TITLE_SAVE = 5U }; + enum { BUTTON_TITLE_DONT_SAVE = 6U }; + enum { BUTTON_TITLE_REVERT = 7U }; + enum { BUTTON_TITLE_IS_STRING = 127U }; + enum { BUTTON_POS_0_DEFAULT = 0U }; + enum { BUTTON_POS_1_DEFAULT = 16777216U }; + enum { BUTTON_POS_2_DEFAULT = 33554432U }; + enum { BUTTON_DELAY_ENABLE = 67108864U }; + enum { STD_OK_CANCEL_BUTTONS = 513U }; + enum { STD_YES_NO_BUTTONS = 1027U }; + + nsresult ConfirmEx(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRUint32 aButtonFlags, PRUnichar *aButton0Title, PRUnichar *aButton1Title, PRUnichar *aButton2Title, PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval); + nsresult Prompt(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRUnichar **aValue, PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); + nsresult PromptUsernameAndPassword(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); + nsresult PromptPassword(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRUnichar **aPassword, PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); + nsresult Select(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRUint32 aCount, PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIProperties.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIProperties.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,27 @@ +module mozilla.xpcom.nsIProperties; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_IPROPERTIES_IID_STR = "78650582-4e93-4b60-8e85-26ebd3eb14ca"; + +const nsIID NS_IPROPERTIES_IID= + {0x78650582, 0x4e93, 0x4b60, + [ 0x8e, 0x85, 0x26, 0xeb, 0xd3, 0xeb, 0x14, 0xca ]}; + +extern(System) + +interface nsIProperties : nsISupports { + + static const char[] IID_STR = NS_IPROPERTIES_IID_STR; + static const nsIID IID = NS_IPROPERTIES_IID; + + nsresult Get(char *prop, nsIID * iid, void * *result); + nsresult Set(char *prop, nsISupports value); + nsresult Has(char *prop, PRBool *_retval); + nsresult Undefine(char *prop); + nsresult GetKeys(PRUint32 *count, char ***keys); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIProtocolHandler.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIProtocolHandler.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,37 @@ +module dwt.internal.mozilla.nsIProtocolHandler; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsIURI; +import dwt.internal.mozilla.nsIChannel; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IPROTOCOLHANDLER_IID_STR = "15fd6940-8ea7-11d3-93ad-00104ba0fd40"; + +const nsIID NS_IPROTOCOLHANDLER_IID= + {0x15fd6940, 0x8ea7, 0x11d3, + [ 0x93, 0xad, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 ]}; + +extern(System) + +interface nsIProtocolHandler : nsISupports { + + static const char[] IID_STR = NS_IPROTOCOLHANDLER_IID_STR; + static const nsIID IID = NS_IPROTOCOLHANDLER_IID; + + nsresult GetScheme(nsACString * aScheme); + nsresult GetDefaultPort(PRInt32 *aDefaultPort); + nsresult GetProtocolFlags(PRUint32 *aProtocolFlags); + nsresult NewURI(nsACString * aSpec, char *aOriginCharset, nsIURI aBaseURI, nsIURI *_retval); + nsresult NewChannel(nsIURI aURI, nsIChannel *_retval); + nsresult AllowPort(PRInt32 port, char *scheme, PRBool *_retval); + + enum { URI_STD = 0U }; + enum { URI_NORELATIVE = 1U }; + enum { URI_NOAUTH = 2U }; + enum { ALLOWS_PROXY = 4U }; + enum { ALLOWS_PROXY_HTTP = 8U }; + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIRequest.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIRequest.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,46 @@ +module dwt.internal.mozilla.nsIRequest; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsILoadGroup; +import dwt.internal.mozilla.nsStringAPI; + +alias PRUint32 nsLoadFlags; + +const char[] NS_IREQUEST_IID_STR = "ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe"; + +const nsIID NS_IREQUEST_IID= + {0xef6bfbd2, 0xfd46, 0x48d8, + [ 0x96, 0xb7, 0x9f, 0x8f, 0x0f, 0xd3, 0x87, 0xfe ]}; + +extern(System) + +interface nsIRequest : nsISupports { + + static const char[] IID_STR = NS_IREQUEST_IID_STR; + static const nsIID IID = NS_IREQUEST_IID; + + nsresult GetName(nsACString * aName); + nsresult IsPending(PRBool *_retval); + nsresult GetStatus(nsresult *aStatus); + nsresult Cancel(nsresult aStatus); + nsresult Suspend(); + nsresult Resume(); + nsresult GetLoadGroup(nsILoadGroup *aLoadGroup); + nsresult SetLoadGroup(nsILoadGroup aLoadGroup); + nsresult GetLoadFlags(nsLoadFlags *aLoadFlags); + nsresult SetLoadFlags(nsLoadFlags aLoadFlags); + + enum { LOAD_NORMAL = 0U }; + enum { LOAD_BACKGROUND = 1U }; + enum { INHIBIT_CACHING = 128U }; + enum { INHIBIT_PERSISTENT_CACHING = 256U }; + enum { LOAD_BYPASS_CACHE = 512U }; + enum { LOAD_FROM_CACHE = 1024U }; + enum { VALIDATE_ALWAYS = 2048U }; + enum { VALIDATE_NEVER = 4096U }; + enum { VALIDATE_ONCE_PER_SESSION = 8192U }; + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIRequestObserver.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIRequestObserver.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,26 @@ +module dwt.internal.mozilla.nsIRequestObserver; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIRequest; + +const char[] NS_IREQUESTOBSERVER_IID_STR = "fd91e2e0-1481-11d3-9333-00104ba0fd40"; + +const nsIID NS_IREQUESTOBSERVER_IID= + {0xfd91e2e0, 0x1481, 0x11d3, + [ 0x93, 0x33, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 ]}; + +extern(System) + +interface nsIRequestObserver : nsISupports { + + static const char[] IID_STR = NS_IREQUESTOBSERVER_IID_STR; + static const nsIID IID = NS_IREQUESTOBSERVER_IID; + + nsresult OnStartRequest(nsIRequest aRequest, nsISupports aContext); + nsresult OnStopRequest(nsIRequest aRequest, nsISupports aContext, nsresult aStatusCode); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsISHEntry.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsISHEntry.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,74 @@ +module dwt.internal.mozilla.nsISHEntry; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIHistoryEntry; +import dwt.internal.mozilla.nsIContentViewer; +import dwt.internal.mozilla.nsIURI; +import dwt.internal.mozilla.nsIInputStream; +import dwt.internal.mozilla.nsIDocShellTreeItem; +import dwt.internal.mozilla.nsISupportsArray; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_ISHENTRY_IID_STR = "542a98b9-2889-4922-aaf4-02b6056f4136"; + +const nsIID NS_ISHENTRY_IID= + {0x542a98b9, 0x2889, 0x4922, + [ 0xaa, 0xf4, 0x02, 0xb6, 0x05, 0x6f, 0x41, 0x36 ]}; + +extern(System) + +interface nsISHEntry : nsIHistoryEntry { + + static const char[] IID_STR = NS_ISHENTRY_IID_STR; + static const nsIID IID = NS_ISHENTRY_IID; + + nsresult SetURI(nsIURI aURI); + nsresult GetReferrerURI(nsIURI *aReferrerURI); + nsresult SetReferrerURI(nsIURI aReferrerURI); + nsresult GetContentViewer(nsIContentViewer *aContentViewer); + nsresult SetContentViewer(nsIContentViewer aContentViewer); + nsresult GetSticky(PRBool *aSticky); + nsresult SetSticky(PRBool aSticky); + nsresult GetWindowState(nsISupports *aWindowState); + nsresult SetWindowState(nsISupports aWindowState); + nsresult GetViewerBounds(nsRect * bounds); + nsresult SetViewerBounds(nsRect * bounds); + nsresult AddChildShell(nsIDocShellTreeItem shell); + nsresult ChildShellAt(PRInt32 index, nsIDocShellTreeItem *_retval); + nsresult ClearChildShells(); + nsresult GetRefreshURIList(nsISupportsArray *aRefreshURIList); + nsresult SetRefreshURIList(nsISupportsArray aRefreshURIList); + nsresult SyncPresentationState(); + nsresult SetTitle(nsAString * aTitle); + nsresult GetPostData(nsIInputStream *aPostData); + nsresult SetPostData(nsIInputStream aPostData); + nsresult GetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState); + nsresult SetLayoutHistoryState(nsILayoutHistoryState aLayoutHistoryState); + nsresult GetParent(nsISHEntry *aParent); + nsresult SetParent(nsISHEntry aParent); + nsresult GetLoadType(PRUint32 *aLoadType); + nsresult SetLoadType(PRUint32 aLoadType); + nsresult GetID(PRUint32 *aID); + nsresult SetID(PRUint32 aID); + nsresult GetPageIdentifier(PRUint32 *aPageIdentifier); + nsresult SetPageIdentifier(PRUint32 aPageIdentifier); + nsresult GetCacheKey(nsISupports *aCacheKey); + nsresult SetCacheKey(nsISupports aCacheKey); + nsresult GetSaveLayoutStateFlag(PRBool *aSaveLayoutStateFlag); + nsresult SetSaveLayoutStateFlag(PRBool aSaveLayoutStateFlag); + nsresult GetExpirationStatus(PRBool *aExpirationStatus); + nsresult SetExpirationStatus(PRBool aExpirationStatus); + nsresult GetContentType(nsACString * aContentType); + nsresult SetContentType(nsACString * aContentType); + nsresult SetScrollPosition(PRInt32 x, PRInt32 y); + nsresult GetScrollPosition(PRInt32 *x, PRInt32 *y); + nsresult Create(nsIURI URI, nsAString * title, nsIInputStream inputStream, nsILayoutHistoryState layoutHistoryState, nsISupports cacheKey, nsACString * contentType); + nsresult Clone(nsISHEntry *_retval); + nsresult SetIsSubFrame(PRBool aFlag); + nsresult GetAnyContentViewer(nsISHEntry *ownerEntry, nsIContentViewer *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsISHistory.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsISHistory.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,35 @@ +module dwt.internal.mozilla.nsISHistory; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIHistoryEntry; +import dwt.internal.mozilla.nsISHistoryListener; +import dwt.internal.mozilla.nsISimpleEnumerator; + +const char[] NS_ISHISTORY_IID_STR = "7294fe9b-14d8-11d5-9882-00c04fa02f40"; + +const nsIID NS_ISHISTORY_IID= + {0x7294fe9b, 0x14d8, 0x11d5, + [ 0x98, 0x82, 0x00, 0xc0, 0x4f, 0xa0, 0x2f, 0x40 ]}; + +extern(System) + +interface nsISHistory : nsISupports { + + static const char[] IID_STR = NS_ISHISTORY_IID_STR; + static const nsIID IID = NS_ISHISTORY_IID; + + nsresult GetCount(PRInt32 *aCount); + nsresult GetIndex(PRInt32 *aIndex); + nsresult GetMaxLength(PRInt32 *aMaxLength); + nsresult SetMaxLength(PRInt32 aMaxLength); + nsresult GetEntryAtIndex(PRInt32 index, PRBool modifyIndex, nsIHistoryEntry *_retval); + nsresult PurgeHistory(PRInt32 numEntries); + nsresult AddSHistoryListener(nsISHistoryListener aListener); + nsresult RemoveSHistoryListener(nsISHistoryListener aListener); + nsresult GetSHistoryEnumerator(nsISimpleEnumerator *aSHistoryEnumerator); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsISHistoryListener.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsISHistoryListener.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,30 @@ +module dwt.internal.mozilla.nsISHistoryListener; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIURI; + +const char[] NS_ISHISTORYLISTENER_IID_STR = "3b07f591-e8e1-11d4-9882-00c04fa02f40"; + +const nsIID NS_ISHISTORYLISTENER_IID= + {0x3b07f591, 0xe8e1, 0x11d4, + [ 0x98, 0x82, 0x00, 0xc0, 0x4f, 0xa0, 0x2f, 0x40 ]}; + +extern(System) + +interface nsISHistoryListener : nsISupports { + + static const char[] IID_STR = NS_ISHISTORYLISTENER_IID_STR; + static const nsIID IID = NS_ISHISTORYLISTENER_IID; + + nsresult OnHistoryNewEntry(nsIURI aNewURI); + nsresult OnHistoryGoBack(nsIURI aBackURI, PRBool *_retval); + nsresult OnHistoryGoForward(nsIURI aForwardURI, PRBool *_retval); + nsresult OnHistoryReload(nsIURI aReloadURI, PRUint32 aReloadFlags, PRBool *_retval); + nsresult OnHistoryGotoIndex(PRInt32 aIndex, nsIURI aGotoURI, PRBool *_retval); + nsresult OnHistoryPurge(PRInt32 aNumEntries, PRBool *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsISecureBrowserUI.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsISecureBrowserUI.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,28 @@ +module dwt.internal.mozilla.nsISecureBrowserUI; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMWindow; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_ISECUREBROWSERUI_IID_STR = "081e31e0-a144-11d3-8c7c-00609792278c"; + +const nsIID NS_ISECUREBROWSERUI_IID= + {0x081e31e0, 0xa144, 0x11d3, + [ 0x8c, 0x7c, 0x00, 0x60, 0x97, 0x92, 0x27, 0x8c ]}; + +extern(System) + +interface nsISecureBrowserUI : nsISupports { + + static const char[] IID_STR = NS_ISECUREBROWSERUI_IID_STR; + static const nsIID IID = NS_ISECUREBROWSERUI_IID; + + nsresult Init(nsIDOMWindow window); + nsresult GetState(PRUint32 *aState); + nsresult GetTooltipText(nsAString * aTooltipText); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsISelection.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsISelection.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,44 @@ +module dwt.internal.mozilla.nsISelection; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMNode; +import dwt.internal.mozilla.nsIDOMRange; + +const char[] NS_ISELECTION_IID_STR = "b2c7ed59-8634-4352-9e37-5484c8b6e4e1"; + +const nsIID NS_ISELECTION_IID= + {0xb2c7ed59, 0x8634, 0x4352, + [ 0x9e, 0x37, 0x54, 0x84, 0xc8, 0xb6, 0xe4, 0xe1 ]}; + +extern(System) + +interface nsISelection : nsISupports { + + static const char[] IID_STR = NS_ISELECTION_IID_STR; + static const nsIID IID = NS_ISELECTION_IID; + + nsresult GetAnchorNode(nsIDOMNode *aAnchorNode); + nsresult GetAnchorOffset(PRInt32 *aAnchorOffset); + nsresult GetFocusNode(nsIDOMNode *aFocusNode); + nsresult GetFocusOffset(PRInt32 *aFocusOffset); + nsresult GetIsCollapsed(PRBool *aIsCollapsed); + nsresult GetRangeCount(PRInt32 *aRangeCount); + nsresult GetRangeAt(PRInt32 index, nsIDOMRange *_retval); + nsresult Collapse(nsIDOMNode parentNode, PRInt32 offset); + nsresult Extend(nsIDOMNode parentNode, PRInt32 offset); + nsresult CollapseToStart(); + nsresult CollapseToEnd(); + nsresult ContainsNode(nsIDOMNode node, PRBool entirelyContained, PRBool *_retval); + nsresult SelectAllChildren(nsIDOMNode parentNode); + nsresult AddRange(nsIDOMRange range); + nsresult RemoveRange(nsIDOMRange range); + nsresult RemoveAllRanges(); + nsresult DeleteFromDocument(); + nsresult SelectionLanguageChange(PRBool langRTL); + nsresult ToString(PRUnichar **_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsISerializable.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsISerializable.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,27 @@ +module dwt.internal.mozilla.nsISerializable; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIObjectInputStream; +import dwt.internal.mozilla.nsIObjectOutputStream; + +const char[] NS_ISERIALIZABLE_IID_STR = "91cca981-c26d-44a8-bebe-d9ed4891503a"; + +const nsIID NS_ISERIALIZABLE_IID= + {0x91cca981, 0xc26d, 0x44a8, + [ 0xbe, 0xbe, 0xd9, 0xed, 0x48, 0x91, 0x50, 0x3a ]}; + +extern(System) + +interface nsISerializable : nsISupports { + + static const char[] IID_STR = NS_ISERIALIZABLE_IID_STR; + static const nsIID IID = NS_ISERIALIZABLE_IID; + + nsresult Read(nsIObjectInputStream aInputStream); + nsresult Write(nsIObjectOutputStream aOutputStream); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIServiceManager.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIServiceManager.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,25 @@ +module dwt.internal.mozilla.nsIServiceManager; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_ISERVICEMANAGER_IID_STR = "8bb35ed9-e332-462d-9155-4a002ab5c958"; +const nsIID NS_ISERVICEMANAGER_IID= + {0x8bb35ed9, 0xe332, 0x462d, + [ 0x91, 0x55, 0x4a, 0x00, 0x2a, 0xb5, 0xc9, 0x58 ]}; + +extern(System) + +interface nsIServiceManager : nsISupports { + + static const char[] IID_STR = NS_ISERVICEMANAGER_IID_STR; + static const nsIID IID = NS_ISERVICEMANAGER_IID; + + nsresult GetService(nsCID * aClass, nsIID * aIID, void * *result); + nsresult GetServiceByContractID(char *aContractID, nsIID * aIID, void * *result); + nsresult IsServiceInstantiated(nsCID * aClass, nsIID * aIID, PRBool *_retval); + nsresult IsServiceInstantiatedByContractID(char *aContractID, nsIID * aIID, PRBool *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsISimpleEnumerator.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsISimpleEnumerator.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,24 @@ +module dwt.internal.mozilla.nsISimpleEnumerator; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_ISIMPLEENUMERATOR_IID_STR = "d1899240-f9d2-11d2-bdd6-000064657374"; + +const nsIID NS_ISIMPLEENUMERATOR_IID= + {0xd1899240, 0xf9d2, 0x11d2, + [ 0xbd, 0xd6, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 ]}; + +extern(System) + +interface nsISimpleEnumerator : nsISupports { + + static const char[] IID_STR = NS_ISIMPLEENUMERATOR_IID_STR; + static const nsIID IID = NS_ISIMPLEENUMERATOR_IID; + + nsresult HasMoreElements(PRBool *_retval); + nsresult GetNext(nsISupports *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIStreamListener.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIStreamListener.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,27 @@ +module dwt.internal.mozilla.nsIStreamListener; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIRequestObserver; +import dwt.internal.mozilla.nsIRequest; +import dwt.internal.mozilla.nsIInputStream; + +const char[] NS_ISTREAMLISTENER_IID_STR = "1a637020-1482-11d3-9333-00104ba0fd40"; + +const nsIID NS_ISTREAMLISTENER_IID= + {0x1a637020, 0x1482, 0x11d3, + [ 0x93, 0x33, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 ]}; + +extern(System) + +interface nsIStreamListener : nsIRequestObserver { + + static const char[] IID_STR = NS_ISTREAMLISTENER_IID_STR; + static const nsIID IID = NS_ISTREAMLISTENER_IID; + + nsresult OnDataAvailable(nsIRequest aRequest, nsISupports aContext, nsIInputStream aInputStream, PRUint32 aOffset, PRUint32 aCount); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIStringEnumerator.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIStringEnumerator.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,52 @@ +module dwt.internal.mozilla.nsIStringEnumerator; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsStringAPI; + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_ISTRINGENUMERATOR_IID_STR = "50d3ef6c-9380-4f06-9fb2-95488f7d141c"; + +const nsIID NS_ISTRINGENUMERATOR_IID= + {0x50d3ef6c, 0x9380, 0x4f06, + [ 0x9f, 0xb2, 0x95, 0x48, 0x8f, 0x7d, 0x14, 0x1c ]}; + +extern(System) + +interface nsIStringEnumerator : nsISupports { + + static const char[] IID_STR = NS_ISTRINGENUMERATOR_IID_STR; + static const nsIID IID = NS_ISTRINGENUMERATOR_IID; + + nsresult HasMore(PRBool *_retval); + nsresult GetNext(nsAString * _retval); + +} + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IUTF8STRINGENUMERATOR_IID_STR = "9bdf1010-3695-4907-95ed-83d0410ec307"; + +const nsIID NS_IUTF8STRINGENUMERATOR_IID= + {0x9bdf1010, 0x3695, 0x4907, + [ 0x95, 0xed, 0x83, 0xd0, 0x41, 0x0e, 0xc3, 0x07 ]}; + +extern(System) + +interface nsIUTF8StringEnumerator : nsISupports { + + static const char[] IID_STR = NS_IUTF8STRINGENUMERATOR_IID_STR; + static const nsIID IID = NS_IUTF8STRINGENUMERATOR_IID; + + nsresult HasMore(PRBool *_retval); + nsresult GetNext(nsACString * _retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsISupports.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsISupports.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,31 @@ +module dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +const char[] NS_ISUPPORTS_IID_STR = "00000000-0000-0000-c000-000000000046"; + +const nsIID NS_ISUPPORTS_IID= + { 0x00000000, 0x0000, 0x0000, + [ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 ] }; + +extern(System) + +interface IUnknown +{ + static const char[] IID_STR = NS_ISUPPORTS_IID_STR; + static const nsIID IID = NS_ISUPPORTS_IID; + + nsresult QueryInterface(ref nsIID uuid, void **result); + + nsrefcnt AddRef(); + nsrefcnt Release(); +} + +// WHY WE USE COM's IUnknown for XPCOM: +// +// The IUnknown interface is special-cased in D and is specifically designed to be +// compatible with MS COM. XPCOM's nsISupports interface is the exact equivalent +// of IUnknown so we alias it here to take advantage of D's COM support. -JJR + +alias IUnknown nsISupports; \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsISupports.d~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsISupports.d~ Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,31 @@ +module dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +const char[] NS_ISUPPORTS_IID_STR = "00000000-0000-0000-c000-000000000046"; + +const nsIID NS_ISUPPORTS_IID= + { 0x00000000, 0x0000, 0x0000, + [ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 ] }; + +extern(System) + +interface IUnknown +{ + static const char[] IID_STR = NS_ISUPPORTS_IID_STR; + static const nsIID IID = NS_ISUPPORTS_IID; + + nsresult QueryInterface(nsIID * uuid, void **result); + + nsrefcnt AddRef(); + nsrefcnt Release(); +} + +// WHY WE USE COM's IUnknown for XPCOM: +// +// The IUnknown interface is special-cased in D and is specifically designed to be +// compatible with MS COM. XPCOM's nsISupports interface is the exact equivalent +// of IUnknown so we alias it here to take advantage of D's COM support. -JJR + +alias IUnknown nsISupports; \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsISupportsArray.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsISupportsArray.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,49 @@ +module dwt.internal.mozilla.nsISupportsArray; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsICollection; + +typedef PRBool function(nsISupports, void*) nsISupportsArrayEnumFunc; + +const char[] NS_ISUPPORTSARRAY_IID_STR = "791eafa0-b9e6-11d1-8031-006008159b5a"; + +const nsIID NS_ISUPPORTSARRAY_IID= + {0x791eafa0, 0xb9e6, 0x11d1, + [ 0x80, 0x31, 0x00, 0x60, 0x08, 0x15, 0x9b, 0x5a ]}; + +extern(System) + +interface nsISupportsArray : nsICollection { + + static const char[] IID_STR = NS_ISUPPORTSARRAY_IID_STR; + static const nsIID IID = NS_ISUPPORTSARRAY_IID; + + PRBool Equals(nsISupportsArray other); + nsISupports ElementAt(PRUint32 aIndex); + PRInt32 IndexOf(nsISupports aPossibleElement); + PRInt32 IndexOfStartingAt(nsISupports aPossibleElement, PRUint32 aStartIndex); + PRInt32 LastIndexOf(nsISupports aPossibleElement); + nsresult GetIndexOf(nsISupports aPossibleElement, PRInt32 *_retval); + nsresult GetIndexOfStartingAt(nsISupports aPossibleElement, PRUint32 aStartIndex, PRInt32 *_retval); + nsresult GetLastIndexOf(nsISupports aPossibleElement, PRInt32 *_retval); + PRBool InsertElementAt(nsISupports aElement, PRUint32 aIndex); + PRBool ReplaceElementAt(nsISupports aElement, PRUint32 aIndex); + PRBool RemoveElementAt(PRUint32 aIndex); + PRBool RemoveLastElement(nsISupports aElement); + nsresult DeleteLastElement(nsISupports aElement); + nsresult DeleteElementAt(PRUint32 aIndex); + PRBool AppendElements(nsISupportsArray aElements); + nsresult Compact(); + PRBool EnumerateForwards(nsISupportsArrayEnumFunc aFunc, void * aData); + PRBool EnumerateBackwards(nsISupportsArrayEnumFunc aFunc, void * aData); + nsresult Clone(nsISupportsArray *_retval); + PRBool MoveElement(PRInt32 aFrom, PRInt32 aTo); + PRBool InsertElementsAt(nsISupportsArray aOther, PRUint32 aIndex); + PRBool RemoveElementsAt(PRUint32 aIndex, PRUint32 aCount); + PRBool SizeTo(PRInt32 aSize); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsITooltipListener.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsITooltipListener.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,24 @@ +module dwt.internal.mozilla.nsITooltipListener; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_ITOOLTIPLISTENER_IID_STR = "44b78386-1dd2-11b2-9ad2-e4eee2ca1916"; + +const nsIID NS_ITOOLTIPLISTENER_IID= + {0x44b78386, 0x1dd2, 0x11b2, + [ 0x9a, 0xd2, 0xe4, 0xee, 0xe2, 0xca, 0x19, 0x16 ]}; + +extern(System) + +interface nsITooltipListener : nsISupports { + + static const char[] IID_STR = NS_ITOOLTIPLISTENER_IID_STR; + static const nsIID IID = NS_ITOOLTIPLISTENER_IID; + + nsresult OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, PRUnichar *aTipText); + nsresult OnHideTooltip(); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsITraceRefcnt.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsITraceRefcnt.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,25 @@ +module dwt.internal.mozilla.nsITraceRefcnt; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_ITRACEREFCNT_IID_STR = "273dc92f-0fe6-4545-96a9-21be77828039"; + +const nsIID NS_ITRACEREFCNT_IID= + {0x273dc92f, 0x0fe6, 0x4545, + [ 0x96, 0xa9, 0x21, 0xbe, 0x77, 0x82, 0x80, 0x39 ]}; + +extern(System) +interface nsITraceRefcnt : nsISupports { + static const char[] IID_STR = NS_ITRACEREFCNT_IID_STR; + static const nsIID IID = NS_ITRACEREFCNT_IID; + + nsresult LogAddRef(void * aPtr, nsrefcnt aNewRefcnt, char *aTypeName, PRUint32 aInstanceSize); + nsresult LogRelease(void * aPtr, nsrefcnt aNewRefcnt, char *aTypeName); + nsresult LogCtor(void * aPtr, char *aTypeName, PRUint32 aInstanceSize); + nsresult LogDtor(void * aPtr, char *aTypeName, PRUint32 aInstanceSize); + nsresult LogAddCOMPtr(void * aPtr, nsISupports aObject); + nsresult LogReleaseCOMPtr(void * aPtr, nsISupports aObject); +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsITransfer.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsITransfer.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,32 @@ +module dwt.internal.mozilla.nsITransfer; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.prtime; + +import dwt.internal.mozilla.nsIWebProgressListener2; +import dwt.internal.mozilla.nsIURI; +import dwt.internal.mozilla.nsICancelable; +import dwt.internal.mozilla.nsIMIMEInfo; +import dwt.internal.mozilla.nsILocalFile; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_ITRANSFER_IID_STR = "23c51569-e9a1-4a92-adeb-3723db82ef7c"; + +const nsIID NS_ITRANSFER_IID= + {0x23c51569, 0xe9a1, 0x4a92, + [ 0xad, 0xeb, 0x37, 0x23, 0xdb, 0x82, 0xef, 0x7c ]}; + +extern(System) + +interface nsITransfer : nsIWebProgressListener2 { + + static const char[] IID_STR = NS_ITRANSFER_IID_STR; + static const nsIID IID = NS_ITRANSFER_IID; + + nsresult Init(nsIURI aSource, nsIURI aTarget, nsAString * aDisplayName, nsIMIMEInfo aMIMEInfo, PRTime startTime, nsILocalFile aTempFile, nsICancelable aCancelable); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIURI.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIURI.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,49 @@ +module dwt.internal.mozilla.nsIURI; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IURI_IID_STR = "07a22cc0-0ce5-11d3-9331-00104ba0fd40"; + +const nsIID NS_IURI_IID= + {0x07a22cc0, 0x0ce5, 0x11d3, + [ 0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 ]}; + +extern(System) + +interface nsIURI : nsISupports { + + static const char[] IID_STR = NS_IURI_IID_STR; + static const nsIID IID = NS_IURI_IID; + + nsresult GetSpec(nsACString * aSpec); + nsresult SetSpec(nsACString * aSpec); + nsresult GetPrePath(nsACString * aPrePath); + nsresult GetScheme(nsACString * aScheme); + nsresult SetScheme(nsACString * aScheme); + nsresult GetUserPass(nsACString * aUserPass); + nsresult SetUserPass(nsACString * aUserPass); + nsresult GetUsername(nsACString * aUsername); + nsresult SetUsername(nsACString * aUsername); + nsresult GetPassword(nsACString * aPassword); + nsresult SetPassword(nsACString * aPassword); + nsresult GetHostPort(nsACString * aHostPort); + nsresult SetHostPort(nsACString * aHostPort); + nsresult GetHost(nsACString * aHost); + nsresult SetHost(nsACString * aHost); + nsresult GetPort(PRInt32 *aPort); + nsresult SetPort(PRInt32 aPort); + nsresult GetPath(nsACString * aPath); + nsresult SetPath(nsACString * aPath); + nsresult Equals(nsIURI other, PRBool *_retval); + nsresult SchemeIs(char *scheme, PRBool *_retval); + nsresult Clone(nsIURI *_retval); + nsresult Resolve(nsACString * relativePath, nsACString * _retval); + nsresult GetAsciiSpec(nsACString * aAsciiSpec); + nsresult GetAsciiHost(nsACString * aAsciiHost); + nsresult GetOriginCharset(nsACString * aOriginCharset); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIURIContentListener.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIURIContentListener.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,34 @@ +module dwt.internal.mozilla.nsIURIContentListener; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIRequest; +import dwt.internal.mozilla.nsIStreamListener; +import dwt.internal.mozilla.nsIURI; + +const char[] NS_IURICONTENTLISTENER_IID_STR = "94928ab3-8b63-11d3-989d-001083010e9b"; + +const nsIID NS_IURICONTENTLISTENER_IID= + {0x94928ab3, 0x8b63, 0x11d3, + [ 0x98, 0x9d, 0x00, 0x10, 0x83, 0x01, 0x0e, 0x9b ]}; + +extern(System) + +interface nsIURIContentListener : nsISupports { + + static const char[] IID_STR = NS_IURICONTENTLISTENER_IID_STR; + static const nsIID IID = NS_IURICONTENTLISTENER_IID; + + nsresult OnStartURIOpen(nsIURI aURI, PRBool *_retval); + nsresult DoContent(char *aContentType, PRBool aIsContentPreferred, nsIRequest aRequest, nsIStreamListener *aContentHandler, PRBool *_retval); + nsresult IsPreferred(char *aContentType, char **aDesiredContentType, PRBool *_retval); + nsresult CanHandleContent(char *aContentType, PRBool aIsContentPreferred, char **aDesiredContentType, PRBool *_retval); + nsresult GetLoadCookie(nsISupports *aLoadCookie); + nsresult SetLoadCookie(nsISupports aLoadCookie); + nsresult GetParentContentListener(nsIURIContentListener *aParentContentListener); + nsresult SetParentContentListener(nsIURIContentListener aParentContentListener); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIURL.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIURL.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,41 @@ +module dwt.internal.mozilla.nsIURL; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsIURI; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IURL_IID_STR = "d6116970-8034-11d3-9399-00104ba0fd40"; + +const nsIID NS_IURL_IID= + {0xd6116970, 0x8034, 0x11d3, + [ 0x93, 0x99, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 ]}; + +extern(System) + +interface nsIURL : nsIURI { + + static const char[] IID_STR = NS_IURL_IID_STR; + static const nsIID IID = NS_IURL_IID; + + nsresult GetFilePath(nsACString * aFilePath); + nsresult SetFilePath(nsACString * aFilePath); + nsresult GetParam(nsACString * aParam); + nsresult SetParam(nsACString * aParam); + nsresult GetQuery(nsACString * aQuery); + nsresult SetQuery(nsACString * aQuery); + nsresult GetRef(nsACString * aRef); + nsresult SetRef(nsACString * aRef); + nsresult GetDirectory(nsACString * aDirectory); + nsresult SetDirectory(nsACString * aDirectory); + nsresult GetFileName(nsACString * aFileName); + nsresult SetFileName(nsACString * aFileName); + nsresult GetFileBaseName(nsACString * aFileBaseName); + nsresult SetFileBaseName(nsACString * aFileBaseName); + nsresult GetFileExtension(nsACString * aFileExtension); + nsresult SetFileExtension(nsACString * aFileExtension); + nsresult GetCommonBaseSpec(nsIURI aURIToCompare, nsACString * _retval); + nsresult GetRelativeSpec(nsIURI aURIToCompare, nsACString * _retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIWeakReference.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIWeakReference.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,48 @@ +module dwt.internal.mozilla.nsIWeakReference; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_IWEAKREFERENCE_IID_STR = "9188bc85-f92e-11d2-81ef-0060083a0bcf"; + +const nsIID NS_IWEAKREFERENCE_IID= + {0x9188bc85, 0xf92e, 0x11d2, + [ 0x81, 0xef, 0x00, 0x60, 0x08, 0x3a, 0x0b, 0xcf ]}; + +extern(System) + +interface nsIWeakReference : nsISupports { + + static const char[] IID_STR = NS_IWEAKREFERENCE_IID_STR; + static const nsIID IID = NS_IWEAKREFERENCE_IID; + + nsresult QueryReferent(nsIID * uuid, void * *result); + +} + +/****************************************************************************** + +******************************************************************************/ + +const char[] NS_ISUPPORTSWEAKREFERENCE_IID_STR = "9188bc86-f92e-11d2-81ef-0060083a0bcf"; + +const nsIID NS_ISUPPORTSWEAKREFERENCE_IID= + {0x9188bc86, 0xf92e, 0x11d2, + [ 0x81, 0xef, 0x00, 0x60, 0x08, 0x3a, 0x0b, 0xcf ]}; + +extern(System) + +interface nsISupportsWeakReference : nsISupports { + + static const char[] IID_STR = NS_ISUPPORTSWEAKREFERENCE_IID_STR; + static const nsIID IID = NS_ISUPPORTSWEAKREFERENCE_IID; + + nsresult GetWeakReference(nsIWeakReference *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIWebBrowser.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIWebBrowser.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,34 @@ +module dwt.internal.mozilla.nsIWebBrowser; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIWebBrowserChrome; +import dwt.internal.mozilla.nsIURIContentListener; +import dwt.internal.mozilla.nsIDOMWindow; +import dwt.internal.mozilla.nsIWeakReference; + +const char[] NS_IWEBBROWSER_IID_STR = "69e5df00-7b8b-11d3-af61-00a024ffc08c"; + +const nsIID NS_IWEBBROWSER_IID= + {0x69e5df00, 0x7b8b, 0x11d3, + [ 0xaf, 0x61, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; + +extern(System) + +interface nsIWebBrowser : nsISupports { + + static const char[] IID_STR = NS_IWEBBROWSER_IID_STR; + static const nsIID IID = NS_IWEBBROWSER_IID; + + nsresult AddWebBrowserListener(nsIWeakReference aListener, nsIID * aIID); + nsresult RemoveWebBrowserListener(nsIWeakReference aListener, nsIID * aIID); + nsresult GetContainerWindow(nsIWebBrowserChrome *aContainerWindow); + nsresult SetContainerWindow(nsIWebBrowserChrome aContainerWindow); + nsresult GetParentURIContentListener(nsIURIContentListener *aParentURIContentListener); + nsresult SetParentURIContentListener(nsIURIContentListener aParentURIContentListener); + nsresult GetContentDOMWindow(nsIDOMWindow *aContentDOMWindow); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIWebBrowserChrome.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIWebBrowserChrome.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,64 @@ +module dwt.internal.mozilla.nsIWebBrowserChrome; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIWebBrowser; + +const char[] NS_IWEBBROWSERCHROME_IID_STR = "ba434c60-9d52-11d3-afb0-00a024ffc08c"; + +const nsIID NS_IWEBBROWSERCHROME_IID= + {0xba434c60, 0x9d52, 0x11d3, + [ 0xaf, 0xb0, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; + +extern(System) + +interface nsIWebBrowserChrome : nsISupports { + + static const char[] IID_STR = NS_IWEBBROWSERCHROME_IID_STR; + static const nsIID IID = NS_IWEBBROWSERCHROME_IID; + + enum { STATUS_SCRIPT = 1U }; + enum { STATUS_SCRIPT_DEFAULT = 2U }; + enum { STATUS_LINK = 3U }; + + nsresult SetStatus(PRUint32 statusType, PRUnichar *status); + nsresult GetWebBrowser(nsIWebBrowser *aWebBrowser); + nsresult SetWebBrowser(nsIWebBrowser aWebBrowser); + + enum { CHROME_DEFAULT = 1U }; + enum { CHROME_WINDOW_BORDERS = 2U }; + enum { CHROME_WINDOW_CLOSE = 4U }; + enum { CHROME_WINDOW_RESIZE = 8U }; + enum { CHROME_MENUBAR = 16U }; + enum { CHROME_TOOLBAR = 32U }; + enum { CHROME_LOCATIONBAR = 64U }; + enum { CHROME_STATUSBAR = 128U }; + enum { CHROME_PERSONAL_TOOLBAR = 256U }; + enum { CHROME_SCROLLBARS = 512U }; + enum { CHROME_TITLEBAR = 1024U }; + enum { CHROME_EXTRA = 2048U }; + enum { CHROME_WITH_SIZE = 4096U }; + enum { CHROME_WITH_POSITION = 8192U }; + enum { CHROME_WINDOW_MIN = 16384U }; + enum { CHROME_WINDOW_POPUP = 32768U }; + enum { CHROME_WINDOW_RAISED = 33554432U }; + enum { CHROME_WINDOW_LOWERED = 67108864U }; + enum { CHROME_CENTER_SCREEN = 134217728U }; + enum { CHROME_DEPENDENT = 268435456U }; + enum { CHROME_MODAL = 536870912U }; + enum { CHROME_OPENAS_DIALOG = 1073741824U }; + enum { CHROME_OPENAS_CHROME = 2147483648U }; + enum { CHROME_ALL = 4094U }; + + nsresult GetChromeFlags(PRUint32 *aChromeFlags); + nsresult SetChromeFlags(PRUint32 aChromeFlags); + nsresult DestroyBrowserWindow(); + nsresult SizeBrowserTo(PRInt32 aCX, PRInt32 aCY); + nsresult ShowAsModal(); + nsresult IsWindowModal(PRBool *_retval); + nsresult ExitModalEventLoop(nsresult aStatus); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIWebBrowserChromeFocus.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIWebBrowserChromeFocus.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,24 @@ +module dwt.internal.mozilla.nsIWebBrowserChromeFocus; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +const char[] NS_IWEBBROWSERCHROMEFOCUS_IID_STR = "d2206418-1dd1-11b2-8e55-acddcd2bcfb8"; + +const nsIID NS_IWEBBROWSERCHROMEFOCUS_IID= + {0xd2206418, 0x1dd1, 0x11b2, + [ 0x8e, 0x55, 0xac, 0xdd, 0xcd, 0x2b, 0xcf, 0xb8 ]}; + +extern(System) + +interface nsIWebBrowserChromeFocus : nsISupports { + + static const char[] IID_STR = NS_IWEBBROWSERCHROMEFOCUS_IID_STR; + static const nsIID IID = NS_IWEBBROWSERCHROMEFOCUS_IID; + + nsresult FocusNextElement(); + nsresult FocusPrevElement(); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIWebBrowserFocus.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIWebBrowserFocus.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,32 @@ +module dwt.internal.mozilla.nsIWebBrowserFocus; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIDOMWindow; +import dwt.internal.mozilla.nsIDOMElement; + +const char[] NS_IWEBBROWSERFOCUS_IID_STR = "9c5d3c58-1dd1-11b2-a1c9-f3699284657a"; + +const nsIID NS_IWEBBROWSERFOCUS_IID= + {0x9c5d3c58, 0x1dd1, 0x11b2, + [ 0xa1, 0xc9, 0xf3, 0x69, 0x92, 0x84, 0x65, 0x7a ]}; + +extern(System) + +interface nsIWebBrowserFocus : nsISupports { + + static const char[] IID_STR = NS_IWEBBROWSERFOCUS_IID_STR; + static const nsIID IID = NS_IWEBBROWSERFOCUS_IID; + + nsresult Activate(); + nsresult Deactivate(); + nsresult SetFocusAtFirstElement(); + nsresult SetFocusAtLastElement(); + nsresult GetFocusedWindow(nsIDOMWindow *aFocusedWindow); + nsresult SetFocusedWindow(nsIDOMWindow aFocusedWindow); + nsresult GetFocusedElement(nsIDOMElement *aFocusedElement); + nsresult SetFocusedElement(nsIDOMElement aFocusedElement); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIWebNavigation.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIWebNavigation.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,60 @@ +module dwt.internal.mozilla.nsIWebNavigation; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMDocument; +import dwt.internal.mozilla.nsIInputStream; +import dwt.internal.mozilla.nsISHistory; +import dwt.internal.mozilla.nsIURI; + +const char[] NS_IWEBNAVIGATION_IID_STR = "f5d9e7b0-d930-11d3-b057-00a024ffc08c"; + +const nsIID NS_IWEBNAVIGATION_IID= + {0xf5d9e7b0, 0xd930, 0x11d3, + [ 0xb0, 0x57, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; + +extern(System) + +interface nsIWebNavigation : nsISupports { + + static const char[] IID_STR = NS_IWEBNAVIGATION_IID_STR; + static const nsIID IID = NS_IWEBNAVIGATION_IID; + + nsresult GetCanGoBack(PRBool *aCanGoBack); + nsresult GetCanGoForward(PRBool *aCanGoForward); + nsresult GoBack(); + nsresult GoForward(); + nsresult GotoIndex(PRInt32 index); + + enum { LOAD_FLAGS_MASK = 65535U }; + enum { LOAD_FLAGS_NONE = 0U }; + enum { LOAD_FLAGS_IS_REFRESH = 16U }; + enum { LOAD_FLAGS_IS_LINK = 32U }; + enum { LOAD_FLAGS_BYPASS_HISTORY = 64U }; + enum { LOAD_FLAGS_REPLACE_HISTORY = 128U }; + enum { LOAD_FLAGS_BYPASS_CACHE = 256U }; + enum { LOAD_FLAGS_BYPASS_PROXY = 512U }; + enum { LOAD_FLAGS_CHARSET_CHANGE = 1024U }; + enum { LOAD_FLAGS_STOP_CONTENT = 2048U }; + enum { LOAD_FLAGS_FROM_EXTERNAL = 4096U }; + enum { LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 8192U }; + enum { LOAD_FLAGS_FIRST_LOAD = 16384U }; + + nsresult LoadURI(PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI aReferrer, nsIInputStream aPostData, nsIInputStream aHeaders); + nsresult Reload(PRUint32 aReloadFlags); + + enum { STOP_NETWORK = 1U }; + enum { STOP_CONTENT = 2U }; + enum { STOP_ALL = 3U }; + + nsresult Stop(PRUint32 aStopFlags); + nsresult GetDocument(nsIDOMDocument *aDocument); + nsresult GetCurrentURI(nsIURI *aCurrentURI); + nsresult GetReferringURI(nsIURI *aReferringURI); + nsresult GetSessionHistory(nsISHistory *aSessionHistory); + nsresult SetSessionHistory(nsISHistory aSessionHistory); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIWebNavigationInfo.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIWebNavigationInfo.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,30 @@ +module dwt.internal.mozilla.nsIWebNavigationInfo; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; +import dwt.internal.mozilla.nsIWebNavigation; +import dwt.internal.mozilla.nsStringAPI; + +const char[] NS_IWEBNAVIGATIONINFO_IID_STR = "62a93afb-93a1-465c-84c8-0432264229de"; + +const nsIID NS_IWEBNAVIGATIONINFO_IID= + {0x62a93afb, 0x93a1, 0x465c, + [ 0x84, 0xc8, 0x04, 0x32, 0x26, 0x42, 0x29, 0xde ]}; + +extern(System) + +interface nsIWebNavigationInfo : nsISupports { + + static const char[] IID_STR = NS_IWEBNAVIGATIONINFO_IID_STR; + static const nsIID IID = NS_IWEBNAVIGATIONINFO_IID; + + enum { UNSUPPORTED = 0U }; + enum { IMAGE = 1U }; + enum { PLUGIN = 2U }; + enum { OTHER = 32768U }; + + nsresult IsTypeSupported(nsACString * aType, nsIWebNavigation aWebNav, PRUint32 *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIWebProgress.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIWebProgress.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,40 @@ +module dwt.internal.mozilla.nsIWebProgress; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMWindow; +import dwt.internal.mozilla.nsIWebProgressListener; + +const char[] NS_IWEBPROGRESS_IID_STR = "570f39d0-efd0-11d3-b093-00a024ffc08c"; + +const nsIID NS_IWEBPROGRESS_IID= + {0x570f39d0, 0xefd0, 0x11d3, + [ 0xb0, 0x93, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; + +extern(System) + +interface nsIWebProgress : nsISupports { + + static const char[] IID_STR = NS_IWEBPROGRESS_IID_STR; + static const nsIID IID = NS_IWEBPROGRESS_IID; + + enum { NOTIFY_STATE_REQUEST = 1U }; + enum { NOTIFY_STATE_DOCUMENT = 2U }; + enum { NOTIFY_STATE_NETWORK = 4U }; + enum { NOTIFY_STATE_WINDOW = 8U }; + enum { NOTIFY_STATE_ALL = 15U }; + enum { NOTIFY_PROGRESS = 16U }; + enum { NOTIFY_STATUS = 32U }; + enum { NOTIFY_SECURITY = 64U }; + enum { NOTIFY_LOCATION = 128U }; + enum { NOTIFY_ALL = 255U }; + + nsresult AddProgressListener(nsIWebProgressListener aListener, PRUint32 aNotifyMask); + nsresult RemoveProgressListener(nsIWebProgressListener aListener); + nsresult GetDOMWindow(nsIDOMWindow *aDOMWindow); + nsresult GetIsLoadingDocument(PRBool *aIsLoadingDocument); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIWebProgressListener.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIWebProgressListener.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,48 @@ +module dwt.internal.mozilla.nsIWebProgressListener; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIWebProgress; +import dwt.internal.mozilla.nsIRequest; +import dwt.internal.mozilla.nsIURI; + +const char[] NS_IWEBPROGRESSLISTENER_IID_STR = "570f39d1-efd0-11d3-b093-00a024ffc08c"; + +const nsIID NS_IWEBPROGRESSLISTENER_IID= + {0x570f39d1, 0xefd0, 0x11d3, + [ 0xb0, 0x93, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; + +extern(System) + +interface nsIWebProgressListener : nsISupports { + + static const char[] IID_STR = NS_IWEBPROGRESSLISTENER_IID_STR; + static const nsIID IID = NS_IWEBPROGRESSLISTENER_IID; + + enum { STATE_START = 1U }; + enum { STATE_REDIRECTING = 2U }; + enum { STATE_TRANSFERRING = 4U }; + enum { STATE_NEGOTIATING = 8U }; + enum { STATE_STOP = 16U }; + enum { STATE_IS_REQUEST = 65536U }; + enum { STATE_IS_DOCUMENT = 131072U }; + enum { STATE_IS_NETWORK = 262144U }; + enum { STATE_IS_WINDOW = 524288U }; + enum { STATE_RESTORING = 16777216U }; + enum { STATE_IS_INSECURE = 4U }; + enum { STATE_IS_BROKEN = 1U }; + enum { STATE_IS_SECURE = 2U }; + enum { STATE_SECURE_HIGH = 262144U }; + enum { STATE_SECURE_MED = 65536U }; + enum { STATE_SECURE_LOW = 131072U }; + + nsresult OnStateChange(nsIWebProgress aWebProgress, nsIRequest aRequest, PRUint32 aStateFlags, nsresult aStatus); + nsresult OnProgressChange(nsIWebProgress aWebProgress, nsIRequest aRequest, PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress, PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress); + nsresult OnLocationChange(nsIWebProgress aWebProgress, nsIRequest aRequest, nsIURI aLocation); + nsresult OnStatusChange(nsIWebProgress aWebProgress, nsIRequest aRequest, nsresult aStatus, PRUnichar *aMessage); + nsresult OnSecurityChange(nsIWebProgress aWebProgress, nsIRequest aRequest, PRUint32 aState); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIWebProgressListener2.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIWebProgressListener2.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,26 @@ +module dwt.internal.mozilla.nsIWebProgressListener2; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +import dwt.internal.mozilla.nsIWebProgressListener; +import dwt.internal.mozilla.nsIWebProgress; +import dwt.internal.mozilla.nsIRequest; + +const char[] NS_IWEBPROGRESSLISTENER2_IID_STR = "3f24610d-1e1f-4151-9d2e-239884742324"; + +const nsIID NS_IWEBPROGRESSLISTENER2_IID= + {0x3f24610d, 0x1e1f, 0x4151, + [ 0x9d, 0x2e, 0x23, 0x98, 0x84, 0x74, 0x23, 0x24 ]}; + +extern(System) + +interface nsIWebProgressListener2 : nsIWebProgressListener { + + static const char[] IID_STR = NS_IWEBPROGRESSLISTENER2_IID_STR; + static const nsIID IID = NS_IWEBPROGRESSLISTENER2_IID; + + nsresult OnProgressChange64(nsIWebProgress aWebProgress, nsIRequest aRequest, PRInt64 aCurSelfProgress, PRInt64 aMaxSelfProgress, PRInt64 aCurTotalProgress, PRInt64 aMaxTotalProgress); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIWindowCreator.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIWindowCreator.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,25 @@ +module dwt.internal.mozilla.nsIWindowCreator; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIWebBrowserChrome; + +const char[] NS_IWINDOWCREATOR_IID_STR = "30465632-a777-44cc-90f9-8145475ef999"; + +const nsIID NS_IWINDOWCREATOR_IID= + {0x30465632, 0xa777, 0x44cc, + [ 0x90, 0xf9, 0x81, 0x45, 0x47, 0x5e, 0xf9, 0x99 ]}; + +extern(System) + +interface nsIWindowCreator : nsISupports { + + static const char[] IID_STR = NS_IWINDOWCREATOR_IID_STR; + static const nsIID IID = NS_IWINDOWCREATOR_IID; + + nsresult CreateChromeWindow(nsIWebBrowserChrome parent, PRUint32 chromeFlags, nsIWebBrowserChrome *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIWindowCreator2.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIWindowCreator2.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,27 @@ +module dwt.internal.mozilla.nsIWindowCreator2; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; + +import dwt.internal.mozilla.nsIWindowCreator; +import dwt.internal.mozilla.nsIURI; +import dwt.internal.mozilla.nsIWebBrowserChrome; + +const char[] NS_IWINDOWCREATOR2_IID_STR = "f673ec81-a4b0-11d6-964b-eb5a2bf216fc"; + +const nsIID NS_IWINDOWCREATOR2_IID= + {0xf673ec81, 0xa4b0, 0x11d6, + [ 0x96, 0x4b, 0xeb, 0x5a, 0x2b, 0xf2, 0x16, 0xfc ]}; + +extern(System) + +interface nsIWindowCreator2 : nsIWindowCreator { + + static const char[] IID_STR = NS_IWINDOWCREATOR2_IID_STR; + static const nsIID IID = NS_IWINDOWCREATOR2_IID; + + enum { PARENT_IS_LOADING_OR_RUNNING_TIMEOUT = 1U }; + nsresult CreateChromeWindow2(nsIWebBrowserChrome parent, PRUint32 chromeFlags, PRUint32 contextFlags, nsIURI uri, PRBool *cancel, nsIWebBrowserChrome *_retval); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsIWindowWatcher.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsIWindowWatcher.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,41 @@ +module dwt.internal.mozilla.nsIWindowWatcher; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsID; +import dwt.internal.mozilla.nsISupports; + +import dwt.internal.mozilla.nsIDOMWindow; +import dwt.internal.mozilla.nsIObserver; +import dwt.internal.mozilla.nsIPrompt; +import dwt.internal.mozilla.nsIAuthPrompt; +import dwt.internal.mozilla.nsISimpleEnumerator; +import dwt.internal.mozilla.nsIWebBrowserChrome; +import dwt.internal.mozilla.nsIWindowCreator; + +const char[] NS_IWINDOWWATCHER_IID_STR = "002286a8-494b-43b3-8ddd-49e3fc50622b"; + +const nsIID NS_IWINDOWWATCHER_IID= + {0x002286a8, 0x494b, 0x43b3, + [ 0x8d, 0xdd, 0x49, 0xe3, 0xfc, 0x50, 0x62, 0x2b ]}; + +extern(System) + +interface nsIWindowWatcher : nsISupports { + + static const char[] IID_STR = NS_IWINDOWWATCHER_IID_STR; + static const nsIID IID = NS_IWINDOWWATCHER_IID; + + nsresult OpenWindow(nsIDOMWindow aParent, char *aUrl, char *aName, char *aFeatures, nsISupports aArguments, nsIDOMWindow *_retval); + nsresult RegisterNotification(nsIObserver aObserver); + nsresult UnregisterNotification(nsIObserver aObserver); + nsresult GetWindowEnumerator(nsISimpleEnumerator *_retval); + nsresult GetNewPrompter(nsIDOMWindow aParent, nsIPrompt *_retval); + nsresult GetNewAuthPrompter(nsIDOMWindow aParent, nsIAuthPrompt *_retval); + nsresult SetWindowCreator(nsIWindowCreator creator); + nsresult GetChromeForWindow(nsIDOMWindow aWindow, nsIWebBrowserChrome *_retval); + nsresult GetWindowByName(PRUnichar *aTargetName, nsIDOMWindow aCurrentWindow, nsIDOMWindow *_retval); + nsresult GetActiveWindow(nsIDOMWindow *aActiveWindow); + nsresult SetActiveWindow(nsIDOMWindow aActiveWindow); + +} + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsStringAPI.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsStringAPI.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,187 @@ +module dwt.internal.mozilla.nsStringAPI; + +import dwt.internal.mozilla.Common; + +extern (System): + +/****************************************************************************** + +******************************************************************************/ + +enum +{ + NS_STRING_CONTAINER_INIT_DEPEND = 2, + NS_STRING_CONTAINER_INIT_ADOPT = 4, + NS_STRING_CONTAINER_INIT_SUBSTRING = 8, +} + +nsresult NS_StringContainerInit ( nsStringContainer *aContainer ); +nsresult NS_StringContainerInit2( nsStringContainer *aContainer, PRUnichar *aData, PRUint32 aDataLength, PRUint32 aFlags ); +void NS_StringContainerFinish(nsStringContainer *aContainer); +PRUint32 NS_StringGetData(nsAString *aStr, PRUnichar **aData, PRBool *aTerminated); +PRUint32 NS_StringGetMutableData(nsAString *aStr, PRUint32 aDataLength, PRUnichar **aData); +PRUnichar * NS_StringCloneData(nsAString *aStr); +nsresult NS_StringSetData(nsAString *aStr, PRUnichar *aData, PRUint32 aDataLength); +nsresult NS_StringSetDataRange( nsAString *aStr, PRUint32 aCutOffset, PRUint32 aCutLength, PRUnichar *aData, PRUint32 aDataLength ); +nsresult NS_StringCopy(nsAString *aDestStr, nsAString *aSrcStr); + +/****************************************************************************** + +******************************************************************************/ + +enum +{ + NS_CSTRING_CONTAINER_INIT_DEPEND = 2, + NS_CSTRING_CONTAINER_INIT_ADOPT = 4, + NS_CSTRING_CONTAINER_INIT_SUBSTRING = 8, +} + +nsresult NS_CStringContainerInit( nsCStringContainer *aContainer ); +nsresult NS_CStringContainerInit2( nsCStringContainer *aContainer, char *aData, PRUint32 aDataLength, PRUint32 aFlags ); +void NS_CStringContainerFinish( nsCStringContainer *aContainer ); +PRUint32 NS_CStringGetData( nsACString *aStr, char **aData, PRBool *aTerminated ); +PRUint32 NS_CStringGetMutableData( nsACString *aStr, PRUint32 aDataLength, char **aData ); +char * NS_CStringCloneData( nsACString *aStr); +nsresult NS_CStringSetData( nsACString *aStr, char *aData, PRUint32 aDataLength ); +nsresult NS_CStringSetDataRange( nsACString *aStr, PRUint32 aCutOffset, + PRUint32 aCutLength, char *aData, PRUint32 aDataLength ); +nsresult NS_CStringCopy( nsACString *aDestStr, nsACString *aSrcStr ); + +/****************************************************************************** + +******************************************************************************/ + +enum nsCStringEncoding +{ + NS_CSTRING_ENCODING_ASCII, + NS_CSTRING_ENCODING_UTF8, + NS_CSTRING_ENCODING_NATIVE_FILESYSTEM, +} + +nsresult NS_CStringToUTF16( nsACString *aSource, int aSrcEncoding, nsAString *aDest ); +nsresult NS_UTF16ToCString( nsAString *aSource, int aDestEncoding, nsACString *aDest ); + +/****************************************************************************** + +******************************************************************************/ + +alias nsAString nsAString_external; +alias nsACString nsACString_external; + +alias nsAString nsEmbedString; +alias nsACString nsEmbedCString; + +struct nsAString +{ + static nsAString opCall(wchar[] s) + { + nsAString result; + NS_StringSetData(&result, cast(PRUnichar*)s, uint.max); + return result; + } + + private: + void *v; +} + +struct nsACString +{ + static nsACString opCall(char[] s) + { + nsACString result; + NS_CStringSetData(&result, cast(char*)s, uint.max); + return result; + } + + private: + void *v; +} + +/****************************************************************************** + +******************************************************************************/ + +struct nsStringContainer// : public nsAString +{ +private: + void* v; + void* d1; + uint d2; + void* d3; +} + +struct nsCStringContainer// : public nsACString +{ +private: + void* v; + void* d1; + uint d2; + void* d3; +} + +/****************************************************************************** + +******************************************************************************/ + +// import mozilla.xpcom.nsDebug; + +alias nsString_external nsString; +alias nsCString_external nsCString; +alias nsDependentString_external nsDependentString; +alias nsDependentCString_external nsDependentCString; +alias NS_ConvertASCIItoUTF16_external NS_ConvertASCIItoUTF16; +alias NS_ConvertUTF8toUTF16_external NS_ConvertUTF8toUTF16; +alias NS_ConvertUTF16toUTF8_external NS_ConvertUTF16toUTF8; +alias NS_LossyConvertUTF16toASCII_external NS_LossyConvertUTF16toASCII; +alias nsGetterCopies_external nsGetterCopies; +alias nsCGetterCopies_external nsCGetterCopies; +alias nsDependentSubstring_external nsDependentSubstring; +alias nsDependentCSubstring_external nsDependentCSubstring; + +struct nsString_external{} +struct nsCString_external{} +struct nsDependentString_external{} +struct nsDependentCString_external{} +struct NS_ConvertASCIItoUTF16_external{} +struct NS_ConvertUTF8toUTF16_external{} +struct NS_ConvertUTF16toUTF8_external{} +struct NS_LossyConvertUTF16toASCII_external{} + +/****************************************************************************** + +******************************************************************************/ + +struct nsGetterCopies_external +{ + private: + alias PRUnichar char_type; + nsString_external *mString; + char_type *mData; +} + +struct nsCGetterCopies_external +{ + private: + alias char char_type; + nsCString_external *mString; + char_type *mData; +} + +/****************************************************************************** + +******************************************************************************/ + +struct nsDependentSubstring_external{} +struct nsDependentCSubstring_external{} + +/****************************************************************************** + +******************************************************************************/ + +PRUint32 strlen_PRUnichar ( PRUnichar* str ) +{ + PRUint32 len = 0; + if (str !is null) + while (*(lparg0++) != 0) len++; + ret len; +} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsStringAPI.d~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsStringAPI.d~ Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,187 @@ +module dwt.internal.mozilla.nsStringAPI; + +import dwt.internal.mozilla.Common; + +extern (System): + +/****************************************************************************** + +******************************************************************************/ + +enum +{ + NS_STRING_CONTAINER_INIT_DEPEND = 2, + NS_STRING_CONTAINER_INIT_ADOPT = 4, + NS_STRING_CONTAINER_INIT_SUBSTRING = 8, +} + +nsresult NS_StringContainerInit ( nsStringContainer *aContainer ); +nsresult NS_StringContainerInit2( nsStringContainer *aContainer, PRUnichar *aData, PRUint32 aDataLength, PRUint32 aFlags ); +void NS_StringContainerFinish(nsStringContainer *aContainer); +PRUint32 NS_StringGetData(nsAString *aStr, PRUnichar **aData, PRBool *aTerminated); +PRUint32 NS_StringGetMutableData(nsAString *aStr, PRUint32 aDataLength, PRUnichar **aData); +PRUnichar * NS_StringCloneData(nsAString *aStr); +nsresult NS_StringSetData(nsAString *aStr, PRUnichar *aData, PRUint32 aDataLength); +nsresult NS_StringSetDataRange( nsAString *aStr, PRUint32 aCutOffset, PRUint32 aCutLength, PRUnichar *aData, PRUint32 aDataLength ); +nsresult NS_StringCopy(nsAString *aDestStr, nsAString *aSrcStr); + +/****************************************************************************** + +******************************************************************************/ + +enum +{ + NS_CSTRING_CONTAINER_INIT_DEPEND = 2, + NS_CSTRING_CONTAINER_INIT_ADOPT = 4, + NS_CSTRING_CONTAINER_INIT_SUBSTRING = 8, +} + +nsresult NS_CStringContainerInit( nsCStringContainer *aContainer ); +nsresult NS_CStringContainerInit2( nsCStringContainer *aContainer, char *aData, PRUint32 aDataLength, PRUint32 aFlags ); +void NS_CStringContainerFinish( nsCStringContainer *aContainer ); +PRUint32 NS_CStringGetData( nsACString *aStr, char **aData, PRBool *aTerminated ); +PRUint32 NS_CStringGetMutableData( nsACString *aStr, PRUint32 aDataLength, char **aData ); +char * NS_CStringCloneData( nsACString *aStr); +nsresult NS_CStringSetData( nsACString *aStr, char *aData, PRUint32 aDataLength ); +nsresult NS_CStringSetDataRange( nsACString *aStr, PRUint32 aCutOffset, + PRUint32 aCutLength, char *aData, PRUint32 aDataLength ); +nsresult NS_CStringCopy( nsACString *aDestStr, nsACString *aSrcStr ); + +/****************************************************************************** + +******************************************************************************/ + +enum nsCStringEncoding +{ + NS_CSTRING_ENCODING_ASCII, + NS_CSTRING_ENCODING_UTF8, + NS_CSTRING_ENCODING_NATIVE_FILESYSTEM, +} + +nsresult NS_CStringToUTF16( nsACString *aSource, int aSrcEncoding, nsAString *aDest ); +nsresult NS_UTF16ToCString( nsAString *aSource, int aDestEncoding, nsACString *aDest ); + +/****************************************************************************** + +******************************************************************************/ + +alias nsAString nsAString_external; +alias nsACString nsACString_external; + +alias nsAString nsEmbedString; +alias nsACString nsEmbedCString; + +struct nsAString +{ + static nsAString opCall(wchar[] s) + { + nsAString result; + NS_StringSetData(&result, cast(PRUnichar*)s, uint.max); + return result; + } + + private: + void *v; +} + +struct nsACString +{ + static nsACString opCall(char[] s) + { + nsACString result; + NS_CStringSetData(&result, cast(char*)s, uint.max); + return result; + } + + private: + void *v; +} + +/****************************************************************************** + +******************************************************************************/ + +struct nsStringContainer// : public nsAString +{ +private: + void* v; + void* d1; + uint d2; + void* d3; +} + +struct nsCStringContainer// : public nsACString +{ +private: + void* v; + void* d1; + uint d2; + void* d3; +} + +/****************************************************************************** + +******************************************************************************/ + +// import mozilla.xpcom.nsDebug; + +alias nsString_external nsString; +alias nsCString_external nsCString; +alias nsDependentString_external nsDependentString; +alias nsDependentCString_external nsDependentCString; +alias NS_ConvertASCIItoUTF16_external NS_ConvertASCIItoUTF16; +alias NS_ConvertUTF8toUTF16_external NS_ConvertUTF8toUTF16; +alias NS_ConvertUTF16toUTF8_external NS_ConvertUTF16toUTF8; +alias NS_LossyConvertUTF16toASCII_external NS_LossyConvertUTF16toASCII; +alias nsGetterCopies_external nsGetterCopies; +alias nsCGetterCopies_external nsCGetterCopies; +alias nsDependentSubstring_external nsDependentSubstring; +alias nsDependentCSubstring_external nsDependentCSubstring; + +struct nsString_external{} +struct nsCString_external{} +struct nsDependentString_external{} +struct nsDependentCString_external{} +struct NS_ConvertASCIItoUTF16_external{} +struct NS_ConvertUTF8toUTF16_external{} +struct NS_ConvertUTF16toUTF8_external{} +struct NS_LossyConvertUTF16toASCII_external{} + +/****************************************************************************** + +******************************************************************************/ + +struct nsGetterCopies_external +{ + private: + alias PRUnichar char_type; + nsString_external *mString; + char_type *mData; +} + +struct nsCGetterCopies_external +{ + private: + alias char char_type; + nsCString_external *mString; + char_type *mData; +} + +/****************************************************************************** + +******************************************************************************/ + +struct nsDependentSubstring_external{} +struct nsDependentCSubstring_external{} + +/****************************************************************************** + +******************************************************************************/ + +PRUint32 strlen_PRUnichar ( PRUnichar* str ) +{ + PRUint32 len = 0; + if (str !is null) + while (*lparg0++ != 0) len++; + ret len; +} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsXPCOM.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsXPCOM.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,53 @@ + +module dwt.internal.mozilla.nsXPCOM; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsStringAPI; +import dwt.internal.mozilla.nsIModule; +import dwt.internal.mozilla.nsIComponentManager; +import dwt.internal.mozilla.nsIComponentRegistrar; +import dwt.internal.mozilla.nsIServiceManager; +import dwt.internal.mozilla.nsIFile; +import dwt.internal.mozilla.nsILocalFile; +import dwt.internal.mozilla.nsIDirectoryService; +import dwt.internal.mozilla.nsIMemory; +import dwt.internal.mozilla.nsIDebug; +import dwt.internal.mozilla.nsITraceRefcnt; + +/****************************************************************************** + +******************************************************************************/ + +extern (System): + +struct nsStaticModuleInfo +{ + char *name; + nsGetModuleProc getModule; +} + +alias nsresult function (nsIComponentManager, nsIFile, nsIModule*) nsGetModuleProc; + +/****************************************************************************** + +******************************************************************************/ + +nsresult NS_InitXPCOM2( nsIServiceManager *result, nsIFile binDirectory, + nsIDirectoryServiceProvider appFileLocationProvider ); +nsresult NS_InitXPCOM3( nsIServiceManager *result, nsIFile binDirectory, + nsIDirectoryServiceProvider appFileLocationProvider, + nsStaticModuleInfo* staticComponents, + PRUint32 componentCount ); + +nsresult NS_ShutdownXPCOM(nsIServiceManager servMgr); +nsresult NS_GetServiceManager(nsIServiceManager *result); +nsresult NS_GetComponentManager(nsIComponentManager *result); +nsresult NS_GetComponentRegistrar(nsIComponentRegistrar *result); +nsresult NS_GetMemoryManager(nsIMemory *result); +nsresult NS_NewLocalFile(inout nsAString path, PRBool followLinks, nsILocalFile** result); +nsresult NS_NewNativeLocalFile(inout nsACString path, PRBool followLinks, nsILocalFile** result); +void * NS_Alloc(PRSize size); +void * NS_Realloc(void *ptr, PRSize size); +void NS_Free(void *ptr); +nsresult NS_GetDebug(nsIDebug **result); +nsresult NS_GetTraceRefcnt(nsITraceRefcnt *result); diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsXPCOM.d~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsXPCOM.d~ Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,54 @@ +/****************************************************************************** + +module dwt.internal.mozilla.nsXPCOM; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.nsStringAPI; +import dwt.internal.mozilla.nsIModule; +import dwt.internal.mozilla.nsIComponentManager; +import dwt.internal.mozilla.nsIComponentRegistrar; +import dwt.internal.mozilla.nsIServiceManager; +import dwt.internal.mozilla.nsIFile; +import dwt.internal.mozilla.nsILocalFile; +import dwt.internal.mozilla.nsIDirectoryService; +import dwt.internal.mozilla.nsIMemory; +import dwt.internal.mozilla.nsIDebug; +import dwt.internal.mozilla.nsITraceRefcnt; + +/****************************************************************************** + +******************************************************************************/ + +extern (System): + +struct nsStaticModuleInfo +{ + char *name; + nsGetModuleProc getModule; +} + +alias nsresult function (nsIComponentManager, nsIFile, nsIModule*) nsGetModuleProc; + +/****************************************************************************** + +******************************************************************************/ + +nsresult NS_InitXPCOM2( nsIServiceManager *result, nsIFile binDirectory, + nsIDirectoryServiceProvider appFileLocationProvider ); +nsresult NS_InitXPCOM3( nsIServiceManager *result, nsIFile binDirectory, + nsIDirectoryServiceProvider appFileLocationProvider, + nsStaticModuleInfo* staticComponents, + PRUint32 componentCount ); + +nsresult NS_ShutdownXPCOM(nsIServiceManager servMgr); +nsresult NS_GetServiceManager(nsIServiceManager *result); +nsresult NS_GetComponentManager(nsIComponentManager *result); +nsresult NS_GetComponentRegistrar(nsIComponentRegistrar *result); +nsresult NS_GetMemoryManager(nsIMemory *result); +nsresult NS_NewLocalFile(inout nsAString path, PRBool followLinks, nsILocalFile** result); +nsresult NS_NewNativeLocalFile(inout nsACString path, PRBool followLinks, nsILocalFile** result); +void * NS_Alloc(PRSize size); +void * NS_Realloc(void *ptr, PRSize size); +void NS_Free(void *ptr); +nsresult NS_GetDebug(nsIDebug **result); +nsresult NS_GetTraceRefcnt(nsITraceRefcnt *result); diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/nsXPCOMGlue.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/nsXPCOMGlue.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,37 @@ +module dwt.internal.mozilla.nsXPCOMGlue; + +extern(C): + +align(4): + +struct GREVersionRange { + char *lower; + int lowerInclusive; + char *upper; + int upperInclusive; +} + +struct GREProperty { + char *property; + char *value; +} + +uint GRE_GetGREPathWithProperties(GREVersionRange *versions, + int versionsLength, + GREProperty *properties, + uint propertiesLength, + char *buffer, uint buflen); + +uint XPCOMGlueStartup(char* xpcomFile); + +alias void function() NSFuncPtr; + +struct nsDynamicFunctionLoad +{ + char *functionName; + NSFuncPtr *func; +} + +uint XPCOMGlueLoadXULFunctions(nsDynamicFunctionLoad *symbols); +uint XPCOMGlueShutdown(); + diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/prinrval.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/prinrval.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,60 @@ +module dwt.internal.mozilla.prinrval; + +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is the Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +import dwt.internal.mozilla.Common; + +extern (System): + +alias PRUint32 PRIntervalTime; + +const PR_INTERVAL_MIN = 1000U; +const PR_INTERVAL_MAX = 100000U; +const PR_INTERVAL_NO_WAIT = 0U; +const PR_INTERVAL_NO_TIMEOUT = 0xffffffffU; + +version(NON_XPCOM_GLUE) +{ + PRIntervalTime PR_IntervalNow(); + PRUint32 PR_TicksPerSecond(); + PRIntervalTime PR_SecondsToInterval(PRUint32 seconds); + PRIntervalTime PR_MillisecondsToInterval(PRUint32 milli); + PRIntervalTime PR_MicrosecondsToInterval(PRUint32 micro); + PRUint32 PR_IntervalToSeconds(PRIntervalTime ticks); + PRUint32 PR_IntervalToMilliseconds(PRIntervalTime ticks); + PRUint32 PR_IntervalToMicroseconds(PRIntervalTime ticks); +} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/prio.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/prio.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,517 @@ +module dwt.internal.mozilla.prio; + +import dwt.internal.mozilla.Common; +import dwt.internal.mozilla.prtime; +import dwt.internal.mozilla.prinrval; + +extern (System): + +alias PRIntn PRDescIdentity; +alias void PRFilePrivate; + +struct PRFileDesc +{ + PRIOMethods *methods; + PRFilePrivate *secret; + PRFileDesc *lower; + PRFileDesc *higher; + void function(PRFileDesc *fd)dtor; + PRDescIdentity identity; +} + +enum PRTransmitFileFlags +{ + PR_TRANSMITFILE_KEEP_OPEN, + PR_TRANSMITFILE_CLOSE_SOCKET, +} + +const PR_AF_INET = 2; +const PR_AF_LOCAL = 1; +const PR_INADDR_LOOPBACK = 0x7f000001; +const PR_AF_UNSPEC = 0; + +union _N2 +{ + PRUint8 [16]_S6_u8; + PRUint16 [8]_S6_u16; + PRUint32 [4]_S6_u32; + PRUint64 [2]_S6_u64; +} + +struct PRIPv6Addr +{ + struct _N2{ + union + { + PRUint8 [16]_S6_u8; + PRUint16 [8]_S6_u16; + PRUint32 [4]_S6_u32; + PRUint64 [2]_S6_u64; + } + } + _N2 _S6_un; +} + +struct _N3 +{ + PRUint16 family; + char [14]data; +} + +struct _N4 +{ + PRUint16 family; + PRUint16 port; + PRUint32 ip; + char [8]pad; +} + +struct _N5 +{ + PRUint16 family; + PRUint16 port; + PRUint32 flowinfo; + PRIPv6Addr ip; + PRUint32 scope_id; +} + +union PRNetAddr +{ + struct _N3 + { + PRUint16 family; + char [14]data; + } + _N3 raw; + struct _N4 + { + PRUint16 family; + PRUint16 port; + PRUint32 ip; + char [8]pad; + } + _N4 inet; + struct _N5 + { + PRUint16 family; + PRUint16 port; + PRUint32 flowinfo; + PRIPv6Addr ip; + PRUint32 scope_id; + } + _N5 ipv6; +} + +enum PRSockOption +{ + PR_SockOpt_Nonblocking, + PR_SockOpt_Linger, + PR_SockOpt_Reuseaddr, + PR_SockOpt_Keepalive, + PR_SockOpt_RecvBufferSize, + PR_SockOpt_SendBufferSize, + PR_SockOpt_IpTimeToLive, + PR_SockOpt_IpTypeOfService, + PR_SockOpt_AddMember, + PR_SockOpt_DropMember, + PR_SockOpt_McastInterface, + PR_SockOpt_McastTimeToLive, + PR_SockOpt_McastLoopback, + PR_SockOpt_NoDelay, + PR_SockOpt_MaxSegment, + PR_SockOpt_Broadcast, + PR_SockOpt_Last, +} + +struct PRLinger +{ + PRBool polarity; + PRIntervalTime linger; +} + +struct PRMcastRequest +{ + PRNetAddr mcaddr; + PRNetAddr ifaddr; +} + +union _N6 +{ + PRUintn ip_ttl; + PRUintn mcast_ttl; + PRUintn tos; + PRBool non_blocking; + PRBool reuse_addr; + PRBool keep_alive; + PRBool mcast_loopback; + PRBool no_delay; + PRBool broadcast; + PRSize max_segment; + PRSize recv_buffer_size; + PRSize send_buffer_size; + PRLinger linger; + PRMcastRequest add_member; + PRMcastRequest drop_member; + PRNetAddr mcast_if; +} + +struct PRSocketOptionData +{ + int option; + union _N6 + { + PRUintn ip_ttl; + PRUintn mcast_ttl; + PRUintn tos; + PRBool non_blocking; + PRBool reuse_addr; + PRBool keep_alive; + PRBool mcast_loopback; + PRBool no_delay; + PRBool broadcast; + PRSize max_segment; + PRSize recv_buffer_size; + PRSize send_buffer_size; + PRLinger linger; + PRMcastRequest add_member; + PRMcastRequest drop_member; + PRNetAddr mcast_if; + } + _N6 value; +} + +struct PRIOVec +{ + char *iov_base; + int iov_len; +} + +enum PRDescType +{ + PR_DESC_FILE = 1, + PR_DESC_SOCKET_TCP, + PR_DESC_SOCKET_UDP, + PR_DESC_LAYERED, + PR_DESC_PIPE, +} + +enum PRSeekWhence +{ + PR_SEEK_SET, + PR_SEEK_CUR, + PR_SEEK_END, +} + +version(NON_XPCOM_GLUE){ + int PR_GetDescType(PRFileDesc *file); +} + +alias PRStatus function(PRFileDesc *fd)PRCloseFN; +alias PRInt32 function(PRFileDesc *fd, void *buf, PRInt32 amount)PRReadFN; +alias PRInt32 function(PRFileDesc *fd, void *buf, PRInt32 amount)PRWriteFN; +alias PRInt32 function(PRFileDesc *fd)PRAvailableFN; +alias PRInt64 function(PRFileDesc *fd)PRAvailable64FN; +alias PRStatus function(PRFileDesc *fd)PRFsyncFN; +alias PROffset32 function(PRFileDesc *fd, PROffset32 offset, int how)PRSeekFN; +alias PROffset64 function(PRFileDesc *fd, PROffset64 offset, int how)PRSeek64FN; +alias PRStatus function(PRFileDesc *fd, PRFileInfo *info)PRFileInfoFN; +alias PRStatus function(PRFileDesc *fd, PRFileInfo64 *info)PRFileInfo64FN; +alias PRInt32 function(PRFileDesc *fd, PRIOVec *iov, PRInt32 iov_size, PRIntervalTime timeout)PRWritevFN; +alias PRStatus function(PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout)PRConnectFN; +alias PRFileDesc * function(PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout)PRAcceptFN; +alias PRStatus function(PRFileDesc *fd, PRNetAddr *addr)PRBindFN; +alias PRStatus function(PRFileDesc *fd, PRIntn backlog)PRListenFN; +alias PRStatus function(PRFileDesc *fd, PRIntn how)PRShutdownFN; +alias PRInt32 function(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout)PRRecvFN; +alias PRInt32 function(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout)PRSendFN; +alias PRInt32 function(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout)PRRecvfromFN; +alias PRInt32 function(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout)PRSendtoFN; +alias PRInt16 function(PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags)PRPollFN; +alias PRInt32 function(PRFileDesc *sd, PRFileDesc **nd, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime t)PRAcceptreadFN; +alias PRInt32 function(PRFileDesc *sd, PRFileDesc *fd, void *headers, PRInt32 hlen, int flags, PRIntervalTime t)PRTransmitfileFN; +alias PRStatus function(PRFileDesc *fd, PRNetAddr *addr)PRGetsocknameFN; +alias PRStatus function(PRFileDesc *fd, PRNetAddr *addr)PRGetpeernameFN; +alias PRStatus function(PRFileDesc *fd, PRSocketOptionData *data)PRGetsocketoptionFN; +alias PRStatus function(PRFileDesc *fd, PRSocketOptionData *data)PRSetsocketoptionFN; +alias PRInt32 function(PRFileDesc *networkSocket, PRSendFileData *sendData, int flags, PRIntervalTime timeout)PRSendfileFN; +alias PRStatus function(PRFileDesc *fd, PRInt16 out_flags)PRConnectcontinueFN; +alias PRIntn function(PRFileDesc *fd)PRReservedFN; + +struct PRIOMethods +{ + int file_type; + PRCloseFN close; + PRReadFN read; + PRWriteFN write; + PRAvailableFN available; + PRAvailable64FN available64; + PRFsyncFN fsync; + PRSeekFN seek; + PRSeek64FN seek64; + PRFileInfoFN fileInfo; + PRFileInfo64FN fileInfo64; + PRWritevFN writev; + PRConnectFN connect; + PRAcceptFN accept; + PRBindFN bind; + PRListenFN listen; + PRShutdownFN shutdown; + PRRecvFN recv; + PRSendFN send; + PRRecvfromFN recvfrom; + PRSendtoFN sendto; + PRPollFN poll; + PRAcceptreadFN acceptread; + PRTransmitfileFN transmitfile; + PRGetsocknameFN getsockname; + PRGetpeernameFN getpeername; + PRReservedFN reserved_fn_6; + PRReservedFN reserved_fn_5; + PRGetsocketoptionFN getsocketoption; + PRSetsocketoptionFN setsocketoption; + PRSendfileFN sendfile; + PRConnectcontinueFN connectcontinue; + PRReservedFN reserved_fn_3; + PRReservedFN reserved_fn_2; + PRReservedFN reserved_fn_1; + PRReservedFN reserved_fn_0; +} + +enum PRSpecialFD +{ + PR_StandardInput, + PR_StandardOutput, + PR_StandardError, +} + +version(NON_XPCOM_GLUE) +{ + PRFileDesc * PR_GetSpecialFD(int id); + PRDescIdentity PR_GetUniqueIdentity(char *layer_name); + char * PR_GetNameForIdentity(PRDescIdentity ident); + PRDescIdentity PR_GetLayersIdentity(PRFileDesc *fd); + PRFileDesc * PR_GetIdentitiesLayer(PRFileDesc *fd_stack, PRDescIdentity id); + PRIOMethods * PR_GetDefaultIOMethods(); + PRFileDesc * PR_CreateIOLayerStub(PRDescIdentity ident, PRIOMethods *methods); + PRFileDesc * PR_CreateIOLayer(PRFileDesc *fd); + PRStatus PR_PushIOLayer(PRFileDesc *fd_stack, PRDescIdentity id, PRFileDesc *layer); + PRFileDesc * PR_PopIOLayer(PRFileDesc *fd_stack, PRDescIdentity id); +} + +const PR_RDONLY = 0x01; +const PR_WRONLY = 0x02; +const PR_RDWR = 0x04; +const PR_CREATE_FILE = 0x08; +const PR_APPEND = 0x10; +const PR_TRUNCATE = 0x20; +const PR_SYNC = 0x40; +const PR_EXCL = 0x80; + +version(NON_XPCOM_GLUE) { + PRFileDesc * PR_Open(char *name, PRIntn flags, PRIntn mode); +} + +const PR_IRWXU = 00700; +const PR_IRUSR = 00400; +const PR_IWUSR = 00200; +const PR_IXUSR = 00100; +const PR_IRWXG = 00070; +const PR_IRGRP = 00040; +const PR_IWGRP = 00020; +const PR_IXGRP = 00010; +const PR_IRWXO = 00007; +const PR_IROTH = 00004; +const PR_IWOTH = 00002; +const PR_IXOTH = 00001; + +version(NON_XPCOM_GLUE) +{ + PRFileDesc * PR_OpenFile(char *name, PRIntn flags, PRIntn mode); + PRStatus PR_Close(PRFileDesc *fd); + PRInt32 PR_Read(PRFileDesc *fd, void *buf, PRInt32 amount); + PRInt32 PR_Write(PRFileDesc *fd, void *buf, PRInt32 amount); +} + +const PR_MAX_IOVECTOR_SIZE = 16; + +version(NON_XPCOM_GLUE) +{ + PRInt32 PR_Writev(PRFileDesc *fd, PRIOVec *iov, PRInt32 iov_size, PRIntervalTime timeout); + PRStatus PR_Delete(char *name); +} + +enum PRFileType +{ + PR_FILE_FILE = 1, + PR_FILE_DIRECTORY, + PR_FILE_OTHER, +} + +struct PRFileInfo +{ + int type; + PROffset32 size; + PRTime creationTime; + PRTime modifyTime; +} + +struct PRFileInfo64 +{ + int type; + PROffset64 size; + PRTime creationTime; + PRTime modifyTime; +} + +version (NON_XPCOM_GLUE) +{ + PRStatus PR_GetFileInfo(char *fn, PRFileInfo *info); + PRStatus PR_GetFileInfo64(char *fn, PRFileInfo64 *info); + PRStatus PR_GetOpenFileInfo(PRFileDesc *fd, PRFileInfo *info); + PRStatus PR_GetOpenFileInfo64(PRFileDesc *fd, PRFileInfo64 *info); + PRStatus PR_Rename(char *from, char *to); +} + +enum PRAccessHow +{ + PR_ACCESS_EXISTS = 1, + PR_ACCESS_WRITE_OK, + PR_ACCESS_READ_OK, +} + +version(NON_XPCOM_GLUE) +{ + PRStatus PR_Access(char *name, int how); + PROffset32 PR_Seek(PRFileDesc *fd, PROffset32 offset, int whence); + PROffset64 PR_Seek64(PRFileDesc *fd, PROffset64 offset, int whence); + PRInt32 PR_Available(PRFileDesc *fd); + PRInt64 PR_Available64(PRFileDesc *fd); + PRStatus PR_Sync(PRFileDesc *fd); +} + +struct PRDirEntry +{ + char *name; +} + +alias void PRDir; + +version(NON_XPCOM_GLUE) { + PRDir * PR_OpenDir(char *name); +} + +enum PRDirFlags +{ + PR_SKIP_NONE, + PR_SKIP_DOT, + PR_SKIP_DOT_DOT, + PR_SKIP_BOTH, + PR_SKIP_HIDDEN, +} + +version(NON_XPCOM_GLUE) +{ + PRDirEntry * PR_ReadDir(PRDir *dir, int flags); + PRStatus PR_CloseDir(PRDir *dir); + PRStatus PR_MkDir(char *name, PRIntn mode); + PRStatus PR_MakeDir(char *name, PRIntn mode); + PRStatus PR_RmDir(char *name); + PRFileDesc * PR_NewUDPSocket(); + PRFileDesc * PR_NewTCPSocket(); + PRFileDesc * PR_OpenUDPSocket(PRIntn af); + PRFileDesc * PR_OpenTCPSocket(PRIntn af); + PRStatus PR_Connect(PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout); + PRStatus PR_ConnectContinue(PRFileDesc *fd, PRInt16 out_flags); + PRStatus PR_GetConnectStatus(PRPollDesc *pd); + PRFileDesc * PR_Accept(PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout); + PRStatus PR_Bind(PRFileDesc *fd, PRNetAddr *addr); + PRStatus PR_Listen(PRFileDesc *fd, PRIntn backlog); +} + +enum PRShutdownHow +{ + PR_SHUTDOWN_RCV, + PR_SHUTDOWN_SEND, + PR_SHUTDOWN_BOTH, +} + +version(NON_XPCOM_GLUE) { + PRStatus PR_Shutdown(PRFileDesc *fd, int how); +} + +const PR_MSG_PEEK = 0x2; + +version(NON_XPCOM_GLUE) +{ + PRInt32 PR_Recv(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout); + PRInt32 PR_Send(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout); + PRInt32 PR_RecvFrom(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout); + PRInt32 PR_SendTo(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout); + PRInt32 PR_TransmitFile(PRFileDesc *networkSocket, PRFileDesc *sourceFile, void *headers, PRInt32 hlen, int flags, PRIntervalTime timeout); +} + +struct PRSendFileData +{ + PRFileDesc *fd; + PRUint32 file_offset; + PRSize file_nbytes; + void *header; + PRInt32 hlen; + void *trailer; + PRInt32 tlen; +} + +version(NON_XPCOM_GLUE) +{ + PRInt32 PR_SendFile(PRFileDesc *networkSocket, PRSendFileData *sendData, int flags, PRIntervalTime timeout); + PRInt32 PR_AcceptRead(PRFileDesc *listenSock, PRFileDesc **acceptedSock, PRNetAddr **peerAddr, void *buf, PRInt32 amount, PRIntervalTime timeout); + PRStatus PR_NewTCPSocketPair(PRFileDesc **fds); + PRStatus PR_GetSockName(PRFileDesc *fd, PRNetAddr *addr); + PRStatus PR_GetPeerName(PRFileDesc *fd, PRNetAddr *addr); + PRStatus PR_GetSocketOption(PRFileDesc *fd, PRSocketOptionData *data); + PRStatus PR_SetSocketOption(PRFileDesc *fd, PRSocketOptionData *data); + PRStatus PR_SetFDInheritable(PRFileDesc *fd, PRBool inheritable); + PRFileDesc * PR_GetInheritedFD(char *name); +} + +enum PRFileMapProtect +{ + PR_PROT_READONLY, + PR_PROT_READWRITE, + PR_PROT_WRITECOPY, +} + +alias void PRFileMap; + +version(NON_XPCOM_GLUE) +{ + PRFileMap * PR_CreateFileMap(PRFileDesc *fd, PRInt64 size, int prot); + PRInt32 PR_GetMemMapAlignment(); + void * PR_MemMap(PRFileMap *fmap, PROffset64 offset, PRUint32 len); + PRStatus PR_MemUnmap(void *addr, PRUint32 len); + PRStatus PR_CloseFileMap(PRFileMap *fmap); + PRStatus PR_CreatePipe(PRFileDesc **readPipe, PRFileDesc **writePipe); +} + +struct PRPollDesc +{ + PRFileDesc *fd; + PRInt16 in_flags; + PRInt16 out_flags; +} + +const PR_POLL_READ = 0x1; +const PR_POLL_WRITE = 0x2; +const PR_POLL_EXCEPT = 0x4; +const PR_POLL_ERR = 0x8; +const PR_POLL_NVAL = 0x10; +const PR_POLL_HUP = 0x20; + +version(NON_XPCOM_GLUE) +{ + PRInt32 PR_Poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout); + PRFileDesc * PR_NewPollableEvent(); + PRStatus PR_DestroyPollableEvent(PRFileDesc *event); + PRStatus PR_SetPollableEvent(PRFileDesc *event); + PRStatus PR_WaitForPollableEvent(PRFileDesc *event); +} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/prlink.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/prlink.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,134 @@ +module dwt.internal.mozilla.prlink; +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is the Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +import dwt.internal.mozilla.Common; + +struct PRStaticLinkTable +{ + char *name; + void function()fp; +} + +extern (System): + +PRStatus PR_SetLibraryPath(char *path); + +char * PR_GetLibraryPath(); +char * PR_GetLibraryName(char *dir, char *lib); +void PR_FreeLibraryName(char *mem); + +alias void PRLibrary; + +PRLibrary * PR_LoadLibrary(char *name); + +enum PRLibSpecType +{ + PR_LibSpec_Pathname, + PR_LibSpec_MacNamedFragment, + PR_LibSpec_MacIndexedFragment, +} + +alias void FSSpec; + +struct _N3 +{ + FSSpec *fsspec; + char *name; +} + +struct _N4 +{ + FSSpec *fsspec; + PRUint32 index; +} + +union _N2 +{ + char *pathname; + struct _N3 + { + FSSpec *fsspec; + char *name; + } + _N3 mac_named_fragment; + struct _N4 + { + FSSpec *fsspec; + PRUint32 index; + } + _N4 mac_indexed_fragment; +} + +struct PRLibSpec +{ + int type; + union _N2 + { + char *pathname; + struct _N3 + { + FSSpec *fsspec; + char *name; + } + _N3 mac_named_fragment; + struct _N4 + { + FSSpec *fsspec; + PRUint32 index; + } + _N4 mac_indexed_fragment; + } + _N2 value; +} + +const PR_LD_LAZY = 0x1; +const PR_LD_NOW = 0x2; +const PR_LD_GLOBAL = 0x4; +const PR_LD_LOCAL = 0x8; + +PRLibrary * PR_LoadLibraryWithFlags(PRLibSpec libSpec, PRIntn flags); +PRStatus PR_UnloadLibrary(PRLibrary *lib); +void * PR_FindSymbol(PRLibrary *lib, char *name); + +alias void function()PRFuncPtr; + +PRFuncPtr PR_FindFunctionSymbol(PRLibrary *lib, char *name); +void * PR_FindSymbolAndLibrary(char *name, PRLibrary **lib); +PRFuncPtr PR_FindFunctionSymbolAndLibrary(char *name, PRLibrary **lib); +PRLibrary * PR_LoadStaticLibrary(char *name, PRStaticLinkTable *table); +char * PR_GetLibraryFilePathname(char *name, PRFuncPtr addr); diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla.old/prtime.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/mozilla.old/prtime.d Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,87 @@ +module dwt.internal.mozilla.prtime; + +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is the Netscape Portable Runtime (NSPR). + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998-2000 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +import dwt.internal.mozilla.Common; + +const PR_MSEC_PER_SEC = 1000U; +const PR_USEC_PER_SEC = 1000000U; +const PR_NSEC_PER_SEC = 1000000000U; +const PR_USEC_PER_MSEC = 1000U; +const PR_NSEC_PER_MSEC = 1000000U; + +extern (System): + +alias PRInt64 PRTime; + +struct PRTimeParameters +{ + PRInt32 tp_gmt_offset; + PRInt32 tp_dst_offset; +} + +struct PRExplodedTime +{ + PRInt32 tm_usec; + PRInt32 tm_sec; + PRInt32 tm_min; + PRInt32 tm_hour; + PRInt32 tm_mday; + PRInt32 tm_month; + PRInt16 tm_year; + PRInt8 tm_wday; + PRInt16 tm_yday; + PRTimeParameters tm_params; +} + +alias PRTimeParameters function(PRExplodedTime *gmt)PRTimeParamFn; + +version(NON_XPCOM_GLUE) +{ + PRTime PR_Now(); + void PR_ExplodeTime(PRTime usecs, PRTimeParamFn params, PRExplodedTime *exploded); + PRTime PR_ImplodeTime(PRExplodedTime *exploded); + void PR_NormalizeTime(PRExplodedTime *exploded, PRTimeParamFn params); + + PRTimeParameters PR_LocalTimeParameters(PRExplodedTime *gmt); + PRTimeParameters PR_GMTParameters(PRExplodedTime *gmt); + PRTimeParameters PR_USPacificTimeParameters(PRExplodedTime *gmt); + + PRStatus PR_ParseTimeString(char *string, PRBool default_to_gmt, PRTime *result); + PRUint32 PR_FormatTime(char *buf, int buflen, char *fmt, PRExplodedTime *tm); + PRUint32 PR_FormatTimeUSEnglish(char *buf, PRUint32 bufSize, char *format, PRExplodedTime *tm); +} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/Common.d --- a/dwt/internal/mozilla/Common.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -module dwt.internal.mozilla.Common; - -version(Windows) { - const NS_WIN32 = 1; -} -version(linux) { - const NS_UNIX = 1; -} - -alias uint nsresult; -alias uint nsrefcnt; - -const nsnull = 0; - -/****************************************************************************** - - prtypes - -******************************************************************************/ - -extern (System): - -alias ubyte PRUint8; -alias byte PRInt8; - -const PR_INT8_MAX = 127; -const PR_UINT8_MAX = 255U; - -alias ushort PRUint16; -alias short PRInt16; - -const PR_INT16_MAX = 32767; -const PR_UINT16_MAX = 65535U; - -alias uint PRUint32; -alias int PRInt32; - -alias long PRInt64; -alias ulong PRUint64; - -alias int PRIntn; -alias uint PRUintn; - -alias double PRFloat64; -alias size_t PRSize; - -alias PRInt32 PROffset32; -alias PRInt64 PROffset64; - -alias ptrdiff_t PRPtrdiff; -alias uint PRUptrdiff; - -alias PRIntn PRBool; - -const PR_TRUE = 1; -const PR_FALSE = 0; - -alias PRUint8 PRPackedBool; - -enum -{ - PR_FAILURE = -1, - PR_SUCCESS, -} - -alias int PRStatus; - -alias wchar PRUnichar; - -alias int PRWord; -alias uint PRUword; - -/****************************************************************************** - - nscommon - -******************************************************************************/ - -alias void* nsIWidget; -alias void* nsILayoutHistoryState; -alias void* nsIDeviceContext; -alias void* nsPresContext; -alias void* nsEvent; -alias void* nsEventStatus; -alias void* nsIPresShell; -alias void* JSContext; - -alias void* PRThread; -alias void* PLEvent; -alias void* PLEventQueue; -alias void* PLHandleEventProc; -alias void* PLDestroyEventProc; - -/****************************************************************************** - - gfxtypes - -******************************************************************************/ - -alias PRUint32 gfx_color; -alias PRUint16 gfx_depth; -alias PRInt32 gfx_format; - -alias void* nsIntRect; -alias void* nsRect; \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/gfxIImageFrame.d --- a/dwt/internal/mozilla/gfxIImageFrame.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -module dwt.internal.mozilla.gfxIImageFrame; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] GFXIIMAGEFRAME_IID_STR = "f6d00ee7-defc-4101-b2dc-e72cf4c37c3c"; - -const nsIID GFXIIMAGEFRAME_IID= - {0xf6d00ee7, 0xdefc, 0x4101, - [ 0xb2, 0xdc, 0xe7, 0x2c, 0xf4, 0xc3, 0x7c, 0x3c ]}; - -extern(System) - -interface gfxIImageFrame : nsISupports { - - static const char[] IID_STR = GFXIIMAGEFRAME_IID_STR; - static const nsIID IID = GFXIIMAGEFRAME_IID; - - nsresult Init(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight, gfx_format aFormat, gfx_depth aDepth); - nsresult GetMutable(PRBool *aMutable); - nsresult SetMutable(PRBool aMutable); - nsresult GetX(PRInt32 *aX); - nsresult GetY(PRInt32 *aY); - nsresult GetWidth(PRInt32 *aWidth); - nsresult GetHeight(PRInt32 *aHeight); - nsresult GetRect(nsIntRect * rect); - nsresult GetFormat(gfx_format *aFormat); - nsresult GetNeedsBackground(PRBool *aNeedsBackground); - nsresult GetImageBytesPerRow(PRUint32 *aImageBytesPerRow); - nsresult GetImageDataLength(PRUint32 *aImageDataLength); - nsresult GetImageData(PRUint8 **bits, PRUint32 *length); - nsresult SetImageData(PRUint8 *data, PRUint32 length, PRInt32 offset); - nsresult LockImageData(); - nsresult UnlockImageData(); - nsresult GetAlphaBytesPerRow(PRUint32 *aAlphaBytesPerRow); - nsresult GetAlphaDataLength(PRUint32 *aAlphaDataLength); - nsresult GetAlphaData(PRUint8 **bits, PRUint32 *length); - nsresult SetAlphaData(PRUint8 *data, PRUint32 length, PRInt32 offset); - nsresult LockAlphaData(); - nsresult UnlockAlphaData(); - nsresult DrawTo(gfxIImageFrame aDst, PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight); - nsresult GetTimeout(PRInt32 *aTimeout); - nsresult SetTimeout(PRInt32 aTimeout); - nsresult GetFrameDisposalMethod(PRInt32 *aFrameDisposalMethod); - nsresult SetFrameDisposalMethod(PRInt32 aFrameDisposalMethod); - nsresult GetBackgroundColor(gfx_color *aBackgroundColor); - nsresult SetBackgroundColor(gfx_color aBackgroundColor); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/imgIContainer.d --- a/dwt/internal/mozilla/imgIContainer.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -module dwt.internal.mozilla.imgIContainer; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.gfxIImageFrame; -import dwt.internal.mozilla.imgIContainerObserver; - -const char[] IMGICONTAINER_IID_STR = "1a6290e6-8285-4e10-963d-d001f8d327b8"; - -const nsIID IMGICONTAINER_IID= - {0x1a6290e6, 0x8285, 0x4e10, - [ 0x96, 0x3d, 0xd0, 0x01, 0xf8, 0xd3, 0x27, 0xb8 ]}; - -extern(System) - -interface imgIContainer : nsISupports { - - static const char[] IID_STR = IMGICONTAINER_IID_STR; - static const nsIID IID = IMGICONTAINER_IID; - - nsresult Init(PRInt32 aWidth, PRInt32 aHeight, imgIContainerObserver aObserver); - nsresult GetPreferredAlphaChannelFormat(gfx_format *aPreferredAlphaChannelFormat); - nsresult GetWidth(PRInt32 *aWidth); - nsresult GetHeight(PRInt32 *aHeight); - nsresult GetCurrentFrame(gfxIImageFrame *aCurrentFrame); - nsresult GetNumFrames(PRUint32 *aNumFrames); - - enum { kNormalAnimMode = 0 }; - enum { kDontAnimMode = 1 }; - enum { kLoopOnceAnimMode = 2 }; - - nsresult GetAnimationMode(PRUint16 *aAnimationMode); - nsresult SetAnimationMode(PRUint16 aAnimationMode); - nsresult GetFrameAt(PRUint32 index, gfxIImageFrame *_retval); - nsresult AppendFrame(gfxIImageFrame item); - nsresult RemoveFrame(gfxIImageFrame item); - nsresult EndFrameDecode(PRUint32 framenumber, PRUint32 timeout); - nsresult DecodingComplete(); - nsresult Clear(); - nsresult StartAnimation(); - nsresult StopAnimation(); - nsresult ResetAnimation(); - nsresult GetLoopCount(PRInt32 *aLoopCount); - nsresult SetLoopCount(PRInt32 aLoopCount); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/imgIContainerObserver.d --- a/dwt/internal/mozilla/imgIContainerObserver.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -module dwt.internal.mozilla.imgIContainerObserver; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.imgIContainer; -import dwt.internal.mozilla.gfxIImageFrame; - -const char[] IMGICONTAINEROBSERVER_IID_STR = "53102f15-0f53-4939-957e-aea353ad2700"; - -const nsIID IMGICONTAINEROBSERVER_IID= - {0x53102f15, 0x0f53, 0x4939, - [ 0x95, 0x7e, 0xae, 0xa3, 0x53, 0xad, 0x27, 0x00 ]}; - -extern(System) - -interface imgIContainerObserver : nsISupports { - - static const char[] IID_STR = IMGICONTAINEROBSERVER_IID_STR; - static const nsIID IID = IMGICONTAINEROBSERVER_IID; - - nsresult FrameChanged(imgIContainer aContainer, gfxIImageFrame aFrame, nsIntRect * aDirtyRect); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsEmbedString.d --- a/dwt/internal/mozilla/nsEmbedString.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is Mozilla Communicator client code, released March 31, 1998. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by Netscape are Copyright (C) 1998-1999 - * Netscape Communications Corporation. All Rights Reserved. - * - * Contributor(s): - * - * IBM - * - Binding to permit interfacing between Mozilla and DWT - * - Copyright (C) 2004 IBM Corp. All Rights Reserved. - * - * Port to the D programming language: - * John Reimer - * - * ***** END LICENSE BLOCK ***** */ - -module dwt.internal.mozilla.nsEmbedString; - -import dwt.dwthelper.utils; -import dwt.internal.mozilla.nsStringAPI; - -public class nsEmbedString -{ - int /*long*/ handle; - - /************************************************************************** - - **************************************************************************/ - - public this() - { - handle = XPCOM.nsEmbedString_new(); - } - - /************************************************************************** - - **************************************************************************/ - - public nsEmbedString(String string) - { - if (string !is null) - { - char[] aString = new char[string.length() + 1]; - string.getChars(0, string.length(), aString, 0); - handle = XPCOM.nsEmbedString_new(aString); - } - } - - /************************************************************************** - - **************************************************************************/ - - public int /*long*/ getAddress() - { - return handle; - } - - /************************************************************************** - - **************************************************************************/ - - public String toString() - { - if (handle is 0) - return null; - int length = XPCOM.nsEmbedString_Length(handle); - int /*long*/ buffer = XPCOM.nsEmbedString_get(handle); - char[] dest = new char[length]; - XPCOM.memmove(dest, buffer, length * 2); - return new String(dest); - } - - /************************************************************************** - - **************************************************************************/ - - public void dispose() - { - if (handle is 0) - return; - XPCOM.nsEmbedString_delete(handle); - handle = 0; - } -} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsEmbedString2.d --- a/dwt/internal/mozilla/nsEmbedString2.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -module dwt.internal.mozilla.nsEmbedString; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsStringAPI; - -class nsEmbedString -{ - this(wchar[] s) - { - nsresult result; - result = NS_StringContainerInit2(&str, s.ptr, s.length, 0); - if (result != 0) // TODO: convert to XPCOM fail macro - throw new Exception("Init string container fail"); - } - - this() - { - nsresult result; - result = NS_StringContainerInit(&str); - if (result != 0) // TODO: convert to XPCOM fail macro - throw new Exception("Init string container fail"); - } - - nsAString* opCast() - { - return cast(nsAString*)&str; - } - - wchar[] toString16() - { - wchar* buffer = null; - PRBool terminated; - uint len = NS_StringGetData(cast(nsAString*)&str, &buffer, &terminated); - wchar[] result = buffer[0 .. len].dup; - return result; - } - - ~this() - { - NS_StringContainerFinish(&str); - } -private: - nsStringContainer str; -} - - -class nsEmbedCString -{ - this(char[] s) - { - nsresult result; - result = NS_CStringContainerInit2(&str, s.ptr, s.length, 0); - if (result != 0) // TODO: convert to XPCOM fail macro - throw new Exception("Init string container fail"); - } - - this() - { - nsresult result; - result = NS_CStringContainerInit(&str); - if (result != 0) // TODO: convert to XPCOM fail macro - throw new Exception("Init string container fail"); - } - - nsACString* opCast() - { - return cast(nsACString*)&str; - } - - char[] toString() - { - char* buffer = null; - PRBool terminated; - uint len = NS_CStringGetData(cast(nsACString*)&str, &buffer, &terminated); - char[] result = buffer[0 .. len].dup; - return result; - } - - ~this() - { - NS_CStringContainerFinish(&str); - } -private: - nsCStringContainer str; -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsError.d --- a/dwt/internal/mozilla/nsError.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -module dwt.internal.mozilla.nsError; - -import dwt.internal.mozilla.Common; - -/** - * @name Standard Module Offset Code. Each Module should identify a unique number - * and then all errors associated with that module become offsets from the - * base associated with that module id. There are 16 bits of code bits for - * each module. - */ - -enum { - NS_ERROR_MODULE_XPCOM = 1, - NS_ERROR_MODULE_BASE = 2, - NS_ERROR_MODULE_GFX = 3, - NS_ERROR_MODULE_WIDGET = 4, - NS_ERROR_MODULE_CALENDAR = 5, - NS_ERROR_MODULE_NETWORK = 6, - NS_ERROR_MODULE_PLUGINS = 7, - NS_ERROR_MODULE_LAYOUT = 8, - NS_ERROR_MODULE_HTMLPARSER = 9, - NS_ERROR_MODULE_RDF = 10, - NS_ERROR_MODULE_UCONV = 11, - NS_ERROR_MODULE_REG = 12, - NS_ERROR_MODULE_FILES = 13, - NS_ERROR_MODULE_DOM = 14, - NS_ERROR_MODULE_IMGLIB = 15, - NS_ERROR_MODULE_MAILNEWS = 16, - NS_ERROR_MODULE_EDITOR = 17, - NS_ERROR_MODULE_XPCONNECT = 18, - NS_ERROR_MODULE_PROFILE = 19, - NS_ERROR_MODULE_LDAP = 20, - NS_ERROR_MODULE_SECURITY = 21, - NS_ERROR_MODULE_DOM_XPATH = 22, - NS_ERROR_MODULE_DOM_RANGE = 23, - NS_ERROR_MODULE_URILOADER = 24, - NS_ERROR_MODULE_CONTENT = 25, - NS_ERROR_MODULE_PYXPCOM = 26, - NS_ERROR_MODULE_XSLT = 27, - NS_ERROR_MODULE_IPC = 28, - NS_ERROR_MODULE_SVG = 29, - NS_ERROR_MODULE_STORAGE = 30, - NS_ERROR_MODULE_SCHEMA = 31, - NS_ERROR_MODULE_GENERAL = 51, - NS_ERROR_SEVERITY_ERROR = 1, - NS_ERROR_MODULE_BASE_OFFSET = 0x45, -} - -const nsresult NS_OK = cast(nsresult)0; -const nsresult NS_ERROR_BASE = cast(nsresult) 0xC1F30000; -const nsresult NS_ERROR_NOT_INITIALIZED = cast(nsresult)(NS_ERROR_BASE + 1); -const nsresult NS_ERROR_ALREADY_INITIALIZED = cast(nsresult)(NS_ERROR_BASE + 2); -const nsresult NS_NOINTERFACE = cast(nsresult)0x80004002L; - -alias NS_NOINTERFACE NS_ERROR_NO_INTERFACE; - -const nsresult NS_ERROR_INVALID_POINTER = cast(nsresult)0x80004003L; - -alias NS_ERROR_INVALID_POINTER NS_ERROR_NULL_POINTER; - -const nsresult NS_ERROR_ABORT = cast(nsresult)0x80004004L; -const nsresult NS_ERROR_FAILURE = cast(nsresult)0x80004005L; -const nsresult NS_ERROR_UNEXPECTED = cast(nsresult)0x8000ffffL; -const nsresult NS_ERROR_OUT_OF_MEMORY = cast(nsresult) 0x8007000eL; -const nsresult NS_ERROR_ILLEGAL_VALUE = cast(nsresult) 0x80070057L; - -alias NS_ERROR_ILLEGAL_VALUE NS_ERROR_INVALID_ARG; diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIAppShell.d --- a/dwt/internal/mozilla/nsIAppShell.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -module dwt.internal.mozilla.nsIAppShell; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIEventQueue; - -const char[] NS_IAPPSHELL_IID_STR = "a0757c31-eeac-11d1-9ec1-00aa002fb821"; - -const nsIID NS_IAPPSHELL_IID= - {0xa0757c31, 0xeeac, 0x11d1, - [ 0x9e, 0xc1, 0x00, 0xaa, 0x00, 0x2f, 0xb8, 0x21 ]}; - -extern(System) - -interface nsIAppShell : nsISupports { - static const char[] IID_STR = NS_IAPPSHELL_IID_STR; - static const nsIID IID = NS_IAPPSHELL_IID; - - nsresult Create(int *argc, char **argv); - nsresult Run(); - nsresult Spinup(); - nsresult Spindown(); - nsresult ListenToEventQueue(nsIEventQueue * aQueue, PRBool aListen); - nsresult GetNativeEvent(PRBool * aRealEvent, void * * aEvent); - nsresult DispatchNativeEvent(PRBool aRealEvent, void * aEvent); - nsresult Exit(); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIAtom.d --- a/dwt/internal/mozilla/nsIAtom.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -module dwt.internal.mozilla.nsIAtom; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IATOM_IID_STR = "3d1b15b0-93b4-11d1-895b-006008911b81"; - -const nsIID NS_IATOM_IID= - {0x3d1b15b0, 0x93b4, 0x11d1, - [ 0x89, 0x5b, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81 ]}; - -extern(System) - -interface nsIAtom : nsISupports { - - static const char[] IID_STR = NS_IATOM_IID_STR; - static const nsIID IID = NS_IATOM_IID; - - nsresult ToString(nsAString * _retval); - nsresult ToUTF8String(nsACString * _retval); - nsresult GetUTF8String(char **aResult); - nsresult Equals(nsAString * aString, PRBool *_retval); - nsresult EqualsUTF8(nsACString * aString, PRBool *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIAuthInformation.d --- a/dwt/internal/mozilla/nsIAuthInformation.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -module dwt.internal.mozilla.nsAuthInformation; - -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IAUTHINFORMATION_IID_STR = "0d73639c-2a92-4518-9f92-28f71fea5f20"; - -const nsIID NS_IAUTHINFORMATION_IID = - {0x0d73639c, 0x2a92, 0x4518, - [ 0x9f, 0x92, 0x28, 0xf7, 0x1f, 0xea, 0x5f, 0x20 ] }; - -extern(System) - -interface nsIAuthInformation : nsISupports { - - static const char[] IID_STR = NS_IAUTHINFORMATION_IID_STR; - static const nsIID IID = NS_IAUTHINFORMATION_IID; - - enum { AUTH_HOST = 1U } - enum { AUTH_PROXY = 2U } - enum { NEED_DOMAIN = 4U } - enum { ONLY_PASSWORD = 8U } - - nsresult GetFlags(PRUint32 *aFlags); - nsresult GetRealm(nsAString * aRealm);; - nsresult GetAuthenticationScheme(nsACString * aAuthenticationScheme); - nsresult GetUsername(nsAString * aUsername); - nsresult SetUsername(nsAString * aUsername); - nsresult GetPassword(nsAString * aPassword); - nsresult SetPassword(nsAString * aPassword); - nsresult GetDomain(nsAString * aDomain); - nsresult SetDomain(nsAString * aDomain); - -}; diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIAuthPrompt.d --- a/dwt/internal/mozilla/nsIAuthPrompt.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -module dwt.internal.mozilla.nsIAuthPrompt; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -// import dwt.internal.mozilla.nsIPrompt; - -const char[] NS_IAUTHPROMPT_IID_STR = "2f977d45-5485-11d4-87e2-0010a4e75ef2"; - -const nsIID NS_IAUTHPROMPT_IID= - {0x2f977d45, 0x5485, 0x11d4, - [ 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 ]}; - -extern(System) - -interface nsIAuthPrompt : nsISupports { - - static const char[] IID_STR = NS_IAUTHPROMPT_IID_STR; - static const nsIID IID = NS_IAUTHPROMPT_IID; - - enum { SAVE_PASSWORD_NEVER = 0U }; - enum { SAVE_PASSWORD_FOR_SESSION = 1U }; - enum { SAVE_PASSWORD_PERMANENTLY = 2U }; - - nsresult Prompt(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar *passwordRealm, PRUint32 savePassword, PRUnichar *defaultText, PRUnichar **result, PRBool *_retval); - nsresult PromptUsernameAndPassword(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar *passwordRealm, PRUint32 savePassword, PRUnichar **user, PRUnichar **pwd, PRBool *_retval); - nsresult PromptPassword(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar *passwordRealm, PRUint32 savePassword, PRUnichar **pwd, PRBool *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIBaseWindow.d --- a/dwt/internal/mozilla/nsIBaseWindow.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -module dwt.internal.mozilla.nsIBaseWindow; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -alias void * nativeWindow; - -const char[] NS_IBASEWINDOW_IID_STR = "046bc8a0-8015-11d3-af70-00a024ffc08c"; - -const nsIID NS_IBASEWINDOW_IID= - {0x046bc8a0, 0x8015, 0x11d3, - [ 0xaf, 0x70, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; - -extern(System) - -interface nsIBaseWindow : nsISupports { - - static const char[] IID_STR = NS_IBASEWINDOW_IID_STR; - static const nsIID IID = NS_IBASEWINDOW_IID; - - nsresult InitWindow(nativeWindow parentNativeWindow, nsIWidget * parentWidget, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy); - nsresult Create(); - nsresult Destroy(); - nsresult SetPosition(PRInt32 x, PRInt32 y); - nsresult GetPosition(PRInt32 *x, PRInt32 *y); - nsresult SetSize(PRInt32 cx, PRInt32 cy, PRBool fRepaint); - nsresult GetSize(PRInt32 *cx, PRInt32 *cy); - nsresult SetPositionAndSize(PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy, PRBool fRepaint); - nsresult GetPositionAndSize(PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy); - nsresult Repaint(PRBool force); - nsresult GetParentWidget(nsIWidget * *aParentWidget); - nsresult SetParentWidget(nsIWidget * aParentWidget); - nsresult GetParentNativeWindow(nativeWindow *aParentNativeWindow); - nsresult SetParentNativeWindow(nativeWindow aParentNativeWindow); - nsresult GetVisibility(PRBool *aVisibility); - nsresult SetVisibility(PRBool aVisibility); - nsresult GetEnabled(PRBool *aEnabled); - nsresult SetEnabled(PRBool aEnabled); - nsresult GetBlurSuppression(PRBool *aBlurSuppression); - nsresult SetBlurSuppression(PRBool aBlurSuppression); - nsresult GetMainWidget(nsIWidget * *aMainWidget); - nsresult SetFocus(); - nsresult GetTitle(PRUnichar * *aTitle); - nsresult SetTitle(PRUnichar * aTitle); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIBinaryInputStream.d --- a/dwt/internal/mozilla/nsIBinaryInputStream.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -module dwt.internal.mozilla.nsIBinaryInputStream; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIInputStream; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IBINARYINPUTSTREAM_IID_STR = "7b456cb0-8772-11d3-90cf-0040056a906e"; - -const nsIID NS_IBINARYINPUTSTREAM_IID= - {0x7b456cb0, 0x8772, 0x11d3, - [ 0x90, 0xcf, 0x00, 0x40, 0x05, 0x6a, 0x90, 0x6e ]}; - -extern(System) - -interface nsIBinaryInputStream : nsIInputStream { - - static const char[] IID_STR = NS_IBINARYINPUTSTREAM_IID_STR; - static const nsIID IID = NS_IBINARYINPUTSTREAM_IID; - - nsresult SetInputStream(nsIInputStream aInputStream); - nsresult ReadBoolean(PRBool *_retval); - nsresult Read8(PRUint8 *_retval); - nsresult Read16(PRUint16 *_retval); - nsresult Read32(PRUint32 *_retval); - nsresult Read64(PRUint64 *_retval); - nsresult ReadFloat(float *_retval); - nsresult ReadDouble(double *_retval); - nsresult ReadCString(nsACString * _retval); - nsresult ReadString(nsAString * _retval); - nsresult ReadBytes(PRUint32 aLength, char **aString); - nsresult ReadByteArray(PRUint32 aLength, PRUint8 **aBytes); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIBinaryOutputStream.d --- a/dwt/internal/mozilla/nsIBinaryOutputStream.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -module dwt.internal.mozilla.nsIBinaryOutputStream; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIOutputStream; - -const char[] NS_IBINARYOUTPUTSTREAM_IID_STR = "204ee610-8765-11d3-90cf-0040056a906e"; - -const nsIID NS_IBINARYOUTPUTSTREAM_IID= - {0x204ee610, 0x8765, 0x11d3, - [ 0x90, 0xcf, 0x00, 0x40, 0x05, 0x6a, 0x90, 0x6e ]}; - -extern(System) - -interface nsIBinaryOutputStream : nsIOutputStream { - - static const char[] IID_STR = NS_IBINARYOUTPUTSTREAM_IID_STR; - static const nsIID IID = NS_IBINARYOUTPUTSTREAM_IID; - - nsresult SetOutputStream(nsIOutputStream aOutputStream); - nsresult WriteBoolean(PRBool aBoolean); - nsresult Write8(PRUint8 aByte); - nsresult Write16(PRUint16 a16); - nsresult Write32(PRUint32 a32); - nsresult Write64(PRUint64 a64); - nsresult WriteFloat(float aFloat); - nsresult WriteDouble(double aDouble); - nsresult WriteStringZ(char *aString); - nsresult WriteWStringZ(PRUnichar *aString); - nsresult WriteUtf8Z(PRUnichar *aString); - nsresult WriteBytes(char *aString, PRUint32 aLength); - nsresult WriteByteArray(PRUint8 *aBytes, PRUint32 aLength); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsICancelable.d --- a/dwt/internal/mozilla/nsICancelable.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -module dwt.internal.mozilla.nsICancelable; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_ICANCELABLE_IID_STR = "d94ac0a0-bb18-46b8-844e-84159064b0bd"; - -const nsIID NS_ICANCELABLE_IID= - {0xd94ac0a0, 0xbb18, 0x46b8, - [ 0x84, 0x4e, 0x84, 0x15, 0x90, 0x64, 0xb0, 0xbd ]}; - -extern(System) - -interface nsICancelable : nsISupports { - - static const char[] IID_STR = NS_ICANCELABLE_IID_STR; - static const nsIID IID = NS_ICANCELABLE_IID; - - nsresult Cancel(nsresult aReason); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsICategoryManager.d --- a/dwt/internal/mozilla/nsICategoryManager.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -module dwt.internal.mozilla.nsICategoryManager; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsISimpleEnumerator; - -const char[] NS_ICATEGORYMANAGER_IID_STR = "3275b2cd-af6d-429a-80d7-f0c5120342ac"; - -const nsIID NS_ICATEGORYMANAGER_IID= - {0x3275b2cd, 0xaf6d, 0x429a, - [ 0x80, 0xd7, 0xf0, 0xc5, 0x12, 0x03, 0x42, 0xac ]}; - -extern(System) - -interface nsICategoryManager : nsISupports { - - static const char[] IID_STR = NS_ICATEGORYMANAGER_IID_STR; - static const nsIID IID = NS_ICATEGORYMANAGER_IID; - - nsresult GetCategoryEntry(char *aCategory, char *aEntry, char **_retval); - nsresult AddCategoryEntry(char *aCategory, char *aEntry, char *aValue, PRBool aPersist, PRBool aReplace, char **_retval); - nsresult DeleteCategoryEntry(char *aCategory, char *aEntry, PRBool aPersist); - nsresult DeleteCategory(char *aCategory); - nsresult EnumerateCategory(char *aCategory, nsISimpleEnumerator *_retval); - nsresult EnumerateCategories(nsISimpleEnumerator *_retval); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIChannel.d --- a/dwt/internal/mozilla/nsIChannel.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -module dwt.internal.mozilla.nsIChannel; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIRequest; -import dwt.internal.mozilla.nsIURI; -import dwt.internal.mozilla.nsIInterfaceRequestor; -import dwt.internal.mozilla.nsIInputStream; -import dwt.internal.mozilla.nsIStreamListener; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_ICHANNEL_IID_STR = "c63a055a-a676-4e71-bf3c-6cfa11082018"; -const nsIID NS_ICHANNEL_IID= - {0xc63a055a, 0xa676, 0x4e71, - [ 0xbf, 0x3c, 0x6c, 0xfa, 0x11, 0x08, 0x20, 0x18 ]}; - -extern(System) - -interface nsIChannel : nsIRequest { - - static const char[] IID_STR = NS_ICHANNEL_IID_STR; - static const nsIID IID = NS_ICHANNEL_IID; - - nsresult GetOriginalURI(nsIURI *aOriginalURI); - nsresult SetOriginalURI(nsIURI aOriginalURI); - nsresult GetURI(nsIURI *aURI); - nsresult GetOwner(nsISupports *aOwner); - nsresult SetOwner(nsISupports aOwner); - - nsresult GetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks); - nsresult SetNotificationCallbacks(nsIInterfaceRequestor aNotificationCallbacks); - nsresult GetSecurityInfo(nsISupports *aSecurityInfo); - nsresult GetContentType(nsACString * aContentType); - nsresult SetContentType(nsACString * aContentType); - nsresult GetContentCharset(nsACString * aContentCharset); - nsresult SetContentCharset(nsACString * aContentCharset); - nsresult GetContentLength(PRInt32 *aContentLength); - nsresult SetContentLength(PRInt32 aContentLength); - nsresult Open(nsIInputStream *_retval); - nsresult AsyncOpen(nsIStreamListener aListener, nsISupports aContext); - - enum { LOAD_DOCUMENT_URI = 65536U }; - enum { LOAD_RETARGETED_DOCUMENT_URI = 131072U }; - enum { LOAD_REPLACE = 262144U }; - enum { LOAD_INITIAL_DOCUMENT_URI = 524288U }; - enum { LOAD_TARGETED = 1048576U }; - enum { LOAD_CALL_CONTENT_SNIFFERS = 2097152U }; -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIChromeEventHandler.d --- a/dwt/internal/mozilla/nsIChromeEventHandler.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -module dwt.internal.mozilla.nsIChromeEventHandler; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMEvent; - -const char[] NS_ICHROMEEVENTHANDLER_IID_STR = "7bc08970-9e6c-11d3-afb2-00a024ffc08c"; - -const nsIID NS_ICHROMEEVENTHANDLER_IID= - {0x7bc08970, 0x9e6c, 0x11d3, - [ 0xaf, 0xb2, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; - -extern(System) - -interface nsIChromeEventHandler : nsISupports { - - static const char[] IID_STR = NS_ICHROMEEVENTHANDLER_IID_STR; - static const nsIID IID = NS_ICHROMEEVENTHANDLER_IID; - - nsresult HandleChromeEvent(nsPresContext * aPresContext, nsEvent * aEvent, nsIDOMEvent *aDOMEvent, PRUint32 aFlags, nsEventStatus *aStatus); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsICollection.d --- a/dwt/internal/mozilla/nsICollection.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -module dwt.internal.mozilla.nsICollection; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsISerializable; -import dwt.internal.mozilla.nsIEnumerator; - -const char[] NS_ICOLLECTION_IID_STR = "83b6019c-cbc4-11d2-8cca-0060b0fc14a3"; - -const nsIID NS_ICOLLECTION_IID= - {0x83b6019c, 0xcbc4, 0x11d2, - [ 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 ]}; - -extern(System) - -interface nsICollection : nsISerializable { - - static const char[] IID_STR = NS_ICOLLECTION_IID_STR; - static const nsIID IID = NS_ICOLLECTION_IID; - - nsresult Count(PRUint32 *_retval); - nsresult GetElementAt(PRUint32 index, nsISupports *_retval); - nsresult QueryElementAt(PRUint32 index, nsIID * uuid, void * *result); - nsresult SetElementAt(PRUint32 index, nsISupports item); - nsresult AppendElement(nsISupports item); - nsresult RemoveElement(nsISupports item); - nsresult Enumerate(nsIEnumerator *_retval); - nsresult Clear(); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIComponentManager.d --- a/dwt/internal/mozilla/nsIComponentManager.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -module dwt.internal.mozilla.nsIComponentManager; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIFactory; - -const char[] NS_ICOMPONENTMANAGER_IID_STR = "a88e5a60-205a-4bb1-94e1-2628daf51eae"; - -const nsIID NS_ICOMPONENTMANAGER_IID= - {0xa88e5a60, 0x205a, 0x4bb1, - [ 0x94, 0xe1, 0x26, 0x28, 0xda, 0xf5, 0x1e, 0xae ]}; - -extern(System) - -interface nsIComponentManager : nsISupports { - static const char[] IID_STR = NS_ICOMPONENTMANAGER_IID_STR; - static const nsIID IID = NS_ICOMPONENTMANAGER_IID; - - nsresult GetClassObject(nsCID * aClass, nsIID * aIID, void * *result); - nsresult GetClassObjectByContractID(char *aContractID, nsIID * aIID, void * *result); - nsresult CreateInstance(nsCID * aClass, nsISupports aDelegate, nsIID * aIID, void * *result); - nsresult CreateInstanceByContractID(char *aContractID, nsISupports aDelegate, nsIID * aIID, void * *result); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIComponentRegistrar.d --- a/dwt/internal/mozilla/nsIComponentRegistrar.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -module dwt.internal.mozilla.nsIComponentRegistrar; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIFile; -import dwt.internal.mozilla.nsIFactory; -import dwt.internal.mozilla.nsISimpleEnumerator; - -const char[] NS_ICOMPONENTREGISTRAR_IID_STR = "2417cbfe-65ad-48a6-b4b6-eb84db174392"; - -const nsIID NS_ICOMPONENTREGISTRAR_IID= - {0x2417cbfe, 0x65ad, 0x48a6, - [ 0xb4, 0xb6, 0xeb, 0x84, 0xdb, 0x17, 0x43, 0x92 ]}; - -extern(System) - -interface nsIComponentRegistrar : nsISupports { - static const char[] IID_STR = NS_ICOMPONENTREGISTRAR_IID_STR; - static const nsIID IID = NS_ICOMPONENTREGISTRAR_IID; - - nsresult AutoRegister(nsIFile aSpec); - nsresult AutoUnregister(nsIFile aSpec); - nsresult RegisterFactory(nsCID * aClass, char *aClassName, char *aContractID, nsIFactory aFactory); - nsresult UnregisterFactory(nsCID * aClass, nsIFactory aFactory); - nsresult RegisterFactoryLocation(nsCID * aClass, char *aClassName, char *aContractID, nsIFile aFile, char *aLoaderStr, char *aType); - nsresult UnregisterFactoryLocation(nsCID * aClass, nsIFile aFile); - nsresult IsCIDRegistered(nsCID * aClass, PRBool *_retval); - nsresult IsContractIDRegistered(char *aContractID, PRBool *_retval); - nsresult EnumerateCIDs(nsISimpleEnumerator *_retval); - nsresult EnumerateContractIDs(nsISimpleEnumerator *_retval); - nsresult CIDToContractID(nsCID * aClass, char **_retval); - nsresult ContractIDToCID(char *aContractID, nsCID * *_retval); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIContentViewer.d --- a/dwt/internal/mozilla/nsIContentViewer.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -module dwt.internal.mozilla.nsIContentViewer; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMDocument; -import dwt.internal.mozilla.nsISHEntry; - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_ICONTENTVIEWER_IID_STR = "6a7ddb40-8a9e-4576-8ad1-71c5641d8780"; - -const nsIID NS_ICONTENTVIEWER_IID= - {0x6a7ddb40, 0x8a9e, 0x4576, - [ 0x8a, 0xd1, 0x71, 0xc5, 0x64, 0x1d, 0x87, 0x80 ]}; - -extern(System) - -interface nsIContentViewer : nsISupports { - - static const char[] IID_STR = NS_ICONTENTVIEWER_IID_STR; - static const nsIID IID = NS_ICONTENTVIEWER_IID; - - nsresult Init(nsIWidget * aParentWidget, nsIDeviceContext * aDeviceContext, nsRect * aBounds); - nsresult GetContainer(nsISupports *aContainer); - nsresult SetContainer(nsISupports aContainer); - nsresult LoadStart(nsISupports aDoc); - nsresult LoadComplete(PRUint32 aStatus); - nsresult PermitUnload(PRBool *_retval); - nsresult PageHide(PRBool isUnload); - nsresult Close(nsISHEntry historyEntry); - nsresult Destroy(); - nsresult Stop(); - nsresult GetDOMDocument(nsIDOMDocument *aDOMDocument); - nsresult SetDOMDocument(nsIDOMDocument aDOMDocument); - nsresult GetBounds(nsRect * aBounds); - nsresult SetBounds(nsRect * aBounds); - nsresult GetPreviousViewer(nsIContentViewer *aPreviousViewer); - nsresult SetPreviousViewer(nsIContentViewer aPreviousViewer); - nsresult Move(PRInt32 aX, PRInt32 aY); - nsresult Show(); - nsresult Hide(); - nsresult GetEnableRendering(PRBool *aEnableRendering); - nsresult SetEnableRendering(PRBool aEnableRendering); - nsresult GetSticky(PRBool *aSticky); - nsresult SetSticky(PRBool aSticky); - nsresult RequestWindowClose(PRBool *_retval); - nsresult Open(nsISupports aState); - nsresult ClearHistoryEntry(); - -} - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_ICONTENTVIEWER_MOZILLA_1_8_BRANCH_IID_STR = "51341ed4-a3bf-4fd5-ae17-5fd3ec59dcab"; - -const nsIID NS_ICONTENTVIEWER_MOZILLA_1_8_BRANCH_IID= - {0x51341ed4, 0xa3bf, 0x4fd5, - [ 0xae, 0x17, 0x5f, 0xd3, 0xec, 0x59, 0xdc, 0xab ]}; - -extern(System) - -interface nsIContentViewer_MOZILLA_1_8_BRANCH : nsISupports { - - static const char[] IID_STR = NS_ICONTENTVIEWER_MOZILLA_1_8_BRANCH_IID_STR; - static const nsIID IID = NS_ICONTENTVIEWER_MOZILLA_1_8_BRANCH_IID; - - nsresult OpenWithEntry(nsISupports aState, nsISHEntry aSHEntry); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIContextMenuListener.d --- a/dwt/internal/mozilla/nsIContextMenuListener.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -module dwt.internal.mozilla.nsIContextMenuListener; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIDOMEvent; -import dwt.internal.mozilla.nsIDOMNode; - -const char[] NS_ICONTEXTMENULISTENER_IID_STR = "3478b6b0-3875-11d4-94ef-0020183bf181"; - -const nsIID NS_ICONTEXTMENULISTENER_IID= - {0x3478b6b0, 0x3875, 0x11d4, - [ 0x94, 0xef, 0x00, 0x20, 0x18, 0x3b, 0xf1, 0x81 ]}; - -extern(System) - -interface nsIContextMenuListener : nsISupports { - - static const char[] IID_STR = NS_ICONTEXTMENULISTENER_IID_STR; - static const nsIID IID = NS_ICONTEXTMENULISTENER_IID; - - enum { CONTEXT_NONE = 0U }; - enum { CONTEXT_LINK = 1U }; - enum { CONTEXT_IMAGE = 2U }; - enum { CONTEXT_DOCUMENT = 4U }; - enum { CONTEXT_TEXT = 8U }; - enum { CONTEXT_INPUT = 16U }; - - nsresult OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent aEvent, nsIDOMNode aNode); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIContextMenuListener2.d --- a/dwt/internal/mozilla/nsIContextMenuListener2.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -module dwt.internal.mozilla.nsIContextMenuListener2; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIDOMEvent; -import dwt.internal.mozilla.nsIDOMNode; -import dwt.internal.mozilla.imgIContainer; -import dwt.internal.mozilla.nsIURI; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_ICONTEXTMENULISTENER2_IID_STR = "7fb719b3-d804-4964-9596-77cf924ee314"; - -const nsIID NS_ICONTEXTMENULISTENER2_IID= - {0x7fb719b3, 0xd804, 0x4964, - [ 0x95, 0x96, 0x77, 0xcf, 0x92, 0x4e, 0xe3, 0x14 ]}; - -extern(System) - -interface nsIContextMenuListener2 : nsISupports { - - static const char[] IID_STR = NS_ICONTEXTMENULISTENER2_IID_STR; - static const nsIID IID = NS_ICONTEXTMENULISTENER2_IID; - - enum { CONTEXT_NONE = 0U }; - enum { CONTEXT_LINK = 1U }; - enum { CONTEXT_IMAGE = 2U }; - enum { CONTEXT_DOCUMENT = 4U }; - enum { CONTEXT_TEXT = 8U }; - enum { CONTEXT_INPUT = 16U }; - enum { CONTEXT_BACKGROUND_IMAGE = 32U }; - - nsresult OnShowContextMenu(PRUint32 aContextFlags, nsIContextMenuInfo aUtils); -} - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_ICONTEXTMENUINFO_IID_STR = "2f977d56-5485-11d4-87e2-0010a4e75ef2"; - -const nsIID NS_ICONTEXTMENUINFO_IID= - {0x2f977d56, 0x5485, 0x11d4, - [ 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 ]}; - -extern(System) - -interface nsIContextMenuInfo : nsISupports { - - static const char[] IID_STR = NS_ICONTEXTMENUINFO_IID_STR; - static const nsIID IID = NS_ICONTEXTMENUINFO_IID; - - nsresult GetMouseEvent(nsIDOMEvent *aMouseEvent); - nsresult GetTargetNode(nsIDOMNode *aTargetNode); - nsresult GetAssociatedLink(nsAString * aAssociatedLink); - nsresult GetImageContainer(imgIContainer *aImageContainer); - nsresult GetImageSrc(nsIURI *aImageSrc); - nsresult GetBackgroundImageContainer(imgIContainer *aBackgroundImageContainer); - nsresult GetBackgroundImageSrc(nsIURI *aBackgroundImageSrc); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsICookie.d --- a/dwt/internal/mozilla/nsICookie.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -module dwt.internal.mozilla.nsICookie; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsStringAPI; - -alias PRInt32 nsCookieStatus; -alias PRInt32 nsCookiePolicy; - -const char[] NS_ICOOKIE_IID_STR = "e9fcb9a4-d376-458f-b720-e65e7df593bc"; - -const nsIID NS_ICOOKIE_IID= - {0xe9fcb9a4, 0xd376, 0x458f, - [ 0xb7, 0x20, 0xe6, 0x5e, 0x7d, 0xf5, 0x93, 0xbc ]}; - -extern(System) - -interface nsICookie : nsISupports { - - static const char[] IID_STR = NS_ICOOKIE_IID_STR; - static const nsIID IID = NS_ICOOKIE_IID; - - nsresult GetName(nsACString * aName); - nsresult GetValue(nsACString * aValue); - nsresult GetIsDomain(PRBool *aIsDomain); - nsresult GetHost(nsACString * aHost); - nsresult GetPath(nsACString * aPath); - nsresult GetIsSecure(PRBool *aIsSecure); - nsresult GetExpires(PRUint64 *aExpires); - - enum { STATUS_UNKNOWN = 0 }; - enum { STATUS_ACCEPTED = 1 }; - enum { STATUS_DOWNGRADED = 2 }; - enum { STATUS_FLAGGED = 3 }; - enum { STATUS_REJECTED = 4 }; - - nsresult GetStatus(nsCookieStatus *aStatus); - - enum { POLICY_UNKNOWN = 0 }; - enum { POLICY_NONE = 1 }; - enum { POLICY_NO_CONSENT = 2 }; - enum { POLICY_IMPLICIT_CONSENT = 3 }; - enum { POLICY_EXPLICIT_CONSENT = 4 }; - enum { POLICY_NO_II = 5 }; - - nsresult GetPolicy(nsCookiePolicy *aPolicy); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsICookie2.d --- a/dwt/internal/mozilla/nsICookie2.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -module dwt.internal.mozilla.nsICookie2; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsICookie; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_ICOOKIE2_IID_STR = "d3493503-7854-46ed-8284-8af54a847efb"; - -const nsIID NS_ICOOKIE2_IID= - {0xd3493503, 0x7854, 0x46ed, - [ 0x82, 0x84, 0x8a, 0xf5, 0x4a, 0x84, 0x7e, 0xfb ]}; - -extern(System) - -interface nsICookie2 : nsICookie { - - static const char[] IID_STR = NS_ICOOKIE2_IID_STR; - static const nsIID IID = NS_ICOOKIE2_IID; - - nsresult GetRawHost(nsACString * aRawHost); - nsresult GetIsSession(PRBool *aIsSession); - nsresult GetExpiry(PRInt64 *aExpiry); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsICookieManager.d --- a/dwt/internal/mozilla/nsICookieManager.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -module dwt.internal.mozilla.nsICookieManager; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsISimpleEnumerator; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_ICOOKIEMANAGER_IID_STR = "aaab6710-0f2c-11d5-a53b-0010a401eb10"; - -const nsIID NS_ICOOKIEMANAGER_IID= - {0xaaab6710, 0x0f2c, 0x11d5, - [ 0xa5, 0x3b, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 ]}; - -extern(System) - -interface nsICookieManager : nsISupports { - - static const char[] IID_STR = NS_ICOOKIEMANAGER_IID_STR; - static const nsIID IID = NS_ICOOKIEMANAGER_IID; - - nsresult RemoveAll(); - nsresult GetEnumerator(nsISimpleEnumerator *aEnumerator); - nsresult Remove(nsACString * aDomain, nsACString * aName, nsACString * aPath, PRBool aBlocked); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsICookieManager2.d --- a/dwt/internal/mozilla/nsICookieManager2.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -module dwt.internal.mozilla.nsICookieManager2; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsICookieManager; -import dwt.internal.mozilla.nsICookie2; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_ICOOKIEMANAGER2_IID_STR = "3e73ff5f-154e-494f-b640-3c654ba2cc2b"; - -const nsIID NS_ICOOKIEMANAGER2_IID= - {0x3e73ff5f, 0x154e, 0x494f, - [ 0xb6, 0x40, 0x3c, 0x65, 0x4b, 0xa2, 0xcc, 0x2b ]}; - -extern(System) - -interface nsICookieManager2 : nsICookieManager { - - static const char[] IID_STR = NS_ICOOKIEMANAGER2_IID_STR; - static const nsIID IID = NS_ICOOKIEMANAGER2_IID; - - nsresult Add(nsACString * aDomain, nsACString * aPath, nsACString * aName, nsACString * aValue, PRBool aSecure, PRBool aIsSession, PRInt64 aExpiry); - nsresult FindMatchingCookie(nsICookie2 aCookie, PRUint32 *aCountFromHost, PRBool *_retval); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsID.d --- a/dwt/internal/mozilla/nsID.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -module dwt.internal.mozilla.nsID; - -import dwt.internal.mozilla.Common; - -align(1) -struct nsID -{ - PRUint32 m0; - PRUint16 m1; - PRUint16 m2; - PRUint8[8] m3; - - static nsID opCall(PRUint32 v0, PRUint16 v1, PRUint16 v2, PRUint8[8] v3) - { - nsID result; - result.m0 = v0; - result.m1 = v1; - result.m2 = v2; - for(int i=0; i<8; ++i) - result.m3[i] = v3[i]; - return result; - } -} - -alias nsID nsCID; -alias nsID nsIID; diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMAbstractView.d --- a/dwt/internal/mozilla/nsIDOMAbstractView.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -module dwt.internal.mozilla.nsIDOMAbstractView; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMDocumentView; - -alias PRUint64 DOMTimeStamp; - -const char[] NS_IDOMABSTRACTVIEW_IID_STR = "f51ebade-8b1a-11d3-aae7-0010830123b4"; - -const nsIID NS_IDOMABSTRACTVIEW_IID= - {0xf51ebade, 0x8b1a, 0x11d3, - [ 0xaa, 0xe7, 0x00, 0x10, 0x83, 0x01, 0x23, 0xb4 ]}; - -extern(System) - -interface nsIDOMAbstractView : nsISupports { - - static const char[] IID_STR = NS_IDOMABSTRACTVIEW_IID_STR; - static const nsIID IID = NS_IDOMABSTRACTVIEW_IID; - - nsresult GetDocument(nsIDOMDocumentView *aDocument); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMAttr.d --- a/dwt/internal/mozilla/nsIDOMAttr.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -module dwt.internal.mozilla.nsIDOMAttr; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsIDOMNode; -import dwt.internal.mozilla.nsIDOMElement; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IDOMATTR_IID_STR = "a6cf9070-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMATTR_IID= - {0xa6cf9070, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMAttr : nsIDOMNode { - - static const char[] IID_STR = NS_IDOMATTR_IID_STR; - static const nsIID IID = NS_IDOMATTR_IID; - - nsresult GetName(nsAString * aName); - nsresult GetSpecified(PRBool *aSpecified); - nsresult GetValue(nsAString * aValue); - nsresult SetValue(nsAString * aValue); - nsresult GetOwnerElement(nsIDOMElement *aOwnerElement); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMBarProp.d --- a/dwt/internal/mozilla/nsIDOMBarProp.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -module dwt.internal.mozilla.nsIDOMBarProp; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -alias PRUint64 DOMTimeStamp; - -const char[] NS_IDOMBARPROP_IID_STR = "9eb2c150-1d56-11d3-8221-0060083a0bcf"; - -const nsIID NS_IDOMBARPROP_IID= - {0x9eb2c150, 0x1d56, 0x11d3, - [ 0x82, 0x21, 0x00, 0x60, 0x08, 0x3a, 0x0b, 0xcf ]}; - -extern(System) - -interface nsIDOMBarProp : nsISupports { - - static const char[] IID_STR = NS_IDOMBARPROP_IID_STR; - static const nsIID IID = NS_IDOMBARPROP_IID; - - nsresult GetVisible(PRBool *aVisible); - nsresult SetVisible(PRBool aVisible); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMCDATASection.d --- a/dwt/internal/mozilla/nsIDOMCDATASection.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -module dwt.internal.mozilla.nsIDOMCDATASection; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; - -import dwt.internal.mozilla.nsIDOMText; - -const char[] NS_IDOMCDATASECTION_IID_STR = "a6cf9071-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMCDATASECTION_IID= - {0xa6cf9071, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMCDATASection : nsIDOMText { - - static const char[] IID_STR = NS_IDOMCDATASECTION_IID_STR; - static const nsIID IID = NS_IDOMCDATASECTION_IID; - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMCharacterData.d --- a/dwt/internal/mozilla/nsIDOMCharacterData.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -module dwt.internal.mozilla.nsIDOMCharacterData; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; - -import dwt.internal.mozilla.nsIDOMNode; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IDOMCHARACTERDATA_IID_STR = "a6cf9072-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMCHARACTERDATA_IID= - {0xa6cf9072, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMCharacterData : nsIDOMNode { - - static const char[] IID_STR = NS_IDOMCHARACTERDATA_IID_STR; - static const nsIID IID = NS_IDOMCHARACTERDATA_IID; - - nsresult GetData(nsAString * aData); - nsresult SetData(nsAString * aData); - nsresult GetLength(PRUint32 *aLength); - nsresult SubstringData(PRUint32 offset, PRUint32 count, nsAString * _retval); - nsresult AppendData(nsAString * arg); - nsresult InsertData(PRUint32 offset, nsAString * arg); - nsresult DeleteData(PRUint32 offset, PRUint32 count); - nsresult ReplaceData(PRUint32 offset, PRUint32 count, nsAString * arg); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMComment.d --- a/dwt/internal/mozilla/nsIDOMComment.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -module dwt.internal.mozilla.nsIDOMComment; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; - -import dwt.internal.mozilla.nsIDOMCharacterData; - -const char[] NS_IDOMCOMMENT_IID_STR = "a6cf9073-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMCOMMENT_IID= - {0xa6cf9073, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMComment : nsIDOMCharacterData { - - static const char[] IID_STR = NS_IDOMCOMMENT_IID_STR; - static const nsIID IID = NS_IDOMCOMMENT_IID; - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMDOMImplementation.d --- a/dwt/internal/mozilla/nsIDOMDOMImplementation.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -module dwt.internal.mozilla.nsIDOMDOMImplementation; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMDocumentType; -import dwt.internal.mozilla.nsIDOMDocument; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IDOMDOMIMPLEMENTATION_IID_STR = "a6cf9074-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMDOMIMPLEMENTATION_IID= - {0xa6cf9074, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMDOMImplementation : nsISupports { - - static const char[] IID_STR = NS_IDOMDOMIMPLEMENTATION_IID_STR; - static const nsIID IID = NS_IDOMDOMIMPLEMENTATION_IID; - - nsresult HasFeature(nsAString * feature, nsAString * version_, PRBool *_retval); - nsresult CreateDocumentType(nsAString * qualifiedName, nsAString * publicId, nsAString * systemId, nsIDOMDocumentType *_retval); - nsresult CreateDocument(nsAString * namespaceURI, nsAString * qualifiedName, nsIDOMDocumentType doctype, nsIDOMDocument *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMDocument.d --- a/dwt/internal/mozilla/nsIDOMDocument.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -module dwt.internal.mozilla.nsIDOMDocument; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsIDOMNode; -import dwt.internal.mozilla.nsStringAPI; - -import dwt.internal.mozilla.nsIDOMNode; -import dwt.internal.mozilla.nsIDOMNodeList; -import dwt.internal.mozilla.nsIDOMDocumentType; -import dwt.internal.mozilla.nsIDOMElement; -import dwt.internal.mozilla.nsIDOMDocumentFragment; -import dwt.internal.mozilla.nsIDOMText; -import dwt.internal.mozilla.nsIDOMComment; -import dwt.internal.mozilla.nsIDOMCDATASection; -import dwt.internal.mozilla.nsIDOMProcessingInstruction; -import dwt.internal.mozilla.nsIDOMDOMImplementation; -import dwt.internal.mozilla.nsIDOMAttr; -import dwt.internal.mozilla.nsIDOMEntityReference; - -const char[] NS_IDOMDOCUMENT_IID_STR = "a6cf9075-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMDOCUMENT_IID= - {0xa6cf9075, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMDocument : nsIDOMNode { - - static const char[] IID_STR = NS_IDOMDOCUMENT_IID_STR; - static const nsIID IID = NS_IDOMDOCUMENT_IID; - - nsresult GetDoctype(nsIDOMDocumentType *aDoctype); - nsresult GetImplementation(nsIDOMDOMImplementation *aImplementation); - nsresult GetDocumentElement(nsIDOMElement *aDocumentElement); - nsresult CreateElement(nsAString * tagName, nsIDOMElement *_retval); - nsresult CreateDocumentFragment(nsIDOMDocumentFragment *_retval); - nsresult CreateTextNode(nsAString * data, nsIDOMText *_retval); - nsresult CreateComment(nsAString * data, nsIDOMComment *_retval); - nsresult CreateCDATASection(nsAString * data, nsIDOMCDATASection *_retval); - nsresult CreateProcessingInstruction(nsAString * target, nsAString * data, nsIDOMProcessingInstruction *_retval); - nsresult CreateAttribute(nsAString * name, nsIDOMAttr *_retval); - nsresult CreateEntityReference(nsAString * name, nsIDOMEntityReference *_retval); - nsresult GetElementsByTagName(nsAString * tagname, nsIDOMNodeList *_retval); - nsresult ImportNode(nsIDOMNode importedNode, PRBool deep, nsIDOMNode *_retval); - nsresult CreateElementNS(nsAString * namespaceURI, nsAString * qualifiedName, nsIDOMElement *_retval); - nsresult CreateAttributeNS(nsAString * namespaceURI, nsAString * qualifiedName, nsIDOMAttr *_retval); - nsresult GetElementsByTagNameNS(nsAString * namespaceURI, nsAString * localName, nsIDOMNodeList *_retval); - nsresult GetElementById(nsAString * elementId, nsIDOMElement *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMDocumentFragment.d --- a/dwt/internal/mozilla/nsIDOMDocumentFragment.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -module dwt.internal.mozilla.nsIDOMDocumentFragment; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; - -import dwt.internal.mozilla.nsIDOMNode; - -const char[] NS_IDOMDOCUMENTFRAGMENT_IID_STR = "a6cf9076-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMDOCUMENTFRAGMENT_IID= - {0xa6cf9076, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(Windows) -interface nsIDOMDocumentFragment : nsIDOMNode { - static const char[] IID_STR = NS_IDOMDOCUMENTFRAGMENT_IID_STR; - static const nsIID IID = NS_IDOMDOCUMENTFRAGMENT_IID; - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMDocumentType.d --- a/dwt/internal/mozilla/nsIDOMDocumentType.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -module dwt.internal.mozilla.nsIDOMDocumentType; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; - -import dwt.internal.mozilla.nsIDOMNode; -import dwt.internal.mozilla.nsIDOMNamedNodeMap; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IDOMDOCUMENTTYPE_IID_STR = "a6cf9077-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMDOCUMENTTYPE_IID= - {0xa6cf9077, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMDocumentType : nsIDOMNode { - - static const char[] IID_STR = NS_IDOMDOCUMENTTYPE_IID_STR; - static const nsIID IID = NS_IDOMDOCUMENTTYPE_IID; - - nsresult GetName(nsAString * aName); - nsresult GetEntities(nsIDOMNamedNodeMap *aEntities); - nsresult GetNotations(nsIDOMNamedNodeMap *aNotations); - nsresult GetPublicId(nsAString * aPublicId); - nsresult GetSystemId(nsAString * aSystemId); - nsresult GetInternalSubset(nsAString * aInternalSubset); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMDocumentView.d --- a/dwt/internal/mozilla/nsIDOMDocumentView.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -module dwt.internal.mozilla.nsIDOMDocumentView; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMAbstractView; - -alias PRUint64 DOMTimeStamp; - -const char[] NS_IDOMDOCUMENTVIEW_IID_STR = "1acdb2ba-1dd2-11b2-95bc-9542495d2569"; - -const nsIID NS_IDOMDOCUMENTVIEW_IID= - {0x1acdb2ba, 0x1dd2, 0x11b2, - [ 0x95, 0xbc, 0x95, 0x42, 0x49, 0x5d, 0x25, 0x69 ]}; - -extern(System) - -interface nsIDOMDocumentView : nsISupports { - - static const char[] IID_STR = NS_IDOMDOCUMENTVIEW_IID_STR; - static const nsIID IID = NS_IDOMDOCUMENTVIEW_IID; - - nsresult GetDefaultView(nsIDOMAbstractView *aDefaultView); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMElement.d --- a/dwt/internal/mozilla/nsIDOMElement.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -module dwt.internal.mozilla.nsIDOMElement; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; - -import dwt.internal.mozilla.nsIDOMNode; -import dwt.internal.mozilla.nsIDOMNodeList; -import dwt.internal.mozilla.nsIDOMAttr; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IDOMELEMENT_IID_STR = "a6cf9078-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMELEMENT_IID= - {0xa6cf9078, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMElement : nsIDOMNode { - - static const char[] IID_STR = NS_IDOMELEMENT_IID_STR; - static const nsIID IID = NS_IDOMELEMENT_IID; - - nsresult GetTagName(nsAString * aTagName); - nsresult GetAttribute(nsAString * name, nsAString * _retval); - nsresult SetAttribute(nsAString * name, nsAString * value); - nsresult RemoveAttribute(nsAString * name); - nsresult GetAttributeNode(nsAString * name, nsIDOMAttr *_retval); - nsresult SetAttributeNode(nsIDOMAttr newAttr, nsIDOMAttr *_retval); - nsresult RemoveAttributeNode(nsIDOMAttr oldAttr, nsIDOMAttr *_retval); - nsresult GetElementsByTagName(nsAString * name, nsIDOMNodeList *_retval); - nsresult GetAttributeNS(nsAString * namespaceURI, nsAString * localName, nsAString * _retval); - nsresult SetAttributeNS(nsAString * namespaceURI, nsAString * qualifiedName, nsAString * value); - nsresult RemoveAttributeNS(nsAString * namespaceURI, nsAString * localName); - nsresult GetAttributeNodeNS(nsAString * namespaceURI, nsAString * localName, nsIDOMAttr *_retval); - nsresult SetAttributeNodeNS(nsIDOMAttr newAttr, nsIDOMAttr *_retval); - nsresult GetElementsByTagNameNS(nsAString * namespaceURI, nsAString * localName, nsIDOMNodeList *_retval); - nsresult HasAttribute(nsAString * name, PRBool *_retval); - nsresult HasAttributeNS(nsAString * namespaceURI, nsAString * localName, PRBool *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMEntityReference.d --- a/dwt/internal/mozilla/nsIDOMEntityReference.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -module dwt.internal.mozilla.nsIDOMEntityReference; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; - -import dwt.internal.mozilla.nsIDOMNode; - -const char[] NS_IDOMENTITYREFERENCE_IID_STR = "a6cf907a-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMENTITYREFERENCE_IID= - {0xa6cf907a, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMEntityReference : nsIDOMNode { - - static const char[] IID_STR = NS_IDOMENTITYREFERENCE_IID_STR; - static const nsIID IID = NS_IDOMENTITYREFERENCE_IID; - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMEvent.d --- a/dwt/internal/mozilla/nsIDOMEvent.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -module dwt.internal.mozilla.nsIDOMEvent; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIDOMEventTarget; -import dwt.internal.mozilla.nsStringAPI; - -alias PRUint64 DOMTimeStamp; - -const char[] NS_IDOMEVENT_IID_STR = "a66b7b80-ff46-bd97-0080-5f8ae38add32"; - -const nsIID NS_IDOMEVENT_IID= - {0xa66b7b80, 0xff46, 0xbd97, - [ 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMEvent : nsISupports { - - static const char[] IID_STR = NS_IDOMEVENT_IID_STR; - static const nsIID IID = NS_IDOMEVENT_IID; - - enum { CAPTURING_PHASE = 1U }; - enum { AT_TARGET = 2U }; - enum { BUBBLING_PHASE = 3U }; - - nsresult GetType(nsAString * aType); - nsresult GetTarget(nsIDOMEventTarget *aTarget); - nsresult GetCurrentTarget(nsIDOMEventTarget *aCurrentTarget); - nsresult GetEventPhase(PRUint16 *aEventPhase); - nsresult GetBubbles(PRBool *aBubbles); - nsresult GetCancelable(PRBool *aCancelable); - nsresult GetTimeStamp(DOMTimeStamp *aTimeStamp); - nsresult StopPropagation(); - nsresult PreventDefault(); - nsresult InitEvent(nsAString * eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMEventGroup.d --- a/dwt/internal/mozilla/nsIDOMEventGroup.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -module dwt.internal.mozilla.nsIDOMEventGroup; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -alias PRUint64 DOMTimeStamp; - -const char[] NS_IDOMEVENTGROUP_IID_STR = "33347bee-6620-4841-8152-36091ae80c7e"; - -const nsIID NS_IDOMEVENTGROUP_IID= - {0x33347bee, 0x6620, 0x4841, - [ 0x81, 0x52, 0x36, 0x09, 0x1a, 0xe8, 0x0c, 0x7e ]}; - -extern(System) - -interface nsIDOMEventGroup : nsISupports { - - static const char[] IID_STR = NS_IDOMEVENTGROUP_IID_STR; - static const nsIID IID = NS_IDOMEVENTGROUP_IID; - - nsresult IsSameEventGroup(nsIDOMEventGroup other, PRBool *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMEventListener.d --- a/dwt/internal/mozilla/nsIDOMEventListener.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -module dwt.internal.mozilla.nsIDOMEventListener; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIDOMEvent; - -alias PRUint64 DOMTimeStamp; - -const char[] NS_IDOMEVENTLISTENER_IID_STR = "df31c120-ded6-11d1-bd85-00805f8ae3f4"; -const nsIID NS_IDOMEVENTLISTENER_IID= - {0xdf31c120, 0xded6, 0x11d1, - [ 0xbd, 0x85, 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0xf4 ]}; - -extern(System) - -interface nsIDOMEventListener : nsISupports { - - static const char[] IID_STR = NS_IDOMEVENTLISTENER_IID_STR; - static const nsIID IID = NS_IDOMEVENTLISTENER_IID; - - nsresult HandleEvent(nsIDOMEvent event); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMEventTarget.d --- a/dwt/internal/mozilla/nsIDOMEventTarget.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -module dwt.internal.mozilla.nsIDOMEventTarget; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIDOMEvent; -import dwt.internal.mozilla.nsIDOMEventListener; -import dwt.internal.mozilla.nsStringAPI; - -alias PRUint64 DOMTimeStamp; - -const char[] NS_IDOMEVENTTARGET_IID_STR = "1c773b30-d1cf-11d2-bd95-00805f8ae3f4"; - -const nsIID NS_IDOMEVENTTARGET_IID= - {0x1c773b30, 0xd1cf, 0x11d2, - [ 0xbd, 0x95, 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0xf4 ]}; - -extern(System) - -interface nsIDOMEventTarget : nsISupports { - - static const char[] IID_STR = NS_IDOMEVENTTARGET_IID_STR; - static const nsIID IID = NS_IDOMEVENTTARGET_IID; - - nsresult AddEventListener(nsAString * type, nsIDOMEventListener listener, PRBool useCapture); - nsresult RemoveEventListener(nsAString * type, nsIDOMEventListener listener, PRBool useCapture); - nsresult DispatchEvent(nsIDOMEvent evt, PRBool *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMKeyEvent.d --- a/dwt/internal/mozilla/nsIDOMKeyEvent.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,149 +0,0 @@ -module dwt.internal.mozilla.nsIDOMKeyEvent; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; - -import dwt.internal.mozilla.nsIDOMUIEvent; -import dwt.internal.mozilla.nsIDOMAbstractView; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IDOMKEYEVENT_IID_STR = "028e0e6e-8b01-11d3-aae7-0010838a3123"; - -const nsIID NS_IDOMKEYEVENT_IID= - {0x028e0e6e, 0x8b01, 0x11d3, - [ 0xaa, 0xe7, 0x00, 0x10, 0x83, 0x8a, 0x31, 0x23 ]}; - -extern(System) - -interface nsIDOMKeyEvent : nsIDOMUIEvent { - - static const char[] IID_STR = NS_IDOMKEYEVENT_IID_STR; - static const nsIID IID = NS_IDOMKEYEVENT_IID; - - enum { DOM_VK_CANCEL = 3U }; - enum { DOM_VK_HELP = 6U }; - enum { DOM_VK_BACK_SPACE = 8U }; - enum { DOM_VK_TAB = 9U }; - enum { DOM_VK_CLEAR = 12U }; - enum { DOM_VK_RETURN = 13U }; - enum { DOM_VK_ENTER = 14U }; - enum { DOM_VK_SHIFT = 16U }; - enum { DOM_VK_CONTROL = 17U }; - enum { DOM_VK_ALT = 18U }; - enum { DOM_VK_PAUSE = 19U }; - enum { DOM_VK_CAPS_LOCK = 20U }; - enum { DOM_VK_ESCAPE = 27U }; - enum { DOM_VK_SPACE = 32U }; - enum { DOM_VK_PAGE_UP = 33U }; - enum { DOM_VK_PAGE_DOWN = 34U }; - enum { DOM_VK_END = 35U }; - enum { DOM_VK_HOME = 36U }; - enum { DOM_VK_LEFT = 37U }; - enum { DOM_VK_UP = 38U }; - enum { DOM_VK_RIGHT = 39U }; - enum { DOM_VK_DOWN = 40U }; - enum { DOM_VK_PRINTSCREEN = 44U }; - enum { DOM_VK_INSERT = 45U }; - enum { DOM_VK_DELETE = 46U }; - enum { DOM_VK_0 = 48U }; - enum { DOM_VK_1 = 49U }; - enum { DOM_VK_2 = 50U }; - enum { DOM_VK_3 = 51U }; - enum { DOM_VK_4 = 52U }; - enum { DOM_VK_5 = 53U }; - enum { DOM_VK_6 = 54U }; - enum { DOM_VK_7 = 55U }; - enum { DOM_VK_8 = 56U }; - enum { DOM_VK_9 = 57U }; - enum { DOM_VK_SEMICOLON = 59U }; - enum { DOM_VK_EQUALS = 61U }; - enum { DOM_VK_A = 65U }; - enum { DOM_VK_B = 66U }; - enum { DOM_VK_C = 67U }; - enum { DOM_VK_D = 68U }; - enum { DOM_VK_E = 69U }; - enum { DOM_VK_F = 70U }; - enum { DOM_VK_G = 71U }; - enum { DOM_VK_H = 72U }; - enum { DOM_VK_I = 73U }; - enum { DOM_VK_J = 74U }; - enum { DOM_VK_K = 75U }; - enum { DOM_VK_L = 76U }; - enum { DOM_VK_M = 77U }; - enum { DOM_VK_N = 78U }; - enum { DOM_VK_O = 79U }; - enum { DOM_VK_P = 80U }; - enum { DOM_VK_Q = 81U }; - enum { DOM_VK_R = 82U }; - enum { DOM_VK_S = 83U }; - enum { DOM_VK_T = 84U }; - enum { DOM_VK_U = 85U }; - enum { DOM_VK_V = 86U }; - enum { DOM_VK_W = 87U }; - enum { DOM_VK_X = 88U }; - enum { DOM_VK_Y = 89U }; - enum { DOM_VK_Z = 90U }; - enum { DOM_VK_CONTEXT_MENU = 93U }; - enum { DOM_VK_NUMPAD0 = 96U }; - enum { DOM_VK_NUMPAD1 = 97U }; - enum { DOM_VK_NUMPAD2 = 98U }; - enum { DOM_VK_NUMPAD3 = 99U }; - enum { DOM_VK_NUMPAD4 = 100U }; - enum { DOM_VK_NUMPAD5 = 101U }; - enum { DOM_VK_NUMPAD6 = 102U }; - enum { DOM_VK_NUMPAD7 = 103U }; - enum { DOM_VK_NUMPAD8 = 104U }; - enum { DOM_VK_NUMPAD9 = 105U }; - enum { DOM_VK_MULTIPLY = 106U }; - enum { DOM_VK_ADD = 107U }; - enum { DOM_VK_SEPARATOR = 108U }; - enum { DOM_VK_SUBTRACT = 109U }; - enum { DOM_VK_DECIMAL = 110U }; - enum { DOM_VK_DIVIDE = 111U }; - enum { DOM_VK_F1 = 112U }; - enum { DOM_VK_F2 = 113U }; - enum { DOM_VK_F3 = 114U }; - enum { DOM_VK_F4 = 115U }; - enum { DOM_VK_F5 = 116U }; - enum { DOM_VK_F6 = 117U }; - enum { DOM_VK_F7 = 118U }; - enum { DOM_VK_F8 = 119U }; - enum { DOM_VK_F9 = 120U }; - enum { DOM_VK_F10 = 121U }; - enum { DOM_VK_F11 = 122U }; - enum { DOM_VK_F12 = 123U }; - enum { DOM_VK_F13 = 124U }; - enum { DOM_VK_F14 = 125U }; - enum { DOM_VK_F15 = 126U }; - enum { DOM_VK_F16 = 127U }; - enum { DOM_VK_F17 = 128U }; - enum { DOM_VK_F18 = 129U }; - enum { DOM_VK_F19 = 130U }; - enum { DOM_VK_F20 = 131U }; - enum { DOM_VK_F21 = 132U }; - enum { DOM_VK_F22 = 133U }; - enum { DOM_VK_F23 = 134U }; - enum { DOM_VK_F24 = 135U }; - enum { DOM_VK_NUM_LOCK = 144U }; - enum { DOM_VK_SCROLL_LOCK = 145U }; - enum { DOM_VK_COMMA = 188U }; - enum { DOM_VK_PERIOD = 190U }; - enum { DOM_VK_SLASH = 191U }; - enum { DOM_VK_BACK_QUOTE = 192U }; - enum { DOM_VK_OPEN_BRACKET = 219U }; - enum { DOM_VK_BACK_SLASH = 220U }; - enum { DOM_VK_CLOSE_BRACKET = 221U }; - enum { DOM_VK_QUOTE = 222U }; - enum { DOM_VK_META = 224U }; - - nsresult GetCharCode(PRUint32 *aCharCode); - nsresult GetKeyCode(PRUint32 *aKeyCode); - nsresult GetAltKey(PRBool *aAltKey); - nsresult GetCtrlKey(PRBool *aCtrlKey); - nsresult GetShiftKey(PRBool *aShiftKey); - nsresult GetMetaKey(PRBool *aMetaKey); - - nsresult InitKeyEvent(nsAString * typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView viewArg, PRBool ctrlKeyArg, PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint32 keyCodeArg, PRUint32 charCodeArg); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMMouseEvent.d --- a/dwt/internal/mozilla/nsIDOMMouseEvent.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -module dwt.internal.mozilla.nsIDOMMouseEvent; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; - -import dwt.internal.mozilla.nsIDOMUIEvent; -import dwt.internal.mozilla.nsIDOMEventTarget; -import dwt.internal.mozilla.nsIDOMAbstractView; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IDOMMOUSEEVENT_IID_STR = "ff751edc-8b02-aae7-0010-8301838a3123"; - -const nsIID NS_IDOMMOUSEEVENT_IID= - {0xff751edc, 0x8b02, 0xaae7, - [ 0x00, 0x10, 0x83, 0x01, 0x83, 0x8a, 0x31, 0x23 ]}; - -extern(System) - -interface nsIDOMMouseEvent : nsIDOMUIEvent { - - static const char[] IID_STR = NS_IDOMMOUSEEVENT_IID_STR; - static const nsIID IID = NS_IDOMMOUSEEVENT_IID; - - nsresult GetScreenX(PRInt32 *aScreenX); - nsresult GetScreenY(PRInt32 *aScreenY); - nsresult GetClientX(PRInt32 *aClientX); - nsresult GetClientY(PRInt32 *aClientY); - nsresult GetCtrlKey(PRBool *aCtrlKey); - nsresult GetShiftKey(PRBool *aShiftKey); - nsresult GetAltKey(PRBool *aAltKey); - nsresult GetMetaKey(PRBool *aMetaKey); - nsresult GetButton(PRUint16 *aButton); - nsresult GetRelatedTarget(nsIDOMEventTarget *aRelatedTarget); - - nsresult InitMouseEvent(nsAString * typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView viewArg, PRInt32 detailArg, PRInt32 screenXArg, PRInt32 screenYArg, PRInt32 clientXArg, PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint16 buttonArg, nsIDOMEventTarget relatedTargetArg); - -} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMNamedNodeMap.d --- a/dwt/internal/mozilla/nsIDOMNamedNodeMap.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -module dwt.internal.mozilla.nsIDOMNamedNodeMap; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMNode; -import dwt.internal.mozilla.nsStringAPI; - -alias PRUint64 DOMTimeStamp; - -const char[] NS_IDOMNAMEDNODEMAP_IID_STR = "a6cf907b-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMNAMEDNODEMAP_IID= - {0xa6cf907b, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMNamedNodeMap : nsISupports { - - static const char[] IID_STR = NS_IDOMNAMEDNODEMAP_IID_STR; - static const nsIID IID = NS_IDOMNAMEDNODEMAP_IID; - - nsresult GetNamedItem(nsAString * name, nsIDOMNode *_retval); - nsresult SetNamedItem(nsIDOMNode arg, nsIDOMNode *_retval); - nsresult RemoveNamedItem(nsAString * name, nsIDOMNode *_retval); - nsresult Item(PRUint32 index, nsIDOMNode *_retval); - nsresult GetLength(PRUint32 *aLength); - nsresult GetNamedItemNS(nsAString * namespaceURI, nsAString * localName, nsIDOMNode *_retval); - nsresult SetNamedItemNS(nsIDOMNode arg, nsIDOMNode *_retval); - nsresult RemoveNamedItemNS(nsAString * namespaceURI, nsAString * localName, nsIDOMNode *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMNode.d --- a/dwt/internal/mozilla/nsIDOMNode.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -module dwt.internal.mozilla.nsIDOMNode; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMNodeList; -import dwt.internal.mozilla.nsIDOMNamedNodeMap; -import dwt.internal.mozilla.nsIDOMDocument; -import dwt.internal.mozilla.nsStringAPI; - -alias PRUint64 DOMTimeStamp; - -const char[] NS_IDOMNODE_IID_STR = "a6cf907c-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMNODE_IID= - {0xa6cf907c, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMNode : nsISupports { - - static const char[] IID_STR = NS_IDOMNODE_IID_STR; - static const nsIID IID = NS_IDOMNODE_IID; - - enum { ELEMENT_NODE = 1U }; - enum { ATTRIBUTE_NODE = 2U }; - enum { TEXT_NODE = 3U }; - enum { CDATA_SECTION_NODE = 4U }; - enum { ENTITY_REFERENCE_NODE = 5U }; - enum { ENTITY_NODE = 6U }; - enum { PROCESSING_INSTRUCTION_NODE = 7U }; - enum { COMMENT_NODE = 8U }; - enum { DOCUMENT_NODE = 9U }; - enum { DOCUMENT_TYPE_NODE = 10U }; - enum { DOCUMENT_FRAGMENT_NODE = 11U }; - enum { NOTATION_NODE = 12U }; - - nsresult GetNodeName(nsAString * aNodeName); - nsresult GetNodeValue(nsAString * aNodeValue); - nsresult SetNodeValue(nsAString * aNodeValue); - nsresult GetNodeType(PRUint16 *aNodeType); - nsresult GetParentNode(nsIDOMNode *aParentNode); - nsresult GetChildNodes(nsIDOMNodeList *aChildNodes); - nsresult GetFirstChild(nsIDOMNode *aFirstChild); - nsresult GetLastChild(nsIDOMNode *aLastChild); - nsresult GetPreviousSibling(nsIDOMNode *aPreviousSibling); - nsresult GetNextSibling(nsIDOMNode *aNextSibling); - nsresult GetAttributes(nsIDOMNamedNodeMap *aAttributes); - nsresult GetOwnerDocument(nsIDOMDocument *aOwnerDocument); - nsresult InsertBefore(nsIDOMNode newChild, nsIDOMNode refChild, nsIDOMNode *_retval); - nsresult ReplaceChild(nsIDOMNode newChild, nsIDOMNode oldChild, nsIDOMNode *_retval); - nsresult RemoveChild(nsIDOMNode oldChild, nsIDOMNode *_retval); - nsresult AppendChild(nsIDOMNode newChild, nsIDOMNode *_retval); - nsresult HasChildNodes(PRBool *_retval); - nsresult CloneNode(PRBool deep, nsIDOMNode *_retval); - nsresult Normalize(); - nsresult IsSupported(nsAString * feature, nsAString * version_, PRBool *_retval); - nsresult GetNamespaceURI(nsAString * aNamespaceURI); - nsresult GetPrefix(nsAString * aPrefix); - nsresult SetPrefix(nsAString * aPrefix); - nsresult GetLocalName(nsAString * aLocalName); - nsresult HasAttributes(PRBool *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMNodeList.d --- a/dwt/internal/mozilla/nsIDOMNodeList.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -module dwt.internal.mozilla.nsIDOMNodeList; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMNode; - -alias PRUint64 DOMTimeStamp; - -const char[] NS_IDOMNODELIST_IID_STR = "a6cf907d-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMNODELIST_IID= - {0xa6cf907d, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMNodeList : nsISupports { - - static const char[] IID_STR = NS_IDOMNODELIST_IID_STR; - static const nsIID IID = NS_IDOMNODELIST_IID; - - nsresult Item(PRUint32 index, nsIDOMNode *_retval); - nsresult GetLength(PRUint32 *aLength); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMProcessingInstruction.d --- a/dwt/internal/mozilla/nsIDOMProcessingInstruction.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -module dwt.internal.mozilla.nsIDOMProcessingInstruction; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsIDOMNode; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IDOMPROCESSINGINSTRUCTION_IID_STR = "a6cf907f-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMPROCESSINGINSTRUCTION_IID= - {0xa6cf907f, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMProcessingInstruction : nsIDOMNode { - - static const char[] IID_STR = NS_IDOMPROCESSINGINSTRUCTION_IID_STR; - static const nsIID IID = NS_IDOMPROCESSINGINSTRUCTION_IID; - - nsresult GetTarget(nsAString * aTarget); - nsresult GetData(nsAString * aData); - nsresult SetData(nsAString * aData); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMRange.d --- a/dwt/internal/mozilla/nsIDOMRange.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -module dwt.internal.mozilla.nsIDOMRange; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMNode; -import dwt.internal.mozilla.nsIDOMDocumentFragment; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IDOMRANGE_IID_STR = "a6cf90ce-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMRANGE_IID= - {0xa6cf90ce, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMRange : nsISupports { - - static const char[] IID_STR = NS_IDOMRANGE_IID_STR; - static const nsIID IID = NS_IDOMRANGE_IID; - - nsresult GetStartContainer(nsIDOMNode *aStartContainer); - nsresult GetStartOffset(PRInt32 *aStartOffset); - nsresult GetEndContainer(nsIDOMNode *aEndContainer); - nsresult GetEndOffset(PRInt32 *aEndOffset); - nsresult GetCollapsed(PRBool *aCollapsed); - nsresult GetCommonAncestorContainer(nsIDOMNode *aCommonAncestorContainer); - nsresult SetStart(nsIDOMNode refNode, PRInt32 offset); - nsresult SetEnd(nsIDOMNode refNode, PRInt32 offset); - nsresult SetStartBefore(nsIDOMNode refNode); - nsresult SetStartAfter(nsIDOMNode refNode); - nsresult SetEndBefore(nsIDOMNode refNode); - nsresult SetEndAfter(nsIDOMNode refNode); - nsresult Collapse(PRBool toStart); - nsresult SelectNode(nsIDOMNode refNode); - nsresult SelectNodeContents(nsIDOMNode refNode); - - enum { START_TO_START = 0U }; - enum { START_TO_END = 1U }; - enum { END_TO_END = 2U }; - enum { END_TO_START = 3U }; - - nsresult CompareBoundaryPoints(PRUint16 how, nsIDOMRange sourceRange, PRInt16 *_retval); - nsresult DeleteContents(); - nsresult ExtractContents(nsIDOMDocumentFragment *_retval); - nsresult CloneContents(nsIDOMDocumentFragment *_retval); - nsresult InsertNode(nsIDOMNode newNode); - nsresult SurroundContents(nsIDOMNode newParent); - nsresult CloneRange(nsIDOMRange *_retval); - nsresult ToString(nsAString * _retval); - nsresult Detach(); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMSerializer.d --- a/dwt/internal/mozilla/nsIDOMSerializer.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -module dwt.internal.mozilla.nsIDOMSerializer; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIOutputStream; -import dwt.internal.mozilla.nsIDOMNode; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IDOMSERIALIZER_IID_STR = "9fd4ba15-e67c-4c98-b52c-7715f62c9196"; - -const nsIID NS_IDOMSERIALIZER_IID= - {0x9fd4ba15, 0xe67c, 0x4c98, - [ 0xb5, 0x2c, 0x77, 0x15, 0xf6, 0x2c, 0x91, 0x96 ]}; - -extern(System) - -interface nsIDOMSerializer : nsISupports { - - static const char[] IID_STR = NS_IDOMSERIALIZER_IID_STR; - static const nsIID IID = NS_IDOMSERIALIZER_IID; - - nsresult SerializeToString(nsIDOMNode root, nsAString * _retval); - nsresult SerializeToStream(nsIDOMNode root, nsIOutputStream stream, nsACString * charset); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMStorage.d --- a/dwt/internal/mozilla/nsIDOMStorage.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -module dwt.internal.mozilla.nsIDOMStorage; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsStringAPI; -import dwt.internal.mozilla.nsIDOMStorageItem; - -alias PRUint64 DOMTimeStamp; - -const char[] NS_IDOMSTORAGE_IID_STR = "95cc1383-3b62-4b89-aaef-1004a513ef47"; - -const nsIID NS_IDOMSTORAGE_IID= - {0x95cc1383, 0x3b62, 0x4b89, - [ 0xaa, 0xef, 0x10, 0x04, 0xa5, 0x13, 0xef, 0x47 ]}; - -extern(System) - -interface nsIDOMStorage : nsISupports { - - static const char[] IID_STR = NS_IDOMSTORAGE_IID_STR; - static const nsIID IID = NS_IDOMSTORAGE_IID; - - nsresult GetLength(PRUint32 *aLength); - nsresult Key(PRUint32 index, nsAString * _retval); - nsresult GetItem(nsAString * key, nsIDOMStorageItem *_retval); - nsresult SetItem(nsAString * key, nsAString * data); - nsresult RemoveItem(nsAString * key); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMStorageItem.d --- a/dwt/internal/mozilla/nsIDOMStorageItem.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -module dwt.internal.mozilla.nsIDOMStorageItem; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsStringAPI; - -alias PRUint64 DOMTimeStamp; - -const char[] NS_IDOMSTORAGEITEM_IID_STR = "0cc37c78-4c5f-48e1-adfc-7480b8fe9dc4"; - -const nsIID NS_IDOMSTORAGEITEM_IID= - {0x0cc37c78, 0x4c5f, 0x48e1, - [ 0xad, 0xfc, 0x74, 0x80, 0xb8, 0xfe, 0x9d, 0xc4 ]}; - -extern(System) - -interface nsIDOMStorageItem : nsISupports { - - static const char[] IID_STR = NS_IDOMSTORAGEITEM_IID_STR; - static const nsIID IID = NS_IDOMSTORAGEITEM_IID; - - nsresult GetSecure(PRBool *aSecure); - nsresult SetSecure(PRBool aSecure); - nsresult GetValue(nsAString * aValue); - nsresult SetValue(nsAString * aValue); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMText.d --- a/dwt/internal/mozilla/nsIDOMText.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -module dwt.internal.mozilla.nsIDOMText; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; - -import dwt.internal.mozilla.nsIDOMCharacterData; - -const char[] NS_IDOMTEXT_IID_STR = "a6cf9082-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMTEXT_IID= - {0xa6cf9082, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMText : nsIDOMCharacterData { - - static const char[] IID_STR = NS_IDOMTEXT_IID_STR; - static const nsIID IID = NS_IDOMTEXT_IID; - - nsresult SplitText(PRUint32 offset, nsIDOMText *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMUIEvent.d --- a/dwt/internal/mozilla/nsIDOMUIEvent.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -module dwt.internal.mozilla.nsIDOMUIEvent; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; - -import dwt.internal.mozilla.nsIDOMEvent; -import dwt.internal.mozilla.nsStringAPI; -import dwt.internal.mozilla.nsIDOMAbstractView; - -const char[] NS_IDOMUIEVENT_IID_STR = "a6cf90c3-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMUIEVENT_IID= - {0xa6cf90c3, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMUIEvent : nsIDOMEvent { - - static const char[] IID_STR = NS_IDOMUIEVENT_IID_STR; - static const nsIID IID = NS_IDOMUIEVENT_IID; - - nsresult GetView(nsIDOMAbstractView *aView); - nsresult GetDetail(PRInt32 *aDetail); - nsresult InitUIEvent(nsAString * typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView viewArg, PRInt32 detailArg); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMWindow.d --- a/dwt/internal/mozilla/nsIDOMWindow.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -module dwt.internal.mozilla.nsIDOMWindow; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMWindowCollection; -import dwt.internal.mozilla.nsIDOMDocument; -import dwt.internal.mozilla.nsIDOMBarProp; -import dwt.internal.mozilla.nsISelection; -import dwt.internal.mozilla.nsStringAPI; - -alias PRUint64 DOMTimeStamp; - -const char[] NS_IDOMWINDOW_IID_STR = "a6cf906b-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMWINDOW_IID= - {0xa6cf906b, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMWindow : nsISupports { - - static const char[] IID_STR = NS_IDOMWINDOW_IID_STR; - static const nsIID IID = NS_IDOMWINDOW_IID; - - nsresult GetDocument(nsIDOMDocument *aDocument); - nsresult GetParent(nsIDOMWindow *aParent); - nsresult GetTop(nsIDOMWindow *aTop); - nsresult GetScrollbars(nsIDOMBarProp *aScrollbars); - nsresult GetFrames(nsIDOMWindowCollection *aFrames); - nsresult GetName(nsAString * aName); - nsresult SetName(nsAString * aName); - nsresult GetTextZoom(float *aTextZoom); - nsresult SetTextZoom(float aTextZoom); - nsresult GetScrollX(PRInt32 *aScrollX); - nsresult GetScrollY(PRInt32 *aScrollY); - nsresult ScrollTo(PRInt32 xScroll, PRInt32 yScroll); - nsresult ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif); - nsresult GetSelection(nsISelection *_retval); - nsresult ScrollByLines(PRInt32 numLines); - nsresult ScrollByPages(PRInt32 numPages); - nsresult SizeToContent(); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMWindow2.d --- a/dwt/internal/mozilla/nsIDOMWindow2.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -module dwt.internal.mozilla.nsIDOMWindow2; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsIDOMWindow; -import dwt.internal.mozilla.nsIDOMEventTarget; - -const char[] NS_IDOMWINDOW2_IID_STR = "65455132-b96a-40ec-adea-52fa22b1028c"; - -const nsIID NS_IDOMWINDOW2_IID= - {0x65455132, 0xb96a, 0x40ec, - [ 0xad, 0xea, 0x52, 0xfa, 0x22, 0xb1, 0x02, 0x8c ]}; - -extern(System) - -interface nsIDOMWindow2 : nsIDOMWindow { - - static const char[] IID_STR = NS_IDOMWINDOW2_IID_STR; - static const nsIID IID = NS_IDOMWINDOW2_IID; - - nsresult GetWindowRoot(nsIDOMEventTarget *aWindowRoot); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDOMWindowCollection.d --- a/dwt/internal/mozilla/nsIDOMWindowCollection.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -module dwt.internal.mozilla.nsIDOMWindowCollection; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIDOMWindow; -import dwt.internal.mozilla.nsStringAPI; - -alias PRUint64 DOMTimeStamp; - -const char[] NS_IDOMWINDOWCOLLECTION_IID_STR = "a6cf906f-15b3-11d2-932e-00805f8add32"; - -const nsIID NS_IDOMWINDOWCOLLECTION_IID= - {0xa6cf906f, 0x15b3, 0x11d2, - [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; - -extern(System) - -interface nsIDOMWindowCollection : nsISupports { - - static const char[] IID_STR = NS_IDOMWINDOWCOLLECTION_IID_STR; - static const nsIID IID = NS_IDOMWINDOWCOLLECTION_IID; - - nsresult GetLength(PRUint32 *aLength); - nsresult Item(PRUint32 index, nsIDOMWindow *_retval); - nsresult NamedItem(nsAString * name, nsIDOMWindow *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDebug.d --- a/dwt/internal/mozilla/nsIDebug.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -module dwt.internal.mozilla.nsIDebug; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_IDEBUG_IID_STR = "3bf0c3d7-3bd9-4cf2-a971-33572c503e1e"; - -const nsIID NS_IDEBUG_IID= - {0x3bf0c3d7, 0x3bd9, 0x4cf2, - [ 0xa9, 0x71, 0x33, 0x57, 0x2c, 0x50, 0x3e, 0x1e ]}; - -extern(System) -interface nsIDebug : nsISupports { - static const char[] IID_STR = NS_IDEBUG_IID_STR; - static const nsIID IID = NS_IDEBUG_IID; - - nsresult Assertion(char *aStr, char *aExpr, char *aFile, PRInt32 aLine); - nsresult Warning(char *aStr, char *aFile, PRInt32 aLine); - nsresult Break(char *aFile, PRInt32 aLine); - nsresult Abort(char *aFile, PRInt32 aLine); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDirectoryService.d --- a/dwt/internal/mozilla/nsIDirectoryService.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -module dwt.internal.mozilla.nsIDirectoryService; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISimpleEnumerator; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIFile; - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IDIRECTORYSERVICEPROVIDER_IID_STR = "bbf8cab0-d43a-11d3-8cc2-00609792278c"; - -const nsIID NS_IDIRECTORYSERVICEPROVIDER_IID= - {0xbbf8cab0, 0xd43a, 0x11d3, - [ 0x8c, 0xc2, 0x00, 0x60, 0x97, 0x92, 0x27, 0x8c ]}; - -extern(System) - -interface nsIDirectoryServiceProvider : nsISupports { - - static const char[] IID_STR = NS_IDIRECTORYSERVICEPROVIDER_IID_STR; - static const nsIID IID = NS_IDIRECTORYSERVICEPROVIDER_IID; - - nsresult GetFile(char *prop, PRBool *persistent, nsIFile *_retval); - -} - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IDIRECTORYSERVICEPROVIDER2_IID_STR = "2f977d4b-5485-11d4-87e2-0010a4e75ef2"; - -const nsIID NS_IDIRECTORYSERVICEPROVIDER2_IID= - {0x2f977d4b, 0x5485, 0x11d4, - [ 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 ]}; - -extern(System) - -interface nsIDirectoryServiceProvider2 : nsIDirectoryServiceProvider { - - static const char[] IID_STR = NS_IDIRECTORYSERVICEPROVIDER2_IID_STR; - static const nsIID IID = NS_IDIRECTORYSERVICEPROVIDER2_IID; - - nsresult GetFiles(char *prop, nsISimpleEnumerator *_retval); - -} - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IDIRECTORYSERVICE_IID_STR = "57a66a60-d43a-11d3-8cc2-00609792278c"; - -const nsIID NS_IDIRECTORYSERVICE_IID= - {0x57a66a60, 0xd43a, 0x11d3, - [ 0x8c, 0xc2, 0x00, 0x60, 0x97, 0x92, 0x27, 0x8c ]}; - -extern(System) - -interface nsIDirectoryService : nsISupports { - - static const char[] IID_STR = NS_IDIRECTORYSERVICE_IID_STR; - static const nsIID IID = NS_IDIRECTORYSERVICE_IID; - - nsresult Init(); - nsresult RegisterProvider(nsIDirectoryServiceProvider prov); - nsresult UnregisterProvider(nsIDirectoryServiceProvider prov); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDocShell.d --- a/dwt/internal/mozilla/nsIDocShell.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,173 +0,0 @@ -// FIXME; IID's are not consistant with SWT version - -module dwt.internal.mozilla.nsIDocShell; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIURI; -import dwt.internal.mozilla.nsIChannel; -import dwt.internal.mozilla.nsIContentViewer; -import dwt.internal.mozilla.nsIURIContentListener; -import dwt.internal.mozilla.nsIChromeEventHandler; -import dwt.internal.mozilla.nsIDocShellLoadInfo; -import dwt.internal.mozilla.nsIDocumentCharsetInfo; -import dwt.internal.mozilla.nsIWebNavigation; -import dwt.internal.mozilla.nsISimpleEnumerator; -import dwt.internal.mozilla.nsIInputStream; -import dwt.internal.mozilla.nsIRequest; -import dwt.internal.mozilla.nsISHEntry; -import dwt.internal.mozilla.nsISecureBrowserUI; -import dwt.internal.mozilla.nsIDOMStorage; -import dwt.internal.mozilla.nsStringAPI; - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IDOCSHELL_IID_STR = "9f0c7461-b9a4-47f6-b88c-421dce1bce66"; - -const nsIID NS_IDOCSHELL_IID= - {0x9f0c7461, 0xb9a4, 0x47f6, - [ 0xb8, 0x8c, 0x42, 0x1d, 0xce, 0x1b, 0xce, 0x66 ]}; - -extern(System) - -interface nsIDocShell : nsISupports { - - static const char[] IID_STR = NS_IDOCSHELL_IID_STR; - static const nsIID IID = NS_IDOCSHELL_IID; - - nsresult LoadURI(nsIURI uri, nsIDocShellLoadInfo loadInfo, PRUint32 aLoadFlags, PRBool firstParty); - nsresult LoadStream(nsIInputStream aStream, nsIURI aURI, nsACString * aContentType, nsACString * aContentCharset, nsIDocShellLoadInfo aLoadInfo); - - enum { INTERNAL_LOAD_FLAGS_NONE = 0 }; - enum { INTERNAL_LOAD_FLAGS_INHERIT_OWNER = 1 }; - enum { INTERNAL_LOAD_FLAGS_DONT_SEND_REFERRER = 2 }; - enum { INTERNAL_LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 4 }; - enum { INTERNAL_LOAD_FLAGS_FIRST_LOAD = 8 }; - - nsresult InternalLoad(nsIURI aURI, nsIURI aReferrer, nsISupports aOwner, PRUint32 aFlags, PRUnichar *aWindowTarget, char *aTypeHint, nsIInputStream aPostDataStream, nsIInputStream aHeadersStream, PRUint32 aLoadFlags, nsISHEntry aSHEntry, PRBool firstParty, nsIDocShell *aDocShell, nsIRequest *aRequest); - - nsresult CreateLoadInfo(nsIDocShellLoadInfo *loadInfo); - nsresult PrepareForNewContentModel(); - nsresult SetCurrentURI(nsIURI aURI); - nsresult FirePageHideNotification(PRBool isUnload); - nsresult GetPresContext(nsPresContext * *aPresContext); - nsresult GetPresShell(nsIPresShell * *aPresShell); - nsresult GetEldestPresShell(nsIPresShell * *aEldestPresShell); - nsresult GetContentViewer(nsIContentViewer *aContentViewer); - nsresult GetChromeEventHandler(nsIChromeEventHandler *aChromeEventHandler); - nsresult SetChromeEventHandler(nsIChromeEventHandler aChromeEventHandler); - nsresult GetDocumentCharsetInfo(nsIDocumentCharsetInfo *aDocumentCharsetInfo); - nsresult SetDocumentCharsetInfo(nsIDocumentCharsetInfo aDocumentCharsetInfo); - nsresult GetAllowPlugins(PRBool *aAllowPlugins); - nsresult SetAllowPlugins(PRBool aAllowPlugins); - nsresult GetAllowJavascript(PRBool *aAllowJavascript); - nsresult SetAllowJavascript(PRBool aAllowJavascript); - nsresult GetAllowMetaRedirects(PRBool *aAllowMetaRedirects); - nsresult SetAllowMetaRedirects(PRBool aAllowMetaRedirects); - nsresult GetAllowSubframes(PRBool *aAllowSubframes); - nsresult SetAllowSubframes(PRBool aAllowSubframes); - nsresult GetAllowImages(PRBool *aAllowImages); - nsresult SetAllowImages(PRBool aAllowImages); - - enum { ENUMERATE_FORWARDS = 0 }; - enum { ENUMERATE_BACKWARDS = 1 }; - - nsresult GetDocShellEnumerator(PRInt32 aItemType, PRInt32 aDirection, nsISimpleEnumerator *_retval); - - enum { APP_TYPE_UNKNOWN = 0U }; - enum { APP_TYPE_MAIL = 1U }; - enum { APP_TYPE_EDITOR = 2U }; - - nsresult GetAppType(PRUint32 *aAppType); - nsresult SetAppType(PRUint32 aAppType); - nsresult GetAllowAuth(PRBool *aAllowAuth); - nsresult SetAllowAuth(PRBool aAllowAuth); - nsresult GetZoom(float *aZoom); - nsresult SetZoom(float aZoom); - nsresult GetMarginWidth(PRInt32 *aMarginWidth); - nsresult SetMarginWidth(PRInt32 aMarginWidth); - nsresult GetMarginHeight(PRInt32 *aMarginHeight); - nsresult SetMarginHeight(PRInt32 aMarginHeight); - nsresult GetHasFocus(PRBool *aHasFocus); - nsresult SetHasFocus(PRBool aHasFocus); - nsresult GetCanvasHasFocus(PRBool *aCanvasHasFocus); - nsresult SetCanvasHasFocus(PRBool aCanvasHasFocus); - nsresult TabToTreeOwner(PRBool forward, PRBool *tookFocus); - - enum { BUSY_FLAGS_NONE = 0U }; - enum { BUSY_FLAGS_BUSY = 1U }; - enum { BUSY_FLAGS_BEFORE_PAGE_LOAD = 2U }; - enum { BUSY_FLAGS_PAGE_LOADING = 4U }; - enum { LOAD_CMD_NORMAL = 1U }; - enum { LOAD_CMD_RELOAD = 2U }; - enum { LOAD_CMD_HISTORY = 4U }; - - nsresult GetBusyFlags(PRUint32 *aBusyFlags); - nsresult GetLoadType(PRUint32 *aLoadType); - nsresult SetLoadType(PRUint32 aLoadType); - nsresult IsBeingDestroyed(PRBool *_retval); - nsresult GetIsExecutingOnLoadHandler(PRBool *aIsExecutingOnLoadHandler); - nsresult GetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState); - nsresult SetLayoutHistoryState(nsILayoutHistoryState aLayoutHistoryState); - nsresult GetShouldSaveLayoutState(PRBool *aShouldSaveLayoutState); - nsresult GetSecurityUI(nsISecureBrowserUI *aSecurityUI); - nsresult SetSecurityUI(nsISecureBrowserUI aSecurityUI); - nsresult SuspendRefreshURIs(); - nsresult ResumeRefreshURIs(); - nsresult BeginRestore(nsIContentViewer viewer, PRBool top); - nsresult FinishRestore(); - nsresult GetRestoringDocument(PRBool *aRestoringDocument); - nsresult GetUseErrorPages(PRBool *aUseErrorPages); - nsresult SetUseErrorPages(PRBool aUseErrorPages); - nsresult GetPreviousTransIndex(PRInt32 *aPreviousTransIndex); - nsresult GetLoadedTransIndex(PRInt32 *aLoadedTransIndex); - nsresult HistoryPurged(PRInt32 numEntries); -} - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IDOCSHELL_MOZILLA_1_8_BRANCH_IID_STR = "45988a14-b240-4d07-ae64-50ecca26e6d8"; - -const nsIID NS_IDOCSHELL_MOZILLA_1_8_BRANCH_IID= - {0x45988a14, 0xb240, 0x4d07, - [ 0xae, 0x64, 0x50, 0xec, 0xca, 0x26, 0xe6, 0xd8 ]}; - -extern(System) - -interface nsIDocShell_MOZILLA_1_8_BRANCH : nsISupports { - - static const char[] IID_STR = NS_IDOCSHELL_MOZILLA_1_8_BRANCH_IID_STR; - static const nsIID IID = NS_IDOCSHELL_MOZILLA_1_8_BRANCH_IID; - - nsresult GetSessionStorageForURI(nsIURI uri, nsIDOMStorage *_retval); - nsresult AddSessionStorage(nsACString * aDomain, nsIDOMStorage storage); - nsresult GetCurrentDocumentChannel(nsIChannel *aCurrentDocumentChannel); -} - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IDOCSHELL_MOZILLA_1_9_BRANCH_IID_STR = "45988a14-b240-4d07-ae64-50ecca26e6d8"; - -const nsIID NS_IDOCSHELL_MOZILLA_1_9_BRANCH_IID = - {0x45988a14, 0xb240, 0x4d07, - [ 0xae, 0x64, 0x50, 0xec, 0xca, 0x26, 0xe6, 0xd8 ]}; - -extern(System) - -interface nsIDocShell_MOZILLA_1_9_BRANCH : nsISupports { - - static const char[] IID_STR = NS_IDOCSHELL_MOZILLA_1_9_BRANCH_IID_STR; - static const nsIID IID = NS_IDOCSHELL_MOZILLA_1_9_BRANCH_IID; - - nsresult GetSessionStorageForURI(nsIURI uri, nsIDOMStorage *_retval); - nsresult AddSessionStorage(nsACString * aDomain, nsIDOMStorage storage); - nsresult GetCurrentDocumentChannel(nsIChannel *aCurrentDocumentChannel); -} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDocShellLoadInfo.d --- a/dwt/internal/mozilla/nsIDocShellLoadInfo.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -module dwt.internal.mozilla.nsIDocShellLoadInfo; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIURI; -import dwt.internal.mozilla.nsIInputStream; -import dwt.internal.mozilla.nsISHEntry; - -alias PRInt32 nsDocShellInfoLoadType; - -const char[] NS_IDOCSHELLLOADINFO_IID_STR = "4f813a88-7aca-4607-9896-d97270cdf15e"; - -const nsIID NS_IDOCSHELLLOADINFO_IID= - {0x4f813a88, 0x7aca, 0x4607, - [ 0x98, 0x96, 0xd9, 0x72, 0x70, 0xcd, 0xf1, 0x5e ]}; - -extern(System) - -interface nsIDocShellLoadInfo : nsISupports { - - static const char[] IID_STR = NS_IDOCSHELLLOADINFO_IID_STR; - static const nsIID IID = NS_IDOCSHELLLOADINFO_IID; - - nsresult GetReferrer(nsIURI *aReferrer); - nsresult SetReferrer(nsIURI aReferrer); - nsresult GetOwner(nsISupports *aOwner); - nsresult SetOwner(nsISupports aOwner); - nsresult GetInheritOwner(PRBool *aInheritOwner); - nsresult SetInheritOwner(PRBool aInheritOwner); - - enum { loadNormal = 0 }; - enum { loadNormalReplace = 1 }; - enum { loadHistory = 2 }; - enum { loadReloadNormal = 3 }; - enum { loadReloadBypassCache = 4 }; - enum { loadReloadBypassProxy = 5 }; - enum { loadReloadBypassProxyAndCache = 6 }; - enum { loadLink = 7 }; - enum { loadRefresh = 8 }; - enum { loadReloadCharsetChange = 9 }; - enum { loadBypassHistory = 10 }; - enum { loadStopContent = 11 }; - enum { loadStopContentAndReplace = 12 }; - enum { loadNormalExternal = 13 }; - - nsresult GetLoadType(nsDocShellInfoLoadType *aLoadType); - nsresult SetLoadType(nsDocShellInfoLoadType aLoadType); - nsresult GetSHEntry(nsISHEntry *aSHEntry); - nsresult SetSHEntry(nsISHEntry aSHEntry); - nsresult GetTarget(PRUnichar * *aTarget); - nsresult SetTarget(PRUnichar * aTarget); - nsresult GetPostDataStream(nsIInputStream *aPostDataStream); - nsresult SetPostDataStream(nsIInputStream aPostDataStream); - nsresult GetHeadersStream(nsIInputStream *aHeadersStream); - nsresult SetHeadersStream(nsIInputStream aHeadersStream); - nsresult GetSendReferrer(PRBool *aSendReferrer); - nsresult SetSendReferrer(PRBool aSendReferrer); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDocShellTreeItem.d --- a/dwt/internal/mozilla/nsIDocShellTreeItem.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -module dwt.internal.mozilla.nsIDocShellTreeItem; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDocShellTreeOwner; - -const char[] NS_IDOCSHELLTREEITEM_IID_STR = "7d935d63-6d2a-4600-afb5-9a4f7d68b825"; - -const nsIID NS_IDOCSHELLTREEITEM_IID= - {0x7d935d63, 0x6d2a, 0x4600, - [ 0xaf, 0xb5, 0x9a, 0x4f, 0x7d, 0x68, 0xb8, 0x25 ]}; - -extern(System) - -interface nsIDocShellTreeItem : nsISupports { - - static const char[] IID_STR = NS_IDOCSHELLTREEITEM_IID_STR; - static const nsIID IID = NS_IDOCSHELLTREEITEM_IID; - - nsresult GetName(PRUnichar * *aName); - nsresult SetName(PRUnichar * aName); - nsresult NameEquals(PRUnichar *name, PRBool *_retval); - - enum { typeChrome = 0 }; - enum { typeContent = 1 }; - enum { typeContentWrapper = 2 }; - enum { typeChromeWrapper = 3 }; - enum { typeAll = 2147483647 }; - - nsresult GetItemType(PRInt32 *aItemType); - nsresult SetItemType(PRInt32 aItemType); - nsresult GetParent(nsIDocShellTreeItem *aParent); - nsresult GetSameTypeParent(nsIDocShellTreeItem *aSameTypeParent); - nsresult GetRootTreeItem(nsIDocShellTreeItem *aRootTreeItem); - nsresult GetSameTypeRootTreeItem(nsIDocShellTreeItem *aSameTypeRootTreeItem); - nsresult FindItemWithName(PRUnichar *name, nsISupports aRequestor, nsIDocShellTreeItem aOriginalRequestor, nsIDocShellTreeItem *_retval); - nsresult GetTreeOwner(nsIDocShellTreeOwner *aTreeOwner); - nsresult SetTreeOwner(nsIDocShellTreeOwner treeOwner); - nsresult GetChildOffset(PRInt32 *aChildOffset); - nsresult SetChildOffset(PRInt32 aChildOffset); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDocShellTreeOwner.d --- a/dwt/internal/mozilla/nsIDocShellTreeOwner.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -module dwt.internal.mozilla.nsIDocShellTreeOwner; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDocShellTreeItem; -import dwt.internal.mozilla.nsStringAPI; - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IDOCSHELLTREEOWNER_IID_STR = "9e508466-5ebb-4618-abfa-9ad47bed0b2e"; - -const nsIID NS_IDOCSHELLTREEOWNER_IID= - {0x9e508466, 0x5ebb, 0x4618, - [ 0xab, 0xfa, 0x9a, 0xd4, 0x7b, 0xed, 0x0b, 0x2e ]}; - -extern(System) - -interface nsIDocShellTreeOwner : nsISupports { - - static const char[] IID_STR = NS_IDOCSHELLTREEOWNER_IID_STR; - static const nsIID IID = NS_IDOCSHELLTREEOWNER_IID; - - nsresult FindItemWithName(PRUnichar *name, nsIDocShellTreeItem aRequestor, nsIDocShellTreeItem aOriginalRequestor, nsIDocShellTreeItem *_retval); - nsresult ContentShellAdded(nsIDocShellTreeItem aContentShell, PRBool aPrimary, PRUnichar *aID); - nsresult GetPrimaryContentShell(nsIDocShellTreeItem *aPrimaryContentShell); - nsresult SizeShellTo(nsIDocShellTreeItem shell, PRInt32 cx, PRInt32 cy); - nsresult SetPersistence(PRBool aPersistPosition, PRBool aPersistSize, PRBool aPersistSizeMode); - nsresult GetPersistence(PRBool *aPersistPosition, PRBool *aPersistSize, PRBool *aPersistSizeMode); - -} - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IDOCSHELLTREEOWNER_MOZILLA_1_8_BRANCH_IID_STR = "3c2a6927-e923-4ea8-bbda-a335c768ce4e"; - -const nsIID NS_IDOCSHELLTREEOWNER_MOZILLA_1_8_BRANCH_IID= - {0x3c2a6927, 0xe923, 0x4ea8, - [ 0xbb, 0xda, 0xa3, 0x35, 0xc7, 0x68, 0xce, 0x4e ]}; - -extern(System) - -interface nsIDocShellTreeOwner_MOZILLA_1_8_BRANCH : nsIDocShellTreeOwner { - - static const char[] IID_STR = NS_IDOCSHELLTREEOWNER_MOZILLA_1_8_BRANCH_IID_STR; - static const nsIID IID = NS_IDOCSHELLTREEOWNER_MOZILLA_1_8_BRANCH_IID; - - nsresult ContentShellAdded2(nsIDocShellTreeItem aContentShell, PRBool aPrimary, PRBool aTargetable, nsAString * aID); - nsresult ContentShellRemoved(nsIDocShellTreeItem aContentShell); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDocumentCharsetInfo.d --- a/dwt/internal/mozilla/nsIDocumentCharsetInfo.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -module dwt.internal.mozilla.nsIDocumentCharsetInfo; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIAtom; - -const char[] NS_IDOCUMENTCHARSETINFO_IID_STR = "2d40b291-01e1-11d4-9d0e-0050040007b2"; - -const nsIID NS_IDOCUMENTCHARSETINFO_IID= - {0x2d40b291, 0x01e1, 0x11d4, - [ 0x9d, 0x0e, 0x00, 0x50, 0x04, 0x00, 0x07, 0xb2 ]}; - -extern(System) - -interface nsIDocumentCharsetInfo : nsISupports { - - static const char[] IID_STR = NS_IDOCUMENTCHARSETINFO_IID_STR; - static const nsIID IID = NS_IDOCUMENTCHARSETINFO_IID; - - nsresult GetForcedCharset(nsIAtom *aForcedCharset); - nsresult SetForcedCharset(nsIAtom aForcedCharset); - nsresult GetForcedDetector(PRBool *aForcedDetector); - nsresult SetForcedDetector(PRBool aForcedDetector); - nsresult GetParentCharset(nsIAtom *aParentCharset); - nsresult SetParentCharset(nsIAtom aParentCharset); - nsresult GetParentCharsetSource(PRInt32 *aParentCharsetSource); - nsresult SetParentCharsetSource(PRInt32 aParentCharsetSource); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIDownload.d --- a/dwt/internal/mozilla/nsIDownload.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -module dwt.internal.mozilla.nsIDownload; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsITransfer; -import dwt.internal.mozilla.nsIURI; -import dwt.internal.mozilla.nsILocalFile; -import dwt.internal.mozilla.nsIObserver; -import dwt.internal.mozilla.nsICancelable; -import dwt.internal.mozilla.nsIMIMEInfo; - -const char[] NS_IDOWNLOAD_IID_STR = "9e1fd9f2-9727-4926-85cd-f16c375bba6d"; - -const nsIID NS_IDOWNLOAD_IID= - {0x9e1fd9f2, 0x9727, 0x4926, - [ 0x85, 0xcd, 0xf1, 0x6c, 0x37, 0x5b, 0xba, 0x6d ]}; - -extern(System) - -interface nsIDownload : nsITransfer { - - static const char[] IID_STR = NS_IDOWNLOAD_IID_STR; - static const nsIID IID = NS_IDOWNLOAD_IID; - - nsresult GetTargetFile(nsILocalFile *aTargetFile); - nsresult GetPercentComplete(PRInt32 *aPercentComplete); - nsresult GetAmountTransferred(PRUint64 *aAmountTransferred); - nsresult GetSize(PRUint64 *aSize); - nsresult GetSource(nsIURI *aSource); - nsresult GetTarget(nsIURI *aTarget); - nsresult GetCancelable(nsICancelable *aCancelable); - nsresult GetDisplayName(PRUnichar * *aDisplayName); - nsresult GetStartTime(PRInt64 *aStartTime); - nsresult GetMIMEInfo(nsIMIMEInfo *aMIMEInfo); - -} - -const char[] NS_IDOWNLOAD_MOZILLA_1_8_BRANCH_IID_STR = "ff76f0c7-caaf-4e64-8896-154348322696"; - -const nsIID NS_IDOWNLOAD_MOZILLA_1_8_BRANCH_IID= - {0xff76f0c7, 0xcaaf, 0x4e64, - [ 0x88, 0x96, 0x15, 0x43, 0x48, 0x32, 0x26, 0x96 ]}; - -extern(System) - -interface nsIDownload_MOZILLA_1_8_BRANCH : nsIDownload { - - static const char[] IID_STR = NS_IDOWNLOAD_MOZILLA_1_8_BRANCH_IID_STR; - static const nsIID IID = NS_IDOWNLOAD_MOZILLA_1_8_BRANCH_IID; - - nsresult GetSpeed(double *aSpeed); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIEmbeddingSiteWindow.d --- a/dwt/internal/mozilla/nsIEmbeddingSiteWindow.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -module dwt.internal.mozilla.nsIEmbeddingSiteWindow; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_IEMBEDDINGSITEWINDOW_IID_STR = "3e5432cd-9568-4bd1-8cbe-d50aba110743"; - -const nsIID NS_IEMBEDDINGSITEWINDOW_IID= - {0x3e5432cd, 0x9568, 0x4bd1, - [ 0x8c, 0xbe, 0xd5, 0x0a, 0xba, 0x11, 0x07, 0x43 ]}; - -extern(System) - -interface nsIEmbeddingSiteWindow : nsISupports { - - static const char[] IID_STR = NS_IEMBEDDINGSITEWINDOW_IID_STR; - static const nsIID IID = NS_IEMBEDDINGSITEWINDOW_IID; - - enum { DIM_FLAGS_POSITION = 1U }; - enum { DIM_FLAGS_SIZE_INNER = 2U }; - enum { DIM_FLAGS_SIZE_OUTER = 4U }; - - nsresult SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy); - nsresult GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy); - nsresult SetFocus(); - nsresult GetVisibility(PRBool *aVisibility); - nsresult SetVisibility(PRBool aVisibility); - nsresult GetTitle(PRUnichar * *aTitle); - nsresult SetTitle(PRUnichar * aTitle); - nsresult GetSiteWindow(void * *aSiteWindow); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIEmbeddingSiteWindow2.d --- a/dwt/internal/mozilla/nsIEmbeddingSiteWindow2.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -module dwt.internal.mozilla.nsIEmbeddingSiteWindow2; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsIEmbeddingSiteWindow; - -const char[] NS_IEMBEDDINGSITEWINDOW2_IID_STR = "e932bf55-0a64-4beb-923a-1f32d3661044"; - -const nsIID NS_IEMBEDDINGSITEWINDOW2_IID= - {0xe932bf55, 0x0a64, 0x4beb, - [ 0x92, 0x3a, 0x1f, 0x32, 0xd3, 0x66, 0x10, 0x44 ]}; - -extern(System) - -interface nsIEmbeddingSiteWindow2 : nsIEmbeddingSiteWindow { - - static const char[] IID_STR = NS_IEMBEDDINGSITEWINDOW2_IID_STR; - static const nsIID IID = NS_IEMBEDDINGSITEWINDOW2_IID; - - nsresult Blur(); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIEnumerator.d --- a/dwt/internal/mozilla/nsIEnumerator.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -module dwt.internal.mozilla.nsIEnumerator; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IENUMERATOR_IID_STR = "ad385286-cbc4-11d2-8cca-0060b0fc14a3"; - -const nsIID NS_IENUMERATOR_IID= - {0xad385286, 0xcbc4, 0x11d2, - [ 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 ]}; - -extern(System) - -interface nsIEnumerator : nsISupports { - - static const char[] IID_STR = NS_IENUMERATOR_IID_STR; - static const nsIID IID = NS_IENUMERATOR_IID; - - nsresult First(); - nsresult Next(); - nsresult CurrentItem(nsISupports *_retval); - nsresult IsDone(); - -} - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IBIDIRECTIONALENUMERATOR_IID_STR = "75f158a0-cadd-11d2-8cca-0060b0fc14a3"; - -const nsIID NS_IBIDIRECTIONALENUMERATOR_IID= - {0x75f158a0, 0xcadd, 0x11d2, - [ 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 ]}; - -extern(System) - -interface nsIBidirectionalEnumerator : nsIEnumerator { - - static const char[] IID_STR = NS_IBIDIRECTIONALENUMERATOR_IID_STR; - static const nsIID IID = NS_IBIDIRECTIONALENUMERATOR_IID; - - nsresult Last(); - nsresult Prev(); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIEventQueue.d --- a/dwt/internal/mozilla/nsIEventQueue.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -module dwt.internal.mozilla.nsIEventQueue; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsIEventTarget; - -const char[] NS_IEVENTQUEUE_IID_STR = "176afb41-00a4-11d3-9f2a-00400553eef0"; -const nsIID NS_IEVENTQUEUE_IID= - {0x176afb41, 0x00a4, 0x11d3, - [ 0x9f, 0x2a, 0x00, 0x40, 0x05, 0x53, 0xee, 0xf0 ]}; - -extern(System) - -interface nsIEventQueue : nsIEventTarget { - static const char[] IID_STR = NS_IEVENTQUEUE_IID_STR; - static const nsIID IID = NS_IEVENTQUEUE_IID; - - nsresult InitEvent(PLEvent * aEvent, void * owner, PLHandleEventProc handler, PLDestroyEventProc destructor); - nsresult PostSynchronousEvent(PLEvent * aEvent, void * *aResult); - nsresult PendingEvents(PRBool *_retval); - nsresult ProcessPendingEvents(); - nsresult EventLoop(); - nsresult EventAvailable(PRBool * aResult); - nsresult GetEvent(PLEvent * *_retval); - nsresult HandleEvent(PLEvent * aEvent); - nsresult WaitForEvent(PLEvent * *_retval); - PRInt32 GetEventQueueSelectFD(); - nsresult Init(PRBool aNative); - nsresult InitFromPRThread(PRThread * thread, PRBool aNative); - nsresult InitFromPLQueue(PLEventQueue * aQueue); - nsresult EnterMonitor(); - nsresult ExitMonitor(); - nsresult RevokeEvents(void * owner); - nsresult GetPLEventQueue(PLEventQueue * *_retval); - nsresult IsQueueNative(PRBool *_retval); - nsresult StopAcceptingEvents(); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIEventTarget.d --- a/dwt/internal/mozilla/nsIEventTarget.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -module dwt.internal.mozilla.nsIEventTarget; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsID; - -const char[] NS_IEVENTTARGET_IID_STR = "ea99ad5b-cc67-4efb-97c9-2ef620a59f2a"; - -const nsIID NS_IEVENTTARGET_IID= - {0xea99ad5b, 0xcc67, 0x4efb, - [ 0x97, 0xc9, 0x2e, 0xf6, 0x20, 0xa5, 0x9f, 0x2a ]}; - -extern(System) - -interface nsIEventTarget : nsISupports { - - static const char[] IID_STR = NS_IEVENTTARGET_IID_STR; - static const nsIID IID = NS_IEVENTTARGET_IID; - - nsresult PostEvent(PLEvent * aEvent); - nsresult IsOnCurrentThread(PRBool *_retval); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIExternalHelperAppService.d --- a/dwt/internal/mozilla/nsIExternalHelperAppService.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -module dwt.internal.mozilla.nsIExternalHelperAppService; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsICancelable; -import dwt.internal.mozilla.nsIURI; -import dwt.internal.mozilla.nsIRequest; -import dwt.internal.mozilla.nsIStreamListener; -import dwt.internal.mozilla.nsIFile; -import dwt.internal.mozilla.nsIMIMEInfo; -import dwt.internal.mozilla.nsIWebProgressListener2; -import dwt.internal.mozilla.nsIInterfaceRequestor; -import dwt.internal.mozilla.nsStringAPI; - -import dwt.internal.mozilla.prtime; - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IEXTERNALHELPERAPPSERVICE_IID_STR = "0ea90cf3-2dd9-470f-8f76-f141743c5678"; - -const nsIID NS_IEXTERNALHELPERAPPSERVICE_IID= - {0x0ea90cf3, 0x2dd9, 0x470f, - [ 0x8f, 0x76, 0xf1, 0x41, 0x74, 0x3c, 0x56, 0x78 ]}; - -extern(System) - -interface nsIExternalHelperAppService : nsISupports { - - static const char[] IID_STR = NS_IEXTERNALHELPERAPPSERVICE_IID_STR; - static const nsIID IID = NS_IEXTERNALHELPERAPPSERVICE_IID; - - nsresult DoContent(nsACString * aMimeContentType, nsIRequest aRequest, nsIInterfaceRequestor aWindowContext, nsIStreamListener *_retval); - nsresult ApplyDecodingForExtension(nsACString * aExtension, nsACString * aEncodingType, PRBool *_retval); - -} - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_PIEXTERNALAPPLAUNCHER_IID_STR = "d0b5d7d3-9565-403d-9fb5-e5089c4567c6"; - -const nsIID NS_PIEXTERNALAPPLAUNCHER_IID= - {0xd0b5d7d3, 0x9565, 0x403d, - [ 0x9f, 0xb5, 0xe5, 0x08, 0x9c, 0x45, 0x67, 0xc6 ]}; - -extern(System) - -interface nsPIExternalAppLauncher : nsISupports { - - static const char[] IID_STR = NS_PIEXTERNALAPPLAUNCHER_IID_STR; - static const nsIID IID = NS_PIEXTERNALAPPLAUNCHER_IID; - - nsresult DeleteTemporaryFileOnExit(nsIFile aTemporaryFile); - -} - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IHELPERAPPLAUNCHER_IID_STR = "99a0882d-2ff9-4659-9952-9ac531ba5592"; - -const nsIID NS_IHELPERAPPLAUNCHER_IID= - {0x99a0882d, 0x2ff9, 0x4659, - [ 0x99, 0x52, 0x9a, 0xc5, 0x31, 0xba, 0x55, 0x92 ]}; - -extern(System) - -interface nsIHelperAppLauncher : nsICancelable { - - static const char[] IID_STR = NS_IHELPERAPPLAUNCHER_IID_STR; - static const nsIID IID = NS_IHELPERAPPLAUNCHER_IID; - - nsresult GetMIMEInfo(nsIMIMEInfo *aMIMEInfo); - nsresult GetSource(nsIURI *aSource); - nsresult GetSuggestedFileName(nsAString * aSuggestedFileName); - nsresult SaveToDisk(nsIFile aNewFileLocation, PRBool aRememberThisPreference); - nsresult LaunchWithApplication(nsIFile aApplication, PRBool aRememberThisPreference); - nsresult SetWebProgressListener(nsIWebProgressListener2 aWebProgressListener); - nsresult CloseProgressWindow(); - nsresult GetTargetFile(nsIFile *aTargetFile); - nsresult GetTimeDownloadStarted(PRTime *aTimeDownloadStarted); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIFactory.d --- a/dwt/internal/mozilla/nsIFactory.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ - -module dwt.internal.mozilla.nsIFactory; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_IFACTORY_IID_STR = "00000001-0000-0000-c000-000000000046"; - -const nsIID NS_IFACTORY_IID= - {0x00000001, 0x0000, 0x0000, - [ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 ]}; - -extern(System) - -interface nsIFactory : nsISupports { - - static const char[] IID_STR = NS_IFACTORY_IID_STR; - static const nsIID IID = NS_IFACTORY_IID; - - nsresult CreateInstance(nsISupports aOuter, nsIID * iid, void * *result); - nsresult LockFactory(PRBool lock); -} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIFile.d --- a/dwt/internal/mozilla/nsIFile.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -module dwt.internal.mozilla.nsIFile; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsISimpleEnumerator; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IFILE_IID_STR = "c8c0a080-0868-11d3-915f-d9d889d48e3c"; - -const nsIID NS_IFILE_IID= - {0xc8c0a080, 0x0868, 0x11d3, - [ 0x91, 0x5f, 0xd9, 0xd8, 0x89, 0xd4, 0x8e, 0x3c ]}; - -extern(System) - -interface nsIFile : nsISupports { - static const char[] IID_STR = NS_IFILE_IID_STR; - static const nsIID IID = NS_IFILE_IID; - - enum { NORMAL_FILE_TYPE = 0U }; - enum { DIRECTORY_TYPE = 1U }; - - nsresult Append(nsAString * node); - nsresult AppendNative(nsACString * node); - nsresult Normalize(); - nsresult Create(PRUint32 type, PRUint32 permissions); - nsresult GetLeafName(nsAString * aLeafName); - nsresult SetLeafName(nsAString * aLeafName); - nsresult GetNativeLeafName(nsACString * aNativeLeafName); - nsresult SetNativeLeafName(nsACString * aNativeLeafName); - nsresult CopyTo(nsIFile newParentDir, nsAString * newName); - nsresult CopyToNative(nsIFile newParentDir, nsACString * newName); - nsresult CopyToFollowingLinks(nsIFile newParentDir, nsAString * newName); - nsresult CopyToFollowingLinksNative(nsIFile newParentDir, nsACString * newName); - nsresult MoveTo(nsIFile newParentDir, nsAString * newName); - nsresult MoveToNative(nsIFile newParentDir, nsACString * newName); - nsresult Remove(PRBool recursive); - nsresult GetPermissions(PRUint32 *aPermissions); - nsresult SetPermissions(PRUint32 aPermissions); - nsresult GetPermissionsOfLink(PRUint32 *aPermissionsOfLink); - nsresult SetPermissionsOfLink(PRUint32 aPermissionsOfLink); - nsresult GetLastModifiedTime(PRInt64 *aLastModifiedTime); - nsresult SetLastModifiedTime(PRInt64 aLastModifiedTime); - nsresult GetLastModifiedTimeOfLink(PRInt64 *aLastModifiedTimeOfLink); - nsresult SetLastModifiedTimeOfLink(PRInt64 aLastModifiedTimeOfLink); - nsresult GetFileSize(PRInt64 *aFileSize); - nsresult SetFileSize(PRInt64 aFileSize); - nsresult GetFileSizeOfLink(PRInt64 *aFileSizeOfLink); - nsresult GetTarget(nsAString * aTarget); - nsresult GetNativeTarget(nsACString * aNativeTarget); - nsresult GetPath(nsAString * aPath); - nsresult GetNativePath(nsACString * aNativePath); - nsresult Exists(PRBool *_retval); - nsresult IsWritable(PRBool *_retval); - nsresult IsReadable(PRBool *_retval); - nsresult IsExecutable(PRBool *_retval); - nsresult IsHidden(PRBool *_retval); - nsresult IsDirectory(PRBool *_retval); - nsresult IsFile(PRBool *_retval); - nsresult IsSymlink(PRBool *_retval); - nsresult IsSpecial(PRBool *_retval); - nsresult CreateUnique(PRUint32 type, PRUint32 permissions); - nsresult Clone(nsIFile *_retval); - nsresult Equals(nsIFile inFile, PRBool *_retval); - nsresult Contains(nsIFile inFile, PRBool recur, PRBool *_retval); - nsresult GetParent(nsIFile *aParent); - nsresult GetDirectoryEntries(nsISimpleEnumerator *aDirectoryEntries); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIFilePicker.d --- a/dwt/internal/mozilla/nsIFilePicker.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -module dwt.internal.mozilla.nsIFilePicker; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsILocalFile; -import dwt.internal.mozilla.nsIFileURL; -import dwt.internal.mozilla.nsIDOMWindow; -import dwt.internal.mozilla.nsISimpleEnumerator; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IFILEPICKER_IID_STR = "80faf095-c807-4558-a2cc-185ed70754ea"; - -const nsIID NS_IFILEPICKER_IID= - {0x80faf095, 0xc807, 0x4558, - [ 0xa2, 0xcc, 0x18, 0x5e, 0xd7, 0x07, 0x54, 0xea ]}; - -extern(System) - -interface nsIFilePicker : nsISupports { - - static const char[] IID_STR = NS_IFILEPICKER_IID_STR; - static const nsIID IID = NS_IFILEPICKER_IID; - - enum { modeOpen = 0 }; - enum { modeSave = 1 }; - enum { modeGetFolder = 2 }; - enum { modeOpenMultiple = 3 }; - enum { returnOK = 0 }; - enum { returnCancel = 1 }; - enum { returnReplace = 2 }; - enum { filterAll = 1 }; - enum { filterHTML = 2 }; - enum { filterText = 4 }; - enum { filterImages = 8 }; - enum { filterXML = 16 }; - enum { filterXUL = 32 }; - enum { filterApps = 64 }; - - nsresult Init(nsIDOMWindow parent, nsAString * title, PRInt16 mode); - nsresult AppendFilters(PRInt32 filterMask); - nsresult AppendFilter(nsAString * title, nsAString * filter); - nsresult GetDefaultString(nsAString * aDefaultString); - nsresult SetDefaultString(nsAString * aDefaultString); - nsresult GetDefaultExtension(nsAString * aDefaultExtension); - nsresult SetDefaultExtension(nsAString * aDefaultExtension); - nsresult GetFilterIndex(PRInt32 *aFilterIndex); - nsresult SetFilterIndex(PRInt32 aFilterIndex); - nsresult GetDisplayDirectory(nsILocalFile *aDisplayDirectory); - nsresult SetDisplayDirectory(nsILocalFile aDisplayDirectory); - nsresult GetFile(nsILocalFile *aFile); - nsresult GetFileURL(nsIFileURL *aFileURL); - nsresult GetFiles(nsISimpleEnumerator *aFiles); - nsresult Show(PRInt16 *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIFileURL.d --- a/dwt/internal/mozilla/nsIFileURL.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -module dwt.internal.mozilla.nsIFileURL; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsIURL; -import dwt.internal.mozilla.nsIFile; - -const char[] NS_IFILEURL_IID_STR = "d26b2e2e-1dd1-11b2-88f3-8545a7ba7949"; - -const nsIID NS_IFILEURL_IID= - {0xd26b2e2e, 0x1dd1, 0x11b2, - [ 0x88, 0xf3, 0x85, 0x45, 0xa7, 0xba, 0x79, 0x49 ]}; - -extern(System) - -interface nsIFileURL : nsIURL { - - static const char[] IID_STR = NS_IFILEURL_IID_STR; - static const nsIID IID = NS_IFILEURL_IID; - - nsresult GetFile(nsIFile *aFile); - nsresult SetFile(nsIFile aFile); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIHelperAppLauncherDialog.d --- a/dwt/internal/mozilla/nsIHelperAppLauncherDialog.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -module dwt.internal.mozilla.nsIHelperAppLauncherDialog; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIExternalHelperAppService; -import dwt.internal.mozilla.nsILocalFile; - -const char[] NS_IHELPERAPPLAUNCHERDIALOG_IID_STR = "64355793-988d-40a5-ba8e-fcde78cac631"; - -const nsIID NS_IHELPERAPPLAUNCHERDIALOG_IID= - {0x64355793, 0x988d, 0x40a5, - [ 0xba, 0x8e, 0xfc, 0xde, 0x78, 0xca, 0xc6, 0x31 ]}; - -extern(System) - -interface nsIHelperAppLauncherDialog : nsISupports { - - static const char[] IID_STR = NS_IHELPERAPPLAUNCHERDIALOG_IID_STR; - static const nsIID IID = NS_IHELPERAPPLAUNCHERDIALOG_IID; - - enum { REASON_CANTHANDLE = 0U }; - enum { REASON_SERVERREQUEST = 1U }; - enum { REASON_TYPESNIFFED = 2U }; - nsresult Show(nsIHelperAppLauncher aLauncher, nsISupports aContext, PRUint32 aReason); - nsresult PromptForSaveToFile(nsIHelperAppLauncher aLauncher, nsISupports aWindowContext, PRUnichar *aDefaultFile, PRUnichar *aSuggestedFileExtension, nsILocalFile *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIHistoryEntry.d --- a/dwt/internal/mozilla/nsIHistoryEntry.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -module dwt.internal.mozilla.nsIHistoryEntry; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIURI; - -const char[] NS_IHISTORYENTRY_IID_STR = "a41661d4-1417-11d5-9882-00c04fa02f40"; - -const nsIID NS_IHISTORYENTRY_IID= - {0xa41661d4, 0x1417, 0x11d5, - [ 0x98, 0x82, 0x00, 0xc0, 0x4f, 0xa0, 0x2f, 0x40 ]}; - -extern(System) - -interface nsIHistoryEntry : nsISupports { - - static const char[] IID_STR = NS_IHISTORYENTRY_IID_STR; - static const nsIID IID = NS_IHISTORYENTRY_IID; - - nsresult GetURI(nsIURI *aURI); - nsresult GetTitle(PRUnichar * *aTitle); - nsresult GetIsSubFrame(PRBool *aIsSubFrame); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIIOService.d --- a/dwt/internal/mozilla/nsIIOService.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -module dwt.internal.mozilla.nsIIOService; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIProtocolHandler; -import dwt.internal.mozilla.nsIChannel; -import dwt.internal.mozilla.nsIURI; -import dwt.internal.mozilla.nsIFile; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IIOSERVICE_IID_STR = "bddeda3f-9020-4d12-8c70-984ee9f7935e"; - -const nsIID NS_IIOSERVICE_IID= - {0xbddeda3f, 0x9020, 0x4d12, - [ 0x8c, 0x70, 0x98, 0x4e, 0xe9, 0xf7, 0x93, 0x5e ]}; - -extern(System) - -interface nsIIOService : nsISupports { - - static const char[] IID_STR = NS_IIOSERVICE_IID_STR; - static const nsIID IID = NS_IIOSERVICE_IID; - - nsresult GetProtocolHandler(char *aScheme, nsIProtocolHandler *_retval); - nsresult GetProtocolFlags(char *aScheme, PRUint32 *_retval); - nsresult NewURI(nsACString * aSpec, char *aOriginCharset, nsIURI aBaseURI, nsIURI *_retval); - nsresult NewFileURI(nsIFile aFile, nsIURI *_retval); - nsresult NewChannelFromURI(nsIURI aURI, nsIChannel *_retval); - nsresult NewChannel(nsACString * aSpec, char *aOriginCharset, nsIURI aBaseURI, nsIChannel *_retval); - nsresult GetOffline(PRBool *aOffline); - nsresult SetOffline(PRBool aOffline); - nsresult AllowPort(PRInt32 aPort, char *aScheme, PRBool *_retval); - nsresult ExtractScheme(nsACString * urlString, nsACString * _retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIIOService2.d --- a/dwt/internal/mozilla/nsIIOService2.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -module dwt.internal.mozilla.nsIIOService2; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsIIOService; - -const char[] NS_IIOSERVICE2_IID_STR = "d44fe6d4-ee35-4789-886a-eb8f0554d04e"; - -const nsIID NS_IIOSERVICE2_IID= - {0xd44fe6d4, 0xee35, 0x4789, - [ 0x88, 0x6a, 0xeb, 0x8f, 0x05, 0x54, 0xd0, 0x4e ]}; - -extern(System) - -interface nsIIOService2 : nsIIOService { - - static const char[] IID_STR = NS_IIOSERVICE2_IID_STR; - static const nsIID IID = NS_IIOSERVICE2_IID; - - nsresult GetManageOfflineStatus(PRBool *aManageOfflineStatus); - nsresult SetManageOfflineStatus(PRBool aManageOfflineStatus); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIInputStream.d --- a/dwt/internal/mozilla/nsIInputStream.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -module dwt.internal.mozilla.nsIInputStream; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -typedef nsresult function(nsIInputStream aInStream, - void *aClosure, - byte *aFromSegment, - PRUint32 aToOffset, - PRUint32 aCount, - PRUint32 *aWriteCount) nsWriteSegmentFun; - -const char[] NS_IINPUTSTREAM_IID_STR = "fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a"; - -const nsIID NS_IINPUTSTREAM_IID= - {0xfa9c7f6c, 0x61b3, 0x11d4, - [ 0x98, 0x77, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a ]}; - -extern(System) - -interface nsIInputStream : nsISupports { - - static const char[] IID_STR = NS_IINPUTSTREAM_IID_STR; - static const nsIID IID = NS_IINPUTSTREAM_IID; - - nsresult Close(); - nsresult Available(PRUint32 *_retval); - nsresult Read(byte * aBuf, PRUint32 aCount, PRUint32 *_retval); - nsresult ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval); - nsresult IsNonBlocking(PRBool *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIInterfaceRequestor.d --- a/dwt/internal/mozilla/nsIInterfaceRequestor.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -module dwt.internal.mozilla.nsIInterfaceRequestor; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_IINTERFACEREQUESTOR_IID_STR = "033a1470-8b2a-11d3-af88-00a024ffc08c"; - -const nsIID NS_IINTERFACEREQUESTOR_IID= - {0x033a1470, 0x8b2a, 0x11d3, - [ 0xaf, 0x88, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; - -extern(System) - -interface nsIInterfaceRequestor : nsISupports { - - static const char[] IID_STR = NS_IINTERFACEREQUESTOR_IID_STR; - static const nsIID IID = NS_IINTERFACEREQUESTOR_IID; - - nsresult GetInterface(nsIID * uuid, void * *result); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIJSContextStack.d --- a/dwt/internal/mozilla/nsIJSContextStack.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -module dwt.internal.mozilla.nsIJSContextStack; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IJSCONTEXTSTACK_IID_STR = "c67d8270-3189-11d3-9885-006008962422"; - -const nsIID NS_IJSCONTEXTSTACK_IID= - {0xc67d8270, 0x3189, 0x11d3, - [ 0x98, 0x85, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 ]}; - -extern(System) - -interface nsIJSContextStack : nsISupports { - - static const char[] IID_STR = NS_IJSCONTEXTSTACK_IID_STR; - static const nsIID IID = NS_IJSCONTEXTSTACK_IID; - - nsresult GetCount(PRInt32 *aCount); - nsresult Peek(JSContext * *_retval); - nsresult Pop(JSContext * *_retval); - nsresult Push(JSContext * cx); - -} - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IJSCONTEXTSTACKITERATOR_IID_STR = "c7e6b7aa-fc12-4ca7-b140-98c38b698961"; - -const nsIID NS_IJSCONTEXTSTACKITERATOR_IID= - {0xc7e6b7aa, 0xfc12, 0x4ca7, - [ 0xb1, 0x40, 0x98, 0xc3, 0x8b, 0x69, 0x89, 0x61 ]}; - -extern(System) - -interface nsIJSContextStackIterator : nsISupports { - - static const char[] IID_STR = NS_IJSCONTEXTSTACKITERATOR_IID_STR; - static const nsIID IID = NS_IJSCONTEXTSTACKITERATOR_IID; - - nsresult Reset(nsIJSContextStack stack); - nsresult Done(PRBool *_retval); - nsresult Prev(JSContext * *_retval); - -} - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_ITHREADJSCONTEXTSTACK_IID_STR = "a1339ae0-05c1-11d4-8f92-0010a4e73d9a"; - -const nsIID NS_ITHREADJSCONTEXTSTACK_IID= - {0xa1339ae0, 0x05c1, 0x11d4, - [ 0x8f, 0x92, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a ]}; - -extern(System) - -interface nsIThreadJSContextStack : nsIJSContextStack { - - static const char[] IID_STR = NS_ITHREADJSCONTEXTSTACK_IID_STR; - static const nsIID IID = NS_ITHREADJSCONTEXTSTACK_IID; - - nsresult GetSafeJSContext(JSContext * *aSafeJSContext); - nsresult SetSafeJSContext(JSContext * aSafeJSContext); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsILoadGroup.d --- a/dwt/internal/mozilla/nsILoadGroup.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -module dwt.internal.mozilla.nsILoadGroup; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIRequest; -import dwt.internal.mozilla.nsISimpleEnumerator; -import dwt.internal.mozilla.nsIRequestObserver; -import dwt.internal.mozilla.nsIInterfaceRequestor; - -const char[] NS_ILOADGROUP_IID_STR = "3de0a31c-feaf-400f-9f1e-4ef71f8b20cc"; - -const nsIID NS_ILOADGROUP_IID= - {0x3de0a31c, 0xfeaf, 0x400f, - [ 0x9f, 0x1e, 0x4e, 0xf7, 0x1f, 0x8b, 0x20, 0xcc ]}; - -extern(System) - -interface nsILoadGroup : nsIRequest { - - static const char[] IID_STR = NS_ILOADGROUP_IID_STR; - static const nsIID IID = NS_ILOADGROUP_IID; - - nsresult GetGroupObserver(nsIRequestObserver *aGroupObserver); - nsresult SetGroupObserver(nsIRequestObserver aGroupObserver); - nsresult GetDefaultLoadRequest(nsIRequest *aDefaultLoadRequest); - nsresult SetDefaultLoadRequest(nsIRequest aDefaultLoadRequest); - nsresult AddRequest(nsIRequest aRequest, nsISupports aContext); - nsresult RemoveRequest(nsIRequest aRequest, nsISupports aContext, nsresult aStatus); - nsresult GetRequests(nsISimpleEnumerator *aRequests); - nsresult GetActiveCount(PRUint32 *aActiveCount); - nsresult GetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks); - nsresult SetNotificationCallbacks(nsIInterfaceRequestor aNotificationCallbacks); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsILocalFile.d --- a/dwt/internal/mozilla/nsILocalFile.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -module dwt.internal.mozilla.nsILocalFile; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.prlink; -import dwt.internal.mozilla.prio; -import dwt.internal.mozilla.prtime; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsIFile; -import dwt.internal.mozilla.nsStringAPI; - -import tango.stdc.stdio : FILE; - -const char[] NS_ILOCALFILE_IID_STR = "aa610f20-a889-11d3-8c81-000064657374"; - -const nsIID NS_ILOCALFILE_IID= - {0xaa610f20, 0xa889, 0x11d3, - [ 0x8c, 0x81, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 ]}; - -extern(System) - -interface nsILocalFile : nsIFile { - - static const char[] IID_STR = NS_ILOCALFILE_IID_STR; - static const nsIID IID = NS_ILOCALFILE_IID; - - nsresult InitWithPath(nsAString * filePath); - nsresult InitWithNativePath(nsACString * filePath); - nsresult InitWithFile(nsILocalFile aFile); - nsresult GetFollowLinks(PRBool *aFollowLinks); - nsresult SetFollowLinks(PRBool aFollowLinks); - nsresult OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc * *_retval); - nsresult OpenANSIFileDesc(char *mode, FILE * *_retval); - nsresult Load(PRLibrary * *_retval); - nsresult GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable); - nsresult AppendRelativePath(nsAString * relativeFilePath); - nsresult AppendRelativeNativePath(nsACString * relativeFilePath); - nsresult GetPersistentDescriptor(nsACString * aPersistentDescriptor); - nsresult SetPersistentDescriptor(nsACString * aPersistentDescriptor); - nsresult Reveal(); - nsresult Launch(); - nsresult GetRelativeDescriptor(nsILocalFile fromFile, nsACString * _retval); - nsresult SetRelativeDescriptor(nsILocalFile fromFile, nsACString * relativeDesc); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIMIMEInfo.d --- a/dwt/internal/mozilla/nsIMIMEInfo.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -module dwt.internal.mozilla.nsIMIMEInfo; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIURI; -import dwt.internal.mozilla.nsIFile; -import dwt.internal.mozilla.nsIStringEnumerator; -import dwt.internal.mozilla.nsStringAPI; - -alias PRInt32 nsMIMEInfoHandleAction; - -const char[] NS_IMIMEINFO_IID_STR = "1448b42f-cf0d-466e-9a15-64e876ebe857"; - -const nsIID NS_IMIMEINFO_IID= - {0x1448b42f, 0xcf0d, 0x466e, - [ 0x9a, 0x15, 0x64, 0xe8, 0x76, 0xeb, 0xe8, 0x57 ]}; - -extern(System) - -interface nsIMIMEInfo : nsISupports { - - static const char[] IID_STR = NS_IMIMEINFO_IID_STR; - static const nsIID IID = NS_IMIMEINFO_IID; - - nsresult GetFileExtensions(nsIUTF8StringEnumerator *_retval); - nsresult SetFileExtensions(nsACString * aExtensions); - nsresult ExtensionExists(nsACString * aExtension, PRBool *_retval); - nsresult AppendExtension(nsACString * aExtension); - nsresult GetPrimaryExtension(nsACString * aPrimaryExtension); - nsresult SetPrimaryExtension(nsACString * aPrimaryExtension); - nsresult GetMIMEType(nsACString * aMIMEType); - nsresult SetDescription(nsAString * aDescription); - nsresult GetMacType(PRUint32 *aMacType); - nsresult SetMacType(PRUint32 aMacType); - nsresult GetMacCreator(PRUint32 *aMacCreator); - nsresult SetMacCreator(PRUint32 aMacCreator); - nsresult Equals(nsIMIMEInfo aMIMEInfo, PRBool *_retval); - nsresult GetPreferredApplicationHandler(nsIFile *aPreferredApplicationHandler); - nsresult SetPreferredApplicationHandler(nsIFile aPreferredApplicationHandler); - nsresult GetApplicationDescription(nsAString * aApplicationDescription); - nsresult SetApplicationDescription(nsAString * aApplicationDescription); - nsresult GetHasDefaultHandler(PRBool *aHasDefaultHandler); - nsresult GetDefaultDescription(nsAString * aDefaultDescription); - nsresult LaunchWithFile(nsIFile aFile); - - enum { saveToDisk = 0 }; - enum { alwaysAsk = 1 }; - enum { useHelperApp = 2 }; - enum { handleInternally = 3 }; - enum { useSystemDefault = 4 }; - - nsresult GetPreferredAction(nsMIMEInfoHandleAction *aPreferredAction); - nsresult SetPreferredAction(nsMIMEInfoHandleAction aPreferredAction); - nsresult GetAlwaysAskBeforeHandling(PRBool *aAlwaysAskBeforeHandling); - nsresult SetAlwaysAskBeforeHandling(PRBool aAlwaysAskBeforeHandling); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIMemory.d --- a/dwt/internal/mozilla/nsIMemory.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -module dwt.internal.mozilla.nsIMemory; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_IMEMORY_IID_STR = "59e7e77a-38e4-11d4-8cf5-0060b0fc14a3"; - -const nsIID NS_IMEMORY_IID= - {0x59e7e77a, 0x38e4, 0x11d4, - [ 0x8c, 0xf5, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 ]}; - -extern(System) -interface nsIMemory : nsISupports { - static const char[] IID_STR = NS_IMEMORY_IID_STR; - static const nsIID IID = NS_IMEMORY_IID; - - void * Alloc(size_t size); - void * Realloc(void * ptr, size_t newSize); - void Free(void * ptr); - nsresult HeapMinimize(PRBool immediate); - nsresult IsLowMemory(PRBool *_retval); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIModule.d --- a/dwt/internal/mozilla/nsIModule.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -module dwt.internal.mozilla.nsIModule; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIFile; -import dwt.internal.mozilla.nsIComponentManager; - -const char[] NS_IMODULE_IID_STR = "7392d032-5371-11d3-994e-00805fd26fee"; - -const nsIID NS_IMODULE_IID= - {0x7392d032, 0x5371, 0x11d3, - [ 0x99, 0x4e, 0x00, 0x80, 0x5f, 0xd2, 0x6f, 0xee ]}; - -extern(System) -interface nsIModule : nsISupports { - static const char[] IID_STR = NS_IMODULE_IID_STR; - static const nsIID IID = NS_IMODULE_IID; - - nsresult GetClassObject(nsIComponentManager aCompMgr, nsCID * aClass, nsIID * aIID, void * *aResult); - nsresult RegisterSelf(nsIComponentManager aCompMgr, nsIFile aLocation, char *aLoaderStr, char *aType); - nsresult UnregisterSelf(nsIComponentManager aCompMgr, nsIFile aLocation, char *aLoaderStr); - nsresult CanUnload(nsIComponentManager aCompMgr, PRBool *_retval); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIObjectInputStream.d --- a/dwt/internal/mozilla/nsIObjectInputStream.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -module dwt.internal.mozilla.nsIObjectInputStream; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIBinaryInputStream; - -const char[] NS_IOBJECTINPUTSTREAM_IID_STR = "6c248606-4eae-46fa-9df0-ba58502368eb"; - -const nsIID NS_IOBJECTINPUTSTREAM_IID= - {0x6c248606, 0x4eae, 0x46fa, - [ 0x9d, 0xf0, 0xba, 0x58, 0x50, 0x23, 0x68, 0xeb ]}; - -extern(System) - -interface nsIObjectInputStream : nsIBinaryInputStream { - - static const char[] IID_STR = NS_IOBJECTINPUTSTREAM_IID_STR; - static const nsIID IID = NS_IOBJECTINPUTSTREAM_IID; - - nsresult ReadObject(PRBool aIsStrongRef, nsISupports *_retval); - nsresult ReadID(nsID *aID); - char * GetBuffer(PRUint32 aLength, PRUint32 aAlignMask); - void PutBuffer(char * aBuffer, PRUint32 aLength); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIObjectOutputStream.d --- a/dwt/internal/mozilla/nsIObjectOutputStream.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -module dwt.internal.mozilla.nsIObjectOutputStream; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIBinaryOutputStream; - -const char[] NS_IOBJECTOUTPUTSTREAM_IID_STR = "92c898ac-5fde-4b99-87b3-5d486422094b"; - -const nsIID NS_IOBJECTOUTPUTSTREAM_IID= - {0x92c898ac, 0x5fde, 0x4b99, - [ 0x87, 0xb3, 0x5d, 0x48, 0x64, 0x22, 0x09, 0x4b ]}; - -extern(System) - -interface nsIObjectOutputStream : nsIBinaryOutputStream { - - static const char[] IID_STR = NS_IOBJECTOUTPUTSTREAM_IID_STR; - static const nsIID IID = NS_IOBJECTOUTPUTSTREAM_IID; - - nsresult WriteObject(nsISupports aObject, PRBool aIsStrongRef); - nsresult WriteSingleRefObject(nsISupports aObject); - nsresult WriteCompoundObject(nsISupports aObject, nsIID * aIID, PRBool aIsStrongRef); - nsresult WriteID(nsID * aID); - char * GetBuffer(PRUint32 aLength, PRUint32 aAlignMask); - void PutBuffer(char * aBuffer, PRUint32 aLength); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIObserver.d --- a/dwt/internal/mozilla/nsIObserver.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -module dwt.internal.mozilla.nsIObserver; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_IOBSERVER_IID_STR = "db242e01-e4d9-11d2-9dde-000064657374"; - -const nsIID NS_IOBSERVER_IID= - {0xdb242e01, 0xe4d9, 0x11d2, - [ 0x9d, 0xde, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 ]}; - -extern(System) - -interface nsIObserver : nsISupports { - - static const char[] IID_STR = NS_IOBSERVER_IID_STR; - static const nsIID IID = NS_IOBSERVER_IID; - - nsresult Observe(nsISupports aSubject, char *aTopic, PRUnichar *aData); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIObserverService.d --- a/dwt/internal/mozilla/nsIObserverService.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -module dwt.internal.mozilla.nsIObserverService; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIObserver; -import dwt.internal.mozilla.nsISimpleEnumerator; - -const char[] NS_IOBSERVERSERVICE_IID_STR = "d07f5192-e3d1-11d2-8acd-00105a1b8860"; - -const nsIID NS_IOBSERVERSERVICE_IID= - {0xd07f5192, 0xe3d1, 0x11d2, - [ 0x8a, 0xcd, 0x00, 0x10, 0x5a, 0x1b, 0x88, 0x60 ]}; - -extern(System) - -interface nsIObserverService : nsISupports { - - static const char[] IID_STR = NS_IOBSERVERSERVICE_IID_STR; - static const nsIID IID = NS_IOBSERVERSERVICE_IID; - - nsresult AddObserver(nsIObserver anObserver, char *aTopic, PRBool ownsWeak); - nsresult RemoveObserver(nsIObserver anObserver, char *aTopic); - nsresult NotifyObservers(nsISupports aSubject, char *aTopic, PRUnichar *someData); - nsresult EnumerateObservers(char *aTopic, nsISimpleEnumerator *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIOutputStream.d --- a/dwt/internal/mozilla/nsIOutputStream.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -module dwt.internal.mozilla.nsIOutputStream; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIInputStream; - -typedef nsresult function(nsIOutputStream aOutStream, - void *aClosure, - char *aToSegment, - PRUint32 aFromOffset, - PRUint32 aCount, - PRUint32 *aReadCount) nsReadSegmentFun; - -const char[] NS_IOUTPUTSTREAM_IID_STR = "0d0acd2a-61b4-11d4-9877-00c04fa0cf4a"; - -const nsIID NS_IOUTPUTSTREAM_IID= - {0x0d0acd2a, 0x61b4, 0x11d4, - [ 0x98, 0x77, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a ]}; - -extern(System) - -interface nsIOutputStream : nsISupports { - - static const char[] IID_STR = NS_IOUTPUTSTREAM_IID_STR; - static const nsIID IID = NS_IOUTPUTSTREAM_IID; - - nsresult Close(); - nsresult Flush(); - nsresult Write(char *aBuf, PRUint32 aCount, PRUint32 *_retval); - nsresult WriteFrom(nsIInputStream aFromStream, PRUint32 aCount, PRUint32 *_retval); - nsresult WriteSegments(nsReadSegmentFun aReader, void * aClosure, PRUint32 aCount, PRUint32 *_retval); - nsresult IsNonBlocking(PRBool *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIPrefBranch.d --- a/dwt/internal/mozilla/nsIPrefBranch.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -module dwt.internal.mozilla.nsIPrefBranch; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_IPREFBRANCH_IID_STR = "56c35506-f14b-11d3-99d3-ddbfac2ccf65"; - -const nsIID NS_IPREFBRANCH_IID= - {0x56c35506, 0xf14b, 0x11d3, - [ 0x99, 0xd3, 0xdd, 0xbf, 0xac, 0x2c, 0xcf, 0x65 ]}; - -extern(System) - -interface nsIPrefBranch : nsISupports { - - static const char[] IID_STR = NS_IPREFBRANCH_IID_STR; - static const nsIID IID = NS_IPREFBRANCH_IID; - - enum { PREF_INVALID = 0 }; - enum { PREF_STRING = 32 }; - enum { PREF_INT = 64 }; - enum { PREF_BOOL = 128 }; - - nsresult GetRoot(char * *aRoot); - nsresult GetPrefType(char *aPrefName, PRInt32 *_retval); - nsresult GetBoolPref(char *aPrefName, PRBool *_retval); - nsresult SetBoolPref(char *aPrefName, PRInt32 aValue); - nsresult GetCharPref(char *aPrefName, char **_retval); - nsresult SetCharPref(char *aPrefName, char *aValue); - nsresult GetIntPref(char *aPrefName, PRInt32 *_retval); - nsresult SetIntPref(char *aPrefName, PRInt32 aValue); - nsresult GetComplexValue(char *aPrefName, nsIID * aType, void * *aValue); - nsresult SetComplexValue(char *aPrefName, nsIID * aType, nsISupports aValue); - nsresult ClearUserPref(char *aPrefName); - nsresult LockPref(char *aPrefName); - nsresult PrefHasUserValue(char *aPrefName, PRBool *_retval); - nsresult PrefIsLocked(char *aPrefName, PRBool *_retval); - nsresult UnlockPref(char *aPrefName); - nsresult DeleteBranch(char *aStartingAt); - nsresult GetChildList(char *aStartingAt, PRUint32 *aCount, char ***aChildArray); - nsresult ResetBranch(char *aStartingAt); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIPrefBranch2.d --- a/dwt/internal/mozilla/nsIPrefBranch2.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -module dwt.internal.mozilla.nsIPrefBranch2; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIPrefBranch; -import dwt.internal.mozilla.nsIObserver; - -const char[] NS_IPREFBRANCH2_IID_STR = "74567534-eb94-4b1c-8f45-389643bfc555"; - -const nsIID NS_IPREFBRANCH2_IID= - {0x74567534, 0xeb94, 0x4b1c, - [ 0x8f, 0x45, 0x38, 0x96, 0x43, 0xbf, 0xc5, 0x55 ]}; - -extern(System) - -interface nsIPrefBranch2 : nsIPrefBranch { - - static const char[] IID_STR = NS_IPREFBRANCH2_IID_STR; - static const nsIID IID = NS_IPREFBRANCH2_IID; - - nsresult AddObserver(char *aDomain, nsIObserver aObserver, PRBool aHoldWeak); - nsresult RemoveObserver(char *aDomain, nsIObserver aObserver); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIPrefLocalizedString.d --- a/dwt/internal/mozilla/nsIPrefLocalizedString.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -module dwt.internal.mozilla.nsIPrefLocalizedString; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_IPREFLOCALIZEDSTRING_IID_STR = "ae419e24-1dd1-11b2-b39a-d3e5e7073802"; - -const nsIID NS_IPREFLOCALIZEDSTRING_IID= - {0xae419e24, 0x1dd1, 0x11b2, - [ 0xb3, 0x9a, 0xd3, 0xe5, 0xe7, 0x07, 0x38, 0x02 ]}; - -extern(System) - -interface nsIPrefLocalizedString : nsISupports { - - static const char[] IID_STR = NS_IPREFLOCALIZEDSTRING_IID_STR; - static const nsIID IID = NS_IPREFLOCALIZEDSTRING_IID; - - nsresult GetData(PRUnichar * *aData); - nsresult SetData(PRUnichar * aData); - nsresult ToString(PRUnichar **_retval); - nsresult SetDataWithLength(PRUint32 length, PRUnichar *data); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIPrefService.d --- a/dwt/internal/mozilla/nsIPrefService.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -module dwt.internal.mozilla.nsIPrefService; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIPrefBranch; -import dwt.internal.mozilla.nsIFile; - -const char[] NS_IPREFSERVICE_IID_STR = "decb9cc7-c08f-4ea5-be91-a8fc637ce2d2"; - -const nsIID NS_IPREFSERVICE_IID= - {0xdecb9cc7, 0xc08f, 0x4ea5, - [ 0xbe, 0x91, 0xa8, 0xfc, 0x63, 0x7c, 0xe2, 0xd2 ]}; - -extern(System) - -interface nsIPrefService : nsISupports { - - static const char[] IID_STR = NS_IPREFSERVICE_IID_STR; - static const nsIID IID = NS_IPREFSERVICE_IID; - - nsresult ReadUserPrefs(nsIFile aFile); - nsresult ResetPrefs(); - nsresult ResetUserPrefs(); - nsresult SavePrefFile(nsIFile aFile); - nsresult GetBranch(char *aPrefRoot, nsIPrefBranch *_retval); - nsresult GetDefaultBranch(char *aPrefRoot, nsIPrefBranch *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIProgressDialog.d --- a/dwt/internal/mozilla/nsIProgressDialog.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -module dwt.internal.mozilla.nsIProgressDialog; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIDownload; -import dwt.internal.mozilla.nsIDOMWindow; -import dwt.internal.mozilla.nsIObserver; - -const char[] NS_IPROGRESSDIALOG_IID_STR = "20e790a2-76c6-462d-851a-22ab6cbbe48b"; - -const nsIID NS_IPROGRESSDIALOG_IID= - {0x20e790a2, 0x76c6, 0x462d, - [ 0x85, 0x1a, 0x22, 0xab, 0x6c, 0xbb, 0xe4, 0x8b ]}; - -extern(System) - -interface nsIProgressDialog : nsIDownload { - - static const char[] IID_STR = NS_IPROGRESSDIALOG_IID_STR; - static const nsIID IID = NS_IPROGRESSDIALOG_IID; - - nsresult Open(nsIDOMWindow aParent); - nsresult GetCancelDownloadOnClose(PRBool *aCancelDownloadOnClose); - nsresult SetCancelDownloadOnClose(PRBool aCancelDownloadOnClose); - nsresult GetObserver(nsIObserver *aObserver); - nsresult SetObserver(nsIObserver aObserver); - nsresult GetDialog(nsIDOMWindow *aDialog); - nsresult SetDialog(nsIDOMWindow aDialog); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIPrompt.d --- a/dwt/internal/mozilla/nsIPrompt.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -module dwt.internal.mozilla.nsIPrompt; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_IPROMPT_IID_STR = "a63f70c0-148b-11d3-9333-00104ba0fd40"; - -const nsIID NS_IPROMPT_IID= - {0xa63f70c0, 0x148b, 0x11d3, - [ 0x93, 0x33, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 ]}; - -extern(System) - -interface nsIPrompt : nsISupports { - - static const char[] IID_STR = NS_IPROMPT_IID_STR; - static const nsIID IID = NS_IPROMPT_IID; - - nsresult Alert(PRUnichar *dialogTitle, PRUnichar *text); - nsresult AlertCheck(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar *checkMsg, PRBool *checkValue); - nsresult Confirm(PRUnichar *dialogTitle, PRUnichar *text, PRBool *_retval); - nsresult ConfirmCheck(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval); - - enum { BUTTON_POS_0 = 1U }; - enum { BUTTON_POS_1 = 256U }; - enum { BUTTON_POS_2 = 65536U }; - enum { BUTTON_TITLE_OK = 1U }; - enum { BUTTON_TITLE_CANCEL = 2U }; - enum { BUTTON_TITLE_YES = 3U }; - enum { BUTTON_TITLE_NO = 4U }; - enum { BUTTON_TITLE_SAVE = 5U }; - enum { BUTTON_TITLE_DONT_SAVE = 6U }; - enum { BUTTON_TITLE_REVERT = 7U }; - enum { BUTTON_TITLE_IS_STRING = 127U }; - enum { BUTTON_POS_0_DEFAULT = 0U }; - enum { BUTTON_POS_1_DEFAULT = 16777216U }; - enum { BUTTON_POS_2_DEFAULT = 33554432U }; - enum { BUTTON_DELAY_ENABLE = 67108864U }; - enum { STD_OK_CANCEL_BUTTONS = 513U }; - - nsresult ConfirmEx(PRUnichar *dialogTitle, PRUnichar *text, PRUint32 buttonFlags, PRUnichar *button0Title, PRUnichar *button1Title, PRUnichar *button2Title, PRUnichar *checkMsg, PRBool *checkValue, PRInt32 *_retval); - nsresult Prompt(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar **value, PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval); - nsresult PromptPassword(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar **password, PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval); - nsresult PromptUsernameAndPassword(PRUnichar *dialogTitle, PRUnichar *text, PRUnichar **username, PRUnichar **password, PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval); - nsresult Select(PRUnichar *dialogTitle, PRUnichar *text, PRUint32 count, PRUnichar **selectList, PRInt32 *outSelection, PRBool *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIPromptService.d --- a/dwt/internal/mozilla/nsIPromptService.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -module dwt.internal.mozilla.nsIPromptService; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMWindow; - -const char[] NS_IPROMPTSERVICE_IID_STR = "1630c61a-325e-49ca-8759-a31b16c47aa5"; - -const nsIID NS_IPROMPTSERVICE_IID= - {0x1630c61a, 0x325e, 0x49ca, - [ 0x87, 0x59, 0xa3, 0x1b, 0x16, 0xc4, 0x7a, 0xa5 ]}; - -extern(System) - -interface nsIPromptService : nsISupports { - - static const char[] IID_STR = NS_IPROMPTSERVICE_IID_STR; - static const nsIID IID = NS_IPROMPTSERVICE_IID; - - nsresult Alert(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText); - nsresult AlertCheck(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRUnichar *aCheckMsg, PRBool *aCheckState); - nsresult Confirm(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRBool *_retval); - nsresult ConfirmCheck(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); - - enum { BUTTON_POS_0 = 1U }; - enum { BUTTON_POS_1 = 256U }; - enum { BUTTON_POS_2 = 65536U }; - enum { BUTTON_TITLE_OK = 1U }; - enum { BUTTON_TITLE_CANCEL = 2U }; - enum { BUTTON_TITLE_YES = 3U }; - enum { BUTTON_TITLE_NO = 4U }; - enum { BUTTON_TITLE_SAVE = 5U }; - enum { BUTTON_TITLE_DONT_SAVE = 6U }; - enum { BUTTON_TITLE_REVERT = 7U }; - enum { BUTTON_TITLE_IS_STRING = 127U }; - enum { BUTTON_POS_0_DEFAULT = 0U }; - enum { BUTTON_POS_1_DEFAULT = 16777216U }; - enum { BUTTON_POS_2_DEFAULT = 33554432U }; - enum { BUTTON_DELAY_ENABLE = 67108864U }; - enum { STD_OK_CANCEL_BUTTONS = 513U }; - enum { STD_YES_NO_BUTTONS = 1027U }; - - nsresult ConfirmEx(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRUint32 aButtonFlags, PRUnichar *aButton0Title, PRUnichar *aButton1Title, PRUnichar *aButton2Title, PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval); - nsresult Prompt(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRUnichar **aValue, PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); - nsresult PromptUsernameAndPassword(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); - nsresult PromptPassword(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRUnichar **aPassword, PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); - nsresult Select(nsIDOMWindow aParent, PRUnichar *aDialogTitle, PRUnichar *aText, PRUint32 aCount, PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIProperties.d --- a/dwt/internal/mozilla/nsIProperties.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -module mozilla.xpcom.nsIProperties; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_IPROPERTIES_IID_STR = "78650582-4e93-4b60-8e85-26ebd3eb14ca"; - -const nsIID NS_IPROPERTIES_IID= - {0x78650582, 0x4e93, 0x4b60, - [ 0x8e, 0x85, 0x26, 0xeb, 0xd3, 0xeb, 0x14, 0xca ]}; - -extern(System) - -interface nsIProperties : nsISupports { - - static const char[] IID_STR = NS_IPROPERTIES_IID_STR; - static const nsIID IID = NS_IPROPERTIES_IID; - - nsresult Get(char *prop, nsIID * iid, void * *result); - nsresult Set(char *prop, nsISupports value); - nsresult Has(char *prop, PRBool *_retval); - nsresult Undefine(char *prop); - nsresult GetKeys(PRUint32 *count, char ***keys); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIProtocolHandler.d --- a/dwt/internal/mozilla/nsIProtocolHandler.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -module dwt.internal.mozilla.nsIProtocolHandler; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsIURI; -import dwt.internal.mozilla.nsIChannel; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IPROTOCOLHANDLER_IID_STR = "15fd6940-8ea7-11d3-93ad-00104ba0fd40"; - -const nsIID NS_IPROTOCOLHANDLER_IID= - {0x15fd6940, 0x8ea7, 0x11d3, - [ 0x93, 0xad, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 ]}; - -extern(System) - -interface nsIProtocolHandler : nsISupports { - - static const char[] IID_STR = NS_IPROTOCOLHANDLER_IID_STR; - static const nsIID IID = NS_IPROTOCOLHANDLER_IID; - - nsresult GetScheme(nsACString * aScheme); - nsresult GetDefaultPort(PRInt32 *aDefaultPort); - nsresult GetProtocolFlags(PRUint32 *aProtocolFlags); - nsresult NewURI(nsACString * aSpec, char *aOriginCharset, nsIURI aBaseURI, nsIURI *_retval); - nsresult NewChannel(nsIURI aURI, nsIChannel *_retval); - nsresult AllowPort(PRInt32 port, char *scheme, PRBool *_retval); - - enum { URI_STD = 0U }; - enum { URI_NORELATIVE = 1U }; - enum { URI_NOAUTH = 2U }; - enum { ALLOWS_PROXY = 4U }; - enum { ALLOWS_PROXY_HTTP = 8U }; - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIRequest.d --- a/dwt/internal/mozilla/nsIRequest.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -module dwt.internal.mozilla.nsIRequest; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsILoadGroup; -import dwt.internal.mozilla.nsStringAPI; - -alias PRUint32 nsLoadFlags; - -const char[] NS_IREQUEST_IID_STR = "ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe"; - -const nsIID NS_IREQUEST_IID= - {0xef6bfbd2, 0xfd46, 0x48d8, - [ 0x96, 0xb7, 0x9f, 0x8f, 0x0f, 0xd3, 0x87, 0xfe ]}; - -extern(System) - -interface nsIRequest : nsISupports { - - static const char[] IID_STR = NS_IREQUEST_IID_STR; - static const nsIID IID = NS_IREQUEST_IID; - - nsresult GetName(nsACString * aName); - nsresult IsPending(PRBool *_retval); - nsresult GetStatus(nsresult *aStatus); - nsresult Cancel(nsresult aStatus); - nsresult Suspend(); - nsresult Resume(); - nsresult GetLoadGroup(nsILoadGroup *aLoadGroup); - nsresult SetLoadGroup(nsILoadGroup aLoadGroup); - nsresult GetLoadFlags(nsLoadFlags *aLoadFlags); - nsresult SetLoadFlags(nsLoadFlags aLoadFlags); - - enum { LOAD_NORMAL = 0U }; - enum { LOAD_BACKGROUND = 1U }; - enum { INHIBIT_CACHING = 128U }; - enum { INHIBIT_PERSISTENT_CACHING = 256U }; - enum { LOAD_BYPASS_CACHE = 512U }; - enum { LOAD_FROM_CACHE = 1024U }; - enum { VALIDATE_ALWAYS = 2048U }; - enum { VALIDATE_NEVER = 4096U }; - enum { VALIDATE_ONCE_PER_SESSION = 8192U }; - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIRequestObserver.d --- a/dwt/internal/mozilla/nsIRequestObserver.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -module dwt.internal.mozilla.nsIRequestObserver; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIRequest; - -const char[] NS_IREQUESTOBSERVER_IID_STR = "fd91e2e0-1481-11d3-9333-00104ba0fd40"; - -const nsIID NS_IREQUESTOBSERVER_IID= - {0xfd91e2e0, 0x1481, 0x11d3, - [ 0x93, 0x33, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 ]}; - -extern(System) - -interface nsIRequestObserver : nsISupports { - - static const char[] IID_STR = NS_IREQUESTOBSERVER_IID_STR; - static const nsIID IID = NS_IREQUESTOBSERVER_IID; - - nsresult OnStartRequest(nsIRequest aRequest, nsISupports aContext); - nsresult OnStopRequest(nsIRequest aRequest, nsISupports aContext, nsresult aStatusCode); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsISHEntry.d --- a/dwt/internal/mozilla/nsISHEntry.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -module dwt.internal.mozilla.nsISHEntry; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIHistoryEntry; -import dwt.internal.mozilla.nsIContentViewer; -import dwt.internal.mozilla.nsIURI; -import dwt.internal.mozilla.nsIInputStream; -import dwt.internal.mozilla.nsIDocShellTreeItem; -import dwt.internal.mozilla.nsISupportsArray; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_ISHENTRY_IID_STR = "542a98b9-2889-4922-aaf4-02b6056f4136"; - -const nsIID NS_ISHENTRY_IID= - {0x542a98b9, 0x2889, 0x4922, - [ 0xaa, 0xf4, 0x02, 0xb6, 0x05, 0x6f, 0x41, 0x36 ]}; - -extern(System) - -interface nsISHEntry : nsIHistoryEntry { - - static const char[] IID_STR = NS_ISHENTRY_IID_STR; - static const nsIID IID = NS_ISHENTRY_IID; - - nsresult SetURI(nsIURI aURI); - nsresult GetReferrerURI(nsIURI *aReferrerURI); - nsresult SetReferrerURI(nsIURI aReferrerURI); - nsresult GetContentViewer(nsIContentViewer *aContentViewer); - nsresult SetContentViewer(nsIContentViewer aContentViewer); - nsresult GetSticky(PRBool *aSticky); - nsresult SetSticky(PRBool aSticky); - nsresult GetWindowState(nsISupports *aWindowState); - nsresult SetWindowState(nsISupports aWindowState); - nsresult GetViewerBounds(nsRect * bounds); - nsresult SetViewerBounds(nsRect * bounds); - nsresult AddChildShell(nsIDocShellTreeItem shell); - nsresult ChildShellAt(PRInt32 index, nsIDocShellTreeItem *_retval); - nsresult ClearChildShells(); - nsresult GetRefreshURIList(nsISupportsArray *aRefreshURIList); - nsresult SetRefreshURIList(nsISupportsArray aRefreshURIList); - nsresult SyncPresentationState(); - nsresult SetTitle(nsAString * aTitle); - nsresult GetPostData(nsIInputStream *aPostData); - nsresult SetPostData(nsIInputStream aPostData); - nsresult GetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState); - nsresult SetLayoutHistoryState(nsILayoutHistoryState aLayoutHistoryState); - nsresult GetParent(nsISHEntry *aParent); - nsresult SetParent(nsISHEntry aParent); - nsresult GetLoadType(PRUint32 *aLoadType); - nsresult SetLoadType(PRUint32 aLoadType); - nsresult GetID(PRUint32 *aID); - nsresult SetID(PRUint32 aID); - nsresult GetPageIdentifier(PRUint32 *aPageIdentifier); - nsresult SetPageIdentifier(PRUint32 aPageIdentifier); - nsresult GetCacheKey(nsISupports *aCacheKey); - nsresult SetCacheKey(nsISupports aCacheKey); - nsresult GetSaveLayoutStateFlag(PRBool *aSaveLayoutStateFlag); - nsresult SetSaveLayoutStateFlag(PRBool aSaveLayoutStateFlag); - nsresult GetExpirationStatus(PRBool *aExpirationStatus); - nsresult SetExpirationStatus(PRBool aExpirationStatus); - nsresult GetContentType(nsACString * aContentType); - nsresult SetContentType(nsACString * aContentType); - nsresult SetScrollPosition(PRInt32 x, PRInt32 y); - nsresult GetScrollPosition(PRInt32 *x, PRInt32 *y); - nsresult Create(nsIURI URI, nsAString * title, nsIInputStream inputStream, nsILayoutHistoryState layoutHistoryState, nsISupports cacheKey, nsACString * contentType); - nsresult Clone(nsISHEntry *_retval); - nsresult SetIsSubFrame(PRBool aFlag); - nsresult GetAnyContentViewer(nsISHEntry *ownerEntry, nsIContentViewer *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsISHistory.d --- a/dwt/internal/mozilla/nsISHistory.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -module dwt.internal.mozilla.nsISHistory; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIHistoryEntry; -import dwt.internal.mozilla.nsISHistoryListener; -import dwt.internal.mozilla.nsISimpleEnumerator; - -const char[] NS_ISHISTORY_IID_STR = "7294fe9b-14d8-11d5-9882-00c04fa02f40"; - -const nsIID NS_ISHISTORY_IID= - {0x7294fe9b, 0x14d8, 0x11d5, - [ 0x98, 0x82, 0x00, 0xc0, 0x4f, 0xa0, 0x2f, 0x40 ]}; - -extern(System) - -interface nsISHistory : nsISupports { - - static const char[] IID_STR = NS_ISHISTORY_IID_STR; - static const nsIID IID = NS_ISHISTORY_IID; - - nsresult GetCount(PRInt32 *aCount); - nsresult GetIndex(PRInt32 *aIndex); - nsresult GetMaxLength(PRInt32 *aMaxLength); - nsresult SetMaxLength(PRInt32 aMaxLength); - nsresult GetEntryAtIndex(PRInt32 index, PRBool modifyIndex, nsIHistoryEntry *_retval); - nsresult PurgeHistory(PRInt32 numEntries); - nsresult AddSHistoryListener(nsISHistoryListener aListener); - nsresult RemoveSHistoryListener(nsISHistoryListener aListener); - nsresult GetSHistoryEnumerator(nsISimpleEnumerator *aSHistoryEnumerator); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsISHistoryListener.d --- a/dwt/internal/mozilla/nsISHistoryListener.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -module dwt.internal.mozilla.nsISHistoryListener; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIURI; - -const char[] NS_ISHISTORYLISTENER_IID_STR = "3b07f591-e8e1-11d4-9882-00c04fa02f40"; - -const nsIID NS_ISHISTORYLISTENER_IID= - {0x3b07f591, 0xe8e1, 0x11d4, - [ 0x98, 0x82, 0x00, 0xc0, 0x4f, 0xa0, 0x2f, 0x40 ]}; - -extern(System) - -interface nsISHistoryListener : nsISupports { - - static const char[] IID_STR = NS_ISHISTORYLISTENER_IID_STR; - static const nsIID IID = NS_ISHISTORYLISTENER_IID; - - nsresult OnHistoryNewEntry(nsIURI aNewURI); - nsresult OnHistoryGoBack(nsIURI aBackURI, PRBool *_retval); - nsresult OnHistoryGoForward(nsIURI aForwardURI, PRBool *_retval); - nsresult OnHistoryReload(nsIURI aReloadURI, PRUint32 aReloadFlags, PRBool *_retval); - nsresult OnHistoryGotoIndex(PRInt32 aIndex, nsIURI aGotoURI, PRBool *_retval); - nsresult OnHistoryPurge(PRInt32 aNumEntries, PRBool *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsISecureBrowserUI.d --- a/dwt/internal/mozilla/nsISecureBrowserUI.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -module dwt.internal.mozilla.nsISecureBrowserUI; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMWindow; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_ISECUREBROWSERUI_IID_STR = "081e31e0-a144-11d3-8c7c-00609792278c"; - -const nsIID NS_ISECUREBROWSERUI_IID= - {0x081e31e0, 0xa144, 0x11d3, - [ 0x8c, 0x7c, 0x00, 0x60, 0x97, 0x92, 0x27, 0x8c ]}; - -extern(System) - -interface nsISecureBrowserUI : nsISupports { - - static const char[] IID_STR = NS_ISECUREBROWSERUI_IID_STR; - static const nsIID IID = NS_ISECUREBROWSERUI_IID; - - nsresult Init(nsIDOMWindow window); - nsresult GetState(PRUint32 *aState); - nsresult GetTooltipText(nsAString * aTooltipText); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsISelection.d --- a/dwt/internal/mozilla/nsISelection.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -module dwt.internal.mozilla.nsISelection; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMNode; -import dwt.internal.mozilla.nsIDOMRange; - -const char[] NS_ISELECTION_IID_STR = "b2c7ed59-8634-4352-9e37-5484c8b6e4e1"; - -const nsIID NS_ISELECTION_IID= - {0xb2c7ed59, 0x8634, 0x4352, - [ 0x9e, 0x37, 0x54, 0x84, 0xc8, 0xb6, 0xe4, 0xe1 ]}; - -extern(System) - -interface nsISelection : nsISupports { - - static const char[] IID_STR = NS_ISELECTION_IID_STR; - static const nsIID IID = NS_ISELECTION_IID; - - nsresult GetAnchorNode(nsIDOMNode *aAnchorNode); - nsresult GetAnchorOffset(PRInt32 *aAnchorOffset); - nsresult GetFocusNode(nsIDOMNode *aFocusNode); - nsresult GetFocusOffset(PRInt32 *aFocusOffset); - nsresult GetIsCollapsed(PRBool *aIsCollapsed); - nsresult GetRangeCount(PRInt32 *aRangeCount); - nsresult GetRangeAt(PRInt32 index, nsIDOMRange *_retval); - nsresult Collapse(nsIDOMNode parentNode, PRInt32 offset); - nsresult Extend(nsIDOMNode parentNode, PRInt32 offset); - nsresult CollapseToStart(); - nsresult CollapseToEnd(); - nsresult ContainsNode(nsIDOMNode node, PRBool entirelyContained, PRBool *_retval); - nsresult SelectAllChildren(nsIDOMNode parentNode); - nsresult AddRange(nsIDOMRange range); - nsresult RemoveRange(nsIDOMRange range); - nsresult RemoveAllRanges(); - nsresult DeleteFromDocument(); - nsresult SelectionLanguageChange(PRBool langRTL); - nsresult ToString(PRUnichar **_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsISerializable.d --- a/dwt/internal/mozilla/nsISerializable.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -module dwt.internal.mozilla.nsISerializable; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIObjectInputStream; -import dwt.internal.mozilla.nsIObjectOutputStream; - -const char[] NS_ISERIALIZABLE_IID_STR = "91cca981-c26d-44a8-bebe-d9ed4891503a"; - -const nsIID NS_ISERIALIZABLE_IID= - {0x91cca981, 0xc26d, 0x44a8, - [ 0xbe, 0xbe, 0xd9, 0xed, 0x48, 0x91, 0x50, 0x3a ]}; - -extern(System) - -interface nsISerializable : nsISupports { - - static const char[] IID_STR = NS_ISERIALIZABLE_IID_STR; - static const nsIID IID = NS_ISERIALIZABLE_IID; - - nsresult Read(nsIObjectInputStream aInputStream); - nsresult Write(nsIObjectOutputStream aOutputStream); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIServiceManager.d --- a/dwt/internal/mozilla/nsIServiceManager.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -module dwt.internal.mozilla.nsIServiceManager; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_ISERVICEMANAGER_IID_STR = "8bb35ed9-e332-462d-9155-4a002ab5c958"; -const nsIID NS_ISERVICEMANAGER_IID= - {0x8bb35ed9, 0xe332, 0x462d, - [ 0x91, 0x55, 0x4a, 0x00, 0x2a, 0xb5, 0xc9, 0x58 ]}; - -extern(System) - -interface nsIServiceManager : nsISupports { - - static const char[] IID_STR = NS_ISERVICEMANAGER_IID_STR; - static const nsIID IID = NS_ISERVICEMANAGER_IID; - - nsresult GetService(nsCID * aClass, nsIID * aIID, void * *result); - nsresult GetServiceByContractID(char *aContractID, nsIID * aIID, void * *result); - nsresult IsServiceInstantiated(nsCID * aClass, nsIID * aIID, PRBool *_retval); - nsresult IsServiceInstantiatedByContractID(char *aContractID, nsIID * aIID, PRBool *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsISimpleEnumerator.d --- a/dwt/internal/mozilla/nsISimpleEnumerator.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -module dwt.internal.mozilla.nsISimpleEnumerator; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_ISIMPLEENUMERATOR_IID_STR = "d1899240-f9d2-11d2-bdd6-000064657374"; - -const nsIID NS_ISIMPLEENUMERATOR_IID= - {0xd1899240, 0xf9d2, 0x11d2, - [ 0xbd, 0xd6, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 ]}; - -extern(System) - -interface nsISimpleEnumerator : nsISupports { - - static const char[] IID_STR = NS_ISIMPLEENUMERATOR_IID_STR; - static const nsIID IID = NS_ISIMPLEENUMERATOR_IID; - - nsresult HasMoreElements(PRBool *_retval); - nsresult GetNext(nsISupports *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIStreamListener.d --- a/dwt/internal/mozilla/nsIStreamListener.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -module dwt.internal.mozilla.nsIStreamListener; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIRequestObserver; -import dwt.internal.mozilla.nsIRequest; -import dwt.internal.mozilla.nsIInputStream; - -const char[] NS_ISTREAMLISTENER_IID_STR = "1a637020-1482-11d3-9333-00104ba0fd40"; - -const nsIID NS_ISTREAMLISTENER_IID= - {0x1a637020, 0x1482, 0x11d3, - [ 0x93, 0x33, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 ]}; - -extern(System) - -interface nsIStreamListener : nsIRequestObserver { - - static const char[] IID_STR = NS_ISTREAMLISTENER_IID_STR; - static const nsIID IID = NS_ISTREAMLISTENER_IID; - - nsresult OnDataAvailable(nsIRequest aRequest, nsISupports aContext, nsIInputStream aInputStream, PRUint32 aOffset, PRUint32 aCount); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIStringEnumerator.d --- a/dwt/internal/mozilla/nsIStringEnumerator.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -module dwt.internal.mozilla.nsIStringEnumerator; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsStringAPI; - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_ISTRINGENUMERATOR_IID_STR = "50d3ef6c-9380-4f06-9fb2-95488f7d141c"; - -const nsIID NS_ISTRINGENUMERATOR_IID= - {0x50d3ef6c, 0x9380, 0x4f06, - [ 0x9f, 0xb2, 0x95, 0x48, 0x8f, 0x7d, 0x14, 0x1c ]}; - -extern(System) - -interface nsIStringEnumerator : nsISupports { - - static const char[] IID_STR = NS_ISTRINGENUMERATOR_IID_STR; - static const nsIID IID = NS_ISTRINGENUMERATOR_IID; - - nsresult HasMore(PRBool *_retval); - nsresult GetNext(nsAString * _retval); - -} - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IUTF8STRINGENUMERATOR_IID_STR = "9bdf1010-3695-4907-95ed-83d0410ec307"; - -const nsIID NS_IUTF8STRINGENUMERATOR_IID= - {0x9bdf1010, 0x3695, 0x4907, - [ 0x95, 0xed, 0x83, 0xd0, 0x41, 0x0e, 0xc3, 0x07 ]}; - -extern(System) - -interface nsIUTF8StringEnumerator : nsISupports { - - static const char[] IID_STR = NS_IUTF8STRINGENUMERATOR_IID_STR; - static const nsIID IID = NS_IUTF8STRINGENUMERATOR_IID; - - nsresult HasMore(PRBool *_retval); - nsresult GetNext(nsACString * _retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsISupports.d --- a/dwt/internal/mozilla/nsISupports.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -module dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; - -const char[] NS_ISUPPORTS_IID_STR = "00000000-0000-0000-c000-000000000046"; - -const nsIID NS_ISUPPORTS_IID= - { 0x00000000, 0x0000, 0x0000, - [ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 ] }; - -extern(System) - -interface IUnknown -{ - static const char[] IID_STR = NS_ISUPPORTS_IID_STR; - static const nsIID IID = NS_ISUPPORTS_IID; - - nsresult QueryInterface(nsIID * uuid, void **result); - - nsrefcnt AddRef(); - nsrefcnt Release(); -} - -// WHY WE USE COM's IUnknown for XPCOM: -// -// The IUnknown interface is special-cased in D and is specifically designed to be -// compatible with MS COM. XPCOM's nsISupports interface is the exact equivalent -// of IUnknown so we alias it here to take advantage of D's COM support. -JJR - -alias IUnknown nsISupports; \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsISupportsArray.d --- a/dwt/internal/mozilla/nsISupportsArray.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -module dwt.internal.mozilla.nsISupportsArray; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsICollection; - -typedef PRBool function(nsISupports, void*) nsISupportsArrayEnumFunc; - -const char[] NS_ISUPPORTSARRAY_IID_STR = "791eafa0-b9e6-11d1-8031-006008159b5a"; - -const nsIID NS_ISUPPORTSARRAY_IID= - {0x791eafa0, 0xb9e6, 0x11d1, - [ 0x80, 0x31, 0x00, 0x60, 0x08, 0x15, 0x9b, 0x5a ]}; - -extern(System) - -interface nsISupportsArray : nsICollection { - - static const char[] IID_STR = NS_ISUPPORTSARRAY_IID_STR; - static const nsIID IID = NS_ISUPPORTSARRAY_IID; - - PRBool Equals(nsISupportsArray other); - nsISupports ElementAt(PRUint32 aIndex); - PRInt32 IndexOf(nsISupports aPossibleElement); - PRInt32 IndexOfStartingAt(nsISupports aPossibleElement, PRUint32 aStartIndex); - PRInt32 LastIndexOf(nsISupports aPossibleElement); - nsresult GetIndexOf(nsISupports aPossibleElement, PRInt32 *_retval); - nsresult GetIndexOfStartingAt(nsISupports aPossibleElement, PRUint32 aStartIndex, PRInt32 *_retval); - nsresult GetLastIndexOf(nsISupports aPossibleElement, PRInt32 *_retval); - PRBool InsertElementAt(nsISupports aElement, PRUint32 aIndex); - PRBool ReplaceElementAt(nsISupports aElement, PRUint32 aIndex); - PRBool RemoveElementAt(PRUint32 aIndex); - PRBool RemoveLastElement(nsISupports aElement); - nsresult DeleteLastElement(nsISupports aElement); - nsresult DeleteElementAt(PRUint32 aIndex); - PRBool AppendElements(nsISupportsArray aElements); - nsresult Compact(); - PRBool EnumerateForwards(nsISupportsArrayEnumFunc aFunc, void * aData); - PRBool EnumerateBackwards(nsISupportsArrayEnumFunc aFunc, void * aData); - nsresult Clone(nsISupportsArray *_retval); - PRBool MoveElement(PRInt32 aFrom, PRInt32 aTo); - PRBool InsertElementsAt(nsISupportsArray aOther, PRUint32 aIndex); - PRBool RemoveElementsAt(PRUint32 aIndex, PRUint32 aCount); - PRBool SizeTo(PRInt32 aSize); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsITooltipListener.d --- a/dwt/internal/mozilla/nsITooltipListener.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -module dwt.internal.mozilla.nsITooltipListener; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_ITOOLTIPLISTENER_IID_STR = "44b78386-1dd2-11b2-9ad2-e4eee2ca1916"; - -const nsIID NS_ITOOLTIPLISTENER_IID= - {0x44b78386, 0x1dd2, 0x11b2, - [ 0x9a, 0xd2, 0xe4, 0xee, 0xe2, 0xca, 0x19, 0x16 ]}; - -extern(System) - -interface nsITooltipListener : nsISupports { - - static const char[] IID_STR = NS_ITOOLTIPLISTENER_IID_STR; - static const nsIID IID = NS_ITOOLTIPLISTENER_IID; - - nsresult OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, PRUnichar *aTipText); - nsresult OnHideTooltip(); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsITraceRefcnt.d --- a/dwt/internal/mozilla/nsITraceRefcnt.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -module dwt.internal.mozilla.nsITraceRefcnt; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_ITRACEREFCNT_IID_STR = "273dc92f-0fe6-4545-96a9-21be77828039"; - -const nsIID NS_ITRACEREFCNT_IID= - {0x273dc92f, 0x0fe6, 0x4545, - [ 0x96, 0xa9, 0x21, 0xbe, 0x77, 0x82, 0x80, 0x39 ]}; - -extern(System) -interface nsITraceRefcnt : nsISupports { - static const char[] IID_STR = NS_ITRACEREFCNT_IID_STR; - static const nsIID IID = NS_ITRACEREFCNT_IID; - - nsresult LogAddRef(void * aPtr, nsrefcnt aNewRefcnt, char *aTypeName, PRUint32 aInstanceSize); - nsresult LogRelease(void * aPtr, nsrefcnt aNewRefcnt, char *aTypeName); - nsresult LogCtor(void * aPtr, char *aTypeName, PRUint32 aInstanceSize); - nsresult LogDtor(void * aPtr, char *aTypeName, PRUint32 aInstanceSize); - nsresult LogAddCOMPtr(void * aPtr, nsISupports aObject); - nsresult LogReleaseCOMPtr(void * aPtr, nsISupports aObject); -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsITransfer.d --- a/dwt/internal/mozilla/nsITransfer.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -module dwt.internal.mozilla.nsITransfer; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.prtime; - -import dwt.internal.mozilla.nsIWebProgressListener2; -import dwt.internal.mozilla.nsIURI; -import dwt.internal.mozilla.nsICancelable; -import dwt.internal.mozilla.nsIMIMEInfo; -import dwt.internal.mozilla.nsILocalFile; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_ITRANSFER_IID_STR = "23c51569-e9a1-4a92-adeb-3723db82ef7c"; - -const nsIID NS_ITRANSFER_IID= - {0x23c51569, 0xe9a1, 0x4a92, - [ 0xad, 0xeb, 0x37, 0x23, 0xdb, 0x82, 0xef, 0x7c ]}; - -extern(System) - -interface nsITransfer : nsIWebProgressListener2 { - - static const char[] IID_STR = NS_ITRANSFER_IID_STR; - static const nsIID IID = NS_ITRANSFER_IID; - - nsresult Init(nsIURI aSource, nsIURI aTarget, nsAString * aDisplayName, nsIMIMEInfo aMIMEInfo, PRTime startTime, nsILocalFile aTempFile, nsICancelable aCancelable); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIURI.d --- a/dwt/internal/mozilla/nsIURI.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -module dwt.internal.mozilla.nsIURI; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IURI_IID_STR = "07a22cc0-0ce5-11d3-9331-00104ba0fd40"; - -const nsIID NS_IURI_IID= - {0x07a22cc0, 0x0ce5, 0x11d3, - [ 0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 ]}; - -extern(System) - -interface nsIURI : nsISupports { - - static const char[] IID_STR = NS_IURI_IID_STR; - static const nsIID IID = NS_IURI_IID; - - nsresult GetSpec(nsACString * aSpec); - nsresult SetSpec(nsACString * aSpec); - nsresult GetPrePath(nsACString * aPrePath); - nsresult GetScheme(nsACString * aScheme); - nsresult SetScheme(nsACString * aScheme); - nsresult GetUserPass(nsACString * aUserPass); - nsresult SetUserPass(nsACString * aUserPass); - nsresult GetUsername(nsACString * aUsername); - nsresult SetUsername(nsACString * aUsername); - nsresult GetPassword(nsACString * aPassword); - nsresult SetPassword(nsACString * aPassword); - nsresult GetHostPort(nsACString * aHostPort); - nsresult SetHostPort(nsACString * aHostPort); - nsresult GetHost(nsACString * aHost); - nsresult SetHost(nsACString * aHost); - nsresult GetPort(PRInt32 *aPort); - nsresult SetPort(PRInt32 aPort); - nsresult GetPath(nsACString * aPath); - nsresult SetPath(nsACString * aPath); - nsresult Equals(nsIURI other, PRBool *_retval); - nsresult SchemeIs(char *scheme, PRBool *_retval); - nsresult Clone(nsIURI *_retval); - nsresult Resolve(nsACString * relativePath, nsACString * _retval); - nsresult GetAsciiSpec(nsACString * aAsciiSpec); - nsresult GetAsciiHost(nsACString * aAsciiHost); - nsresult GetOriginCharset(nsACString * aOriginCharset); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIURIContentListener.d --- a/dwt/internal/mozilla/nsIURIContentListener.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -module dwt.internal.mozilla.nsIURIContentListener; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIRequest; -import dwt.internal.mozilla.nsIStreamListener; -import dwt.internal.mozilla.nsIURI; - -const char[] NS_IURICONTENTLISTENER_IID_STR = "94928ab3-8b63-11d3-989d-001083010e9b"; - -const nsIID NS_IURICONTENTLISTENER_IID= - {0x94928ab3, 0x8b63, 0x11d3, - [ 0x98, 0x9d, 0x00, 0x10, 0x83, 0x01, 0x0e, 0x9b ]}; - -extern(System) - -interface nsIURIContentListener : nsISupports { - - static const char[] IID_STR = NS_IURICONTENTLISTENER_IID_STR; - static const nsIID IID = NS_IURICONTENTLISTENER_IID; - - nsresult OnStartURIOpen(nsIURI aURI, PRBool *_retval); - nsresult DoContent(char *aContentType, PRBool aIsContentPreferred, nsIRequest aRequest, nsIStreamListener *aContentHandler, PRBool *_retval); - nsresult IsPreferred(char *aContentType, char **aDesiredContentType, PRBool *_retval); - nsresult CanHandleContent(char *aContentType, PRBool aIsContentPreferred, char **aDesiredContentType, PRBool *_retval); - nsresult GetLoadCookie(nsISupports *aLoadCookie); - nsresult SetLoadCookie(nsISupports aLoadCookie); - nsresult GetParentContentListener(nsIURIContentListener *aParentContentListener); - nsresult SetParentContentListener(nsIURIContentListener aParentContentListener); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIURL.d --- a/dwt/internal/mozilla/nsIURL.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -module dwt.internal.mozilla.nsIURL; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsIURI; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IURL_IID_STR = "d6116970-8034-11d3-9399-00104ba0fd40"; - -const nsIID NS_IURL_IID= - {0xd6116970, 0x8034, 0x11d3, - [ 0x93, 0x99, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 ]}; - -extern(System) - -interface nsIURL : nsIURI { - - static const char[] IID_STR = NS_IURL_IID_STR; - static const nsIID IID = NS_IURL_IID; - - nsresult GetFilePath(nsACString * aFilePath); - nsresult SetFilePath(nsACString * aFilePath); - nsresult GetParam(nsACString * aParam); - nsresult SetParam(nsACString * aParam); - nsresult GetQuery(nsACString * aQuery); - nsresult SetQuery(nsACString * aQuery); - nsresult GetRef(nsACString * aRef); - nsresult SetRef(nsACString * aRef); - nsresult GetDirectory(nsACString * aDirectory); - nsresult SetDirectory(nsACString * aDirectory); - nsresult GetFileName(nsACString * aFileName); - nsresult SetFileName(nsACString * aFileName); - nsresult GetFileBaseName(nsACString * aFileBaseName); - nsresult SetFileBaseName(nsACString * aFileBaseName); - nsresult GetFileExtension(nsACString * aFileExtension); - nsresult SetFileExtension(nsACString * aFileExtension); - nsresult GetCommonBaseSpec(nsIURI aURIToCompare, nsACString * _retval); - nsresult GetRelativeSpec(nsIURI aURIToCompare, nsACString * _retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIWeakReference.d --- a/dwt/internal/mozilla/nsIWeakReference.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -module dwt.internal.mozilla.nsIWeakReference; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_IWEAKREFERENCE_IID_STR = "9188bc85-f92e-11d2-81ef-0060083a0bcf"; - -const nsIID NS_IWEAKREFERENCE_IID= - {0x9188bc85, 0xf92e, 0x11d2, - [ 0x81, 0xef, 0x00, 0x60, 0x08, 0x3a, 0x0b, 0xcf ]}; - -extern(System) - -interface nsIWeakReference : nsISupports { - - static const char[] IID_STR = NS_IWEAKREFERENCE_IID_STR; - static const nsIID IID = NS_IWEAKREFERENCE_IID; - - nsresult QueryReferent(nsIID * uuid, void * *result); - -} - -/****************************************************************************** - -******************************************************************************/ - -const char[] NS_ISUPPORTSWEAKREFERENCE_IID_STR = "9188bc86-f92e-11d2-81ef-0060083a0bcf"; - -const nsIID NS_ISUPPORTSWEAKREFERENCE_IID= - {0x9188bc86, 0xf92e, 0x11d2, - [ 0x81, 0xef, 0x00, 0x60, 0x08, 0x3a, 0x0b, 0xcf ]}; - -extern(System) - -interface nsISupportsWeakReference : nsISupports { - - static const char[] IID_STR = NS_ISUPPORTSWEAKREFERENCE_IID_STR; - static const nsIID IID = NS_ISUPPORTSWEAKREFERENCE_IID; - - nsresult GetWeakReference(nsIWeakReference *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIWebBrowser.d --- a/dwt/internal/mozilla/nsIWebBrowser.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -module dwt.internal.mozilla.nsIWebBrowser; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIWebBrowserChrome; -import dwt.internal.mozilla.nsIURIContentListener; -import dwt.internal.mozilla.nsIDOMWindow; -import dwt.internal.mozilla.nsIWeakReference; - -const char[] NS_IWEBBROWSER_IID_STR = "69e5df00-7b8b-11d3-af61-00a024ffc08c"; - -const nsIID NS_IWEBBROWSER_IID= - {0x69e5df00, 0x7b8b, 0x11d3, - [ 0xaf, 0x61, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; - -extern(System) - -interface nsIWebBrowser : nsISupports { - - static const char[] IID_STR = NS_IWEBBROWSER_IID_STR; - static const nsIID IID = NS_IWEBBROWSER_IID; - - nsresult AddWebBrowserListener(nsIWeakReference aListener, nsIID * aIID); - nsresult RemoveWebBrowserListener(nsIWeakReference aListener, nsIID * aIID); - nsresult GetContainerWindow(nsIWebBrowserChrome *aContainerWindow); - nsresult SetContainerWindow(nsIWebBrowserChrome aContainerWindow); - nsresult GetParentURIContentListener(nsIURIContentListener *aParentURIContentListener); - nsresult SetParentURIContentListener(nsIURIContentListener aParentURIContentListener); - nsresult GetContentDOMWindow(nsIDOMWindow *aContentDOMWindow); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIWebBrowserChrome.d --- a/dwt/internal/mozilla/nsIWebBrowserChrome.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -module dwt.internal.mozilla.nsIWebBrowserChrome; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIWebBrowser; - -const char[] NS_IWEBBROWSERCHROME_IID_STR = "ba434c60-9d52-11d3-afb0-00a024ffc08c"; - -const nsIID NS_IWEBBROWSERCHROME_IID= - {0xba434c60, 0x9d52, 0x11d3, - [ 0xaf, 0xb0, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; - -extern(System) - -interface nsIWebBrowserChrome : nsISupports { - - static const char[] IID_STR = NS_IWEBBROWSERCHROME_IID_STR; - static const nsIID IID = NS_IWEBBROWSERCHROME_IID; - - enum { STATUS_SCRIPT = 1U }; - enum { STATUS_SCRIPT_DEFAULT = 2U }; - enum { STATUS_LINK = 3U }; - - nsresult SetStatus(PRUint32 statusType, PRUnichar *status); - nsresult GetWebBrowser(nsIWebBrowser *aWebBrowser); - nsresult SetWebBrowser(nsIWebBrowser aWebBrowser); - - enum { CHROME_DEFAULT = 1U }; - enum { CHROME_WINDOW_BORDERS = 2U }; - enum { CHROME_WINDOW_CLOSE = 4U }; - enum { CHROME_WINDOW_RESIZE = 8U }; - enum { CHROME_MENUBAR = 16U }; - enum { CHROME_TOOLBAR = 32U }; - enum { CHROME_LOCATIONBAR = 64U }; - enum { CHROME_STATUSBAR = 128U }; - enum { CHROME_PERSONAL_TOOLBAR = 256U }; - enum { CHROME_SCROLLBARS = 512U }; - enum { CHROME_TITLEBAR = 1024U }; - enum { CHROME_EXTRA = 2048U }; - enum { CHROME_WITH_SIZE = 4096U }; - enum { CHROME_WITH_POSITION = 8192U }; - enum { CHROME_WINDOW_MIN = 16384U }; - enum { CHROME_WINDOW_POPUP = 32768U }; - enum { CHROME_WINDOW_RAISED = 33554432U }; - enum { CHROME_WINDOW_LOWERED = 67108864U }; - enum { CHROME_CENTER_SCREEN = 134217728U }; - enum { CHROME_DEPENDENT = 268435456U }; - enum { CHROME_MODAL = 536870912U }; - enum { CHROME_OPENAS_DIALOG = 1073741824U }; - enum { CHROME_OPENAS_CHROME = 2147483648U }; - enum { CHROME_ALL = 4094U }; - - nsresult GetChromeFlags(PRUint32 *aChromeFlags); - nsresult SetChromeFlags(PRUint32 aChromeFlags); - nsresult DestroyBrowserWindow(); - nsresult SizeBrowserTo(PRInt32 aCX, PRInt32 aCY); - nsresult ShowAsModal(); - nsresult IsWindowModal(PRBool *_retval); - nsresult ExitModalEventLoop(nsresult aStatus); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIWebBrowserChromeFocus.d --- a/dwt/internal/mozilla/nsIWebBrowserChromeFocus.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -module dwt.internal.mozilla.nsIWebBrowserChromeFocus; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -const char[] NS_IWEBBROWSERCHROMEFOCUS_IID_STR = "d2206418-1dd1-11b2-8e55-acddcd2bcfb8"; - -const nsIID NS_IWEBBROWSERCHROMEFOCUS_IID= - {0xd2206418, 0x1dd1, 0x11b2, - [ 0x8e, 0x55, 0xac, 0xdd, 0xcd, 0x2b, 0xcf, 0xb8 ]}; - -extern(System) - -interface nsIWebBrowserChromeFocus : nsISupports { - - static const char[] IID_STR = NS_IWEBBROWSERCHROMEFOCUS_IID_STR; - static const nsIID IID = NS_IWEBBROWSERCHROMEFOCUS_IID; - - nsresult FocusNextElement(); - nsresult FocusPrevElement(); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIWebBrowserFocus.d --- a/dwt/internal/mozilla/nsIWebBrowserFocus.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -module dwt.internal.mozilla.nsIWebBrowserFocus; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIDOMWindow; -import dwt.internal.mozilla.nsIDOMElement; - -const char[] NS_IWEBBROWSERFOCUS_IID_STR = "9c5d3c58-1dd1-11b2-a1c9-f3699284657a"; - -const nsIID NS_IWEBBROWSERFOCUS_IID= - {0x9c5d3c58, 0x1dd1, 0x11b2, - [ 0xa1, 0xc9, 0xf3, 0x69, 0x92, 0x84, 0x65, 0x7a ]}; - -extern(System) - -interface nsIWebBrowserFocus : nsISupports { - - static const char[] IID_STR = NS_IWEBBROWSERFOCUS_IID_STR; - static const nsIID IID = NS_IWEBBROWSERFOCUS_IID; - - nsresult Activate(); - nsresult Deactivate(); - nsresult SetFocusAtFirstElement(); - nsresult SetFocusAtLastElement(); - nsresult GetFocusedWindow(nsIDOMWindow *aFocusedWindow); - nsresult SetFocusedWindow(nsIDOMWindow aFocusedWindow); - nsresult GetFocusedElement(nsIDOMElement *aFocusedElement); - nsresult SetFocusedElement(nsIDOMElement aFocusedElement); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIWebNavigation.d --- a/dwt/internal/mozilla/nsIWebNavigation.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -module dwt.internal.mozilla.nsIWebNavigation; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMDocument; -import dwt.internal.mozilla.nsIInputStream; -import dwt.internal.mozilla.nsISHistory; -import dwt.internal.mozilla.nsIURI; - -const char[] NS_IWEBNAVIGATION_IID_STR = "f5d9e7b0-d930-11d3-b057-00a024ffc08c"; - -const nsIID NS_IWEBNAVIGATION_IID= - {0xf5d9e7b0, 0xd930, 0x11d3, - [ 0xb0, 0x57, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; - -extern(System) - -interface nsIWebNavigation : nsISupports { - - static const char[] IID_STR = NS_IWEBNAVIGATION_IID_STR; - static const nsIID IID = NS_IWEBNAVIGATION_IID; - - nsresult GetCanGoBack(PRBool *aCanGoBack); - nsresult GetCanGoForward(PRBool *aCanGoForward); - nsresult GoBack(); - nsresult GoForward(); - nsresult GotoIndex(PRInt32 index); - - enum { LOAD_FLAGS_MASK = 65535U }; - enum { LOAD_FLAGS_NONE = 0U }; - enum { LOAD_FLAGS_IS_REFRESH = 16U }; - enum { LOAD_FLAGS_IS_LINK = 32U }; - enum { LOAD_FLAGS_BYPASS_HISTORY = 64U }; - enum { LOAD_FLAGS_REPLACE_HISTORY = 128U }; - enum { LOAD_FLAGS_BYPASS_CACHE = 256U }; - enum { LOAD_FLAGS_BYPASS_PROXY = 512U }; - enum { LOAD_FLAGS_CHARSET_CHANGE = 1024U }; - enum { LOAD_FLAGS_STOP_CONTENT = 2048U }; - enum { LOAD_FLAGS_FROM_EXTERNAL = 4096U }; - enum { LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 8192U }; - enum { LOAD_FLAGS_FIRST_LOAD = 16384U }; - - nsresult LoadURI(PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI aReferrer, nsIInputStream aPostData, nsIInputStream aHeaders); - nsresult Reload(PRUint32 aReloadFlags); - - enum { STOP_NETWORK = 1U }; - enum { STOP_CONTENT = 2U }; - enum { STOP_ALL = 3U }; - - nsresult Stop(PRUint32 aStopFlags); - nsresult GetDocument(nsIDOMDocument *aDocument); - nsresult GetCurrentURI(nsIURI *aCurrentURI); - nsresult GetReferringURI(nsIURI *aReferringURI); - nsresult GetSessionHistory(nsISHistory *aSessionHistory); - nsresult SetSessionHistory(nsISHistory aSessionHistory); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIWebNavigationInfo.d --- a/dwt/internal/mozilla/nsIWebNavigationInfo.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -module dwt.internal.mozilla.nsIWebNavigationInfo; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; -import dwt.internal.mozilla.nsIWebNavigation; -import dwt.internal.mozilla.nsStringAPI; - -const char[] NS_IWEBNAVIGATIONINFO_IID_STR = "62a93afb-93a1-465c-84c8-0432264229de"; - -const nsIID NS_IWEBNAVIGATIONINFO_IID= - {0x62a93afb, 0x93a1, 0x465c, - [ 0x84, 0xc8, 0x04, 0x32, 0x26, 0x42, 0x29, 0xde ]}; - -extern(System) - -interface nsIWebNavigationInfo : nsISupports { - - static const char[] IID_STR = NS_IWEBNAVIGATIONINFO_IID_STR; - static const nsIID IID = NS_IWEBNAVIGATIONINFO_IID; - - enum { UNSUPPORTED = 0U }; - enum { IMAGE = 1U }; - enum { PLUGIN = 2U }; - enum { OTHER = 32768U }; - - nsresult IsTypeSupported(nsACString * aType, nsIWebNavigation aWebNav, PRUint32 *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIWebProgress.d --- a/dwt/internal/mozilla/nsIWebProgress.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -module dwt.internal.mozilla.nsIWebProgress; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMWindow; -import dwt.internal.mozilla.nsIWebProgressListener; - -const char[] NS_IWEBPROGRESS_IID_STR = "570f39d0-efd0-11d3-b093-00a024ffc08c"; - -const nsIID NS_IWEBPROGRESS_IID= - {0x570f39d0, 0xefd0, 0x11d3, - [ 0xb0, 0x93, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; - -extern(System) - -interface nsIWebProgress : nsISupports { - - static const char[] IID_STR = NS_IWEBPROGRESS_IID_STR; - static const nsIID IID = NS_IWEBPROGRESS_IID; - - enum { NOTIFY_STATE_REQUEST = 1U }; - enum { NOTIFY_STATE_DOCUMENT = 2U }; - enum { NOTIFY_STATE_NETWORK = 4U }; - enum { NOTIFY_STATE_WINDOW = 8U }; - enum { NOTIFY_STATE_ALL = 15U }; - enum { NOTIFY_PROGRESS = 16U }; - enum { NOTIFY_STATUS = 32U }; - enum { NOTIFY_SECURITY = 64U }; - enum { NOTIFY_LOCATION = 128U }; - enum { NOTIFY_ALL = 255U }; - - nsresult AddProgressListener(nsIWebProgressListener aListener, PRUint32 aNotifyMask); - nsresult RemoveProgressListener(nsIWebProgressListener aListener); - nsresult GetDOMWindow(nsIDOMWindow *aDOMWindow); - nsresult GetIsLoadingDocument(PRBool *aIsLoadingDocument); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIWebProgressListener.d --- a/dwt/internal/mozilla/nsIWebProgressListener.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -module dwt.internal.mozilla.nsIWebProgressListener; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIWebProgress; -import dwt.internal.mozilla.nsIRequest; -import dwt.internal.mozilla.nsIURI; - -const char[] NS_IWEBPROGRESSLISTENER_IID_STR = "570f39d1-efd0-11d3-b093-00a024ffc08c"; - -const nsIID NS_IWEBPROGRESSLISTENER_IID= - {0x570f39d1, 0xefd0, 0x11d3, - [ 0xb0, 0x93, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; - -extern(System) - -interface nsIWebProgressListener : nsISupports { - - static const char[] IID_STR = NS_IWEBPROGRESSLISTENER_IID_STR; - static const nsIID IID = NS_IWEBPROGRESSLISTENER_IID; - - enum { STATE_START = 1U }; - enum { STATE_REDIRECTING = 2U }; - enum { STATE_TRANSFERRING = 4U }; - enum { STATE_NEGOTIATING = 8U }; - enum { STATE_STOP = 16U }; - enum { STATE_IS_REQUEST = 65536U }; - enum { STATE_IS_DOCUMENT = 131072U }; - enum { STATE_IS_NETWORK = 262144U }; - enum { STATE_IS_WINDOW = 524288U }; - enum { STATE_RESTORING = 16777216U }; - enum { STATE_IS_INSECURE = 4U }; - enum { STATE_IS_BROKEN = 1U }; - enum { STATE_IS_SECURE = 2U }; - enum { STATE_SECURE_HIGH = 262144U }; - enum { STATE_SECURE_MED = 65536U }; - enum { STATE_SECURE_LOW = 131072U }; - - nsresult OnStateChange(nsIWebProgress aWebProgress, nsIRequest aRequest, PRUint32 aStateFlags, nsresult aStatus); - nsresult OnProgressChange(nsIWebProgress aWebProgress, nsIRequest aRequest, PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress, PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress); - nsresult OnLocationChange(nsIWebProgress aWebProgress, nsIRequest aRequest, nsIURI aLocation); - nsresult OnStatusChange(nsIWebProgress aWebProgress, nsIRequest aRequest, nsresult aStatus, PRUnichar *aMessage); - nsresult OnSecurityChange(nsIWebProgress aWebProgress, nsIRequest aRequest, PRUint32 aState); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIWebProgressListener2.d --- a/dwt/internal/mozilla/nsIWebProgressListener2.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -module dwt.internal.mozilla.nsIWebProgressListener2; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; - -import dwt.internal.mozilla.nsIWebProgressListener; -import dwt.internal.mozilla.nsIWebProgress; -import dwt.internal.mozilla.nsIRequest; - -const char[] NS_IWEBPROGRESSLISTENER2_IID_STR = "3f24610d-1e1f-4151-9d2e-239884742324"; - -const nsIID NS_IWEBPROGRESSLISTENER2_IID= - {0x3f24610d, 0x1e1f, 0x4151, - [ 0x9d, 0x2e, 0x23, 0x98, 0x84, 0x74, 0x23, 0x24 ]}; - -extern(System) - -interface nsIWebProgressListener2 : nsIWebProgressListener { - - static const char[] IID_STR = NS_IWEBPROGRESSLISTENER2_IID_STR; - static const nsIID IID = NS_IWEBPROGRESSLISTENER2_IID; - - nsresult OnProgressChange64(nsIWebProgress aWebProgress, nsIRequest aRequest, PRInt64 aCurSelfProgress, PRInt64 aMaxSelfProgress, PRInt64 aCurTotalProgress, PRInt64 aMaxTotalProgress); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIWindowCreator.d --- a/dwt/internal/mozilla/nsIWindowCreator.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -module dwt.internal.mozilla.nsIWindowCreator; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIWebBrowserChrome; - -const char[] NS_IWINDOWCREATOR_IID_STR = "30465632-a777-44cc-90f9-8145475ef999"; - -const nsIID NS_IWINDOWCREATOR_IID= - {0x30465632, 0xa777, 0x44cc, - [ 0x90, 0xf9, 0x81, 0x45, 0x47, 0x5e, 0xf9, 0x99 ]}; - -extern(System) - -interface nsIWindowCreator : nsISupports { - - static const char[] IID_STR = NS_IWINDOWCREATOR_IID_STR; - static const nsIID IID = NS_IWINDOWCREATOR_IID; - - nsresult CreateChromeWindow(nsIWebBrowserChrome parent, PRUint32 chromeFlags, nsIWebBrowserChrome *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIWindowCreator2.d --- a/dwt/internal/mozilla/nsIWindowCreator2.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -module dwt.internal.mozilla.nsIWindowCreator2; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; - -import dwt.internal.mozilla.nsIWindowCreator; -import dwt.internal.mozilla.nsIURI; -import dwt.internal.mozilla.nsIWebBrowserChrome; - -const char[] NS_IWINDOWCREATOR2_IID_STR = "f673ec81-a4b0-11d6-964b-eb5a2bf216fc"; - -const nsIID NS_IWINDOWCREATOR2_IID= - {0xf673ec81, 0xa4b0, 0x11d6, - [ 0x96, 0x4b, 0xeb, 0x5a, 0x2b, 0xf2, 0x16, 0xfc ]}; - -extern(System) - -interface nsIWindowCreator2 : nsIWindowCreator { - - static const char[] IID_STR = NS_IWINDOWCREATOR2_IID_STR; - static const nsIID IID = NS_IWINDOWCREATOR2_IID; - - enum { PARENT_IS_LOADING_OR_RUNNING_TIMEOUT = 1U }; - nsresult CreateChromeWindow2(nsIWebBrowserChrome parent, PRUint32 chromeFlags, PRUint32 contextFlags, nsIURI uri, PRBool *cancel, nsIWebBrowserChrome *_retval); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsIWindowWatcher.d --- a/dwt/internal/mozilla/nsIWindowWatcher.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -module dwt.internal.mozilla.nsIWindowWatcher; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsID; -import dwt.internal.mozilla.nsISupports; - -import dwt.internal.mozilla.nsIDOMWindow; -import dwt.internal.mozilla.nsIObserver; -import dwt.internal.mozilla.nsIPrompt; -import dwt.internal.mozilla.nsIAuthPrompt; -import dwt.internal.mozilla.nsISimpleEnumerator; -import dwt.internal.mozilla.nsIWebBrowserChrome; -import dwt.internal.mozilla.nsIWindowCreator; - -const char[] NS_IWINDOWWATCHER_IID_STR = "002286a8-494b-43b3-8ddd-49e3fc50622b"; - -const nsIID NS_IWINDOWWATCHER_IID= - {0x002286a8, 0x494b, 0x43b3, - [ 0x8d, 0xdd, 0x49, 0xe3, 0xfc, 0x50, 0x62, 0x2b ]}; - -extern(System) - -interface nsIWindowWatcher : nsISupports { - - static const char[] IID_STR = NS_IWINDOWWATCHER_IID_STR; - static const nsIID IID = NS_IWINDOWWATCHER_IID; - - nsresult OpenWindow(nsIDOMWindow aParent, char *aUrl, char *aName, char *aFeatures, nsISupports aArguments, nsIDOMWindow *_retval); - nsresult RegisterNotification(nsIObserver aObserver); - nsresult UnregisterNotification(nsIObserver aObserver); - nsresult GetWindowEnumerator(nsISimpleEnumerator *_retval); - nsresult GetNewPrompter(nsIDOMWindow aParent, nsIPrompt *_retval); - nsresult GetNewAuthPrompter(nsIDOMWindow aParent, nsIAuthPrompt *_retval); - nsresult SetWindowCreator(nsIWindowCreator creator); - nsresult GetChromeForWindow(nsIDOMWindow aWindow, nsIWebBrowserChrome *_retval); - nsresult GetWindowByName(PRUnichar *aTargetName, nsIDOMWindow aCurrentWindow, nsIDOMWindow *_retval); - nsresult GetActiveWindow(nsIDOMWindow *aActiveWindow); - nsresult SetActiveWindow(nsIDOMWindow aActiveWindow); - -} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsStringAPI.d --- a/dwt/internal/mozilla/nsStringAPI.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,176 +0,0 @@ -module dwt.internal.mozilla.nsStringAPI; - -import dwt.internal.mozilla.Common; - -extern (System): - -/****************************************************************************** - -******************************************************************************/ - -enum -{ - NS_STRING_CONTAINER_INIT_DEPEND = 2, - NS_STRING_CONTAINER_INIT_ADOPT = 4, - NS_STRING_CONTAINER_INIT_SUBSTRING = 8, -} - -nsresult NS_StringContainerInit ( nsStringContainer *aContainer ); -nsresult NS_StringContainerInit2( nsStringContainer *aContainer, PRUnichar *aData, PRUint32 aDataLength, PRUint32 aFlags ); -void NS_StringContainerFinish(nsStringContainer *aContainer); -PRUint32 NS_StringGetData(nsAString *aStr, PRUnichar **aData, PRBool *aTerminated); -PRUint32 NS_StringGetMutableData(nsAString *aStr, PRUint32 aDataLength, PRUnichar **aData); -PRUnichar * NS_StringCloneData(nsAString *aStr); -nsresult NS_StringSetData(nsAString *aStr, PRUnichar *aData, PRUint32 aDataLength); -nsresult NS_StringSetDataRange( nsAString *aStr, PRUint32 aCutOffset, PRUint32 aCutLength, PRUnichar *aData, PRUint32 aDataLength ); -nsresult NS_StringCopy(nsAString *aDestStr, nsAString *aSrcStr); - -/****************************************************************************** - -******************************************************************************/ - -enum -{ - NS_CSTRING_CONTAINER_INIT_DEPEND = 2, - NS_CSTRING_CONTAINER_INIT_ADOPT = 4, - NS_CSTRING_CONTAINER_INIT_SUBSTRING = 8, -} - -nsresult NS_CStringContainerInit( nsCStringContainer *aContainer ); -nsresult NS_CStringContainerInit2( nsCStringContainer *aContainer, char *aData, PRUint32 aDataLength, PRUint32 aFlags ); -void NS_CStringContainerFinish( nsCStringContainer *aContainer ); -PRUint32 NS_CStringGetData( nsACString *aStr, char **aData, PRBool *aTerminated ); -PRUint32 NS_CStringGetMutableData( nsACString *aStr, PRUint32 aDataLength, char **aData ); -char * NS_CStringCloneData( nsACString *aStr); -nsresult NS_CStringSetData( nsACString *aStr, char *aData, PRUint32 aDataLength ); -nsresult NS_CStringSetDataRange( nsACString *aStr, PRUint32 aCutOffset, - PRUint32 aCutLength, char *aData, PRUint32 aDataLength ); -nsresult NS_CStringCopy( nsACString *aDestStr, nsACString *aSrcStr ); - -/****************************************************************************** - -******************************************************************************/ - -enum nsCStringEncoding -{ - NS_CSTRING_ENCODING_ASCII, - NS_CSTRING_ENCODING_UTF8, - NS_CSTRING_ENCODING_NATIVE_FILESYSTEM, -} - -nsresult NS_CStringToUTF16( nsACString *aSource, int aSrcEncoding, nsAString *aDest ); -nsresult NS_UTF16ToCString( nsAString *aSource, int aDestEncoding, nsACString *aDest ); - -/****************************************************************************** - -******************************************************************************/ - -alias nsAString nsAString_external; -alias nsACString nsACString_external; - -alias nsAString nsEmbedString; -alias nsACString nsEmbedCString; - -struct nsAString -{ - static nsAString opCall(wchar[] s) - { - nsAString result; - NS_StringSetData(&result, cast(PRUnichar*)s, uint.max); - return result; - } - - private: - void *v; -} - -struct nsACString -{ - static nsACString opCall(char[] s) - { - nsACString result; - NS_CStringSetData(&result, cast(char*)s, uint.max); - return result; - } - - private: - void *v; -} - -/****************************************************************************** - -******************************************************************************/ - -struct nsStringContainer// : public nsAString -{ -private: - void* v; - void* d1; - uint d2; - void* d3; -} - -struct nsCStringContainer// : public nsACString -{ -private: - void* v; - void* d1; - uint d2; - void* d3; -} - -/****************************************************************************** - -******************************************************************************/ - -// import mozilla.xpcom.nsDebug; - -alias nsString_external nsString; -alias nsCString_external nsCString; -alias nsDependentString_external nsDependentString; -alias nsDependentCString_external nsDependentCString; -alias NS_ConvertASCIItoUTF16_external NS_ConvertASCIItoUTF16; -alias NS_ConvertUTF8toUTF16_external NS_ConvertUTF8toUTF16; -alias NS_ConvertUTF16toUTF8_external NS_ConvertUTF16toUTF8; -alias NS_LossyConvertUTF16toASCII_external NS_LossyConvertUTF16toASCII; -alias nsGetterCopies_external nsGetterCopies; -alias nsCGetterCopies_external nsCGetterCopies; -alias nsDependentSubstring_external nsDependentSubstring; -alias nsDependentCSubstring_external nsDependentCSubstring; - -struct nsString_external{} -struct nsCString_external{} -struct nsDependentString_external{} -struct nsDependentCString_external{} -struct NS_ConvertASCIItoUTF16_external{} -struct NS_ConvertUTF8toUTF16_external{} -struct NS_ConvertUTF16toUTF8_external{} -struct NS_LossyConvertUTF16toASCII_external{} - -/****************************************************************************** - -******************************************************************************/ - -struct nsGetterCopies_external -{ - private: - alias PRUnichar char_type; - nsString_external *mString; - char_type *mData; -} - -struct nsCGetterCopies_external -{ - private: - alias char char_type; - nsCString_external *mString; - char_type *mData; -} - -/****************************************************************************** - -******************************************************************************/ - -struct nsDependentSubstring_external{} -struct nsDependentCSubstring_external{} - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsXPCOM.d --- a/dwt/internal/mozilla/nsXPCOM.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/****************************************************************************** - -module dwt.internal.mozilla.nsXPCOM; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.nsStringAPI; -import dwt.internal.mozilla.nsIModule; -import dwt.internal.mozilla.nsIComponentManager; -import dwt.internal.mozilla.nsIComponentRegistrar; -import dwt.internal.mozilla.nsIServiceManager; -import dwt.internal.mozilla.nsIFile; -import dwt.internal.mozilla.nsILocalFile; -import dwt.internal.mozilla.nsIDirectoryService; -import dwt.internal.mozilla.nsIMemory; -import dwt.internal.mozilla.nsIDebug; -import dwt.internal.mozilla.nsITraceRefcnt; - -/****************************************************************************** - -******************************************************************************/ - -extern (System): - -struct nsStaticModuleInfo -{ - char *name; - nsGetModuleProc getModule; -} - -alias nsresult function (nsIComponentManager, nsIFile, nsIModule*) nsGetModuleProc; - -/****************************************************************************** - -******************************************************************************/ - -nsresult NS_InitXPCOM2( nsIServiceManager *result, nsIFile binDirectory, - nsIDirectoryServiceProvider appFileLocationProvider ); -nsresult NS_InitXPCOM3( nsIServiceManager *result, nsIFile binDirectory, - nsIDirectoryServiceProvider appFileLocationProvider, - nsStaticModuleInfo* staticComponents, - PRUint32 componentCount ); - -nsresult NS_ShutdownXPCOM(nsIServiceManager servMgr); -nsresult NS_GetServiceManager(nsIServiceManager *result); -nsresult NS_GetComponentManager(nsIComponentManager *result); -nsresult NS_GetComponentRegistrar(nsIComponentRegistrar *result); -nsresult NS_GetMemoryManager(nsIMemory *result); -nsresult NS_NewLocalFile(inout nsAString path, PRBool followLinks, nsILocalFile** result); -nsresult NS_NewNativeLocalFile(inout nsACString path, PRBool followLinks, nsILocalFile** result); -void * NS_Alloc(PRSize size); -void * NS_Realloc(void *ptr, PRSize size); -void NS_Free(void *ptr); -nsresult NS_GetDebug(nsIDebug **result); -nsresult NS_GetTraceRefcnt(nsITraceRefcnt *result); diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/nsXPCOMGlue.d --- a/dwt/internal/mozilla/nsXPCOMGlue.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -module dwt.internal.mozilla.nsXPCOMGlue; - -extern(C): - -align(4): - -struct GREVersionRange { - char *lower; - int lowerInclusive; - char *upper; - int upperInclusive; -} - -struct GREProperty { - char *property; - char *value; -} - -uint GRE_GetGREPathWithProperties(GREVersionRange *versions, - int versionsLength, - GREProperty *properties, - uint propertiesLength, - char *buffer, uint buflen); - -uint XPCOMGlueStartup(char* xpcomFile); - -alias void function() NSFuncPtr; - -struct nsDynamicFunctionLoad -{ - char *functionName; - NSFuncPtr *func; -} - -uint XPCOMGlueLoadXULFunctions(nsDynamicFunctionLoad *symbols); -uint XPCOMGlueShutdown(); - diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/prinrval.d --- a/dwt/internal/mozilla/prinrval.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -module dwt.internal.mozilla.prinrval; - -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -import dwt.internal.mozilla.Common; - -extern (System): - -alias PRUint32 PRIntervalTime; - -const PR_INTERVAL_MIN = 1000U; -const PR_INTERVAL_MAX = 100000U; -const PR_INTERVAL_NO_WAIT = 0U; -const PR_INTERVAL_NO_TIMEOUT = 0xffffffffU; - -version(NON_XPCOM_GLUE) -{ - PRIntervalTime PR_IntervalNow(); - PRUint32 PR_TicksPerSecond(); - PRIntervalTime PR_SecondsToInterval(PRUint32 seconds); - PRIntervalTime PR_MillisecondsToInterval(PRUint32 milli); - PRIntervalTime PR_MicrosecondsToInterval(PRUint32 micro); - PRUint32 PR_IntervalToSeconds(PRIntervalTime ticks); - PRUint32 PR_IntervalToMilliseconds(PRIntervalTime ticks); - PRUint32 PR_IntervalToMicroseconds(PRIntervalTime ticks); -} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/prio.d --- a/dwt/internal/mozilla/prio.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,517 +0,0 @@ -module dwt.internal.mozilla.prio; - -import dwt.internal.mozilla.Common; -import dwt.internal.mozilla.prtime; -import dwt.internal.mozilla.prinrval; - -extern (System): - -alias PRIntn PRDescIdentity; -alias void PRFilePrivate; - -struct PRFileDesc -{ - PRIOMethods *methods; - PRFilePrivate *secret; - PRFileDesc *lower; - PRFileDesc *higher; - void function(PRFileDesc *fd)dtor; - PRDescIdentity identity; -} - -enum PRTransmitFileFlags -{ - PR_TRANSMITFILE_KEEP_OPEN, - PR_TRANSMITFILE_CLOSE_SOCKET, -} - -const PR_AF_INET = 2; -const PR_AF_LOCAL = 1; -const PR_INADDR_LOOPBACK = 0x7f000001; -const PR_AF_UNSPEC = 0; - -union _N2 -{ - PRUint8 [16]_S6_u8; - PRUint16 [8]_S6_u16; - PRUint32 [4]_S6_u32; - PRUint64 [2]_S6_u64; -} - -struct PRIPv6Addr -{ - struct _N2{ - union - { - PRUint8 [16]_S6_u8; - PRUint16 [8]_S6_u16; - PRUint32 [4]_S6_u32; - PRUint64 [2]_S6_u64; - } - } - _N2 _S6_un; -} - -struct _N3 -{ - PRUint16 family; - char [14]data; -} - -struct _N4 -{ - PRUint16 family; - PRUint16 port; - PRUint32 ip; - char [8]pad; -} - -struct _N5 -{ - PRUint16 family; - PRUint16 port; - PRUint32 flowinfo; - PRIPv6Addr ip; - PRUint32 scope_id; -} - -union PRNetAddr -{ - struct _N3 - { - PRUint16 family; - char [14]data; - } - _N3 raw; - struct _N4 - { - PRUint16 family; - PRUint16 port; - PRUint32 ip; - char [8]pad; - } - _N4 inet; - struct _N5 - { - PRUint16 family; - PRUint16 port; - PRUint32 flowinfo; - PRIPv6Addr ip; - PRUint32 scope_id; - } - _N5 ipv6; -} - -enum PRSockOption -{ - PR_SockOpt_Nonblocking, - PR_SockOpt_Linger, - PR_SockOpt_Reuseaddr, - PR_SockOpt_Keepalive, - PR_SockOpt_RecvBufferSize, - PR_SockOpt_SendBufferSize, - PR_SockOpt_IpTimeToLive, - PR_SockOpt_IpTypeOfService, - PR_SockOpt_AddMember, - PR_SockOpt_DropMember, - PR_SockOpt_McastInterface, - PR_SockOpt_McastTimeToLive, - PR_SockOpt_McastLoopback, - PR_SockOpt_NoDelay, - PR_SockOpt_MaxSegment, - PR_SockOpt_Broadcast, - PR_SockOpt_Last, -} - -struct PRLinger -{ - PRBool polarity; - PRIntervalTime linger; -} - -struct PRMcastRequest -{ - PRNetAddr mcaddr; - PRNetAddr ifaddr; -} - -union _N6 -{ - PRUintn ip_ttl; - PRUintn mcast_ttl; - PRUintn tos; - PRBool non_blocking; - PRBool reuse_addr; - PRBool keep_alive; - PRBool mcast_loopback; - PRBool no_delay; - PRBool broadcast; - PRSize max_segment; - PRSize recv_buffer_size; - PRSize send_buffer_size; - PRLinger linger; - PRMcastRequest add_member; - PRMcastRequest drop_member; - PRNetAddr mcast_if; -} - -struct PRSocketOptionData -{ - int option; - union _N6 - { - PRUintn ip_ttl; - PRUintn mcast_ttl; - PRUintn tos; - PRBool non_blocking; - PRBool reuse_addr; - PRBool keep_alive; - PRBool mcast_loopback; - PRBool no_delay; - PRBool broadcast; - PRSize max_segment; - PRSize recv_buffer_size; - PRSize send_buffer_size; - PRLinger linger; - PRMcastRequest add_member; - PRMcastRequest drop_member; - PRNetAddr mcast_if; - } - _N6 value; -} - -struct PRIOVec -{ - char *iov_base; - int iov_len; -} - -enum PRDescType -{ - PR_DESC_FILE = 1, - PR_DESC_SOCKET_TCP, - PR_DESC_SOCKET_UDP, - PR_DESC_LAYERED, - PR_DESC_PIPE, -} - -enum PRSeekWhence -{ - PR_SEEK_SET, - PR_SEEK_CUR, - PR_SEEK_END, -} - -version(NON_XPCOM_GLUE){ - int PR_GetDescType(PRFileDesc *file); -} - -alias PRStatus function(PRFileDesc *fd)PRCloseFN; -alias PRInt32 function(PRFileDesc *fd, void *buf, PRInt32 amount)PRReadFN; -alias PRInt32 function(PRFileDesc *fd, void *buf, PRInt32 amount)PRWriteFN; -alias PRInt32 function(PRFileDesc *fd)PRAvailableFN; -alias PRInt64 function(PRFileDesc *fd)PRAvailable64FN; -alias PRStatus function(PRFileDesc *fd)PRFsyncFN; -alias PROffset32 function(PRFileDesc *fd, PROffset32 offset, int how)PRSeekFN; -alias PROffset64 function(PRFileDesc *fd, PROffset64 offset, int how)PRSeek64FN; -alias PRStatus function(PRFileDesc *fd, PRFileInfo *info)PRFileInfoFN; -alias PRStatus function(PRFileDesc *fd, PRFileInfo64 *info)PRFileInfo64FN; -alias PRInt32 function(PRFileDesc *fd, PRIOVec *iov, PRInt32 iov_size, PRIntervalTime timeout)PRWritevFN; -alias PRStatus function(PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout)PRConnectFN; -alias PRFileDesc * function(PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout)PRAcceptFN; -alias PRStatus function(PRFileDesc *fd, PRNetAddr *addr)PRBindFN; -alias PRStatus function(PRFileDesc *fd, PRIntn backlog)PRListenFN; -alias PRStatus function(PRFileDesc *fd, PRIntn how)PRShutdownFN; -alias PRInt32 function(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout)PRRecvFN; -alias PRInt32 function(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout)PRSendFN; -alias PRInt32 function(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout)PRRecvfromFN; -alias PRInt32 function(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout)PRSendtoFN; -alias PRInt16 function(PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags)PRPollFN; -alias PRInt32 function(PRFileDesc *sd, PRFileDesc **nd, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime t)PRAcceptreadFN; -alias PRInt32 function(PRFileDesc *sd, PRFileDesc *fd, void *headers, PRInt32 hlen, int flags, PRIntervalTime t)PRTransmitfileFN; -alias PRStatus function(PRFileDesc *fd, PRNetAddr *addr)PRGetsocknameFN; -alias PRStatus function(PRFileDesc *fd, PRNetAddr *addr)PRGetpeernameFN; -alias PRStatus function(PRFileDesc *fd, PRSocketOptionData *data)PRGetsocketoptionFN; -alias PRStatus function(PRFileDesc *fd, PRSocketOptionData *data)PRSetsocketoptionFN; -alias PRInt32 function(PRFileDesc *networkSocket, PRSendFileData *sendData, int flags, PRIntervalTime timeout)PRSendfileFN; -alias PRStatus function(PRFileDesc *fd, PRInt16 out_flags)PRConnectcontinueFN; -alias PRIntn function(PRFileDesc *fd)PRReservedFN; - -struct PRIOMethods -{ - int file_type; - PRCloseFN close; - PRReadFN read; - PRWriteFN write; - PRAvailableFN available; - PRAvailable64FN available64; - PRFsyncFN fsync; - PRSeekFN seek; - PRSeek64FN seek64; - PRFileInfoFN fileInfo; - PRFileInfo64FN fileInfo64; - PRWritevFN writev; - PRConnectFN connect; - PRAcceptFN accept; - PRBindFN bind; - PRListenFN listen; - PRShutdownFN shutdown; - PRRecvFN recv; - PRSendFN send; - PRRecvfromFN recvfrom; - PRSendtoFN sendto; - PRPollFN poll; - PRAcceptreadFN acceptread; - PRTransmitfileFN transmitfile; - PRGetsocknameFN getsockname; - PRGetpeernameFN getpeername; - PRReservedFN reserved_fn_6; - PRReservedFN reserved_fn_5; - PRGetsocketoptionFN getsocketoption; - PRSetsocketoptionFN setsocketoption; - PRSendfileFN sendfile; - PRConnectcontinueFN connectcontinue; - PRReservedFN reserved_fn_3; - PRReservedFN reserved_fn_2; - PRReservedFN reserved_fn_1; - PRReservedFN reserved_fn_0; -} - -enum PRSpecialFD -{ - PR_StandardInput, - PR_StandardOutput, - PR_StandardError, -} - -version(NON_XPCOM_GLUE) -{ - PRFileDesc * PR_GetSpecialFD(int id); - PRDescIdentity PR_GetUniqueIdentity(char *layer_name); - char * PR_GetNameForIdentity(PRDescIdentity ident); - PRDescIdentity PR_GetLayersIdentity(PRFileDesc *fd); - PRFileDesc * PR_GetIdentitiesLayer(PRFileDesc *fd_stack, PRDescIdentity id); - PRIOMethods * PR_GetDefaultIOMethods(); - PRFileDesc * PR_CreateIOLayerStub(PRDescIdentity ident, PRIOMethods *methods); - PRFileDesc * PR_CreateIOLayer(PRFileDesc *fd); - PRStatus PR_PushIOLayer(PRFileDesc *fd_stack, PRDescIdentity id, PRFileDesc *layer); - PRFileDesc * PR_PopIOLayer(PRFileDesc *fd_stack, PRDescIdentity id); -} - -const PR_RDONLY = 0x01; -const PR_WRONLY = 0x02; -const PR_RDWR = 0x04; -const PR_CREATE_FILE = 0x08; -const PR_APPEND = 0x10; -const PR_TRUNCATE = 0x20; -const PR_SYNC = 0x40; -const PR_EXCL = 0x80; - -version(NON_XPCOM_GLUE) { - PRFileDesc * PR_Open(char *name, PRIntn flags, PRIntn mode); -} - -const PR_IRWXU = 00700; -const PR_IRUSR = 00400; -const PR_IWUSR = 00200; -const PR_IXUSR = 00100; -const PR_IRWXG = 00070; -const PR_IRGRP = 00040; -const PR_IWGRP = 00020; -const PR_IXGRP = 00010; -const PR_IRWXO = 00007; -const PR_IROTH = 00004; -const PR_IWOTH = 00002; -const PR_IXOTH = 00001; - -version(NON_XPCOM_GLUE) -{ - PRFileDesc * PR_OpenFile(char *name, PRIntn flags, PRIntn mode); - PRStatus PR_Close(PRFileDesc *fd); - PRInt32 PR_Read(PRFileDesc *fd, void *buf, PRInt32 amount); - PRInt32 PR_Write(PRFileDesc *fd, void *buf, PRInt32 amount); -} - -const PR_MAX_IOVECTOR_SIZE = 16; - -version(NON_XPCOM_GLUE) -{ - PRInt32 PR_Writev(PRFileDesc *fd, PRIOVec *iov, PRInt32 iov_size, PRIntervalTime timeout); - PRStatus PR_Delete(char *name); -} - -enum PRFileType -{ - PR_FILE_FILE = 1, - PR_FILE_DIRECTORY, - PR_FILE_OTHER, -} - -struct PRFileInfo -{ - int type; - PROffset32 size; - PRTime creationTime; - PRTime modifyTime; -} - -struct PRFileInfo64 -{ - int type; - PROffset64 size; - PRTime creationTime; - PRTime modifyTime; -} - -version (NON_XPCOM_GLUE) -{ - PRStatus PR_GetFileInfo(char *fn, PRFileInfo *info); - PRStatus PR_GetFileInfo64(char *fn, PRFileInfo64 *info); - PRStatus PR_GetOpenFileInfo(PRFileDesc *fd, PRFileInfo *info); - PRStatus PR_GetOpenFileInfo64(PRFileDesc *fd, PRFileInfo64 *info); - PRStatus PR_Rename(char *from, char *to); -} - -enum PRAccessHow -{ - PR_ACCESS_EXISTS = 1, - PR_ACCESS_WRITE_OK, - PR_ACCESS_READ_OK, -} - -version(NON_XPCOM_GLUE) -{ - PRStatus PR_Access(char *name, int how); - PROffset32 PR_Seek(PRFileDesc *fd, PROffset32 offset, int whence); - PROffset64 PR_Seek64(PRFileDesc *fd, PROffset64 offset, int whence); - PRInt32 PR_Available(PRFileDesc *fd); - PRInt64 PR_Available64(PRFileDesc *fd); - PRStatus PR_Sync(PRFileDesc *fd); -} - -struct PRDirEntry -{ - char *name; -} - -alias void PRDir; - -version(NON_XPCOM_GLUE) { - PRDir * PR_OpenDir(char *name); -} - -enum PRDirFlags -{ - PR_SKIP_NONE, - PR_SKIP_DOT, - PR_SKIP_DOT_DOT, - PR_SKIP_BOTH, - PR_SKIP_HIDDEN, -} - -version(NON_XPCOM_GLUE) -{ - PRDirEntry * PR_ReadDir(PRDir *dir, int flags); - PRStatus PR_CloseDir(PRDir *dir); - PRStatus PR_MkDir(char *name, PRIntn mode); - PRStatus PR_MakeDir(char *name, PRIntn mode); - PRStatus PR_RmDir(char *name); - PRFileDesc * PR_NewUDPSocket(); - PRFileDesc * PR_NewTCPSocket(); - PRFileDesc * PR_OpenUDPSocket(PRIntn af); - PRFileDesc * PR_OpenTCPSocket(PRIntn af); - PRStatus PR_Connect(PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout); - PRStatus PR_ConnectContinue(PRFileDesc *fd, PRInt16 out_flags); - PRStatus PR_GetConnectStatus(PRPollDesc *pd); - PRFileDesc * PR_Accept(PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout); - PRStatus PR_Bind(PRFileDesc *fd, PRNetAddr *addr); - PRStatus PR_Listen(PRFileDesc *fd, PRIntn backlog); -} - -enum PRShutdownHow -{ - PR_SHUTDOWN_RCV, - PR_SHUTDOWN_SEND, - PR_SHUTDOWN_BOTH, -} - -version(NON_XPCOM_GLUE) { - PRStatus PR_Shutdown(PRFileDesc *fd, int how); -} - -const PR_MSG_PEEK = 0x2; - -version(NON_XPCOM_GLUE) -{ - PRInt32 PR_Recv(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout); - PRInt32 PR_Send(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout); - PRInt32 PR_RecvFrom(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout); - PRInt32 PR_SendTo(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout); - PRInt32 PR_TransmitFile(PRFileDesc *networkSocket, PRFileDesc *sourceFile, void *headers, PRInt32 hlen, int flags, PRIntervalTime timeout); -} - -struct PRSendFileData -{ - PRFileDesc *fd; - PRUint32 file_offset; - PRSize file_nbytes; - void *header; - PRInt32 hlen; - void *trailer; - PRInt32 tlen; -} - -version(NON_XPCOM_GLUE) -{ - PRInt32 PR_SendFile(PRFileDesc *networkSocket, PRSendFileData *sendData, int flags, PRIntervalTime timeout); - PRInt32 PR_AcceptRead(PRFileDesc *listenSock, PRFileDesc **acceptedSock, PRNetAddr **peerAddr, void *buf, PRInt32 amount, PRIntervalTime timeout); - PRStatus PR_NewTCPSocketPair(PRFileDesc **fds); - PRStatus PR_GetSockName(PRFileDesc *fd, PRNetAddr *addr); - PRStatus PR_GetPeerName(PRFileDesc *fd, PRNetAddr *addr); - PRStatus PR_GetSocketOption(PRFileDesc *fd, PRSocketOptionData *data); - PRStatus PR_SetSocketOption(PRFileDesc *fd, PRSocketOptionData *data); - PRStatus PR_SetFDInheritable(PRFileDesc *fd, PRBool inheritable); - PRFileDesc * PR_GetInheritedFD(char *name); -} - -enum PRFileMapProtect -{ - PR_PROT_READONLY, - PR_PROT_READWRITE, - PR_PROT_WRITECOPY, -} - -alias void PRFileMap; - -version(NON_XPCOM_GLUE) -{ - PRFileMap * PR_CreateFileMap(PRFileDesc *fd, PRInt64 size, int prot); - PRInt32 PR_GetMemMapAlignment(); - void * PR_MemMap(PRFileMap *fmap, PROffset64 offset, PRUint32 len); - PRStatus PR_MemUnmap(void *addr, PRUint32 len); - PRStatus PR_CloseFileMap(PRFileMap *fmap); - PRStatus PR_CreatePipe(PRFileDesc **readPipe, PRFileDesc **writePipe); -} - -struct PRPollDesc -{ - PRFileDesc *fd; - PRInt16 in_flags; - PRInt16 out_flags; -} - -const PR_POLL_READ = 0x1; -const PR_POLL_WRITE = 0x2; -const PR_POLL_EXCEPT = 0x4; -const PR_POLL_ERR = 0x8; -const PR_POLL_NVAL = 0x10; -const PR_POLL_HUP = 0x20; - -version(NON_XPCOM_GLUE) -{ - PRInt32 PR_Poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout); - PRFileDesc * PR_NewPollableEvent(); - PRStatus PR_DestroyPollableEvent(PRFileDesc *event); - PRStatus PR_SetPollableEvent(PRFileDesc *event); - PRStatus PR_WaitForPollableEvent(PRFileDesc *event); -} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/prlink.d --- a/dwt/internal/mozilla/prlink.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,134 +0,0 @@ -module dwt.internal.mozilla.prlink; -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -import dwt.internal.mozilla.Common; - -struct PRStaticLinkTable -{ - char *name; - void function()fp; -} - -extern (System): - -PRStatus PR_SetLibraryPath(char *path); - -char * PR_GetLibraryPath(); -char * PR_GetLibraryName(char *dir, char *lib); -void PR_FreeLibraryName(char *mem); - -alias void PRLibrary; - -PRLibrary * PR_LoadLibrary(char *name); - -enum PRLibSpecType -{ - PR_LibSpec_Pathname, - PR_LibSpec_MacNamedFragment, - PR_LibSpec_MacIndexedFragment, -} - -alias void FSSpec; - -struct _N3 -{ - FSSpec *fsspec; - char *name; -} - -struct _N4 -{ - FSSpec *fsspec; - PRUint32 index; -} - -union _N2 -{ - char *pathname; - struct _N3 - { - FSSpec *fsspec; - char *name; - } - _N3 mac_named_fragment; - struct _N4 - { - FSSpec *fsspec; - PRUint32 index; - } - _N4 mac_indexed_fragment; -} - -struct PRLibSpec -{ - int type; - union _N2 - { - char *pathname; - struct _N3 - { - FSSpec *fsspec; - char *name; - } - _N3 mac_named_fragment; - struct _N4 - { - FSSpec *fsspec; - PRUint32 index; - } - _N4 mac_indexed_fragment; - } - _N2 value; -} - -const PR_LD_LAZY = 0x1; -const PR_LD_NOW = 0x2; -const PR_LD_GLOBAL = 0x4; -const PR_LD_LOCAL = 0x8; - -PRLibrary * PR_LoadLibraryWithFlags(PRLibSpec libSpec, PRIntn flags); -PRStatus PR_UnloadLibrary(PRLibrary *lib); -void * PR_FindSymbol(PRLibrary *lib, char *name); - -alias void function()PRFuncPtr; - -PRFuncPtr PR_FindFunctionSymbol(PRLibrary *lib, char *name); -void * PR_FindSymbolAndLibrary(char *name, PRLibrary **lib); -PRFuncPtr PR_FindFunctionSymbolAndLibrary(char *name, PRLibrary **lib); -PRLibrary * PR_LoadStaticLibrary(char *name, PRStaticLinkTable *table); -char * PR_GetLibraryFilePathname(char *name, PRFuncPtr addr); diff -r 75cb516e281e -r 4c1340edee0d dwt/internal/mozilla/prtime.d --- a/dwt/internal/mozilla/prtime.d Tue Aug 05 01:15:34 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -module dwt.internal.mozilla.prtime; - -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -import dwt.internal.mozilla.Common; - -const PR_MSEC_PER_SEC = 1000U; -const PR_USEC_PER_SEC = 1000000U; -const PR_NSEC_PER_SEC = 1000000000U; -const PR_USEC_PER_MSEC = 1000U; -const PR_NSEC_PER_MSEC = 1000000U; - -extern (System): - -alias PRInt64 PRTime; - -struct PRTimeParameters -{ - PRInt32 tp_gmt_offset; - PRInt32 tp_dst_offset; -} - -struct PRExplodedTime -{ - PRInt32 tm_usec; - PRInt32 tm_sec; - PRInt32 tm_min; - PRInt32 tm_hour; - PRInt32 tm_mday; - PRInt32 tm_month; - PRInt16 tm_year; - PRInt8 tm_wday; - PRInt16 tm_yday; - PRTimeParameters tm_params; -} - -alias PRTimeParameters function(PRExplodedTime *gmt)PRTimeParamFn; - -version(NON_XPCOM_GLUE) -{ - PRTime PR_Now(); - void PR_ExplodeTime(PRTime usecs, PRTimeParamFn params, PRExplodedTime *exploded); - PRTime PR_ImplodeTime(PRExplodedTime *exploded); - void PR_NormalizeTime(PRExplodedTime *exploded, PRTimeParamFn params); - - PRTimeParameters PR_LocalTimeParameters(PRExplodedTime *gmt); - PRTimeParameters PR_GMTParameters(PRExplodedTime *gmt); - PRTimeParameters PR_USPacificTimeParameters(PRExplodedTime *gmt); - - PRStatus PR_ParseTimeString(char *string, PRBool default_to_gmt, PRTime *result); - PRUint32 PR_FormatTime(char *buf, int buflen, char *fmt, PRExplodedTime *tm); - PRUint32 PR_FormatTimeUSEnglish(char *buf, PRUint32 bufSize, char *format, PRExplodedTime *tm); -} \ No newline at end of file diff -r 75cb516e281e -r 4c1340edee0d dwt/widgets/DirectoryDialog.d~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/widgets/DirectoryDialog.d~ Tue Aug 05 18:02:58 2008 -0700 @@ -0,0 +1,343 @@ +/******************************************************************************* + * Copyright (c) 2000, 2008 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + * Port to the D programming language: + * Frank Benoit + *******************************************************************************/ +module dwt.widgets.DirectoryDialog; + +import dwt.dwthelper.utils; + + + +import dwt.DWT; +import dwt.DWTException; +import dwt.internal.gtk.OS; +import dwt.widgets.Dialog; +import dwt.widgets.Shell; +import dwt.widgets.Display; + +version(TANGOSVN) { + static import tango.io.model.IFile; +} +else{ + static import tango.io.FileConst; +} +static import tango.text.Util; + +/** + * Instances of this class allow the user to navigate + * the file system and select a directory. + *
+ *
Styles:
+ *
(none)
+ *
Events:
+ *
(none)
+ *
+ *

+ * IMPORTANT: This class is intended to be subclassed only + * within the DWT implementation. + *

+ * + * @see DirectoryDialog snippets + * @see DWT Example: ControlExample, Dialog tab + * @see Sample code and further information + */ +public class DirectoryDialog : Dialog { + String message = "", filterPath = ""; +version(TANGOSVN) { + static const String SEPARATOR = tango.io.model.IFile.FileConst.PathSeparatorString; +} +else{ + static const String SEPARATOR = tango.io.FileConst.FileConst.PathSeparatorString; +} + +/** + * Constructs a new instance of this class given only its parent. + * + * @param parent a shell which will be the parent of the new instance + * + * @exception IllegalArgumentException
    + *
  • ERROR_NULL_ARGUMENT - if the parent is null
  • + *
+ * @exception DWTException
    + *
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
  • + *
  • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
  • + *
+ */ +public this (Shell parent) { + this (parent, DWT.APPLICATION_MODAL); +} +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class DWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those DWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @param parent a shell which will be the parent of the new instance + * @param style the style of dialog to construct + * + * @exception IllegalArgumentException
    + *
  • ERROR_NULL_ARGUMENT - if the parent is null
  • + *
+ * @exception DWTException
    + *
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
  • + *
  • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
  • + *
+ */ +public this (Shell parent, int style) { + super (parent, checkStyle (parent, style)); + checkSubclass (); +} +/** + * Returns the path which the dialog will use to filter + * the directories it shows. + * + * @return the filter path + * + * @see #setFilterPath + */ +public String getFilterPath () { + return filterPath; +} +/** + * Returns the dialog's message, which is a description of + * the purpose for which it was opened. This message will be + * visible on the dialog while it is open. + * + * @return the message + */ +public String getMessage () { + return message; +} +/** + * Makes the dialog visible and brings it to the front + * of the display. + * + * @return a string describing the absolute path of the selected directory, + * or null if the dialog was cancelled or an error occurred + * + * @exception DWTException
    + *
  • ERROR_WIDGET_DISPOSED - if the dialog has been disposed
  • + *
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the dialog
  • + *
+ */ +public String open () { + bool useChooserDialog = OS.GTK_VERSION >= OS.buildVERSION (2, 4, 10); + if (useChooserDialog) { + return openChooserDialog (); + } else { + return openClassicDialog (); + } +} +String openChooserDialog () { + char* titleBytes = toStringz(title); + auto shellHandle = parent.topHandle (); + auto handle = OS.gtk_file_chooser_dialog_new2 ( + titleBytes, + shellHandle, + OS.GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, + OS.GTK_STOCK_CANCEL (), OS.GTK_RESPONSE_CANCEL, + OS.GTK_STOCK_OK (), OS.GTK_RESPONSE_OK ); + auto pixbufs = OS.gtk_window_get_icon_list (shellHandle); + if (pixbufs !is null) { + OS.gtk_window_set_icon_list (handle, pixbufs); + OS.g_list_free (pixbufs); + } + if (filterPath !is null && filterPath.length > 0) { + String p; + /* filename must be a full path */ + if ( filterPath[ 0 .. SEPARATOR.length ] != SEPARATOR ) { + p ~= SEPARATOR; + p ~= filterPath; + } + else{ + p = filterPath; + } + char* buffer = toStringz(p); + /* + * Bug in GTK. GtkFileChooser may crash on GTK versions 2.4.10 to 2.6 + * when setting a file name that is not a true canonical path. + * The fix is to use the canonical path. + */ + char* ptr = OS.realpath (buffer, null); + if (ptr !is null) { + OS.gtk_file_chooser_set_current_folder (handle, ptr); + OS.g_free (ptr); + } + } + if (message.length > 0) { + char* buffer = toStringz(message); + auto box = OS.gtk_hbox_new (false, 0); + if (box is null) error (DWT.ERROR_NO_HANDLES); + auto label = OS.gtk_label_new (buffer); + if (label is null) error (DWT.ERROR_NO_HANDLES); + OS.gtk_container_add (box, label); + OS.gtk_widget_show (label); + OS.gtk_label_set_line_wrap (label, true); + OS.gtk_label_set_justify (label, OS.GTK_JUSTIFY_CENTER); + OS.gtk_file_chooser_set_extra_widget (handle, box); + } + String answer = null; + Display display = parent !is null ? parent.getDisplay (): Display.getCurrent (); + display.addIdleProc (); + Dialog oldModal = null; + if (OS.gtk_window_get_modal (handle)) { + oldModal = display.getModalDialog (); + display.setModalDialog (this); + } + int signalId = 0; + int /*long*/ hookId = 0; + CallbackData emissionData; + emissionData.display = display; + emissionData.data = handle; + if ((style & DWT.RIGHT_TO_LEFT) !is 0) { + signalId = OS.g_signal_lookup (OS.map.ptr, OS.GTK_TYPE_WIDGET()); + hookId = OS.g_signal_add_emission_hook (signalId, 0, &Display.emissionFunc, &emissionData, null); + } + int response = OS.gtk_dialog_run (handle); + if ((style & DWT.RIGHT_TO_LEFT) !is 0) { + OS.g_signal_remove_emission_hook (signalId, hookId); + } + if (OS.gtk_window_get_modal (handle)) { + display.setModalDialog (oldModal); + } + if (response is OS.GTK_RESPONSE_OK) { + auto path = OS.gtk_file_chooser_get_filename (handle); + if (path !is null) { + uint items_written; + auto utf8Ptr = OS.g_filename_to_utf8 (path, -1, null, &items_written, null); + OS.g_free (path); + if (utf8Ptr !is null) { + answer = utf8Ptr[ 0 .. items_written ].dup; + filterPath = answer; + OS.g_free (utf8Ptr); + } + } + } + display.removeIdleProc (); + OS.gtk_widget_destroy (handle); + return answer; +} +String openClassicDialog () { + char* titleBytes = toStringz(title); + auto handle = OS.gtk_file_selection_new (titleBytes); + if (parent !is null) { + auto shellHandle = parent.topHandle (); + OS.gtk_window_set_transient_for (handle, shellHandle); + auto pixbufs = OS.gtk_window_get_icon_list (shellHandle); + if (pixbufs !is null) { + OS.gtk_window_set_icon_list (handle, pixbufs); + OS.g_list_free (pixbufs); + } + } + String answer = null; + if (filterPath !is null) { + String path = filterPath; + if (path.length > 0 && path[ $-1 .. $ ] != SEPARATOR ) { + path ~= SEPARATOR; + } + char* fileNamePtr = OS.g_filename_from_utf8 (toStringz(path), -1, null, null, null); + OS.gtk_file_selection_set_filename (handle, fileNamePtr); + OS.g_free (fileNamePtr); + } + GtkFileSelection* selection = cast(GtkFileSelection*)handle; + OS.gtk_file_selection_hide_fileop_buttons (handle); + auto fileListParent = OS.gtk_widget_get_parent (selection.file_list); + OS.gtk_widget_hide (selection.file_list); + OS.gtk_widget_hide (fileListParent); + if (message.length > 0) { + auto labelHandle = OS.gtk_label_new (toStringz(message)); + OS.gtk_label_set_line_wrap (labelHandle, true); + OS.gtk_misc_set_alignment (labelHandle, 0.0f, 0.0f); + OS.gtk_container_add (selection.main_vbox, labelHandle); + OS.gtk_box_set_child_packing ( + selection.main_vbox, labelHandle, false, false, 0, OS.GTK_PACK_START); + OS.gtk_widget_show (labelHandle); + } + Display display = parent !is null ? parent.getDisplay (): Display.getCurrent (); + display.addIdleProc (); + Dialog oldModal = null; + if (OS.gtk_window_get_modal (handle)) { + oldModal = display.getModalDialog (); + display.setModalDialog (this); + } + int signalId = 0; + int /*long*/ hookId = 0; + CallbackData emissionData; + emissionData.display = display; + emissionData.data = handle; + if ((style & DWT.RIGHT_TO_LEFT) !is 0) { + signalId = OS.g_signal_lookup (OS.map.ptr, OS.GTK_TYPE_WIDGET()); + hookId = OS.g_signal_add_emission_hook (signalId, 0, &Display.emissionFunc, &emissionData, null); + } + int response = OS.gtk_dialog_run (handle); + if ((style & DWT.RIGHT_TO_LEFT) !is 0) { + OS.g_signal_remove_emission_hook (signalId, hookId); + } + if (OS.gtk_window_get_modal (handle)) { + display.setModalDialog (oldModal); + } + if (response is OS.GTK_RESPONSE_OK) { + char* fileNamePtr = OS.gtk_file_selection_get_filename (handle); + uint items_written; + char* utf8Ptr = OS.g_filename_to_utf8 (fileNamePtr, -1, null, &items_written, null); + if (utf8Ptr !is null) { + String osAnswer = utf8Ptr[ 0 .. items_written ]; + if (osAnswer.length !is 0) { + /* remove trailing separator, unless root directory */ + if ( osAnswer != SEPARATOR && osAnswer[ $-1 .. $ ] == SEPARATOR ) { + osAnswer = osAnswer[ 0 .. $ - 1 ]; + } + answer = filterPath = osAnswer.dup; + } + OS.g_free (utf8Ptr); + } + } + display.removeIdleProc (); + OS.gtk_widget_destroy (handle); + return answer; +} +/** + * Sets the path that the dialog will use to filter + * the directories it shows to the argument, which may + * be null. If the string is null, then the operating + * system's default filter path will be used. + *

+ * Note that the path string is platform dependent. + * For convenience, either '/' or '\' can be used + * as a path separator. + *

+ * + * @param string the filter path + */ +public void setFilterPath (String string) { + filterPath = string.dup; +} +/** + * Sets the dialog's message, which is a description of + * the purpose for which it was opened. This message will be + * visible on the dialog while it is open. + * + * @param string the message + * + */ +public void setMessage (String string) { + // DWT extension: allow null for zero length string + //if (string is null) error (DWT.ERROR_NULL_ARGUMENT); + message = string.dup; +} +}