diff --git a/x/backend.go b/x/backend.go index 1ece1a6..8ce1e25 100644 --- a/x/backend.go +++ b/x/backend.go @@ -126,6 +126,14 @@ func (this *Backend) NewCanvas (bounds image.Rectangle) canvas.CanvasCloser { return xcanvas.NewCanvas(this.x, bounds) } +func (this *Backend) SetStyle (style tomo.Style) { + this.system.SetStyle(style) +} + +func (this *Backend) SetIcons (icons tomo.Icons) { + this.system.SetIcons(icons) +} + func (this *Backend) assert () { if this == nil { panic("x: nil backend") } } diff --git a/x/window.go b/x/window.go index 2d264ff..5eaaad2 100644 --- a/x/window.go +++ b/x/window.go @@ -215,6 +215,17 @@ func (this *window) SetIcon (sizes ...canvas.Texture) { wmIcons) } +func (this *window) SetResizable (x, y bool) { + // TODO +} + +func (this *window) SetBounds (bounds image.Rectangle) { + this.xWindow.WMMoveResize ( + bounds.Min.X, bounds.Min.Y, + bounds.Min.X + bounds.Dx(), + bounds.Min.Y + bounds.Dy()) +} + func (this *window) NewMenu (bounds image.Rectangle) (tomo.Window, error) { menu, err := this.backend.newWindow ( bounds.Add(this.metrics.bounds.Min), true) @@ -309,6 +320,7 @@ func (this *window) Close () { this.SetRoot(nil) delete(this.backend.windows, this.xWindow.Id) this.xWindow.Destroy() + this.hierarchy.Close() } func (this *window) OnClose (callback func ()) event.Cookie {