Guilherme Polo | 3a409e9 | 2009-02-10 02:20:49 +0000 | [diff] [blame] | 1 | #ifndef TKINTER_H |
| 2 | #define TKINTER_H |
| 3 | |
| 4 | /* This header is used to share some macros between _tkinter.c and |
Guilherme Polo | 2d87e42 | 2009-04-10 22:19:09 +0000 | [diff] [blame] | 5 | * tkappinit.c. |
| 6 | * Be sure to include tk.h before including this header so |
Serhiy Storchaka | 3af7a38 | 2015-04-22 10:53:08 +0300 | [diff] [blame] | 7 | * TK_HEX_VERSION is properly defined. */ |
Guilherme Polo | 3a409e9 | 2009-02-10 02:20:49 +0000 | [diff] [blame] | 8 | |
| 9 | /* TK_RELEASE_LEVEL is always one of the following: |
Serhiy Storchaka | 3af7a38 | 2015-04-22 10:53:08 +0300 | [diff] [blame] | 10 | * TCL_ALPHA_RELEASE 0 |
Guilherme Polo | 3a409e9 | 2009-02-10 02:20:49 +0000 | [diff] [blame] | 11 | * TCL_BETA_RELEASE 1 |
| 12 | * TCL_FINAL_RELEASE 2 |
| 13 | */ |
Serhiy Storchaka | 3af7a38 | 2015-04-22 10:53:08 +0300 | [diff] [blame] | 14 | #define TK_HEX_VERSION ((TK_MAJOR_VERSION << 24) | \ |
| 15 | (TK_MINOR_VERSION << 16) | \ |
| 16 | (TK_RELEASE_LEVEL << 8) | \ |
| 17 | (TK_RELEASE_SERIAL << 0)) |
Guilherme Polo | 3a409e9 | 2009-02-10 02:20:49 +0000 | [diff] [blame] | 18 | |
| 19 | /* Protect Tk 8.4.13 and older from a deadlock that happens when trying |
| 20 | * to load tk after a failed attempt. */ |
Serhiy Storchaka | 3af7a38 | 2015-04-22 10:53:08 +0300 | [diff] [blame] | 21 | #if TK_HEX_VERSION < 0x0804020e |
Guilherme Polo | 3a409e9 | 2009-02-10 02:20:49 +0000 | [diff] [blame] | 22 | #define TKINTER_PROTECT_LOADTK |
| 23 | #define TKINTER_LOADTK_ERRMSG \ |
Serhiy Storchaka | 3af7a38 | 2015-04-22 10:53:08 +0300 | [diff] [blame] | 24 | "Calling Tk_Init again after a previous call failed might deadlock" |
Guilherme Polo | 3a409e9 | 2009-02-10 02:20:49 +0000 | [diff] [blame] | 25 | #endif |
| 26 | |
| 27 | #endif /* !TKINTER_H */ |