Skip to content
Tcl Source Code Attachment Details
Login

Attachment Details

Overview

Artifact ID: add96b38020183b9d64d13faf0213ec4c62dd134
Ticket: 437489ffffffffffffffffffffffffffffffffff
Date: 2001-06-30 05:51:07
User: dgp
Artifact Attached: c39d71c8e8a83f79950347a153a2d53c7eac5063
Filename:mywish.c
Description:Demo program
Content:
#include "tk.h"

int Tcl_AppInit(Tcl_Interp *interp) {
    if (Tcl_Init(interp) == TCL_ERROR) return TCL_ERROR;

    /* Use a "wish" console, not the proces standard channels. */
    Tk_InitConsoleChannels(interp);

    if (Tk_Init(interp) == TCL_ERROR) return TCL_ERROR;
    Tcl_StaticPackage(interp, "Tk", Tk_Init, Tk_SafeInit);

    /* Create the "wish" console */
    if (Tk_CreateConsoleWindow(interp) != TCL_OK) return TCL_ERROR;

    return TCL_OK;
}

int main(int argc, char **argv) {
    Tk_Main(argc, argv, Tcl_AppInit);
    return 0;
}