Import Tk 8.6.12

This commit is contained in:
Steve Dower
2021-11-08 17:28:57 +00:00
parent 070b8750b0
commit c6710de848
290 changed files with 5626 additions and 3660 deletions

View File

@@ -4,7 +4,7 @@
* This file implements the Windows specific portion of the scrollbar
* widget.
*
* Copyright (c) 1996 by Sun Microsystems, Inc.
* Copyright (c) 1996 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -82,7 +82,7 @@ const Tk_ClassProcs tkpScrollbarProcs = {
static void
WinScrollbarEventProc(ClientData clientData, XEvent *eventPtr)
{
WinScrollbar *scrollPtr = clientData;
WinScrollbar *scrollPtr = (WinScrollbar *)clientData;
if (eventPtr->type == ButtonPress) {
ModalLoop(scrollPtr, eventPtr);
@@ -121,7 +121,7 @@ TkpCreateScrollbar(
Tcl_MutexUnlock(&winScrlbrMutex);
}
scrollPtr = ckalloc(sizeof(WinScrollbar));
scrollPtr = (WinScrollbar *)ckalloc(sizeof(WinScrollbar));
scrollPtr->winFlags = 0;
scrollPtr->hwnd = NULL;
@@ -275,7 +275,7 @@ void
TkpDisplayScrollbar(
ClientData clientData) /* Information about window. */
{
WinScrollbar *scrollPtr = (WinScrollbar *) clientData;
WinScrollbar *scrollPtr = (WinScrollbar *)clientData;
Tk_Window tkwin = scrollPtr->info.tkwin;
scrollPtr->info.flags &= ~REDRAW_PENDING;
@@ -295,7 +295,7 @@ TkpDisplayScrollbar(
DestroyWindow(hwnd);
CreateProc(tkwin, Tk_WindowId(Tk_Parent(tkwin)),
(ClientData) scrollPtr);
scrollPtr);
} else {
UpdateScrollbar(scrollPtr);
}
@@ -383,7 +383,7 @@ UpdateScrollbarMetrics(void)
void
TkpComputeScrollbarGeometry(
register TkScrollbar *scrollPtr)
TkScrollbar *scrollPtr)
/* Scrollbar whose geometry may have
* changed. */
{
@@ -591,7 +591,7 @@ ScrollbarProc(
void
TkpConfigureScrollbar(
register TkScrollbar *scrollPtr)
TCL_UNUSED(TkScrollbar *))
/* Information about widget; may or may not
* already have values for some fields. */
{
@@ -617,7 +617,7 @@ ModalLoop(
int oldMode;
if (scrollPtr->hwnd) {
Tcl_Preserve((ClientData)scrollPtr);
Tcl_Preserve(scrollPtr);
scrollPtr->winFlags |= IN_MODAL_LOOP;
oldMode = Tcl_SetServiceMode(TCL_SERVICE_ALL);
TkWinResendEvent(scrollPtr->oldProc, scrollPtr->hwnd, eventPtr);
@@ -626,7 +626,7 @@ ModalLoop(
if (scrollPtr->hwnd && scrollPtr->winFlags & ALREADY_DEAD) {
DestroyWindow(scrollPtr->hwnd);
}
Tcl_Release((ClientData)scrollPtr);
Tcl_Release(scrollPtr);
}
}
@@ -650,7 +650,7 @@ ModalLoop(
int
TkpScrollbarPosition(
register TkScrollbar *scrollPtr,
TkScrollbar *scrollPtr,
/* Scrollbar widget record. */
int x, int y) /* Coordinates within scrollPtr's window. */
{