summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-06 16:48:15 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-06 16:48:15 (GMT)
commit138756ef22142304a7a02b2f780b3bed1c4c8133 (patch)
tree556ee517fadc06d24af172a46d68cb8014867e06
parent7d067bd2843eae581111d0f3d73fadbff4783c6f (diff)
downloadtk-138756ef22142304a7a02b2f780b3bed1c4c8133.zip
tk-138756ef22142304a7a02b2f780b3bed1c4c8133.tar.gz
tk-138756ef22142304a7a02b2f780b3bed1c4c8133.tar.bz2
Use more Tcl_CmdDeleteProc/Tcl_ObjCmdProc in stead of full function signatures
-rw-r--r--macosx/tkMacOSXDialog.c12
-rw-r--r--unix/tkUnixButton.c4
-rw-r--r--unix/tkUnixDraw.c4
-rw-r--r--unix/tkUnixEmbed.c20
-rw-r--r--unix/tkUnixEvent.c16
-rw-r--r--unix/tkUnixMenubu.c2
-rw-r--r--unix/tkUnixRFont.c6
-rw-r--r--unix/tkUnixScale.c2
-rw-r--r--unix/tkUnixScrlbr.c2
-rw-r--r--unix/tkUnixSend.c17
-rwxr-xr-xunix/tkUnixSysNotify.c4
-rw-r--r--unix/tkUnixSysTray.c8
12 files changed, 44 insertions, 53 deletions
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index ca30267..7469073 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -1588,15 +1588,9 @@ enum FontchooserEvent {
static void FontchooserEvent(int kind);
static Tcl_Obj * FontchooserCget(FontchooserData *fcdPtr,
int optionIndex);
-static int FontchooserConfigureCmd(void *clientData,
- Tcl_Interp *interp, Tcl_Size objc,
- Tcl_Obj *const objv[]);
-static int FontchooserShowCmd(void *clientData,
- Tcl_Interp *interp, Tcl_Size objc,
- Tcl_Obj *const objv[]);
-static int FontchooserHideCmd(void *clientData,
- Tcl_Interp *interp, Tcl_Size objc,
- Tcl_Obj *const objv[]);
+static Tcl_ObjCmdProc2 FontchooserConfigureCmd;
+static Tcl_ObjCmdProc2 FontchooserShowCmd;
+static Tcl_ObjCmdProc2 FontchooserHideCmd;
static void FontchooserParentEventHandler(void *clientData,
XEvent *eventPtr);
static void DeleteFontchooserData(void *clientData,
diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c
index 3b58348..8e4ed96 100644
--- a/unix/tkUnixButton.c
+++ b/unix/tkUnixButton.c
@@ -147,7 +147,7 @@ ColorToStr(
static void
ImageChanged( /* to be passed to Tk_GetImage() */
- ClientData clientData,
+ void *clientData,
int x, int y, int width, int height,
int imageWidth, int imageHeight)
{
@@ -432,7 +432,7 @@ ShiftByOffset(
void
TkpDisplayButton(
- ClientData clientData) /* Information about widget. */
+ void *clientData) /* Information about widget. */
{
TkButton *butPtr = (TkButton *)clientData;
GC gc;
diff --git a/unix/tkUnixDraw.c b/unix/tkUnixDraw.c
index 813df79..fe1dea0 100644
--- a/unix/tkUnixDraw.c
+++ b/unix/tkUnixDraw.c
@@ -64,7 +64,7 @@ TkScrollWindow(
Region damageRgn) /* Region to accumulate damage in. */
{
Tk_RestrictProc *prevProc;
- ClientData prevArg;
+ void *prevArg;
ScrollInfo info;
XCopyArea(Tk_Display(tkwin), Tk_WindowId(tkwin), Tk_WindowId(tkwin), gc,
@@ -119,7 +119,7 @@ TkScrollWindow(
static Tk_RestrictAction
ScrollRestrictProc(
- ClientData arg,
+ void *arg,
XEvent *eventPtr)
{
ScrollInfo *info = (ScrollInfo *) arg;
diff --git a/unix/tkUnixEmbed.c b/unix/tkUnixEmbed.c
index e36ce35..6215671 100644
--- a/unix/tkUnixEmbed.c
+++ b/unix/tkUnixEmbed.c
@@ -53,18 +53,18 @@ static Tcl_ThreadDataKey dataKey;
* Prototypes for static functions defined in this file:
*/
-static void ContainerEventProc(ClientData clientData,
+static void ContainerEventProc(void *clientData,
XEvent *eventPtr);
-static void EmbeddedEventProc(ClientData clientData,
+static void EmbeddedEventProc(void *clientData,
XEvent *eventPtr);
-static int EmbedErrorProc(ClientData clientData,
+static int EmbedErrorProc(void *clientData,
XErrorEvent *errEventPtr);
-static void EmbedFocusProc(ClientData clientData,
+static void EmbedFocusProc(void *clientData,
XEvent *eventPtr);
static void EmbedGeometryRequest(Container *containerPtr,
int width, int height);
static void EmbedSendConfigure(Container *containerPtr);
-static void EmbedStructureProc(ClientData clientData,
+static void EmbedStructureProc(void *clientData,
XEvent *eventPtr);
static void EmbedWindowDeleted(TkWindow *winPtr);
@@ -329,7 +329,7 @@ Tk_MakeContainer(
static int
EmbedErrorProc(
- ClientData clientData, /* Points to integer to set. */
+ void *clientData, /* Points to integer to set. */
XErrorEvent *errEventPtr) /* Points to information about error (not
* used). */
{
@@ -361,7 +361,7 @@ EmbedErrorProc(
static void
EmbeddedEventProc(
- ClientData clientData, /* Token for container window. */
+ void *clientData, /* Token for container window. */
XEvent *eventPtr) /* ResizeRequest event. */
{
TkWindow *winPtr = (TkWindow *)clientData;
@@ -393,7 +393,7 @@ EmbeddedEventProc(
static void
ContainerEventProc(
- ClientData clientData, /* Token for container window. */
+ void *clientData, /* Token for container window. */
XEvent *eventPtr) /* ResizeRequest event. */
{
TkWindow *winPtr = (TkWindow *)clientData;
@@ -498,7 +498,7 @@ ContainerEventProc(
static void
EmbedStructureProc(
- ClientData clientData, /* Token for container window. */
+ void *clientData, /* Token for container window. */
XEvent *eventPtr) /* ResizeRequest event. */
{
Container *containerPtr = (Container *)clientData;
@@ -553,7 +553,7 @@ EmbedStructureProc(
static void
EmbedFocusProc(
- ClientData clientData, /* Token for container window. */
+ void *clientData, /* Token for container window. */
XEvent *eventPtr) /* ResizeRequest event. */
{
Container *containerPtr = (Container *)clientData;
diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c
index e289962..5e2c0fa 100644
--- a/unix/tkUnixEvent.c
+++ b/unix/tkUnixEvent.c
@@ -31,10 +31,10 @@ static Tcl_ThreadDataKey dataKey;
* Prototypes for functions that are referenced only in this file:
*/
-static void DisplayCheckProc(ClientData clientData, int flags);
-static void DisplayExitHandler(ClientData clientData);
-static void DisplayFileProc(ClientData clientData, int flags);
-static void DisplaySetupProc(ClientData clientData, int flags);
+static void DisplayCheckProc(void *clientData, int flags);
+static void DisplayExitHandler(void *clientData);
+static void DisplayFileProc(void *clientData, int flags);
+static void DisplaySetupProc(void *clientData, int flags);
static void TransferXEventsToTcl(Display *display);
#ifdef TK_USE_INPUT_METHODS
static void InstantiateIMCallback(Display *, XPointer client_data, XPointer call_data);
@@ -91,7 +91,7 @@ TkCreateXEventSource(void)
static void
DisplayExitHandler(
- ClientData dummy) /* Not used. */
+ void *dummy) /* Not used. */
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
@@ -299,7 +299,7 @@ TkClipCleanup(
static void
DisplaySetupProc(
- ClientData dummy, /* Not used. */
+ void *dummy, /* Not used. */
int flags)
{
TkDisplay *dispPtr;
@@ -434,7 +434,7 @@ TransferXEventsToTcl(
static void
DisplayCheckProc(
- ClientData dummy, /* Not used. */
+ void *dummy, /* Not used. */
int flags)
{
TkDisplay *dispPtr;
@@ -470,7 +470,7 @@ DisplayCheckProc(
static void
DisplayFileProc(
- ClientData clientData, /* The display pointer. */
+ void *clientData, /* The display pointer. */
int flags) /* Should be TCL_READABLE. */
{
TkDisplay *dispPtr = (TkDisplay *)clientData;
diff --git a/unix/tkUnixMenubu.c b/unix/tkUnixMenubu.c
index 7795ba6..dd67639 100644
--- a/unix/tkUnixMenubu.c
+++ b/unix/tkUnixMenubu.c
@@ -56,7 +56,7 @@ TkpCreateMenuButton(
void
TkpDisplayMenuButton(
- ClientData clientData) /* Information about widget. */
+ void *clientData) /* Information about widget. */
{
TkMenuButton *mbPtr = (TkMenuButton *)clientData;
GC gc;
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c
index 4ea454d..b703fc2 100644
--- a/unix/tkUnixRFont.c
+++ b/unix/tkUnixRFont.c
@@ -274,7 +274,7 @@ FinishedWithFont(
static int
InitFontErrorProc(
- ClientData clientData,
+ void *clientData,
TCL_UNUSED(XErrorEvent *))
{
int *errorFlagPtr = (int *)clientData;
@@ -349,7 +349,7 @@ InitFont(
errorFlag = 0;
handler = Tk_CreateErrorHandler(Tk_Display(tkwin),
- -1, -1, -1, InitFontErrorProc, (ClientData) &errorFlag);
+ -1, -1, -1, InitFontErrorProc, (void *) &errorFlag);
ftFont = GetFont(fontPtr, 0, 0.0);
if ((ftFont == NULL) || errorFlag) {
Tk_DeleteErrorHandler(handler);
@@ -391,7 +391,7 @@ InitFont(
fPtr->underlinePos = fPtr->fm.descent / 2;
handler = Tk_CreateErrorHandler(Tk_Display(tkwin),
- -1, -1, -1, InitFontErrorProc, (ClientData) &errorFlag);
+ -1, -1, -1, InitFontErrorProc, (void *) &errorFlag);
errorFlag = 0;
Tk_MeasureChars((Tk_Font) fPtr, "I", 1, -1, 0, &iWidth);
Tk_DeleteErrorHandler(handler);
diff --git a/unix/tkUnixScale.c b/unix/tkUnixScale.c
index baec088..6e73268 100644
--- a/unix/tkUnixScale.c
+++ b/unix/tkUnixScale.c
@@ -544,7 +544,7 @@ DisplayHorizontalValue(
void
TkpDisplayScale(
- ClientData clientData) /* Widget record for scale. */
+ void *clientData) /* Widget record for scale. */
{
TkScale *scalePtr = (TkScale *)clientData;
Tk_Window tkwin = scalePtr->tkwin;
diff --git a/unix/tkUnixScrlbr.c b/unix/tkUnixScrlbr.c
index 5a1896f..9660718 100644
--- a/unix/tkUnixScrlbr.c
+++ b/unix/tkUnixScrlbr.c
@@ -95,7 +95,7 @@ TkpCreateScrollbar(
void
TkpDisplayScrollbar(
- ClientData clientData) /* Information about window. */
+ void *clientData) /* Information about window. */
{
TkScrollbar *scrollPtr = (TkScrollbar *)clientData;
Tk_Window tkwin = scrollPtr->tkwin;
diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c
index 397cd50..32ba61c 100644
--- a/unix/tkUnixSend.c
+++ b/unix/tkUnixSend.c
@@ -203,12 +203,12 @@ static struct {
* Forward declarations for functions defined later in this file:
*/
-static int AppendErrorProc(ClientData clientData,
+static int AppendErrorProc(void *clientData,
XErrorEvent *errorPtr);
static void AppendPropCarefully(Display *display,
Window window, Atom property, char *value,
int length, PendingCommand *pendingPtr);
-static void DeleteProc(ClientData clientData);
+static Tcl_CmdDeleteProc DeleteProc;
static void RegAddName(NameRegistry *regPtr,
const char *name, Window commWindow);
static void RegClose(NameRegistry *regPtr);
@@ -216,7 +216,7 @@ static void RegDeleteName(NameRegistry *regPtr, const char *name);
static Window RegFindName(NameRegistry *regPtr, const char *name);
static NameRegistry * RegOpen(Tcl_Interp *interp,
TkDisplay *dispPtr, int lock);
-static void SendEventProc(ClientData clientData, XEvent *eventPtr);
+static void SendEventProc(void *clientData, XEvent *eventPtr);
static int SendInit(Tcl_Interp *interp, TkDisplay *dispPtr);
static Tk_RestrictProc SendRestrictProc;
static int ServerSecure(TkDisplay *dispPtr);
@@ -963,7 +963,7 @@ Tk_SendObjCmd(
RegisteredInterp *riPtr;
int result, async, i, firstArg, index;
Tk_RestrictProc *prevProc;
- ClientData prevArg;
+ void *prevArg;
TkDisplay *dispPtr;
Tcl_Time timeout;
NameRegistry *regPtr;
@@ -1427,7 +1427,7 @@ SendInit(
static void
SendEventProc(
- ClientData clientData, /* Display information. */
+ void *clientData, /* Display information. */
XEvent *eventPtr) /* Information about event. */
{
TkDisplay *dispPtr = (TkDisplay *)clientData;
@@ -1787,7 +1787,7 @@ AppendPropCarefully(
static int
AppendErrorProc(
- ClientData clientData, /* Command to mark complete, or NULL. */
+ void *clientData, /* Command to mark complete, or NULL. */
TCL_UNUSED(XErrorEvent *)) /* Information about error. */
{
PendingCommand *pendingPtr = (PendingCommand *)clientData;
@@ -1836,8 +1836,7 @@ AppendErrorProc(
static void
DeleteProc(
- ClientData clientData) /* Info about registration, passed as
- * ClientData. */
+ void *clientData) /* Info about registration */
{
RegisteredInterp *riPtr = (RegisteredInterp *)clientData;
RegisteredInterp *riPtr2;
@@ -1965,7 +1964,7 @@ UpdateCommWindow(
int
TkpTestsendCmd(
- ClientData clientData, /* Main window for application. */
+ void *clientData, /* Main window for application. */
Tcl_Interp *interp, /* Current interpreter. */
Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings. */
diff --git a/unix/tkUnixSysNotify.c b/unix/tkUnixSysNotify.c
index 52f585b..b9e635a 100755
--- a/unix/tkUnixSysNotify.c
+++ b/unix/tkUnixSysNotify.c
@@ -46,8 +46,8 @@ TCL_DECLARE_MUTEX(ln_mutex);
* Forward declarations for procedures defined in this file.
*/
-static void SysNotifyDeleteCmd(void *);
-static int SysNotifyCmd(void *, Tcl_Interp *, int, Tcl_Obj * const*);
+static Tcl_CmdDeleteProc SysNotifyDeleteCmd;
+static Tcl_ObjCmdProc SysNotifyCmd;
/*
*----------------------------------------------------------------------
diff --git a/unix/tkUnixSysTray.c b/unix/tkUnixSysTray.c
index 1a6989f..e4fc493 100644
--- a/unix/tkUnixSysTray.c
+++ b/unix/tkUnixSysTray.c
@@ -198,10 +198,8 @@ typedef struct {
* Forward declarations for procedures defined in this file.
*/
-static int TrayIconCreateCmd(void *cd, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
-static int TrayIconObjectCmd(void *cd, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
+static Tcl_ObjCmdProc TrayIconCreateCmd;
+static Tcl_ObjCmdProc TrayIconObjectCmd;
static int TrayIconConfigureMethod(DockIcon *icon, Tcl_Interp* interp,
int objc, Tcl_Obj *const objv[],
int addflags);
@@ -210,7 +208,7 @@ static int PostBalloon(DockIcon* icon, const char * utf8msg,
static void CancelBalloon(DockIcon* icon, int msgid);
static int QueryTrayOrientation(DockIcon* icon);
-static void TrayIconDeleteProc(void *cd );
+static Tcl_CmdDeleteProc TrayIconDeleteProc;
static Atom DockSelectionAtomFor(Tk_Window tkwin);
static void DockToManager(DockIcon *icon);
static void CreateTrayIconWindow(DockIcon *icon);