Documentation ¶
Index ¶
- Variables
- type Display
- func (d *Display) Close() error
- func (d *Display) DispatchClientCutText(ev *types.ClientCutText)
- func (d *Display) DispatchFrameBufferUpdate(req *types.FrameBufferUpdateRequest)
- func (d *Display) DispatchKeyEvent(ev *types.KeyEvent)
- func (d *Display) DispatchPointerEvent(ev *types.PointerEvent)
- func (d *Display) GetCurrentEncoding() encodings.Encoding
- func (d *Display) GetDimensions() (width, height int)
- func (d *Display) GetEncodings() []int32
- func (d *Display) GetLastImage() *image.RGBA
- func (d *Display) GetPixelFormat() *types.PixelFormat
- func (d *Display) SetDimensions(width, height int)
- func (d *Display) SetEncodings(encs []int32, pseudoEns []int32)
- func (d *Display) SetPixelFormat(pf *types.PixelFormat)
- func (d *Display) Start() error
- type GetEncodingsFunc
- type Opts
Constants ¶
This section is empty.
Variables ¶
var DefaultPixelFormat = &types.PixelFormat{
BPP: 16,
Depth: 16,
BigEndian: 0,
TrueColour: 1,
RedMax: 0x1f,
GreenMax: 0x1f,
BlueMax: 0x1f,
RedShift: 0xa,
GreenShift: 0x5,
BlueShift: 0,
}
DefaultPixelFormat is the default pixel format used in ServerInit messages.
Functions ¶
This section is empty.
Types ¶
type Display ¶
type Display struct {
// contains filtered or unexported fields
}
Display represents a session with the local display. It manages the gstreamer pipelines and listens for events from the RFB event handlers.
func NewDisplay ¶
NewDisplay returns a new display with the given dimensions. These dimensions can be mutated later on depending on client support.
func (*Display) DispatchClientCutText ¶
func (d *Display) DispatchClientCutText(ev *types.ClientCutText)
DispatchClientCutText dispatches a ClientCutText to the queue.
func (*Display) DispatchFrameBufferUpdate ¶
func (d *Display) DispatchFrameBufferUpdate(req *types.FrameBufferUpdateRequest)
DispatchFrameBufferUpdate dispatches a FrameBufferUpdateRequest on the request queue.
func (*Display) DispatchKeyEvent ¶
DispatchKeyEvent dispatches a key event to the queue.
func (*Display) DispatchPointerEvent ¶
func (d *Display) DispatchPointerEvent(ev *types.PointerEvent)
DispatchPointerEvent dispatches a pointer event to the queue.
func (*Display) GetCurrentEncoding ¶
GetCurrentEncoding returns the encoder that is currently being used.
func (*Display) GetDimensions ¶
GetDimensions returns the current dimensions of the display.
func (*Display) GetEncodings ¶
GetEncodings returns the encodings currently supported by the client connected to this display.
func (*Display) GetLastImage ¶
GetLastImage returns the most recent frame for the display.
func (*Display) GetPixelFormat ¶
func (d *Display) GetPixelFormat() *types.PixelFormat
GetPixelFormat returns the current pixel format for the display.
func (*Display) SetDimensions ¶
SetDimensions sets the dimensions of the display.
func (*Display) SetEncodings ¶
SetEncodings sets the encodings that the connected client supports.
func (*Display) SetPixelFormat ¶
func (d *Display) SetPixelFormat(pf *types.PixelFormat)
SetPixelFormat sets the pixel format for the display.
type GetEncodingsFunc ¶
GetEncodingsFunc is a function that can be used to retrieve an encoder from a list of client supplied options.
type Opts ¶
type Opts struct { DisplayProvider providers.Provider Width, Height int Buffer *buffer.ReadWriter GetEncodingFunc GetEncodingsFunc }
Opts represents options for building a new display.