diff options
Diffstat (limited to 'src/Hooks.c')
-rw-r--r-- | src/Hooks.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/Hooks.c b/src/Hooks.c index af6b49f..5c113e1 100644 --- a/src/Hooks.c +++ b/src/Hooks.c @@ -46,10 +46,10 @@ static void FreeBlockHookList( } -XtBlockHookId XtAppAddBlockHook( app, proc, closure ) - XtAppContext app; - XtBlockHookProc proc; - XtPointer closure; +XtBlockHookId XtAppAddBlockHook( + XtAppContext app, + XtBlockHookProc proc, + XtPointer closure) { BlockHook hook = XtNew(BlockHookRec); LOCK_APP(app); @@ -69,8 +69,8 @@ XtBlockHookId XtAppAddBlockHook( app, proc, closure ) } -void XtRemoveBlockHook( id ) - XtBlockHookId id; +void XtRemoveBlockHook( + XtBlockHookId id) { BlockHook *p, hook = (BlockHook)id; XtAppContext app = hook->app; @@ -81,7 +81,7 @@ void XtRemoveBlockHook( id ) XtAppWarningMsg(app, "badId", "xtRemoveBlockHook", XtCXtToolkitError, "XtRemoveBlockHook called with bad or old hook id", (String*)NULL, (Cardinal*)NULL); -#endif /*DEBUG*/ +#endif /*DEBUG*/ UNLOCK_APP(app); return; } @@ -96,7 +96,7 @@ static void DeleteShellFromHookObj( XtPointer call_data) { /* app_con is locked when this function is called */ - int ii, jj; + Cardinal ii, jj; HookObject ho = (HookObject) closure; for (ii = 0; ii < ho->hooks.num_shells; ii++) @@ -121,13 +121,13 @@ void _XtAddShellToHookObj( if (ho->hooks.num_shells == ho->hooks.max_shells) { ho->hooks.max_shells += SHELL_INCR; - ho->hooks.shells = - (WidgetList)XtRealloc((char*)ho->hooks.shells, + ho->hooks.shells = + (WidgetList)XtRealloc((char*)ho->hooks.shells, ho->hooks.max_shells * sizeof (Widget)); } ho->hooks.shells[ho->hooks.num_shells++] = shell; - XtAddCallback(shell, XtNdestroyCallback, DeleteShellFromHookObj, + XtAddCallback(shell, XtNdestroyCallback, DeleteShellFromHookObj, (XtPointer)ho); } @@ -137,8 +137,8 @@ Boolean _XtIsHookObject( return (widget->core.widget_class == hookObjectClass); } -Widget XtHooksOfDisplay(dpy) - Display* dpy; +Widget XtHooksOfDisplay( + Display* dpy) { Widget retval; XtPerDisplay pd; @@ -147,7 +147,7 @@ Widget XtHooksOfDisplay(dpy) LOCK_APP(app); pd = _XtGetPerDisplay(dpy); if (pd->hook_object == NULL) - pd->hook_object = + pd->hook_object = _XtCreateHookObj((Screen*)DefaultScreenOfDisplay(dpy)); retval = pd->hook_object; UNLOCK_APP(app); |