nsIEmbeddingSiteWindow

The nsIEmbeddingSiteWindow is implemented by the embedder to provide
Gecko with the means to call up to the host to resize the window,
hide or show it and set/get its title.

Methods

setDimensions(flags, x, y, cx, cy)

Sets the dimensions for the window; the position & size. The
flags to indicate what the caller wants to set and whether the size
refers to the inner or outer area. The inner area refers to just
the embedded area, wheras the outer area can also include any
surrounding chrome, window frame, title bar, and so on.

@see getDimensions
@see DIM_FLAGS_POSITION
@see DIM_FLAGS_SIZE_OUTER
@see DIM_FLAGS_SIZE_INNER

Parameters

flags Combination of position, inner and outer size flags.
x Left hand corner of the outer area.
y Top corner of the outer area.
cx Width of the inner or outer area.
cy Height of the inner or outer area.

Returns

NS_OK if operation was performed correctly; NS_ERROR_UNEXPECTED if window could not be destroyed; NS_ERROR_INVALID_ARG for bad flag combination or illegal dimensions.

getDimensions(flags, x, y, cx, cy)

Gets the dimensions of the window. The caller may pass
nullptr for any value it is uninterested in receiving.

@see setDimensions
@see DIM_FLAGS_POSITION
@see DIM_FLAGS_SIZE_OUTER
@see DIM_FLAGS_SIZE_INNER

Parameters

flags Combination of position, inner and outer size flag .
x Left hand corner of the outer area; or nullptr.
y Top corner of the outer area; or nullptr.
cx Width of the inner or outer area; or nullptr.
cy Height of the inner or outer area; or nullptr.

setFocus()

Give the window focus.

blur()

Blur the window. This should unfocus the window and send an onblur event.

Attributes

visibility

Visibility of the window.

title

Title of the window.

siteWindow

Native window for the site’s window. The implementor should copy the
native window object into the address supplied by the caller. The
type of the native window that the address refers to is platform
and OS specific as follows:

Constants

DIM_FLAGS_POSITION

Flag indicates that position of the top left corner of the outer area
is required/specified.

@see setDimensions
@see getDimensions

DIM_FLAGS_SIZE_INNER

Flag indicates that the size of the inner area is required/specified.

@note The inner and outer flags are mutually exclusive and it is
invalid to combine them.

@see setDimensions
@see getDimensions
@see DIM_FLAGS_SIZE_OUTER

DIM_FLAGS_SIZE_OUTER

Flag indicates that the size of the outer area is required/specified.

@see setDimensions
@see getDimensions
@see DIM_FLAGS_SIZE_INNER