---
name: "s3dw_handle_click"
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_handle_click"
---

# s3dw\_handle\_click(3)

handle click on widget

## NAME

s3dw\_handle\_click - handle click on widget

## SYNOPSIS

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

**int s3dw\_handle\_click(const struct s3d\_evt \****event***);**

## DESCRIPTION

If you want your widgets on mouseclicks (believe me, you want that), you have to call this either in your clickhandler-function or specify it itself as the clickhandler.

```
 // way 1:
 s3d_set_callback(S3D_EVENT_OBJ_CLICK,s3dw_handle_click);
 // way 2:
 ...
 void click(struct s3d_evt *evt)
 {
         s3dw_handle_click(evt);
         ....
         // your own clickhandler code
         ...
 }
 ....
 s3d_set_callback(S3D_EVENT_OBJ_CLICK,click);
```

## AUTHOR

**Simon Wunderlich**

Author of s3d
