summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-10-05 14:02:34 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-10-05 14:02:34 (GMT)
commit5e32543db5c3db71b03228ba36a5f883ac1597ac (patch)
tree87a0d8f7cfc8a47cf6f10fe7581a019f7666210b
parentb039eb53fbc3db111d347bbb70eb88bb0ff49354 (diff)
downloadtk-5e32543db5c3db71b03228ba36a5f883ac1597ac.zip
tk-5e32543db5c3db71b03228ba36a5f883ac1597ac.tar.gz
tk-5e32543db5c3db71b03228ba36a5f883ac1597ac.tar.bz2
Remove tclWinProcs, as it is no longer being used
-rw-r--r--ChangeLog6
-rw-r--r--win/tkWinInt.h26
-rw-r--r--win/tkWinTest.c26
-rw-r--r--win/tkWinX.c20
4 files changed, 12 insertions, 66 deletions
diff --git a/ChangeLog b/ChangeLog
index 43186f3..1533b99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-10-05 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tkWinInt.h: Remove tclWinProcs, as it is no longer
+ * generic/tkWinX.c: being used.
+ * generic/tkWinTest.c:
+
2011-09-27 Donal K. Fellows <dkf@users.sf.net>
* generic/tkImgPNG.c (WriteExtraChunks): [Bug 3405839]: Write the sDAT
diff --git a/win/tkWinInt.h b/win/tkWinInt.h
index ee979ca..cd4094d 100644
--- a/win/tkWinInt.h
+++ b/win/tkWinInt.h
@@ -171,32 +171,6 @@ MODULE_SCOPE HWND Tk_GetMenuHWND(Tk_Window tkwin);
MODULE_SCOPE HWND Tk_GetEmbeddedMenuHWND(Tk_Window tkwin);
/*
- * The following structure keeps track of whether we are using the multi-byte
- * or the wide-character interfaces to the operating system. System calls
- * should be made through the following function table.
- *
- * While some system calls need to use this A/W jump-table, it is not
- * necessary for all calls to do it, which is why you won't see this used
- * throughout the Tk code, but only in key areas. -- hobbs
- */
-
-typedef struct TkWinProcs {
- int useWide;
- LRESULT (WINAPI *callWindowProc)(WNDPROC, HWND, UINT, WPARAM, LPARAM);
- LRESULT (WINAPI *defWindowProc)(HWND, UINT, WPARAM, LPARAM);
- ATOM (WINAPI *registerClass)(const WNDCLASS *);
- BOOL (WINAPI *setWindowText)(HWND, LPCTSTR);
- HWND (WINAPI *createWindowEx)(DWORD, LPCTSTR, LPCTSTR, DWORD, int, int,
- int, int, HWND, HMENU, HINSTANCE, LPVOID);
- BOOL (WINAPI *insertMenu)(HMENU, UINT, UINT, UINT, LPCTSTR);
- int (WINAPI *getWindowText)(HWND, LPCTSTR, int);
- HWND (WINAPI *findWindow)(LPCTSTR, LPCTSTR);
- int (WINAPI *getClassName)(HWND, LPTSTR, int);
-} TkWinProcs;
-
-MODULE_SCOPE const TkWinProcs *const tkWinProcs;
-
-/*
* The following allows us to cache these encoding for multiple functions.
*/
diff --git a/win/tkWinTest.c b/win/tkWinTest.c
index f9cd350..d7d4d0f 100644
--- a/win/tkWinTest.c
+++ b/win/tkWinTest.c
@@ -40,24 +40,6 @@ static int TestwinlocaleObjCmd(ClientData clientData,
Tcl_Obj *const objv[]);
static Tk_GetSelProc SetSelectionResult;
-
-static const TkWinProcs unicodeProcs = {
- 1,
- (LRESULT (WINAPI *)(WNDPROC, HWND, UINT, WPARAM, LPARAM)) CallWindowProcW,
- (LRESULT (WINAPI *)(HWND, UINT, WPARAM, LPARAM)) DefWindowProcW,
- (ATOM (WINAPI *)(const WNDCLASS *)) RegisterClassW,
- (BOOL (WINAPI *)(HWND, LPCTSTR)) SetWindowTextW,
- (HWND (WINAPI *)(DWORD, LPCTSTR, LPCTSTR, DWORD, int, int, int, int,
- HWND, HMENU, HINSTANCE, LPVOID)) CreateWindowExW,
- (BOOL (WINAPI *)(HMENU, UINT, UINT, UINT, LPCTSTR)) InsertMenuW,
- (int (WINAPI *)(HWND, LPCTSTR, int)) GetWindowTextW,
- (HWND (WINAPI *)(LPCTSTR, LPCTSTR)) FindWindowW,
- (int (WINAPI *)(HWND, LPTSTR, int)) GetClassNameW,
-};
-
-static const TkWinProcs *const tkTestWinProcs = &unicodeProcs;
-
-
/*
*----------------------------------------------------------------------
*
@@ -128,7 +110,7 @@ AppendSystemError(
if (Tcl_IsShared(resultPtr)) {
resultPtr = Tcl_DuplicateObj(resultPtr);
}
- length = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM
+ length = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM
| FORMAT_MESSAGE_IGNORE_INSERTS
| FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, error,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (WCHAR *) wMsgPtrPtr,
@@ -417,7 +399,7 @@ TestfindwindowObjCmd(
class = Tcl_WinUtfToTChar(Tcl_GetString(objv[2]), -1, &classString);
}
- hwnd = tkTestWinProcs->findWindow(class, title);
+ hwnd = FindWindow(class, title);
if (hwnd == NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("failed to find window: ", -1));
@@ -465,7 +447,7 @@ TestgetwindowinfoObjCmd(
if (Tcl_GetLongFromObj(interp, objv[1], &hwnd) != TCL_OK)
return TCL_ERROR;
- cch = tkTestWinProcs->getClassName(INT2PTR(hwnd), buf, cchBuf);
+ cch = GetClassName(INT2PTR(hwnd), buf, cchBuf);
if (cch == 0) {
Tcl_SetResult(interp, "failed to get class name: ", TCL_STATIC);
AppendSystemError(interp, GetLastError());
@@ -482,7 +464,7 @@ TestgetwindowinfoObjCmd(
Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("id", 2),
Tcl_NewLongObj(GetWindowLongA(INT2PTR(hwnd), GWL_ID)));
- cch = tkTestWinProcs->getWindowText(INT2PTR(hwnd), (LPTSTR)buf, cchBuf);
+ cch = GetWindowText(INT2PTR(hwnd), (LPTSTR)buf, cchBuf);
textObj = Tcl_NewUnicodeObj((LPCWSTR)buf, cch);
Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("text", 4), textObj);
diff --git a/win/tkWinX.c b/win/tkWinX.c
index f74ac52..3a02d05 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -53,22 +53,6 @@
#define UNICODE_NOCHAR 0xFFFF
#endif
-static const TkWinProcs unicodeProcs = {
- 1,
- (LRESULT (WINAPI *)(WNDPROC, HWND, UINT, WPARAM, LPARAM)) CallWindowProcW,
- (LRESULT (WINAPI *)(HWND, UINT, WPARAM, LPARAM)) DefWindowProcW,
- (ATOM (WINAPI *)(const WNDCLASS *)) RegisterClassW,
- (BOOL (WINAPI *)(HWND, LPCTSTR)) SetWindowTextW,
- (HWND (WINAPI *)(DWORD, LPCTSTR, LPCTSTR, DWORD, int, int,
- int, int, HWND, HMENU, HINSTANCE, LPVOID)) CreateWindowExW,
- (BOOL (WINAPI *)(HMENU, UINT, UINT, UINT, LPCTSTR)) InsertMenuW,
- (int (WINAPI *)(HWND, LPCTSTR, int)) GetWindowTextW,
- (HWND (WINAPI *)(LPCTSTR, LPCTSTR)) FindWindowW,
- (int (WINAPI *)(HWND, LPTSTR, int)) GetClassNameW,
-};
-
-const TkWinProcs *const tkWinProcs = &unicodeProcs;
-
/*
* Declarations of static variables used in this file.
*/
@@ -1552,7 +1536,7 @@ HandleIMEComposition(
return 0;
}
- n = ImmGetCompositionStringW(hIMC, GCS_RESULTSTR, NULL, 0);
+ n = ImmGetCompositionString(hIMC, GCS_RESULTSTR, NULL, 0);
if (n > 0) {
char *buff = ckalloc(n);
@@ -1560,7 +1544,7 @@ HandleIMEComposition(
XEvent event;
int i;
- n = ImmGetCompositionStringW(hIMC, GCS_RESULTSTR, buff, (unsigned) n);
+ n = ImmGetCompositionString(hIMC, GCS_RESULTSTR, buff, (unsigned) n);
/*
* Set up the fields pertinent to key event.