libwayland

package
v0.1.36 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package libwayland implements a wayland protocol using wayland-client and wayland-cursor C libraries

Index

Constants

View Source
const ErrAgain = int(C.EAGAIN)
View Source
const OUTPUT_TRANSFORM_180 = 2

*

  • 180 degrees counter-clockwise
View Source
const OUTPUT_TRANSFORM_270 = 3

*

  • 270 degrees counter-clockwise
View Source
const OUTPUT_TRANSFORM_90 = 1

*

  • 90 degrees counter-clockwise
View Source
const OUTPUT_TRANSFORM_FLIPPED = 4

*

  • 180 degree flip around a vertical axis
View Source
const OUTPUT_TRANSFORM_FLIPPED_180 = 6

*

  • flip and rotate 180 degrees counter-clockwise
View Source
const OUTPUT_TRANSFORM_FLIPPED_270 = 7

*

  • flip and rotate 270 degrees counter-clockwise
View Source
const OUTPUT_TRANSFORM_FLIPPED_90 = 5

*

  • flip and rotate 90 degrees counter-clockwise
View Source
const OUTPUT_TRANSFORM_NORMAL = 0

*

  • no transform
View Source
const POINTER_AXIS_DISCRETE_SINCE_VERSION = 5
View Source
const POINTER_AXIS_SINCE_VERSION = 1
View Source
const POINTER_AXIS_SOURCE_SINCE_VERSION = 5
View Source
const POINTER_AXIS_STOP_SINCE_VERSION = 5
View Source
const POINTER_BUTTON_SINCE_VERSION = 1
View Source
const POINTER_ENTER_SINCE_VERSION = 1
View Source
const POINTER_FRAME_SINCE_VERSION = 5
View Source
const POINTER_LEAVE_SINCE_VERSION = 1
View Source
const POINTER_MOTION_SINCE_VERSION = 1
View Source
const POINTER_RELEASE_SINCE_VERSION = 3
View Source
const POINTER_SET_CURSOR_SINCE_VERSION = 1
View Source
const SEAT_CAPABILITY_KEYBOARD = 2
View Source
const SEAT_CAPABILITY_POINTER = 1
View Source
const SEAT_CAPABILITY_TOUCH = 4
View Source
const SHM_FORMAT_ARGB8888 = C.WL_SHM_FORMAT_ARGB8888
View Source
const SHM_FORMAT_RGB565 = C.WL_SHM_FORMAT_RGB565
View Source
const SHM_FORMAT_XRGB8888 = C.WL_SHM_FORMAT_XRGB8888
View Source
const TOPLEVEL_STATE_ACTIVATED = 4

*

  • the surface is now activated
View Source
const TOPLEVEL_STATE_FULLSCREEN = 2

*

  • the surface is fullscreen
View Source
const TOPLEVEL_STATE_MAXIMIZED = 1
View Source
const TOPLEVEL_STATE_RESIZING = 3

*

  • the surface is being resized

Variables

This section is empty.

Functions

func BufferAddListener

func BufferAddListener(wl_buffer *Buffer, releaser BufferListener)

func BufferDestroy

func BufferDestroy(buf *Buffer)

func CallbackAddListener

func CallbackAddListener(wl_callback *Callback, doner CallbackListener)

func CallbackDestroy

func CallbackDestroy(c *Callback)

func CursorFrameAndDuration

func CursorFrameAndDuration(cursor *Cursor, time uint32, duration *uint32) int

func CursorImageCount

func CursorImageCount(cursor *Cursor) int

func CursorImageGetHeight

func CursorImageGetHeight(img *CursorImage) int

func CursorImageGetHotspotX

func CursorImageGetHotspotX(img *CursorImage) int

func CursorImageGetHotspotY

func CursorImageGetHotspotY(img *CursorImage) int

func CursorImageGetWidth

func CursorImageGetWidth(img *CursorImage) int

func CursorThemeDestroy

func CursorThemeDestroy(theme *CursorTheme)

func DisplayCancelRead

func DisplayCancelRead(d *Display)

func DisplayDisconnect

func DisplayDisconnect(display *Display)

func DisplayDispatch

func DisplayDispatch(d *Display) int

func DisplayDispatchPending

func DisplayDispatchPending(d *Display) int

func DisplayFlush

func DisplayFlush(d *Display) (n int, err error)

func DisplayGetFd

func DisplayGetFd(d *Display) int

func DisplayPrepareRead

func DisplayPrepareRead(d *Display) int

func DisplayReadEvents

func DisplayReadEvents(d *Display)

func DisplayRoundtrip

func DisplayRoundtrip(d *Display) int

func FixedToDouble

func FixedToDouble(num Fixed) float64

func FixedToFloat

func FixedToFloat(num Fixed) float32

func OutputAddListener

func OutputAddListener(wl_output *Output, doner OutputListener)

func PointerAddListener

func PointerAddListener(wl_pointer *Pointer, doner PointerListener) uintptr

func PointerDestroy

func PointerDestroy(p *Pointer)

func PointerRelease

func PointerRelease(p *Pointer)

func PointerSetCursor

func PointerSetCursor(pointer *Pointer, s uint32, surface *Surface, x int32, y int32)

func PointerSetUserData

func PointerSetUserData(s *Pointer, userdata uintptr)

func RegionDestroy

func RegionDestroy(r *Region)

func RegistryAddListener

func RegistryAddListener(wl_callback *Registry, globrem RegistryListener)

func RegistryDestroy

func RegistryDestroy(r *Registry)

func SeatAddListener

func SeatAddListener(wl_seat *Seat, doner SeatListener)

func ShmAddListener

func ShmAddListener(wl_callback *Shm, formater ShmListener)

func ShmDestroy

func ShmDestroy(shm *Shm)

func ShmPoolDestroy

func ShmPoolDestroy(p *ShmPool)

func SubsurfaceDestroy

func SubsurfaceDestroy(r *Subsurface)

func SurfaceAddListener

func SurfaceAddListener(wl_surface *Surface, se SurfaceEnterListener, sl SurfaceLeaveListener, sp uintptr)

func SurfaceAttach

func SurfaceAttach(s *Surface, b *Buffer, x int32, y int32)

func SurfaceDamage

func SurfaceDamage(s *Surface, a, b, c, d int32)

func SurfaceDestroy

func SurfaceDestroy(s *Surface)

func SurfaceSetInputRegion

func SurfaceSetInputRegion(s *Surface, r *Region)

func SurfaceSetOpaqueRegion

func SurfaceSetOpaqueRegion(s *Surface, r *Region)

func SurfaceSetUserData

func SurfaceSetUserData(s *Surface, userdata uintptr)

func XdgPopupDestroy

func XdgPopupDestroy(p *XdgPopup)

func XdgSurfaceAckConfigure

func XdgSurfaceAckConfigure(sf *XdgSurface, serial uint32)

func XdgSurfaceDestroy

func XdgSurfaceDestroy(s *XdgSurface)

func XdgSurfaceSetWindowGeometry

func XdgSurfaceSetWindowGeometry(surf *XdgSurface, x int32, y int32, width int32, height int32)

func XdgToplevelAddListener

func XdgToplevelAddListener(cb *XdgToplevel, confcloser XdgToplevelListener)

func XdgToplevelDestroy

func XdgToplevelDestroy(t *XdgToplevel)

func XdgWmBaseAddListener

func XdgWmBaseAddListener(wl_callback *XdgWmBase, pinger XdgWmBaseListener)

func XdgWmBaseDestroy

func XdgWmBaseDestroy(s *XdgWmBase)

func XdgWmBasePong

func XdgWmBasePong(sh *XdgWmBase, serial uint32)

Types

type Buffer

type Buffer C.struct_wl_buffer

func CursorImageGetBuffer

func CursorImageGetBuffer(image *CursorImage) *Buffer

func ShmPoolCreateBuffer

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

type BufferListener

type BufferListener interface {
	BufferRelease(buf *Buffer)
}

type Callback

type Callback C.struct_wl_callback

func SurfaceFrame

func SurfaceFrame(s *Surface) *Callback

type CallbackListener

type CallbackListener interface {
	CallbackDone(wl_callback *Callback, callback_data uint32)
}

type Compositor

type Compositor C.struct_wl_compositor

func RegistryBindCompositorInterface

func RegistryBindCompositorInterface(r *Registry, name uint32, version uint32) *Compositor

func (*Compositor) CreateSurface

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

type Cursor

type Cursor C.struct_wl_cursor

func CursorThemeGetCursor

func CursorThemeGetCursor(theme *CursorTheme, str []byte) *Cursor

type CursorImage

type CursorImage C.struct_wl_cursor_image

func CursorGetCursorImage

func CursorGetCursorImage(cursor *Cursor, index int) *CursorImage

type CursorTheme

type CursorTheme C.struct_wl_cursor_theme

func CursorThemeLoad

func CursorThemeLoad(name []byte, bar int, shm *Shm) *CursorTheme

type DataDevice

type DataDevice C.struct_wl_data_device

type DataDeviceManager

type DataDeviceManager C.struct_wl_data_device_manager

func RegistryBindDataDeviceManager

func RegistryBindDataDeviceManager(r *Registry, name uint32, version uint32) *DataDeviceManager

type DataOffer

type DataOffer C.struct_wl_data_offer

type DataSource

type DataSource C.struct_wl_data_source

type Display

type Display C.struct_wl_display

func DisplayConnect

func DisplayConnect(name []byte) (*Display, error)

type Fixed

type Fixed int32

Fixed is a fraction type

type FullscreenShellV1

type FullscreenShellV1 C.struct_zwp_fullscreen_shell_v1

func RegistryBindFullscreenShellV1Interface

func RegistryBindFullscreenShellV1Interface(r *Registry, name uint32, version uint32) *FullscreenShellV1

type Keyboard

type Keyboard C.struct_wl_keyboard

type LockedPointerV1

type LockedPointerV1 C.struct_zwp_locked_pointer_v1

type Output

type Output C.struct_wl_output

func RegistryBindOutputInterface

func RegistryBindOutputInterface(r *Registry, name uint32, version uint32) *Output

type OutputListener

type OutputListener interface {
	OutputGeometry(wl_output *Output, x int, y int, physical_width int, physical_height int, subpixel int, make string, model string, transform int)
	OutputDone(wl_output *Output)
	OutputScale(wl_output *Output, scale int32)
	OutputMode(wl_output *Output, flags uint32, width int, height int, refresh int)
}

type Pointer

type Pointer C.struct_wl_pointer

func SeatGetPointer

func SeatGetPointer(seat *Seat) *Pointer

type PointerButtonState

type PointerButtonState int

type PointerListener

type PointerListener interface {
	PointerEnter(wl_pointer *Pointer, serial uint32, wl_surface *Surface, surface_x Fixed, surface_y Fixed)
	PointerLeave(wl_pointer *Pointer, serial uint32, wl_surface *Surface)
	PointerMotion(wl_pointer *Pointer, time uint32, surface_x Fixed, surface_y Fixed)
	PointerButton(wl_pointer *Pointer, serial uint32, time uint32, button uint32, state uint32)
	PointerAxis(wl_pointer *Pointer, time uint32, axis uint32, value Fixed)
	PointerFrame(wl_pointer *Pointer)
	PointerAxisSource(wl_pointer *Pointer, axis_source uint32)
	PointerAxisStop(wl_pointer *Pointer, time uint32, axis uint32)
	PointerAxisDiscrete(wl_pointer *Pointer, axis uint32, discrete int32)
}

type Region

type Region C.struct_wl_region

type Registry

type Registry C.struct_wl_registry

func DisplayGetRegistry

func DisplayGetRegistry(d *Display) (*Registry, error)

type RegistryListener

type RegistryListener interface {
	RegistryGlobal(wl_registry *Registry, name uint32, iface string, version uint32)
	RegistryGlobalRemove(wl_registry *Registry, name uint32)
}

type Seat

type Seat C.struct_wl_seat

func RegistryBindSeatInterface

func RegistryBindSeatInterface(r *Registry, name uint32, version uint32) *Seat

type SeatListener

type SeatListener interface {
	SeatCapabilities(wl_seat *Seat, capabilities uint32)
	SeatName(wl_seat *Seat, name string)
}

type Shell

type Shell C.struct_wl_shell

type ShellSurface

type ShellSurface C.struct_wl_shell_surface

type Shm

type Shm C.struct_wl_shm

func RegistryBindShmInterface

func RegistryBindShmInterface(r *Registry, name uint32, version uint32) *Shm

type ShmListener

type ShmListener interface {
	ShmFormat(wl_shm *Shm, format uint32)
}

type ShmPool

type ShmPool C.struct_wl_shm_pool

func ShmCreatePool

func ShmCreatePool(shm *Shm, fd int32, size int32) *ShmPool

type Subcompositor

type Subcompositor C.struct_wl_subcompositor

func RegistryBindSubcompositorInterface added in v0.1.36

func RegistryBindSubcompositorInterface(r *Registry, name uint32, version uint32) *Subcompositor

func (*Subcompositor) GetSubsurface added in v0.1.36

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

type Subsurface

type Subsurface C.struct_wl_subsurface

func (*Subsurface) SetDesync added in v0.1.36

func (sub *Subsurface) SetDesync()

func (*Subsurface) SetPosition added in v0.1.36

func (sub *Subsurface) SetPosition(x, y int)

func (*Subsurface) SetSync added in v0.1.36

func (sub *Subsurface) SetSync()

type Surface

type Surface C.struct_wl_surface

func (*Surface) Commit

func (s *Surface) Commit()

type SurfaceEnterListener

type SurfaceEnterListener func(ptr uintptr, wl_surface *Surface, wl_output *Output)

type SurfaceLeaveListener

type SurfaceLeaveListener func(ptr uintptr, wl_surface *Surface, wl_output *Output)

type Touch

type Touch C.struct_wl_touch

type XdgPopup

type XdgPopup C.struct_xdg_popup

type XdgSurface

type XdgSurface C.struct_xdg_surface

func (*XdgSurface) AddListener

func (wl_callback *XdgSurface) AddListener(confer XdgSurfaceListener)

func (*XdgSurface) GetToplevel

func (s *XdgSurface) GetToplevel() (t *XdgToplevel, err error)

type XdgSurfaceListener

type XdgSurfaceListener interface {
	XdgSurfaceConfigure(zxdg_surface *XdgSurface, serial uint32)
}

type XdgToplevel

type XdgToplevel C.struct_xdg_toplevel

func (*XdgToplevel) SetTitle

func (t *XdgToplevel) SetTitle(strtitle string)

type XdgToplevelListener

type XdgToplevelListener interface {
	XdgToplevelConfigure(zxdg_toplevel *XdgToplevel, width int32, height int32, states []int32)
	XdgToplevelClose(zxdg_toplevel *XdgToplevel)
}

type XdgWmBase

type XdgWmBase C.struct_xdg_wm_base

func RegistryBindXdgWmBaseInterface

func RegistryBindXdgWmBaseInterface(r *Registry, name uint32, version uint32) *XdgWmBase

func (*XdgWmBase) GetSurface

func (sh *XdgWmBase) GetSurface(wls *Surface) (s *XdgSurface, err error)

type XdgWmBaseListener

type XdgWmBaseListener interface {
	XdgWmBasePing(shell *XdgWmBase, serial uint32)
}

Jump to

Keyboard shortcuts

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