// Set cursor position. Return whether it changed.
772488
func (b *Buffer) setCursorPosition(p int) {
	o := b.cursorPosition
	if p > 0 {
		b.cursorPosition = p
	} else {
		b.cursorPosition = 0
	}
	if p != o {
		// Cursor position is changed.
		// TODO: Call a onCursorPositionChanged function.
	}
}
431473
func (s *GetDocumentationVersionsInput) SetPosition(v string) *GetDocumentationVersionsInput {
	s.Position = &v
	return s
}
1309866
func (s *GetClientCertificatesOutput) SetPosition(v string) *GetClientCertificatesOutput {
	s.Position = &v
	return s
}
1371391
func (s *VideoDescription) SetPosition(v *Rectangle) *VideoDescription {
	s.Position = v
	return s
}
852790
func resetCursor(w io.Writer, rows int) {
	w.Write([]byte(fmt.Sprintf("\033[999D\033[%dA", rows)))
}
355614
func SetCursor(c Cursor) {
	var cur *glfw.Cursor
	switch c {
	case CursorNone:
		cur = nil // just for the documentation, this isn't required
	case CursorArrow:
		cur = cursorArrow
	case CursorCrosshair:
		cur = cursorCrosshair
	case CursorHand:
		cur = cursorHand
	case CursorIBeam:
		cur = cursorIBeam
	case CursorHResize:
		cur = cursorHResize
	case CursorVResize:
		cur = cursorVResize
	}
	Window.SetCursor(cur)
}
174266
func (s *GetUsagePlansOutput) SetPosition(v string) *GetUsagePlansOutput {
	s.Position = &v
	return s
}
865560
func MoveCursor(x int, y int) {
	fmt.Fprintf(Screen, "\033[%d;%dH", y, x)
}
886529
func (c *Cursor) Set(pos *Position) error {
	if pos == nil {
		return errors.New("invalid position")
	}
	pi := -1
	for i, p := range c.ps {
		if p.Equal(&pos.Prefix) {
			pi = i
			break
		}
	}
	if pi == -1 || !c.ps[pi].IPNet.Contains(pos.IP) {
		return errors.New("position out of range")
	}
	c.set(pi, pos.IP.To16())
	return nil
}
1071965
func (s *GetResourcesOutput) SetPosition(v string) *GetResourcesOutput {
	s.Position = &v
	return s
}
67143
func (s *Statement) SetStartPosition(v *Position) *Statement {
	s.StartPosition = v
	return s
}
341812
func (s *GetGatewayResponsesInput) SetPosition(v string) *GetGatewayResponsesInput {
	s.Position = &v
	return s
}
807558
func SetCursor(c Cursor) {
	var cur *sdl.Cursor
	switch c {
	case CursorNone:
		cur = cursorNone
	case CursorArrow:
		cur = cursorArrow
	case CursorCrosshair:
		cur = cursorCrosshair
	case CursorHand:
		cur = cursorHand
	case CursorIBeam:
		cur = cursorIBeam
	case CursorHResize:
		cur = cursorHResize
	case CursorVResize:
		cur = cursorVResize
	}
	sdl.SetCursor(cur)
}
1240417
func (s *GetUsagePlanKeysOutput) SetPosition(v string) *GetUsagePlanKeysOutput {
	s.Position = &v
	return s
}
75659
func (b *Bucket) Cursor() (kv.Cursor, error) {
	// TODO we should do this by using the Ascend/Descend methods that
	// the btree provides.
	pairs, err := b.getAll()
	if err != nil {
		return nil, err
	}

	return kv.NewStaticCursor(pairs), nil
}
1347534
func (b *Bucket) Cursor() (kv.Cursor, error) {
	return &Cursor{
		cursor: b.bucket.Cursor(),
	}, nil
}
158158
func (d *Document) CursorPositionRow() (row int) {
	row, _ = d.findLineStartIndex(d.cursorPosition)
	return
}