Build 1.0_r1(from source)

android.view
Interface WindowManagerPolicy.WindowState

Enclosing interface:
WindowManagerPolicy

public static interface WindowManagerPolicy.WindowState

Interface to the Window Manager state associated with a particular window. You can hold on to an instance of this interface from the call to prepareAddWindow() until removeWindow().


Method Summary
 void computeFrameLw(int parentLeft, int parentRight, int parentBottom, int parentHeight, int displayLeft, int displayTop, int displayRight, int displayBottom)
          Perform standard frame computation.
 boolean fillsScreenLw(int width, int height, boolean shownFrame)
          Returns true if the window is both full screen and opaque.
 WindowManagerPolicy.WindowState getAppStartingWindow()
          Return the Window that is being displayed as this window's application token is being started.
 IApplicationToken getAppToken()
          Return the token for the application (actually activity) that owns this window.
 WindowManager.LayoutParams getAttrs()
          Retrieve the current LayoutParams of the window.
 Rect getFrameLw()
          Retrieve the current frame of the window.
 boolean hasAppShownWindows()
          Return true if, at any point, the application token associated with this window has actually displayed any windows.
 boolean hasAppStartingIcon()
          Return true if the application token has been asked to display an app starting icon as the application is starting up.
 boolean hasDrawnLw()
          Returns true if this window has been shown on screen at some time in the past.
 void hideLw()
          Can be called by the policy to force a window to be hidden, regardless of whether the client or window manager would like it shown.
 boolean isDisplayedLw()
          Is this window currently visible to the user on-screen? It is displayed either if it is visible or it is currently running an animation before no longer being visible.
 void setCoveredInsetsLw(int l, int t, int r, int b)
          Sets insets on the window that represent the area within the window that is covered by system windows (e.g.
 void setFrameLw(int left, int top, int right, int bottom)
          Set the window's frame to an exact value.
 void showLw()
          Can be called to undo the effect of hideLw(), allowing a window to be shown as long as the window manager and client would also like it to be shown.
 

Method Detail

computeFrameLw

void computeFrameLw(int parentLeft,
                    int parentRight,
                    int parentBottom,
                    int parentHeight,
                    int displayLeft,
                    int displayTop,
                    int displayRight,
                    int displayBottom)
Perform standard frame computation. The result can be obtained with getFrame() if so desired. Must be called with the window manager lock held.

Parameters:
parentLeft - The left edge of the parent container this window is in, used for computing its position.
parentTop - The top edge of the parent container this window is in, used for computing its position.
parentRight - The right edge of the parent container this window is in, used for computing its position.
parentBottom - The bottom edge of the parent container this window is in, used for computing its position.
displayLeft - The left edge of the available display, used for constraining the overall dimensions of the window.
displayTop - The left edge of the available display, used for constraining the overall dimensions of the window.
displayRight - The right edge of the available display, used for constraining the overall dimensions of the window.
displayBottom - The bottom edge of the available display, used for constraining the overall dimensions of the window.

setFrameLw

void setFrameLw(int left,
                int top,
                int right,
                int bottom)
Set the window's frame to an exact value. Must be called with the window manager lock held.

Parameters:
left - Left edge of the window.
top - Top edge of the window.
right - Right edge (exclusive) of the window.
bottom - Bottom edge (exclusive) of the window.

getFrameLw

Rect getFrameLw()
Retrieve the current frame of the window. Must be called with the window manager lock held.

Returns:
Rect The rectangle holding the window frame.

getAttrs

WindowManager.LayoutParams getAttrs()
Retrieve the current LayoutParams of the window.

Returns:
WindowManager.LayoutParams The window's internal LayoutParams instance.

getAppToken

IApplicationToken getAppToken()
Return the token for the application (actually activity) that owns this window. May return null for system windows.

Returns:
An IApplicationToken identifying the owning activity.

hasAppShownWindows

boolean hasAppShownWindows()
Return true if, at any point, the application token associated with this window has actually displayed any windows. This is most useful with the "starting up" window to determine if any windows were displayed when it is closed.

Returns:
Returns true if one or more windows have been displayed, else false.

hasAppStartingIcon

boolean hasAppStartingIcon()
Return true if the application token has been asked to display an app starting icon as the application is starting up.

Returns:
Returns true if setAppStartingIcon() was called for this window's token.

getAppStartingWindow

WindowManagerPolicy.WindowState getAppStartingWindow()
Return the Window that is being displayed as this window's application token is being started.

Returns:
Returns the currently displayed starting window, or null if it was not requested, has not yet been displayed, or has been removed.

isDisplayedLw

boolean isDisplayedLw()
Is this window currently visible to the user on-screen? It is displayed either if it is visible or it is currently running an animation before no longer being visible. Must be called with the window manager lock held.


fillsScreenLw

boolean fillsScreenLw(int width,
                      int height,
                      boolean shownFrame)
Returns true if the window is both full screen and opaque. Must be called with the window manager lock held.

Parameters:
width - The width of the screen
height - The height of the screen
shownFrame - If true, this is based on the actual shown frame of the window (taking into account animations); if false, this is based on the currently requested frame, which any current animation will be moving towards.
Returns:
Returns true if the window is both full screen and opaque

hasDrawnLw

boolean hasDrawnLw()
Returns true if this window has been shown on screen at some time in the past. Must be called with the window manager lock held.

Returns:
boolean

hideLw

void hideLw()
Can be called by the policy to force a window to be hidden, regardless of whether the client or window manager would like it shown. Must be called with the window manager lock held.


showLw

void showLw()
Can be called to undo the effect of hideLw(), allowing a window to be shown as long as the window manager and client would also like it to be shown. Must be called with the window manager lock held.


setCoveredInsetsLw

void setCoveredInsetsLw(int l,
                        int t,
                        int r,
                        int b)
Sets insets on the window that represent the area within the window that is covered by system windows (e.g. status bar). Must be called with the window manager lock held.

Parameters:
l -
t -
r -
b -

Build 1.0_r1(from source)

Please submit a feedback, bug or feature