Documentation
¶
Index ¶
Constants ¶
const ( CommandHeadlessExperimentalBeginFrame = "HeadlessExperimental.beginFrame" CommandHeadlessExperimentalDisable = "HeadlessExperimental.disable" CommandHeadlessExperimentalEnable = "HeadlessExperimental.enable" )
const (
EventHeadlessExperimentalNeedsBeginFramesChanged = "HeadlessExperimental.needsBeginFramesChanged"
)
Variables ¶
var EventConstants = map[string]Unmarshaler{ EventHeadlessExperimentalNeedsBeginFramesChanged: func() json.Unmarshaler { return &NeedsBeginFramesChangedReply{} }, }
Functions ¶
func GetEventReply ¶
func GetEventReply(event string) (json.Unmarshaler, bool)
Types ¶
type BeginFrameArgs ¶
type BeginFrameArgs struct {
FrameTimeTicks float64 `json:"frameTimeTicks,omitempty"` // Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the current time will be used.
Interval float64 `json:"interval,omitempty"` // The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
NoDisplayUpdates bool `json:"noDisplayUpdates,omitempty"` // Whether updates should not be committed and drawn onto the display. False by default. If true, only side effects of the BeginFrame will be run, such as layout and animations, but any visual updates may not be visible on the display or in screenshots.
Screenshot *ScreenshotParams `json:"screenshot,omitempty"` // If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured. Note that capturing a screenshot can fail, for example, during renderer initialization. In such a case, no screenshot data will be returned.
}
BeginFrameArgs represents the arguments for BeginFrame in the HeadlessExperimental domain.
func (*BeginFrameArgs) MarshalJSON ¶
func (a *BeginFrameArgs) MarshalJSON() ([]byte, error)
Marshall the byte array into a return value for BeginFrame in the HeadlessExperimental domain.
func (*BeginFrameArgs) UnmarshalJSON ¶
func (a *BeginFrameArgs) UnmarshalJSON(b []byte) error
Unmarshal the byte array into a return value for BeginFrame in the HeadlessExperimental domain.
type BeginFrameReply ¶
type BeginFrameReply struct {
HasDamage bool `json:"hasDamage"` // Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display. Reported for diagnostic uses, may be removed in the future.
ScreenshotData *[]byte `json:"screenshotData,omitempty"` // Base64-encoded image data of the screenshot, if one was requested and successfully taken.
}
BeginFrameReply represents the return values for BeginFrame in the HeadlessExperimental domain.
func (*BeginFrameReply) GetFrameID ¶
func (a *BeginFrameReply) GetFrameID() string
BeginFrameReply returns the FrameID value for BeginFrame in the HeadlessExperimental domain.
func (*BeginFrameReply) MatchFrameID ¶
func (a *BeginFrameReply) MatchFrameID(frameID string, m []byte) (bool, error)
BeginFrameReply returns whether or not the FrameID matches the reply value for BeginFrame in the HeadlessExperimental domain.
func (*BeginFrameReply) UnmarshalJSON ¶
func (a *BeginFrameReply) UnmarshalJSON(b []byte) error
Unmarshal the byte array into a return value for BeginFrame in the HeadlessExperimental domain.
type DisableArgs ¶
type DisableArgs struct {
}
DisableArgs represents the arguments for Disable in the HeadlessExperimental domain.
func (*DisableArgs) MarshalJSON ¶
func (a *DisableArgs) MarshalJSON() ([]byte, error)
Marshall the byte array into a return value for Disable in the HeadlessExperimental domain.
func (*DisableArgs) UnmarshalJSON ¶
func (a *DisableArgs) UnmarshalJSON(b []byte) error
Unmarshal the byte array into a return value for Disable in the HeadlessExperimental domain.
type DisableReply ¶
type DisableReply struct {
}
DisableReply represents the return values for Disable in the HeadlessExperimental domain.
func (*DisableReply) GetFrameID ¶
func (a *DisableReply) GetFrameID() string
DisableReply returns the FrameID value for Disable in the HeadlessExperimental domain.
func (*DisableReply) MatchFrameID ¶
func (a *DisableReply) MatchFrameID(frameID string, m []byte) (bool, error)
DisableReply returns whether or not the FrameID matches the reply value for Disable in the HeadlessExperimental domain.
func (*DisableReply) UnmarshalJSON ¶
func (a *DisableReply) UnmarshalJSON(b []byte) error
Unmarshal the byte array into a return value for Disable in the HeadlessExperimental domain.
type EnableArgs ¶
type EnableArgs struct {
}
EnableArgs represents the arguments for Enable in the HeadlessExperimental domain.
func (*EnableArgs) MarshalJSON ¶
func (a *EnableArgs) MarshalJSON() ([]byte, error)
Marshall the byte array into a return value for Enable in the HeadlessExperimental domain.
func (*EnableArgs) UnmarshalJSON ¶
func (a *EnableArgs) UnmarshalJSON(b []byte) error
Unmarshal the byte array into a return value for Enable in the HeadlessExperimental domain.
type EnableReply ¶
type EnableReply struct {
}
EnableReply represents the return values for Enable in the HeadlessExperimental domain.
func (*EnableReply) GetFrameID ¶
func (a *EnableReply) GetFrameID() string
EnableReply returns the FrameID value for Enable in the HeadlessExperimental domain.
func (*EnableReply) MatchFrameID ¶
func (a *EnableReply) MatchFrameID(frameID string, m []byte) (bool, error)
EnableReply returns whether or not the FrameID matches the reply value for Enable in the HeadlessExperimental domain.
func (*EnableReply) UnmarshalJSON ¶
func (a *EnableReply) UnmarshalJSON(b []byte) error
Unmarshal the byte array into a return value for Enable in the HeadlessExperimental domain.
type NeedsBeginFramesChangedReply ¶
type NeedsBeginFramesChangedReply struct {
NeedsBeginFrames bool `json:"needsBeginFrames"` // True if BeginFrames are needed, false otherwise.
}
NeedsBeginFramesChangedReply is the reply for NeedsBeginFramesChanged events.
func (*NeedsBeginFramesChangedReply) GetFrameID ¶
func (a *NeedsBeginFramesChangedReply) GetFrameID() string
NeedsBeginFramesChangedReply returns the FrameID for NeedsBeginFramesChanged in the HeadlessExperimental domain.
func (*NeedsBeginFramesChangedReply) MatchFrameID ¶
func (a *NeedsBeginFramesChangedReply) MatchFrameID(frameID string, m []byte) (bool, error)
NeedsBeginFramesChangedReply returns whether or not the FrameID matches the reply value for NeedsBeginFramesChanged in the HeadlessExperimental domain.
func (*NeedsBeginFramesChangedReply) UnmarshalJSON ¶
func (a *NeedsBeginFramesChangedReply) UnmarshalJSON(b []byte) error
Unmarshal the byte array into a return value for NeedsBeginFramesChanged in the HeadlessExperimental domain.
type ScreenshotParams ¶
type ScreenshotParams struct {
// Format Image compression format (defaults to png).
//
// Values: "jpeg", "png".
Format string `json:"format,omitempty"`
Quality int `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg only).
}
ScreenshotParams Encoding options for a screenshot.
type Unmarshaler ¶
type Unmarshaler func() json.Unmarshaler