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

# tickit\_window\_new\_root(3)

create a new toplevel root window

## NAME

tickit\_window\_new\_root - create a new toplevel root window

## SYNOPSIS

```
#include <tickit.h>

TickitWindow *tickit_window_new_root(TickitTerm *term);
```

Link with *-ltickit*.

## DEPRECATED

This function is deprecated and should not be used in new programs. Instead, obtain the root window from the toplevel **Tickit** instance by calling [**tickit\_get\_rootwin**(3)](/tickit_get_rootwin/3.md).

## DESCRIPTION

**tickit\_window\_new\_root**() creates a new toplevel **TickitWindow** instance to represent the drawing area on the given terminal instance. The terminal instance is stored by the window itself, and is used for flushing the **TickitRenderBuffer** to when expose events occur. The root window will increase the reference count of its backing terminal by one; this reference will be dropped when the window is destroyed.

The root window behaves similar to other windows within the application, with the following differences:

- \*

  Its position remains fixed at zero, and should not be set by the application.

- \*

  Its size is managed automatically by observing resize events from the underlying terminal instance, and should not be set by the application.

- \*

  It is initially fully-damaged after construction, and will have a pending expose event waiting to occur.

## RETURN VALUE

If successful, **tickit\_window\_new\_root**() returns a pointer to the new instance.

## SEE ALSO

[**tickit\_window\_new**(3)](/tickit_window_new/3.md), [**tickit\_window\_get\_term**(3)](/tickit_window_get_term/3.md), [**tickit\_window\_bind\_event**(3)](/tickit_window_bind_event/3.md), [**tickit\_window\_expose**(3)](/tickit_window_expose/3.md), [**tickit\_window**(7)](/tickit_window/7.md), [**tickit**(7)](/tickit/7.md)
