---
name: "s3dw_getroot"
section: "3"
platform: "linux"
package: "s3d-doc"
version: "0.2.2.1-7"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/s3dw_getroot"
---

# s3dw\_getroot(3)

get the root

## NAME

s3dw\_getroot - get the root

## SYNOPSIS

```
#include <s3dw.h>
```

**s3dw\_widget \*s3dw\_getroot(void);**

## DESCRIPTION

Returns the root-widget, which holds all the surfaces. E.g. if you want to move all widgets at once, adjust the root-widgets x,y,z and use s3dw\_moveit()

```
 s3dw_widget *root = s3dw_getroot();
 // move widget center to (0,5,0). upon creation, it's centered at (0,0,0),
 // so this might move it up
 root->x=0;
 root->y=5;
 root->z=0;
 s3dw_moveit(root);
```

## AUTHOR

**Simon Wunderlich**

Author of s3d
