]> git.saurik.com Git - wxWidgets.git/blame - wxPython/wxSWIG/swig_lib/tcl/mactclinit.c
handle accel keys for owner drawn menu items (based on the patch 657105)
[wxWidgets.git] / wxPython / wxSWIG / swig_lib / tcl / mactclinit.c
CommitLineData
c90f71dd
RD
1/*
2 * tclMacAppInit.c --
3 *
4 * Provides a version of the Tcl_AppInit procedure for the example shell.
5 *
6 * Copyright (c) 1993-1994 Lockheed Missle & Space Company, AI Center
7 * Copyright (c) 1995-1997 Sun Microsystems, Inc.
8 *
9 * See the file "license.terms" for information on usage and redistribution
10 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 *
12 * SCCS: @(#) tclMacAppInit.c 1.17 97/01/21 18:13:34
13 */
14
15#include "tcl.h"
16#include "tclInt.h"
17#include "tclMacInt.h"
18
19#if defined(THINK_C)
20# include <console.h>
21#elif defined(__MWERKS__)
22# include <SIOUX.h>
23short InstallConsole _ANSI_ARGS_((short fd));
24#endif
25
26
27
28/*
29 *----------------------------------------------------------------------
30 *
31 * MacintoshInit --
32 *
33 * This procedure calls initalization routines to set up a simple
34 * console on a Macintosh. This is necessary as the Mac doesn't
35 * have a stdout & stderr by default.
36 *
37 * Results:
38 * Returns TCL_OK if everything went fine. If it didn't the
39 * application should probably fail.
40 *
41 * Side effects:
42 * Inits the appropiate console package.
43 *
44 *----------------------------------------------------------------------
45 */
46
47#ifdef __cpluscplus
48extern "C"
49#endif
50extern int
51MacintoshInit()
52{
53#if defined(THINK_C)
54
55 /* Set options for Think C console package */
56 /* The console package calls the Mac init calls */
57 console_options.pause_atexit = 0;
58 console_options.title = "\pTcl Interpreter";
59
60#elif defined(__MWERKS__)
61
62 /* Set options for CodeWarrior SIOUX package */
63 SIOUXSettings.autocloseonquit = true;
64 SIOUXSettings.showstatusline = true;
65 SIOUXSettings.asktosaveonclose = false;
66 InstallConsole(0);
67 SIOUXSetTitle("\pTcl Interpreter");
68
69#elif defined(applec)
70
71 /* Init packages used by MPW SIOW package */
72 InitGraf((Ptr)&qd.thePort);
73 InitFonts();
74 InitWindows();
75 InitMenus();
76 TEInit();
77 InitDialogs(nil);
78 InitCursor();
79
80#endif
81
82 TclMacSetEventProc((TclMacConvertEventPtr) SIOUXHandleOneEvent);
83
84 /* No problems with initialization */
85 return TCL_OK;
86}