Documentation
¶
Overview ¶
Package windowtrace is same as window except with tracing
Index ¶
- Constants
- func DisplayRun(d *Display)
- func SurfaceEnter(wlSurface *wl.Surface, wlOutput *wl.Output)
- func SurfaceLeave(wlSurface *wl.Surface, wlOutput *wl.Output)
- type DataSource
- type Display
- func (d *Display) CreateDataSource() (*DataSource, error)
- func (d *Display) Destroy()
- func (d *Display) Exit()
- func (d *Display) GetSerial() uint32
- func (d *Display) HandleRegistryGlobal(e wl.RegistryGlobalEvent)
- func (d *Display) HandleRegistryGlobalRemove(e wl.RegistryGlobalRemoveEvent)
- func (d *Display) HandleShmFormat(e wl.ShmFormatEvent)
- func (d *Display) HandleWmBasePing(ev xdg.WmBasePingEvent)
- func (d *Display) RegistryGlobal(registry *wl.Registry, id uint32, iface string, version uint32)
- func (d *Display) RegistryGlobalRemove(wlRegistry *wl.Registry, name uint32)
- func (d *Display) SetGlobalHandler(gh GlobalHandler)
- func (d *Display) SetSeatHandler(h SeatHandler)
- func (d *Display) SetUserData(data interface{})
- func (d *Display) ShellPing(shell *xdg.WmBase, serial uint32)
- func (d *Display) ShmFormat(wlShm *wl.Shm, format uint32)
- type FullscreenHandler
- type GlobalHandler
- type Input
- type KeyboardHandler
- type ModType
- type Popup
- type Popuper
- type Rectangle
- type ResizeHandler
- type SeatHandler
- type Theme
- type Widget
- func (parent *Widget) AddWidget(data WidgetHandler) *Widget
- func (parent *Widget) Destroy()
- func (widget *Widget) GetAllocation() Rectangle
- func (widget *Widget) ScheduleRedraw()
- func (parent *Widget) ScheduleResize(width int32, height int32)
- func (widget *Widget) SetAllocation(a int32, b int32, c int32, d int32)
- func (widget *Widget) SetUserDataWidgetHandler(wh WidgetHandler)
- func (widget *Widget) WidgetGetLastTime() uint32
- type WidgetHandler
- type Window
- func (w *Window) AddPopupWidget(p *Popup, data WidgetHandler) *Widget
- func (w *Window) AddWidget(data WidgetHandler) *Widget
- func (w *Window) CreatePopup(seat *wl.Seat, clickSerial, width, height, x, y uint32) *Popup
- func (w *Window) Destroy()
- func (w *Window) ScheduleResize(width int32, height int32)
- func (w *Window) SetBufferType(t int32)
- func (w *Window) SetDecorationTheme(theme Theme)
- func (w *Window) SetFullscreenHandler(handler FullscreenHandler)
- func (w *Window) SetKeyboardHandler(handler KeyboardHandler)
- func (w *Window) SetTitle(title string)
- func (w *Window) WindowGetSurface() cairo.Surface
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)
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 ¶
func DisplayCreate ¶
func (*Display) CreateDataSource ¶
func (d *Display) CreateDataSource() (*DataSource, error)
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 (*Display) RegistryGlobalRemove ¶
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{})
type FullscreenHandler ¶
type FullscreenHandler interface {
Fullscreen(*Window, WidgetHandler)
}
type GlobalHandler ¶
type Input ¶
func (*Input) DeviceSetSelection ¶
func (input *Input) DeviceSetSelection(ds *DataSource, num uint32)
func (*Input) GetModifiers ¶
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 ¶
func (*Popup) BufferRelease ¶
func (*Popup) PopupGetSurface ¶
func (*Popup) SetPopupHandler ¶
type ResizeHandler ¶
type SeatHandler ¶
type Widget ¶
func (*Widget) AddWidget ¶
func (parent *Widget) AddWidget(data WidgetHandler) *Widget
func (*Widget) GetAllocation ¶
func (*Widget) ScheduleRedraw ¶
func (widget *Widget) ScheduleRedraw()
func (*Widget) ScheduleResize ¶
ScheduleResize schedules a resize for the widget.
func (*Widget) SetAllocation ¶
func (*Widget) SetUserDataWidgetHandler ¶
func (widget *Widget) SetUserDataWidgetHandler(wh WidgetHandler)
func (*Widget) WidgetGetLastTime ¶
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 ¶
func CreateUndecorated ¶ added in v0.4.0
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 (*Window) ScheduleResize ¶
ScheduleResize schedules a window resize.
func (*Window) SetBufferType ¶
SetBufferType sets the buffer type.
func (*Window) SetDecorationTheme ¶ added in v0.4.3
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) WindowGetSurface ¶
Click to show internal directories.
Click to hide internal directories.