windowtrace

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package windowtrace is same as window except with tracing

Index

Constants

View Source
const (
	CursorBottomLeft   = window.CursorBottomLeft
	CursorBottomRight  = window.CursorBottomRight
	CursorBottom       = window.CursorBottom
	CursorDragging     = window.CursorDragging
	CursorLeftPtr      = window.CursorLeftPtr
	CursorLeft         = window.CursorLeft
	CursorRight        = window.CursorRight
	CursorTopLeft      = window.CursorTopLeft
	CursorTopRight     = window.CursorTopRight
	CursorTop          = window.CursorTop
	CursorIbeam        = window.CursorIbeam
	CursorHand1        = window.CursorHand1
	CursorWatch        = window.CursorWatch
	CursorDndMove      = window.CursorDndMove
	CursorDndCopy      = window.CursorDndCopy
	CursorDndForbidden = window.CursorDndForbidden
	CursorBlank        = window.CursorBlank
)
View Source
const BufferTypeEglWindow = window.BufferTypeEglWindow
View Source
const BufferTypeShm = window.BufferTypeShm
View Source
const PreferredFormatNone = window.PreferredFormatNone
View Source
const PreferredFormatRgb565 = window.PreferredFormatRgb565
View Source
const SurfaceHintResize = window.SurfaceHintResize
View Source
const SurfaceHintRgb565 = window.SurfaceHintRgb565
View Source
const SurfaceOpaque = window.SurfaceOpaque
View Source
const SurfaceShm = window.SurfaceShm
View Source
const ThemeDark = Theme(window.ThemeDark)
View Source
const ThemeLight = Theme(window.ThemeLight)
View Source
const ZwpPointerConstraintsV1Version = window.ZwpPointerConstraintsV1Version
View Source
const ZwpRelativePointerManagerV1Version = window.ZwpRelativePointerManagerV1Version

Variables

This section is empty.

Functions

func DisplayRun

func DisplayRun(d *Display)

func SurfaceEnter

func SurfaceEnter(wlSurface *wl.Surface, wlOutput *wl.Output)

func SurfaceLeave

func SurfaceLeave(wlSurface *wl.Surface, wlOutput *wl.Output)

Types

type DataSource

type DataSource window.DataSource

func (*DataSource) AddListener

func (ds *DataSource) AddListener(l wlclient.DataSourceListener)

Example implementation for DataSource

func (*DataSource) Offer

func (ds *DataSource) Offer(str string)

func (*DataSource) RemoveListener

func (ds *DataSource) RemoveListener(l wlclient.DataSourceListener)

type Display

type Display window.Display

func DisplayCreate

func DisplayCreate(argv []string) (d *Display, e error)

func (*Display) CreateDataSource

func (d *Display) CreateDataSource() (*DataSource, error)

func (*Display) Destroy

func (d *Display) Destroy()

func (*Display) Exit

func (d *Display) Exit()

func (*Display) GetSerial

func (d *Display) GetSerial() uint32

func (*Display) HandleRegistryGlobal

func (d *Display) HandleRegistryGlobal(e wl.RegistryGlobalEvent)

func (*Display) HandleRegistryGlobalRemove

func (d *Display) HandleRegistryGlobalRemove(e wl.RegistryGlobalRemoveEvent)

func (*Display) HandleShmFormat

func (d *Display) HandleShmFormat(e wl.ShmFormatEvent)

func (*Display) HandleWmBasePing

func (d *Display) HandleWmBasePing(ev xdg.WmBasePingEvent)

func (*Display) RegistryGlobal

func (d *Display) RegistryGlobal(registry *wl.Registry, id uint32, iface string, version uint32)

func (*Display) RegistryGlobalRemove

func (d *Display) RegistryGlobalRemove(wlRegistry *wl.Registry, name uint32)

func (*Display) SetGlobalHandler

func (d *Display) SetGlobalHandler(gh GlobalHandler)

func (*Display) SetSeatHandler

func (d *Display) SetSeatHandler(h SeatHandler)

func (*Display) SetUserData

func (d *Display) SetUserData(data interface{})

func (*Display) ShellPing

func (d *Display) ShellPing(shell *xdg.WmBase, serial uint32)

func (*Display) ShmFormat

func (d *Display) ShmFormat(wlShm *wl.Shm, format uint32)

type FullscreenHandler

type FullscreenHandler interface {
	Fullscreen(*Window, WidgetHandler)
}

type GlobalHandler

type GlobalHandler interface {
	HandleGlobal(d *Display, id uint32, iface string, version uint32, data interface{})
}

type Input

type Input window.Input

func (*Input) DeviceSetSelection

func (input *Input) DeviceSetSelection(ds *DataSource, num uint32)

func (*Input) GetModifiers

func (input *Input) GetModifiers() ModType

func (*Input) GetRune

func (input *Input) GetRune(sym *uint32, v uint32) (r rune)

func (*Input) GetUtf8

func (input *Input) GetUtf8() (r []byte)

func (*Input) ReceiveSelectionData

func (input *Input) ReceiveSelectionData(str string, val io.WriteCloser) error

type KeyboardHandler

type KeyboardHandler interface {
	Key(
		window *Window,
		input *Input,
		time uint32,
		key uint32,
		notUnicode uint32,
		state wl.KeyboardKeyState,
		data WidgetHandler,
	)
	Focus(window *Window, input *Input)
}

type ModType

type ModType uint8

ModType is the type of Mod Masks

const ModAltMask ModType = 0x02

ModAltMask is the Alt modifier mask - provided for convenience only

const ModControlMask ModType = 0x04

ModControlMask is the Control modifier mask - provided for convenience only

const ModShiftMask ModType = 0x01

ModShiftMask is the Shift modifier mask - provided for convenience only

type Popup struct {
	Popup   *xdg.Popup
	Display *Display
	// contains filtered or unexported fields
}

func (*Popup) BufferRelease

func (w *Popup) BufferRelease(buffer *wl.Buffer)

func (*Popup) Destroy

func (p *Popup) Destroy()

func (*Popup) PopupGetSurface

func (p *Popup) PopupGetSurface() cairo.Surface

func (*Popup) SetPopupHandler

func (p *Popup) SetPopupHandler(ph Popuper)

type Popuper

type Popuper interface {
	Render(cairo.Surface, uint32)
	Done()
	Configure() *Widget
}

type Rectangle

type Rectangle = window.Rectangle

Rectangle Struct

type ResizeHandler

type ResizeHandler interface {
	MinimumSize() (int32, int32)
}

type SeatHandler

type SeatHandler interface {
	Capabilities(i *Input, seat *wl.Seat, caps uint32)
	Name(i *Input, seat *wl.Seat, name string)
}

type Theme added in v0.4.3

type Theme window.Theme

type Widget

type Widget window.Widget

func (*Widget) AddWidget

func (parent *Widget) AddWidget(data WidgetHandler) *Widget

func (*Widget) Destroy

func (parent *Widget) Destroy()

func (*Widget) GetAllocation

func (widget *Widget) GetAllocation() Rectangle

func (*Widget) ScheduleRedraw

func (widget *Widget) ScheduleRedraw()

func (*Widget) ScheduleResize

func (parent *Widget) ScheduleResize(width int32, height int32)

ScheduleResize schedules a resize for the widget.

func (*Widget) SetAllocation

func (widget *Widget) SetAllocation(a int32, b int32, c int32, d int32)

func (*Widget) SetUserDataWidgetHandler

func (widget *Widget) SetUserDataWidgetHandler(wh WidgetHandler)

func (*Widget) WidgetGetLastTime

func (widget *Widget) WidgetGetLastTime() uint32

type WidgetHandler

type WidgetHandler interface {
	Resize(widget *Widget, width int32, height int32, pwidth int32, pheight int32)
	Redraw(widget *Widget)
	Enter(widget *Widget, input *Input, x float32, y float32)
	Leave(widget *Widget, input *Input)
	Motion(widget *Widget, input *Input, time uint32, x float32, y float32) int
	Button(
		widget *Widget,
		input *Input,
		time uint32,
		button uint32,
		state wl.PointerButtonState,
		data WidgetHandler,
	)
	TouchUp(widget *Widget, input *Input, serial uint32, time uint32, id int32)
	TouchDown(widget *Widget, input *Input, serial uint32, time uint32, id int32, x float32, y float32)
	TouchMotion(widget *Widget, input *Input, time uint32, id int32, x float32, y float32)
	TouchFrame(widget *Widget, input *Input)
	TouchCancel(widget *Widget, width int32, height int32)
	Axis(widget *Widget, input *Input, time uint32, axis uint32, value float32)
	AxisSource(widget *Widget, input *Input, source uint32)
	AxisStop(widget *Widget, input *Input, time uint32, axis uint32)
	AxisDiscrete(widget *Widget, input *Input, axis uint32, discrete int32)
	PointerFrame(widget *Widget, input *Input)
}

type Window

type Window struct {
	*window.Window
	Display *Display
}

func Create

func Create(d *Display) *Window

func CreateUndecorated added in v0.4.0

func CreateUndecorated(d *Display) *Window

func (*Window) AddPopupWidget

func (w *Window) AddPopupWidget(p *Popup, data WidgetHandler) *Widget

AddPopupWidget adds a popup widget to the window.

func (*Window) AddWidget

func (w *Window) AddWidget(data WidgetHandler) *Widget

AddWidget adds a widget to the window.

func (*Window) CreatePopup

func (w *Window) CreatePopup(seat *wl.Seat, clickSerial, width, height, x, y uint32) *Popup

func (*Window) Destroy

func (w *Window) Destroy()

Destroy destroys the window.

func (*Window) ScheduleResize

func (w *Window) ScheduleResize(width int32, height int32)

ScheduleResize schedules a window resize.

func (*Window) SetBufferType

func (w *Window) SetBufferType(t int32)

SetBufferType sets the buffer type.

func (*Window) SetDecorationTheme added in v0.4.3

func (w *Window) SetDecorationTheme(theme Theme)

func (*Window) SetFullscreenHandler

func (w *Window) SetFullscreenHandler(handler FullscreenHandler)

func (*Window) SetKeyboardHandler

func (w *Window) SetKeyboardHandler(handler KeyboardHandler)

SetKeyboardHandler sets the keyboard handler for the window.

func (*Window) SetTitle

func (w *Window) SetTitle(title string)

SetTitle sets the window title.

func (*Window) WindowGetSurface

func (w *Window) WindowGetSurface() cairo.Surface

Jump to

Keyboard shortcuts

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