1 /* 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26 #ifndef __WebKitAvailability__ 27 #define __WebKitAvailability__ 28 29 /* The structure of this header is based on AvailabilityMacros.h. The major difference is that the availability 30 macros are defined in terms of WebKit version numbers rather than Mac OS X system version numbers, as WebKit 31 releases span multiple versions of Mac OS X. 32 */ 33 34 #define WEBKIT_VERSION_1_0 0x0100 35 #define WEBKIT_VERSION_1_1 0x0110 36 #define WEBKIT_VERSION_1_2 0x0120 37 #define WEBKIT_VERSION_1_3 0x0130 38 #define WEBKIT_VERSION_2_0 0x0200 39 #define WEBKIT_VERSION_3_0 0x0300 40 #define WEBKIT_VERSION_3_1 0x0310 41 #define WEBKIT_VERSION_4_0 0x0400 42 #define WEBKIT_VERSION_LATEST 0x9999 43 44 #ifdef __APPLE__ 45 #import <AvailabilityMacros.h> 46 #else 47 /* 48 * For non-Mac platforms, require the newest version. 49 */ 50 #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_LATEST 51 /* 52 * only certain compilers support __attribute__((deprecated)) 53 */ 54 #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) 55 #define DEPRECATED_ATTRIBUTE __attribute__((deprecated)) 56 #else 57 #define DEPRECATED_ATTRIBUTE 58 #endif 59 #endif 60 61 /* The versions of GCC that shipped with Xcode prior to 3.0 (GCC build number < 5400) did not support attributes on methods. 62 If we are building with one of these versions, we need to omit the attribute. We achieve this by wrapping the annotation 63 in WEBKIT_OBJC_METHOD_ANNOTATION, which will remove the annotation when an old version of GCC is in use and will otherwise 64 expand to the annotation. The same is needed for protocol methods. 65 */ 66 #if defined(__APPLE_CC__) && __APPLE_CC__ < 5400 67 #define WEBKIT_OBJC_METHOD_ANNOTATION(ANNOTATION) 68 #else 69 #define WEBKIT_OBJC_METHOD_ANNOTATION(ANNOTATION) ANNOTATION 70 #endif 71 72 73 /* If minimum WebKit version is not specified, assume the version that shipped with the target Mac OS X version */ 74 #ifndef WEBKIT_VERSION_MIN_REQUIRED 75 #if !defined(MAC_OS_X_VERSION_10_2) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_2 76 #error WebKit was not available prior to Mac OS X 10.2 77 #elif !defined(MAC_OS_X_VERSION_10_3) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3 78 /* WebKit 1.0 is the only version available on Mac OS X 10.2. */ 79 #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_1_0 80 #elif !defined(MAC_OS_X_VERSION_10_4) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4 81 /* WebKit 1.1 is the version that shipped on Mac OS X 10.3. */ 82 #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_1_1 83 #elif !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 84 /* WebKit 2.0 is the version that shipped on Mac OS X 10.4. */ 85 #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_2_0 86 #elif !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 87 /* WebKit 3.0 is the version that shipped on Mac OS X 10.5. */ 88 #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_3_0 89 #else 90 #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_LATEST 91 #endif 92 #endif 93 94 95 /* If maximum WebKit version is not specified, assume largerof(latest, minimum) */ 96 #ifndef WEBKIT_VERSION_MAX_ALLOWED 97 #if WEBKIT_VERSION_MIN_REQUIRED > WEBKIT_VERSION_LATEST 98 #define WEBKIT_VERSION_MAX_ALLOWED WEBKIT_VERSION_MIN_REQUIRED 99 #else 100 #define WEBKIT_VERSION_MAX_ALLOWED WEBKIT_VERSION_LATEST 101 #endif 102 #endif 103 104 105 /* Sanity check the configured values */ 106 #if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_MIN_REQUIRED 107 #error WEBKIT_VERSION_MAX_ALLOWED must be >= WEBKIT_VERSION_MIN_REQUIRED 108 #endif 109 #if WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_0 110 #error WEBKIT_VERSION_MIN_REQUIRED must be >= WEBKIT_VERSION_1_0 111 #endif 112 113 114 115 116 117 118 /* 119 * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER 120 * 121 * Used on functions introduced in WebKit 1.0 122 */ 123 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER 124 125 /* 126 * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED 127 * 128 * Used on functions introduced in WebKit 1.0, 129 * and deprecated in WebKit 1.0 130 */ 131 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE 132 133 /* 134 * DEPRECATED_IN_WEBKIT_VERSION_1_0_AND_LATER 135 * 136 * Used on types deprecated in WebKit 1.0 137 */ 138 #define DEPRECATED_IN_WEBKIT_VERSION_1_0_AND_LATER DEPRECATED_ATTRIBUTE 139 140 141 142 143 144 145 /* 146 * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER 147 * 148 * Used on declarations introduced in WebKit 1.1 149 */ 150 #if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_1 151 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER UNAVAILABLE_ATTRIBUTE 152 #elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_1 153 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER WEAK_IMPORT_ATTRIBUTE 154 #else 155 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER 156 #endif 157 158 /* 159 * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED 160 * 161 * Used on declarations introduced in WebKit 1.1, 162 * and deprecated in WebKit 1.1 163 */ 164 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1 165 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE 166 #else 167 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER 168 #endif 169 170 /* 171 * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1 172 * 173 * Used on declarations introduced in WebKit 1.0, 174 * but later deprecated in WebKit 1.1 175 */ 176 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1 177 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1 DEPRECATED_ATTRIBUTE 178 #else 179 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER 180 #endif 181 182 /* 183 * DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER 184 * 185 * Used on types deprecated in WebKit 1.1 186 */ 187 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1 188 #define DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER DEPRECATED_ATTRIBUTE 189 #else 190 #define DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER 191 #endif 192 193 194 195 196 197 198 /* 199 * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER 200 * 201 * Used on declarations introduced in WebKit 1.2 202 */ 203 #if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_2 204 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER UNAVAILABLE_ATTRIBUTE 205 #elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_2 206 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER WEAK_IMPORT_ATTRIBUTE 207 #else 208 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER 209 #endif 210 211 /* 212 * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED 213 * 214 * Used on declarations introduced in WebKit 1.2, 215 * and deprecated in WebKit 1.2 216 */ 217 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 218 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE 219 #else 220 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER 221 #endif 222 223 /* 224 * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 225 * 226 * Used on declarations introduced in WebKit 1.0, 227 * but later deprecated in WebKit 1.2 228 */ 229 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 230 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 DEPRECATED_ATTRIBUTE 231 #else 232 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER 233 #endif 234 235 /* 236 * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 237 * 238 * Used on declarations introduced in WebKit 1.1, 239 * but later deprecated in WebKit 1.2 240 */ 241 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 242 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 DEPRECATED_ATTRIBUTE 243 #else 244 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER 245 #endif 246 247 /* 248 * DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER 249 * 250 * Used on types deprecated in WebKit 1.2 251 */ 252 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 253 #define DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER DEPRECATED_ATTRIBUTE 254 #else 255 #define DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER 256 #endif 257 258 259 260 261 262 263 /* 264 * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER 265 * 266 * Used on declarations introduced in WebKit 1.3 267 */ 268 #if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_3 269 #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER UNAVAILABLE_ATTRIBUTE 270 #elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_3 271 #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER WEAK_IMPORT_ATTRIBUTE 272 #else 273 #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER 274 #endif 275 276 /* 277 * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED 278 * 279 * Used on declarations introduced in WebKit 1.3, 280 * and deprecated in WebKit 1.3 281 */ 282 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 283 #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE 284 #else 285 #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER 286 #endif 287 288 /* 289 * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 290 * 291 * Used on declarations introduced in WebKit 1.0, 292 * but later deprecated in WebKit 1.3 293 */ 294 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 295 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE 296 #else 297 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER 298 #endif 299 300 /* 301 * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 302 * 303 * Used on declarations introduced in WebKit 1.1, 304 * but later deprecated in WebKit 1.3 305 */ 306 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 307 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE 308 #else 309 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER 310 #endif 311 312 /* 313 * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 314 * 315 * Used on declarations introduced in WebKit 1.2, 316 * but later deprecated in WebKit 1.3 317 */ 318 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 319 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE 320 #else 321 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER 322 #endif 323 324 /* 325 * DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER 326 * 327 * Used on types deprecated in WebKit 1.3 328 */ 329 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 330 #define DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER DEPRECATED_ATTRIBUTE 331 #else 332 #define DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER 333 #endif 334 335 336 337 338 339 340 /* 341 * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER 342 * 343 * Used on declarations introduced in WebKit 2.0 344 */ 345 #if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_2_0 346 #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER UNAVAILABLE_ATTRIBUTE 347 #elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_2_0 348 #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER WEAK_IMPORT_ATTRIBUTE 349 #else 350 #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER 351 #endif 352 353 /* 354 * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED 355 * 356 * Used on declarations introduced in WebKit 2.0, 357 * and deprecated in WebKit 2.0 358 */ 359 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 360 #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE 361 #else 362 #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER 363 #endif 364 365 /* 366 * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 367 * 368 * Used on declarations introduced in WebKit 1.0, 369 * but later deprecated in WebKit 2.0 370 */ 371 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 372 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE 373 #else 374 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER 375 #endif 376 377 /* 378 * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 379 * 380 * Used on declarations introduced in WebKit 1.1, 381 * but later deprecated in WebKit 2.0 382 */ 383 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 384 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE 385 #else 386 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER 387 #endif 388 389 /* 390 * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 391 * 392 * Used on declarations introduced in WebKit 1.2, 393 * but later deprecated in WebKit 2.0 394 */ 395 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 396 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE 397 #else 398 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER 399 #endif 400 401 /* 402 * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 403 * 404 * Used on declarations introduced in WebKit 1.3, 405 * but later deprecated in WebKit 2.0 406 */ 407 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 408 #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE 409 #else 410 #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER 411 #endif 412 413 /* 414 * DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER 415 * 416 * Used on types deprecated in WebKit 2.0 417 */ 418 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 419 #define DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER DEPRECATED_ATTRIBUTE 420 #else 421 #define DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER 422 #endif 423 424 425 426 427 428 429 /* 430 * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER 431 * 432 * Used on declarations introduced in WebKit 3.0 433 */ 434 #if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_3_0 435 #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER UNAVAILABLE_ATTRIBUTE 436 #elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_3_0 437 #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER WEAK_IMPORT_ATTRIBUTE 438 #else 439 #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER 440 #endif 441 442 /* 443 * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED 444 * 445 * Used on declarations introduced in WebKit 3.0, 446 * and deprecated in WebKit 3.0 447 */ 448 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 449 #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE 450 #else 451 #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER 452 #endif 453 454 /* 455 * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 456 * 457 * Used on declarations introduced in WebKit 1.0, 458 * but later deprecated in WebKit 3.0 459 */ 460 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 461 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE 462 #else 463 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER 464 #endif 465 466 /* 467 * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 468 * 469 * Used on declarations introduced in WebKit 1.1, 470 * but later deprecated in WebKit 3.0 471 */ 472 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 473 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE 474 #else 475 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER 476 #endif 477 478 /* 479 * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 480 * 481 * Used on declarations introduced in WebKit 1.2, 482 * but later deprecated in WebKit 3.0 483 */ 484 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 485 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE 486 #else 487 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER 488 #endif 489 490 /* 491 * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 492 * 493 * Used on declarations introduced in WebKit 1.3, 494 * but later deprecated in WebKit 3.0 495 */ 496 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 497 #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE 498 #else 499 #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER 500 #endif 501 502 /* 503 * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 504 * 505 * Used on declarations introduced in WebKit 2.0, 506 * but later deprecated in WebKit 3.0 507 */ 508 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 509 #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE 510 #else 511 #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER 512 #endif 513 514 /* 515 * DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER 516 * 517 * Used on types deprecated in WebKit 3.0 518 */ 519 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 520 #define DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER DEPRECATED_ATTRIBUTE 521 #else 522 #define DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER 523 #endif 524 525 526 527 528 529 530 /* 531 * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER 532 * 533 * Used on declarations introduced in WebKit 3.1 534 */ 535 #if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_3_1 536 #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER UNAVAILABLE_ATTRIBUTE 537 #elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_3_1 538 #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER WEAK_IMPORT_ATTRIBUTE 539 #else 540 #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER 541 #endif 542 543 /* 544 * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED 545 * 546 * Used on declarations introduced in WebKit 3.1, 547 * and deprecated in WebKit 3.1 548 */ 549 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 550 #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE 551 #else 552 #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER 553 #endif 554 555 /* 556 * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 557 * 558 * Used on declarations introduced in WebKit 1.0, 559 * but later deprecated in WebKit 3.1 560 */ 561 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 562 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE 563 #else 564 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER 565 #endif 566 567 /* 568 * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 569 * 570 * Used on declarations introduced in WebKit 1.1, 571 * but later deprecated in WebKit 3.1 572 */ 573 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 574 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE 575 #else 576 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER 577 #endif 578 579 /* 580 * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 581 * 582 * Used on declarations introduced in WebKit 1.2, 583 * but later deprecated in WebKit 3.1 584 */ 585 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 586 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE 587 #else 588 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER 589 #endif 590 591 /* 592 * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 593 * 594 * Used on declarations introduced in WebKit 1.3, 595 * but later deprecated in WebKit 3.1 596 */ 597 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 598 #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE 599 #else 600 #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER 601 #endif 602 603 /* 604 * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 605 * 606 * Used on declarations introduced in WebKit 2.0, 607 * but later deprecated in WebKit 3.1 608 */ 609 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 610 #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE 611 #else 612 #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER 613 #endif 614 615 /* 616 * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 617 * 618 * Used on declarations introduced in WebKit 3.0, 619 * but later deprecated in WebKit 3.1 620 */ 621 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 622 #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE 623 #else 624 #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER 625 #endif 626 627 /* 628 * DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER 629 * 630 * Used on types deprecated in WebKit 3.1 631 */ 632 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 633 #define DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER DEPRECATED_ATTRIBUTE 634 #else 635 #define DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER 636 #endif 637 638 639 640 641 642 643 /* 644 * AVAILABLE_IN_WEBKIT_VERSION_4_0 645 * 646 * Used on declarations introduced in WebKit 4.0 647 */ 648 #if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_LATEST 649 #define AVAILABLE_IN_WEBKIT_VERSION_4_0 UNAVAILABLE_ATTRIBUTE 650 #elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_LATEST 651 #define AVAILABLE_IN_WEBKIT_VERSION_4_0 WEAK_IMPORT_ATTRIBUTE 652 #else 653 #define AVAILABLE_IN_WEBKIT_VERSION_4_0 654 #endif 655 656 /* 657 * AVAILABLE_IN_WEBKIT_VERSION_4_0_BUT_DEPRECATED 658 * 659 * Used on declarations introduced in WebKit 4.0, 660 * and deprecated in WebKit 4.0 661 */ 662 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST 663 #define AVAILABLE_IN_WEBKIT_VERSION_4_0_BUT_DEPRECATED DEPRECATED_ATTRIBUTE 664 #else 665 #define AVAILABLE_IN_WEBKIT_VERSION_4_0_BUT_DEPRECATED AVAILABLE_IN_WEBKIT_VERSION_4_0 666 #endif 667 668 /* 669 * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 670 * 671 * Used on declarations introduced in WebKit 1.0, 672 * but later deprecated in WebKit 4.0 673 */ 674 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST 675 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE 676 #else 677 #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER 678 #endif 679 680 /* 681 * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 682 * 683 * Used on declarations introduced in WebKit 1.1, 684 * but later deprecated in WebKit 4.0 685 */ 686 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST 687 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE 688 #else 689 #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER 690 #endif 691 692 /* 693 * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 694 * 695 * Used on declarations introduced in WebKit 1.2, 696 * but later deprecated in WebKit 4.0 697 */ 698 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST 699 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE 700 #else 701 #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER 702 #endif 703 704 /* 705 * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 706 * 707 * Used on declarations introduced in WebKit 1.3, 708 * but later deprecated in WebKit 4.0 709 */ 710 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST 711 #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE 712 #else 713 #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER 714 #endif 715 716 /* 717 * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 718 * 719 * Used on declarations introduced in WebKit 2.0, 720 * but later deprecated in WebKit 4.0 721 */ 722 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST 723 #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE 724 #else 725 #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER 726 #endif 727 728 /* 729 * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 730 * 731 * Used on declarations introduced in WebKit 3.0, 732 * but later deprecated in WebKit 4.0 733 */ 734 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST 735 #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE 736 #else 737 #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER 738 #endif 739 740 /* 741 * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 742 * 743 * Used on declarations introduced in WebKit 3.1, 744 * but later deprecated in WebKit 4.0 745 */ 746 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST 747 #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE 748 #else 749 #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER 750 #endif 751 752 /* 753 * DEPRECATED_IN_WEBKIT_VERSION_4_0 754 * 755 * Used on types deprecated in WebKit 4.0 756 */ 757 #if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST 758 #define DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE 759 #else 760 #define DEPRECATED_IN_WEBKIT_VERSION_4_0 761 #endif 762 763 764 #endif /* __WebKitAvailability__ */ 765