Struct xpcom::interfaces::nsIBrowserDOMWindow
[−]
[src]
#[repr(C)]pub struct nsIBrowserDOMWindow { /* fields omitted */ }
interface nsIBrowserDOMWindow : nsISupports
/**
* The C++ source has access to the browser script source through
* nsIBrowserDOMWindow. It is intended to be attached to the chrome DOMWindow
* of a toplevel browser window (a XUL window). A DOMWindow that does not
* happen to be a browser chrome window will simply have no access to any such
* interface.
*/
Methods
impl nsIBrowserDOMWindow
[src]
pub fn coerce<T: nsIBrowserDOMWindowCoerce>(&self) -> &T
[src]
Cast this nsIBrowserDOMWindow
to one of its base interfaces.
impl nsIBrowserDOMWindow
[src]
pub const OPEN_DEFAULTWINDOW: i64
OPEN_DEFAULTWINDOW: i64 = 0
/**
* Values for createContentWindow's and openURI's aWhere parameter.
*/
/**
* Do whatever the default is based on application state, user preferences,
* and the value of the aContext parameter to openURI.
*/
pub const OPEN_CURRENTWINDOW: i64
OPEN_CURRENTWINDOW: i64 = 1
/**
* Open in the "current window". If aOpener is provided, this should be the
* top window in aOpener's window hierarchy, but exact behavior is
* application-dependent. If aOpener is not provided, it's up to the
* application to decide what constitutes a "current window".
*/
pub const OPEN_NEWWINDOW: i64
OPEN_NEWWINDOW: i64 = 2
/**
* Open in a new window.
*/
pub const OPEN_NEWTAB: i64
OPEN_NEWTAB: i64 = 3
/**
* Open in a new content tab in the toplevel browser window corresponding to
* this nsIBrowserDOMWindow.
*/
pub const OPEN_SWITCHTAB: i64
OPEN_SWITCHTAB: i64 = 4
/**
* Open in an existing content tab based on the URI. If a match can't be
* found, revert to OPEN_NEWTAB behavior.
*/
pub const OPEN_NEW: i64
OPEN_NEW: i64 = 0
/**
* Values for createContentWindow's and openURI's aFlags parameter.
* This is a bitflags field.
*
* The 0x1 bit decides the behavior of OPEN_DEFAULTWINDOW, and the 0x4 bit
* controls whether or not to set the window.opener property on the newly
* opened window.
*
* NOTE: The 0x2 bit is ignored for backwards compatibility with addons, as
* OPEN_NEW used to have the value 2. The values 0 and 2 are treated
* the same way internally.
*/
/**
* Internal open new window.
*/
pub const OPEN_EXTERNAL: i64
OPEN_EXTERNAL: i64 = 1
/**
* External link (load request from another application, xremote, etc).
*/
pub const OPEN_NO_OPENER: i64
OPEN_NO_OPENER: i64 = 4
/**
* Don't set the window.opener property on the window which is being opened.
*/
pub unsafe fn CreateContentWindow(
&self,
aURI: *const nsIURI,
aOpener: *const mozIDOMWindowProxy,
aWhere: int16_t,
aFlags: int32_t,
aTriggeringPrincipal: *const nsIPrincipal,
_retval: *mut *const mozIDOMWindowProxy
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
aOpener: *const mozIDOMWindowProxy,
aWhere: int16_t,
aFlags: int32_t,
aTriggeringPrincipal: *const nsIPrincipal,
_retval: *mut *const mozIDOMWindowProxy
) -> nsresult
/**
* Create the content window for the given URI.
* @param aURI the URI to be opened in the window (can be null).
* @param aWhere see possible values described above.
* @param aOpener window requesting the creation (can be null).
* @param aFlags flags which control the behavior of the load. The
* OPEN_EXTERNAL/OPEN_NEW flag is only used when
* aWhere == OPEN_DEFAULTWINDOW.
* @param aTriggeringPrincipal the principal that would trigger the potential
* load of aURI.
* @return the window into which the URI would have been opened.
*/
mozIDOMWindowProxy createContentWindow (in nsIURI aURI, in mozIDOMWindowProxy aOpener, in short aWhere, in long aFlags, in nsIPrincipal aTriggeringPrincipal);
pub unsafe fn CreateContentWindowInFrame(
&self,
aURI: *const nsIURI,
params: *const nsIOpenURIInFrameParams,
aWhere: int16_t,
aFlags: int32_t,
aNextTabParentId: uint64_t,
aName: &nsAString,
_retval: *mut *const nsIFrameLoaderOwner
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
params: *const nsIOpenURIInFrameParams,
aWhere: int16_t,
aFlags: int32_t,
aNextTabParentId: uint64_t,
aName: &nsAString,
_retval: *mut *const nsIFrameLoaderOwner
) -> nsresult
/**
* As above, but return the nsIFrameLoaderOwner for the new window.
*
* Additional Parameters:
* @param aNextTabParentId The TabParent to associate the window with.
* @param aName The name to give the window opened in the new tab.
* @return The nsIFrameLoaderOwner for the newly opened window.
*/
nsIFrameLoaderOwner createContentWindowInFrame (in nsIURI aURI, in nsIOpenURIInFrameParams params, in short aWhere, in long aFlags, in unsigned long long aNextTabParentId, in AString aName);
pub unsafe fn OpenURI(
&self,
aURI: *const nsIURI,
aOpener: *const mozIDOMWindowProxy,
aWhere: int16_t,
aFlags: int32_t,
aTriggeringPrincipal: *const nsIPrincipal,
_retval: *mut *const mozIDOMWindowProxy
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
aOpener: *const mozIDOMWindowProxy,
aWhere: int16_t,
aFlags: int32_t,
aTriggeringPrincipal: *const nsIPrincipal,
_retval: *mut *const mozIDOMWindowProxy
) -> nsresult
/**
* Load a URI.
* @param aURI the URI to open. null is not allowed. To create the window
* without loading the URI, use createContentWindow instead.
* @param aWhere see possible values described above.
* @param aOpener window requesting the open (can be null).
* @param aFlags flags which control the behavior of the load. The
* OPEN_EXTERNAL/OPEN_NEW flag is only used when
* aWhere == OPEN_DEFAULTWINDOW.
* @param aTriggeringPrincipal the principal that triggered the load of aURI.
* @return the window into which the URI was opened.
*/
mozIDOMWindowProxy openURI (in nsIURI aURI, in mozIDOMWindowProxy aOpener, in short aWhere, in long aFlags, in nsIPrincipal aTriggeringPrincipal);
pub unsafe fn OpenURIInFrame(
&self,
aURI: *const nsIURI,
params: *const nsIOpenURIInFrameParams,
aWhere: int16_t,
aFlags: int32_t,
aNextTabParentId: uint64_t,
aName: &nsAString,
_retval: *mut *const nsIFrameLoaderOwner
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
params: *const nsIOpenURIInFrameParams,
aWhere: int16_t,
aFlags: int32_t,
aNextTabParentId: uint64_t,
aName: &nsAString,
_retval: *mut *const nsIFrameLoaderOwner
) -> nsresult
/**
* As above, but return the nsIFrameLoaderOwner for the new window.
*
* Additional Parameters:
* @param aNextTabParentId The TabParent to associate the window with.
* @param aName The name to give the window opened in the new tab.
* @return The nsIFrameLoaderOwner for the newly opened window.
// XXXbz is this the right API?
// See bug 537428
*/
nsIFrameLoaderOwner openURIInFrame (in nsIURI aURI, in nsIOpenURIInFrameParams params, in short aWhere, in long aFlags, in unsigned long long aNextTabParentId, in AString aName);
pub unsafe fn IsTabContentWindow(
&self,
aWindow: *const nsIDOMWindow,
_retval: *mut bool
) -> nsresult
[src]
&self,
aWindow: *const nsIDOMWindow,
_retval: *mut bool
) -> nsresult
/**
* @param aWindow the window to test.
* @return whether the window is the main content window for any
* currently open tab in this toplevel browser window.
*/
boolean isTabContentWindow (in nsIDOMWindow aWindow);
pub unsafe fn CanClose(&self, _retval: *mut bool) -> nsresult
[src]
/**
* This function is responsible for calling
* nsIContentViewer::PermitUnload on each frame in the window. It
* returns true if closing the window is allowed. See canClose() in
* BrowserUtils.jsm for a simple implementation of this method.
*/
boolean canClose ();
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIBrowserDOMWindow
[src]
const IID: nsIID
IID: nsIID = nsID(714848384, 23923, 16627, [129, 82, 198, 12, 141, 19, 122, 20])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsIBrowserDOMWindow
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIBrowserDOMWindow
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.