gui

package
v0.0.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaptureArgs

type CaptureArgs struct {
	PixelFormat               int32
	SourceCrop                ARect
	FrameScaleX               float32
	FrameScaleY               float32
	CaptureSecureLayers       bool
	Uid                       int32
	Dataspace                 int32
	AllowProtected            bool
	Grayscale                 bool
	ExcludeHandles            []binder.IBinder
	HintForSeamlessTransition bool
}

CaptureArgs contains common arguments for screen capture operations.

Wire format matches the custom C++ serialization in frameworks/native/libs/gui/LayerState.cpp CaptureArgs::writeToParcel. This is a cpp_header parcelable with flat (non-AIDL-structured) layout: no parcelable header/footer, no null indicators for embedded types. The C++ Rect (sourceCrop) is written as 4 raw int32s, not as an AIDL structured parcelable.

func (*CaptureArgs) MarshalParcel

func (s *CaptureArgs) MarshalParcel(
	p *parcel.Parcel,
) error

func (*CaptureArgs) UnmarshalParcel

func (s *CaptureArgs) UnmarshalParcel(
	p *parcel.Parcel,
) error

type LayerCaptureArgs

type LayerCaptureArgs struct {
	CaptureArgs  CaptureArgs
	LayerHandle  binder.IBinder
	ChildrenOnly bool
}

LayerCaptureArgs contains arguments for capturing a layer and its children.

Wire format matches the custom C++ serialization in frameworks/native/libs/gui/LayerState.cpp LayerCaptureArgs::writeToParcel. This is a cpp_header parcelable with flat layout: no parcelable header/footer, no null indicators. The C++ struct inherits from CaptureArgs, so writeToParcel first calls CaptureArgs::writeToParcel (inline, not wrapped in a null indicator), then writes its own fields.

func (*LayerCaptureArgs) MarshalParcel

func (s *LayerCaptureArgs) MarshalParcel(
	p *parcel.Parcel,
) error

func (*LayerCaptureArgs) UnmarshalParcel

func (s *LayerCaptureArgs) UnmarshalParcel(
	p *parcel.Parcel,
) error

type ScreenCaptureResults

type ScreenCaptureResults struct {
	// Buffer contains the captured pixels as a gralloc GraphicBuffer.
	// Nil if capture failed.
	Buffer *gralloc.Buffer

	// CapturedSecureLayers indicates if secure content was captured.
	CapturedSecureLayers bool

	// CapturedHdrLayers indicates if HDR content was captured.
	CapturedHdrLayers bool

	// CapturedDataspace is the dataspace of the captured content.
	CapturedDataspace uint32

	// HdrSdrRatio is the HDR/SDR luminance ratio.
	HdrSdrRatio float32
}

ScreenCaptureResults holds the result of a SurfaceFlinger screen capture. The wire format is defined in C++ (ScreenCaptureResults.cpp), not AIDL.

func (*ScreenCaptureResults) MarshalParcel

func (s *ScreenCaptureResults) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ScreenCaptureResults) UnmarshalParcel

func (s *ScreenCaptureResults) UnmarshalParcel(
	p *parcel.Parcel,
) error

Jump to

Keyboard shortcuts

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