Tk\_MainLoop(3) Tk Library Procedures Tk\_MainLoop(3)

```

```

# [NAME](#NAME)

Tk\_MainLoop - loop for events until all windows are deleted

# [SYNOPSIS](#SYNOPSIS)

```
#include <tk.h>

Tk_MainLoop()
```

```

```

# [DESCRIPTION](#DESCRIPTION)

**Tk\_MainLoop** is a procedure that loops repeatedly calling **Tcl\_DoOneEvent**. It returns only when there are no applications left in this process (i.e. no main windows exist anymore). Most windowing applications will call **Tk\_MainLoop** after initialization; the main execution of the application will consist entirely of callbacks invoked via **Tcl\_DoOneEvent**.

# [KEYWORDS](#KEYWORDS)

application, event, main loop

Tk

---

Document: Tk_MainLoop(3) from tk 9.0.4-r2 (Chainguard OS)
Source: https://downloads.sourceforge.net/sourceforge/tcl/tk9.0.4-src.tar.gz
