void Deactivate () { isActive = false; long /*int*/[] result = new long /*int*/[1]; int rc = webBrowser.QueryInterface (nsIWebBrowserFocus.NS_IWEBBROWSERFOCUS_IID, result); if (rc != XPCOM.NS_OK) error (rc); if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); nsIWebBrowserFocus webBrowserFocus = new nsIWebBrowserFocus (result[0]); rc = webBrowserFocus.Deactivate (); if (rc != XPCOM.NS_OK) error (rc); webBrowserFocus.Release (); }
void Activate () { isActive = true; long /*int*/[] result = new long /*int*/[1]; int rc = webBrowser.QueryInterface (nsIWebBrowserFocus.NS_IWEBBROWSERFOCUS_IID, result); if (rc != XPCOM.NS_OK) error (rc); if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); nsIWebBrowserFocus webBrowserFocus = new nsIWebBrowserFocus (result[0]); rc = webBrowserFocus.Activate (); if (rc != XPCOM.NS_OK) error (rc); webBrowserFocus.Release (); }
public void stop () { htmlBytes = null; long /*int*/[] result = new long /*int*/[1]; int rc = webBrowser.QueryInterface (nsIWebNavigation.NS_IWEBNAVIGATION_IID, result); if (rc != XPCOM.NS_OK) error (rc); if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]); rc = webNavigation.Stop (nsIWebNavigation.STOP_ALL); if (rc != XPCOM.NS_OK) error (rc); webNavigation.Release (); }
void Deactivate () { isActive = false; int /*long*/[] result = new int /*long*/[1]; int rc = webBrowser.QueryInterface (IIDStore.GetIID (nsIWebBrowserFocus.class), result); if (rc != XPCOM.NS_OK) error (rc); if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); nsIWebBrowserFocus webBrowserFocus = new nsIWebBrowserFocus (result[0]); rc = webBrowserFocus.Deactivate (); if (rc != XPCOM.NS_OK) error (rc); webBrowserFocus.Release (); }
void Activate () { isActive = true; int /*long*/[] result = new int /*long*/[1]; int rc = webBrowser.QueryInterface (IIDStore.GetIID (nsIWebBrowserFocus.class), result); if (rc != XPCOM.NS_OK) error (rc); if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); nsIWebBrowserFocus webBrowserFocus = new nsIWebBrowserFocus (result[0]); rc = webBrowserFocus.Activate (); if (rc != XPCOM.NS_OK) error (rc); webBrowserFocus.Release (); }
void Activate () { isActive = true; long /*int*/[] result = new long /*int*/[1]; int rc = webBrowser.QueryInterface (IIDStore.GetIID (nsIWebBrowserFocus.class), result); if (rc != XPCOM.NS_OK) error (rc); if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); nsIWebBrowserFocus webBrowserFocus = new nsIWebBrowserFocus (result[0]); rc = webBrowserFocus.Activate (); if (rc != XPCOM.NS_OK) error (rc); webBrowserFocus.Release (); }
int SetObserver (int /*long*/ aObserver) { if (aObserver != 0) { nsISupports supports = new nsISupports (aObserver); int /*long*/[] result = new int /*long*/[1]; int rc = supports.QueryInterface (IIDStore.GetIID (nsIHelperAppLauncher.class), result); if (rc != XPCOM.NS_OK) Mozilla.error (rc); if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NO_INTERFACE); helperAppLauncher = new nsIHelperAppLauncher (result[0]); } return XPCOM.NS_OK; }
public boolean forward () { htmlBytes = null; long /*int*/[] result = new long /*int*/[1]; int rc = webBrowser.QueryInterface (nsIWebNavigation.NS_IWEBNAVIGATION_IID, result); if (rc != XPCOM.NS_OK) error (rc); if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]); rc = webNavigation.GoForward (); webNavigation.Release (); return rc == XPCOM.NS_OK; }
int SetObserver (int /*long*/ aObserver) { if (aObserver != 0) { nsISupports supports = new nsISupports (aObserver); int /*long*/[] result = new int /*long*/[1]; int rc = supports.QueryInterface (IIDStore.GetIID (nsIHelperAppLauncher.class), result); if (rc != XPCOM.NS_OK) Mozilla.error (rc); if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NO_INTERFACE); helperAppLauncher = new nsIHelperAppLauncher (result[0]); } return XPCOM.NS_OK; }
int SetObserver (long /*int*/ aObserver) { if (aObserver != 0) { nsISupports supports = new nsISupports (aObserver); long /*int*/[] result = new long /*int*/[1]; int rc = supports.QueryInterface (IIDStore.GetIID (nsIHelperAppLauncher.class), result); if (rc != XPCOM.NS_OK) Mozilla.error (rc); if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NO_INTERFACE); helperAppLauncher = new nsIHelperAppLauncher (result[0]); } return XPCOM.NS_OK; }
@Override public boolean forward () { htmlBytes = null; int /*long*/[] result = new int /*long*/[1]; int rc = webBrowser.QueryInterface (IIDStore.GetIID (nsIWebNavigation.class), result); if (rc != XPCOM.NS_OK) error (rc); if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]); rc = webNavigation.GoForward (); webNavigation.Release (); return rc == XPCOM.NS_OK; }
@Override public boolean isBackEnabled () { int /*long*/[] result = new int /*long*/[1]; int rc = webBrowser.QueryInterface (IIDStore.GetIID (nsIWebNavigation.class), result); if (rc != XPCOM.NS_OK) error (rc); if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]); int[] aCanGoBack = new int[1]; /* PRBool */ rc = webNavigation.GetCanGoBack (aCanGoBack); webNavigation.Release (); return aCanGoBack[0] != 0; }
int GetDisplayDirectory (long /*int*/ aDisplayDirectory) { String directoryName = directory != null ? directory : ""; //$NON-NLS-1$ nsEmbedString path = new nsEmbedString (directoryName); long /*int*/[] file = new long /*int*/[1]; int rc = XPCOM.NS_NewLocalFile (path.getAddress (), 1, file); path.dispose (); if (rc != XPCOM.NS_OK) Mozilla.error (rc); if (file[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER); XPCOM.memmove (aDisplayDirectory, file, C.PTR_SIZEOF); return XPCOM.NS_OK; }
@Override public boolean isBackEnabled () { int /*long*/[] result = new int /*long*/[1]; int rc = webBrowser.QueryInterface (IIDStore.GetIID (nsIWebNavigation.class), result); if (rc != XPCOM.NS_OK) error (rc); if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]); int[] aCanGoBack = new int[1]; /* PRBool */ rc = webNavigation.GetCanGoBack (aCanGoBack); webNavigation.Release (); return aCanGoBack[0] != 0; }
@Override public boolean isForwardEnabled () { int /*long*/[] result = new int /*long*/[1]; int rc = webBrowser.QueryInterface (IIDStore.GetIID (nsIWebNavigation.class), result); if (rc != XPCOM.NS_OK) error (rc); if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]); int[] aCanGoForward = new int[1]; /* PRBool */ rc = webNavigation.GetCanGoForward (aCanGoForward); webNavigation.Release (); return aCanGoForward[0] != 0; }
int GetFile (long /*int*/ aFile) { String filename = ""; //$NON-NLS-1$ if (directory != null) filename += directory + SEPARATOR; if (files != null && files.length > 0) filename += files[0]; nsEmbedString path = new nsEmbedString (filename); long /*int*/[] file = new long /*int*/[1]; int rc = XPCOM.NS_NewLocalFile (path.getAddress (), 1, file); path.dispose (); if (rc != XPCOM.NS_OK) Mozilla.error (rc); if (file[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER); XPCOM.memmove (aFile, file, C.PTR_SIZEOF); return XPCOM.NS_OK; }
@Override public boolean back () { htmlBytes = null; int /*long*/[] result = new int /*long*/[1]; int rc = webBrowser.QueryInterface (IIDStore.GetIID (nsIWebNavigation.class), result); if (rc != XPCOM.NS_OK) error (rc); if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]); rc = webNavigation.GoBack (); webNavigation.Release (); return rc == XPCOM.NS_OK; }
@Override public boolean isBackEnabled () { long /*int*/[] result = new long /*int*/[1]; int rc = webBrowser.QueryInterface (IIDStore.GetIID (nsIWebNavigation.class), result); if (rc != XPCOM.NS_OK) error (rc); if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]); int[] aCanGoBack = new int[1]; /* PRBool */ rc = webNavigation.GetCanGoBack (aCanGoBack); webNavigation.Release (); return aCanGoBack[0] != 0; }
int SetDisplayDirectory (int /*long*/ aDisplayDirectory) { if (aDisplayDirectory == 0) return XPCOM.NS_OK; nsILocalFile file = new nsILocalFile (aDisplayDirectory); nsEmbedString pathname = new nsEmbedString (); int rc = file.GetPath (pathname.getAddress()); if (rc != XPCOM.NS_OK) Mozilla.error (rc); directory = pathname.toString (); pathname.dispose (); return XPCOM.NS_OK; }
int SetDisplayDirectory (int /*long*/ aDisplayDirectory) { if (aDisplayDirectory == 0) return XPCOM.NS_OK; nsILocalFile file = new nsILocalFile (aDisplayDirectory); nsEmbedString pathname = new nsEmbedString (); int rc = file.GetPath (pathname.getAddress()); if (rc != XPCOM.NS_OK) Mozilla.error (rc); directory = pathname.toString (); pathname.dispose (); return XPCOM.NS_OK; }