---
name: "tickit_renderbuffer_get_cursorpos"
section: "3"
platform: "linux"
package: "libtickit-dev"
version: "0.4.3-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/tickit_renderbuffer_get_cursorpos"
---

# tickit\_renderbuffer\_get\_cursorpos(3)

query the virtual cursor position

## NAME

tickit\_renderbuffer\_has\_cursorpos, tickit\_renderbuffer\_get\_cursorpos - query the virtual cursor position

## SYNOPSIS

```
#include <tickit.h>

bool tickit_renderbuffer_has_cursorpos(const TickitRenderBuffer *rb);
void tickit_renderbuffer_get_cursorpos(const TickitRenderBuffer *rb, int lines, int cols);
```

Link with *-ltickit*.

## DESCRIPTION

**tickit\_renderbuffer\_has\_cursorpos**() returns a true value if the buffer's virtual cursor position has been set by [**tickit\_renderbuffer\_goto**(3)](/tickit_renderbuffer_goto/3.md), or false if it has never been set, or was cleared by [**tickit\_renderbuffer\_ungoto**(3)](/tickit_renderbuffer_ungoto/3.md) or [**tickit\_renderbuffer\_reset**(3)](/tickit_renderbuffer_reset/3.md).

**tickit\_renderbuffer\_get\_cursorpos**() retrieves the current position of the virtual cursor, by setting the integers pointed to by *line* and *col*, if not NULL. If the virtual cursor position is not set then this function does nothing.

## RETURN VALUE

**tickit\_renderbuffer\_has\_cursorpos**() returns a boolean. **tickit\_renderbuffer\_get\_cursorpos**() returns no value.

## SEE ALSO

[**tickit\_renderbuffer\_new**(3)](/tickit_renderbuffer_new/3.md), [**tickit\_renderbuffer**(7)](/tickit_renderbuffer/7.md), [**tickit**(7)](/tickit/7.md)
