Version: v0.0.0-...-bc0fce2 Latest Latest

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

Go to latest
Published: May 5, 2021 License: MIT Imports: 8 Imported by: 0




View Source
const (
	InputDeviceTypeKeyboard   InputDeviceType = C.WLR_INPUT_DEVICE_KEYBOARD
	InputDeviceTypePointer    InputDeviceType = C.WLR_INPUT_DEVICE_POINTER
	InputDeviceTypeTouch      InputDeviceType = C.WLR_INPUT_DEVICE_TOUCH
	InputDeviceTypeTabletTool InputDeviceType = C.WLR_INPUT_DEVICE_TABLET_TOOL
	InputDeviceTypeTabletPad  InputDeviceType = C.WLR_INPUT_DEVICE_TABLET_PAD

	ButtonStateReleased ButtonState = C.WLR_BUTTON_RELEASED
	ButtonStatePressed  ButtonState = C.WLR_BUTTON_PRESSED

	AxisSourceWheel      AxisSource = C.WLR_AXIS_SOURCE_WHEEL
	AxisSourceFinger     AxisSource = C.WLR_AXIS_SOURCE_FINGER
	AxisSourceContinuous AxisSource = C.WLR_AXIS_SOURCE_CONTINUOUS
	AxisSourceWheelTilt  AxisSource = C.WLR_AXIS_SOURCE_WHEEL_TILT

	AxisOrientationVertical   AxisOrientation = C.WLR_AXIS_ORIENTATION_VERTICAL
	AxisOrientationHorizontal AxisOrientation = C.WLR_AXIS_ORIENTATION_HORIZONTAL


This section is empty.


func OnLog

func OnLog(verbosity LogImportance, cb LogFunc)

func OutputTransformInvert

func OutputTransformInvert(transform uint32) uint32


type AxisOrientation

type AxisOrientation uint32

type AxisSource

type AxisSource uint32

type Backend

type Backend struct {
	// contains filtered or unexported fields

func NewBackend

func NewBackend(display Display) Backend

func (Backend) Destroy

func (b Backend) Destroy()

func (Backend) OnDestroy

func (b Backend) OnDestroy(cb func(Backend))

func (Backend) OnNewInput

func (b Backend) OnNewInput(cb func(InputDevice))

func (Backend) OnNewOutput

func (b Backend) OnNewOutput(cb func(Output))

func (Backend) Renderer

func (b Backend) Renderer() Renderer

func (Backend) Start

func (b Backend) Start() error

type Box

type Box struct {
	X, Y, Width, Height int

func (*Box) Set

func (b *Box) Set(x, y, width, height int)

type ButtonState

type ButtonState uint32

type Color

type Color struct {
	R, G, B, A float32

func (*Color) Set

func (c *Color) Set(r, g, b, a float32)

type Compositor

type Compositor struct {
	// contains filtered or unexported fields

func NewCompositor

func NewCompositor(display Display, renderer Renderer) Compositor

func (Compositor) OnDestroy

func (c Compositor) OnDestroy(cb func(Compositor))

type Cursor

type Cursor struct {
	// contains filtered or unexported fields

func NewCursor

func NewCursor() Cursor

func (Cursor) AttachInputDevice

func (c Cursor) AttachInputDevice(dev InputDevice)

func (Cursor) AttachOutputLayout

func (c Cursor) AttachOutputLayout(layout OutputLayout)

func (Cursor) Destroy

func (c Cursor) Destroy()

func (Cursor) Move

func (c Cursor) Move(dev InputDevice, dx float64, dy float64)

func (Cursor) OnAxis

func (c Cursor) OnAxis(cb func(dev InputDevice, time uint32, source AxisSource, orientation AxisOrientation, delta float64, deltaDiscrete int32))

func (Cursor) OnButton

func (c Cursor) OnButton(cb func(dev InputDevice, time uint32, button uint32, state ButtonState))

func (Cursor) OnFrame

func (c Cursor) OnFrame(cb func())

func (Cursor) OnMotion

func (c Cursor) OnMotion(cb func(dev InputDevice, time uint32, dx float64, dy float64))

func (Cursor) OnMotionAbsolute

func (c Cursor) OnMotionAbsolute(cb func(dev InputDevice, time uint32, x float64, y float64))

func (Cursor) SetSurface

func (c Cursor) SetSurface(surface Surface, hotspotX int32, hotspotY int32)

func (Cursor) WarpAbsolute

func (c Cursor) WarpAbsolute(dev InputDevice, x float64, y float64)

func (Cursor) X

func (c Cursor) X() float64

func (Cursor) Y

func (c Cursor) Y() float64

type DMABuf

type DMABuf struct {
	// contains filtered or unexported fields

func NewDMABuf

func NewDMABuf(display Display, renderer Renderer) DMABuf

func (DMABuf) OnDestroy

func (b DMABuf) OnDestroy(cb func(DMABuf))

type DataDeviceManager

type DataDeviceManager struct {
	// contains filtered or unexported fields

func NewDataDeviceManager

func NewDataDeviceManager(display Display) DataDeviceManager

func (DataDeviceManager) OnDestroy

func (m DataDeviceManager) OnDestroy(cb func(DataDeviceManager))

type Display

type Display struct {
	// contains filtered or unexported fields

func NewDisplay

func NewDisplay() Display

func (Display) AddSocketAuto

func (d Display) AddSocketAuto() (string, error)

func (Display) Destroy

func (d Display) Destroy()

func (Display) EventLoop

func (d Display) EventLoop() EventLoop

func (Display) FlushClients

func (d Display) FlushClients()

func (Display) OnDestroy

func (d Display) OnDestroy(cb func(Display))

func (Display) Run

func (d Display) Run()

func (Display) Terminate

func (d Display) Terminate()

type Edges

type Edges uint32
const (
	EdgeNone   Edges = C.WLR_EDGE_NONE
	EdgeTop    Edges = C.WLR_EDGE_TOP
	EdgeBottom Edges = C.WLR_EDGE_BOTTOM
	EdgeLeft   Edges = C.WLR_EDGE_LEFT
	EdgeRight  Edges = C.WLR_EDGE_RIGHT

type EventLoop

type EventLoop struct {
	// contains filtered or unexported fields

func (EventLoop) Dispatch

func (evl EventLoop) Dispatch(timeout time.Duration)

func (EventLoop) Fd

func (evl EventLoop) Fd() uintptr

func (EventLoop) OnDestroy

func (evl EventLoop) OnDestroy(cb func(EventLoop))

type InputDevice

type InputDevice struct {
	// contains filtered or unexported fields

func (InputDevice) Height

func (d InputDevice) Height() float64

func (InputDevice) Keyboard

func (d InputDevice) Keyboard() Keyboard

func (InputDevice) Name

func (d InputDevice) Name() string

func (InputDevice) OnDestroy

func (d InputDevice) OnDestroy(cb func(InputDevice))

func (InputDevice) OutputName

func (d InputDevice) OutputName() string

func (InputDevice) Product

func (d InputDevice) Product() int

func (InputDevice) Type

func (d InputDevice) Type() InputDeviceType

func (InputDevice) Vendor

func (d InputDevice) Vendor() int

func (InputDevice) Width

func (d InputDevice) Width() float64

type InputDeviceType

type InputDeviceType uint32

type KeyState

type KeyState uint32

type Keyboard

type Keyboard struct {
	// contains filtered or unexported fields

func (Keyboard) Modifiers

func (k Keyboard) Modifiers() KeyboardModifier

func (Keyboard) OnKey

func (k Keyboard) OnKey(cb func(keyboard Keyboard, time uint32, keyCode uint32, updateState bool, state KeyState))

func (Keyboard) OnModifiers

func (k Keyboard) OnModifiers(cb func(keyboard Keyboard))

func (Keyboard) RepeatInfo

func (k Keyboard) RepeatInfo() (rate int32, delay int32)

func (Keyboard) SetKeymap

func (k Keyboard) SetKeymap(keymap xkb.Keymap)

func (Keyboard) SetRepeatInfo

func (k Keyboard) SetRepeatInfo(rate int32, delay int32)

func (Keyboard) XKBState

func (k Keyboard) XKBState() xkb.State

type KeyboardModifier

type KeyboardModifier uint32
const (
	KeyboardModifierShift KeyboardModifier = C.WLR_MODIFIER_SHIFT
	KeyboardModifierCaps  KeyboardModifier = C.WLR_MODIFIER_CAPS
	KeyboardModifierCtrl  KeyboardModifier = C.WLR_MODIFIER_CTRL
	KeyboardModifierAlt   KeyboardModifier = C.WLR_MODIFIER_ALT
	KeyboardModifierMod2  KeyboardModifier = C.WLR_MODIFIER_MOD2
	KeyboardModifierMod3  KeyboardModifier = C.WLR_MODIFIER_MOD3
	KeyboardModifierMod5  KeyboardModifier = C.WLR_MODIFIER_MOD5

type LogFunc

type LogFunc func(importance LogImportance, msg string)

type LogImportance

type LogImportance uint32
const (
	LogImportanceSilent LogImportance = C.WLR_SILENT
	LogImportanceError  LogImportance = C.WLR_ERROR
	LogImportanceInfo   LogImportance = C.WLR_INFO
	LogImportanceDebug  LogImportance = C.WLR_DEBUG

type Matrix

type Matrix [9]float32

func (*Matrix) ProjectBox

func (m *Matrix) ProjectBox(box *Box, transform uint32, rotation float32, projection *Matrix)

type Output

type Output struct {
	// contains filtered or unexported fields

func (Output) AttachRender

func (o Output) AttachRender() (int, error)

func (Output) Commit

func (o Output) Commit()

func (Output) CreateGlobal

func (o Output) CreateGlobal()

func (Output) DestroyGlobal

func (o Output) DestroyGlobal()

func (Output) EffectiveResolution

func (o Output) EffectiveResolution() (int, int)

func (Output) Enable

func (o Output) Enable(enable bool)

func (Output) Modes

func (o Output) Modes() []OutputMode

func (Output) Name

func (o Output) Name() string

func (Output) OnDestroy

func (o Output) OnDestroy(cb func(Output))

func (Output) OnFrame

func (o Output) OnFrame(cb func(Output))

func (Output) RenderSoftwareCursors

func (o Output) RenderSoftwareCursors()

func (Output) Rollback

func (o Output) Rollback()

func (Output) Scale

func (o Output) Scale() float32

func (Output) SetMode

func (o Output) SetMode(mode OutputMode)

func (Output) SetTitle

func (o Output) SetTitle(title string) error

func (Output) TransformMatrix

func (o Output) TransformMatrix() Matrix

func (Output) TransformedResolution

func (o Output) TransformedResolution() (int, int)

type OutputLayout

type OutputLayout struct {
	// contains filtered or unexported fields

func NewOutputLayout

func NewOutputLayout() OutputLayout

func (OutputLayout) AddOutputAuto

func (l OutputLayout) AddOutputAuto(output Output)

func (OutputLayout) Coords

func (l OutputLayout) Coords(output Output) (x float64, y float64)

func (OutputLayout) Destroy

func (l OutputLayout) Destroy()

type OutputMode

type OutputMode struct {
	// contains filtered or unexported fields

func (OutputMode) Height

func (m OutputMode) Height() int32

func (OutputMode) RefreshRate

func (m OutputMode) RefreshRate() int32

func (OutputMode) Width

func (m OutputMode) Width() int32

type Renderer

type Renderer struct {
	// contains filtered or unexported fields

func (Renderer) Begin

func (r Renderer) Begin(output Output, width int, height int)

func (Renderer) Clear

func (r Renderer) Clear(color *Color)

func (Renderer) Destroy

func (r Renderer) Destroy()

func (Renderer) End

func (r Renderer) End()

func (Renderer) InitDisplay

func (r Renderer) InitDisplay(display Display)

func (Renderer) OnDestroy

func (r Renderer) OnDestroy(cb func(Renderer))

func (Renderer) RenderRect

func (r Renderer) RenderRect(box *Box, color *Color, projection *Matrix)

func (Renderer) RenderTextureWithMatrix

func (r Renderer) RenderTextureWithMatrix(texture Texture, matrix *Matrix, alpha float32)

type Seat

type Seat struct {
	// contains filtered or unexported fields

func NewSeat

func NewSeat(display Display, name string) Seat

func (Seat) ClearPointerFocus

func (s Seat) ClearPointerFocus()

func (Seat) Destroy

func (s Seat) Destroy()

func (Seat) Keyboard

func (s Seat) Keyboard() Keyboard

func (Seat) KeyboardState

func (s Seat) KeyboardState() SeatKeyboardState

func (Seat) NotifyKeyboardEnter

func (s Seat) NotifyKeyboardEnter(surface Surface, k Keyboard)

func (Seat) NotifyKeyboardKey

func (s Seat) NotifyKeyboardKey(time uint32, keyCode uint32, state KeyState)

func (Seat) NotifyKeyboardModifiers

func (s Seat) NotifyKeyboardModifiers(k Keyboard)

func (Seat) NotifyPointerAxis

func (s Seat) NotifyPointerAxis(time uint32, orientation AxisOrientation, delta float64, deltaDiscrete int32, source AxisSource)

func (Seat) NotifyPointerButton

func (s Seat) NotifyPointerButton(time uint32, button uint32, state ButtonState)

func (Seat) NotifyPointerEnter

func (s Seat) NotifyPointerEnter(surface Surface, sx float64, sy float64)

func (Seat) NotifyPointerFrame

func (s Seat) NotifyPointerFrame()

func (Seat) NotifyPointerMotion

func (s Seat) NotifyPointerMotion(time uint32, sx float64, sy float64)

func (Seat) OnDestroy

func (s Seat) OnDestroy(cb func(Seat))

func (Seat) OnSetCursorRequest

func (s Seat) OnSetCursorRequest(cb func(client SeatClient, surface Surface, serial uint32, hotspotX int32, hotspotY int32))

func (Seat) PointerState

func (s Seat) PointerState() SeatPointerState

func (Seat) SetCapabilities

func (s Seat) SetCapabilities(caps SeatCapability)

func (Seat) SetKeyboard

func (s Seat) SetKeyboard(dev InputDevice)

type SeatCapability

type SeatCapability uint32
const (
	SeatCapabilityPointer  SeatCapability = C.WL_SEAT_CAPABILITY_POINTER
	SeatCapabilityKeyboard SeatCapability = C.WL_SEAT_CAPABILITY_KEYBOARD
	SeatCapabilityTouch    SeatCapability = C.WL_SEAT_CAPABILITY_TOUCH

type SeatClient

type SeatClient struct {
	// contains filtered or unexported fields

type SeatKeyboardState

type SeatKeyboardState struct {
	// contains filtered or unexported fields

func (SeatKeyboardState) FocusedSurface

func (s SeatKeyboardState) FocusedSurface() Surface

type SeatPointerState

type SeatPointerState struct {
	// contains filtered or unexported fields

func (SeatPointerState) FocusedClient

func (s SeatPointerState) FocusedClient() SeatClient

func (SeatPointerState) FocusedSurface

func (s SeatPointerState) FocusedSurface() Surface

type ServerDecoration

type ServerDecoration struct {
	// contains filtered or unexported fields

func (ServerDecoration) Mode

func (ServerDecoration) OnDestroy

func (d ServerDecoration) OnDestroy(cb func(ServerDecoration))

func (ServerDecoration) OnMode

func (d ServerDecoration) OnMode(cb func(ServerDecoration))

type ServerDecorationManager

type ServerDecorationManager struct {
	// contains filtered or unexported fields

func NewServerDecorationManager

func NewServerDecorationManager(display Display) ServerDecorationManager

func (ServerDecorationManager) OnDestroy

func (m ServerDecorationManager) OnDestroy(cb func(ServerDecorationManager))

func (ServerDecorationManager) OnNewMode

func (ServerDecorationManager) SetDefaultMode

type ServerDecorationManagerMode

type ServerDecorationManagerMode uint32

type Surface

type Surface struct {
	// contains filtered or unexported fields

func (Surface) CurrentState

func (s Surface) CurrentState() SurfaceState

func (Surface) Nil

func (s Surface) Nil() bool

func (Surface) OnDestroy

func (s Surface) OnDestroy(cb func(Surface))

func (Surface) SendFrameDone

func (s Surface) SendFrameDone(when time.Time)

func (Surface) SurfaceAt

func (s Surface) SurfaceAt(sx float64, sy float64) (surface Surface, subX float64, subY float64)

func (Surface) Texture

func (s Surface) Texture() Texture

func (Surface) Type

func (s Surface) Type() SurfaceType

func (Surface) Walk

func (s Surface) Walk(visit func())

func (Surface) XDGSurface

func (s Surface) XDGSurface() XDGSurface

func (Surface) XWaylandSurface

func (s Surface) XWaylandSurface() XWaylandSurface

type SurfaceState

type SurfaceState struct {
	// contains filtered or unexported fields

func (SurfaceState) Height

func (s SurfaceState) Height() int

func (SurfaceState) Transform

func (s SurfaceState) Transform() uint32

func (SurfaceState) Width

func (s SurfaceState) Width() int

type SurfaceType

type SurfaceType uint32
const (
	SurfaceTypeNone SurfaceType = iota

type Texture

type Texture struct {
	// contains filtered or unexported fields

func (Texture) Destroy

func (t Texture) Destroy()

func (Texture) Nil

func (t Texture) Nil() bool

type XCursor

type XCursor struct {
	// contains filtered or unexported fields

func (XCursor) Image

func (c XCursor) Image(i int) XCursorImage

func (XCursor) ImageCount

func (c XCursor) ImageCount() int

func (XCursor) Images

func (c XCursor) Images() []XCursorImage

func (XCursor) Name

func (c XCursor) Name() string

type XCursorImage

type XCursorImage struct {
	// contains filtered or unexported fields

type XCursorManager

type XCursorManager struct {
	// contains filtered or unexported fields

func NewXCursorManager

func NewXCursorManager() XCursorManager

func (XCursorManager) Destroy

func (m XCursorManager) Destroy()

func (XCursorManager) Load

func (m XCursorManager) Load()

func (XCursorManager) SetCursorImage

func (m XCursorManager) SetCursorImage(cursor Cursor, name string)

func (XCursorManager) XCursor

func (m XCursorManager) XCursor(name string, scale float32) XCursor

type XDGPopup

type XDGPopup struct {
	// contains filtered or unexported fields

type XDGShell

type XDGShell struct {
	// contains filtered or unexported fields

func NewXDGShell

func NewXDGShell(display Display) XDGShell

func (XDGShell) OnDestroy

func (s XDGShell) OnDestroy(cb func(XDGShell))

func (XDGShell) OnNewSurface

func (s XDGShell) OnNewSurface(cb func(XDGSurface))

type XDGSurface

type XDGSurface struct {
	// contains filtered or unexported fields

func (XDGSurface) Geometry

func (s XDGSurface) Geometry() Box

func (XDGSurface) Nil

func (s XDGSurface) Nil() bool

func (XDGSurface) OnDestroy

func (s XDGSurface) OnDestroy(cb func(XDGSurface))

func (XDGSurface) OnMap

func (s XDGSurface) OnMap(cb func(XDGSurface))

func (XDGSurface) OnNewPopup

func (s XDGSurface) OnNewPopup(cb func(XDGSurface, XDGPopup))

func (XDGSurface) OnPingTimeout

func (s XDGSurface) OnPingTimeout(cb func(XDGSurface))

func (XDGSurface) OnUnmap

func (s XDGSurface) OnUnmap(cb func(XDGSurface))

func (XDGSurface) Ping

func (s XDGSurface) Ping()

func (XDGSurface) Role

func (s XDGSurface) Role() XDGSurfaceRole

func (XDGSurface) SendClose

func (s XDGSurface) SendClose()

func (XDGSurface) Surface

func (s XDGSurface) Surface() Surface

func (XDGSurface) SurfaceAt

func (s XDGSurface) SurfaceAt(sx float64, sy float64) (surface Surface, subX float64, subY float64)

func (XDGSurface) TopLevel

func (s XDGSurface) TopLevel() XDGTopLevel

func (XDGSurface) TopLevelSetActivated

func (s XDGSurface) TopLevelSetActivated(activated bool)

func (XDGSurface) TopLevelSetSize

func (s XDGSurface) TopLevelSetSize(width uint32, height uint32)

func (XDGSurface) TopLevelSetTiled

func (s XDGSurface) TopLevelSetTiled(edges Edges)

func (XDGSurface) Walk

func (s XDGSurface) Walk(visit XDGSurfaceWalkFunc)

type XDGSurfaceRole

type XDGSurfaceRole uint32
const (
	XDGSurfaceRoleNone     XDGSurfaceRole = C.WLR_XDG_SURFACE_ROLE_NONE
	XDGSurfaceRolePopup    XDGSurfaceRole = C.WLR_XDG_SURFACE_ROLE_POPUP

type XDGSurfaceWalkFunc

type XDGSurfaceWalkFunc func(surface Surface, sx int, sy int)

type XDGTopLevel

type XDGTopLevel struct {
	// contains filtered or unexported fields

func (XDGTopLevel) Nil

func (s XDGTopLevel) Nil() bool

func (XDGTopLevel) OnRequestMove

func (t XDGTopLevel) OnRequestMove(cb func(client SeatClient, serial uint32))

func (XDGTopLevel) OnRequestResize

func (t XDGTopLevel) OnRequestResize(cb func(client SeatClient, serial uint32, edges Edges))

func (XDGTopLevel) Title

func (t XDGTopLevel) Title() string

type XWayland

type XWayland struct {
	// contains filtered or unexported fields

func NewXWayland

func NewXWayland(display Display, compositor Compositor, lazy bool) XWayland

func (XWayland) Destroy

func (x XWayland) Destroy()

func (XWayland) OnNewSurface

func (x XWayland) OnNewSurface(cb func(XWaylandSurface))

func (XWayland) SetCursor

func (x XWayland) SetCursor(img XCursorImage)

type XWaylandSurface

type XWaylandSurface struct {
	// contains filtered or unexported fields

func (XWaylandSurface) Configure

func (s XWaylandSurface) Configure(x int16, y int16, width uint16, height uint16)

func (XWaylandSurface) Geometry

func (s XWaylandSurface) Geometry() Box

func (XWaylandSurface) OnDestroy

func (s XWaylandSurface) OnDestroy(cb func(XWaylandSurface))

func (XWaylandSurface) OnMap

func (s XWaylandSurface) OnMap(cb func(XWaylandSurface))

func (XWaylandSurface) OnRequestConfigure

func (s XWaylandSurface) OnRequestConfigure(cb func(surface XWaylandSurface, x int16, y int16, width uint16, height uint16))

func (XWaylandSurface) OnRequestMove

func (s XWaylandSurface) OnRequestMove(cb func(surface XWaylandSurface))

func (XWaylandSurface) OnRequestResize

func (s XWaylandSurface) OnRequestResize(cb func(surface XWaylandSurface, edges Edges))

func (XWaylandSurface) OnUnmap

func (s XWaylandSurface) OnUnmap(cb func(XWaylandSurface))

func (XWaylandSurface) Surface

func (s XWaylandSurface) Surface() Surface

Source Files

Jump to

Keyboard shortcuts

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