CoreUI.m
1 /* 2 This file is part of Darling. 3 4 Copyright (C) 2019 Lubos Dolezel 5 6 Darling is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 Darling is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with Darling. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 21 #include <CoreUI/CoreUI.h> 22 #include <stdlib.h> 23 #include <stdio.h> 24 25 static int verbose = 0; 26 27 __attribute__((constructor)) 28 static void initme(void) { 29 verbose = getenv("STUB_VERBOSE") != NULL; 30 } 31 32 void* CSIEqualMetrics(void) 33 { 34 if (verbose) puts("STUB: CSIEqualMetrics called"); 35 return NULL; 36 } 37 38 void* CUIBlendModeDescriptionFromCGBlendMode(void) 39 { 40 if (verbose) puts("STUB: CUIBlendModeDescriptionFromCGBlendMode called"); 41 return NULL; 42 } 43 44 void* CUIBlendModeLSRDescriptionFromCGBlendMode(void) 45 { 46 if (verbose) puts("STUB: CUIBlendModeLSRDescriptionFromCGBlendMode called"); 47 return NULL; 48 } 49 50 void* CUICFArrayCreateWithCGRects(void) 51 { 52 if (verbose) puts("STUB: CUICFArrayCreateWithCGRects called"); 53 return NULL; 54 } 55 56 void* CUICFDictionaryGetCGRect(void) 57 { 58 if (verbose) puts("STUB: CUICFDictionaryGetCGRect called"); 59 return NULL; 60 } 61 62 void* CUICFDictionarySetCFArrayOfCGRects(void) 63 { 64 if (verbose) puts("STUB: CUICFDictionarySetCFArrayOfCGRects called"); 65 return NULL; 66 } 67 68 void* CUICFDictionarySetCGRect(void) 69 { 70 if (verbose) puts("STUB: CUICFDictionarySetCGRect called"); 71 return NULL; 72 } 73 74 void* CUICFDictionarySetSegmentSeparatorTypes(void) 75 { 76 if (verbose) puts("STUB: CUICFDictionarySetSegmentSeparatorTypes called"); 77 return NULL; 78 } 79 80 void* CUICFDictionarySetSegmentType(void) 81 { 82 if (verbose) puts("STUB: CUICFDictionarySetSegmentType called"); 83 return NULL; 84 } 85 86 void* CUICGBlendModeFromLSRDescription(void) 87 { 88 if (verbose) puts("STUB: CUICGBlendModeFromLSRDescription called"); 89 return NULL; 90 } 91 92 void* CUICGImageGetAlphaInfo(void) 93 { 94 if (verbose) puts("STUB: CUICGImageGetAlphaInfo called"); 95 return NULL; 96 } 97 98 void* CUICalcNonAlphaAreaOfImage(void) 99 { 100 if (verbose) puts("STUB: CUICalcNonAlphaAreaOfImage called"); 101 return NULL; 102 } 103 104 void* CUICalculateExtrusionMaskOfImage(void) 105 { 106 if (verbose) puts("STUB: CUICalculateExtrusionMaskOfImage called"); 107 return NULL; 108 } 109 110 void* CUIColorCreateFromColorWithSystemEffectOptions(void) 111 { 112 if (verbose) puts("STUB: CUIColorCreateFromColorWithSystemEffectOptions called"); 113 return NULL; 114 } 115 116 void* CUIColorHistogramARGBIntersection(void) 117 { 118 if (verbose) puts("STUB: CUIColorHistogramARGBIntersection called"); 119 return NULL; 120 } 121 122 void* CUIColorHistogramARGBIsMonochrome(void) 123 { 124 if (verbose) puts("STUB: CUIColorHistogramARGBIsMonochrome called"); 125 return NULL; 126 } 127 128 void* CUICompareRenditionKey(void) 129 { 130 if (verbose) puts("STUB: CUICompareRenditionKey called"); 131 return NULL; 132 } 133 134 void* CUIComputeImageColorHistogramARGB(void) 135 { 136 if (verbose) puts("STUB: CUIComputeImageColorHistogramARGB called"); 137 return NULL; 138 } 139 140 void* CUIConvertCGImageFormat(void) 141 { 142 if (verbose) puts("STUB: CUIConvertCGImageFormat called"); 143 return NULL; 144 } 145 146 void* CUIConvertCompressionTypeToString(void) 147 { 148 if (verbose) puts("STUB: CUIConvertCompressionTypeToString called"); 149 return NULL; 150 } 151 152 void* CUIConvertDeepImageTo8(void) 153 { 154 if (verbose) puts("STUB: CUIConvertDeepImageTo8 called"); 155 return NULL; 156 } 157 158 void* CUIConvertImageToPixelFormat(void) 159 { 160 if (verbose) puts("STUB: CUIConvertImageToPixelFormat called"); 161 return NULL; 162 } 163 164 void* CUIConvertPixelFormatToString(void) 165 { 166 if (verbose) puts("STUB: CUIConvertPixelFormatToString called"); 167 return NULL; 168 } 169 170 void* CUICopyCustomColor(void) 171 { 172 if (verbose) puts("STUB: CUICopyCustomColor called"); 173 return NULL; 174 } 175 176 void* CUICopyCustomColorWithOptions(void) 177 { 178 if (verbose) puts("STUB: CUICopyCustomColorWithOptions called"); 179 return NULL; 180 } 181 182 void* CUICopyCustomFontDescriptor(void) 183 { 184 if (verbose) puts("STUB: CUICopyCustomFontDescriptor called"); 185 return NULL; 186 } 187 188 void* CUICopyMeasurements(void) 189 { 190 if (verbose) puts("STUB: CUICopyMeasurements called"); 191 return NULL; 192 } 193 194 void* CUICreateLayerContents(void) 195 { 196 if (verbose) puts("STUB: CUICreateLayerContents called"); 197 return NULL; 198 } 199 200 void* CUICreateMenuPath(void) 201 { 202 if (verbose) puts("STUB: CUICreateMenuPath called"); 203 return NULL; 204 } 205 206 void* CUICreateOrUpdateLayer(void) 207 { 208 if (verbose) puts("STUB: CUICreateOrUpdateLayer called"); 209 return NULL; 210 } 211 212 void* CUICreateRenderer(void) 213 { 214 if (verbose) puts("STUB: CUICreateRenderer called"); 215 return NULL; 216 } 217 218 void* CUICurrentPlatform(void) 219 { 220 if (verbose) puts("STUB: CUICurrentPlatform called"); 221 return NULL; 222 } 223 224 void* CUIDeallocateRGBAImageBuffer(void) 225 { 226 if (verbose) puts("STUB: CUIDeallocateRGBAImageBuffer called"); 227 return NULL; 228 } 229 230 void* CUIDefaultThemeRenditionKeyFormat(void) 231 { 232 if (verbose) puts("STUB: CUIDefaultThemeRenditionKeyFormat called"); 233 return NULL; 234 } 235 236 void* CUIDraw(void) 237 { 238 if (verbose) puts("STUB: CUIDraw called"); 239 return NULL; 240 } 241 242 void* CUIDrawExtrudedImageInContext(void) 243 { 244 if (verbose) puts("STUB: CUIDrawExtrudedImageInContext called"); 245 return NULL; 246 } 247 248 void* CUIDrawStyledGlyphsAtPositions(void) 249 { 250 if (verbose) puts("STUB: CUIDrawStyledGlyphsAtPositions called"); 251 return NULL; 252 } 253 254 void* CUIDrawStyledGlyphsWithAdvances(void) 255 { 256 if (verbose) puts("STUB: CUIDrawStyledGlyphsWithAdvances called"); 257 return NULL; 258 } 259 260 void* CUIEdgeInsetsEqualToEdgeInsets(void) 261 { 262 if (verbose) puts("STUB: CUIEdgeInsetsEqualToEdgeInsets called"); 263 return NULL; 264 } 265 266 void* CUIEdgeInsetsFromCGRect(void) 267 { 268 if (verbose) puts("STUB: CUIEdgeInsetsFromCGRect called"); 269 return NULL; 270 } 271 272 void* CUIEdgeInsetsInsetRect(void) 273 { 274 if (verbose) puts("STUB: CUIEdgeInsetsInsetRect called"); 275 return NULL; 276 } 277 278 void* CUIEdgeInsetsMake(void) 279 { 280 if (verbose) puts("STUB: CUIEdgeInsetsMake called"); 281 return NULL; 282 } 283 284 void* CUIEdgeInsetsOutsetRect(void) 285 { 286 if (verbose) puts("STUB: CUIEdgeInsetsOutsetRect called"); 287 return NULL; 288 } 289 290 void* CUIEdgeInsetsToCGRect(void) 291 { 292 if (verbose) puts("STUB: CUIEdgeInsetsToCGRect called"); 293 return NULL; 294 } 295 296 void* CUIEdgeInsetsValid(void) 297 { 298 if (verbose) puts("STUB: CUIEdgeInsetsValid called"); 299 return NULL; 300 } 301 302 void* CUIEffectBevelStyleDescription(void) 303 { 304 if (verbose) puts("STUB: CUIEffectBevelStyleDescription called"); 305 return NULL; 306 } 307 308 void* CUIEffectBlendModeDescription(void) 309 { 310 if (verbose) puts("STUB: CUIEffectBlendModeDescription called"); 311 return NULL; 312 } 313 314 void* CUIEqualRenditionKeys(void) 315 { 316 if (verbose) puts("STUB: CUIEqualRenditionKeys called"); 317 return NULL; 318 } 319 320 void* CUIEqualRenditionKeysIgnoringAttribute(void) 321 { 322 if (verbose) puts("STUB: CUIEqualRenditionKeysIgnoringAttribute called"); 323 return NULL; 324 } 325 326 void* CUIExists(void) 327 { 328 if (verbose) puts("STUB: CUIExists called"); 329 return NULL; 330 } 331 332 void* CUIFillCARKeyArrayForRenditionKey(void) 333 { 334 if (verbose) puts("STUB: CUIFillCARKeyArrayForRenditionKey called"); 335 return NULL; 336 } 337 338 void* CUIFillRenditionKeyForCARKeyArray(void) 339 { 340 if (verbose) puts("STUB: CUIFillRenditionKeyForCARKeyArray called"); 341 return NULL; 342 } 343 344 void* CUIGetChannelDataForImage(void) 345 { 346 if (verbose) puts("STUB: CUIGetChannelDataForImage called"); 347 return NULL; 348 } 349 350 void* CUIGetCustomFontSize(void) 351 { 352 if (verbose) puts("STUB: CUIGetCustomFontSize called"); 353 return NULL; 354 } 355 356 void* CUIGetDebugValue(void) 357 { 358 if (verbose) puts("STUB: CUIGetDebugValue called"); 359 return NULL; 360 } 361 362 void* CUIGetDeviceArtworkDisplayGamut(void) 363 { 364 if (verbose) puts("STUB: CUIGetDeviceArtworkDisplayGamut called"); 365 return NULL; 366 } 367 368 void* CUIGetFormatForFeatureSetAndPixelFormat(void) 369 { 370 if (verbose) puts("STUB: CUIGetFormatForFeatureSetAndPixelFormat called"); 371 return NULL; 372 } 373 374 void* CUIGetRGBAImageBuffer(void) 375 { 376 if (verbose) puts("STUB: CUIGetRGBAImageBuffer called"); 377 return NULL; 378 } 379 380 void* CUIHitTest(void) 381 { 382 if (verbose) puts("STUB: CUIHitTest called"); 383 return NULL; 384 } 385 386 void* CUIImageCompressedWithColorQuantization(void) 387 { 388 if (verbose) puts("STUB: CUIImageCompressedWithColorQuantization called"); 389 return NULL; 390 } 391 392 void* CUIImageIsMonochrome(void) 393 { 394 if (verbose) puts("STUB: CUIImageIsMonochrome called"); 395 return NULL; 396 } 397 398 void* CUIImageIsWideGamut(void) 399 { 400 if (verbose) puts("STUB: CUIImageIsWideGamut called"); 401 return NULL; 402 } 403 404 void* CUIKeyFormatToArrayString(void) 405 { 406 if (verbose) puts("STUB: CUIKeyFormatToArrayString called"); 407 return NULL; 408 } 409 410 void* CUILogLogToStderr(void) 411 { 412 if (verbose) puts("STUB: CUILogLogToStderr called"); 413 return NULL; 414 } 415 416 void* CUIMaxDimensionForVectorGlyph(void) 417 { 418 if (verbose) puts("STUB: CUIMaxDimensionForVectorGlyph called"); 419 return NULL; 420 } 421 422 void* CUIMaxScaleForTargetPlatform(void) 423 { 424 if (verbose) puts("STUB: CUIMaxScaleForTargetPlatform called"); 425 return NULL; 426 } 427 428 void* CUIMinDimensionForVectorGlyph(void) 429 { 430 if (verbose) puts("STUB: CUIMinDimensionForVectorGlyph called"); 431 return NULL; 432 } 433 434 void* CUIMinScaleForTargetPlatform(void) 435 { 436 if (verbose) puts("STUB: CUIMinScaleForTargetPlatform called"); 437 return NULL; 438 } 439 440 void* CUIParseDeploymentTarget(void) 441 { 442 if (verbose) puts("STUB: CUIParseDeploymentTarget called"); 443 return NULL; 444 } 445 446 void* CUIPlaceHolderRendition(void) 447 { 448 if (verbose) puts("STUB: CUIPlaceHolderRendition called"); 449 return NULL; 450 } 451 452 void* CUIPlatformNameForPlatform(void) 453 { 454 if (verbose) puts("STUB: CUIPlatformNameForPlatform called"); 455 return NULL; 456 } 457 458 void* CUIPointSizeForDimensionForVectorGlyph(void) 459 { 460 if (verbose) puts("STUB: CUIPointSizeForDimensionForVectorGlyph called"); 461 return NULL; 462 } 463 464 void* CUIRendererCopyProperties(void) 465 { 466 if (verbose) puts("STUB: CUIRendererCopyProperties called"); 467 return NULL; 468 } 469 470 void* CUIRendererSetProperties(void) 471 { 472 if (verbose) puts("STUB: CUIRendererSetProperties called"); 473 return NULL; 474 } 475 476 void* CUIRenditionKeyCopy(void) 477 { 478 if (verbose) puts("STUB: CUIRenditionKeyCopy called"); 479 return NULL; 480 } 481 482 void* CUIRenditionKeyFormatRemoveAttribute(void) 483 { 484 if (verbose) puts("STUB: CUIRenditionKeyFormatRemoveAttribute called"); 485 return NULL; 486 } 487 488 void* CUIRenditionKeyHasIdentifier(void) 489 { 490 if (verbose) puts("STUB: CUIRenditionKeyHasIdentifier called"); 491 return NULL; 492 } 493 494 void* CUIRenditionKeySetValueForAttribute(void) 495 { 496 if (verbose) puts("STUB: CUIRenditionKeySetValueForAttribute called"); 497 return NULL; 498 } 499 500 void* CUIRenditionKeyStandardize(void) 501 { 502 if (verbose) puts("STUB: CUIRenditionKeyStandardize called"); 503 return NULL; 504 } 505 506 void* CUIRenditionKeyTokenCount(void) 507 { 508 if (verbose) puts("STUB: CUIRenditionKeyTokenCount called"); 509 return NULL; 510 } 511 512 void* CUIRenditionKeyValueForAttribute(void) 513 { 514 if (verbose) puts("STUB: CUIRenditionKeyValueForAttribute called"); 515 return NULL; 516 } 517 518 void* CUISetCustomColorInContext(void) 519 { 520 if (verbose) puts("STUB: CUISetCustomColorInContext called"); 521 return NULL; 522 } 523 524 void* CUISetDebugValue(void) 525 { 526 if (verbose) puts("STUB: CUISetDebugValue called"); 527 return NULL; 528 } 529 530 void* CUISetUpContext(void) 531 { 532 if (verbose) puts("STUB: CUISetUpContext called"); 533 return NULL; 534 } 535 536 void* CUISystemThemeRenditionKeyFormat(void) 537 { 538 if (verbose) puts("STUB: CUISystemThemeRenditionKeyFormat called"); 539 return NULL; 540 } 541 542 void* CUIThemeInfoVersion(void) 543 { 544 if (verbose) puts("STUB: CUIThemeInfoVersion called"); 545 return NULL; 546 } 547 548 void* CUIUncompressQuantizedImageData(void) 549 { 550 if (verbose) puts("STUB: CUIUncompressQuantizedImageData called"); 551 return NULL; 552 } 553 554 void* _CUILog(void) 555 { 556 if (verbose) puts("STUB: _CUILog called"); 557 return NULL; 558 } 559 560 void* _LookupStructuredThemeProvider(void) 561 { 562 if (verbose) puts("STUB: _LookupStructuredThemeProvider called"); 563 return NULL; 564 } 565 566 void* _RegisterThemeProvider(void) 567 { 568 if (verbose) puts("STUB: _RegisterThemeProvider called"); 569 return NULL; 570 }