int
Tk_EventInit(interp)
The event-management procedures in Tk are divided into two groups, those that can be used stand-alone and those that require the full Tk library to be present. The following procedures may be used stand-alone: Tk_CreateFileHandler, Tk_CreateFileHandler2, Tk_DeleteFileHandler, Tk_CreateTimerHandler, Tk_DeleteTimerHandler, Tk_DoWhenIdle, Tk_CancelIdleCall, Tk_DoOneEvent, Tk_Sleep, and Tk_BackgroundError. Note that Tk_MainLoop cannot be used without the full Tk library, since it checks to see if windows are still open. If an application uses the event procedures stand-alone, it must include its own main loop that invokes Tk_DoOneEvent repeatedly.
Tk_EventInit is typically called from an application's Tcl_AppInit procedure; it should not be invoked in applications that use the full Tk library (e.g., those that have already invoked Tk_CreateMainWindow). However, it is OK for an application to start up using Tk_EventInit, compute without X for a while, and later invoke Tk_CreateMainWindow. When Tk_CreateMainWindow is invoked, the full suite of windowing Tcl commands will become available, and the full-blown versions of tkwait and update will replace the abridged versions created with Tk_EventInit.
Copyright © 1994 The Regents of the University of California. Copyright © 1994 Sun Microsystems, Inc. Copyright © 1995 Roger E. Critchlow Jr.