// Cursor sets the optional parameter "cursor":
425655
func (c *TasksListCall) Cursor(cursor string) *TasksListCall {
	c.urlParams_.Set("cursor", cursor)
	return c
}
521901
func SetCursorVisibility(visible bool) {
	if visible {
		glfw.GetCurrentContext().SetInputMode(glfw.CursorMode, glfw.CursorNormal)
	} else {
		glfw.GetCurrentContext().SetInputMode(glfw.CursorMode, glfw.CursorHidden)
	}
}
631693
func ShowCursor(toggle int) (int, error) {
	i := int(C.SDL_ShowCursor(C.int(toggle)))
	return i, errorFromInt(i)
}
506489
func (f *FileStore) KeyCursor(ctx context.Context, key []byte, t int64, ascending bool) *KeyCursor {
	f.mu.RLock()
	defer f.mu.RUnlock()
	return newKeyCursor(ctx, f, key, t, ascending)
}
156743
func (s *SearchInput) SetCursor(v string) *SearchInput {
	s.Cursor = &v
	return s
}
237957
func SetCursor(x, y int) {
	if is_cursor_hidden(cursor_x, cursor_y) && !is_cursor_hidden(x, y) {
		show_cursor(true)
	}

	if !is_cursor_hidden(cursor_x, cursor_y) && is_cursor_hidden(x, y) {
		show_cursor(false)
	}

	cursor_x, cursor_y = x, y
	if !is_cursor_hidden(cursor_x, cursor_y) {
		move_cursor(cursor_x, cursor_y)
	}
}
158158
func (d *Document) CursorPositionRow() (row int) {
	row, _ = d.findLineStartIndex(d.cursorPosition)
	return
}
507104
func createFunctionCursor(t *transpilerState, call *influxql.Call, in cursor, normalize bool) (cursor, error) {
	cur := &functionCursor{
		call:   call,
		parent: in,
	}
	switch call.Name {
	case "count", "min", "max", "sum", "first", "last", "mean":
		value, ok := in.Value(call.Args[0])
		if !ok {
			return nil, fmt.Errorf("undefined variable: %s", call.Args[0])
		}
		cur.expr = &ast.PipeExpression{
			Argument: in.Expr(),
			Call: &ast.CallExpression{
				Callee: &ast.Identifier{
					Name: call.Name,
				},
			},
		}
		cur.value = value
		cur.exclude = map[influxql.Expr]struct{}{call.Args[0]: {}}
	case "median":
		value, ok := in.Value(call.Args[0])
		if !ok {
			return nil, fmt.Errorf("undefined variable: %s", call.Args[0])
		}
		cur.expr = &ast.PipeExpression{
			Argument: in.Expr(),
			Call: &ast.CallExpression{
				Callee: &ast.Identifier{
					Name: "percentile",
				},
				Arguments: []ast.Expression{
					&ast.ObjectExpression{
						Properties: []*ast.Property{
							{
								Key: &ast.Identifier{
									Name: "percentile",
								},
								Value: &ast.FloatLiteral{
									Value: 0.5,
								},
							},
							{
								Key: &ast.Identifier{
									Name: "method",
								},
								Value: &ast.StringLiteral{
									Value: "exact_mean",
								},
							},
						},
					},
				},
			},
		}
		cur.value = value
		cur.exclude = map[influxql.Expr]struct{}{call.Args[0]: {}}
	case "percentile":
		if len(call.Args) != 2 {
			return nil, errors.New("percentile function requires two arguments field_key and N")
		}

		fieldName, ok := in.Value(call.Args[0])
		if !ok {
			return nil, fmt.Errorf("undefined variable: %s", call.Args[0])
		}

		var percentile float64
		switch arg := call.Args[1].(type) {
		case *influxql.NumberLiteral:
			percentile = arg.Val / 100.0
		case *influxql.IntegerLiteral:
			percentile = float64(arg.Val) / 100.0
		default:
			return nil, errors.New("argument N must be a float type")
		}

		if percentile < 0 || percentile > 1 {
			return nil, errors.New("argument N must be between 0 and 100")
		}

		args := []*ast.Property{
			{
				Key: &ast.Identifier{
					Name: "percentile",
				},
				Value: &ast.FloatLiteral{
					Value: percentile,
				},
			},
			{
				Key: &ast.Identifier{
					Name: "method",
				},
				Value: &ast.StringLiteral{
					Value: "exact_selector",
				},
			},
		}
		if fieldName != execute.DefaultValueColLabel {
			args = append(args, &ast.Property{
				Key: &ast.Identifier{
					Name: "columns",
				},
				Value: &ast.ArrayExpression{
					Elements: []ast.Expression{
						&ast.StringLiteral{Value: fieldName},
					},
				},
			})
		}
		cur.expr = &ast.PipeExpression{
			Argument: in.Expr(),
			Call: &ast.CallExpression{
				Callee: &ast.Identifier{
					Name: "percentile",
				},
				Arguments: []ast.Expression{
					&ast.ObjectExpression{
						Properties: args,
					},
				},
			},
		}
		cur.value = fieldName
		cur.exclude = map[influxql.Expr]struct{}{call.Args[0]: {}}
	default:
		return nil, fmt.Errorf("unimplemented function: %q", call.Name)
	}

	// If we have been told to normalize the time, we do it here.
	if normalize {
		if influxql.IsSelector(call) {
			cur.expr = &ast.PipeExpression{
				Argument: cur.expr,
				Call: &ast.CallExpression{
					Callee: &ast.Identifier{
						Name: "drop",
					},
					Arguments: []ast.Expression{
						&ast.ObjectExpression{
							Properties: []*ast.Property{{
								Key: &ast.Identifier{
									Name: "columns",
								},
								Value: &ast.ArrayExpression{
									Elements: []ast.Expression{
										&ast.StringLiteral{Value: execute.DefaultTimeColLabel},
									},
								},
							}},
						},
					},
				},
			}
		}
		cur.expr = &ast.PipeExpression{
			Argument: cur.expr,
			Call: &ast.CallExpression{
				Callee: &ast.Identifier{
					Name: "duplicate",
				},
				Arguments: []ast.Expression{
					&ast.ObjectExpression{
						Properties: []*ast.Property{
							{
								Key: &ast.Identifier{
									Name: "column",
								},
								Value: &ast.StringLiteral{
									Value: execute.DefaultStartColLabel,
								},
							},
							{
								Key: &ast.Identifier{
									Name: "as",
								},
								Value: &ast.StringLiteral{
									Value: execute.DefaultTimeColLabel,
								},
							},
						},
					},
				},
			},
		}
	}
	return cur, nil
}
1126200
func (c *SearchCall) StartCursor(startCursor string) *SearchCall {
	c.urlParams_.Set("start_cursor", startCursor)
	return c
}
240550
func (v *View) Cursor() (x, y int) {
	return v.cx, v.cy
}
1201307
func (p *Painter) DrawCursor(x, y int) {
	wp := p.mapLocalToWorld(image.Point{x, y})
	p.surface.SetCursor(wp.X, wp.Y)
}
293198
func (b *Buffer) CursorUp(count int) {
	orig := b.preferredColumn
	if b.preferredColumn == -1 { // -1 means nil
		orig = b.Document().CursorPositionCol()
	}
	b.cursorPosition += b.Document().GetCursorUpPosition(count, orig)

	// Remember the original column for the next up/down movement.
	b.preferredColumn = orig
}
212826
func (j *Journal) SeekCursor(cursor string) error {
	sd_journal_seek_cursor, err := getFunction("sd_journal_seek_cursor")
	if err != nil {
		return err
	}

	c := C.CString(cursor)
	defer C.free(unsafe.Pointer(c))

	j.mu.Lock()
	r := C.my_sd_journal_seek_cursor(sd_journal_seek_cursor, j.cjournal, c)
	j.mu.Unlock()

	if r < 0 {
		return fmt.Errorf("failed to seek to cursor %q: %d", cursor, syscall.Errno(-r))
	}

	return nil
}
1264108
func SetCursorVisibility(visible bool) {
	if visible {
		sdl.ShowCursor(sdl.ENABLE)
	} else {
		sdl.ShowCursor(sdl.DISABLE)
	}
}
402696
func Parse(s string) (*Cursor, error) {
	poss, ps, err := parseMulti(s)
	if err != nil {
		return nil, err
	}
	if len(ps) == 1 {
		c := NewCursor(ps)
		if err := c.Set(&poss[0]); err != nil {
			return nil, err
		}
		return c, nil
	}
	return NewCursor(ps), nil
}
1197350
func (w *Window) SetCursorVisible(visible bool) {
	w.cursorVisible = visible
	mainthread.Call(func() {
		if visible {
			w.window.SetInputMode(glfw.CursorMode, glfw.CursorNormal)
		} else {
			w.window.SetInputMode(glfw.CursorMode, glfw.CursorHidden)
		}
	})
}
514739
func (c *Cursor) Count() (uint64, error) {
	var _size C.size_t
	ret := C.mdb_cursor_count(c._c, &_size)
	if ret != success {
		return 0, operrno("mdb_cursor_count", ret)
	}
	return uint64(_size), nil
}