summaryrefslogtreecommitdiffstats
path: root/generic/tkPanedWindow.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-05-08 19:59:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-05-08 19:59:01 (GMT)
commit8d9624ebf7926e1d66bb1c3e6301e3b6877e3bba (patch)
treeb5a708612b4a2faad5c57f6bac43f0bec0c3ec73 /generic/tkPanedWindow.c
parentd6a118648873f0fe4df053d55f5394762b547b6a (diff)
parentb6b0977b82acc2b5e001aa7ba67e1b504757995c (diff)
downloadtk-8d9624ebf7926e1d66bb1c3e6301e3b6877e3bba.zip
tk-8d9624ebf7926e1d66bb1c3e6301e3b6877e3bba.tar.gz
tk-8d9624ebf7926e1d66bb1c3e6301e3b6877e3bba.tar.bz2
Merge 8.6
Diffstat (limited to 'generic/tkPanedWindow.c')
-rw-r--r--generic/tkPanedWindow.c70
1 files changed, 36 insertions, 34 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index 8bc7fa1..093040b 100644
--- a/generic/tkPanedWindow.c
+++ b/generic/tkPanedWindow.c
@@ -183,33 +183,33 @@ typedef struct PanedWindow {
* Forward declarations for functions defined later in this file:
*/
-int Tk_PanedWindowObjCmd(ClientData clientData,
+int Tk_PanedWindowObjCmd(void *clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
-static void PanedWindowCmdDeletedProc(ClientData clientData);
+static void PanedWindowCmdDeletedProc(void *clientData);
static int ConfigurePanedWindow(Tcl_Interp *interp,
PanedWindow *pwPtr, int objc,
Tcl_Obj *const objv[]);
static void DestroyPanedWindow(PanedWindow *pwPtr);
-static void DisplayPanedWindow(ClientData clientData);
-static void PanedWindowEventProc(ClientData clientData,
+static void DisplayPanedWindow(void *clientData);
+static void PanedWindowEventProc(void *clientData,
XEvent *eventPtr);
-static void ProxyWindowEventProc(ClientData clientData,
+static void ProxyWindowEventProc(void *clientData,
XEvent *eventPtr);
-static void DisplayProxyWindow(ClientData clientData);
-static void PanedWindowWorldChanged(ClientData instanceData);
-static int PanedWindowWidgetObjCmd(ClientData clientData,
+static void DisplayProxyWindow(void *clientData);
+static void PanedWindowWorldChanged(void *instanceData);
+static int PanedWindowWidgetObjCmd(void *clientData,
Tcl_Interp *, int objc, Tcl_Obj * const objv[]);
-static void PanedWindowLostPaneProc(ClientData clientData,
+static void PanedWindowLostPaneProc(void *clientData,
Tk_Window tkwin);
-static void PanedWindowReqProc(ClientData clientData,
+static void PanedWindowReqProc(void *clientData,
Tk_Window tkwin);
-static void ArrangePanes(ClientData clientData);
+static void ArrangePanes(void *clientData);
static void Unlink(Pane *panePtr);
static Pane * GetPane(PanedWindow *pwPtr, Tk_Window tkwin);
static void GetFirstLastVisiblePane(PanedWindow *pwPtr,
int *firstPtr, int *lastPtr);
-static void PaneStructureProc(ClientData clientData,
+static void PaneStructureProc(void *clientData,
XEvent *eventPtr);
static int PanedWindowSashCommand(PanedWindow *pwPtr,
Tcl_Interp *interp, int objc,
@@ -221,15 +221,15 @@ static void ComputeGeometry(PanedWindow *pwPtr);
static int ConfigurePanes(PanedWindow *pwPtr,
Tcl_Interp *interp, int objc,
Tcl_Obj * const objv[]);
-static void DestroyOptionTables(ClientData clientData,
+static void DestroyOptionTables(void *clientData,
Tcl_Interp *interp);
-static int SetSticky(ClientData clientData, Tcl_Interp *interp,
+static int SetSticky(void *clientData, Tcl_Interp *interp,
Tk_Window tkwin, Tcl_Obj **value, char *recordPtr,
TkSizeT internalOffset, char *oldInternalPtr,
int flags);
-static Tcl_Obj * GetSticky(ClientData clientData, Tk_Window tkwin,
+static Tcl_Obj * GetSticky(void *clientData, Tk_Window tkwin,
char *recordPtr, TkSizeT internalOffset);
-static void RestoreSticky(ClientData clientData, Tk_Window tkwin,
+static void RestoreSticky(void *clientData, Tk_Window tkwin,
char *internalPtr, char *oldInternalPtr);
static void AdjustForSticky(int sticky, int cavityWidth,
int cavityHeight, int *xPtr, int *yPtr,
@@ -304,7 +304,7 @@ static const Tk_OptionSpec optionSpecs[] = {
TK_OPTION_ENUM_VAR, orientStrings, GEOMETRY},
{TK_OPTION_BORDER, "-proxybackground", "proxyBackground", "ProxyBackground",
0, TCL_INDEX_NONE, offsetof(PanedWindow, proxyBackground), TK_OPTION_NULL_OK,
- (ClientData) DEF_PANEDWINDOW_BG_MONO, 0},
+ (void *)DEF_PANEDWINDOW_BG_MONO, 0},
{TK_OPTION_PIXELS, "-proxyborderwidth", "proxyBorderWidth", "ProxyBorderWidth",
DEF_PANEDWINDOW_PROXYBORDER, offsetof(PanedWindow, proxyBorderWidthPtr),
offsetof(PanedWindow, proxyBorderWidth), 0, 0, GEOMETRY},
@@ -383,7 +383,7 @@ static const Tk_OptionSpec paneOptionSpecs[] = {
int
Tk_PanedWindowObjCmd(
- TCL_UNUSED(ClientData), /* NULL. */
+ TCL_UNUSED(void *), /* NULL. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj * const objv[]) /* Argument objects. */
@@ -530,7 +530,7 @@ Tk_PanedWindowObjCmd(
static int
PanedWindowWidgetObjCmd(
- ClientData clientData, /* Information about square widget. */
+ void *clientData, /* Information about square widget. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj * const objv[]) /* Argument objects. */
@@ -1016,9 +1016,11 @@ ConfigurePanes(
* If none of the existing panes have to be moved, just copy the old
* and append the new.
*/
- memcpy((void *)&(newPanes[0]), pwPtr->panes,
- sizeof(Pane *) * pwPtr->numPanes);
- memcpy((void *)&(newPanes[pwPtr->numPanes]), inserts,
+ if (pwPtr->numPanes) {
+ memcpy(newPanes, pwPtr->panes,
+ sizeof(Pane *) * pwPtr->numPanes);
+ }
+ memcpy(&newPanes[pwPtr->numPanes], inserts,
sizeof(Pane *) * numNewPanes);
} else {
/*
@@ -1037,7 +1039,7 @@ ConfigurePanes(
}
}
- memcpy((void *)&(newPanes[j]), inserts, sizeof(Pane *)*insertIndex);
+ memcpy(&newPanes[j], inserts, sizeof(Pane *)*insertIndex);
j += firstOptionArg - 2;
for (i = index; i < pwPtr->numPanes; i++) {
@@ -1290,7 +1292,7 @@ ConfigurePanedWindow(
static void
PanedWindowWorldChanged(
- ClientData instanceData) /* Information about the paned window. */
+ void *instanceData) /* Information about the paned window. */
{
XGCValues gcValues;
GC newGC;
@@ -1348,7 +1350,7 @@ PanedWindowWorldChanged(
static void
PanedWindowEventProc(
- ClientData clientData, /* Information about window. */
+ void *clientData, /* Information about window. */
XEvent *eventPtr) /* Information about event. */
{
PanedWindow *pwPtr = (PanedWindow *)clientData;
@@ -1402,7 +1404,7 @@ PanedWindowEventProc(
static void
PanedWindowCmdDeletedProc(
- ClientData clientData) /* Pointer to widget record for widget. */
+ void *clientData) /* Pointer to widget record for widget. */
{
PanedWindow *pwPtr = (PanedWindow *)clientData;
@@ -1439,7 +1441,7 @@ PanedWindowCmdDeletedProc(
static void
DisplayPanedWindow(
- ClientData clientData) /* Information about window. */
+ void *clientData) /* Information about window. */
{
PanedWindow *pwPtr = (PanedWindow *)clientData;
Pane *panePtr;
@@ -1624,7 +1626,7 @@ DestroyPanedWindow(
static void
PanedWindowReqProc(
- ClientData clientData, /* Paned window's information about window
+ void *clientData, /* Paned window's information about window
* that got new preferred geometry. */
TCL_UNUSED(Tk_Window)) /* Other Tk-related information about the
* window. */
@@ -1670,7 +1672,7 @@ PanedWindowReqProc(
static void
PanedWindowLostPaneProc(
- ClientData clientData, /* Grid structure for the pane that was
+ void *clientData, /* Grid structure for the pane that was
* stolen away. */
TCL_UNUSED(Tk_Window)) /* Tk's handle for the pane. */
{
@@ -1710,7 +1712,7 @@ PanedWindowLostPaneProc(
static void
ArrangePanes(
- ClientData clientData) /* Structure describing parent whose panes
+ void *clientData) /* Structure describing parent whose panes
* are to be re-layed out. */
{
PanedWindow *pwPtr = (PanedWindow *)clientData;
@@ -2156,7 +2158,7 @@ GetFirstLastVisiblePane(
static void
PaneStructureProc(
- ClientData clientData, /* Pointer to record describing window item. */
+ void *clientData, /* Pointer to record describing window item. */
XEvent *eventPtr) /* Describes what just happened. */
{
Pane *panePtr = (Pane *)clientData;
@@ -2368,7 +2370,7 @@ ComputeGeometry(
static void
DestroyOptionTables(
- ClientData clientData, /* Pointer to the OptionTables struct */
+ void *clientData, /* Pointer to the OptionTables struct */
TCL_UNUSED(Tcl_Interp *)) /* Pointer to the calling interp */
{
ckfree(clientData);
@@ -2751,7 +2753,7 @@ MoveSash(
static void
ProxyWindowEventProc(
- ClientData clientData, /* Information about window. */
+ void *clientData, /* Information about window. */
XEvent *eventPtr) /* Information about event. */
{
PanedWindow *pwPtr = (PanedWindow *)clientData;
@@ -2784,7 +2786,7 @@ ProxyWindowEventProc(
static void
DisplayProxyWindow(
- ClientData clientData) /* Information about window. */
+ void *clientData) /* Information about window. */
{
PanedWindow *pwPtr = (PanedWindow *)clientData;
Pixmap pixmap;