~eliasnaur/gio

20f55a4ad71e43660e4a959d281e1c5e0be843b0 — Elias Naur 2 years ago 5613363
all: delete the ui.Op type

It's no longer used.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
6 files changed, 1 insertions(+), 21 deletions(-)

M ui/draw/draw.go
M ui/draw/path.go
M ui/key/key.go
M ui/ops.go
M ui/pointer/pointer.go
M ui/ui.go
M ui/draw/draw.go => ui/draw/draw.go +0 -2
@@ 69,8 69,6 @@ func (i *OpImage) Decode(d []byte, refs []interface{}) {
	}
}

func (OpImage) ImplementsOp() {}

// RectPath constructs a path corresponding to
// a pixel aligned rectangular area.
func RectPath(r image.Rectangle) *Path {

M ui/draw/path.go => ui/draw/path.go +0 -2
@@ 280,5 280,3 @@ func (p *PathBuilder) Path() *Path {
	}
	return data
}

func (p OpClip) ImplementsOp() {}

M ui/key/key.go => ui/key/key.go +0 -3
@@ 99,9 99,6 @@ func (h OpHideInput) Add(o *ui.Ops) {
	o.Write(data)
}

func (OpHandler) ImplementsOp()   {}
func (OpHideInput) ImplementsOp() {}

func (Edit) ImplementsEvent()  {}
func (Chord) ImplementsEvent() {}
func (Focus) ImplementsEvent() {}

M ui/ops.go => ui/ops.go +0 -2
@@ 75,5 75,3 @@ func (b OpBlock) Add(o *Ops) {
	bo.PutUint32(data[1:], uint32(b.idx))
	o.Write(data)
}

func (OpBlock) ImplementsOp() {}

M ui/pointer/pointer.go => ui/pointer/pointer.go +1 -2
@@ 134,5 134,4 @@ func (s Source) String() string {
	}
}

func (OpHandler) ImplementsOp() {}
func (Event) ImplementsEvent()  {}
func (Event) ImplementsEvent() {}

M ui/ui.go => ui/ui.go +0 -10
@@ 36,12 36,6 @@ func (c *Config) Pixels(v Value) float32 {
	}
}

// Op is implemented by all drawing and control
// operations.
type Op interface {
	ImplementsOp()
}

// OpLayer represents a semantic layer of UI.
type OpLayer struct {
}


@@ 141,7 135,3 @@ func Offset(o f32.Point) Transform {

// Inf is the int value that represents an unbounded maximum constraint.
const Inf = int(^uint(0) >> 1)

func (OpLayer) ImplementsOp()     {}
func (OpTransform) ImplementsOp() {}
func (OpRedraw) ImplementsOp()    {}