wlr

package module
v0.0.0-...-5901078 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 11 Imported by: 2

README

wlr

Go Reference Go Report Card

wlr is a fork of go-wlroots that cleans up the implementation a bit and adds some missing features.

Disclaimer: This module exists primarily to support deedles.dev/kawa. As such, features will likely be added as they are needed there. That being said, I am not in any way against adding features that aren't necessary for that project, so feel free to submit a bug report or pull request about any you find that you need.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLog

func InitLog(verbosity LogImportance, cb LogFunc)

func Log

func Log(verbosity LogImportance, format string, args ...any)

Types

type Allocator

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

func AutocreateAllocator

func AutocreateAllocator(backend Backend, renderer Renderer) Allocator

func (Allocator) Destroy

func (a Allocator) Destroy()

func (Allocator) Valid

func (a Allocator) Valid() bool

type AxisOrientation

type AxisOrientation uint32
const (
	AxisOrientationVertical   AxisOrientation = C.WLR_AXIS_ORIENTATION_VERTICAL
	AxisOrientationHorizontal AxisOrientation = C.WLR_AXIS_ORIENTATION_HORIZONTAL
)

type AxisSource

type AxisSource uint32
const (
	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
)

type Backend

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

func AutocreateBackend

func AutocreateBackend(display Display) Backend

func (Backend) Destroy

func (b Backend) Destroy()

func (Backend) OnDestroy

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

func (Backend) OnNewInput

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

func (Backend) OnNewOutput

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

func (Backend) Start

func (b Backend) Start() error

func (Backend) Valid

func (b Backend) Valid() bool

type ButtonState

type ButtonState uint32
const (
	ButtonReleased ButtonState = C.WLR_BUTTON_RELEASED
	ButtonPressed  ButtonState = C.WLR_BUTTON_PRESSED
)

type Client

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

func (Client) GetCredentials

func (c Client) GetCredentials() (pid, uid, gid int)

type Compositor

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

func CreateCompositor

func CreateCompositor(display Display, version uint32, renderer Renderer) Compositor

func (Compositor) OnDestroy

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

type Cursor

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

func CreateCursor

func CreateCursor() 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(p Pointer, time time.Time, source AxisSource, orientation AxisOrientation, delta float64, deltaDiscrete int32)) Listener

func (Cursor) OnButton

func (c Cursor) OnButton(cb func(p Pointer, time time.Time, button CursorButton, state ButtonState)) Listener

func (Cursor) OnFrame

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

func (Cursor) OnMotion

func (c Cursor) OnMotion(cb func(p Pointer, time time.Time, dx, dy float64)) Listener

func (Cursor) OnMotionAbsolute

func (c Cursor) OnMotionAbsolute(cb func(p Pointer, time time.Time, x, y float64)) Listener

func (Cursor) SetSurface

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

func (Cursor) SetXCursor

func (c Cursor) SetXCursor(m XCursorManager, name string)

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 CursorButton

type CursorButton uint32
const (
	BtnLeft   CursorButton = C.BTN_LEFT
	BtnRight  CursorButton = C.BTN_RIGHT
	BtnMiddle CursorButton = C.BTN_MIDDLE
)

type DRM

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

func CreateDRM

func CreateDRM(d Display, r Renderer) DRM

type DataControlDeviceV1

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

func (DataControlDeviceV1) Destroy

func (d DataControlDeviceV1) Destroy()

type DataControlManagerV1

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

func CreateDataControlManagerV1

func CreateDataControlManagerV1(display Display) DataControlManagerV1

func (DataControlManagerV1) OnDestroy

func (m DataControlManagerV1) OnDestroy(cb func(DataControlManagerV1)) Listener

func (DataControlManagerV1) OnNewDevice

func (m DataControlManagerV1) OnNewDevice(cb func(DataControlDeviceV1)) Listener

type DataDeviceManager

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

func CreateDataDeviceManager

func CreateDataDeviceManager(display Display) DataDeviceManager

func (DataDeviceManager) OnDestroy

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

type Display

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

func CreateDisplay

func CreateDisplay() Display

func (Display) AddSocketAuto

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

func (Display) Destroy

func (d Display) Destroy()

func (Display) DestroyClients

func (d Display) DestroyClients()

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)) Listener

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)) Listener

type ExportDMABufManagerV1

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

func CreateExportDMABufV1

func CreateExportDMABufV1(display Display) ExportDMABufManagerV1

func (ExportDMABufManagerV1) OnDestroy

type GammaControlManagerV1

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

func CreateGammaControlManagerV1

func CreateGammaControlManagerV1(display Display) GammaControlManagerV1

func (GammaControlManagerV1) OnDestroy

type InputDevice

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

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)) Listener

func (InputDevice) Pointer

func (d InputDevice) Pointer() Pointer

func (InputDevice) Product

func (d InputDevice) Product() int

func (InputDevice) Type

func (d InputDevice) Type() InputDeviceType

func (InputDevice) Vendor

func (d InputDevice) Vendor() int

type InputDeviceType

type InputDeviceType uint32
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
)

type KeyState

type KeyState uint32
const (
	KeyStateReleased KeyState = C.WL_KEYBOARD_KEY_STATE_RELEASED
	KeyStatePressed  KeyState = C.WL_KEYBOARD_KEY_STATE_PRESSED
)

type Keyboard

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

func (Keyboard) Base

func (k Keyboard) Base() InputDevice

func (Keyboard) GetModifiers

func (k Keyboard) GetModifiers() KeyboardModifier

func (Keyboard) Keycodes

func (k Keyboard) Keycodes() []uint32

func (Keyboard) Modifiers

func (k Keyboard) Modifiers() KeyboardModifiers

func (Keyboard) OnKey

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

func (Keyboard) OnModifiers

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

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 KeyboardModifiers

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

type LayerShellV1

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

func CreateLayerShellV1

func CreateLayerShellV1(display Display, version uint32) LayerShellV1

func (LayerShellV1) OnDestroy

func (ls LayerShellV1) OnDestroy(cb func(LayerShellV1)) Listener

func (LayerShellV1) OnNewSurface

func (ls LayerShellV1) OnNewSurface(cb func(LayerSurfaceV1)) Listener

type LayerShellV1Layer

type LayerShellV1Layer int

type LayerSurfaceV1

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

func (LayerSurfaceV1) Surface

func (s LayerSurfaceV1) Surface() Surface

type LinuxDMABufV1

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

func CreateLinuxDMABufV1WithRenderer

func CreateLinuxDMABufV1WithRenderer(display Display, version uint32, renderer Renderer) LinuxDMABufV1

func (LinuxDMABufV1) OnDestroy

func (b LinuxDMABufV1) OnDestroy(cb func(LinuxDMABufV1)) Listener

type Listener

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

Listener represents an attached signal handler for a Wayland event of some kind.

Note: It is the client's responsibility to call Destroy when they are done with a Listener in order to free resources. Failure to do so will result in a memory leak.

func (Listener) Destroy

func (lis Listener) Destroy()

Destroy frees resources associated with the Listener and disconnects it from the signal that it is attached to. After this is called, Valid will return false.

Calling this method on an invalid Listener is a no-op.

func (Listener) Valid

func (lis Listener) Valid() bool

type LogFunc

type LogFunc func(importance LogImportance, msg string)

type LogImportance

type LogImportance uint32

type Matrix

type Matrix [9]float32

func ProjectBoxMatrix

func ProjectBoxMatrix(box image.Rectangle, transform OutputTransform, rotation float32, projection *Matrix) *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) Height

func (o Output) Height() int

func (Output) InitRender

func (o Output) InitRender(a Allocator, r Renderer)

func (Output) Modes

func (o Output) Modes() (modes []OutputMode)

func (Output) Name

func (o Output) Name() string

func (Output) OnDestroy

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

func (Output) OnFrame

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

func (Output) PreferredMode

func (o Output) PreferredMode() OutputMode

func (Output) RenderSoftwareCursors

func (o Output) RenderSoftwareCursors(damage image.Rectangle)

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) SetScale

func (o Output) SetScale(scale float32)

func (Output) SetTitle

func (o Output) SetTitle(title string) error

func (Output) SetTransform

func (o Output) SetTransform(transform OutputTransform)

func (Output) Transform

func (o Output) Transform() OutputTransform

func (Output) TransformMatrix

func (o Output) TransformMatrix() *Matrix

func (Output) TransformedResolution

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

func (Output) Width

func (o Output) Width() int

type OutputLayout

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

func CreateOutputLayout

func CreateOutputLayout() OutputLayout

func (OutputLayout) Add

func (l OutputLayout) Add(output Output, lx, ly int)

func (OutputLayout) AddAuto

func (l OutputLayout) AddAuto(output Output)

func (OutputLayout) Destroy

func (l OutputLayout) Destroy()

func (OutputLayout) Get

func (l OutputLayout) Get(output Output) OutputLayoutOutput

func (OutputLayout) OutputAt

func (l OutputLayout) OutputAt(x, y float64) Output

func (OutputLayout) OutputCoords

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

type OutputLayoutOutput

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

func (OutputLayoutOutput) X

func (o OutputLayoutOutput) X() int

func (OutputLayoutOutput) Y

func (o OutputLayoutOutput) Y() int

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) Valid

func (m OutputMode) Valid() bool

func (OutputMode) Width

func (m OutputMode) Width() int32

type OutputTransform

type OutputTransform int
const (
	OutputTransformNormal     OutputTransform = C.WL_OUTPUT_TRANSFORM_NORMAL
	OutputTransform90         OutputTransform = C.WL_OUTPUT_TRANSFORM_90
	OutputTransform180        OutputTransform = C.WL_OUTPUT_TRANSFORM_180
	OutputTransform270        OutputTransform = C.WL_OUTPUT_TRANSFORM_270
	OutputTransformFlipped    OutputTransform = C.WL_OUTPUT_TRANSFORM_FLIPPED
	OutputTransformFlipped90  OutputTransform = C.WL_OUTPUT_TRANSFORM_FLIPPED_90
	OutputTransformFlipped180 OutputTransform = C.WL_OUTPUT_TRANSFORM_FLIPPED_180
	OutputTransformFlipped270 OutputTransform = C.WL_OUTPUT_TRANSFORM_FLIPPED_270
)

func (OutputTransform) Invert

func (transform OutputTransform) Invert() OutputTransform

type Pointer

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

func (Pointer) Base

func (p Pointer) Base() InputDevice

func (Pointer) OutputName

func (p Pointer) OutputName() string

type PrimarySelectionV1DeviceManager

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

func CreatePrimarySelectionV1DeviceManager

func CreatePrimarySelectionV1DeviceManager(display Display) PrimarySelectionV1DeviceManager

func (PrimarySelectionV1DeviceManager) OnDestroy

type Renderer

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

func AutocreateRenderer

func AutocreateRenderer(backend Backend) Renderer

func (Renderer) Begin

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

func (Renderer) Clear

func (r Renderer) Clear(c color.Color)

func (Renderer) Destroy

func (r Renderer) Destroy()

func (Renderer) End

func (r Renderer) End()

func (Renderer) InitWLDisplay

func (r Renderer) InitWLDisplay(display Display)

func (Renderer) InitWLSHM

func (r Renderer) InitWLSHM(display Display)

func (Renderer) OnDestroy

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

func (*Renderer) RenderRect

func (r *Renderer) RenderRect(box image.Rectangle, c color.Color, projection *Matrix)

func (Renderer) RenderTextureWithMatrix

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

type Resource

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

func (Resource) GetClient

func (r Resource) GetClient() Client

type ScreencopyManagerV1

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

func CreateScreencopyManagerV1

func CreateScreencopyManagerV1(display Display) ScreencopyManagerV1

func (ScreencopyManagerV1) OnDestroy

func (m ScreencopyManagerV1) OnDestroy(cb func(ScreencopyManagerV1)) Listener

type Seat

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

func CreateSeat

func CreateSeat(display Display, name string) Seat

func (Seat) Capabilities

func (s Seat) Capabilities() SeatCapability

func (Seat) Destroy

func (s Seat) Destroy()

func (Seat) GetKeyboard

func (s Seat) GetKeyboard() Keyboard

func (Seat) Keyboard

func (s Seat) Keyboard() Keyboard

func (Seat) KeyboardNotifyEnter

func (s Seat) KeyboardNotifyEnter(surface Surface, keycodes []uint32, modifiers KeyboardModifiers)

func (Seat) KeyboardNotifyKey

func (s Seat) KeyboardNotifyKey(time time.Time, keyCode uint32, state KeyState)

func (Seat) KeyboardNotifyModifiers

func (s Seat) KeyboardNotifyModifiers(modifiers KeyboardModifiers)

func (Seat) KeyboardState

func (s Seat) KeyboardState() SeatKeyboardState

func (Seat) OnDestroy

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

func (Seat) OnRequestSetCursor

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

func (Seat) PointerNotifyAxis

func (s Seat) PointerNotifyAxis(time time.Time, orientation AxisOrientation, delta float64, deltaDiscrete int32, source AxisSource)

func (Seat) PointerNotifyButton

func (s Seat) PointerNotifyButton(time time.Time, button CursorButton, state ButtonState)

func (Seat) PointerNotifyClearFocus

func (s Seat) PointerNotifyClearFocus()

func (Seat) PointerNotifyEnter

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

func (Seat) PointerNotifyFrame

func (s Seat) PointerNotifyFrame()

func (Seat) PointerNotifyMotion

func (s Seat) PointerNotifyMotion(time time.Time, sx float64, sy float64)

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 Keyboard)

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)) Listener

func (ServerDecoration) OnMode

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

func (ServerDecoration) Surface

func (d ServerDecoration) Surface() Surface

type ServerDecorationManager

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

func CreateServerDecorationManager

func CreateServerDecorationManager(display Display) ServerDecorationManager

func (ServerDecorationManager) OnDestroy

func (ServerDecorationManager) OnNewDecoration

func (ServerDecorationManager) SetDefaultMode

type ServerDecorationManagerMode

type ServerDecorationManagerMode uint32

type Subcompositor

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

func CreateSubcompositor

func CreateSubcompositor(display Display) Subcompositor

type Surface

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

func (Surface) Current

func (s Surface) Current() SurfaceState

func (Surface) ForEachSurface

func (s Surface) ForEachSurface(cb func(Surface, int, int))

func (Surface) GetTexture

func (s Surface) GetTexture() Texture

func (Surface) HasSurface

func (s Surface) HasSurface(sub Surface) bool

HasSurface is a convenience function that searches for sub in s. It does the search entirely in C, so it may be more effecient than manually iterating.

func (Surface) Mapped

func (s Surface) Mapped() bool

func (Surface) OnDestroy

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

func (Surface) OnMap

func (s Surface) OnMap(cb func(Surface)) Listener

func (Surface) OnUnmap

func (s Surface) OnUnmap(cb func(Surface)) Listener

func (Surface) SendEnter

func (s Surface) SendEnter(output Output)

func (Surface) SendFrameDone

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

func (Surface) SendLeave

func (s Surface) SendLeave(output Output)

func (Surface) SurfaceAt

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

func (Surface) Valid

func (s Surface) Valid() bool

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) Dx

func (s SurfaceState) Dx() int32

func (SurfaceState) Dy

func (s SurfaceState) Dy() int32

func (SurfaceState) Height

func (s SurfaceState) Height() int

func (SurfaceState) Transform

func (s SurfaceState) Transform() OutputTransform

func (SurfaceState) Width

func (s SurfaceState) Width() int

type Texture

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

func TextureFromImage

func TextureFromImage(renderer Renderer, img image.Image) Texture

func TextureFromPixels

func TextureFromPixels(renderer Renderer, fmt, stride, width, height uint32, data []byte) Texture

func (Texture) Destroy

func (t Texture) Destroy()

func (Texture) Height

func (t Texture) Height() int

func (Texture) Valid

func (t Texture) Valid() bool

func (Texture) Width

func (t Texture) Width() int

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 CreateXCursorManager

func CreateXCursorManager(name string, size uint32) XCursorManager

func (XCursorManager) Destroy

func (m XCursorManager) Destroy()

func (XCursorManager) GetXCursor

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

func (XCursorManager) Load

func (m XCursorManager) Load(scale float64)

type XDGDecorationManagerV1

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

func CreateXDGDecorationManagerV1

func CreateXDGDecorationManagerV1(display Display) XDGDecorationManagerV1

func (XDGDecorationManagerV1) OnDestroy

func (XDGDecorationManagerV1) OnNewToplevelDecoration

type XDGOutputManagerV1

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

func CreateXDGOutputManagerV1

func CreateXDGOutputManagerV1(display Display, layout OutputLayout) XDGOutputManagerV1

func (XDGOutputManagerV1) OnDestroy

func (m XDGOutputManagerV1) OnDestroy(cb func(XDGOutputManagerV1)) Listener

type XDGPopup

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

func (XDGPopup) Parent

func (p XDGPopup) Parent() Surface

type XDGShell

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

func CreateXDGShell

func CreateXDGShell(display Display, version uint32) XDGShell

func (XDGShell) OnDestroy

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

func (XDGShell) OnNewSurface

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

type XDGSurface

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

func (XDGSurface) Current

func (s XDGSurface) Current() XDGSurfaceState

func (XDGSurface) ForEachSurface

func (s XDGSurface) ForEachSurface(cb func(Surface, int, int))

func (XDGSurface) GetGeometry

func (s XDGSurface) GetGeometry() image.Rectangle

func (XDGSurface) HasSurface

func (s XDGSurface) HasSurface(sub Surface) bool

func (XDGSurface) OnDestroy

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

func (XDGSurface) OnNewPopup

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

func (XDGSurface) OnPingTimeout

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

func (XDGSurface) Ping

func (s XDGSurface) Ping()

func (XDGSurface) Popup

func (s XDGSurface) Popup() XDGPopup

func (XDGSurface) Resource

func (s XDGSurface) Resource() Resource

func (XDGSurface) Role

func (s XDGSurface) Role() XDGSurfaceRole

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, ok bool)

func (XDGSurface) Toplevel

func (s XDGSurface) Toplevel() XDGToplevel

func (XDGSurface) Valid

func (s XDGSurface) Valid() bool

type XDGSurfaceRole

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

type XDGSurfaceState

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

func (XDGSurfaceState) Geometry

func (s XDGSurfaceState) Geometry() image.Rectangle

type XDGSurfaceWalkFunc

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

type XDGToplevel

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

func (XDGToplevel) Base

func (t XDGToplevel) Base() XDGSurface

func (XDGToplevel) Current

func (t XDGToplevel) Current() XDGToplevelState

func (XDGToplevel) OnRequestMaximize

func (t XDGToplevel) OnRequestMaximize(cb func(XDGToplevel)) Listener

func (XDGToplevel) OnRequestMinimize

func (t XDGToplevel) OnRequestMinimize(cb func(XDGToplevel)) Listener

func (XDGToplevel) OnRequestMove

func (t XDGToplevel) OnRequestMove(cb func(t XDGToplevel, client SeatClient, serial uint32)) Listener

func (XDGToplevel) OnRequestResize

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

func (XDGToplevel) OnSetTitle

func (t XDGToplevel) OnSetTitle(cb func(XDGToplevel, string)) Listener

func (XDGToplevel) SendClose

func (s XDGToplevel) SendClose()

func (XDGToplevel) SetActivated

func (s XDGToplevel) SetActivated(activated bool)

func (XDGToplevel) SetMaximized

func (s XDGToplevel) SetMaximized(maximized bool)

func (XDGToplevel) SetResizing

func (s XDGToplevel) SetResizing(resizing bool)

func (XDGToplevel) SetSize

func (s XDGToplevel) SetSize(width int32, height int32)

func (XDGToplevel) SetTiled

func (s XDGToplevel) SetTiled(edges Edges)

func (XDGToplevel) Title

func (t XDGToplevel) Title() string

func (XDGToplevel) Valid

func (s XDGToplevel) Valid() bool

type XDGToplevelDecorationV1

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

func (XDGToplevelDecorationV1) OnDestroy

func (XDGToplevelDecorationV1) OnRequestMode

func (d XDGToplevelDecorationV1) OnRequestMode(cb func(XDGToplevelDecorationV1)) Listener

func (XDGToplevelDecorationV1) RequestedMode

func (XDGToplevelDecorationV1) SetMode

func (XDGToplevelDecorationV1) Toplevel

func (d XDGToplevelDecorationV1) Toplevel() XDGToplevel

type XDGToplevelDecorationV1Mode

type XDGToplevelDecorationV1Mode uint32

type XDGToplevelDecorationV1State

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

func (XDGToplevelDecorationV1State) Mode

type XDGToplevelState

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

func (XDGToplevelState) Activated

func (s XDGToplevelState) Activated() bool

func (XDGToplevelState) Height

func (s XDGToplevelState) Height() uint32

func (XDGToplevelState) MaxHeight

func (s XDGToplevelState) MaxHeight() uint32

func (XDGToplevelState) MaxWidth

func (s XDGToplevelState) MaxWidth() uint32

func (XDGToplevelState) MinHeight

func (s XDGToplevelState) MinHeight() uint32

func (XDGToplevelState) MinWidth

func (s XDGToplevelState) MinWidth() uint32

func (XDGToplevelState) Width

func (s XDGToplevelState) Width() uint32

type Xwayland

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

func CreateXwayland

func CreateXwayland(display Display, compositor Compositor, lazy bool) Xwayland

func (Xwayland) Destroy

func (x Xwayland) Destroy()

func (Xwayland) OnNewSurface

func (x Xwayland) OnNewSurface(cb func(XwaylandSurface)) Listener

func (Xwayland) Server

func (x Xwayland) Server() XwaylandServer

func (Xwayland) SetCursor

func (x Xwayland) SetCursor(img XCursorImage)

func (Xwayland) Valid

func (x Xwayland) Valid() bool

type XwaylandServer

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

func (XwaylandServer) DisplayName

func (s XwaylandServer) DisplayName() string

type XwaylandSurface

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

func (XwaylandSurface) Activate

func (s XwaylandSurface) Activate(a bool)

func (XwaylandSurface) Close

func (s XwaylandSurface) Close()

func (XwaylandSurface) Configure

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

func (XwaylandSurface) Decorations

func (XwaylandSurface) Height

func (s XwaylandSurface) Height() int

func (XwaylandSurface) OnDestroy

func (s XwaylandSurface) OnDestroy(cb func(XwaylandSurface)) Listener

func (XwaylandSurface) OnRequestConfigure

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

func (XwaylandSurface) OnRequestMaximize

func (s XwaylandSurface) OnRequestMaximize(cb func(surface XwaylandSurface)) Listener

func (XwaylandSurface) OnRequestMinimize

func (s XwaylandSurface) OnRequestMinimize(cb func(surface XwaylandSurface)) Listener

func (XwaylandSurface) OnRequestMove

func (s XwaylandSurface) OnRequestMove(cb func(surface XwaylandSurface)) Listener

func (XwaylandSurface) OnRequestResize

func (s XwaylandSurface) OnRequestResize(cb func(surface XwaylandSurface, edges Edges)) Listener

func (XwaylandSurface) OnSetDecorations

func (s XwaylandSurface) OnSetDecorations(cb func(XwaylandSurface)) Listener

func (XwaylandSurface) OnSetTitle

func (s XwaylandSurface) OnSetTitle(cb func(XwaylandSurface, string)) Listener

func (XwaylandSurface) SetMaximized

func (s XwaylandSurface) SetMaximized(maximized bool)

func (XwaylandSurface) SetMinimized

func (s XwaylandSurface) SetMinimized(minimized bool)

func (XwaylandSurface) Surface

func (s XwaylandSurface) Surface() Surface

func (XwaylandSurface) Title

func (s XwaylandSurface) Title() string

func (XwaylandSurface) Valid

func (s XwaylandSurface) Valid() bool

func (XwaylandSurface) Width

func (s XwaylandSurface) Width() int

type XwaylandSurfaceDecorations

type XwaylandSurfaceDecorations uint32

Directories

Path Synopsis
xkb

Jump to

Keyboard shortcuts

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