O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

An Overview of the Tk C Library

Main Programs and Command-Line Arguments

The Tk_Main procedure does the standard setup for your application's main window and event loop. The Tk_ParseArgv procedure parses command-line arguments. This procedure is designed for use by main programs. It uses a table of Tk_ArgvInfo records to describe your program's arguments. These procedures are illustrated by Example 44-14 on page 632.

If your extension uses the Tk library, you should link against the Tk stub library. In this case, you must call Tk_InitStubs in your extension's initialization routine.

Creating Windows

The Tk_Init procedure creates the main window for your application. It is described in the TkInit man page. The Tk_CreateWindow and Tk_CreateWindowFromPath ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required