FileDocCategorySizeDatePackage
IWindowSession.javaAPI DocAndroid 5.1 API53387Sat Mar 14 05:48:06 GMT 2015android.view

IWindowSession

public interface IWindowSession implements android.os.IInterface
System private per-application interface to the window manager. {@hide}

Fields Summary
Constructors Summary
Methods Summary
public intadd(android.view.IWindow window, int seq, android.view.WindowManager.LayoutParams attrs, int viewVisibility, android.graphics.Rect outContentInsets, android.graphics.Rect outStableInsets, android.view.InputChannel outInputChannel)

public intaddToDisplay(android.view.IWindow window, int seq, android.view.WindowManager.LayoutParams attrs, int viewVisibility, int layerStackId, android.graphics.Rect outContentInsets, android.graphics.Rect outStableInsets, android.view.InputChannel outInputChannel)

public intaddToDisplayWithoutInputChannel(android.view.IWindow window, int seq, android.view.WindowManager.LayoutParams attrs, int viewVisibility, int layerStackId, android.graphics.Rect outContentInsets, android.graphics.Rect outStableInsets)

public intaddWithoutInputChannel(android.view.IWindow window, int seq, android.view.WindowManager.LayoutParams attrs, int viewVisibility, android.graphics.Rect outContentInsets, android.graphics.Rect outStableInsets)

public voiddragRecipientEntered(android.view.IWindow window)
Tell the OS that we've just dragged into a View that is willing to accept the drop

public voiddragRecipientExited(android.view.IWindow window)
Tell the OS that we've just dragged *off* of a View that was willing to accept the drop

public voidfinishDrawing(android.view.IWindow window)

public voidgetDisplayFrame(android.view.IWindow window, android.graphics.Rect outDisplayFrame)
Return the current display size in which the window is being laid out, accounting for screen decorations around it.

public booleangetInTouchMode()

public android.view.IWindowIdgetWindowId(android.os.IBinder window)

public voidonRectangleOnScreenRequested(android.os.IBinder token, android.graphics.Rect rectangle)
Notifies that a rectangle on the screen has been requested.

public booleanoutOfMemory(android.view.IWindow window)
Called by a client to report that it ran out of graphics memory.

public voidperformDeferredDestroy(android.view.IWindow window)
If a call to relayout() asked to have the surface destroy deferred, it must call this once it is okay to destroy that surface.

public booleanperformDrag(android.view.IWindow window, android.os.IBinder dragToken, float touchX, float touchY, float thumbCenterX, float thumbCenterY, android.content.ClipData data)
Initiate the drag operation itself

public booleanperformHapticFeedback(android.view.IWindow window, int effectId, boolean always)

public android.os.IBinderprepareDrag(android.view.IWindow window, int flags, int thumbnailWidth, int thumbnailHeight, android.view.Surface outSurface)
Allocate the drag's thumbnail surface. Also assigns a token that identifies the drag to the OS and passes that as the return value. A return value of null indicates failure.

public intrelayout(android.view.IWindow window, int seq, android.view.WindowManager.LayoutParams attrs, int requestedWidth, int requestedHeight, int viewVisibility, int flags, android.graphics.Rect outFrame, android.graphics.Rect outOverscanInsets, android.graphics.Rect outContentInsets, android.graphics.Rect outVisibleInsets, android.graphics.Rect outStableInsets, android.content.res.Configuration outConfig, android.view.Surface outSurface)
Change the parameters of a window. You supply the new parameters, it returns the new frame of the window on screen (the position should be ignored) and surface of the window. The surface will be invalid if the window is currently hidden, else you can use it to draw the window's contents.

param
window The window being modified.
param
seq Ordering sequence number.
param
attrs If non-null, new attributes to apply to the window.
param
requestedWidth The width the window wants to be.
param
requestedHeight The height the window wants to be.
param
viewVisibility Window root view's visibility.
param
flags Request flags: {@link WindowManagerGlobal#RELAYOUT_INSETS_PENDING}, {@link WindowManagerGlobal#RELAYOUT_DEFER_SURFACE_DESTROY}.
param
outFrame Rect in which is placed the new position/size on screen.
param
outOverscanInsets Rect in which is placed the offsets from outFrame in which the content of the window are inside of the display's overlay region.
param
outContentInsets Rect in which is placed the offsets from outFrame in which the content of the window should be placed. This can be used to modify the window layout to ensure its contents are visible to the user, taking into account system windows like the status bar or a soft keyboard.
param
outVisibleInsets Rect in which is placed the offsets from outFrame in which the window is actually completely visible to the user. This can be used to temporarily scroll the window's contents to make sure the user can see it. This is different than outContentInsets in that these insets change transiently, so complex relayout of the window should not happen based on them.
param
outConfiguration New configuration of window, if it is now becoming visible and the global configuration has changed since it was last displayed.
param
outSurface Object in which is placed the new display surface.
return
int Result flags: {@link WindowManagerGlobal#RELAYOUT_SHOW_FOCUS}, {@link WindowManagerGlobal#RELAYOUT_FIRST_TIME}.

public voidremove(android.view.IWindow window)

public voidreportDropResult(android.view.IWindow window, boolean consumed)
Report the result of a drop action targeted to the given window. consumed is 'true' when the drop was accepted by a valid recipient, 'false' otherwise.

public android.os.BundlesendWallpaperCommand(android.os.IBinder window, java.lang.String action, int x, int y, int z, android.os.Bundle extras, boolean sync)

public voidsetInTouchMode(boolean showFocus)

public voidsetInsets(android.view.IWindow window, int touchableInsets, android.graphics.Rect contentInsets, android.graphics.Rect visibleInsets, android.graphics.Region touchableRegion)
Tell the window manager about the content and visible insets of the given window, which can be used to adjust the outContentInsets and outVisibleInsets values returned by {@link #relayout relayout()} for windows behind this one.

param
touchableInsets Controls which part of the window inside of its frame can receive pointer events, as defined by {@link android.view.ViewTreeObserver.InternalInsetsInfo}.

public voidsetTransparentRegion(android.view.IWindow window, android.graphics.Region region)
Give the window manager a hint of the part of the window that is completely transparent, allowing it to work with the surface flinger to optimize compositing of this part of the window.

public voidsetUniverseTransform(android.os.IBinder window, float alpha, float offx, float offy, float dsdx, float dtdx, float dsdy, float dtdy)

public voidsetWallpaperDisplayOffset(android.os.IBinder windowToken, int x, int y)
Apply a raw offset to the wallpaper service when shown behind this window.

public voidsetWallpaperPosition(android.os.IBinder windowToken, float x, float y, float xstep, float ystep)
For windows with the wallpaper behind them, and the wallpaper is larger than the screen, set the offset within the screen. For multi screen launcher type applications, xstep and ystep indicate how big the increment is from one screen to another.

public voidwallpaperCommandComplete(android.os.IBinder window, android.os.Bundle result)

public voidwallpaperOffsetsComplete(android.os.IBinder window)