17db96d56Sopenharmony_ci#ifndef TKINTER_H 27db96d56Sopenharmony_ci#define TKINTER_H 37db96d56Sopenharmony_ci 47db96d56Sopenharmony_ci/* This header is used to share some macros between _tkinter.c and 57db96d56Sopenharmony_ci * tkappinit.c. 67db96d56Sopenharmony_ci * Be sure to include tk.h before including this header so 77db96d56Sopenharmony_ci * TK_HEX_VERSION is properly defined. */ 87db96d56Sopenharmony_ci 97db96d56Sopenharmony_ci/* TK_RELEASE_LEVEL is always one of the following: 107db96d56Sopenharmony_ci * TCL_ALPHA_RELEASE 0 117db96d56Sopenharmony_ci * TCL_BETA_RELEASE 1 127db96d56Sopenharmony_ci * TCL_FINAL_RELEASE 2 137db96d56Sopenharmony_ci */ 147db96d56Sopenharmony_ci#define TK_HEX_VERSION ((TK_MAJOR_VERSION << 24) | \ 157db96d56Sopenharmony_ci (TK_MINOR_VERSION << 16) | \ 167db96d56Sopenharmony_ci (TK_RELEASE_LEVEL << 8) | \ 177db96d56Sopenharmony_ci (TK_RELEASE_SERIAL << 0)) 187db96d56Sopenharmony_ci 197db96d56Sopenharmony_ci/* Protect Tk 8.4.13 and older from a deadlock that happens when trying 207db96d56Sopenharmony_ci * to load tk after a failed attempt. */ 217db96d56Sopenharmony_ci#if TK_HEX_VERSION < 0x0804020e 227db96d56Sopenharmony_ci#define TKINTER_PROTECT_LOADTK 237db96d56Sopenharmony_ci#define TKINTER_LOADTK_ERRMSG \ 247db96d56Sopenharmony_ci "Calling Tk_Init again after a previous call failed might deadlock" 257db96d56Sopenharmony_ci#endif 267db96d56Sopenharmony_ci 277db96d56Sopenharmony_ci#endif /* !TKINTER_H */ 28