---
name: "MainWin"
section: "2"
platform: "linux"
package: "perl-tk"
version: "b11.02-5"
release: "Debian 1.3 (Bo)"
platforms: ["linux"]
url: "https://new.carta.tech/MainWin"
---

# MainWin(2)

find the main window for an application

## NAME

Tk\_MainWindow - find the main window for an application

## SYNOPSIS

```
#include <tk.h>

Tk_Window
Tk_MainWindow(interp)
```

## ARGUMENTS

Interpreter associated with the application.

## DESCRIPTION

If *interp* is associated with a Tk application then **Tk\_MainWindow** returns the application's main window. If there is no Tk application associated with *interp* then **Tk\_MainWindow** returns NULL and leaves an error message in *interp-\>result*.

## KEYWORDS

application, main window
