diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-02-16 08:30:40 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-02-16 08:30:40 (GMT) |
commit | 48507f96a5df51bf8c2c599ccb132ccb2ea2bf12 (patch) | |
tree | 06cbe7447f7d501ae5be7be896302ea60aa01a2f /unix/tkUnixSysTray.c | |
parent | d315baab70f48cdc5618152774cecd5ac3b5fa50 (diff) | |
download | tk-48507f96a5df51bf8c2c599ccb132ccb2ea2bf12.zip tk-48507f96a5df51bf8c2c599ccb132ccb2ea2bf12.tar.gz tk-48507f96a5df51bf8c2c599ccb132ccb2ea2bf12.tar.bz2 |
Fix warning in tkEntry.c. More typecast cleanup
Diffstat (limited to 'unix/tkUnixSysTray.c')
-rw-r--r-- | unix/tkUnixSysTray.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/unix/tkUnixSysTray.c b/unix/tkUnixSysTray.c index 8372b6e..1a6989f 100644 --- a/unix/tkUnixSysTray.c +++ b/unix/tkUnixSysTray.c @@ -198,9 +198,9 @@ typedef struct { * Forward declarations for procedures defined in this file. */ -static int TrayIconCreateCmd(ClientData cd, Tcl_Interp *interp, +static int TrayIconCreateCmd(void *cd, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -static int TrayIconObjectCmd(ClientData cd, Tcl_Interp *interp, +static int TrayIconObjectCmd(void *cd, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int TrayIconConfigureMethod(DockIcon *icon, Tcl_Interp* interp, int objc, Tcl_Obj *const objv[], @@ -210,7 +210,7 @@ static int PostBalloon(DockIcon* icon, const char * utf8msg, static void CancelBalloon(DockIcon* icon, int msgid); static int QueryTrayOrientation(DockIcon* icon); -static void TrayIconDeleteProc(ClientData cd ); +static void TrayIconDeleteProc(void *cd ); static Atom DockSelectionAtomFor(Tk_Window tkwin); static void DockToManager(DockIcon *icon); static void CreateTrayIconWindow(DockIcon *icon); @@ -220,14 +220,14 @@ static void TrayIconForceImageChange(DockIcon* icon); static void TrayIconUpdate(DockIcon* icon, int mask); static void EventuallyRedrawIcon(DockIcon* icon); -static void DisplayIcon(ClientData cd); +static void DisplayIcon(void *cd); static void RetargetEvent(DockIcon *icon, XEvent *ev); -static void TrayIconEvent(ClientData cd, XEvent* ev); -static void UserIconEvent(ClientData cd, XEvent* ev); -static void TrayIconWrapperEvent(ClientData cd, XEvent* ev); -static int IconGenericHandler(ClientData cd, XEvent *ev); +static void TrayIconEvent(void *cd, XEvent* ev); +static void UserIconEvent(void *cd, XEvent* ev); +static void TrayIconWrapperEvent(void *cd, XEvent* ev); +static int IconGenericHandler(void *cd, XEvent *ev); int Tktray_Init (Tcl_Interp* interp ); @@ -249,7 +249,7 @@ int Tktray_Init (Tcl_Interp* interp ); static int TrayIconObjectCmd( - ClientData cd, + void *cd, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -611,7 +611,7 @@ CreateTrayIconWindow( Tk_CreateEventHandler(icon->drawingWin,ExposureMask|StructureNotifyMask| ButtonPressMask|ButtonReleaseMask| EnterWindowMask|LeaveWindowMask|PointerMotionMask, - TrayIconEvent,(ClientData)icon); + TrayIconEvent, icon); if(icon->bestVisual) { Tk_SetWindowVisual(icon->drawingWin,icon->bestVisual, 32,icon->bestColormap); @@ -627,7 +627,7 @@ CreateTrayIconWindow( attr.override_redirect = True; Tk_ChangeWindowAttributes(wrapper,CWOverrideRedirect,&attr); - Tk_CreateEventHandler(wrapper,StructureNotifyMask,TrayIconWrapperEvent,(ClientData)icon); + Tk_CreateEventHandler(wrapper,StructureNotifyMask,TrayIconWrapperEvent, icon); if (!icon->bestVisual) { Tk_SetWindowBackgroundPixmap(wrapper, ParentRelative); } else { @@ -744,7 +744,7 @@ TrayIconRequestSize( static void TrayIconImageChanged( - ClientData cd, + void *cd, int x, int y, int w, @@ -829,7 +829,7 @@ TrayIconForceImageChange( if (icon->image) { int w,h; Tk_SizeOfImage(icon->image,&w,&h); - TrayIconImageChanged((ClientData)icon,0,0,w,h,w,h); + TrayIconImageChanged(icon, 0, 0, w, h, w, h); } } @@ -856,7 +856,7 @@ EventuallyRedrawIcon( if (icon->drawingWin && icon->myManager) { /* don't redraw invisible icon */ if (!(icon->flags & ICON_FLAG_REDRAW_PENDING)) { /* don't schedule multiple redraw ops */ icon->flags |= ICON_FLAG_REDRAW_PENDING; - Tcl_DoWhenIdle(DisplayIcon,(ClientData)icon); + Tcl_DoWhenIdle(DisplayIcon, icon); } } } @@ -879,7 +879,7 @@ EventuallyRedrawIcon( static void DisplayIcon( - ClientData cd) + void *cd) { DockIcon *icon = (DockIcon*)cd; int w = icon->imageWidth, h = icon->imageHeight; @@ -910,7 +910,7 @@ DisplayIcon( Tcl_InterpState saved = Tcl_SaveInterpState(icon->interp, TCL_OK); icon->imageVisualInstance = Tk_GetImage(icon->interp,icon->drawingWin, - icon->imageString, IgnoreImageChange,(ClientData)NULL); + icon->imageString, IgnoreImageChange, NULL); Tcl_RestoreInterpState(icon->interp,saved); } if (icon->photo && !icon->offscreenImage) { @@ -1072,7 +1072,7 @@ RetargetEvent( static void TrayIconWrapperEvent( - ClientData cd, + void *cd, XEvent* ev) { /* Some embedders, like Docker, add icon windows to save set @@ -1125,7 +1125,7 @@ TrayIconWrapperEvent( static void TrayIconEvent( - ClientData cd, + void *cd, XEvent* ev) { DockIcon *icon = (DockIcon*)cd; @@ -1147,7 +1147,7 @@ TrayIconEvent( if (icon->myManager) { Tk_SendVirtualEvent(icon->tkwin,Tk_GetUid("IconDestroy"), NULL); } - Tcl_CancelIdleCall(DisplayIcon,(ClientData)icon); + Tcl_CancelIdleCall(DisplayIcon, icon); icon->flags &= ~ICON_FLAG_REDRAW_PENDING; icon->drawingWin = NULL; icon->requestedWidth = 0; /* trigger re-request on recreation */ @@ -1196,7 +1196,7 @@ TrayIconEvent( static void UserIconEvent( - ClientData cd, + void *cd, XEvent* ev) { DockIcon *icon = (DockIcon*)cd; @@ -1204,10 +1204,10 @@ UserIconEvent( switch (ev->type) { case DestroyNotify: - Tk_DeleteGenericHandler(IconGenericHandler, (ClientData)icon); + Tk_DeleteGenericHandler(IconGenericHandler, icon); if(icon->drawingWin) { icon->visible = 0; - Tcl_CancelIdleCall(DisplayIcon,(ClientData)icon); + Tcl_CancelIdleCall(DisplayIcon, icon); icon->flags &= ~ICON_FLAG_REDRAW_PENDING; Tk_DestroyWindow(icon->drawingWin); } @@ -1365,7 +1365,7 @@ CancelBalloon( static int IconGenericHandler( - ClientData cd, + void *cd, XEvent *ev) { DockIcon *icon = (DockIcon*)cd; @@ -1522,7 +1522,7 @@ TrayIconConfigureMethod( if (mask & ICON_CONF_IMAGE) { if (icon->imageString) { newImage = Tk_GetImage(interp, icon->tkwin, icon->imageString, - TrayIconImageChanged, (ClientData)icon); + TrayIconImageChanged, icon); if (!newImage) { Tk_RestoreSavedOptions(&saved); return TCL_ERROR; /* msg by Tk_GetImage */ @@ -1563,7 +1563,7 @@ TrayIconConfigureMethod( static void TrayIconDeleteProc( - ClientData cd ) + void *cd ) { DockIcon *icon = (DockIcon *)cd; Tk_DestroyWindow(icon->tkwin); @@ -1587,7 +1587,7 @@ TrayIconDeleteProc( static int TrayIconCreateCmd( - ClientData cd, + void *cd, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1627,7 +1627,7 @@ TrayIconCreateCmd( /* Early tracking of DestroyNotify is essential */ Tk_CreateEventHandler(icon->tkwin,StructureNotifyMask, - UserIconEvent,(ClientData)icon); + UserIconEvent, icon); /* Now try setting options */ icon->options = Tk_CreateOptionTable(interp,IconOptionSpec); @@ -1652,7 +1652,7 @@ TrayIconCreateCmd( XSelectInput(Tk_Display(icon->tkwin),icon->trayManager, StructureNotifyMask); } - Tk_CreateGenericHandler(IconGenericHandler, (ClientData)icon); + Tk_CreateGenericHandler(IconGenericHandler, icon); if (objc>3) { if (TrayIconConfigureMethod(icon, interp, objc-2, objv+2, @@ -1662,7 +1662,7 @@ TrayIconCreateCmd( } icon->widgetCmd = Tcl_CreateObjCommand(interp, Tcl_GetString(objv[1]), - TrayIconObjectCmd, (ClientData)icon, TrayIconDeleteProc); + TrayIconObjectCmd, icon, TrayIconDeleteProc); /* Sometimes a command just can't be created... */ if (!icon->widgetCmd) { |