Documentation
¶
Overview ¶
Package surface implements wl_compositor, wl_surface, wl_region and wl_subcompositor: double-buffered surface state, subsurface trees and roles.
Index ¶
- Constants
- func RegionValue(r *sw.WlRegion) (region.Region, error)
- type Awaited
- type Awaiter
- type Backing
- type Barrier
- type Buffer
- type HandoverRole
- type Hold
- type Hooks
- type Latched
- type LatchedValue
- type Listener
- type Manager
- type PresentationKind
- type Role
- type Subsurface
- type Surface
- func (s *Surface) AcceptsInput(p image.Point) bool
- func (s *Surface) AddHooks(h *Hooks)
- func (s *Surface) Attached() bool
- func (s *Surface) Buffer() Buffer
- func (s *Surface) BufferDamage() []image.Rectangle
- func (s *Surface) BufferSource() render.FRect
- func (s *Surface) ClearRole(r Role)
- func (s *Surface) Client() *server.Client
- func (s *Surface) Damage() []image.Rectangle
- func (s *Surface) Enter(outputs []*sw.WlOutput) error
- func (s *Surface) FrameDone(msec uint32) error
- func (s *Surface) FrameDoneUndrawn(msec uint32) error
- func (s *Surface) HasBuffer() bool
- func (s *Surface) Input() region.Region
- func (s *Surface) Latch()
- func (s *Surface) Leave(outputs []*sw.WlOutput) error
- func (s *Surface) Offset() image.Point
- func (s *Surface) Opaque() region.Region
- func (s *Surface) PendingBuffer() (Buffer, bool)
- func (s *Surface) Presented(outputs []*sw.WlOutput, at, refresh time.Duration, variable bool, seq uint64, ...) error
- func (s *Surface) RemoveHooks(h *Hooks)
- func (s *Surface) Resource() *sw.WlSurface
- func (s *Surface) Retry() error
- func (s *Surface) Role() Role
- func (s *Surface) Root() *Surface
- func (s *Surface) Scale() int32
- func (s *Surface) SetPreferredScale(scale120 uint32) error
- func (s *Surface) SetRole(r Role) error
- func (s *Surface) Size() image.Point
- func (s *Surface) Stack() iter.Seq[*Surface]
- func (s *Surface) StackTopDown() iter.Seq[*Surface]
- func (s *Surface) Subsurface() *Subsurface
- func (s *Surface) SurfaceRect(buffer image.Rectangle) render.FRect
- func (s *Surface) Transform() render.Transform
- func (s *Surface) TreeBounds() image.Rectangle
- func (s *Surface) WantsFrame() bool
- func (s *Surface) Watch(f func(*Update))
- type Update
- func (u *Update) Await() func() error
- func (u *Update) Buffer() Buffer
- func (u *Update) DamagedPixels() int
- func (u *Update) ExplicitlySynced()
- func (u *Update) Gate(ready func() bool)
- func (u *Update) Hold() *Hold
- func (u *Update) OnApply(f func() error)
- func (u *Update) Park(b *Barrier)
- func (u *Update) Surface() *Surface
Constants ¶
const CursorRole = "wl_pointer-cursor"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Awaited ¶
Awaited is a buffer whose writer may still be at work when it is committed, as implicit synchronization allows. AwaitWriter takes a hold on the commit for each thing the writer has yet to finish, and releases it once it has.
type Awaiter ¶
Awaiter is a commit an Awaited buffer can keep from taking effect: Await holds it until the returned func is called. Surface is the surface it commits to.
type HandoverRole ¶
type Latched ¶
type Latched[T comparable] struct { // contains filtered or unexported fields }
func NewLatched ¶
func NewLatched[T comparable](fallback T) *Latched[T]
type LatchedValue ¶
type LatchedValue[T comparable] struct { // contains filtered or unexported fields }
func (*LatchedValue[T]) Detach ¶
func (v *LatchedValue[T]) Detach() error
func (*LatchedValue[T]) Gone ¶
func (v *LatchedValue[T]) Gone() bool
func (*LatchedValue[T]) Set ¶
func (v *LatchedValue[T]) Set(value T)
type PresentationKind ¶
type PresentationKind = spt.WpPresentationFeedbackKind
type Subsurface ¶
type Subsurface struct {
// contains filtered or unexported fields
}
func (*Subsurface) Committed ¶
func (sub *Subsurface) Committed(*Surface) error
func (*Subsurface) Parent ¶
func (sub *Subsurface) Parent() *Surface
func (*Subsurface) Position ¶
func (sub *Subsurface) Position() image.Point
func (*Subsurface) RoleName ¶
func (sub *Subsurface) RoleName() string
func (*Subsurface) Synchronized ¶
func (sub *Subsurface) Synchronized() bool
type Surface ¶
type Surface struct {
// contains filtered or unexported fields
}
func (*Surface) BufferDamage ¶
func (*Surface) BufferSource ¶
func (*Surface) FrameDoneUndrawn ¶
func (*Surface) PendingBuffer ¶
func (*Surface) RemoveHooks ¶
func (*Surface) SetPreferredScale ¶
func (*Surface) Subsurface ¶
func (s *Surface) Subsurface() *Subsurface
func (*Surface) TreeBounds ¶
func (*Surface) WantsFrame ¶
type Update ¶
type Update struct {
// contains filtered or unexported fields
}
func (*Update) DamagedPixels ¶
func (*Update) ExplicitlySynced ¶
func (u *Update) ExplicitlySynced()