diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2019-07-14 16:23:33 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2019-07-14 16:23:33 -0400 |
commit | 2ff3f1fa183be97e66afb863cb9fec391ee3cd5c (patch) | |
tree | 3b5a3fda4b1c62dd9010621474d76fc3902859d7 /src/Functions.c | |
parent | ceeffbae4c9a19fe304ae13c66bbfa2160a0c4c9 (diff) |
indent'd like "x-indent.sh", but with a more complete set of typedefs - see
https://github.com/ThomasDickey/cindent-snapshots/blob/master/scripts/xxx-profile
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/Functions.c')
-rw-r--r-- | src/Functions.c | 107 |
1 files changed, 56 insertions, 51 deletions
diff --git a/src/Functions.c b/src/Functions.c index f70553b..d66e7e5 100644 --- a/src/Functions.c +++ b/src/Functions.c @@ -63,57 +63,58 @@ in this Software without prior written authorization from The Open Group. */ #undef XtIsRectObj -Boolean XtIsRectObj(Widget object) +Boolean +XtIsRectObj(Widget object) { return _XtCheckSubclassFlag(object, 0x02); } - #undef XtIsWidget -Boolean XtIsWidget(Widget object) +Boolean +XtIsWidget(Widget object) { return _XtCheckSubclassFlag(object, 0x04); } - #undef XtIsComposite -Boolean XtIsComposite(Widget object) +Boolean +XtIsComposite(Widget object) { return _XtCheckSubclassFlag(object, 0x08); } - #undef XtIsConstraint -Boolean XtIsConstraint(Widget object) +Boolean +XtIsConstraint(Widget object) { return _XtCheckSubclassFlag(object, 0x10); } - #undef XtIsShell -Boolean XtIsShell(Widget object) +Boolean +XtIsShell(Widget object) { return _XtCheckSubclassFlag(object, 0x20); } - #undef XtIsOverrideShell -Boolean XtIsOverrideShell(Widget object) +Boolean +XtIsOverrideShell(Widget object) { - return _XtIsSubclassOf(object, (WidgetClass)overrideShellWidgetClass, - (WidgetClass)shellWidgetClass, 0x20); + return _XtIsSubclassOf(object, (WidgetClass) overrideShellWidgetClass, + (WidgetClass) shellWidgetClass, 0x20); } - #undef XtIsWMShell -Boolean XtIsWMShell(Widget object) +Boolean +XtIsWMShell(Widget object) { return _XtCheckSubclassFlag(object, 0x40); } - #undef XtIsVendorShell -Boolean XtIsVendorShell(Widget object) +Boolean +XtIsVendorShell(Widget object) { Boolean retval; @@ -124,93 +125,97 @@ Boolean XtIsVendorShell(Widget object) * We don't refer to vendorShell directly, because some shared libraries * bind local references tightly. */ - (WidgetClass)vendorShellWidgetClass, + (WidgetClass) vendorShellWidgetClass, #endif - transientShellWidgetClass->core_class.superclass, - (WidgetClass)wmShellWidgetClass, 0x40); + transientShellWidgetClass->core_class.superclass, + (WidgetClass) wmShellWidgetClass, 0x40); UNLOCK_PROCESS; return retval; } - #undef XtIsTransientShell -Boolean XtIsTransientShell(Widget object) +Boolean +XtIsTransientShell(Widget object) { - return _XtIsSubclassOf(object, (WidgetClass)transientShellWidgetClass, - (WidgetClass)wmShellWidgetClass, 0x40); + return _XtIsSubclassOf(object, (WidgetClass) transientShellWidgetClass, + (WidgetClass) wmShellWidgetClass, 0x40); } - #undef XtIsTopLevelShell -Boolean XtIsTopLevelShell(Widget object) +Boolean +XtIsTopLevelShell(Widget object) { return _XtCheckSubclassFlag(object, 0x80); } - #undef XtIsApplicationShell -Boolean XtIsApplicationShell(Widget object) +Boolean +XtIsApplicationShell(Widget object) { - return _XtIsSubclassOf(object, (WidgetClass)applicationShellWidgetClass, - (WidgetClass)topLevelShellWidgetClass, 0x80); + return _XtIsSubclassOf(object, (WidgetClass) applicationShellWidgetClass, + (WidgetClass) topLevelShellWidgetClass, 0x80); } #undef XtIsSessionShell -Boolean XtIsSessionShell(Widget object) +Boolean +XtIsSessionShell(Widget object) { - return _XtIsSubclassOf(object, (WidgetClass)sessionShellWidgetClass, - (WidgetClass)topLevelShellWidgetClass, 0x80); + return _XtIsSubclassOf(object, (WidgetClass) sessionShellWidgetClass, + (WidgetClass) topLevelShellWidgetClass, 0x80); } #undef XtMapWidget -void XtMapWidget(Widget w) +void +XtMapWidget(Widget w) { Widget hookobj; + WIDGET_TO_APPCON(w); LOCK_APP(app); XMapWindow(XtDisplay(w), XtWindow(w)); hookobj = XtHooksOfDisplay(XtDisplay(w)); if (XtHasCallbacks(hookobj, XtNchangeHook) == XtCallbackHasSome) { - XtChangeHookDataRec call_data; + XtChangeHookDataRec call_data; - call_data.type = XtHmapWidget; - call_data.widget = w; - XtCallCallbackList(hookobj, - ((HookObject)hookobj)->hooks.changehook_callbacks, - (XtPointer)&call_data); + call_data.type = XtHmapWidget; + call_data.widget = w; + XtCallCallbackList(hookobj, + ((HookObject) hookobj)->hooks.changehook_callbacks, + (XtPointer) & call_data); } UNLOCK_APP(app); } - #undef XtUnmapWidget -void XtUnmapWidget(Widget w) +void +XtUnmapWidget(Widget w) { Widget hookobj; + WIDGET_TO_APPCON(w); LOCK_APP(app); XUnmapWindow(XtDisplay(w), XtWindow(w)); hookobj = XtHooksOfDisplay(XtDisplay(w)); if (XtHasCallbacks(hookobj, XtNchangeHook) == XtCallbackHasSome) { - XtChangeHookDataRec call_data; + XtChangeHookDataRec call_data; - call_data.type = XtHunmapWidget; - call_data.widget = w; - XtCallCallbackList(hookobj, - ((HookObject)hookobj)->hooks.changehook_callbacks, - (XtPointer)&call_data); + call_data.type = XtHunmapWidget; + call_data.widget = w; + XtCallCallbackList(hookobj, + ((HookObject) hookobj)->hooks.changehook_callbacks, + (XtPointer) & call_data); } UNLOCK_APP(app); } - #undef XtNewString -String XtNewString(String str) +String +XtNewString(String str) { if (str == NULL) - return NULL; + return NULL; return strdup(str); } |