summaryrefslogtreecommitdiffstats
path: root/Doc/library/csv.rst
blob: 6bcee11c1d6ced2179ab84edeec1a182ab332758 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
:mod:`csv` --- CSV File Reading and Writing
===========================================

.. module:: csv
   :synopsis: Write and read tabular data to and from delimited files.
.. sectionauthor:: Skip Montanaro <skip@pobox.com>


.. index::
   single: csv
   pair: data; tabular

The so-called CSV (Comma Separated Values) format is the most common import and
export format for spreadsheets and databases.  There is no "CSV standard", so
the format is operationally defined by the many applications which read and
write it.  The lack of a standard means that subtle differences often exist in
the data produced and consumed by different applications.  These differences can
make it annoying to process CSV files from multiple sources.  Still, while the
delimiters and quoting characters vary, the overall format is similar enough
that it is possible to write a single module which can efficiently manipulate
such data, hiding the details of reading and writing the data from the
programmer.

The :mod:`csv` module implements classes to read and write tabular data in CSV
format.  It allows programmers to say, "write this data in the format preferred
by Excel," or "read data from this file which was generated by Excel," without
knowing the precise details of the CSV format used by Excel.  Programmers can
also describe the CSV formats understood by other applications or define their
own special-purpose CSV formats.

The :mod:`csv` module's :class:`reader` and :class:`writer` objects read and
write sequences.  Programmers can also read and write data in dictionary form
using the :class:`DictReader` and :class:`DictWriter` classes.

.. seealso::

   :pep:`305` - CSV File API
      The Python Enhancement Proposal which proposed this addition to Python.


.. _csv-contents:

Module Contents
---------------

The :mod:`csv` module defines the following functions:


.. function:: reader(csvfile, dialect='excel', **fmtparams)

   Return a reader object which will iterate over lines in the given *csvfile*.
   *csvfile* can be any object which supports the :term:`iterator` protocol and returns a
   string each time its :meth:`next` method is called --- file objects and list
   objects are both suitable.   If *csvfile* is a file object, it should be opened
   with ``newline=''``. [#]_  An optional
   *dialect* parameter can be given which is used to define a set of parameters
   specific to a particular CSV dialect.  It may be an instance of a subclass of
   the :class:`Dialect` class or one of the strings returned by the
   :func:`list_dialects` function.  The other optional *fmtparams* keyword arguments
   can be given to override individual formatting parameters in the current
   dialect.  For full details about the dialect and formatting parameters, see
   section :ref:`csv-fmt-params`.

   Each row read from the csv file is returned as a list of strings.  No
   automatic data type conversion is performed unless the ``QUOTE_NONNUMERIC`` format
   option is specified (in which case unquoted fields are transformed into floats).

   A short usage example::

      >>> import csv
      >>> spamReader = csv.reader(open('eggs.csv', newline=''), delimiter=' ', quotechar='|')
      >>> for row in spamReader:
      ...     print(', '.join(row))
      Spam, Spam, Spam, Spam, Spam, Baked Beans
      Spam, Lovely Spam, Wonderful Spam


.. function:: writer(csvfile, dialect='excel', **fmtparams)

   Return a writer object responsible for converting the user's data into delimited
   strings on the given file-like object.  *csvfile* can be any object with a
   :func:`write` method.  An optional *dialect*
   parameter can be given which is used to define a set of parameters specific to a
   particular CSV dialect.  It may be an instance of a subclass of the
   :class:`Dialect` class or one of the strings returned by the
   :func:`list_dialects` function.  The other optional *fmtparams* keyword arguments
   can be given to override individual formatting parameters in the current
   dialect.  For full details about the dialect and formatting parameters, see
   section :ref:`csv-fmt-params`. To make it
   as easy as possible to interface with modules which implement the DB API, the
   value :const:`None` is written as the empty string.  While this isn't a
   reversible transformation, it makes it easier to dump SQL NULL data values to
   CSV files without preprocessing the data returned from a ``cursor.fetch*`` call.
   All other non-string data are stringified with :func:`str` before being written.

   A short usage example::

      >>> import csv
      >>> spamWriter = csv.writer(open('eggs.csv', 'w'), delimiter=' ',
      ...                         quotechar='|', quoting=QUOTE_MINIMAL)
      >>> spamWriter.writerow(['Spam'] * 5 + ['Baked Beans'])
      >>> spamWriter.writerow(['Spam', 'Lovely Spam', 'Wonderful Spam'])


.. function:: register_dialect(name[, dialect], **fmtparams)

   Associate *dialect* with *name*.  *name* must be a string. The
   dialect can be specified either by passing a sub-class of :class:`Dialect`, or
   by *fmtparams* keyword arguments, or both, with keyword arguments overriding
   parameters of the dialect. For full details about the dialect and formatting
   parameters, see section :ref:`csv-fmt-params`.


.. function:: unregister_dialect(name)

   Delete the dialect associated with *name* from the dialect registry.  An
   :exc:`Error` is raised if *name* is not a registered dialect name.


.. function:: get_dialect(name)

   Return the dialect associated with *name*.  An :exc:`Error` is raised if
   *name* is not a registered dialect name.  This function returns an immutable
   :class:`Dialect`.

.. function:: list_dialects()

   Return the names of all registered dialects.


.. function:: field_size_limit([new_limit])

   Returns the current maximum field size allowed by the parser. If *new_limit* is
   given, this becomes the new limit.


The :mod:`csv` module defines the following classes:

.. class:: DictReader(csvfile, fieldnames=None, restkey=None, restval=None, dialect='excel', *args, **kwds)

   Create an object which operates like a regular reader but maps the information
   read into a dict whose keys are given by the optional  *fieldnames* parameter.
   If the *fieldnames* parameter is omitted, the values in the first row of the
   *csvfile* will be used as the fieldnames. If the row read has fewer fields than
   the fieldnames sequence, the value of *restval* will be used as the default
   value.  If the row read has more fields than the fieldnames sequence, the
   remaining data is added as a sequence keyed by the value of *restkey*.  If the
   row read has fewer fields than the fieldnames sequence, the remaining keys take
   the value of the optional *restval* parameter.  Any other optional or keyword
   arguments are passed to the underlying :class:`reader` instance.


.. class:: DictWriter(csvfile, fieldnames, restval='', extrasaction='raise', dialect='excel', *args, **kwds)

   Create an object which operates like a regular writer but maps dictionaries onto
   output rows.  The *fieldnames* parameter identifies the order in which values in
   the dictionary passed to the :meth:`writerow` method are written to the
   *csvfile*.  The optional *restval* parameter specifies the value to be written
   if the dictionary is missing a key in *fieldnames*.  If the dictionary passed to
   the :meth:`writerow` method contains a key not found in *fieldnames*, the
   optional *extrasaction* parameter indicates what action to take.  If it is set
   to ``'raise'`` a :exc:`ValueError` is raised.  If it is set to ``'ignore'``,
   extra values in the dictionary are ignored.  Any other optional or keyword
   arguments are passed to the underlying :class:`writer` instance.

   Note that unlike the :class:`DictReader` class, the *fieldnames* parameter of
   the :class:`DictWriter` is not optional.  Since Python's :class:`dict` objects
   are not ordered, there is not enough information available to deduce the order
   in which the row should be written to the *csvfile*.


.. class:: Dialect

   The :class:`Dialect` class is a container class relied on primarily for its
   attributes, which are used to define the parameters for a specific
   :class:`reader` or :class:`writer` instance.


.. class:: excel()

   The :class:`excel` class defines the usual properties of an Excel-generated CSV
   file.  It is registered with the dialect name ``'excel'``.


.. class:: excel_tab()

   The :class:`excel_tab` class defines the usual properties of an Excel-generated
   TAB-delimited file.  It is registered with the dialect name ``'excel-tab'``.


.. class:: Sniffer()

   The :class:`Sniffer` class is used to deduce the format of a CSV file.

   The :class:`Sniffer` class provides two methods:

   .. method:: sniff(sample, delimiters=None)

      Analyze the given *sample* and return a :class:`Dialect` subclass
      reflecting the parameters found.  If the optional *delimiters* parameter
      is given, it is interpreted as a string containing possible valid
      delimiter characters.


   .. method:: has_header(sample)

      Analyze the sample text (presumed to be in CSV format) and return
      :const:`True` if the first row appears to be a series of column headers.

An example for :class:`Sniffer` use::

   csvfile = open("example.csv")
   dialect = csv.Sniffer().sniff(csvfile.read(1024))
   csvfile.seek(0)
   reader = csv.reader(csvfile, dialect)
   # ... process CSV file contents here ...


The :mod:`csv` module defines the following constants:

.. data:: QUOTE_ALL

   Instructs :class:`writer` objects to quote all fields.


.. data:: QUOTE_MINIMAL

   Instructs :class:`writer` objects to only quote those fields which contain
   special characters such as *delimiter*, *quotechar* or any of the characters in
   *lineterminator*.


.. data:: QUOTE_NONNUMERIC

   Instructs :class:`writer` objects to quote all non-numeric fields.

   Instructs the reader to convert all non-quoted fields to type *float*.


.. data:: QUOTE_NONE

   Instructs :class:`writer` objects to never quote fields.  When the current
   *delimiter* occurs in output data it is preceded by the current *escapechar*
   character.  If *escapechar* is not set, the writer will raise :exc:`Error` if
   any characters that require escaping are encountered.

   Instructs :class:`reader` to perform no special processing of quote characters.

The :mod:`csv` module defines the following exception:


.. exception:: Error

   Raised by any of the functions when an error is detected.

.. _csv-fmt-params:

Dialects and Formatting Parameters
----------------------------------

To make it easier to specify the format of input and output records, specific
formatting parameters are grouped together into dialects.  A dialect is a
subclass of the :class:`Dialect` class having a set of specific methods and a
single :meth:`validate` method.  When creating :class:`reader` or
:class:`writer` objects, the programmer can specify a string or a subclass of
the :class:`Dialect` class as the dialect parameter.  In addition to, or instead
of, the *dialect* parameter, the programmer can also specify individual
formatting parameters, which have the same names as the attributes defined below
for the :class:`Dialect` class.

Dialects support the following attributes:


.. attribute:: Dialect.delimiter

   A one-character string used to separate fields.  It defaults to ``','``.


.. attribute:: Dialect.doublequote

   Controls how instances of *quotechar* appearing inside a field should be
   themselves be quoted.  When :const:`True`, the character is doubled. When
   :const:`False`, the *escapechar* is used as a prefix to the *quotechar*.  It
   defaults to :const:`True`.

   On output, if *doublequote* is :const:`False` and no *escapechar* is set,
   :exc:`Error` is raised if a *quotechar* is found in a field.


.. attribute:: Dialect.escapechar

   A one-character string used by the writer to escape the *delimiter* if *quoting*
   is set to :const:`QUOTE_NONE` and the *quotechar* if *doublequote* is
   :const:`False`. On reading, the *escapechar* removes any special meaning from
   the following character. It defaults to :const:`None`, which disables escaping.


.. attribute:: Dialect.lineterminator

   The string used to terminate lines produced by the :class:`writer`. It defaults
   to ``'\r\n'``.

   .. note::

      The :class:`reader` is hard-coded to recognise either ``'\r'`` or ``'\n'`` as
      end-of-line, and ignores *lineterminator*. This behavior may change in the
      future.


.. attribute:: Dialect.quotechar

   A one-character string used to quote fields containing special characters, such
   as the *delimiter* or *quotechar*, or which contain new-line characters.  It
   defaults to ``'"'``.


.. attribute:: Dialect.quoting

   Controls when quotes should be generated by the writer and recognised by the
   reader.  It can take on any of the :const:`QUOTE_\*` constants (see section
   :ref:`csv-contents`) and defaults to :const:`QUOTE_MINIMAL`.


.. attribute:: Dialect.skipinitialspace

   When :const:`True`, whitespace immediately following the *delimiter* is ignored.
   The default is :const:`False`.


Reader Objects
--------------

Reader objects (:class:`DictReader` instances and objects returned by the
:func:`reader` function) have the following public methods:

.. method:: csvreader.__next__()

   Return the next row of the reader's iterable object as a list, parsed according
   to the current dialect.  Usually you should call this as ``next(reader)``.


Reader objects have the following public attributes:

.. attribute:: csvreader.dialect

   A read-only description of the dialect in use by the parser.


.. attribute:: csvreader.line_num

   The number of lines read from the source iterator. This is not the same as the
   number of records returned, as records can span multiple lines.


DictReader objects have the following public attribute:

.. attribute:: csvreader.fieldnames

   If not passed as a parameter when creating the object, this attribute is
   initialized upon first access or when the first record is read from the
   file.



Writer Objects
--------------

:class:`Writer` objects (:class:`DictWriter` instances and objects returned by
the :func:`writer` function) have the following public methods.  A *row* must be
a sequence of strings or numbers for :class:`Writer` objects and a dictionary
mapping fieldnames to strings or numbers (by passing them through :func:`str`
first) for :class:`DictWriter` objects.  Note that complex numbers are written
out surrounded by parens. This may cause some problems for other programs which
read CSV files (assuming they support complex numbers at all).


.. method:: csvwriter.writerow(row)

   Write the *row* parameter to the writer's file object, formatted according to
   the current dialect.


.. method:: csvwriter.writerows(rows)

   Write all the *rows* parameters (a list of *row* objects as described above) to
   the writer's file object, formatted according to the current dialect.

Writer objects have the following public attribute:


.. attribute:: csvwriter.dialect

   A read-only description of the dialect in use by the writer.


.. _csv-examples:

Examples
--------

The simplest example of reading a CSV file::

   import csv
   reader = csv.reader(open("some.csv", newline=''))
   for row in reader:
       print(row)

Reading a file with an alternate format::

   import csv
   reader = csv.reader(open("passwd"), delimiter=':', quoting=csv.QUOTE_NONE)
   for row in reader:
       print(row)

The corresponding simplest possible writing example is::

   import csv
   writer = csv.writer(open("some.csv", "w"))
   writer.writerows(someiterable)

Since :func:`open` is used to open a CSV file for reading, the file
will by default be decoded into unicode using the system default
encoding (see :func:`locale.getpreferredencoding`).  To decode a file
using a different encoding, use the ``encoding`` argument of open::

    import csv
    reader = csv.reader(open("some.csv", newline='', encoding='utf-8'))
    for row in reader:
        print(row)

The same applies to writing in something other than the system default
encoding: specify the encoding argument when opening the output file.

Registering a new dialect::

   import csv
   csv.register_dialect('unixpwd', delimiter=':', quoting=csv.QUOTE_NONE)
   reader = csv.reader(open("passwd"), 'unixpwd')

A slightly more advanced use of the reader --- catching and reporting errors::

   import csv, sys
   filename = "some.csv"
   reader = csv.reader(open(filename, newline=''))
   try:
       for row in reader:
           print(row)
   except csv.Error as e:
       sys.exit('file {}, line {}: {}'.format(filename, reader.line_num, e))

And while the module doesn't directly support parsing strings, it can easily be
done::

   import csv
   for row in csv.reader(['one,two,three']):
       print(row)


.. rubric:: Footnotes

.. [#] If ``newline=''`` is not specified, newlines embedded inside quoted fields
   will not be interpreted correctly.  It should always be safe to specify
   ``newline=''``, since the csv module does its own universal newline handling
   on input.
#n452'>452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227
/*
 * tkIntPlatDecls.h --
 *
 *	This file contains the declarations for all platform dependent
 *	unsupported functions that are exported by the Tk library.  These
 *	interfaces are not guaranteed to remain the same between
 *	versions.  Use at your own risk.
 *
 * Copyright (c) 1998-1999 by Scriptics Corporation.
 * All rights reserved.
 *
 * RCS: @(#) $Id: tkIntPlatDecls.h,v 1.15 2002/12/08 00:46:51 hobbs Exp $
 */

#ifndef _TKINTPLATDECLS
#define _TKINTPLATDECLS

#ifdef BUILD_tk
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLEXPORT
#endif

/*
 * WARNING: This file is automatically generated by the tools/genStubs.tcl
 * script.  Any modifications to the function declarations below should be made
 * in the generic/tkInt.decls script.
 */

/* !BEGIN!: Do not edit below this line. */

/*
 * Exported function declarations:
 */

#ifdef __WIN32__
/* 0 */
EXTERN char *		TkAlignImageData _ANSI_ARGS_((XImage * image, 
				int alignment, int bitOrder));
/* Slot 1 is reserved */
/* 2 */
EXTERN void		TkGenerateActivateEvents _ANSI_ARGS_((
				TkWindow * winPtr, int active));
/* 3 */
EXTERN unsigned long	TkpGetMS _ANSI_ARGS_((void));
/* 4 */
EXTERN void		TkPointerDeadWindow _ANSI_ARGS_((TkWindow * winPtr));
/* 5 */
EXTERN void		TkpPrintWindowId _ANSI_ARGS_((char * buf, 
				Window window));
/* 6 */
EXTERN int		TkpScanWindowId _ANSI_ARGS_((Tcl_Interp * interp, 
				CONST char * string, Window * idPtr));
/* 7 */
EXTERN void		TkpSetCapture _ANSI_ARGS_((TkWindow * winPtr));
/* 8 */
EXTERN void		TkpSetCursor _ANSI_ARGS_((TkpCursor cursor));
/* 9 */
EXTERN void		TkpWmSetState _ANSI_ARGS_((TkWindow * winPtr, 
				int state));
/* 10 */
EXTERN void		TkSetPixmapColormap _ANSI_ARGS_((Pixmap pixmap, 
				Colormap colormap));
/* 11 */
EXTERN void		TkWinCancelMouseTimer _ANSI_ARGS_((void));
/* 12 */
EXTERN void		TkWinClipboardRender _ANSI_ARGS_((
				TkDisplay * dispPtr, UINT format));
/* 13 */
EXTERN LRESULT		TkWinEmbeddedEventProc _ANSI_ARGS_((HWND hwnd, 
				UINT message, WPARAM wParam, LPARAM lParam));
/* 14 */
EXTERN void		TkWinFillRect _ANSI_ARGS_((HDC dc, int x, int y, 
				int width, int height, int pixel));
/* 15 */
EXTERN COLORREF		TkWinGetBorderPixels _ANSI_ARGS_((Tk_Window tkwin, 
				Tk_3DBorder border, int which));
/* 16 */
EXTERN HDC		TkWinGetDrawableDC _ANSI_ARGS_((Display * display, 
				Drawable d, TkWinDCState* state));
/* 17 */
EXTERN int		TkWinGetModifierState _ANSI_ARGS_((void));
/* 18 */
EXTERN HPALETTE		TkWinGetSystemPalette _ANSI_ARGS_((void));
/* 19 */
EXTERN HWND		TkWinGetWrapperWindow _ANSI_ARGS_((Tk_Window tkwin));
/* 20 */
EXTERN int		TkWinHandleMenuEvent _ANSI_ARGS_((HWND * phwnd, 
				UINT * pMessage, WPARAM * pwParam, 
				LPARAM * plParam, LRESULT * plResult));
/* 21 */
EXTERN int		TkWinIndexOfColor _ANSI_ARGS_((XColor * colorPtr));
/* 22 */
EXTERN void		TkWinReleaseDrawableDC _ANSI_ARGS_((Drawable d, 
				HDC hdc, TkWinDCState* state));
/* 23 */
EXTERN LRESULT		TkWinResendEvent _ANSI_ARGS_((WNDPROC wndproc, 
				HWND hwnd, XEvent * eventPtr));
/* 24 */
EXTERN HPALETTE		TkWinSelectPalette _ANSI_ARGS_((HDC dc, 
				Colormap colormap));
/* 25 */
EXTERN void		TkWinSetMenu _ANSI_ARGS_((Tk_Window tkwin, 
				HMENU hMenu));
/* 26 */
EXTERN void		TkWinSetWindowPos _ANSI_ARGS_((HWND hwnd, 
				HWND siblingHwnd, int pos));
/* 27 */
EXTERN void		TkWinWmCleanup _ANSI_ARGS_((HINSTANCE hInstance));
/* 28 */
EXTERN void		TkWinXCleanup _ANSI_ARGS_((HINSTANCE hInstance));
/* 29 */
EXTERN void		TkWinXInit _ANSI_ARGS_((HINSTANCE hInstance));
/* 30 */
EXTERN void		TkWinSetForegroundWindow _ANSI_ARGS_((
				TkWindow * winPtr));
/* 31 */
EXTERN void		TkWinDialogDebug _ANSI_ARGS_((int debug));
/* 32 */
EXTERN Tcl_Obj *	TkWinGetMenuSystemDefault _ANSI_ARGS_((
				Tk_Window tkwin, CONST char * dbName, 
				CONST char * className));
/* 33 */
EXTERN int		TkWinGetPlatformId _ANSI_ARGS_((void));
/* 34 */
EXTERN void		TkWinSetHINSTANCE _ANSI_ARGS_((HINSTANCE hInstance));
#endif /* __WIN32__ */
#ifdef MAC_TCL
/* 0 */
EXTERN void		TkGenerateActivateEvents _ANSI_ARGS_((
				TkWindow * winPtr, int active));
/* Slot 1 is reserved */
/* Slot 2 is reserved */
/* 3 */
EXTERN unsigned long	TkpGetMS _ANSI_ARGS_((void));
/* Slot 4 is reserved */
/* 5 */
EXTERN void		TkPointerDeadWindow _ANSI_ARGS_((TkWindow * winPtr));
/* 6 */
EXTERN void		TkpSetCapture _ANSI_ARGS_((TkWindow * winPtr));
/* 7 */
EXTERN void		TkpSetCursor _ANSI_ARGS_((TkpCursor cursor));
/* 8 */
EXTERN void		TkpWmSetState _ANSI_ARGS_((TkWindow * winPtr, 
				int state));
/* Slot 9 is reserved */
/* 10 */
EXTERN void		TkAboutDlg _ANSI_ARGS_((void));
/* Slot 11 is reserved */
/* Slot 12 is reserved */
/* 13 */
EXTERN Window		TkGetTransientMaster _ANSI_ARGS_((TkWindow * winPtr));
/* 14 */
EXTERN int		TkGenerateButtonEvent _ANSI_ARGS_((int x, int y, 
				Window window, unsigned int state));
/* Slot 15 is reserved */
/* 16 */
EXTERN void		TkGenWMDestroyEvent _ANSI_ARGS_((Tk_Window tkwin));
/* Slot 17 is reserved */
/* 18 */
EXTERN unsigned int	TkMacButtonKeyState _ANSI_ARGS_((void));
/* 19 */
EXTERN void		TkMacClearMenubarActive _ANSI_ARGS_((void));
/* Slot 20 is reserved */
/* 21 */
EXTERN int		TkMacDispatchMenuEvent _ANSI_ARGS_((int menuID, 
				int index));
/* 22 */
EXTERN void		TkMacInstallCursor _ANSI_ARGS_((int resizeOverride));
/* Slot 23 is reserved */
/* 24 */
EXTERN void		TkMacHandleTearoffMenu _ANSI_ARGS_((void));
/* Slot 25 is reserved */
/* Slot 26 is reserved */
/* 27 */
EXTERN void		TkMacDoHLEvent _ANSI_ARGS_((EventRecord * theEvent));
/* Slot 28 is reserved */
/* 29 */
EXTERN Time		TkMacGenerateTime _ANSI_ARGS_((void));
/* Slot 30 is reserved */
/* 31 */
EXTERN TkWindow *	TkMacGetScrollbarGrowWindow _ANSI_ARGS_((
				TkWindow * winPtr));
/* 32 */
EXTERN Window		TkMacGetXWindow _ANSI_ARGS_((WindowRef macWinPtr));
/* 33 */
EXTERN int		TkMacGrowToplevel _ANSI_ARGS_((WindowRef whichWindow, 
				Point start));
/* 34 */
EXTERN void		TkMacHandleMenuSelect _ANSI_ARGS_((long mResult, 
				int optionKeyPressed));
/* Slot 35 is reserved */
/* Slot 36 is reserved */
/* Slot 37 is reserved */
/* 38 */
EXTERN void		TkMacInvalidateWindow _ANSI_ARGS_((
				MacDrawable * macWin, int flag));
/* 39 */
EXTERN int		TkMacIsCharacterMissing _ANSI_ARGS_((Tk_Font tkfont, 
				unsigned int searchChar));
/* 40 */
EXTERN void		TkMacMakeRealWindowExist _ANSI_ARGS_((
				TkWindow * winPtr));
/* 41 */
EXTERN BitMapPtr	TkMacMakeStippleMap _ANSI_ARGS_((Drawable d1, 
				Drawable d2));
/* 42 */
EXTERN void		TkMacMenuClick _ANSI_ARGS_((void));
/* 43 */
EXTERN void		TkMacRegisterOffScreenWindow _ANSI_ARGS_((
				Window window, GWorldPtr portPtr));
/* 44 */
EXTERN int		TkMacResizable _ANSI_ARGS_((TkWindow * winPtr));
/* Slot 45 is reserved */
/* 46 */
EXTERN void		TkMacSetHelpMenuItemCount _ANSI_ARGS_((void));
/* 47 */
EXTERN void		TkMacSetScrollbarGrow _ANSI_ARGS_((TkWindow * winPtr, 
				int flag));
/* 48 */
EXTERN void		TkMacSetUpClippingRgn _ANSI_ARGS_((Drawable drawable));
/* 49 */
EXTERN void		TkMacSetUpGraphicsPort _ANSI_ARGS_((GC gc));
/* 50 */
EXTERN void		TkMacUpdateClipRgn _ANSI_ARGS_((TkWindow * winPtr));
/* 51 */
EXTERN void		TkMacUnregisterMacWindow _ANSI_ARGS_((
				GWorldPtr portPtr));
/* 52 */
EXTERN int		TkMacUseMenuID _ANSI_ARGS_((short macID));
/* 53 */
EXTERN RgnHandle	TkMacVisableClipRgn _ANSI_ARGS_((TkWindow * winPtr));
/* 54 */
EXTERN void		TkMacWinBounds _ANSI_ARGS_((TkWindow * winPtr, 
				Rect * geometry));
/* 55 */
EXTERN void		TkMacWindowOffset _ANSI_ARGS_((WindowRef wRef, 
				int * xOffset, int * yOffset));
/* Slot 56 is reserved */
/* 57 */
EXTERN int		TkSetMacColor _ANSI_ARGS_((unsigned long pixel, 
				RGBColor * macColor));
/* 58 */
EXTERN void		TkSetWMName _ANSI_ARGS_((TkWindow * winPtr, 
				Tk_Uid titleUid));
/* 59 */
EXTERN void		TkSuspendClipboard _ANSI_ARGS_((void));
/* Slot 60 is reserved */
/* 61 */
EXTERN int		TkMacZoomToplevel _ANSI_ARGS_((WindowPtr whichWindow, 
				Point where, short zoomPart));
/* 62 */
EXTERN Tk_Window	Tk_TopCoordsToWindow _ANSI_ARGS_((Tk_Window tkwin, 
				int rootX, int rootY, int * newX, int * newY));
/* 63 */
EXTERN MacDrawable *	TkMacContainerId _ANSI_ARGS_((TkWindow * winPtr));
/* 64 */
EXTERN MacDrawable *	TkMacGetHostToplevel _ANSI_ARGS_((TkWindow * winPtr));
/* 65 */
EXTERN void		TkMacPreprocessMenu _ANSI_ARGS_((void));
/* 66 */
EXTERN int		TkpIsWindowFloating _ANSI_ARGS_((WindowRef window));
#endif /* MAC_TCL */
#ifdef MAC_OSX_TK
/* 0 */
EXTERN void		TkGenerateActivateEvents _ANSI_ARGS_((
				TkWindow * winPtr, int active));
/* Slot 1 is reserved */
/* Slot 2 is reserved */
/* 3 */
EXTERN void		TkPointerDeadWindow _ANSI_ARGS_((TkWindow * winPtr));
/* 4 */
EXTERN void		TkpSetCapture _ANSI_ARGS_((TkWindow * winPtr));
/* 5 */
EXTERN void		TkpSetCursor _ANSI_ARGS_((TkpCursor cursor));
/* 6 */
EXTERN void		TkpWmSetState _ANSI_ARGS_((TkWindow * winPtr, 
				int state));
/* 7 */
EXTERN void		TkAboutDlg _ANSI_ARGS_((void));
/* 8 */
EXTERN unsigned int	TkMacOSXButtonKeyState _ANSI_ARGS_((void));
/* 9 */
EXTERN void		TkMacOSXClearMenubarActive _ANSI_ARGS_((void));
/* 10 */
EXTERN int		TkMacOSXDispatchMenuEvent _ANSI_ARGS_((int menuID, 
				int index));
/* 11 */
EXTERN void		TkMacOSXInstallCursor _ANSI_ARGS_((
				int resizeOverride));
/* 12 */
EXTERN void		TkMacOSXHandleTearoffMenu _ANSI_ARGS_((void));
/* Slot 13 is reserved */
/* 14 */
EXTERN int		TkMacOSXDoHLEvent _ANSI_ARGS_((
				EventRecord * theEvent));
/* Slot 15 is reserved */
/* 16 */
EXTERN Window		TkMacOSXGetXWindow _ANSI_ARGS_((WindowRef macWinPtr));
/* 17 */
EXTERN int		TkMacOSXGrowToplevel _ANSI_ARGS_((
				WindowRef whichWindow, Point start));
/* 18 */
EXTERN void		TkMacOSXHandleMenuSelect _ANSI_ARGS_((long mResult, 
				int optionKeyPressed));
/* Slot 19 is reserved */
/* Slot 20 is reserved */
/* 21 */
EXTERN void		TkMacOSXInvalidateWindow _ANSI_ARGS_((
				MacDrawable * macWin, int flag));
/* 22 */
EXTERN int		TkMacOSXIsCharacterMissing _ANSI_ARGS_((
				Tk_Font tkfont, unsigned int searchChar));
/* 23 */
EXTERN void		TkMacOSXMakeRealWindowExist _ANSI_ARGS_((
				TkWindow * winPtr));
/* 24 */
EXTERN BitMapPtr	TkMacOSXMakeStippleMap _ANSI_ARGS_((Drawable d1, 
				Drawable d2));
/* 25 */
EXTERN void		TkMacOSXMenuClick _ANSI_ARGS_((void));
/* 26 */
EXTERN void		TkMacOSXRegisterOffScreenWindow _ANSI_ARGS_((
				Window window, GWorldPtr portPtr));
/* 27 */
EXTERN int		TkMacOSXResizable _ANSI_ARGS_((TkWindow * winPtr));
/* 28 */
EXTERN void		TkMacOSXSetHelpMenuItemCount _ANSI_ARGS_((void));
/* 29 */
EXTERN void		TkMacOSXSetScrollbarGrow _ANSI_ARGS_((
				TkWindow * winPtr, int flag));
/* 30 */
EXTERN void		TkMacOSXSetUpClippingRgn _ANSI_ARGS_((
				Drawable drawable));
/* 31 */
EXTERN void		TkMacOSXSetUpGraphicsPort _ANSI_ARGS_((GC gc, 
				GWorldPtr destPort));
/* 32 */
EXTERN void		TkMacOSXUpdateClipRgn _ANSI_ARGS_((TkWindow * winPtr));
/* 33 */
EXTERN void		TkMacOSXUnregisterMacWindow _ANSI_ARGS_((
				WindowRef portPtr));
/* 34 */
EXTERN int		TkMacOSXUseMenuID _ANSI_ARGS_((short macID));
/* 35 */
EXTERN RgnHandle	TkMacOSXVisableClipRgn _ANSI_ARGS_((
				TkWindow * winPtr));
/* 36 */
EXTERN void		TkMacOSXWinBounds _ANSI_ARGS_((TkWindow * winPtr, 
				Rect * geometry));
/* 37 */
EXTERN void		TkMacOSXWindowOffset _ANSI_ARGS_((WindowRef wRef, 
				int * xOffset, int * yOffset));
/* 38 */
EXTERN int		TkSetMacColor _ANSI_ARGS_((unsigned long pixel, 
				RGBColor * macColor));
/* 39 */
EXTERN void		TkSetWMName _ANSI_ARGS_((TkWindow * winPtr, 
				Tk_Uid titleUid));
/* 40 */
EXTERN void		TkSuspendClipboard _ANSI_ARGS_((void));
/* 41 */
EXTERN int		TkMacOSXZoomToplevel _ANSI_ARGS_((
				WindowPtr whichWindow, Point where, 
				short zoomPart));
/* 42 */
EXTERN Tk_Window	Tk_TopCoordsToWindow _ANSI_ARGS_((Tk_Window tkwin, 
				int rootX, int rootY, int * newX, int * newY));
/* 43 */
EXTERN MacDrawable *	TkMacOSXContainerId _ANSI_ARGS_((TkWindow * winPtr));
/* 44 */
EXTERN MacDrawable *	TkMacOSXGetHostToplevel _ANSI_ARGS_((
				TkWindow * winPtr));
/* 45 */
EXTERN void		TkMacOSXPreprocessMenu _ANSI_ARGS_((void));
/* 46 */
EXTERN int		TkpIsWindowFloating _ANSI_ARGS_((WindowRef window));
/* 47 */
EXTERN Tk_Window	TkMacOSXGetCapture _ANSI_ARGS_((void));
/* Slot 48 is reserved */
/* 49 */
EXTERN Window		TkGetTransientMaster _ANSI_ARGS_((TkWindow * winPtr));
/* 50 */
EXTERN int		TkGenerateButtonEvent _ANSI_ARGS_((int x, int y, 
				Window window, unsigned int state));
/* 51 */
EXTERN void		TkGenWMDestroyEvent _ANSI_ARGS_((Tk_Window tkwin));
/* Slot 52 is reserved */
/* 53 */
EXTERN unsigned long	TkpGetMS _ANSI_ARGS_((void));
#endif /* MAC_OSX_TK */
#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) /* X11 */
/* 0 */
EXTERN void		TkCreateXEventSource _ANSI_ARGS_((void));
/* 1 */
EXTERN void		TkFreeWindowId _ANSI_ARGS_((TkDisplay * dispPtr, 
				Window w));
/* 2 */
EXTERN void		TkInitXId _ANSI_ARGS_((TkDisplay * dispPtr));
/* 3 */
EXTERN int		TkpCmapStressed _ANSI_ARGS_((Tk_Window tkwin, 
				Colormap colormap));
/* 4 */
EXTERN void		TkpSync _ANSI_ARGS_((Display * display));
/* 5 */
EXTERN Window		TkUnixContainerId _ANSI_ARGS_((TkWindow * winPtr));
/* 6 */
EXTERN int		TkUnixDoOneXEvent _ANSI_ARGS_((Tcl_Time * timePtr));
/* 7 */
EXTERN void		TkUnixSetMenubar _ANSI_ARGS_((Tk_Window tkwin, 
				Tk_Window menubar));
/* 8 */
EXTERN int		TkpScanWindowId _ANSI_ARGS_((Tcl_Interp * interp, 
				CONST char * string, Window * idPtr));
/* 9 */
EXTERN void		TkWmCleanup _ANSI_ARGS_((TkDisplay * dispPtr));
/* 10 */
EXTERN void		TkSendCleanup _ANSI_ARGS_((TkDisplay * dispPtr));
/* 11 */
EXTERN void		TkFreeXId _ANSI_ARGS_((TkDisplay * dispPtr));
/* 12 */
EXTERN int		TkpWmSetState _ANSI_ARGS_((TkWindow * winPtr, 
				int state));
#endif /* X11 */

typedef struct TkIntPlatStubs {
    int magic;
    struct TkIntPlatStubHooks *hooks;

#ifdef __WIN32__
    char * (*tkAlignImageData) _ANSI_ARGS_((XImage * image, int alignment, int bitOrder)); /* 0 */
    void *reserved1;
    void (*tkGenerateActivateEvents) _ANSI_ARGS_((TkWindow * winPtr, int active)); /* 2 */
    unsigned long (*tkpGetMS) _ANSI_ARGS_((void)); /* 3 */
    void (*tkPointerDeadWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 4 */
    void (*tkpPrintWindowId) _ANSI_ARGS_((char * buf, Window window)); /* 5 */
    int (*tkpScanWindowId) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, Window * idPtr)); /* 6 */
    void (*tkpSetCapture) _ANSI_ARGS_((TkWindow * winPtr)); /* 7 */
    void (*tkpSetCursor) _ANSI_ARGS_((TkpCursor cursor)); /* 8 */
    void (*tkpWmSetState) _ANSI_ARGS_((TkWindow * winPtr, int state)); /* 9 */
    void (*tkSetPixmapColormap) _ANSI_ARGS_((Pixmap pixmap, Colormap colormap)); /* 10 */
    void (*tkWinCancelMouseTimer) _ANSI_ARGS_((void)); /* 11 */
    void (*tkWinClipboardRender) _ANSI_ARGS_((TkDisplay * dispPtr, UINT format)); /* 12 */
    LRESULT (*tkWinEmbeddedEventProc) _ANSI_ARGS_((HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)); /* 13 */
    void (*tkWinFillRect) _ANSI_ARGS_((HDC dc, int x, int y, int width, int height, int pixel)); /* 14 */
    COLORREF (*tkWinGetBorderPixels) _ANSI_ARGS_((Tk_Window tkwin, Tk_3DBorder border, int which)); /* 15 */
    HDC (*tkWinGetDrawableDC) _ANSI_ARGS_((Display * display, Drawable d, TkWinDCState* state)); /* 16 */
    int (*tkWinGetModifierState) _ANSI_ARGS_((void)); /* 17 */
    HPALETTE (*tkWinGetSystemPalette) _ANSI_ARGS_((void)); /* 18 */
    HWND (*tkWinGetWrapperWindow) _ANSI_ARGS_((Tk_Window tkwin)); /* 19 */
    int (*tkWinHandleMenuEvent) _ANSI_ARGS_((HWND * phwnd, UINT * pMessage, WPARAM * pwParam, LPARAM * plParam, LRESULT * plResult)); /* 20 */
    int (*tkWinIndexOfColor) _ANSI_ARGS_((XColor * colorPtr)); /* 21 */
    void (*tkWinReleaseDrawableDC) _ANSI_ARGS_((Drawable d, HDC hdc, TkWinDCState* state)); /* 22 */
    LRESULT (*tkWinResendEvent) _ANSI_ARGS_((WNDPROC wndproc, HWND hwnd, XEvent * eventPtr)); /* 23 */
    HPALETTE (*tkWinSelectPalette) _ANSI_ARGS_((HDC dc, Colormap colormap)); /* 24 */
    void (*tkWinSetMenu) _ANSI_ARGS_((Tk_Window tkwin, HMENU hMenu)); /* 25 */
    void (*tkWinSetWindowPos) _ANSI_ARGS_((HWND hwnd, HWND siblingHwnd, int pos)); /* 26 */
    void (*tkWinWmCleanup) _ANSI_ARGS_((HINSTANCE hInstance)); /* 27 */
    void (*tkWinXCleanup) _ANSI_ARGS_((HINSTANCE hInstance)); /* 28 */
    void (*tkWinXInit) _ANSI_ARGS_((HINSTANCE hInstance)); /* 29 */
    void (*tkWinSetForegroundWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 30 */
    void (*tkWinDialogDebug) _ANSI_ARGS_((int debug)); /* 31 */
    Tcl_Obj * (*tkWinGetMenuSystemDefault) _ANSI_ARGS_((Tk_Window tkwin, CONST char * dbName, CONST char * className)); /* 32 */
    int (*tkWinGetPlatformId) _ANSI_ARGS_((void)); /* 33 */
    void (*tkWinSetHINSTANCE) _ANSI_ARGS_((HINSTANCE hInstance)); /* 34 */
#endif /* __WIN32__ */
#ifdef MAC_TCL
    void (*tkGenerateActivateEvents) _ANSI_ARGS_((TkWindow * winPtr, int active)); /* 0 */
    void *reserved1;
    void *reserved2;
    unsigned long (*tkpGetMS) _ANSI_ARGS_((void)); /* 3 */
    void *reserved4;
    void (*tkPointerDeadWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 5 */
    void (*tkpSetCapture) _ANSI_ARGS_((TkWindow * winPtr)); /* 6 */
    void (*tkpSetCursor) _ANSI_ARGS_((TkpCursor cursor)); /* 7 */
    void (*tkpWmSetState) _ANSI_ARGS_((TkWindow * winPtr, int state)); /* 8 */
    void *reserved9;
    void (*tkAboutDlg) _ANSI_ARGS_((void)); /* 10 */
    void *reserved11;
    void *reserved12;
    Window (*tkGetTransientMaster) _ANSI_ARGS_((TkWindow * winPtr)); /* 13 */
    int (*tkGenerateButtonEvent) _ANSI_ARGS_((int x, int y, Window window, unsigned int state)); /* 14 */
    void *reserved15;
    void (*tkGenWMDestroyEvent) _ANSI_ARGS_((Tk_Window tkwin)); /* 16 */
    void *reserved17;
    unsigned int (*tkMacButtonKeyState) _ANSI_ARGS_((void)); /* 18 */
    void (*tkMacClearMenubarActive) _ANSI_ARGS_((void)); /* 19 */
    void *reserved20;
    int (*tkMacDispatchMenuEvent) _ANSI_ARGS_((int menuID, int index)); /* 21 */
    void (*tkMacInstallCursor) _ANSI_ARGS_((int resizeOverride)); /* 22 */
    void *reserved23;
    void (*tkMacHandleTearoffMenu) _ANSI_ARGS_((void)); /* 24 */
    void *reserved25;
    void *reserved26;
    void (*tkMacDoHLEvent) _ANSI_ARGS_((EventRecord * theEvent)); /* 27 */
    void *reserved28;
    Time (*tkMacGenerateTime) _ANSI_ARGS_((void)); /* 29 */
    void *reserved30;
    TkWindow * (*tkMacGetScrollbarGrowWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 31 */
    Window (*tkMacGetXWindow) _ANSI_ARGS_((WindowRef macWinPtr)); /* 32 */
    int (*tkMacGrowToplevel) _ANSI_ARGS_((WindowRef whichWindow, Point start)); /* 33 */
    void (*tkMacHandleMenuSelect) _ANSI_ARGS_((long mResult, int optionKeyPressed)); /* 34 */
    void *reserved35;
    void *reserved36;
    void *reserved37;
    void (*tkMacInvalidateWindow) _ANSI_ARGS_((MacDrawable * macWin, int flag)); /* 38 */
    int (*tkMacIsCharacterMissing) _ANSI_ARGS_((Tk_Font tkfont, unsigned int searchChar)); /* 39 */
    void (*tkMacMakeRealWindowExist) _ANSI_ARGS_((TkWindow * winPtr)); /* 40 */
    BitMapPtr (*tkMacMakeStippleMap) _ANSI_ARGS_((Drawable d1, Drawable d2)); /* 41 */
    void (*tkMacMenuClick) _ANSI_ARGS_((void)); /* 42 */
    void (*tkMacRegisterOffScreenWindow) _ANSI_ARGS_((Window window, GWorldPtr portPtr)); /* 43 */
    int (*tkMacResizable) _ANSI_ARGS_((TkWindow * winPtr)); /* 44 */
    void *reserved45;
    void (*tkMacSetHelpMenuItemCount) _ANSI_ARGS_((void)); /* 46 */
    void (*tkMacSetScrollbarGrow) _ANSI_ARGS_((TkWindow * winPtr, int flag)); /* 47 */
    void (*tkMacSetUpClippingRgn) _ANSI_ARGS_((Drawable drawable)); /* 48 */
    void (*tkMacSetUpGraphicsPort) _ANSI_ARGS_((GC gc)); /* 49 */
    void (*tkMacUpdateClipRgn) _ANSI_ARGS_((TkWindow * winPtr)); /* 50 */
    void (*tkMacUnregisterMacWindow) _ANSI_ARGS_((GWorldPtr portPtr)); /* 51 */
    int (*tkMacUseMenuID) _ANSI_ARGS_((short macID)); /* 52 */
    RgnHandle (*tkMacVisableClipRgn) _ANSI_ARGS_((TkWindow * winPtr)); /* 53 */
    void (*tkMacWinBounds) _ANSI_ARGS_((TkWindow * winPtr, Rect * geometry)); /* 54 */
    void (*tkMacWindowOffset) _ANSI_ARGS_((WindowRef wRef, int * xOffset, int * yOffset)); /* 55 */
    void *reserved56;
    int (*tkSetMacColor) _ANSI_ARGS_((unsigned long pixel, RGBColor * macColor)); /* 57 */
    void (*tkSetWMName) _ANSI_ARGS_((TkWindow * winPtr, Tk_Uid titleUid)); /* 58 */
    void (*tkSuspendClipboard) _ANSI_ARGS_((void)); /* 59 */
    void *reserved60;
    int (*tkMacZoomToplevel) _ANSI_ARGS_((WindowPtr whichWindow, Point where, short zoomPart)); /* 61 */
    Tk_Window (*tk_TopCoordsToWindow) _ANSI_ARGS_((Tk_Window tkwin, int rootX, int rootY, int * newX, int * newY)); /* 62 */
    MacDrawable * (*tkMacContainerId) _ANSI_ARGS_((TkWindow * winPtr)); /* 63 */
    MacDrawable * (*tkMacGetHostToplevel) _ANSI_ARGS_((TkWindow * winPtr)); /* 64 */
    void (*tkMacPreprocessMenu) _ANSI_ARGS_((void)); /* 65 */
    int (*tkpIsWindowFloating) _ANSI_ARGS_((WindowRef window)); /* 66 */
#endif /* MAC_TCL */
#ifdef MAC_OSX_TK
    void (*tkGenerateActivateEvents) _ANSI_ARGS_((TkWindow * winPtr, int active)); /* 0 */
    void *reserved1;
    void *reserved2;
    void (*tkPointerDeadWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 3 */
    void (*tkpSetCapture) _ANSI_ARGS_((TkWindow * winPtr)); /* 4 */
    void (*tkpSetCursor) _ANSI_ARGS_((TkpCursor cursor)); /* 5 */
    void (*tkpWmSetState) _ANSI_ARGS_((TkWindow * winPtr, int state)); /* 6 */
    void (*tkAboutDlg) _ANSI_ARGS_((void)); /* 7 */
    unsigned int (*tkMacOSXButtonKeyState) _ANSI_ARGS_((void)); /* 8 */
    void (*tkMacOSXClearMenubarActive) _ANSI_ARGS_((void)); /* 9 */
    int (*tkMacOSXDispatchMenuEvent) _ANSI_ARGS_((int menuID, int index)); /* 10 */
    void (*tkMacOSXInstallCursor) _ANSI_ARGS_((int resizeOverride)); /* 11 */
    void (*tkMacOSXHandleTearoffMenu) _ANSI_ARGS_((void)); /* 12 */
    void *reserved13;
    int (*tkMacOSXDoHLEvent) _ANSI_ARGS_((EventRecord * theEvent)); /* 14 */
    void *reserved15;
    Window (*tkMacOSXGetXWindow) _ANSI_ARGS_((WindowRef macWinPtr)); /* 16 */
    int (*tkMacOSXGrowToplevel) _ANSI_ARGS_((WindowRef whichWindow, Point start)); /* 17 */
    void (*tkMacOSXHandleMenuSelect) _ANSI_ARGS_((long mResult, int optionKeyPressed)); /* 18 */
    void *reserved19;
    void *reserved20;
    void (*tkMacOSXInvalidateWindow) _ANSI_ARGS_((MacDrawable * macWin, int flag)); /* 21 */
    int (*tkMacOSXIsCharacterMissing) _ANSI_ARGS_((Tk_Font tkfont, unsigned int searchChar)); /* 22 */
    void (*tkMacOSXMakeRealWindowExist) _ANSI_ARGS_((TkWindow * winPtr)); /* 23 */
    BitMapPtr (*tkMacOSXMakeStippleMap) _ANSI_ARGS_((Drawable d1, Drawable d2)); /* 24 */
    void (*tkMacOSXMenuClick) _ANSI_ARGS_((void)); /* 25 */
    void (*tkMacOSXRegisterOffScreenWindow) _ANSI_ARGS_((Window window, GWorldPtr portPtr)); /* 26 */
    int (*tkMacOSXResizable) _ANSI_ARGS_((TkWindow * winPtr)); /* 27 */
    void (*tkMacOSXSetHelpMenuItemCount) _ANSI_ARGS_((void)); /* 28 */
    void (*tkMacOSXSetScrollbarGrow) _ANSI_ARGS_((TkWindow * winPtr, int flag)); /* 29 */
    void (*tkMacOSXSetUpClippingRgn) _ANSI_ARGS_((Drawable drawable)); /* 30 */
    void (*tkMacOSXSetUpGraphicsPort) _ANSI_ARGS_((GC gc, GWorldPtr destPort)); /* 31 */
    void (*tkMacOSXUpdateClipRgn) _ANSI_ARGS_((TkWindow * winPtr)); /* 32 */
    void (*tkMacOSXUnregisterMacWindow) _ANSI_ARGS_((WindowRef portPtr)); /* 33 */
    int (*tkMacOSXUseMenuID) _ANSI_ARGS_((short macID)); /* 34 */
    RgnHandle (*tkMacOSXVisableClipRgn) _ANSI_ARGS_((TkWindow * winPtr)); /* 35 */
    void (*tkMacOSXWinBounds) _ANSI_ARGS_((TkWindow * winPtr, Rect * geometry)); /* 36 */
    void (*tkMacOSXWindowOffset) _ANSI_ARGS_((WindowRef wRef, int * xOffset, int * yOffset)); /* 37 */
    int (*tkSetMacColor) _ANSI_ARGS_((unsigned long pixel, RGBColor * macColor)); /* 38 */
    void (*tkSetWMName) _ANSI_ARGS_((TkWindow * winPtr, Tk_Uid titleUid)); /* 39 */
    void (*tkSuspendClipboard) _ANSI_ARGS_((void)); /* 40 */
    int (*tkMacOSXZoomToplevel) _ANSI_ARGS_((WindowPtr whichWindow, Point where, short zoomPart)); /* 41 */
    Tk_Window (*tk_TopCoordsToWindow) _ANSI_ARGS_((Tk_Window tkwin, int rootX, int rootY, int * newX, int * newY)); /* 42 */
    MacDrawable * (*tkMacOSXContainerId) _ANSI_ARGS_((TkWindow * winPtr)); /* 43 */
    MacDrawable * (*tkMacOSXGetHostToplevel) _ANSI_ARGS_((TkWindow * winPtr)); /* 44 */
    void (*tkMacOSXPreprocessMenu) _ANSI_ARGS_((void)); /* 45 */
    int (*tkpIsWindowFloating) _ANSI_ARGS_((WindowRef window)); /* 46 */
    Tk_Window (*tkMacOSXGetCapture) _ANSI_ARGS_((void)); /* 47 */
    void *reserved48;
    Window (*tkGetTransientMaster) _ANSI_ARGS_((TkWindow * winPtr)); /* 49 */
    int (*tkGenerateButtonEvent) _ANSI_ARGS_((int x, int y, Window window, unsigned int state)); /* 50 */
    void (*tkGenWMDestroyEvent) _ANSI_ARGS_((Tk_Window tkwin)); /* 51 */
    void *reserved52;
    unsigned long (*tkpGetMS) _ANSI_ARGS_((void)); /* 53 */
#endif /* MAC_OSX_TK */
#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) /* X11 */
    void (*tkCreateXEventSource) _ANSI_ARGS_((void)); /* 0 */
    void (*tkFreeWindowId) _ANSI_ARGS_((TkDisplay * dispPtr, Window w)); /* 1 */
    void (*tkInitXId) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 2 */
    int (*tkpCmapStressed) _ANSI_ARGS_((Tk_Window tkwin, Colormap colormap)); /* 3 */
    void (*tkpSync) _ANSI_ARGS_((Display * display)); /* 4 */
    Window (*tkUnixContainerId) _ANSI_ARGS_((TkWindow * winPtr)); /* 5 */
    int (*tkUnixDoOneXEvent) _ANSI_ARGS_((Tcl_Time * timePtr)); /* 6 */
    void (*tkUnixSetMenubar) _ANSI_ARGS_((Tk_Window tkwin, Tk_Window menubar)); /* 7 */
    int (*tkpScanWindowId) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, Window * idPtr)); /* 8 */
    void (*tkWmCleanup) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 9 */
    void (*tkSendCleanup) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 10 */
    void (*tkFreeXId) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 11 */
    int (*tkpWmSetState) _ANSI_ARGS_((TkWindow * winPtr, int state)); /* 12 */
#endif /* X11 */
} TkIntPlatStubs;

#ifdef __cplusplus
extern "C" {
#endif
extern TkIntPlatStubs *tkIntPlatStubsPtr;
#ifdef __cplusplus
}
#endif

#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)

/*
 * Inline function declarations:
 */

#ifdef __WIN32__
#ifndef TkAlignImageData
#define TkAlignImageData \
	(tkIntPlatStubsPtr->tkAlignImageData) /* 0 */
#endif
/* Slot 1 is reserved */
#ifndef TkGenerateActivateEvents
#define TkGenerateActivateEvents \
	(tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */
#endif
#ifndef TkpGetMS
#define TkpGetMS \
	(tkIntPlatStubsPtr->tkpGetMS) /* 3 */
#endif
#ifndef TkPointerDeadWindow
#define TkPointerDeadWindow \
	(tkIntPlatStubsPtr->tkPointerDeadWindow) /* 4 */
#endif
#ifndef TkpPrintWindowId
#define TkpPrintWindowId \
	(tkIntPlatStubsPtr->tkpPrintWindowId) /* 5 */
#endif
#ifndef TkpScanWindowId
#define TkpScanWindowId \
	(tkIntPlatStubsPtr->tkpScanWindowId) /* 6 */
#endif
#ifndef TkpSetCapture
#define TkpSetCapture \
	(tkIntPlatStubsPtr->tkpSetCapture) /* 7 */
#endif
#ifndef TkpSetCursor
#define TkpSetCursor \
	(tkIntPlatStubsPtr->tkpSetCursor) /* 8 */
#endif
#ifndef TkpWmSetState
#define TkpWmSetState \
	(tkIntPlatStubsPtr->tkpWmSetState) /* 9 */
#endif
#ifndef TkSetPixmapColormap
#define TkSetPixmapColormap \
	(tkIntPlatStubsPtr->tkSetPixmapColormap) /* 10 */
#endif
#ifndef TkWinCancelMouseTimer
#define TkWinCancelMouseTimer \
	(tkIntPlatStubsPtr->tkWinCancelMouseTimer) /* 11 */
#endif
#ifndef TkWinClipboardRender
#define TkWinClipboardRender \
	(tkIntPlatStubsPtr->tkWinClipboardRender) /* 12 */
#endif
#ifndef TkWinEmbeddedEventProc
#define TkWinEmbeddedEventProc \
	(tkIntPlatStubsPtr->tkWinEmbeddedEventProc) /* 13 */
#endif
#ifndef TkWinFillRect
#define TkWinFillRect \
	(tkIntPlatStubsPtr->tkWinFillRect) /* 14 */
#endif
#ifndef TkWinGetBorderPixels
#define TkWinGetBorderPixels \
	(tkIntPlatStubsPtr->tkWinGetBorderPixels) /* 15 */
#endif
#ifndef TkWinGetDrawableDC
#define TkWinGetDrawableDC \
	(tkIntPlatStubsPtr->tkWinGetDrawableDC) /* 16 */
#endif
#ifndef TkWinGetModifierState
#define TkWinGetModifierState \
	(tkIntPlatStubsPtr->tkWinGetModifierState) /* 17 */
#endif
#ifndef TkWinGetSystemPalette
#define TkWinGetSystemPalette \
	(tkIntPlatStubsPtr->tkWinGetSystemPalette) /* 18 */
#endif
#ifndef TkWinGetWrapperWindow
#define TkWinGetWrapperWindow \
	(tkIntPlatStubsPtr->tkWinGetWrapperWindow) /* 19 */
#endif
#ifndef TkWinHandleMenuEvent
#define TkWinHandleMenuEvent \
	(tkIntPlatStubsPtr->tkWinHandleMenuEvent) /* 20 */
#endif
#ifndef TkWinIndexOfColor
#define TkWinIndexOfColor \
	(tkIntPlatStubsPtr->tkWinIndexOfColor) /* 21 */
#endif
#ifndef TkWinReleaseDrawableDC
#define TkWinReleaseDrawableDC \
	(tkIntPlatStubsPtr->tkWinReleaseDrawableDC) /* 22 */
#endif
#ifndef TkWinResendEvent
#define TkWinResendEvent \
	(tkIntPlatStubsPtr->tkWinResendEvent) /* 23 */
#endif
#ifndef TkWinSelectPalette
#define TkWinSelectPalette \
	(tkIntPlatStubsPtr->tkWinSelectPalette) /* 24 */
#endif
#ifndef TkWinSetMenu
#define TkWinSetMenu \
	(tkIntPlatStubsPtr->tkWinSetMenu) /* 25 */
#endif
#ifndef TkWinSetWindowPos
#define TkWinSetWindowPos \
	(tkIntPlatStubsPtr->tkWinSetWindowPos) /* 26 */
#endif
#ifndef TkWinWmCleanup
#define TkWinWmCleanup \
	(tkIntPlatStubsPtr->tkWinWmCleanup) /* 27 */
#endif
#ifndef TkWinXCleanup
#define TkWinXCleanup \
	(tkIntPlatStubsPtr->tkWinXCleanup) /* 28 */
#endif
#ifndef TkWinXInit
#define TkWinXInit \
	(tkIntPlatStubsPtr->tkWinXInit) /* 29 */
#endif
#ifndef TkWinSetForegroundWindow
#define TkWinSetForegroundWindow \
	(tkIntPlatStubsPtr->tkWinSetForegroundWindow) /* 30 */
#endif
#ifndef TkWinDialogDebug
#define TkWinDialogDebug \
	(tkIntPlatStubsPtr->tkWinDialogDebug) /* 31 */
#endif
#ifndef TkWinGetMenuSystemDefault
#define TkWinGetMenuSystemDefault \
	(tkIntPlatStubsPtr->tkWinGetMenuSystemDefault) /* 32 */
#endif
#ifndef TkWinGetPlatformId
#define TkWinGetPlatformId \
	(tkIntPlatStubsPtr->tkWinGetPlatformId) /* 33 */
#endif
#ifndef TkWinSetHINSTANCE
#define TkWinSetHINSTANCE \
	(tkIntPlatStubsPtr->tkWinSetHINSTANCE) /* 34 */
#endif
#endif /* __WIN32__ */
#ifdef MAC_TCL
#ifndef TkGenerateActivateEvents
#define TkGenerateActivateEvents \
	(tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 0 */
#endif
/* Slot 1 is reserved */
/* Slot 2 is reserved */
#ifndef TkpGetMS
#define TkpGetMS \
	(tkIntPlatStubsPtr->tkpGetMS) /* 3 */
#endif
/* Slot 4 is reserved */
#ifndef TkPointerDeadWindow
#define TkPointerDeadWindow \
	(tkIntPlatStubsPtr->tkPointerDeadWindow) /* 5 */
#endif
#ifndef TkpSetCapture
#define TkpSetCapture \
	(tkIntPlatStubsPtr->tkpSetCapture) /* 6 */
#endif
#ifndef TkpSetCursor
#define TkpSetCursor \
	(tkIntPlatStubsPtr->tkpSetCursor) /* 7 */
#endif
#ifndef TkpWmSetState
#define TkpWmSetState \
	(tkIntPlatStubsPtr->tkpWmSetState) /* 8 */
#endif
/* Slot 9 is reserved */
#ifndef TkAboutDlg
#define TkAboutDlg \
	(tkIntPlatStubsPtr->tkAboutDlg) /* 10 */
#endif
/* Slot 11 is reserved */
/* Slot 12 is reserved */
#ifndef TkGetTransientMaster
#define TkGetTransientMaster \
	(tkIntPlatStubsPtr->tkGetTransientMaster) /* 13 */
#endif
#ifndef TkGenerateButtonEvent
#define TkGenerateButtonEvent \
	(tkIntPlatStubsPtr->tkGenerateButtonEvent) /* 14 */
#endif
/* Slot 15 is reserved */
#ifndef TkGenWMDestroyEvent
#define TkGenWMDestroyEvent \
	(tkIntPlatStubsPtr->tkGenWMDestroyEvent) /* 16 */
#endif
/* Slot 17 is reserved */
#ifndef TkMacButtonKeyState
#define TkMacButtonKeyState \
	(tkIntPlatStubsPtr->tkMacButtonKeyState) /* 18 */
#endif
#ifndef TkMacClearMenubarActive
#define TkMacClearMenubarActive \
	(tkIntPlatStubsPtr->tkMacClearMenubarActive) /* 19 */
#endif
/* Slot 20 is reserved */
#ifndef TkMacDispatchMenuEvent
#define TkMacDispatchMenuEvent \
	(tkIntPlatStubsPtr->tkMacDispatchMenuEvent) /* 21 */
#endif
#ifndef TkMacInstallCursor
#define TkMacInstallCursor \
	(tkIntPlatStubsPtr->tkMacInstallCursor) /* 22 */
#endif
/* Slot 23 is reserved */
#ifndef TkMacHandleTearoffMenu
#define TkMacHandleTearoffMenu \
	(tkIntPlatStubsPtr->tkMacHandleTearoffMenu) /* 24 */
#endif
/* Slot 25 is reserved */
/* Slot 26 is reserved */
#ifndef TkMacDoHLEvent
#define TkMacDoHLEvent \
	(tkIntPlatStubsPtr->tkMacDoHLEvent) /* 27 */
#endif
/* Slot 28 is reserved */
#ifndef TkMacGenerateTime
#define TkMacGenerateTime \
	(tkIntPlatStubsPtr->tkMacGenerateTime) /* 29 */
#endif
/* Slot 30 is reserved */
#ifndef TkMacGetScrollbarGrowWindow
#define TkMacGetScrollbarGrowWindow \
	(tkIntPlatStubsPtr->tkMacGetScrollbarGrowWindow) /* 31 */
#endif
#ifndef TkMacGetXWindow
#define TkMacGetXWindow \
	(tkIntPlatStubsPtr->tkMacGetXWindow) /* 32 */
#endif
#ifndef TkMacGrowToplevel
#define TkMacGrowToplevel \
	(tkIntPlatStubsPtr->tkMacGrowToplevel) /* 33 */
#endif
#ifndef TkMacHandleMenuSelect
#define TkMacHandleMenuSelect \
	(tkIntPlatStubsPtr->tkMacHandleMenuSelect) /* 34 */
#endif
/* Slot 35 is reserved */
/* Slot 36 is reserved */
/* Slot 37 is reserved */
#ifndef TkMacInvalidateWindow
#define TkMacInvalidateWindow \
	(tkIntPlatStubsPtr->tkMacInvalidateWindow) /* 38 */
#endif
#ifndef TkMacIsCharacterMissing
#define TkMacIsCharacterMissing \
	(tkIntPlatStubsPtr->tkMacIsCharacterMissing) /* 39 */
#endif
#ifndef TkMacMakeRealWindowExist
#define TkMacMakeRealWindowExist \
	(tkIntPlatStubsPtr->tkMacMakeRealWindowExist) /* 40 */
#endif
#ifndef TkMacMakeStippleMap
#define TkMacMakeStippleMap \
	(tkIntPlatStubsPtr->tkMacMakeStippleMap) /* 41 */
#endif
#ifndef TkMacMenuClick
#define TkMacMenuClick \
	(tkIntPlatStubsPtr->tkMacMenuClick) /* 42 */
#endif
#ifndef TkMacRegisterOffScreenWindow
#define TkMacRegisterOffScreenWindow \
	(tkIntPlatStubsPtr->tkMacRegisterOffScreenWindow) /* 43 */
#endif
#ifndef TkMacResizable
#define TkMacResizable \
	(tkIntPlatStubsPtr->tkMacResizable) /* 44 */
#endif
/* Slot 45 is reserved */
#ifndef TkMacSetHelpMenuItemCount
#define TkMacSetHelpMenuItemCount \
	(tkIntPlatStubsPtr->tkMacSetHelpMenuItemCount) /* 46 */
#endif
#ifndef TkMacSetScrollbarGrow
#define TkMacSetScrollbarGrow \
	(tkIntPlatStubsPtr->tkMacSetScrollbarGrow) /* 47 */
#endif
#ifndef TkMacSetUpClippingRgn
#define TkMacSetUpClippingRgn \
	(tkIntPlatStubsPtr->tkMacSetUpClippingRgn) /* 48 */
#endif
#ifndef TkMacSetUpGraphicsPort
#define TkMacSetUpGraphicsPort \
	(tkIntPlatStubsPtr->tkMacSetUpGraphicsPort) /* 49 */
#endif
#ifndef TkMacUpdateClipRgn
#define TkMacUpdateClipRgn \
	(tkIntPlatStubsPtr->tkMacUpdateClipRgn) /* 50 */
#endif
#ifndef TkMacUnregisterMacWindow
#define TkMacUnregisterMacWindow \
	(tkIntPlatStubsPtr->tkMacUnregisterMacWindow) /* 51 */
#endif
#ifndef TkMacUseMenuID
#define TkMacUseMenuID \
	(tkIntPlatStubsPtr->tkMacUseMenuID) /* 52 */
#endif
#ifndef TkMacVisableClipRgn
#define TkMacVisableClipRgn \
	(tkIntPlatStubsPtr->tkMacVisableClipRgn) /* 53 */
#endif
#ifndef TkMacWinBounds
#define TkMacWinBounds \
	(tkIntPlatStubsPtr->tkMacWinBounds) /* 54 */
#endif
#ifndef TkMacWindowOffset
#define TkMacWindowOffset \
	(tkIntPlatStubsPtr->tkMacWindowOffset) /* 55 */
#endif
/* Slot 56 is reserved */
#ifndef TkSetMacColor
#define TkSetMacColor \
	(tkIntPlatStubsPtr->tkSetMacColor) /* 57 */
#endif
#ifndef TkSetWMName
#define TkSetWMName \
	(tkIntPlatStubsPtr->tkSetWMName) /* 58 */
#endif
#ifndef TkSuspendClipboard
#define TkSuspendClipboard \
	(tkIntPlatStubsPtr->tkSuspendClipboard) /* 59 */
#endif
/* Slot 60 is reserved */
#ifndef TkMacZoomToplevel
#define TkMacZoomToplevel \
	(tkIntPlatStubsPtr->tkMacZoomToplevel) /* 61 */
#endif
#ifndef Tk_TopCoordsToWindow
#define Tk_TopCoordsToWindow \
	(tkIntPlatStubsPtr->tk_TopCoordsToWindow) /* 62 */
#endif
#ifndef TkMacContainerId
#define TkMacContainerId \
	(tkIntPlatStubsPtr->tkMacContainerId) /* 63 */
#endif
#ifndef TkMacGetHostToplevel
#define TkMacGetHostToplevel \
	(tkIntPlatStubsPtr->tkMacGetHostToplevel) /* 64 */
#endif
#ifndef TkMacPreprocessMenu
#define TkMacPreprocessMenu \
	(tkIntPlatStubsPtr->tkMacPreprocessMenu) /* 65 */
#endif
#ifndef TkpIsWindowFloating
#define TkpIsWindowFloating \
	(tkIntPlatStubsPtr->tkpIsWindowFloating) /* 66 */
#endif
#endif /* MAC_TCL */
#ifdef MAC_OSX_TK
#ifndef TkGenerateActivateEvents
#define TkGenerateActivateEvents \
	(tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 0 */
#endif
/* Slot 1 is reserved */
/* Slot 2 is reserved */
#ifndef TkPointerDeadWindow
#define TkPointerDeadWindow \
	(tkIntPlatStubsPtr->tkPointerDeadWindow) /* 3 */
#endif
#ifndef TkpSetCapture
#define TkpSetCapture \
	(tkIntPlatStubsPtr->tkpSetCapture) /* 4 */
#endif
#ifndef TkpSetCursor
#define TkpSetCursor \
	(tkIntPlatStubsPtr->tkpSetCursor) /* 5 */
#endif
#ifndef TkpWmSetState
#define TkpWmSetState \
	(tkIntPlatStubsPtr->tkpWmSetState) /* 6 */
#endif
#ifndef TkAboutDlg
#define TkAboutDlg \
	(tkIntPlatStubsPtr->tkAboutDlg) /* 7 */
#endif
#ifndef TkMacOSXButtonKeyState
#define TkMacOSXButtonKeyState \
	(tkIntPlatStubsPtr->tkMacOSXButtonKeyState) /* 8 */
#endif
#ifndef TkMacOSXClearMenubarActive
#define TkMacOSXClearMenubarActive \
	(tkIntPlatStubsPtr->tkMacOSXClearMenubarActive) /* 9 */
#endif
#ifndef TkMacOSXDispatchMenuEvent
#define TkMacOSXDispatchMenuEvent \
	(tkIntPlatStubsPtr->tkMacOSXDispatchMenuEvent) /* 10 */
#endif
#ifndef TkMacOSXInstallCursor
#define TkMacOSXInstallCursor \
	(tkIntPlatStubsPtr->tkMacOSXInstallCursor) /* 11 */
#endif
#ifndef TkMacOSXHandleTearoffMenu
#define TkMacOSXHandleTearoffMenu \
	(tkIntPlatStubsPtr->tkMacOSXHandleTearoffMenu) /* 12 */
#endif
/* Slot 13 is reserved */
#ifndef TkMacOSXDoHLEvent
#define TkMacOSXDoHLEvent \
	(tkIntPlatStubsPtr->tkMacOSXDoHLEvent) /* 14 */
#endif
/* Slot 15 is reserved */
#ifndef TkMacOSXGetXWindow
#define TkMacOSXGetXWindow \
	(tkIntPlatStubsPtr->tkMacOSXGetXWindow) /* 16 */
#endif
#ifndef TkMacOSXGrowToplevel
#define TkMacOSXGrowToplevel \
	(tkIntPlatStubsPtr->tkMacOSXGrowToplevel) /* 17 */
#endif
#ifndef TkMacOSXHandleMenuSelect
#define TkMacOSXHandleMenuSelect \
	(tkIntPlatStubsPtr->tkMacOSXHandleMenuSelect) /* 18 */
#endif
/* Slot 19 is reserved */
/* Slot 20 is reserved */
#ifndef TkMacOSXInvalidateWindow
#define TkMacOSXInvalidateWindow \
	(tkIntPlatStubsPtr->tkMacOSXInvalidateWindow) /* 21 */
#endif
#ifndef TkMacOSXIsCharacterMissing
#define TkMacOSXIsCharacterMissing \
	(tkIntPlatStubsPtr->tkMacOSXIsCharacterMissing) /* 22 */
#endif
#ifndef TkMacOSXMakeRealWindowExist
#define TkMacOSXMakeRealWindowExist \
	(tkIntPlatStubsPtr->tkMacOSXMakeRealWindowExist) /* 23 */
#endif
#ifndef TkMacOSXMakeStippleMap
#define TkMacOSXMakeStippleMap \
	(tkIntPlatStubsPtr->tkMacOSXMakeStippleMap) /* 24 */
#endif
#ifndef TkMacOSXMenuClick
#define TkMacOSXMenuClick \
	(tkIntPlatStubsPtr->tkMacOSXMenuClick) /* 25 */
#endif
#ifndef TkMacOSXRegisterOffScreenWindow
#define TkMacOSXRegisterOffScreenWindow \
	(tkIntPlatStubsPtr->tkMacOSXRegisterOffScreenWindow) /* 26 */
#endif
#ifndef TkMacOSXResizable
#define TkMacOSXResizable \
	(tkIntPlatStubsPtr->tkMacOSXResizable) /* 27 */
#endif
#ifndef TkMacOSXSetHelpMenuItemCount
#define TkMacOSXSetHelpMenuItemCount \
	(tkIntPlatStubsPtr->tkMacOSXSetHelpMenuItemCount) /* 28 */
#endif
#ifndef TkMacOSXSetScrollbarGrow
#define TkMacOSXSetScrollbarGrow \
	(tkIntPlatStubsPtr->tkMacOSXSetScrollbarGrow) /* 29 */
#endif
#ifndef TkMacOSXSetUpClippingRgn
#define TkMacOSXSetUpClippingRgn \
	(tkIntPlatStubsPtr->tkMacOSXSetUpClippingRgn) /* 30 */
#endif
#ifndef TkMacOSXSetUpGraphicsPort
#define TkMacOSXSetUpGraphicsPort \
	(tkIntPlatStubsPtr->tkMacOSXSetUpGraphicsPort) /* 31 */
#endif
#ifndef TkMacOSXUpdateClipRgn
#define TkMacOSXUpdateClipRgn \
	(tkIntPlatStubsPtr->tkMacOSXUpdateClipRgn) /* 32 */
#endif
#ifndef TkMacOSXUnregisterMacWindow
#define TkMacOSXUnregisterMacWindow \
	(tkIntPlatStubsPtr->tkMacOSXUnregisterMacWindow) /* 33 */
#endif
#ifndef TkMacOSXUseMenuID
#define TkMacOSXUseMenuID \
	(tkIntPlatStubsPtr->tkMacOSXUseMenuID) /* 34 */
#endif
#ifndef TkMacOSXVisableClipRgn
#define TkMacOSXVisableClipRgn \
	(tkIntPlatStubsPtr->tkMacOSXVisableClipRgn) /* 35 */
#endif
#ifndef TkMacOSXWinBounds
#define TkMacOSXWinBounds \
	(tkIntPlatStubsPtr->tkMacOSXWinBounds) /* 36 */
#endif
#ifndef TkMacOSXWindowOffset
#define TkMacOSXWindowOffset \
	(tkIntPlatStubsPtr->tkMacOSXWindowOffset) /* 37 */
#endif
#ifndef TkSetMacColor
#define TkSetMacColor \
	(tkIntPlatStubsPtr->tkSetMacColor) /* 38 */
#endif
#ifndef TkSetWMName
#define TkSetWMName \
	(tkIntPlatStubsPtr->tkSetWMName) /* 39 */
#endif
#ifndef TkSuspendClipboard
#define TkSuspendClipboard \
	(tkIntPlatStubsPtr->tkSuspendClipboard) /* 40 */
#endif
#ifndef TkMacOSXZoomToplevel
#define TkMacOSXZoomToplevel \
	(tkIntPlatStubsPtr->tkMacOSXZoomToplevel) /* 41 */
#endif
#ifndef Tk_TopCoordsToWindow
#define Tk_TopCoordsToWindow \
	(tkIntPlatStubsPtr->tk_TopCoordsToWindow) /* 42 */
#endif
#ifndef TkMacOSXContainerId
#define TkMacOSXContainerId \
	(tkIntPlatStubsPtr->tkMacOSXContainerId) /* 43 */
#endif
#ifndef TkMacOSXGetHostToplevel
#define TkMacOSXGetHostToplevel \
	(tkIntPlatStubsPtr->tkMacOSXGetHostToplevel) /* 44 */
#endif
#ifndef TkMacOSXPreprocessMenu
#define TkMacOSXPreprocessMenu \
	(tkIntPlatStubsPtr->tkMacOSXPreprocessMenu) /* 45 */
#endif
#ifndef TkpIsWindowFloating
#define TkpIsWindowFloating \
	(tkIntPlatStubsPtr->tkpIsWindowFloating) /* 46 */
#endif
#ifndef TkMacOSXGetCapture
#define TkMacOSXGetCapture \
	(tkIntPlatStubsPtr->tkMacOSXGetCapture) /* 47 */
#endif
/* Slot 48 is reserved */
#ifndef TkGetTransientMaster
#define TkGetTransientMaster \
	(tkIntPlatStubsPtr->tkGetTransientMaster) /* 49 */
#endif
#ifndef TkGenerateButtonEvent
#define TkGenerateButtonEvent \
	(tkIntPlatStubsPtr->tkGenerateButtonEvent) /* 50 */
#endif
#ifndef TkGenWMDestroyEvent
#define TkGenWMDestroyEvent \
	(tkIntPlatStubsPtr->tkGenWMDestroyEvent) /* 51 */
#endif
/* Slot 52 is reserved */
#ifndef TkpGetMS
#define TkpGetMS \
	(tkIntPlatStubsPtr->tkpGetMS) /* 53 */
#endif
#endif /* MAC_OSX_TK */
#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) /* X11 */
#ifndef TkCreateXEventSource
#define TkCreateXEventSource \
	(tkIntPlatStubsPtr->tkCreateXEventSource) /* 0 */
#endif
#ifndef TkFreeWindowId
#define TkFreeWindowId \
	(tkIntPlatStubsPtr->tkFreeWindowId) /* 1 */
#endif
#ifndef TkInitXId
#define TkInitXId \
	(tkIntPlatStubsPtr->tkInitXId) /* 2 */
#endif
#ifndef TkpCmapStressed
#define TkpCmapStressed \
	(tkIntPlatStubsPtr->tkpCmapStressed) /* 3 */
#endif
#ifndef TkpSync
#define TkpSync \
	(tkIntPlatStubsPtr->tkpSync) /* 4 */
#endif
#ifndef TkUnixContainerId
#define TkUnixContainerId \
	(tkIntPlatStubsPtr->tkUnixContainerId) /* 5 */
#endif
#ifndef TkUnixDoOneXEvent
#define TkUnixDoOneXEvent \
	(tkIntPlatStubsPtr->tkUnixDoOneXEvent) /* 6 */
#endif
#ifndef TkUnixSetMenubar
#define TkUnixSetMenubar \
	(tkIntPlatStubsPtr->tkUnixSetMenubar) /* 7 */
#endif
#ifndef TkpScanWindowId
#define TkpScanWindowId \
	(tkIntPlatStubsPtr->tkpScanWindowId) /* 8 */
#endif
#ifndef TkWmCleanup
#define TkWmCleanup \
	(tkIntPlatStubsPtr->tkWmCleanup) /* 9 */
#endif
#ifndef TkSendCleanup
#define TkSendCleanup \
	(tkIntPlatStubsPtr->tkSendCleanup) /* 10 */
#endif
#ifndef TkFreeXId
#define TkFreeXId \
	(tkIntPlatStubsPtr->tkFreeXId) /* 11 */
#endif
#ifndef TkpWmSetState
#define TkpWmSetState \
	(tkIntPlatStubsPtr->tkpWmSetState) /* 12 */
#endif
#endif /* X11 */

#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */

/* !END!: Do not edit above this line. */

#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT

#endif /* _TKINTPLATDECLS */