wl

package module
v0.0.0-...-6071cdf Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2017 License: BSD-2-Clause Imports: 12 Imported by: 0

README

wl

Golang wayland protocol implementation

for test

go get github.com/sternix/wl/ui/examples/img
then execute

$GOPATH/bin/img $GOPATH/src/github.com/sternix/wl/ui/examples/img/bsd_daemon.jpg

this is a hobby project i hope to help people, who interested wayland protocol

Documentation

Overview

generated by wl-scanner https://github.com/sternix/wl-scanner

Index

Constants

View Source
const (
	DisplayErrorInvalidObject = 0
	DisplayErrorInvalidMethod = 1
	DisplayErrorNoMemory      = 2
)
View Source
const (
	ShmErrorInvalidFormat = 0
	ShmErrorInvalidStride = 1
	ShmErrorInvalidFd     = 2
)
View Source
const (
	ShmFormatArgb8888    = 0
	ShmFormatXrgb8888    = 1
	ShmFormatC8          = 0x20203843
	ShmFormatRgb332      = 0x38424752
	ShmFormatBgr233      = 0x38524742
	ShmFormatXrgb4444    = 0x32315258
	ShmFormatXbgr4444    = 0x32314258
	ShmFormatRgbx4444    = 0x32315852
	ShmFormatBgrx4444    = 0x32315842
	ShmFormatArgb4444    = 0x32315241
	ShmFormatAbgr4444    = 0x32314241
	ShmFormatRgba4444    = 0x32314152
	ShmFormatBgra4444    = 0x32314142
	ShmFormatXrgb1555    = 0x35315258
	ShmFormatXbgr1555    = 0x35314258
	ShmFormatRgbx5551    = 0x35315852
	ShmFormatBgrx5551    = 0x35315842
	ShmFormatArgb1555    = 0x35315241
	ShmFormatAbgr1555    = 0x35314241
	ShmFormatRgba5551    = 0x35314152
	ShmFormatBgra5551    = 0x35314142
	ShmFormatRgb565      = 0x36314752
	ShmFormatBgr565      = 0x36314742
	ShmFormatRgb888      = 0x34324752
	ShmFormatBgr888      = 0x34324742
	ShmFormatXbgr8888    = 0x34324258
	ShmFormatRgbx8888    = 0x34325852
	ShmFormatBgrx8888    = 0x34325842
	ShmFormatAbgr8888    = 0x34324241
	ShmFormatRgba8888    = 0x34324152
	ShmFormatBgra8888    = 0x34324142
	ShmFormatXrgb2101010 = 0x30335258
	ShmFormatXbgr2101010 = 0x30334258
	ShmFormatRgbx1010102 = 0x30335852
	ShmFormatBgrx1010102 = 0x30335842
	ShmFormatArgb2101010 = 0x30335241
	ShmFormatAbgr2101010 = 0x30334241
	ShmFormatRgba1010102 = 0x30334152
	ShmFormatBgra1010102 = 0x30334142
	ShmFormatYuyv        = 0x56595559
	ShmFormatYvyu        = 0x55595659
	ShmFormatUyvy        = 0x59565955
	ShmFormatVyuy        = 0x59555956
	ShmFormatAyuv        = 0x56555941
	ShmFormatNv12        = 0x3231564e
	ShmFormatNv21        = 0x3132564e
	ShmFormatNv16        = 0x3631564e
	ShmFormatNv61        = 0x3136564e
	ShmFormatYuv410      = 0x39565559
	ShmFormatYvu410      = 0x39555659
	ShmFormatYuv411      = 0x31315559
	ShmFormatYvu411      = 0x31315659
	ShmFormatYuv420      = 0x32315559
	ShmFormatYvu420      = 0x32315659
	ShmFormatYuv422      = 0x36315559
	ShmFormatYvu422      = 0x36315659
	ShmFormatYuv444      = 0x34325559
	ShmFormatYvu444      = 0x34325659
)
View Source
const (
	DataOfferErrorInvalidFinish     = 0
	DataOfferErrorInvalidActionMask = 1
	DataOfferErrorInvalidAction     = 2
	DataOfferErrorInvalidOffer      = 3
)
View Source
const (
	DataSourceErrorInvalidActionMask = 0
	DataSourceErrorInvalidSource     = 1
)
View Source
const (
	DataDeviceManagerDndActionNone = 0
	DataDeviceManagerDndActionCopy = 1
	DataDeviceManagerDndActionMove = 2
	DataDeviceManagerDndActionAsk  = 4
)
View Source
const (
	ShellSurfaceResizeNone        = 0
	ShellSurfaceResizeTop         = 1
	ShellSurfaceResizeBottom      = 2
	ShellSurfaceResizeLeft        = 4
	ShellSurfaceResizeTopLeft     = 5
	ShellSurfaceResizeBottomLeft  = 6
	ShellSurfaceResizeRight       = 8
	ShellSurfaceResizeTopRight    = 9
	ShellSurfaceResizeBottomRight = 10
)
View Source
const (
	ShellSurfaceFullscreenMethodDefault = 0
	ShellSurfaceFullscreenMethodScale   = 1
	ShellSurfaceFullscreenMethodDriver  = 2
	ShellSurfaceFullscreenMethodFill    = 3
)
View Source
const (
	SurfaceErrorInvalidScale     = 0
	SurfaceErrorInvalidTransform = 1
)
View Source
const (
	SeatCapabilityPointer  = 1
	SeatCapabilityKeyboard = 2
	SeatCapabilityTouch    = 4
)
View Source
const (
	PointerButtonStateReleased = 0
	PointerButtonStatePressed  = 1
)
View Source
const (
	PointerAxisVerticalScroll   = 0
	PointerAxisHorizontalScroll = 1
)
View Source
const (
	PointerAxisSourceWheel      = 0
	PointerAxisSourceFinger     = 1
	PointerAxisSourceContinuous = 2
	PointerAxisSourceWheelTilt  = 3
)
View Source
const (
	KeyboardKeymapFormatNoKeymap = 0
	KeyboardKeymapFormatXkbV1    = 1
)
View Source
const (
	KeyboardKeyStateReleased = 0
	KeyboardKeyStatePressed  = 1
)
View Source
const (
	OutputSubpixelUnknown       = 0
	OutputSubpixelNone          = 1
	OutputSubpixelHorizontalRgb = 2
	OutputSubpixelHorizontalBgr = 3
	OutputSubpixelVerticalRgb   = 4
	OutputSubpixelVerticalBgr   = 5
)
View Source
const (
	OutputTransformNormal     = 0
	OutputTransform90         = 1
	OutputTransform180        = 2
	OutputTransform270        = 3
	OutputTransformFlipped    = 4
	OutputTransformFlipped90  = 5
	OutputTransformFlipped180 = 6
	OutputTransformFlipped270 = 7
)
View Source
const (
	OutputModeCurrent   = 0x1
	OutputModePreferred = 0x2
)
View Source
const (
	DataDeviceErrorRole = 0
)
View Source
const (
	PointerErrorRole = 0
)
View Source
const (
	ShellErrorRole = 0
)
View Source
const (
	ShellSurfaceTransientInactive = 0x1
)
View Source
const (
	SubcompositorErrorBadSurface = 0
)
View Source
const (
	SubsurfaceErrorBadSurface = 0
)

Variables

This section is empty.

Functions

func Float64bits

func Float64bits(f float64) uint64

Types

type BaseProxy

type BaseProxy struct {
	// contains filtered or unexported fields
}

func (*BaseProxy) Context

func (p *BaseProxy) Context() *Context

func (*BaseProxy) Id

func (p *BaseProxy) Id() ProxyId

func (*BaseProxy) SetContext

func (p *BaseProxy) SetContext(c *Context)

func (*BaseProxy) SetId

func (p *BaseProxy) SetId(id ProxyId)

type Buffer

type Buffer struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer(ctx *Context) *Buffer

func (*Buffer) AddReleaseHandler

func (p *Buffer) AddReleaseHandler(h Handler)

func (*Buffer) Destroy

func (p *Buffer) Destroy() error

func (*Buffer) Dispatch

func (p *Buffer) Dispatch(event *Event)

func (*Buffer) RemoveReleaseHandler

func (p *Buffer) RemoveReleaseHandler(h Handler)

type BufferReleaseEvent

type BufferReleaseEvent struct {
}

type BytePool

type BytePool struct {
	sync.Pool
}

func (*BytePool) Give

func (bp *BytePool) Give(b []byte)

func (*BytePool) Take

func (bp *BytePool) Take(n int) []byte

type Callback

type Callback struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewCallback

func NewCallback(ctx *Context) *Callback

func (*Callback) AddDoneHandler

func (p *Callback) AddDoneHandler(h Handler)

func (*Callback) Dispatch

func (p *Callback) Dispatch(event *Event)

func (*Callback) RemoveDoneHandler

func (p *Callback) RemoveDoneHandler(h Handler)

type CallbackDoneEvent

type CallbackDoneEvent struct {
	CallbackData uint32
}

type Compositor

type Compositor struct {
	BaseProxy
}

func NewCompositor

func NewCompositor(ctx *Context) *Compositor

func (*Compositor) CreateRegion

func (p *Compositor) CreateRegion() (*Region, error)

func (*Compositor) CreateSurface

func (p *Compositor) CreateSurface() (*Surface, error)

type Context

type Context struct {
	// contains filtered or unexported fields
}

func (*Context) Close

func (c *Context) Close()

func (*Context) Dispatch

func (c *Context) Dispatch() chan<- bool

type DataDevice

type DataDevice struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewDataDevice

func NewDataDevice(ctx *Context) *DataDevice

func (*DataDevice) AddDataOfferHandler

func (p *DataDevice) AddDataOfferHandler(h Handler)

func (*DataDevice) AddDropHandler

func (p *DataDevice) AddDropHandler(h Handler)

func (*DataDevice) AddEnterHandler

func (p *DataDevice) AddEnterHandler(h Handler)

func (*DataDevice) AddLeaveHandler

func (p *DataDevice) AddLeaveHandler(h Handler)

func (*DataDevice) AddMotionHandler

func (p *DataDevice) AddMotionHandler(h Handler)

func (*DataDevice) AddSelectionHandler

func (p *DataDevice) AddSelectionHandler(h Handler)

func (*DataDevice) Dispatch

func (p *DataDevice) Dispatch(event *Event)

func (*DataDevice) Release

func (p *DataDevice) Release() error

func (*DataDevice) RemoveDataOfferHandler

func (p *DataDevice) RemoveDataOfferHandler(h Handler)

func (*DataDevice) RemoveDropHandler

func (p *DataDevice) RemoveDropHandler(h Handler)

func (*DataDevice) RemoveEnterHandler

func (p *DataDevice) RemoveEnterHandler(h Handler)

func (*DataDevice) RemoveLeaveHandler

func (p *DataDevice) RemoveLeaveHandler(h Handler)

func (*DataDevice) RemoveMotionHandler

func (p *DataDevice) RemoveMotionHandler(h Handler)

func (*DataDevice) RemoveSelectionHandler

func (p *DataDevice) RemoveSelectionHandler(h Handler)

func (*DataDevice) SetSelection

func (p *DataDevice) SetSelection(source *DataSource, serial uint32) error

func (*DataDevice) StartDrag

func (p *DataDevice) StartDrag(source *DataSource, origin *Surface, icon *Surface, serial uint32) error

type DataDeviceDataOfferEvent

type DataDeviceDataOfferEvent struct {
	Id *DataOffer
}

type DataDeviceDropEvent

type DataDeviceDropEvent struct {
}

type DataDeviceEnterEvent

type DataDeviceEnterEvent struct {
	Serial  uint32
	Surface *Surface
	X       float32
	Y       float32
	Id      *DataOffer
}

type DataDeviceLeaveEvent

type DataDeviceLeaveEvent struct {
}

type DataDeviceManager

type DataDeviceManager struct {
	BaseProxy
}

func NewDataDeviceManager

func NewDataDeviceManager(ctx *Context) *DataDeviceManager

func (*DataDeviceManager) CreateDataSource

func (p *DataDeviceManager) CreateDataSource() (*DataSource, error)

func (*DataDeviceManager) GetDataDevice

func (p *DataDeviceManager) GetDataDevice(seat *Seat) (*DataDevice, error)

type DataDeviceMotionEvent

type DataDeviceMotionEvent struct {
	Time uint32
	X    float32
	Y    float32
}

type DataDeviceSelectionEvent

type DataDeviceSelectionEvent struct {
	Id *DataOffer
}

type DataOffer

type DataOffer struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewDataOffer

func NewDataOffer(ctx *Context) *DataOffer

func (*DataOffer) Accept

func (p *DataOffer) Accept(serial uint32, mime_type string) error

func (*DataOffer) AddActionHandler

func (p *DataOffer) AddActionHandler(h Handler)

func (*DataOffer) AddOfferHandler

func (p *DataOffer) AddOfferHandler(h Handler)

func (*DataOffer) AddSourceActionsHandler

func (p *DataOffer) AddSourceActionsHandler(h Handler)

func (*DataOffer) Destroy

func (p *DataOffer) Destroy() error

func (*DataOffer) Dispatch

func (p *DataOffer) Dispatch(event *Event)

func (*DataOffer) Finish

func (p *DataOffer) Finish() error

func (*DataOffer) Receive

func (p *DataOffer) Receive(mime_type string, fd uintptr) error

func (*DataOffer) RemoveActionHandler

func (p *DataOffer) RemoveActionHandler(h Handler)

func (*DataOffer) RemoveOfferHandler

func (p *DataOffer) RemoveOfferHandler(h Handler)

func (*DataOffer) RemoveSourceActionsHandler

func (p *DataOffer) RemoveSourceActionsHandler(h Handler)

func (*DataOffer) SetActions

func (p *DataOffer) SetActions(dnd_actions uint32, preferred_action uint32) error

type DataOfferActionEvent

type DataOfferActionEvent struct {
	DndAction uint32
}

type DataOfferOfferEvent

type DataOfferOfferEvent struct {
	MimeType string
}

type DataOfferSourceActionsEvent

type DataOfferSourceActionsEvent struct {
	SourceActions uint32
}

type DataSource

type DataSource struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewDataSource

func NewDataSource(ctx *Context) *DataSource

func (*DataSource) AddActionHandler

func (p *DataSource) AddActionHandler(h Handler)

func (*DataSource) AddCancelledHandler

func (p *DataSource) AddCancelledHandler(h Handler)

func (*DataSource) AddDndDropPerformedHandler

func (p *DataSource) AddDndDropPerformedHandler(h Handler)

func (*DataSource) AddDndFinishedHandler

func (p *DataSource) AddDndFinishedHandler(h Handler)

func (*DataSource) AddSendHandler

func (p *DataSource) AddSendHandler(h Handler)

func (*DataSource) AddTargetHandler

func (p *DataSource) AddTargetHandler(h Handler)

func (*DataSource) Destroy

func (p *DataSource) Destroy() error

func (*DataSource) Dispatch

func (p *DataSource) Dispatch(event *Event)

func (*DataSource) Offer

func (p *DataSource) Offer(mime_type string) error

func (*DataSource) RemoveActionHandler

func (p *DataSource) RemoveActionHandler(h Handler)

func (*DataSource) RemoveCancelledHandler

func (p *DataSource) RemoveCancelledHandler(h Handler)

func (*DataSource) RemoveDndDropPerformedHandler

func (p *DataSource) RemoveDndDropPerformedHandler(h Handler)

func (*DataSource) RemoveDndFinishedHandler

func (p *DataSource) RemoveDndFinishedHandler(h Handler)

func (*DataSource) RemoveSendHandler

func (p *DataSource) RemoveSendHandler(h Handler)

func (*DataSource) RemoveTargetHandler

func (p *DataSource) RemoveTargetHandler(h Handler)

func (*DataSource) SetActions

func (p *DataSource) SetActions(dnd_actions uint32) error

type DataSourceActionEvent

type DataSourceActionEvent struct {
	DndAction uint32
}

type DataSourceCancelledEvent

type DataSourceCancelledEvent struct {
}

type DataSourceDndDropPerformedEvent

type DataSourceDndDropPerformedEvent struct {
}

type DataSourceDndFinishedEvent

type DataSourceDndFinishedEvent struct {
}

type DataSourceSendEvent

type DataSourceSendEvent struct {
	MimeType string
	Fd       uintptr
}

type DataSourceTargetEvent

type DataSourceTargetEvent struct {
	MimeType string
}

type Dispatcher

type Dispatcher interface {
	Dispatch(*Event)
}

type Display

type Display struct {
	BaseProxy
	// contains filtered or unexported fields
}

func Connect

func Connect(addr string) (ret *Display, err error)

func NewDisplay

func NewDisplay(ctx *Context) *Display

func (*Display) AddDeleteIdHandler

func (p *Display) AddDeleteIdHandler(h Handler)

func (*Display) AddErrorHandler

func (p *Display) AddErrorHandler(h Handler)

func (*Display) Dispatch

func (p *Display) Dispatch(event *Event)

func (*Display) GetRegistry

func (p *Display) GetRegistry() (*Registry, error)

func (*Display) RemoveDeleteIdHandler

func (p *Display) RemoveDeleteIdHandler(h Handler)

func (*Display) RemoveErrorHandler

func (p *Display) RemoveErrorHandler(h Handler)

func (*Display) Sync

func (p *Display) Sync() (*Callback, error)

type DisplayDeleteIdEvent

type DisplayDeleteIdEvent struct {
	Id uint32
}

type DisplayErrorEvent

type DisplayErrorEvent struct {
	ObjectId Proxy
	Code     uint32
	Message  string
}

type Event

type Event struct {
	// contains filtered or unexported fields
}

func (*Event) Array

func (ev *Event) Array() []int32

func (*Event) FD

func (ev *Event) FD() uintptr

func (*Event) Float32

func (ev *Event) Float32() float32

func (*Event) Int32

func (ev *Event) Int32() int32

func (*Event) Proxy

func (ev *Event) Proxy(c *Context) Proxy

func (*Event) String

func (ev *Event) String() string

func (*Event) Uint32

func (ev *Event) Uint32() uint32

type Handler

type Handler interface {
	Handle(ev interface{})
}

func HandlerFunc

func HandlerFunc(f func(interface{})) Handler

type Keyboard

type Keyboard struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewKeyboard

func NewKeyboard(ctx *Context) *Keyboard

func (*Keyboard) AddEnterHandler

func (p *Keyboard) AddEnterHandler(h Handler)

func (*Keyboard) AddKeyHandler

func (p *Keyboard) AddKeyHandler(h Handler)

func (*Keyboard) AddKeymapHandler

func (p *Keyboard) AddKeymapHandler(h Handler)

func (*Keyboard) AddLeaveHandler

func (p *Keyboard) AddLeaveHandler(h Handler)

func (*Keyboard) AddModifiersHandler

func (p *Keyboard) AddModifiersHandler(h Handler)

func (*Keyboard) AddRepeatInfoHandler

func (p *Keyboard) AddRepeatInfoHandler(h Handler)

func (*Keyboard) Dispatch

func (p *Keyboard) Dispatch(event *Event)

func (*Keyboard) Release

func (p *Keyboard) Release() error

func (*Keyboard) RemoveEnterHandler

func (p *Keyboard) RemoveEnterHandler(h Handler)

func (*Keyboard) RemoveKeyHandler

func (p *Keyboard) RemoveKeyHandler(h Handler)

func (*Keyboard) RemoveKeymapHandler

func (p *Keyboard) RemoveKeymapHandler(h Handler)

func (*Keyboard) RemoveLeaveHandler

func (p *Keyboard) RemoveLeaveHandler(h Handler)

func (*Keyboard) RemoveModifiersHandler

func (p *Keyboard) RemoveModifiersHandler(h Handler)

func (*Keyboard) RemoveRepeatInfoHandler

func (p *Keyboard) RemoveRepeatInfoHandler(h Handler)

type KeyboardEnterEvent

type KeyboardEnterEvent struct {
	Serial  uint32
	Surface *Surface
	Keys    []int32
}

type KeyboardKeyEvent

type KeyboardKeyEvent struct {
	Serial uint32
	Time   uint32
	Key    uint32
	State  uint32
}

type KeyboardKeymapEvent

type KeyboardKeymapEvent struct {
	Format uint32
	Fd     uintptr
	Size   uint32
}

type KeyboardLeaveEvent

type KeyboardLeaveEvent struct {
	Serial  uint32
	Surface *Surface
}

type KeyboardModifiersEvent

type KeyboardModifiersEvent struct {
	Serial        uint32
	ModsDepressed uint32
	ModsLatched   uint32
	ModsLocked    uint32
	Group         uint32
}

type KeyboardRepeatInfoEvent

type KeyboardRepeatInfoEvent struct {
	Rate  int32
	Delay int32
}

type Output

type Output struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewOutput

func NewOutput(ctx *Context) *Output

func (*Output) AddDoneHandler

func (p *Output) AddDoneHandler(h Handler)

func (*Output) AddGeometryHandler

func (p *Output) AddGeometryHandler(h Handler)

func (*Output) AddModeHandler

func (p *Output) AddModeHandler(h Handler)

func (*Output) AddScaleHandler

func (p *Output) AddScaleHandler(h Handler)

func (*Output) Dispatch

func (p *Output) Dispatch(event *Event)

func (*Output) Release

func (p *Output) Release() error

func (*Output) RemoveDoneHandler

func (p *Output) RemoveDoneHandler(h Handler)

func (*Output) RemoveGeometryHandler

func (p *Output) RemoveGeometryHandler(h Handler)

func (*Output) RemoveModeHandler

func (p *Output) RemoveModeHandler(h Handler)

func (*Output) RemoveScaleHandler

func (p *Output) RemoveScaleHandler(h Handler)

type OutputDoneEvent

type OutputDoneEvent struct {
}

type OutputGeometryEvent

type OutputGeometryEvent struct {
	X              int32
	Y              int32
	PhysicalWidth  int32
	PhysicalHeight int32
	Subpixel       int32
	Make           string
	Model          string
	Transform      int32
}

type OutputModeEvent

type OutputModeEvent struct {
	Flags   uint32
	Width   int32
	Height  int32
	Refresh int32
}

type OutputScaleEvent

type OutputScaleEvent struct {
	Factor int32
}

type Pointer

type Pointer struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewPointer

func NewPointer(ctx *Context) *Pointer

func (*Pointer) AddAxisDiscreteHandler

func (p *Pointer) AddAxisDiscreteHandler(h Handler)

func (*Pointer) AddAxisHandler

func (p *Pointer) AddAxisHandler(h Handler)

func (*Pointer) AddAxisSourceHandler

func (p *Pointer) AddAxisSourceHandler(h Handler)

func (*Pointer) AddAxisStopHandler

func (p *Pointer) AddAxisStopHandler(h Handler)

func (*Pointer) AddButtonHandler

func (p *Pointer) AddButtonHandler(h Handler)

func (*Pointer) AddEnterHandler

func (p *Pointer) AddEnterHandler(h Handler)

func (*Pointer) AddFrameHandler

func (p *Pointer) AddFrameHandler(h Handler)

func (*Pointer) AddLeaveHandler

func (p *Pointer) AddLeaveHandler(h Handler)

func (*Pointer) AddMotionHandler

func (p *Pointer) AddMotionHandler(h Handler)

func (*Pointer) Dispatch

func (p *Pointer) Dispatch(event *Event)

func (*Pointer) Release

func (p *Pointer) Release() error

func (*Pointer) RemoveAxisDiscreteHandler

func (p *Pointer) RemoveAxisDiscreteHandler(h Handler)

func (*Pointer) RemoveAxisHandler

func (p *Pointer) RemoveAxisHandler(h Handler)

func (*Pointer) RemoveAxisSourceHandler

func (p *Pointer) RemoveAxisSourceHandler(h Handler)

func (*Pointer) RemoveAxisStopHandler

func (p *Pointer) RemoveAxisStopHandler(h Handler)

func (*Pointer) RemoveButtonHandler

func (p *Pointer) RemoveButtonHandler(h Handler)

func (*Pointer) RemoveEnterHandler

func (p *Pointer) RemoveEnterHandler(h Handler)

func (*Pointer) RemoveFrameHandler

func (p *Pointer) RemoveFrameHandler(h Handler)

func (*Pointer) RemoveLeaveHandler

func (p *Pointer) RemoveLeaveHandler(h Handler)

func (*Pointer) RemoveMotionHandler

func (p *Pointer) RemoveMotionHandler(h Handler)

func (*Pointer) SetCursor

func (p *Pointer) SetCursor(serial uint32, surface *Surface, hotspot_x int32, hotspot_y int32) error

type PointerAxisDiscreteEvent

type PointerAxisDiscreteEvent struct {
	Axis     uint32
	Discrete int32
}

type PointerAxisEvent

type PointerAxisEvent struct {
	Time  uint32
	Axis  uint32
	Value float32
}

type PointerAxisSourceEvent

type PointerAxisSourceEvent struct {
	AxisSource uint32
}

type PointerAxisStopEvent

type PointerAxisStopEvent struct {
	Time uint32
	Axis uint32
}

type PointerButtonEvent

type PointerButtonEvent struct {
	Serial uint32
	Time   uint32
	Button uint32
	State  uint32
}

type PointerEnterEvent

type PointerEnterEvent struct {
	Serial   uint32
	Surface  *Surface
	SurfaceX float32
	SurfaceY float32
}

type PointerFrameEvent

type PointerFrameEvent struct {
}

type PointerLeaveEvent

type PointerLeaveEvent struct {
	Serial  uint32
	Surface *Surface
}

type PointerMotionEvent

type PointerMotionEvent struct {
	Time     uint32
	SurfaceX float32
	SurfaceY float32
}

type Proxy

type Proxy interface {
	Context() *Context
	SetContext(c *Context)
	Id() ProxyId
	SetId(id ProxyId)
}

type ProxyId

type ProxyId uint32

type Region

type Region struct {
	BaseProxy
}

func NewRegion

func NewRegion(ctx *Context) *Region

func (*Region) Add

func (p *Region) Add(x int32, y int32, width int32, height int32) error

func (*Region) Destroy

func (p *Region) Destroy() error

func (*Region) Subtract

func (p *Region) Subtract(x int32, y int32, width int32, height int32) error

type Registry

type Registry struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry(ctx *Context) *Registry

func (*Registry) AddGlobalHandler

func (p *Registry) AddGlobalHandler(h Handler)

func (*Registry) AddGlobalRemoveHandler

func (p *Registry) AddGlobalRemoveHandler(h Handler)

func (*Registry) Bind

func (p *Registry) Bind(name uint32, iface string, version uint32, id Proxy) error

func (*Registry) Dispatch

func (p *Registry) Dispatch(event *Event)

func (*Registry) RemoveGlobalHandler

func (p *Registry) RemoveGlobalHandler(h Handler)

func (*Registry) RemoveGlobalRemoveHandler

func (p *Registry) RemoveGlobalRemoveHandler(h Handler)

type RegistryGlobalEvent

type RegistryGlobalEvent struct {
	Name      uint32
	Interface string
	Version   uint32
}

type RegistryGlobalRemoveEvent

type RegistryGlobalRemoveEvent struct {
	Name uint32
}

type Request

type Request struct {
	// contains filtered or unexported fields
}

func (*Request) PutArray

func (r *Request) PutArray(a []int32)

func (*Request) PutFd

func (r *Request) PutFd(fd uintptr)

func (*Request) PutFloat32

func (r *Request) PutFloat32(f float32)

func (*Request) PutInt32

func (r *Request) PutInt32(i int32)

func (*Request) PutProxy

func (r *Request) PutProxy(p Proxy)

func (*Request) PutString

func (r *Request) PutString(s string)

func (*Request) PutUint32

func (r *Request) PutUint32(u uint32)

func (*Request) Write

func (r *Request) Write(arg interface{})

type Seat

type Seat struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewSeat

func NewSeat(ctx *Context) *Seat

func (*Seat) AddCapabilitiesHandler

func (p *Seat) AddCapabilitiesHandler(h Handler)

func (*Seat) AddNameHandler

func (p *Seat) AddNameHandler(h Handler)

func (*Seat) Dispatch

func (p *Seat) Dispatch(event *Event)

func (*Seat) GetKeyboard

func (p *Seat) GetKeyboard() (*Keyboard, error)

func (*Seat) GetPointer

func (p *Seat) GetPointer() (*Pointer, error)

func (*Seat) GetTouch

func (p *Seat) GetTouch() (*Touch, error)

func (*Seat) Release

func (p *Seat) Release() error

func (*Seat) RemoveCapabilitiesHandler

func (p *Seat) RemoveCapabilitiesHandler(h Handler)

func (*Seat) RemoveNameHandler

func (p *Seat) RemoveNameHandler(h Handler)

type SeatCapabilitiesEvent

type SeatCapabilitiesEvent struct {
	Capabilities uint32
}

type SeatNameEvent

type SeatNameEvent struct {
	Name string
}

type Shell

type Shell struct {
	BaseProxy
}

func NewShell

func NewShell(ctx *Context) *Shell

func (*Shell) GetShellSurface

func (p *Shell) GetShellSurface(surface *Surface) (*ShellSurface, error)

type ShellSurface

type ShellSurface struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewShellSurface

func NewShellSurface(ctx *Context) *ShellSurface

func (*ShellSurface) AddConfigureHandler

func (p *ShellSurface) AddConfigureHandler(h Handler)

func (*ShellSurface) AddPingHandler

func (p *ShellSurface) AddPingHandler(h Handler)

func (*ShellSurface) AddPopupDoneHandler

func (p *ShellSurface) AddPopupDoneHandler(h Handler)

func (*ShellSurface) Dispatch

func (p *ShellSurface) Dispatch(event *Event)

func (*ShellSurface) Move

func (p *ShellSurface) Move(seat *Seat, serial uint32) error

func (*ShellSurface) Pong

func (p *ShellSurface) Pong(serial uint32) error

func (*ShellSurface) RemoveConfigureHandler

func (p *ShellSurface) RemoveConfigureHandler(h Handler)

func (*ShellSurface) RemovePingHandler

func (p *ShellSurface) RemovePingHandler(h Handler)

func (*ShellSurface) RemovePopupDoneHandler

func (p *ShellSurface) RemovePopupDoneHandler(h Handler)

func (*ShellSurface) Resize

func (p *ShellSurface) Resize(seat *Seat, serial uint32, edges uint32) error

func (*ShellSurface) SetClass

func (p *ShellSurface) SetClass(class_ string) error

func (*ShellSurface) SetFullscreen

func (p *ShellSurface) SetFullscreen(method uint32, framerate uint32, output *Output) error

func (*ShellSurface) SetMaximized

func (p *ShellSurface) SetMaximized(output *Output) error

func (*ShellSurface) SetPopup

func (p *ShellSurface) SetPopup(seat *Seat, serial uint32, parent *Surface, x int32, y int32, flags uint32) error

func (*ShellSurface) SetTitle

func (p *ShellSurface) SetTitle(title string) error

func (*ShellSurface) SetToplevel

func (p *ShellSurface) SetToplevel() error

func (*ShellSurface) SetTransient

func (p *ShellSurface) SetTransient(parent *Surface, x int32, y int32, flags uint32) error

type ShellSurfaceConfigureEvent

type ShellSurfaceConfigureEvent struct {
	Edges  uint32
	Width  int32
	Height int32
}

type ShellSurfacePingEvent

type ShellSurfacePingEvent struct {
	Serial uint32
}

type ShellSurfacePopupDoneEvent

type ShellSurfacePopupDoneEvent struct {
}

type Shm

type Shm struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewShm

func NewShm(ctx *Context) *Shm

func (*Shm) AddFormatHandler

func (p *Shm) AddFormatHandler(h Handler)

func (*Shm) CreatePool

func (p *Shm) CreatePool(fd uintptr, size int32) (*ShmPool, error)

func (*Shm) Dispatch

func (p *Shm) Dispatch(event *Event)

func (*Shm) RemoveFormatHandler

func (p *Shm) RemoveFormatHandler(h Handler)

type ShmFormatEvent

type ShmFormatEvent struct {
	Format uint32
}

type ShmPool

type ShmPool struct {
	BaseProxy
}

func NewShmPool

func NewShmPool(ctx *Context) *ShmPool

func (*ShmPool) CreateBuffer

func (p *ShmPool) CreateBuffer(offset int32, width int32, height int32, stride int32, format uint32) (*Buffer, error)

func (*ShmPool) Destroy

func (p *ShmPool) Destroy() error

func (*ShmPool) Resize

func (p *ShmPool) Resize(size int32) error

type Subcompositor

type Subcompositor struct {
	BaseProxy
}

func NewSubcompositor

func NewSubcompositor(ctx *Context) *Subcompositor

func (*Subcompositor) Destroy

func (p *Subcompositor) Destroy() error

func (*Subcompositor) GetSubsurface

func (p *Subcompositor) GetSubsurface(surface *Surface, parent *Surface) (*Subsurface, error)

type Subsurface

type Subsurface struct {
	BaseProxy
}

func NewSubsurface

func NewSubsurface(ctx *Context) *Subsurface

func (*Subsurface) Destroy

func (p *Subsurface) Destroy() error

func (*Subsurface) PlaceAbove

func (p *Subsurface) PlaceAbove(sibling *Surface) error

func (*Subsurface) PlaceBelow

func (p *Subsurface) PlaceBelow(sibling *Surface) error

func (*Subsurface) SetDesync

func (p *Subsurface) SetDesync() error

func (*Subsurface) SetPosition

func (p *Subsurface) SetPosition(x int32, y int32) error

func (*Subsurface) SetSync

func (p *Subsurface) SetSync() error

type Surface

type Surface struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewSurface

func NewSurface(ctx *Context) *Surface

func (*Surface) AddEnterHandler

func (p *Surface) AddEnterHandler(h Handler)

func (*Surface) AddLeaveHandler

func (p *Surface) AddLeaveHandler(h Handler)

func (*Surface) Attach

func (p *Surface) Attach(buffer *Buffer, x int32, y int32) error

func (*Surface) Commit

func (p *Surface) Commit() error

func (*Surface) Damage

func (p *Surface) Damage(x int32, y int32, width int32, height int32) error

func (*Surface) DamageBuffer

func (p *Surface) DamageBuffer(x int32, y int32, width int32, height int32) error

func (*Surface) Destroy

func (p *Surface) Destroy() error

func (*Surface) Dispatch

func (p *Surface) Dispatch(event *Event)

func (*Surface) Frame

func (p *Surface) Frame() (*Callback, error)

func (*Surface) RemoveEnterHandler

func (p *Surface) RemoveEnterHandler(h Handler)

func (*Surface) RemoveLeaveHandler

func (p *Surface) RemoveLeaveHandler(h Handler)

func (*Surface) SetBufferScale

func (p *Surface) SetBufferScale(scale int32) error

func (*Surface) SetBufferTransform

func (p *Surface) SetBufferTransform(transform int32) error

func (*Surface) SetInputRegion

func (p *Surface) SetInputRegion(region *Region) error

func (*Surface) SetOpaqueRegion

func (p *Surface) SetOpaqueRegion(region *Region) error

type SurfaceEnterEvent

type SurfaceEnterEvent struct {
	Output *Output
}

type SurfaceLeaveEvent

type SurfaceLeaveEvent struct {
	Output *Output
}

type TextCursorPosition

type TextCursorPosition struct {
	BaseProxy
}

func NewTextCursorPosition

func NewTextCursorPosition(conn *Context) *TextCursorPosition

func (*TextCursorPosition) Notify

func (p *TextCursorPosition) Notify(surface *Surface, x float32, y float32) error

type Touch

type Touch struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewTouch

func NewTouch(ctx *Context) *Touch

func (*Touch) AddCancelHandler

func (p *Touch) AddCancelHandler(h Handler)

func (*Touch) AddDownHandler

func (p *Touch) AddDownHandler(h Handler)

func (*Touch) AddFrameHandler

func (p *Touch) AddFrameHandler(h Handler)

func (*Touch) AddMotionHandler

func (p *Touch) AddMotionHandler(h Handler)

func (*Touch) AddOrientationHandler

func (p *Touch) AddOrientationHandler(h Handler)

func (*Touch) AddShapeHandler

func (p *Touch) AddShapeHandler(h Handler)

func (*Touch) AddUpHandler

func (p *Touch) AddUpHandler(h Handler)

func (*Touch) Dispatch

func (p *Touch) Dispatch(event *Event)

func (*Touch) Release

func (p *Touch) Release() error

func (*Touch) RemoveCancelHandler

func (p *Touch) RemoveCancelHandler(h Handler)

func (*Touch) RemoveDownHandler

func (p *Touch) RemoveDownHandler(h Handler)

func (*Touch) RemoveFrameHandler

func (p *Touch) RemoveFrameHandler(h Handler)

func (*Touch) RemoveMotionHandler

func (p *Touch) RemoveMotionHandler(h Handler)

func (*Touch) RemoveOrientationHandler

func (p *Touch) RemoveOrientationHandler(h Handler)

func (*Touch) RemoveShapeHandler

func (p *Touch) RemoveShapeHandler(h Handler)

func (*Touch) RemoveUpHandler

func (p *Touch) RemoveUpHandler(h Handler)

type TouchCancelEvent

type TouchCancelEvent struct {
}

type TouchDownEvent

type TouchDownEvent struct {
	Serial  uint32
	Time    uint32
	Surface *Surface
	Id      int32
	X       float32
	Y       float32
}

type TouchFrameEvent

type TouchFrameEvent struct {
}

type TouchMotionEvent

type TouchMotionEvent struct {
	Time uint32
	Id   int32
	X    float32
	Y    float32
}

type TouchOrientationEvent

type TouchOrientationEvent struct {
	Id          int32
	Orientation float32
}

type TouchShapeEvent

type TouchShapeEvent struct {
	Id    int32
	Major float32
	Minor float32
}

type TouchUpEvent

type TouchUpEvent struct {
	Serial uint32
	Time   uint32
	Id     int32
}

type WestonScreenshooter

type WestonScreenshooter struct {
	BaseProxy
	DoneChan chan WestonScreenshooterDoneEvent
}

func NewWestonScreenshooter

func NewWestonScreenshooter(conn *Context) *WestonScreenshooter

func (*WestonScreenshooter) Shoot

func (p *WestonScreenshooter) Shoot(output *Output, buffer *Buffer) error

type WestonScreenshooterDoneEvent

type WestonScreenshooterDoneEvent struct {
}

Directories

Path Synopsis
ui

Jump to

Keyboard shortcuts

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