| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | #ifdef HAVE_CONFIG_H1 |
| 53 | #include <config.h> |
| 54 | #endif |
| 55 | #include "IntrinsicI.h" |
| 56 | #include <X11/Shell.h> |
| 57 | #include <X11/Vendor.h> |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | #undef XtIsRectObj |
| 66 | Boolean XtIsRectObj(Widget object) |
| 67 | { |
| 68 | return _XtCheckSubclassFlag(object, 0x02); |
| 69 | } |
| 70 | |
| 71 | |
| 72 | #undef XtIsWidget |
| 73 | Boolean XtIsWidget(Widget object) |
| 74 | { |
| 75 | return _XtCheckSubclassFlag(object, 0x04); |
| 76 | } |
| 77 | |
| 78 | |
| 79 | #undef XtIsComposite |
| 80 | Boolean XtIsComposite(Widget object) |
| 81 | { |
| 82 | return _XtCheckSubclassFlag(object, 0x08); |
| 83 | } |
| 84 | |
| 85 | |
| 86 | #undef XtIsConstraint |
| 87 | Boolean XtIsConstraint(Widget object) |
| 88 | { |
| 89 | return _XtCheckSubclassFlag(object, 0x10); |
| 90 | } |
| 91 | |
| 92 | |
| 93 | #undef XtIsShell |
| 94 | Boolean XtIsShell(Widget object) |
| 95 | { |
| 96 | return _XtCheckSubclassFlag(object, 0x20); |
| 97 | } |
| 98 | |
| 99 | |
| 100 | #undef XtIsOverrideShell |
| 101 | Boolean XtIsOverrideShell(Widget object) |
| 102 | { |
| 103 | return _XtIsSubclassOf(object, (WidgetClass)overrideShellWidgetClass, |
| 104 | (WidgetClass)shellWidgetClass, 0x20); |
| 105 | } |
| 106 | |
| 107 | |
| 108 | #undef XtIsWMShell |
| 109 | Boolean XtIsWMShell(Widget object) |
| 110 | { |
| 111 | return _XtCheckSubclassFlag(object, 0x40); |
| 112 | } |
| 113 | |
| 114 | |
| 115 | #undef XtIsVendorShell |
| 116 | Boolean XtIsVendorShell(Widget object) |
| 117 | { |
| 118 | Boolean retval; |
| 119 | |
| 120 | LOCK_PROCESSif(_XtProcessLock)(*_XtProcessLock)(); |
| 121 | retval = _XtIsSubclassOf(object, |
| 122 | #ifdef notdef |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | (WidgetClass)vendorShellWidgetClass, |
| 128 | #endif |
| 129 | transientShellWidgetClass->core_class.superclass, |
| 130 | (WidgetClass)wmShellWidgetClass, 0x40); |
| 131 | UNLOCK_PROCESSif(_XtProcessUnlock)(*_XtProcessUnlock)(); |
| 132 | return retval; |
| 133 | } |
| 134 | |
| 135 | |
| 136 | #undef XtIsTransientShell |
| 137 | Boolean XtIsTransientShell(Widget object) |
| 138 | { |
| 139 | return _XtIsSubclassOf(object, (WidgetClass)transientShellWidgetClass, |
| 140 | (WidgetClass)wmShellWidgetClass, 0x40); |
| 141 | } |
| 142 | |
| 143 | |
| 144 | #undef XtIsTopLevelShell |
| 145 | Boolean XtIsTopLevelShell(Widget object) |
| 146 | { |
| 147 | return _XtCheckSubclassFlag(object, 0x80); |
| 148 | } |
| 149 | |
| 150 | |
| 151 | #undef XtIsApplicationShell |
| 152 | Boolean XtIsApplicationShell(Widget object) |
| 153 | { |
| 154 | return _XtIsSubclassOf(object, (WidgetClass)applicationShellWidgetClass, |
| 155 | (WidgetClass)topLevelShellWidgetClass, 0x80); |
| 156 | } |
| 157 | |
| 158 | #undef XtIsSessionShell |
| 159 | Boolean XtIsSessionShell(Widget object) |
| 160 | { |
| 161 | return _XtIsSubclassOf(object, (WidgetClass)sessionShellWidgetClass, |
| 162 | (WidgetClass)topLevelShellWidgetClass, 0x80); |
| 163 | } |
| 164 | |
| 165 | #undef XtMapWidget |
| 166 | void XtMapWidget(Widget w) |
| 167 | { |
| 168 | Widget hookobj; |
| 169 | WIDGET_TO_APPCON(w)XtAppContext app = (w && _XtProcessLock ? XtWidgetToApplicationContext (w) : ((void*)0)); |
| 1 | Within the expansion of the macro 'WIDGET_TO_APPCON':
| |
a | Assuming pointer value is null |
|
| 170 | |
| 171 | LOCK_APP(app)if(app && app->lock)(*app->lock)(app); |
| 172 | XMapWindow(XtDisplay(w)(((w)->core.screen)->display), XtWindow(w)((w)->core.window)); |
| 2 | | Within the expansion of the macro 'XtDisplay':
|
a | Dereference of null pointer |
|
| 173 | hookobj = XtHooksOfDisplay(XtDisplay(w)(((w)->core.screen)->display)); |
| 174 | if (XtHasCallbacks(hookobj, XtNchangeHook((char*)&XtStrings[2061])) == XtCallbackHasSome) { |
| 175 | XtChangeHookDataRec call_data; |
| 176 | |
| 177 | call_data.type = XtHmapWidget((char*)&XtStrings[2534]); |
| 178 | call_data.widget = w; |
| 179 | XtCallCallbackList(hookobj, |
| 180 | ((HookObject)hookobj)->hooks.changehook_callbacks, |
| 181 | (XtPointer)&call_data); |
| 182 | } |
| 183 | UNLOCK_APP(app)if(app && app->unlock)(*app->unlock)(app); |
| 184 | } |
| 185 | |
| 186 | |
| 187 | #undef XtUnmapWidget |
| 188 | void XtUnmapWidget(Widget w) |
| 189 | { |
| 190 | Widget hookobj; |
| 191 | WIDGET_TO_APPCON(w)XtAppContext app = (w && _XtProcessLock ? XtWidgetToApplicationContext (w) : ((void*)0)); |
| 192 | |
| 193 | LOCK_APP(app)if(app && app->lock)(*app->lock)(app); |
| 194 | XUnmapWindow(XtDisplay(w)(((w)->core.screen)->display), XtWindow(w)((w)->core.window)); |
| 195 | hookobj = XtHooksOfDisplay(XtDisplay(w)(((w)->core.screen)->display)); |
| 196 | if (XtHasCallbacks(hookobj, XtNchangeHook((char*)&XtStrings[2061])) == XtCallbackHasSome) { |
| 197 | XtChangeHookDataRec call_data; |
| 198 | |
| 199 | call_data.type = XtHunmapWidget((char*)&XtStrings[2546]); |
| 200 | call_data.widget = w; |
| 201 | XtCallCallbackList(hookobj, |
| 202 | ((HookObject)hookobj)->hooks.changehook_callbacks, |
| 203 | (XtPointer)&call_data); |
| 204 | } |
| 205 | UNLOCK_APP(app)if(app && app->unlock)(*app->unlock)(app); |
| 206 | } |
| 207 | |
| 208 | |
| 209 | #undef XtNewString |
| 210 | String XtNewString(String str) |
| 211 | { |
| 212 | if (str == NULL((void*)0)) |
| 213 | return NULL((void*)0); |
| 214 | else |
| 215 | return strcpy(__XtMalloc((unsigned)strlen(str) + 1), str)__builtin___strcpy_chk (__XtMalloc((unsigned)strlen(str) + 1) , str, __builtin_object_size (__XtMalloc((unsigned)strlen(str ) + 1), 2 > 1 ? 1 : 0)); |
| 216 | } |