pip

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2026 License: CC0-1.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIPipStartSwipePipToHome            = binder.FirstCallTransaction + 0
	TransactionIPipStopSwipePipToHome             = binder.FirstCallTransaction + 1
	TransactionIPipAbortSwipePipToHome            = binder.FirstCallTransaction + 2
	TransactionIPipSetPipAnimationListener        = binder.FirstCallTransaction + 3
	TransactionIPipSetShelfHeight                 = binder.FirstCallTransaction + 4
	TransactionIPipSetPipAnimationTypeToAlpha     = binder.FirstCallTransaction + 5
	TransactionIPipSetLauncherKeepClearAreaHeight = binder.FirstCallTransaction + 6
	TransactionIPipSetLauncherAppIconSize         = binder.FirstCallTransaction + 7
)
View Source
const (
	MethodIPipStartSwipePipToHome            = "startSwipePipToHome"
	MethodIPipStopSwipePipToHome             = "stopSwipePipToHome"
	MethodIPipAbortSwipePipToHome            = "abortSwipePipToHome"
	MethodIPipSetPipAnimationListener        = "setPipAnimationListener"
	MethodIPipSetShelfHeight                 = "setShelfHeight"
	MethodIPipSetPipAnimationTypeToAlpha     = "setPipAnimationTypeToAlpha"
	MethodIPipSetLauncherKeepClearAreaHeight = "setLauncherKeepClearAreaHeight"
	MethodIPipSetLauncherAppIconSize         = "setLauncherAppIconSize"
)
View Source
const (
	TransactionIPipAnimationListenerOnPipAnimationStarted          = binder.FirstCallTransaction + 0
	TransactionIPipAnimationListenerOnPipResourceDimensionsChanged = binder.FirstCallTransaction + 1
	TransactionIPipAnimationListenerOnExpandPip                    = binder.FirstCallTransaction + 2
)
View Source
const (
	MethodIPipAnimationListenerOnPipAnimationStarted          = "onPipAnimationStarted"
	MethodIPipAnimationListenerOnPipResourceDimensionsChanged = "onPipResourceDimensionsChanged"
	MethodIPipAnimationListenerOnExpandPip                    = "onExpandPip"
)
View Source
const DescriptorIPip = "com.android.wm.shell.common.pip.IPip"
View Source
const DescriptorIPipAnimationListener = "com.android.wm.shell.common.pip.IPipAnimationListener"

Variables

This section is empty.

Functions

This section is empty.

Types

type IPip

type IPip interface {
	AsBinder() binder.IBinder
	StartSwipePipToHome(ctx context.Context, componentName content.ComponentName, activityInfo pm.ActivityInfo, pictureInPictureParams app.PictureInPictureParams, launcherRotation int32, hotseatKeepClearArea graphics.Rect) (graphics.Rect, error)
	StopSwipePipToHome(ctx context.Context, taskId int32, componentName content.ComponentName, destinationBounds graphics.Rect, overlay view.SurfaceControl, appBounds graphics.Rect, sourceRectHint graphics.Rect) error
	AbortSwipePipToHome(ctx context.Context, taskId int32, componentName content.ComponentName) error
	SetPipAnimationListener(ctx context.Context, listener IPipAnimationListener) error
	SetShelfHeight(ctx context.Context, visible bool, shelfHeight int32) error
	SetPipAnimationTypeToAlpha(ctx context.Context) error
	SetLauncherKeepClearAreaHeight(ctx context.Context, visible bool, height int32) error
	SetLauncherAppIconSize(ctx context.Context, iconSizePx int32) error
}

func NewPipStub

func NewPipStub(
	impl IPipServer,
) IPip

NewPipStub creates a server-side IPip wrapping the given server implementation. The returned value satisfies IPip and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IPipAnimationListener

type IPipAnimationListener interface {
	AsBinder() binder.IBinder
	OnPipAnimationStarted(ctx context.Context) error
	OnPipResourceDimensionsChanged(ctx context.Context, cornerRadius int32, shadowRadius int32) error
	OnExpandPip(ctx context.Context) error
}

func NewPipAnimationListenerStub

func NewPipAnimationListenerStub(
	impl IPipAnimationListenerServer,
) IPipAnimationListener

NewPipAnimationListenerStub creates a server-side IPipAnimationListener wrapping the given server implementation. The returned value satisfies IPipAnimationListener and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IPipAnimationListenerServer

type IPipAnimationListenerServer interface {
	OnPipAnimationStarted(ctx context.Context) error
	OnPipResourceDimensionsChanged(ctx context.Context, cornerRadius int32, shadowRadius int32) error
	OnExpandPip(ctx context.Context) error
}

IPipAnimationListenerServer is the server-side interface that user implementations provide to NewPipAnimationListenerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IPipServer

type IPipServer interface {
	StartSwipePipToHome(ctx context.Context, componentName content.ComponentName, activityInfo pm.ActivityInfo, pictureInPictureParams app.PictureInPictureParams, launcherRotation int32, hotseatKeepClearArea graphics.Rect) (graphics.Rect, error)
	StopSwipePipToHome(ctx context.Context, taskId int32, componentName content.ComponentName, destinationBounds graphics.Rect, overlay view.SurfaceControl, appBounds graphics.Rect, sourceRectHint graphics.Rect) error
	AbortSwipePipToHome(ctx context.Context, taskId int32, componentName content.ComponentName) error
	SetPipAnimationListener(ctx context.Context, listener IPipAnimationListener) error
	SetShelfHeight(ctx context.Context, visible bool, shelfHeight int32) error
	SetPipAnimationTypeToAlpha(ctx context.Context) error
	SetLauncherKeepClearAreaHeight(ctx context.Context, visible bool, height int32) error
	SetLauncherAppIconSize(ctx context.Context, iconSizePx int32) error
}

IPipServer is the server-side interface that user implementations provide to NewPipStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type PipAnimationListenerProxy

type PipAnimationListenerProxy struct {
	Remote binder.IBinder
}

func NewPipAnimationListenerProxy

func NewPipAnimationListenerProxy(
	remote binder.IBinder,
) *PipAnimationListenerProxy

func (*PipAnimationListenerProxy) AsBinder

func (*PipAnimationListenerProxy) OnExpandPip

func (p *PipAnimationListenerProxy) OnExpandPip(
	ctx context.Context,
) error

func (*PipAnimationListenerProxy) OnPipAnimationStarted

func (p *PipAnimationListenerProxy) OnPipAnimationStarted(
	ctx context.Context,
) error

func (*PipAnimationListenerProxy) OnPipResourceDimensionsChanged

func (p *PipAnimationListenerProxy) OnPipResourceDimensionsChanged(
	ctx context.Context,
	cornerRadius int32,
	shadowRadius int32,
) error

type PipAnimationListenerStub

type PipAnimationListenerStub struct {
	Impl      IPipAnimationListener
	Transport binder.VersionAwareTransport
}

PipAnimationListenerStub dispatches incoming binder transactions to a typed IPipAnimationListener implementation.

func (*PipAnimationListenerStub) Descriptor

func (s *PipAnimationListenerStub) Descriptor() string

func (*PipAnimationListenerStub) OnTransaction

func (s *PipAnimationListenerStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type PipProxy

type PipProxy struct {
	Remote binder.IBinder
}

func NewPipProxy

func NewPipProxy(
	remote binder.IBinder,
) *PipProxy

func (*PipProxy) AbortSwipePipToHome

func (p *PipProxy) AbortSwipePipToHome(
	ctx context.Context,
	taskId int32,
	componentName content.ComponentName,
) error

func (*PipProxy) AsBinder

func (p *PipProxy) AsBinder() binder.IBinder

func (*PipProxy) SetLauncherAppIconSize

func (p *PipProxy) SetLauncherAppIconSize(
	ctx context.Context,
	iconSizePx int32,
) error

func (*PipProxy) SetLauncherKeepClearAreaHeight

func (p *PipProxy) SetLauncherKeepClearAreaHeight(
	ctx context.Context,
	visible bool,
	height int32,
) error

func (*PipProxy) SetPipAnimationListener

func (p *PipProxy) SetPipAnimationListener(
	ctx context.Context,
	listener IPipAnimationListener,
) error

func (*PipProxy) SetPipAnimationTypeToAlpha

func (p *PipProxy) SetPipAnimationTypeToAlpha(
	ctx context.Context,
) error

func (*PipProxy) SetShelfHeight

func (p *PipProxy) SetShelfHeight(
	ctx context.Context,
	visible bool,
	shelfHeight int32,
) error

func (*PipProxy) StartSwipePipToHome

func (p *PipProxy) StartSwipePipToHome(
	ctx context.Context,
	componentName content.ComponentName,
	activityInfo pm.ActivityInfo,
	pictureInPictureParams app.PictureInPictureParams,
	launcherRotation int32,
	hotseatKeepClearArea graphics.Rect,
) (graphics.Rect, error)

func (*PipProxy) StopSwipePipToHome

func (p *PipProxy) StopSwipePipToHome(
	ctx context.Context,
	taskId int32,
	componentName content.ComponentName,
	destinationBounds graphics.Rect,
	overlay view.SurfaceControl,
	appBounds graphics.Rect,
	sourceRectHint graphics.Rect,
) error

type PipStub

type PipStub struct {
	Impl      IPip
	Transport binder.VersionAwareTransport
}

PipStub dispatches incoming binder transactions to a typed IPip implementation.

func (*PipStub) Descriptor

func (s *PipStub) Descriptor() string

func (*PipStub) OnTransaction

func (s *PipStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL