vr

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIVrManagerRegisterListener                    = binder.FirstCallTransaction + 0
	TransactionIVrManagerUnregisterListener                  = binder.FirstCallTransaction + 1
	TransactionIVrManagerRegisterPersistentVrStateListener   = binder.FirstCallTransaction + 2
	TransactionIVrManagerUnregisterPersistentVrStateListener = binder.FirstCallTransaction + 3
	TransactionIVrManagerGetVrModeState                      = binder.FirstCallTransaction + 4
	TransactionIVrManagerGetPersistentVrModeEnabled          = binder.FirstCallTransaction + 5
	TransactionIVrManagerSetPersistentVrModeEnabled          = binder.FirstCallTransaction + 6
	TransactionIVrManagerSetVr2dDisplayProperties            = binder.FirstCallTransaction + 7
	TransactionIVrManagerGetVr2dDisplayId                    = binder.FirstCallTransaction + 8
	TransactionIVrManagerSetAndBindCompositor                = binder.FirstCallTransaction + 9
	TransactionIVrManagerSetStandbyEnabled                   = binder.FirstCallTransaction + 10
)
View Source
const (
	MethodIVrManagerRegisterListener                    = "registerListener"
	MethodIVrManagerUnregisterListener                  = "unregisterListener"
	MethodIVrManagerRegisterPersistentVrStateListener   = "registerPersistentVrStateListener"
	MethodIVrManagerUnregisterPersistentVrStateListener = "unregisterPersistentVrStateListener"
	MethodIVrManagerGetVrModeState                      = "getVrModeState"
	MethodIVrManagerGetPersistentVrModeEnabled          = "getPersistentVrModeEnabled"
	MethodIVrManagerSetPersistentVrModeEnabled          = "setPersistentVrModeEnabled"
	MethodIVrManagerSetVr2dDisplayProperties            = "setVr2dDisplayProperties"
	MethodIVrManagerGetVr2dDisplayId                    = "getVr2dDisplayId"
	MethodIVrManagerSetAndBindCompositor                = "setAndBindCompositor"
	MethodIVrManagerSetStandbyEnabled                   = "setStandbyEnabled"
)
View Source
const DescriptorIPersistentVrStateCallbacks = "android.service.vr.IPersistentVrStateCallbacks"
View Source
const DescriptorIVrListener = "android.service.vr.IVrListener"
View Source
const DescriptorIVrManager = "android.service.vr.IVrManager"
View Source
const DescriptorIVrStateCallbacks = "android.service.vr.IVrStateCallbacks"
View Source
const (
	MethodIPersistentVrStateCallbacksOnPersistentVrStateChanged = "onPersistentVrStateChanged"
)
View Source
const (
	MethodIVrListenerFocusedActivityChanged = "focusedActivityChanged"
)
View Source
const (
	MethodIVrStateCallbacksOnVrStateChanged = "onVrStateChanged"
)
View Source
const (
	TransactionIPersistentVrStateCallbacksOnPersistentVrStateChanged = binder.FirstCallTransaction + 0
)
View Source
const (
	TransactionIVrListenerFocusedActivityChanged = binder.FirstCallTransaction + 0
)
View Source
const (
	TransactionIVrStateCallbacksOnVrStateChanged = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IPersistentVrStateCallbacks

type IPersistentVrStateCallbacks interface {
	AsBinder() binder.IBinder
	OnPersistentVrStateChanged(ctx context.Context, enabled bool) error
}

func NewPersistentVrStateCallbacksStub

func NewPersistentVrStateCallbacksStub(
	impl IPersistentVrStateCallbacksServer,
) IPersistentVrStateCallbacks

NewPersistentVrStateCallbacksStub creates a server-side IPersistentVrStateCallbacks wrapping the given server implementation. The returned value satisfies IPersistentVrStateCallbacks 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 IPersistentVrStateCallbacksServer

type IPersistentVrStateCallbacksServer interface {
	OnPersistentVrStateChanged(ctx context.Context, enabled bool) error
}

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

type IVrListener

type IVrListener interface {
	AsBinder() binder.IBinder
	FocusedActivityChanged(ctx context.Context, component content.ComponentName, running2dInVr bool, pid int32) error
}

func NewVrListenerStub

func NewVrListenerStub(
	impl IVrListenerServer,
) IVrListener

NewVrListenerStub creates a server-side IVrListener wrapping the given server implementation. The returned value satisfies IVrListener 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 IVrListenerServer

type IVrListenerServer interface {
	FocusedActivityChanged(ctx context.Context, component content.ComponentName, running2dInVr bool, pid int32) error
}

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

type IVrManager

type IVrManager interface {
	AsBinder() binder.IBinder
	RegisterListener(ctx context.Context, cb IVrStateCallbacks) error
	UnregisterListener(ctx context.Context, cb IVrStateCallbacks) error
	RegisterPersistentVrStateListener(ctx context.Context, cb IPersistentVrStateCallbacks) error
	UnregisterPersistentVrStateListener(ctx context.Context, cb IPersistentVrStateCallbacks) error
	GetVrModeState(ctx context.Context) (bool, error)
	GetPersistentVrModeEnabled(ctx context.Context) (bool, error)
	SetPersistentVrModeEnabled(ctx context.Context, enabled bool) error
	SetVr2dDisplayProperties(ctx context.Context, vr2dDisplayProperties app.Vr2dDisplayProperties) error
	GetVr2dDisplayId(ctx context.Context) (int32, error)
	SetAndBindCompositor(ctx context.Context, componentName string) error
	SetStandbyEnabled(ctx context.Context, standby bool) error
}

func NewVrManagerStub

func NewVrManagerStub(
	impl IVrManagerServer,
) IVrManager

NewVrManagerStub creates a server-side IVrManager wrapping the given server implementation. The returned value satisfies IVrManager 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 IVrManagerServer

type IVrManagerServer interface {
	RegisterListener(ctx context.Context, cb IVrStateCallbacks) error
	UnregisterListener(ctx context.Context, cb IVrStateCallbacks) error
	RegisterPersistentVrStateListener(ctx context.Context, cb IPersistentVrStateCallbacks) error
	UnregisterPersistentVrStateListener(ctx context.Context, cb IPersistentVrStateCallbacks) error
	GetVrModeState(ctx context.Context) (bool, error)
	GetPersistentVrModeEnabled(ctx context.Context) (bool, error)
	SetPersistentVrModeEnabled(ctx context.Context, enabled bool) error
	SetVr2dDisplayProperties(ctx context.Context, vr2dDisplayProperties app.Vr2dDisplayProperties) error
	GetVr2dDisplayId(ctx context.Context) (int32, error)
	SetAndBindCompositor(ctx context.Context, componentName string) error
	SetStandbyEnabled(ctx context.Context, standby bool) error
}

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

type IVrStateCallbacks

type IVrStateCallbacks interface {
	AsBinder() binder.IBinder
	OnVrStateChanged(ctx context.Context, enabled bool) error
}

func NewVrStateCallbacksStub

func NewVrStateCallbacksStub(
	impl IVrStateCallbacksServer,
) IVrStateCallbacks

NewVrStateCallbacksStub creates a server-side IVrStateCallbacks wrapping the given server implementation. The returned value satisfies IVrStateCallbacks 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 IVrStateCallbacksServer

type IVrStateCallbacksServer interface {
	OnVrStateChanged(ctx context.Context, enabled bool) error
}

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

type PersistentVrStateCallbacksProxy

type PersistentVrStateCallbacksProxy struct {
	Remote binder.IBinder
}

func NewPersistentVrStateCallbacksProxy

func NewPersistentVrStateCallbacksProxy(
	remote binder.IBinder,
) *PersistentVrStateCallbacksProxy

func (*PersistentVrStateCallbacksProxy) AsBinder

func (*PersistentVrStateCallbacksProxy) OnPersistentVrStateChanged

func (p *PersistentVrStateCallbacksProxy) OnPersistentVrStateChanged(
	ctx context.Context,
	enabled bool,
) error

type PersistentVrStateCallbacksStub

type PersistentVrStateCallbacksStub struct {
	Impl      IPersistentVrStateCallbacks
	Transport binder.VersionAwareTransport
}

PersistentVrStateCallbacksStub dispatches incoming binder transactions to a typed IPersistentVrStateCallbacks implementation.

func (*PersistentVrStateCallbacksStub) Descriptor

func (s *PersistentVrStateCallbacksStub) Descriptor() string

func (*PersistentVrStateCallbacksStub) OnTransaction

type VrListenerProxy

type VrListenerProxy struct {
	Remote binder.IBinder
}

func NewVrListenerProxy

func NewVrListenerProxy(
	remote binder.IBinder,
) *VrListenerProxy

func (*VrListenerProxy) AsBinder

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

func (*VrListenerProxy) FocusedActivityChanged

func (p *VrListenerProxy) FocusedActivityChanged(
	ctx context.Context,
	component content.ComponentName,
	running2dInVr bool,
	pid int32,
) error

type VrListenerStub

type VrListenerStub struct {
	Impl      IVrListener
	Transport binder.VersionAwareTransport
}

VrListenerStub dispatches incoming binder transactions to a typed IVrListener implementation.

func (*VrListenerStub) Descriptor

func (s *VrListenerStub) Descriptor() string

func (*VrListenerStub) OnTransaction

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

type VrManagerProxy

type VrManagerProxy struct {
	Remote binder.IBinder
}

func GetVrManager

func GetVrManager(
	ctx context.Context,
	sm *servicemanager.ServiceManager,
) (*VrManagerProxy, error)

GetVrManager retrieves the VrService service and returns a typed proxy.

func NewVrManagerProxy

func NewVrManagerProxy(
	remote binder.IBinder,
) *VrManagerProxy

func (*VrManagerProxy) AsBinder

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

func (*VrManagerProxy) GetPersistentVrModeEnabled

func (p *VrManagerProxy) GetPersistentVrModeEnabled(
	ctx context.Context,
) (bool, error)

func (*VrManagerProxy) GetVr2dDisplayId

func (p *VrManagerProxy) GetVr2dDisplayId(
	ctx context.Context,
) (int32, error)

func (*VrManagerProxy) GetVrModeState

func (p *VrManagerProxy) GetVrModeState(
	ctx context.Context,
) (bool, error)

func (*VrManagerProxy) RegisterListener

func (p *VrManagerProxy) RegisterListener(
	ctx context.Context,
	cb IVrStateCallbacks,
) error

func (*VrManagerProxy) RegisterPersistentVrStateListener

func (p *VrManagerProxy) RegisterPersistentVrStateListener(
	ctx context.Context,
	cb IPersistentVrStateCallbacks,
) error

func (*VrManagerProxy) SetAndBindCompositor

func (p *VrManagerProxy) SetAndBindCompositor(
	ctx context.Context,
	componentName string,
) error

func (*VrManagerProxy) SetPersistentVrModeEnabled

func (p *VrManagerProxy) SetPersistentVrModeEnabled(
	ctx context.Context,
	enabled bool,
) error

func (*VrManagerProxy) SetStandbyEnabled

func (p *VrManagerProxy) SetStandbyEnabled(
	ctx context.Context,
	standby bool,
) error

func (*VrManagerProxy) SetVr2dDisplayProperties

func (p *VrManagerProxy) SetVr2dDisplayProperties(
	ctx context.Context,
	vr2dDisplayProperties app.Vr2dDisplayProperties,
) error

func (*VrManagerProxy) UnregisterListener

func (p *VrManagerProxy) UnregisterListener(
	ctx context.Context,
	cb IVrStateCallbacks,
) error

func (*VrManagerProxy) UnregisterPersistentVrStateListener

func (p *VrManagerProxy) UnregisterPersistentVrStateListener(
	ctx context.Context,
	cb IPersistentVrStateCallbacks,
) error

type VrManagerStub

type VrManagerStub struct {
	Impl      IVrManager
	Transport binder.VersionAwareTransport
}

VrManagerStub dispatches incoming binder transactions to a typed IVrManager implementation.

func (*VrManagerStub) Descriptor

func (s *VrManagerStub) Descriptor() string

func (*VrManagerStub) OnTransaction

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

type VrStateCallbacksProxy

type VrStateCallbacksProxy struct {
	Remote binder.IBinder
}

func NewVrStateCallbacksProxy

func NewVrStateCallbacksProxy(
	remote binder.IBinder,
) *VrStateCallbacksProxy

func (*VrStateCallbacksProxy) AsBinder

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

func (*VrStateCallbacksProxy) OnVrStateChanged

func (p *VrStateCallbacksProxy) OnVrStateChanged(
	ctx context.Context,
	enabled bool,
) error

type VrStateCallbacksStub

type VrStateCallbacksStub struct {
	Impl      IVrStateCallbacks
	Transport binder.VersionAwareTransport
}

VrStateCallbacksStub dispatches incoming binder transactions to a typed IVrStateCallbacks implementation.

func (*VrStateCallbacksStub) Descriptor

func (s *VrStateCallbacksStub) Descriptor() string

func (*VrStateCallbacksStub) OnTransaction

func (s *VrStateCallbacksStub) 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