4 * Windows compatibility module: implements missing functions in Windows.
12 int strcasecmp(char * a, char *b)
15 if (*a== 0 && *b==0) {
24 if (tolower(*a)>tolower(*b)) {
27 if (tolower(*b)>tolower(*a)) {
36 *----------------------------------------------------------------------
40 * Change the stacking order of a window.
46 * Changes the stacking order of the specified window.
48 *----------------------------------------------------------------------
51 XLowerWindow(display, w)
55 HWND window = TkWinGetHWND(w);
58 SetWindowPos(window, HWND_TOPMOST, 0, 0, 0, 0,
59 SWP_NOMOVE | SWP_NOSIZE);
65 void XDrawPoints(display, d, gc, points, npoints, mode)
75 for (i=0; i<npoints; i++) {
76 XDrawLine(display, d, gc, points[i].x, points[i].y,
77 points[i].x, points[i].y);
86 * The following declaration is for the VC++ DLL entry point.
89 BOOL APIENTRY DllMain _ANSI_ARGS_((HINSTANCE hInst,
90 DWORD reason, LPVOID reserved));
94 /* cygwin32 requires an impure pointer variable, which must be
95 explicitly initialized when the DLL starts up. */
96 struct _reent *_impure_ptr;
97 extern struct _reent *_imp__reent_data;
99 /* END CYGNUS LOCAL */
102 *----------------------------------------------------------------------
106 * This wrapper function is used by Borland to invoke the
107 * initialization code for Tk. It simply calls the DllMain
116 *----------------------------------------------------------------------
120 DllEntryPoint(hInst, reason, reserved)
121 HINSTANCE hInst; /* Library instance handle. */
122 DWORD reason; /* Reason this function is being called. */
123 LPVOID reserved; /* Not used. */
125 return DllMain(hInst, reason, reserved);
129 *----------------------------------------------------------------------
136 * TRUE on sucess, FALSE on failure.
141 *----------------------------------------------------------------------
145 DllMain(hInstance, reason, reserved)
152 /* cygwin32 requires the impure data pointer to be initialized
153 when the DLL starts up. */
154 _impure_ptr = _imp__reent_data;
156 /* END CYGNUS LOCAL */
159 * If we are attaching to the DLL from a new process, tell Tk about
160 * the hInstance to use. If we are detaching then clean up any
161 * data structures related to this DLL.
168 #define DllExport __declspec( dllexport )
171 DllEntryPoint(hInst, reason, reserved)
172 HINSTANCE hInst; /* Library instance handle. */
173 DWORD reason; /* Reason this function is being called. */
174 LPVOID reserved; /* Not used. */
181 int TixPlatformInit(Tcl_Interp * interp)
183 return Tcl_GlobalEval(interp, "set tix(isWindows) 1");